Ignore:
Timestamp:
05/29/06 15:58:38 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjtrain/MJTrainDisp.cc

    r7552 r7749  
    115115    MHMatrix train("Train");
    116116    train.AddColumns(fRules);
     117    if (fEnableWeights)
     118        train.AddColumn("MWeight.fVal");
    117119    train.AddColumn("MHillasSrc.fDist*MGeomCam.fConvMm2Deg");
    118120    //train.AddColumn("TMath::Hypot(MHillasSrc.fDCA, MHillasSrc.fDist)*MGeomCam.fConvMm2Deg");
     
    126128    fill.AddPreCuts(fPreCuts);
    127129    fill.AddPreCuts(fTrainCuts);
     130    fill.AddPreTasks(fPreTasks);
     131    fill.AddPostTasks(fPostTasks);
    128132    if (!fill.Process())
    129133        return kFALSE;
     
    135139    rf.SetNumTry(fNumTry);
    136140    rf.SetNumObsoleteVariables(1);
     141    rf.SetLastDataColumnHasWeights(fEnableWeights);
    137142    rf.SetDisplay(fDisplay);
    138143    rf.SetLogStream(fLog);
     
    191196    MFillH fillh(&hist, "", "FillThetaSq");
    192197
     198    // 0 =  disp^2 - 2*disp*dist*cos(alpha) + dist^2
     199
     200    // cos^2 -1 = - sin^2
     201
     202    // disp = +dist* (cos(alpha) +/- sqrt(cos^2(alpha) - 1) )
     203
    193204    const char *rule = "(MHillasSrc.fDist*MGeomCam.fConvMm2Deg)^2 + (Disp.fVal)^2 - (2*MHillasSrc.fDist*MGeomCam.fConvMm2Deg*Disp.fVal*cos(MHillasSrc.fAlpha*kDeg2Rad))";
    194205
     
    199210    eval.SetY1("sqrt(ThetaSquared.fVal)");
    200211
    201     MH3 hdisp("MHillas.fSize", "sqrt(ThetaSquared.fVal)");
    202     hdisp.SetTitle("\\vartheta distribution vs. Size:Size [phe]:\\vartheta [\\circ]");
    203 
    204     MBinning binsx(100, 10, 100000, "BinningMH3X", "log");
    205     MBinning binsy(100, 0,  2,      "BinningMH3Y", "lin");
     212    MH3 hdisp1("MHillas.fSize",  "sqrt(ThetaSquared.fVal)");
     213    MH3 hdisp2("MMcEvt.fEnergy", "sqrt(ThetaSquared.fVal)");
     214    hdisp1.SetTitle("\\vartheta distribution vs. Size:Size [phe]:\\vartheta [\\circ]");
     215    hdisp2.SetTitle("\\vartheta distribution vs. Energy:Enerhy [GeV]:\\vartheta [\\circ]");
     216
     217    MBinning binsx(50, 10, 100000, "BinningMH3X", "log");
     218    MBinning binsy(50, 0,  1,      "BinningMH3Y", "lin");
    206219
    207220    plist.AddToList(&binsx);
    208221    plist.AddToList(&binsy);
    209222
    210     MFillH fillh2(&hdisp, "", "FillMH3");
    211     fillh2.SetDrawOption("blue profx");
     223    MFillH fillh2a(&hdisp1, "", "FillSize");
     224    MFillH fillh2b(&hdisp2, "", "FillEnergy");
     225    fillh2a.SetDrawOption("blue profx");
     226    fillh2b.SetDrawOption("blue profx");
     227    fillh2a.SetNameTab("Size");
     228    fillh2b.SetNameTab("Energy");
    212229
    213230    tlist.AddToList(&readtst);
     
    216233    tlist.AddToList(&calcthetasq);
    217234    tlist.AddToList(&fillh);
    218     tlist.AddToList(&fillh2);
     235    tlist.AddToList(&fillh2a);
     236    tlist.AddToList(&fillh2b);
    219237    tlist.AddToList(&eval);
    220238
Note: See TracChangeset for help on using the changeset viewer.