Checkout
scramv1 project CMSSW CMSSW_2_1_10 cd CMSSW_2_1_10/src eval `scramv1 runtime -csh` cvs co RecoJets/JetAnalyzers
Compile
scramv1 b
Run
cmsRun RecoJets/JetAnalyzers/test/cruzet4.py
You will get a bunch of errors about missing files... but eventually you should get printout which looks like:
Begin processing the 108006th record. Run 57381, Event 63185, LumiSection 4 at 14-Sep-2008 14:12:04 CDT >>> processing event # run: 57381 event: 63185 time 5235845788462952912 Begin processing the 108007th record. Run 57381, Event 63186, LumiSection 4 at 14-Sep-2008 14:12:04 CDT >>> processing event # run: 57381 event: 63186 time 5235845788462948185 Begin processing the 108008th record. Run 57381, Event 63187, LumiSection 4 at 14-Sep-2008 14:12:04 CDT >>> processing event # run: 57381 event: 63187 time 5235845792757001089 Begin processing the 108009th record. Run 57381, Event 63188, LumiSection 4 at 14-Sep-2008 14:12:04 CDT
You can stop the event processing by hitting Ctrl-c. The job should end and the output files should be written.
The example will run over the cruzet4 reconstructed files and write out histograms to the file myhisto.root.
The code to analize events is located in:
RecoJets/JetAnalyzers/src/myJetAna.cc RecoJets/JetAnalyzers/interface/myJetAna.h
The code to filter events is located in:
RecoJets/JetAnalyzers/src/myFilter.cc RecoJets/JetAnalyzers/interface/myFilter.h
The filter loops over the jets and selects events passing a minimum jet pt requirement or events with jets that have some EM energy:
for ( CaloJetCollection::const_iterator ijet=jets->begin(); ijet!=jets->end(); ijet++) { if (ijet->pt() > 100.) filter_Pt = true; if (ijet->emEnergyFraction() > 0.05) filter_EMF = true; }
To view events you can use fireworks/cmsShow. This is a standalone event display which works reasonably well.
wget http://cern.ch/cms-sdt/fireworks/cmsShow21.tar.gz tar xzf cmsShow21.tar.gz cmsShow FilteredEvents.root
If this does not work, refer to the instructions which can be found at: WorkBookFireworks