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.6 by konec, Tue Oct 23 16:14:05 2012 UTC vs.
Revision 1.9 by konec, Tue Nov 6 12:56:50 2012 UTC

# Line 20 | Line 20
20   #include "UserCode/L1RpcTriggerAnalysis/interface/MuonObj.h"
21   #include "UserCode/L1RpcTriggerAnalysis/interface/L1ObjColl.h"
22   #include "UserCode/L1RpcTriggerAnalysis/interface/SynchroCountsObj.h"
23 + #include "UserCode/L1RpcTriggerAnalysis/interface/DetCluDigiObj.h"
24   #include "UserCode/L1RpcTriggerAnalysis/interface/TriggerMenuResultObj.h"
25  
26   #include "UserCode/L1RpcTriggerAnalysis/interface/ConverterRPCRawSynchroSynchroCountsObj.h"
27  
28 + L1RpcTreeAnalysis::L1RpcTreeAnalysis(const edm::ParameterSet & cfg)
29 +  : theConfig(cfg),
30 +    theAnaMuonDistribution( cfg.getParameter<edm::ParameterSet>("anaMuonDistribution") )
31 + { }
32  
33   void L1RpcTreeAnalysis::beginJob()
34   {
# Line 38 | Line 43 | void L1RpcTreeAnalysis::beginJob()
43    theAnaSynch.init(theHistos);
44    theAnaClu.init(theHistos);
45    theAnaTimingL1.init(theHistos);
46 <
46 >  theAnaMenu.init(theHistos);
47   }
48  
49   void L1RpcTreeAnalysis::beginRun(const edm::Run& ru, const edm::EventSetup& es)
# Line 72 | Line 77 | void L1RpcTreeAnalysis::analyze(const ed
77    std::vector<SynchroCountsObj> *counts= 0;
78    std::vector<uint32_t> *detsCrossedByMuon = 0;
79    std::vector<uint32_t> *detsCrossedByMuonDeepInside = 0;
80 <  std::vector<uint32_t> *detsHitsCompatibleWithMuon = 0;
80 >  std::vector<DetCluDigiObj> *detsHitsCompatibleWithMuon = 0;
81    std::vector<uint32_t> *detsSIMU = 0;
77  std::vector<uint32_t> *nDigisCompDets = 0;
78  std::vector<uint32_t> *clSizeCompDets = 0;
82  
83    EventObj * event = 0;
84    MuonObj * muon = 0;
# Line 88 | Line 91 | void L1RpcTreeAnalysis::analyze(const ed
91    TBranch *bdetsCrossedByMuonDeepInside =0;
92    TBranch *bdetsHitsCompatibleWithMuon = 0;
93    TBranch *bdetsSIMU =0;
91  TBranch *bnDigisCompDets =0;
92  TBranch *bclSizeCompDets =0;
94  
95 <  L1ObjColl* l1RpcColl = 0;
95 <  L1ObjColl* l1OtherColl = 0;
96 <  L1ObjColl* l1RpcCollEmu = 0;
95 >  L1ObjColl* l1ObjColl = 0;
96  
97    chain.SetBranchAddress("event",&event);
98    chain.SetBranchAddress("muon",&muon);
# Line 106 | Line 105 | void L1RpcTreeAnalysis::analyze(const ed
105    chain.SetBranchAddress("detsCrossedByMuonDeepInside",&detsCrossedByMuonDeepInside,&bdetsCrossedByMuonDeepInside);
106    chain.SetBranchAddress("detsHitsCompatibleWithMuon",&detsHitsCompatibleWithMuon,&bdetsHitsCompatibleWithMuon);
107    chain.SetBranchAddress("detsSIMU",&detsSIMU,&bdetsSIMU);
109  chain.SetBranchAddress("nDigisCompDets",&nDigisCompDets, &bnDigisCompDets);
110  chain.SetBranchAddress("clSizeCompDets",&clSizeCompDets, &bclSizeCompDets);
108  
109 <  chain.SetBranchAddress("l1RpcColl",&l1RpcColl);
113 <  chain.SetBranchAddress("l1OtherColl",&l1OtherColl);
114 <  chain.SetBranchAddress("l1RpcCollEmu",&l1RpcCollEmu);
109 >  chain.SetBranchAddress("l1ObjColl",&l1ObjColl);
110  
111  
112    //
# Line 135 | Line 130 | void L1RpcTreeAnalysis::analyze(const ed
130                  <<" done:"  << std::setw(6)<< std::setiosflags(std::ios::fixed) << std::setprecision(2) << ev*100./nentries<<"%"<<std::endl;
131      }
132  
133 < //    if (ev > 10) break;
133 > //    if (ev > 100) break;
134  
135   //    if (event->run != 178854) continue;
136   //    if (lastLumi != (*event).lumi) { lastLumi = (*event).lumi; std::cout <<"lumi: " << (*event).lumi<<std::endl; }
137   //   theAnaDet.debug = false;
138   //    if ((*event).id==60422922)theAnaRpcMisc.debug = true;
139  
140 <   static std::vector<std::string>   namesL1;
141 <   if (bitsL1->names.size() != 0)    namesL1=bitsL1->names;
142 <   static std::vector<std::string>   namesHLT;
143 <   if (bitsHLT->names.size() != 0)   namesHLT=bitsHLT->names;
144 <   const std::vector<unsigned int> & algosL1 = bitsL1->firedAlgos;
145 <   const std::vector<unsigned int> & algosHLT = bitsHLT->firedAlgos;
146 <
147 < /*
153 <   std::cout <<" Number of bits L1: " <<  bitsL1->names.size()<<"/"<<namesL1.size()<<"/"<<bitsL1->firedAlgos.size()
154 <                           <<" HLT: "<< bitsHLT->names.size()<<"/"<<namesHLT.size()<<"/"<<bitsHLT->firedAlgos.size()<<std::endl;
155 <   std::cout <<"----------------------- L1: "<<std::endl;
156 <   for (std::vector<unsigned int>::const_iterator it=algosL1.begin(); it< algosL1.end(); ++it) std::cout <<"L1 idx: "<<*it<<" "<<namesL1[*it]<< std::endl;
157 <   std::cout <<"----------------------- HLT: "<<std::endl;
158 <   for (std::vector<unsigned int>::const_iterator it=algosHLT.begin(); it< algosHLT.end(); ++it) std::cout<<" HLT idx: "<<*it<<" "<<namesHLT[*it]<< std::endl;
159 < */
160 <
161 <   theAnaMuonDistribution.run(muon);
162 <   theAnaRpcVsOth.run(muon,l1RpcColl,l1OtherColl);
163 <   theAnaEff.run(muon,l1RpcColl,l1OtherColl);
164 <   theAnaRpcMisc.run(event,muon,l1RpcColl,l1OtherColl);
140 >   // ANALYSE AND FILTER KINEMCTICS
141 >   if (!theAnaMuonDistribution.filter(muon)) continue;
142 >   // ANALYSE AND FILTER TRIGGER MENU
143 >   if (!theAnaMenu.filter(event, muon, bitsL1, bitsHLT)) continue;
144 >
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, l1RpcCollEmu, l1RpcColl);
149 >   theAnaEmu.run ( event, muon, l1ObjColl);
150     theAnaSynch.run( event, muon, ConverterRPCRawSynchroSynchroCountsObj::toRawSynchro( *counts));
151 <   theAnaClu.run( event, muon, l1RpcColl, *detsHitsCompatibleWithMuon, *nDigisCompDets, *clSizeCompDets);
152 <   theAnaTimingL1.run(event,muon,l1RpcColl,l1OtherColl);
151 >   theAnaClu.run( event, muon, l1ObjColl, *detsHitsCompatibleWithMuon);
152 >   theAnaTimingL1.run(event,muon, l1ObjColl);
153  
154   //   theAnaEmu.debug =theAnaDet.debug;
155   //    std::cout <<"----------"<<std::endl;
# Line 183 | Line 166 | void L1RpcTreeAnalysis::endJob()
166    theAnaRpcMisc.resume(theHistos);
167    TGraph* hGraph_RunClu = theAnaClu.resume();
168    theAnaTimingL1.resume(theHistos);
169 +  theAnaMenu.resume(theHistos);
170  
171    theAnaSynch.endJob();
172  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines