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.8 by konec, Mon Oct 29 12:41:09 2012 UTC vs.
Revision 1.9 by konec, Tue Nov 6 12:56:50 2012 UTC

# Line 25 | Line 25
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 88 | Line 92 | void L1RpcTreeAnalysis::analyze(const ed
92    TBranch *bdetsHitsCompatibleWithMuon = 0;
93    TBranch *bdetsSIMU =0;
94  
95 <  L1ObjColl* l1RpcColl = 0;
92 <  L1ObjColl* l1OtherColl = 0;
93 <  L1ObjColl* l1RpcCollEmu = 0;
94 <  L1ObjColl* l1GmtColl = 0;
95 >  L1ObjColl* l1ObjColl = 0;
96  
97    chain.SetBranchAddress("event",&event);
98    chain.SetBranchAddress("muon",&muon);
# Line 105 | Line 106 | void L1RpcTreeAnalysis::analyze(const ed
106    chain.SetBranchAddress("detsHitsCompatibleWithMuon",&detsHitsCompatibleWithMuon,&bdetsHitsCompatibleWithMuon);
107    chain.SetBranchAddress("detsSIMU",&detsSIMU,&bdetsSIMU);
108  
109 <  chain.SetBranchAddress("l1RpcColl",&l1RpcColl);
109 <  chain.SetBranchAddress("l1OtherColl",&l1OtherColl);
110 <  chain.SetBranchAddress("l1RpcCollEmu",&l1RpcCollEmu);
111 <  chain.SetBranchAddress("l1GmtColl",&l1GmtColl);
109 >  chain.SetBranchAddress("l1ObjColl",&l1ObjColl);
110  
111  
112    //
# Line 132 | 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 <   bool goodMenu = theAnaMenu.filter(event, muon, namesL1, algosL1, namesHLT, algosHLT);
147 <   if (!goodMenu) continue;
150 <
151 < /*
152 <   std::cout <<" Number of bits L1: " <<  bitsL1->names.size()<<"/"<<namesL1.size()<<"/"<<bitsL1->firedAlgos.size()
153 <                           <<" HLT: "<< bitsHLT->names.size()<<"/"<<namesHLT.size()<<"/"<<bitsHLT->firedAlgos.size()<<std::endl;
154 <   std::cout <<"----------------------- L1: "<<std::endl;
155 <   for (std::vector<unsigned int>::const_iterator it=algosL1.begin(); it< algosL1.end(); ++it) std::cout <<"L1 idx: "<<*it<<" "<<namesL1[*it]<< std::endl;
156 <   std::cout <<"----------------------- HLT: "<<std::endl;
157 <   for (std::vector<unsigned int>::const_iterator it=algosHLT.begin(); it< algosHLT.end(); ++it) std::cout<<" HLT idx: "<<*it<<" "<<namesHLT[*it]<< std::endl;
158 < */
159 <
160 <   theAnaMuonDistribution.run(muon);
161 <   theAnaRpcVsOth.run(muon,l1RpcColl,l1OtherColl);
162 <   theAnaEff.run(muon,l1RpcColl,l1OtherColl);
163 <   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);
152 <   theAnaTimingL1.run(event,muon, l1RpcColl, l1OtherColl, l1GmtColl);
151 >   theAnaClu.run( event, muon, l1ObjColl, *detsHitsCompatibleWithMuon);
152 >   theAnaTimingL1.run(event,muon, l1ObjColl);
153  
170 /*
171   std::cout <<"----------------"<<std::endl;
172   std::cout <<"GmtColl:"<<std::endl; l1GmtColl->print();
173   std::cout <<"RpcColl:"<<std::endl; l1RpcColl->print();
174   std::cout <<"OtherColl:"<<std::endl; l1OtherColl->print();
175 */
154   //   theAnaEmu.debug =theAnaDet.debug;
155   //    std::cout <<"----------"<<std::endl;
156   //   theAnaDet.debug =theAnaEmu.debug;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines