32 |
|
: theConfig(cfg), theTree(0), event(0), muon(0), track(0), |
33 |
|
bitsL1(0), bitsHLT(0), |
34 |
|
counts(0), |
35 |
< |
l1RpcColl(0) , l1OtherColl(0), l1RpcCollEmu(0), |
35 |
> |
l1RpcColl(0) , l1OtherColl(0), l1RpcCollEmu(0), l1GmtColl(0), |
36 |
|
theCounter(0), |
37 |
|
theBestMuonFinder(cfg.getParameter<edm::ParameterSet>("bestMuonFinder")), |
38 |
|
theDetHitCollector(cfg.getParameter<edm::ParameterSet>("detHitCollector")), |
63 |
|
theTree->Branch("detsCrossedByMuonDeepInside",&detsCrossedByMuonDeepInside); |
64 |
|
theTree->Branch("detsHitsCompatibleWithMuon",&detsHitsCompatibleWithMuon); |
65 |
|
theTree->Branch("detsSIMU",&detsSIMU); |
66 |
– |
theTree->Branch("nDigisCompDets",&nDigisCompDets); |
67 |
– |
theTree->Branch("clSizeCompDets",&clSizeCompDets); |
66 |
|
|
67 |
|
theTree->Branch("l1RpcColl","L1ObjColl",&l1RpcColl,32000,99); |
68 |
|
theTree->Branch("l1RpcCollEmu","L1ObjColl",&l1RpcCollEmu,32000,99); |
69 |
|
theTree->Branch("l1OtherColl","L1ObjColl",&l1OtherColl,32000,99); |
70 |
+ |
theTree->Branch("l1GmtColl","L1ObjColl",&l1GmtColl,32000,99); |
71 |
|
|
72 |
|
theHelper.SetOwner(); |
73 |
|
theBestMuonFinder.initHistos(theHelper); |
93 |
|
|
94 |
|
void L1RpcTreeMaker::analyze(const edm::Event &ev, const edm::EventSetup &es) |
95 |
|
{ |
97 |
– |
|
98 |
– |
|
96 |
|
// |
97 |
|
// check reference muon |
98 |
|
// |
120 |
|
bitsL1 = new TriggerMenuResultObj(); |
121 |
|
bitsHLT = new TriggerMenuResultObj(); |
122 |
|
|
126 |
– |
// counts = new SynchroCountsObjVect; |
123 |
|
counts = std::vector<SynchroCountsObj>(); |
124 |
|
detsCrossedByMuon = std::vector<uint32_t>(); |
125 |
|
detsCrossedByMuonDeepInside = std::vector<uint32_t>(); |
126 |
< |
detsHitsCompatibleWithMuon = std::vector<uint32_t>(); |
126 |
> |
detsHitsCompatibleWithMuon = std::vector<DetCluDigiObj>(); |
127 |
|
detsSIMU = std::vector<uint32_t>(); |
128 |
< |
nDigisCompDets = std::vector<uint32_t>(); |
133 |
< |
clSizeCompDets = std::vector<uint32_t>(); |
128 |
> |
|
129 |
|
l1RpcColl = new L1ObjColl; |
130 |
|
l1OtherColl = new L1ObjColl; |
131 |
|
l1RpcCollEmu = new L1ObjColl; |
132 |
+ |
l1GmtColl = new L1ObjColl; |
133 |
|
|
134 |
|
// |
135 |
|
// fill muon info |
162 |
|
// hits and detectors compatible with muon track |
163 |
|
// |
164 |
|
if ( muon->pt() > 10.) { |
165 |
< |
detsHitsCompatibleWithMuon = theDetHitCollector.compatibleHits( theMuon, ev, es); |
165 |
> |
detsHitsCompatibleWithMuon = theDetHitCollector.compatibleHits( theMuon, ev, es); |
166 |
|
detsCrossedByMuon = theDetHitCollector.compatibleDets( theMuon, ev, es, false); |
167 |
|
detsCrossedByMuonDeepInside = theDetHitCollector.compatibleDets( theMuon, ev, es, true); |
168 |
|
if (theConfig.getParameter<bool>("checkDestSIMU")) detsSIMU = theDetHitCollector.compatibleSIMU( theMuon, ev, es); |
173 |
– |
nDigisCompDets = theDetHitCollector.nDigisCompDets(detsHitsCompatibleWithMuon, ev, es); |
174 |
– |
clSizeCompDets = theDetHitCollector.clSizeCompDets(detsHitsCompatibleWithMuon, ev, es); |
175 |
– |
|
176 |
– |
for (uint32_t i=0; i< nDigisCompDets.size(); i++) { |
177 |
– |
if (clSizeCompDets[i] > nDigisCompDets[i]) std::cout <<" PROBLEM, event: "<<theCounter<<" cl:"<<clSizeCompDets[i]<<" nDigis:"<<nDigisCompDets[i]<<std::endl; |
178 |
– |
} |
169 |
|
} |
170 |
|
|
171 |
|
|
180 |
|
// |
181 |
|
// fill L1 RPCemu |
182 |
|
// |
183 |
< |
if (theConfig.exists("l1RpcEmu") ) { |
183 |
> |
if (theConfig.exists("l1RpcEmu")) { |
184 |
|
TrackToL1ObjMatcher matcher(theConfig.getParameter<edm::ParameterSet>("matcherPSet")); |
185 |
|
L1ObjMakerRpcEmu l1RpcsFromEmu( theConfig.getParameter<edm::InputTag>("l1RpcEmu"), ev); |
186 |
|
std::vector<L1Obj> l1RpcsEmu = l1RpcsFromEmu(); |
195 |
|
// |
196 |
|
L1ObjMaker l1( theConfig.getParameter<edm::InputTag>("l1MuReadout"), ev); |
197 |
|
TrackToL1ObjMatcher matcher(theConfig.getParameter<edm::ParameterSet>("matcherPSet")); |
198 |
< |
std::vector<L1Obj> l1Rpcs = l1(L1ObjMaker::RPCB,L1ObjMaker::RPCF); |
199 |
< |
std::vector<L1Obj> l1Others = l1(L1ObjMaker::DT,L1ObjMaker::CSC); |
198 |
> |
std::vector<L1Obj> l1Rpcs = l1(L1Obj::RPCB,L1Obj::RPCF); |
199 |
> |
std::vector<L1Obj> l1Others = l1(L1Obj::DT,L1Obj::CSC); |
200 |
> |
std::vector<L1Obj> l1Gmts = l1(L1Obj::GMT); |
201 |
|
std::vector<bool> l1RpcsMatching(l1Rpcs.size(), false); |
202 |
|
std::vector<bool> l1OthersMatching(l1Others.size(), false); |
203 |
+ |
std::vector<bool> l1GmtsMatching(l1Gmts.size(), false); |
204 |
|
for(unsigned int i=0; i< l1Rpcs.size(); ++i) if (matcher(l1Rpcs[i].eta, l1Rpcs[i].phi, theMuon, ev,es)) l1RpcsMatching[i]=true; |
205 |
|
for(unsigned int i=0; i< l1Others.size(); ++i) if (matcher(l1Others[i].eta, l1Others[i].phi, theMuon, ev,es)) l1OthersMatching[i]=true; |
206 |
+ |
for(unsigned int i=0; i< l1Gmts.size(); ++i) if (matcher(l1Gmts[i].eta, l1Gmts[i].phi, theMuon, ev,es)) l1GmtsMatching[i]=true; |
207 |
|
l1RpcColl->set(l1Rpcs); |
208 |
|
l1RpcColl->set(l1RpcsMatching); |
209 |
|
l1OtherColl->set(l1Others); |
210 |
|
l1OtherColl->set(l1OthersMatching); |
211 |
+ |
l1GmtColl->set(l1Gmts); |
212 |
+ |
l1GmtColl->set(l1GmtsMatching); |
213 |
+ |
|
214 |
|
|
215 |
|
// std::cout <<"RPCColl:"<<std::endl; l1RpcColl->print(); |
216 |
|
// std::cout <<"RPCCollEmu:"<<std::endl; l1RpcCollEmu->print(); |
228 |
|
delete l1RpcColl; l1RpcColl = 0; |
229 |
|
delete l1OtherColl; l1OtherColl = 0; |
230 |
|
delete l1RpcCollEmu; l1RpcCollEmu = 0; |
231 |
+ |
delete l1GmtColl; l1GmtColl = 0; |
232 |
|
} |
233 |
|
|