Changeset 6024 for trunk/MagicSoft/Mars/mtemp
- Timestamp:
- 01/26/05 11:24:12 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mpadova/macros/RanForestDISP.C
r5831 r6024 61 61 62 62 63 MReadMarsFile read("Events", "/data1/magic/mc_data/root/Period021_0.73_mirror/FixedWindowPeakSearch/WOBBLE_ Star_6slices_tc32/star_gamma_train_new.root");63 MReadMarsFile read("Events", "/data1/magic/mc_data/root/Period021_0.73_mirror/FixedWindowPeakSearch/WOBBLE_Calib_6slices/tc_3.84_2.56/star_gamma_train_new.root"); 64 64 Float_t numgammas = read.GetEntries(); 65 65 66 read.AddFile(" /data2/magic/data/rootdata/Crab/Period021/20040915/star_train_20040915_CrabNebulaW1.root");66 read.AddFile("star_train_20050110_CrabNebulaW1.root"); 67 67 Float_t numhadrons = read.GetEntries() - numgammas; 68 68 69 69 // Fraction of gammas to be used in training: 70 70 // Float_t gamma_frac = 1.5*(numhadrons / numgammas); 71 72 71 Float_t gamma_frac = 1.; 72 73 // Total hadron number to be processed in training: 74 // If you run RF over different data runs, using always the same # of training gammas, 75 // you should also use always a fixed number of hadrons for training (although the data 76 // runs may be of different duration). Otherwise the meaning of the output hadronness 77 // would be different for the different subsamples, since its absolute values depend on 78 // the statistics of the training sample. The number set here is the number BEFORE the 79 // "a priori cuts" set above through "skipevents". 80 81 Float_t select_n_hadrons = 37000.; 82 Float_t hadron_frac = select_n_hadrons / numhadrons; 73 83 74 84 read.DisableAutoScheme(); … … 165 175 plist.AddToList(&matrixh); 166 176 177 MFEventSelector reduce_training_hadrons; 178 reduce_training_hadrons.SetSelectionRatio(hadron_frac); 179 MFilterList hadfilter; 180 hadfilter.AddToList(&reduce_training_hadrons); 181 hadfilter.AddToList(&fhadrons); 182 tlist.AddToList(&hadfilter); 183 167 184 MFillH fillmath("MatrixHadrons"); 168 fillmath.SetFilter(& fhadrons);185 fillmath.SetFilter(&hadfilter); 169 186 tlist.AddToList(&fillmath); 187 188 MContinue skiphad(&fhadrons); 189 tlist.AddToList(&skiphad); 170 190 171 191 MFEventSelector reduce_training_gammas; 172 192 reduce_training_gammas.SetSelectionRatio(gamma_frac); 173 193 tlist.AddToList(&reduce_training_gammas); 174 MContinue skiphad(&fhadrons);175 tlist.AddToList(&skiphad);176 194 177 195 MFillH fillmatg("MatrixGammas"); … … 263 281 264 282 265 MReadMarsFile read3("Events", " /data2/magic/data/rootdata/Crab/Period021/20040915/star_20040915_CrabNebulaW1.root");283 MReadMarsFile read3("Events", "star_20050110_CrabNebulaW1.root"); 266 284 267 285 read3.DisableAutoScheme(); … … 280 298 TString outfname = "star_S"; 281 299 outfname += minsize; 282 outfname += "_200 40915_CrabNebulaW1.root";300 outfname += "_20050110_CrabNebulaW1.root"; 283 301 MWriteRootFile write(outfname, "recreate"); 284 302
Note:
See TracChangeset
for help on using the changeset viewer.