Changeset 5330 for trunk/MagicSoft/Mars/mtemp/mpadova
- Timestamp:
- 11/01/04 21:05:21 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mpadova/macros/RanForestPD.C
r5327 r5330 47 47 // (less than total sample, to speed up execution) 48 48 // 49 Float_t gamma_frac = 1.5*(numhadrons / numgammas);49 Float_t gamma_frac = 2.*(numhadrons / numgammas); 50 50 51 51 … … 54 54 tlist.AddToList(&read); 55 55 56 MFParticleId fgamma("MMcEvt", '=', MMcEvt::kGAMMA); 57 tlist.AddToList(&fgamma); 58 59 MFParticleId fhadrons("MMcEvt", '!', MMcEvt::kGAMMA); 56 MFParticleId fhadrons("MMcEvt", '!', MMcEvt::kGAMMA); 60 57 tlist.AddToList(&fhadrons); 61 58 62 63 59 MHMatrix matrixg("MatrixGammas"); 64 60 65 61 // matrixg.AddColumn("floor(0.5+(cos(MMcEvt.fTelescopeTheta)/0.01))"); 66 67 62 // matrixg.AddColumn("MMcEvt.fTelescopePhi"); 68 63 // matrixg.AddColumn("MSigmabar.fSigmabar"); … … 78 73 matrixg.AddColumn("MHillas.fWidth/(-13.1618+10.0492*log10(MHillas.fSize))"); 79 74 matrixg.AddColumn("MHillas.fLength/(-57.3784+32.6131*log10(MHillas.fSize))"); 80 81 75 82 76 // matrixg.AddColumn("(MHillas.fSize/(MHillas.fWidth*MHillas.fLength))"); … … 93 87 // 94 88 matrixg.AddColumn("MHillasExt.fM3Long*MHillasSrc.fCosDeltaAlpha/abs(MHillasSrc.fCosDeltaAlpha)"); 95 matrixg.AddColumn("MHillasSrc.fAlpha"); 96 89 90 //# matrixg.AddColumn("MHillasSrc.fAlpha"); 97 91 98 92 // … … 101 95 TString dummy("(MHillas.fSize<"); 102 96 dummy += minsize; 97 dummy += ")"; 103 98 104 99 // AM, useful FOR High Energy only: 105 // dummy += ") || (MImagePar.fNumSatPixelsLG>0"; 106 dummy += ")"; 100 // dummy += " || (MImagePar.fNumSatPixelsLG>0)"; 107 101 108 102 MContinue SizeCut(dummy); 109 103 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); 110 109 111 110 plist.AddToList(&matrixg); … … 127 126 128 127 MFillH fillmatg("MatrixGammas"); 129 // fillmatg.SetFilter(&fgamma);130 128 fillmatg.SetFilter(&reduce_training_gammas); 131 129 tlist.AddToList(&fillmatg); … … 157 155 MTaskList tlist2; 158 156 plist.Replace(&tlist2); 159 160 //161 // Just a check:162 // matrixh.ShuffleRows(9999);163 // matrixg.ShuffleRows(1111);164 //165 157 166 158 MRanForestGrow rfgrow2; … … 189 181 190 182 evtloop.SetProgressBar(&bar); 183 191 184 if (!evtloop.Eventloop()) 192 185 return; … … 219 212 read3.AddFile("star_helium_test.root"); 220 213 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 228 214 read3.DisableAutoScheme(); 229 215 tlist3.AddToList(&read3); 216 230 217 tlist3.AddToList(&SizeCut); 231 218 … … 240 227 outfname += "_all.root"; 241 228 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");248 229 249 230 write.AddContainer("MMcEvt", "Events"); … … 257 238 write.AddContainer("MRawRunHeader", "RunHeaders"); 258 239 write.AddContainer("MSrcPosCam", "RunHeaders"); 259 write.AddContainer("MMcRunHeader", 240 write.AddContainer("MMcRunHeader", "RunHeaders"); 260 241 261 242 /*
Note:
See TracChangeset
for help on using the changeset viewer.