Changeset 6066 for trunk/MagicSoft
- Timestamp:
- 01/28/05 09:12:44 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6059 r6066 20 20 21 21 -*-*- END OF LINE -*-*- 22 2005/01/28 Abelardo Moralejo 23 24 * mtemp/mpadova/macros/trainsubsample.C 25 - added # of events to be written in the output (instead of 26 fraction of total). 27 22 28 2005/01/27 Daniel Mazin and Markus Gaug 23 29 -
trunk/MagicSoft/Mars/mtemp/mpadova/macros/trainsubsample.C
r5831 r6066 42 42 plist.AddToList(&tlist); 43 43 44 MReadMarsFile read("Events", "star_20040915_CrabNebulaW 1.root");44 MReadMarsFile read("Events", "star_20040915_CrabNebulaW2.root"); 45 45 46 46 MFEventSelector evsel; 47 evsel.SetSelectionRatio(0.05); // Fraction of events in output 47 48 Float_t nevents = 50000; // Number of events to select. 49 Float_t ratio = nevents / (Float_t) read.GetEntries(); 50 51 evsel.SetSelectionRatio(ratio); // Fraction of events in output 48 52 49 53 read.DisableAutoScheme(); … … 54 58 plist.AddToList(mcevt); 55 59 56 MWriteRootFile write("star_train_20040915_CrabNebulaW 1.root", "recreate");60 MWriteRootFile write("star_train_20040915_CrabNebulaW2.root", "recreate"); 57 61 58 62 write.AddContainer("MMcEvt", "Events", kFALSE);
Note:
See TracChangeset
for help on using the changeset viewer.