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 |
|
|
38 |
|
theAnaEmu.init(theHistos); |
39 |
|
theAnaSynch.init(theHistos); |
40 |
|
theAnaClu.init(theHistos); |
41 |
+ |
theAnaTimingL1.init(theHistos); |
42 |
|
|
43 |
|
} |
44 |
|
|
73 |
|
std::vector<SynchroCountsObj> *counts= 0; |
74 |
|
std::vector<uint32_t> *detsCrossedByMuon = 0; |
75 |
|
std::vector<uint32_t> *detsCrossedByMuonDeepInside = 0; |
76 |
< |
std::vector<uint32_t> *detsHitsCompatibleWithMuon = 0; |
76 |
> |
std::vector<DetCluDigiObj> *detsHitsCompatibleWithMuon = 0; |
77 |
|
std::vector<uint32_t> *detsSIMU = 0; |
75 |
– |
std::vector<uint32_t> *nDigisCompDets = 0; |
78 |
|
|
79 |
|
EventObj * event = 0; |
80 |
|
MuonObj * muon = 0; |
81 |
|
|
82 |
+ |
TriggerMenuResultObj *bitsL1 = 0; |
83 |
+ |
TriggerMenuResultObj *bitsHLT = 0; |
84 |
+ |
|
85 |
|
TBranch *bcounts=0; |
86 |
|
TBranch *bdetsCrossedByMuon =0; |
87 |
|
TBranch *bdetsCrossedByMuonDeepInside =0; |
88 |
|
TBranch *bdetsHitsCompatibleWithMuon = 0; |
89 |
|
TBranch *bdetsSIMU =0; |
85 |
– |
TBranch *bnDigisCompDets =0; |
90 |
|
|
91 |
|
L1ObjColl* l1RpcColl = 0; |
92 |
|
L1ObjColl* l1OtherColl = 0; |
93 |
|
L1ObjColl* l1RpcCollEmu = 0; |
94 |
+ |
L1ObjColl* l1GmtColl = 0; |
95 |
|
|
96 |
|
chain.SetBranchAddress("event",&event); |
97 |
|
chain.SetBranchAddress("muon",&muon); |
98 |
|
|
99 |
+ |
chain.SetBranchAddress("bitsL1",&bitsL1); |
100 |
+ |
chain.SetBranchAddress("bitsHLT",&bitsHLT); |
101 |
+ |
|
102 |
|
chain.SetBranchAddress("counts",&counts,&bcounts); |
103 |
|
chain.SetBranchAddress("detsCrossedByMuon",&detsCrossedByMuon,&bdetsCrossedByMuon); |
104 |
|
chain.SetBranchAddress("detsCrossedByMuonDeepInside",&detsCrossedByMuonDeepInside,&bdetsCrossedByMuonDeepInside); |
105 |
|
chain.SetBranchAddress("detsHitsCompatibleWithMuon",&detsHitsCompatibleWithMuon,&bdetsHitsCompatibleWithMuon); |
106 |
|
chain.SetBranchAddress("detsSIMU",&detsSIMU,&bdetsSIMU); |
99 |
– |
chain.SetBranchAddress("nDigisCompDets",&nDigisCompDets, &bnDigisCompDets); |
107 |
|
|
108 |
|
chain.SetBranchAddress("l1RpcColl",&l1RpcColl); |
109 |
|
chain.SetBranchAddress("l1OtherColl",&l1OtherColl); |
110 |
|
chain.SetBranchAddress("l1RpcCollEmu",&l1RpcCollEmu); |
111 |
+ |
chain.SetBranchAddress("l1GmtColl",&l1GmtColl); |
112 |
|
|
113 |
|
|
114 |
|
// |
115 |
< |
// number of efents |
115 |
> |
// number of events |
116 |
|
// |
117 |
|
Int_t nentries = (Int_t) chain.GetEntries(); |
118 |
|
std::cout <<" ENTRIES: " << nentries << std::endl; |
139 |
|
// theAnaDet.debug = false; |
140 |
|
// if ((*event).id==60422922)theAnaRpcMisc.debug = true; |
141 |
|
|
142 |
+ |
static std::vector<std::string> namesL1; |
143 |
+ |
if (bitsL1->names.size() != 0) namesL1=bitsL1->names; |
144 |
+ |
static std::vector<std::string> namesHLT; |
145 |
+ |
if (bitsHLT->names.size() != 0) namesHLT=bitsHLT->names; |
146 |
+ |
const std::vector<unsigned int> & algosL1 = bitsL1->firedAlgos; |
147 |
+ |
const std::vector<unsigned int> & algosHLT = bitsHLT->firedAlgos; |
148 |
+ |
|
149 |
+ |
/* |
150 |
+ |
std::cout <<" Number of bits L1: " << bitsL1->names.size()<<"/"<<namesL1.size()<<"/"<<bitsL1->firedAlgos.size() |
151 |
+ |
<<" HLT: "<< bitsHLT->names.size()<<"/"<<namesHLT.size()<<"/"<<bitsHLT->firedAlgos.size()<<std::endl; |
152 |
+ |
std::cout <<"----------------------- L1: "<<std::endl; |
153 |
+ |
for (std::vector<unsigned int>::const_iterator it=algosL1.begin(); it< algosL1.end(); ++it) std::cout <<"L1 idx: "<<*it<<" "<<namesL1[*it]<< std::endl; |
154 |
+ |
std::cout <<"----------------------- HLT: "<<std::endl; |
155 |
+ |
for (std::vector<unsigned int>::const_iterator it=algosHLT.begin(); it< algosHLT.end(); ++it) std::cout<<" HLT idx: "<<*it<<" "<<namesHLT[*it]<< std::endl; |
156 |
+ |
*/ |
157 |
+ |
|
158 |
|
theAnaMuonDistribution.run(muon); |
159 |
|
theAnaRpcVsOth.run(muon,l1RpcColl,l1OtherColl); |
160 |
|
theAnaEff.run(muon,l1RpcColl,l1OtherColl); |
162 |
|
theAnaDet.run( muon, *detsHitsCompatibleWithMuon, *detsCrossedByMuon, *detsCrossedByMuonDeepInside); |
163 |
|
theAnaEmu.run ( event, muon, l1RpcCollEmu, l1RpcColl); |
164 |
|
theAnaSynch.run( event, muon, ConverterRPCRawSynchroSynchroCountsObj::toRawSynchro( *counts)); |
165 |
< |
theAnaClu.run( muon, l1RpcColl, *detsHitsCompatibleWithMuon, *nDigisCompDets); |
165 |
> |
theAnaClu.run( event, muon, l1RpcColl, *detsHitsCompatibleWithMuon); |
166 |
> |
theAnaTimingL1.run(event,muon,l1RpcColl,l1OtherColl); |
167 |
|
|
168 |
+ |
/* |
169 |
+ |
std::cout <<"----------------"<<std::endl; |
170 |
+ |
std::cout <<"GmtColl:"<<std::endl; l1GmtColl->print(); |
171 |
+ |
std::cout <<"RpcColl:"<<std::endl; l1RpcColl->print(); |
172 |
+ |
std::cout <<"OtherColl:"<<std::endl; l1OtherColl->print(); |
173 |
+ |
*/ |
174 |
|
// theAnaEmu.debug =theAnaDet.debug; |
175 |
|
// std::cout <<"----------"<<std::endl; |
176 |
|
// theAnaDet.debug =theAnaEmu.debug; |
182 |
|
void L1RpcTreeAnalysis::endJob() |
183 |
|
{ |
184 |
|
std::cout <<"ENDJOB, summaries:"<<std::endl; |
185 |
< |
TGraph* hGraph_DetEff =theAnaDet.resume(); |
186 |
< |
TGraph* hGraph_RunEff =theAnaRpcMisc.resume(); |
185 |
> |
TGraph* hGraph_DetEff = theAnaDet.resume(); |
186 |
> |
theAnaRpcMisc.resume(theHistos); |
187 |
> |
TGraph* hGraph_RunClu = theAnaClu.resume(); |
188 |
> |
theAnaTimingL1.resume(theHistos); |
189 |
|
|
190 |
|
theAnaSynch.endJob(); |
191 |
|
|
193 |
|
TFile f(histoFile.c_str(),"RECREATE"); |
194 |
|
theHistos.Write(); |
195 |
|
hGraph_DetEff->Write("hGraph_DetEff"); |
196 |
< |
hGraph_RunEff->Write("hGraph_RunEff"); |
196 |
> |
hGraph_RunClu->Write("hGraph_RunClu"); |
197 |
|
f.Close(); |
198 |
|
std::cout <<"END"<<std::endl; |
199 |
|
} |