ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/L1RpcTriggerAnalysis/plugins/L1RpcTreeAnalysis.cc
(Generate patch)

Comparing UserCode/L1RpcTriggerAnalysis/plugins/L1RpcTreeAnalysis.cc (file contents):
Revision 1.9 by konec, Tue Nov 6 12:56:50 2012 UTC vs.
Revision 1.14 by konec, Wed Apr 24 19:54:35 2013 UTC

# Line 16 | Line 16
16  
17   #include "UserCode/L1RpcTriggerAnalysis/interface/L1Obj.h"
18   #include "UserCode/L1RpcTriggerAnalysis/interface/EventObj.h"
19 + #include "UserCode/L1RpcTriggerAnalysis/interface/EventObjBXExtra.h"
20   #include "UserCode/L1RpcTriggerAnalysis/interface/TrackObj.h"
21   #include "UserCode/L1RpcTriggerAnalysis/interface/MuonObj.h"
22   #include "UserCode/L1RpcTriggerAnalysis/interface/L1ObjColl.h"
# Line 23 | Line 24
24   #include "UserCode/L1RpcTriggerAnalysis/interface/DetCluDigiObj.h"
25   #include "UserCode/L1RpcTriggerAnalysis/interface/TriggerMenuResultObj.h"
26  
27 +
28   #include "UserCode/L1RpcTriggerAnalysis/interface/ConverterRPCRawSynchroSynchroCountsObj.h"
29  
30   L1RpcTreeAnalysis::L1RpcTreeAnalysis(const edm::ParameterSet & cfg)
31    : theConfig(cfg),
32 <    theAnaMuonDistribution( cfg.getParameter<edm::ParameterSet>("anaMuonDistribution") )
32 >    theAnaMuonDistribution( cfg.getParameter<edm::ParameterSet>("anaMuonDistribution") ),
33 >    theAnaTimingL1 (cfg.getParameter<edm::ParameterSet>("anaTimingL1") ),
34 >    theAnaMenu(cfg.getParameter<edm::ParameterSet>("anaMenu") ),
35 >    theAnaEvent(cfg.getParameter<edm::ParameterSet>("anaEvent") )
36   { }
37  
38   void L1RpcTreeAnalysis::beginJob()
# Line 43 | Line 48 | void L1RpcTreeAnalysis::beginJob()
48    theAnaSynch.init(theHistos);
49    theAnaClu.init(theHistos);
50    theAnaTimingL1.init(theHistos);
51 +  theAnaEvent.init(theHistos);
52    theAnaMenu.init(theHistos);
53   }
54  
# Line 122 | Line 128 | void L1RpcTreeAnalysis::analyze(const ed
128    unsigned int lastRun = 0;
129    for (int ev=0; ev<nentries; ev++) {
130      chain.GetEntry(ev);
131 +    theAnaMenu.updateMenu(bitsL1->names, bitsHLT->names);
132  
133      if (lastRun != (*event).run) {
134 + //    if (true) {
135        lastRun = (*event).run;
136        std::cout <<"RUN:"    << std::setw(7) << (*event).run
137                  <<" event:" << std::setw(8) << ev
138 <                <<" done:"  << std::setw(6)<< std::setiosflags(std::ios::fixed) << std::setprecision(2) << ev*100./nentries<<"%"<<std::endl;
138 >                <<" done:"  << std::setw(6)<< std::setiosflags(std::ios::fixed) << std::setprecision(2) << ev*100./nentries<<"%";
139 >      std::cout<<std::endl;
140      }
141  
142 < //    if (ev > 100) break;
143 <
144 < //    if (event->run != 178854) continue;
145 < //    if (lastLumi != (*event).lumi) { lastLumi = (*event).lumi; std::cout <<"lumi: " << (*event).lumi<<std::endl; }
146 < //   theAnaDet.debug = false;
147 < //    if ((*event).id==60422922)theAnaRpcMisc.debug = true;
148 <
142 > /*  
143 >   if (     event->id == 597978012
144 >        ||  event->id == 14791798  
145 >        ||  event->id == 436261807
146 >        ||  event->id == 873776280  
147 >        ||  event->id == 960307389
148 >        ||  event->id == 150097556
149 >        ||  event->id == 42062946
150 >        ||  event->id == 1064121551
151 >        ||  event->id == 1499489591
152 >        ||  event->id == 60161631
153 >        ||  event->id == 624624695
154 >        ||  event->id == 727298833
155 >        ||  event->id == 835600542
156 >        ||  event->id == 216373776
157 >        ||  event->id == 1107585611
158 >        ||  event->id == 197907027
159 >      ) theAnaMenu.debug = true; else theAnaMenu.debug = false;
160 > */
161 >
162 >   // EVENT NUMBER, BX structure etc.
163 >   EventObjBXExtra eventBx(*event);
164 >   if ( !theAnaEvent.filter(&eventBx) && theConfig.getParameter<bool>("filterByAnaEvent") ) continue;
165     // ANALYSE AND FILTER KINEMCTICS
166 <   if (!theAnaMuonDistribution.filter(muon)) continue;
166 >   if ( !theAnaMuonDistribution.filter(muon) && theConfig.getParameter<bool>("filterByAnaMuonDistribution") ) continue;
167     // ANALYSE AND FILTER TRIGGER MENU
168 <   if (!theAnaMenu.filter(event, muon, bitsL1, bitsHLT)) continue;
168 >   if ( !theAnaMenu.filter(event, muon, bitsL1, bitsHLT) && theConfig.getParameter<bool>("filterByAnaMenu") ) continue;
169 >
170 > //   theAnaRpcVsOth.run(muon,l1ObjColl);
171 > //   theAnaEff.run(muon, l1ObjColl);
172 > //   theAnaRpcMisc.run(event,muon,l1ObjColl);
173 > //   theAnaDet.run( muon, *detsHitsCompatibleWithMuon,  *detsCrossedByMuon, *detsCrossedByMuonDeepInside);
174 > //   theAnaEmu.run ( event, muon, l1ObjColl);
175 > //   theAnaSynch.run( event, muon, ConverterRPCRawSynchroSynchroCountsObj::toRawSynchro( *counts));
176 > //   theAnaClu.run( event, muon, l1ObjColl, *detsHitsCompatibleWithMuon);
177 >   theAnaTimingL1.run( &eventBx, muon, l1ObjColl);
178  
145   theAnaRpcVsOth.run(muon,l1ObjColl);
146   theAnaEff.run(muon, l1ObjColl);
147   theAnaRpcMisc.run(event,muon,l1ObjColl);
148   theAnaDet.run( muon, *detsHitsCompatibleWithMuon,  *detsCrossedByMuon, *detsCrossedByMuonDeepInside);
149   theAnaEmu.run ( event, muon, l1ObjColl);
150   theAnaSynch.run( event, muon, ConverterRPCRawSynchroSynchroCountsObj::toRawSynchro( *counts));
151   theAnaClu.run( event, muon, l1ObjColl, *detsHitsCompatibleWithMuon);
152   theAnaTimingL1.run(event,muon, l1ObjColl);
153
154 //   theAnaEmu.debug =theAnaDet.debug;
155 //    std::cout <<"----------"<<std::endl;
156 //   theAnaDet.debug =theAnaEmu.debug;
157 //    if (anaDet.debug) std::cout <<" Event: "<<(*event).id <<" Lumi: "<<(*event).lumi<< std::endl;
158  
179    }
180   }
181  
# Line 167 | Line 187 | void L1RpcTreeAnalysis::endJob()
187    TGraph* hGraph_RunClu = theAnaClu.resume();
188    theAnaTimingL1.resume(theHistos);
189    theAnaMenu.resume(theHistos);
190 +  theAnaEvent.resume(theHistos);
191  
192    theAnaSynch.endJob();
193  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines