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 |
+ |
theAnaTimingL1 (cfg.getParameter<edm::ParameterSet>("anaTimingL1") ) |
32 |
+ |
{ } |
33 |
|
|
34 |
|
void L1RpcTreeAnalysis::beginJob() |
35 |
|
{ |
44 |
|
theAnaSynch.init(theHistos); |
45 |
|
theAnaClu.init(theHistos); |
46 |
|
theAnaTimingL1.init(theHistos); |
47 |
< |
|
47 |
> |
theAnaMenu.init(theHistos); |
48 |
|
} |
49 |
|
|
50 |
|
void L1RpcTreeAnalysis::beginRun(const edm::Run& ru, const edm::EventSetup& es) |
78 |
|
std::vector<SynchroCountsObj> *counts= 0; |
79 |
|
std::vector<uint32_t> *detsCrossedByMuon = 0; |
80 |
|
std::vector<uint32_t> *detsCrossedByMuonDeepInside = 0; |
81 |
< |
std::vector<uint32_t> *detsHitsCompatibleWithMuon = 0; |
81 |
> |
std::vector<DetCluDigiObj> *detsHitsCompatibleWithMuon = 0; |
82 |
|
std::vector<uint32_t> *detsSIMU = 0; |
77 |
– |
std::vector<uint32_t> *nDigisCompDets = 0; |
78 |
– |
std::vector<uint32_t> *clSizeCompDets = 0; |
83 |
|
|
84 |
|
EventObj * event = 0; |
85 |
|
MuonObj * muon = 0; |
92 |
|
TBranch *bdetsCrossedByMuonDeepInside =0; |
93 |
|
TBranch *bdetsHitsCompatibleWithMuon = 0; |
94 |
|
TBranch *bdetsSIMU =0; |
91 |
– |
TBranch *bnDigisCompDets =0; |
92 |
– |
TBranch *bclSizeCompDets =0; |
95 |
|
|
96 |
< |
L1ObjColl* l1RpcColl = 0; |
95 |
< |
L1ObjColl* l1OtherColl = 0; |
96 |
< |
L1ObjColl* l1RpcCollEmu = 0; |
96 |
> |
L1ObjColl* l1ObjColl = 0; |
97 |
|
|
98 |
|
chain.SetBranchAddress("event",&event); |
99 |
|
chain.SetBranchAddress("muon",&muon); |
106 |
|
chain.SetBranchAddress("detsCrossedByMuonDeepInside",&detsCrossedByMuonDeepInside,&bdetsCrossedByMuonDeepInside); |
107 |
|
chain.SetBranchAddress("detsHitsCompatibleWithMuon",&detsHitsCompatibleWithMuon,&bdetsHitsCompatibleWithMuon); |
108 |
|
chain.SetBranchAddress("detsSIMU",&detsSIMU,&bdetsSIMU); |
109 |
– |
chain.SetBranchAddress("nDigisCompDets",&nDigisCompDets, &bnDigisCompDets); |
110 |
– |
chain.SetBranchAddress("clSizeCompDets",&clSizeCompDets, &bclSizeCompDets); |
109 |
|
|
110 |
< |
chain.SetBranchAddress("l1RpcColl",&l1RpcColl); |
113 |
< |
chain.SetBranchAddress("l1OtherColl",&l1OtherColl); |
114 |
< |
chain.SetBranchAddress("l1RpcCollEmu",&l1RpcCollEmu); |
110 |
> |
chain.SetBranchAddress("l1ObjColl",&l1ObjColl); |
111 |
|
|
112 |
|
|
113 |
|
// |
131 |
|
<<" done:" << std::setw(6)<< std::setiosflags(std::ios::fixed) << std::setprecision(2) << ev*100./nentries<<"%"<<std::endl; |
132 |
|
} |
133 |
|
|
134 |
< |
// if (ev > 10) break; |
134 |
> |
// if (ev > 100) break; |
135 |
|
|
136 |
|
// if (event->run != 178854) continue; |
137 |
|
// if (lastLumi != (*event).lumi) { lastLumi = (*event).lumi; std::cout <<"lumi: " << (*event).lumi<<std::endl; } |
142 |
– |
// theAnaDet.debug = false; |
138 |
|
// if ((*event).id==60422922)theAnaRpcMisc.debug = true; |
139 |
|
|
140 |
< |
std::cout <<" Number of bits L1: " << bitsL1->names.size()<<"/"<<bitsL1->firedAlgos.size() |
141 |
< |
<<" HLT: "<< bitsHLT->names.size()<<"/"<<bitsHLT->firedAlgos.size()<<std::endl; |
142 |
< |
|
143 |
< |
theAnaMuonDistribution.run(muon); |
144 |
< |
theAnaRpcVsOth.run(muon,l1RpcColl,l1OtherColl); |
145 |
< |
theAnaEff.run(muon,l1RpcColl,l1OtherColl); |
146 |
< |
theAnaRpcMisc.run(event,muon,l1RpcColl,l1OtherColl); |
140 |
> |
// ANALYSE AND FILTER KINEMCTICS |
141 |
> |
if ( !theAnaMuonDistribution.filter(muon) && theConfig.getParameter<bool>("filterByAnaMuonDistribution") ) continue; |
142 |
> |
// ANALYSE AND FILTER TRIGGER MENU |
143 |
> |
if ( !theAnaMenu.filter(event, muon, bitsL1, bitsHLT) && theConfig.getParameter<bool>("fillterByAnaMenu") ) 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; |
166 |
|
theAnaRpcMisc.resume(theHistos); |
167 |
|
TGraph* hGraph_RunClu = theAnaClu.resume(); |
168 |
|
theAnaTimingL1.resume(theHistos); |
169 |
+ |
theAnaMenu.resume(theHistos); |
170 |
|
|
171 |
|
theAnaSynch.endJob(); |
172 |
|
|