Changeset 5330


Ignore:
Timestamp:
11/01/04 21:05:21 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5329 r5330  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
     22
     23 2004/11/01: Abelardo Moralejo
     24
     25   * mtemp/mpadova/macros/RanForestPD.C
     26
     27     - Just some cleaning up of old (commented) code.
     28
    2229
    23302004/11/01: David Paneque
  • trunk/MagicSoft/Mars/mtemp/mpadova/macros/RanForestPD.C

    r5327 r5330  
    4747    // (less than total sample, to speed up execution)
    4848    //
    49     Float_t gamma_frac = 1.5*(numhadrons / numgammas);
     49    Float_t gamma_frac = 2.*(numhadrons / numgammas);
    5050
    5151
     
    5454    tlist.AddToList(&read);
    5555
    56     MFParticleId fgamma("MMcEvt", '=', MMcEvt::kGAMMA);
    57     tlist.AddToList(&fgamma);
    58 
    59     MFParticleId fhadrons("MMcEvt", '!', MMcEvt::kGAMMA);
     56     MFParticleId fhadrons("MMcEvt", '!', MMcEvt::kGAMMA);
    6057    tlist.AddToList(&fhadrons);
    6158
    62 
    6359    MHMatrix matrixg("MatrixGammas");
    6460
    6561    //    matrixg.AddColumn("floor(0.5+(cos(MMcEvt.fTelescopeTheta)/0.01))");
    66 
    6762    //    matrixg.AddColumn("MMcEvt.fTelescopePhi");
    6863    //    matrixg.AddColumn("MSigmabar.fSigmabar");
     
    7873    matrixg.AddColumn("MHillas.fWidth/(-13.1618+10.0492*log10(MHillas.fSize))");   
    7974    matrixg.AddColumn("MHillas.fLength/(-57.3784+32.6131*log10(MHillas.fSize))");
    80 
    8175
    8276    //    matrixg.AddColumn("(MHillas.fSize/(MHillas.fWidth*MHillas.fLength))");
     
    9387    //
    9488    matrixg.AddColumn("MHillasExt.fM3Long*MHillasSrc.fCosDeltaAlpha/abs(MHillasSrc.fCosDeltaAlpha)");
    95     matrixg.AddColumn("MHillasSrc.fAlpha");
    96 
     89
     90    //#    matrixg.AddColumn("MHillasSrc.fAlpha");
    9791
    9892    //
     
    10195    TString dummy("(MHillas.fSize<");
    10296    dummy += minsize;
     97    dummy += ")";
    10398
    10499    // AM, useful FOR High Energy only:
    105     //    dummy += ") || (MImagePar.fNumSatPixelsLG>0";
    106     dummy += ")";
     100    //    dummy += " || (MImagePar.fNumSatPixelsLG>0)";
    107101
    108102    MContinue SizeCut(dummy);
    109103    tlist.AddToList(&SizeCut);
     104
     105    // AM TEST!!!, no muons in train
     106    //    dummy = "(MMcEvt.fMuonCphFraction>0.1)";
     107    //    MContinue MuonsCut(dummy);
     108    //    tlist.AddToList(&MuonsCut);
    110109
    111110    plist.AddToList(&matrixg);
     
    127126
    128127    MFillH fillmatg("MatrixGammas");
    129     //    fillmatg.SetFilter(&fgamma);
    130128    fillmatg.SetFilter(&reduce_training_gammas);
    131129    tlist.AddToList(&fillmatg);
     
    157155    MTaskList tlist2;
    158156    plist.Replace(&tlist2);
    159 
    160     //
    161     // Just a check:
    162     //    matrixh.ShuffleRows(9999);
    163     //    matrixg.ShuffleRows(1111);
    164     //
    165157
    166158    MRanForestGrow rfgrow2;
     
    189181
    190182    evtloop.SetProgressBar(&bar);
     183
    191184    if (!evtloop.Eventloop())
    192185        return;
     
    219212    read3.AddFile("star_helium_test.root");
    220213
    221 
    222     /*
    223       MReadMarsFile  read3("Events", "star_gammas_test_extended.root");
    224       read3.AddFile("star_protons_test_extended.root");
    225       read3.AddFile("star_helium_test_extended.root");
    226     */
    227 
    228214    read3.DisableAutoScheme();
    229215    tlist3.AddToList(&read3);
     216
    230217    tlist3.AddToList(&SizeCut);
    231218
     
    240227    outfname += "_all.root";
    241228    MWriteRootFile write(outfname, "recreate");
    242 
    243 
    244     //    MWriteRootFile write("star_surviving_hadrons.root", "recreate");
    245     //    MWriteRootFile write("star_surviving_gammas.root", "recreate");
    246 
    247     //    write.AddContainer("MSigmabar", "Events");
    248229
    249230    write.AddContainer("MMcEvt",         "Events");
     
    257238    write.AddContainer("MRawRunHeader", "RunHeaders");
    258239    write.AddContainer("MSrcPosCam",    "RunHeaders");
    259     write.AddContainer("MMcRunHeader",        "RunHeaders");
     240    write.AddContainer("MMcRunHeader",  "RunHeaders");
    260241
    261242    /*
Note: See TracChangeset for help on using the changeset viewer.