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); |
122 |
|
bitsL1 = new TriggerMenuResultObj(); |
123 |
|
bitsHLT = new TriggerMenuResultObj(); |
124 |
|
|
126 |
– |
// counts = new SynchroCountsObjVect; |
125 |
|
counts = std::vector<SynchroCountsObj>(); |
126 |
|
detsCrossedByMuon = std::vector<uint32_t>(); |
127 |
|
detsCrossedByMuonDeepInside = std::vector<uint32_t>(); |
128 |
< |
detsHitsCompatibleWithMuon = std::vector<uint32_t>(); |
128 |
> |
detsHitsCompatibleWithMuon = std::vector<DetCluDigiObj>(); |
129 |
|
detsSIMU = std::vector<uint32_t>(); |
130 |
< |
nDigisCompDets = std::vector<uint32_t>(); |
133 |
< |
clSizeCompDets = std::vector<uint32_t>(); |
130 |
> |
|
131 |
|
l1RpcColl = new L1ObjColl; |
132 |
|
l1OtherColl = new L1ObjColl; |
133 |
|
l1RpcCollEmu = new L1ObjColl; |
134 |
+ |
l1GmtColl = new L1ObjColl; |
135 |
|
|
136 |
|
// |
137 |
|
// fill muon info |
164 |
|
// hits and detectors compatible with muon track |
165 |
|
// |
166 |
|
if ( muon->pt() > 10.) { |
167 |
< |
detsHitsCompatibleWithMuon = theDetHitCollector.compatibleHits( theMuon, ev, es); |
167 |
> |
/* |
168 |
> |
std::vector<DetHitCompatibleCollector::DetCluDigi> dhcm = theDetHitCollector.compatibleHits( theMuon, ev, es); |
169 |
> |
detsHitsCompatibleWithMuon.clear(); |
170 |
> |
for (std::vector<DetHitCompatibleCollector::DetCluDigi>::const_iterator it= dhcm.begin(); it < dhcm.end(); ++it) { |
171 |
> |
DetCluDigiObj obj; |
172 |
> |
obj.det = (*it).first; |
173 |
> |
obj.clusterSize = (*it).second.first; |
174 |
> |
obj.nDigis = (*it).second.second; |
175 |
> |
detsHitsCompatibleWithMuon.push_back(obj); |
176 |
> |
} |
177 |
> |
*/ |
178 |
> |
detsHitsCompatibleWithMuon = theDetHitCollector.compatibleHits( theMuon, ev, es); |
179 |
|
detsCrossedByMuon = theDetHitCollector.compatibleDets( theMuon, ev, es, false); |
180 |
|
detsCrossedByMuonDeepInside = theDetHitCollector.compatibleDets( theMuon, ev, es, true); |
181 |
|
if (theConfig.getParameter<bool>("checkDestSIMU")) detsSIMU = theDetHitCollector.compatibleSIMU( theMuon, ev, es); |
182 |
< |
nDigisCompDets = theDetHitCollector.nDigisCompDets(detsHitsCompatibleWithMuon, ev, es); |
183 |
< |
clSizeCompDets = theDetHitCollector.clSizeCompDets(detsHitsCompatibleWithMuon, ev, es); |
184 |
< |
|
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 |
< |
} |
182 |
> |
// for (uint32_t i=0; i< nDigisCompDets.size(); i++) { |
183 |
> |
// if (clSizeCompDets[i] > nDigisCompDets[i]) std::cout <<" PROBLEM, event: "<<theCounter<<" cl:"<<clSizeCompDets[i]<<" nDigis:"<<nDigisCompDets[i]<<std::endl; |
184 |
> |
// } |
185 |
|
} |
186 |
|
|
187 |
|
|
211 |
|
// |
212 |
|
L1ObjMaker l1( theConfig.getParameter<edm::InputTag>("l1MuReadout"), ev); |
213 |
|
TrackToL1ObjMatcher matcher(theConfig.getParameter<edm::ParameterSet>("matcherPSet")); |
214 |
< |
std::vector<L1Obj> l1Rpcs = l1(L1ObjMaker::RPCB,L1ObjMaker::RPCF); |
215 |
< |
std::vector<L1Obj> l1Others = l1(L1ObjMaker::DT,L1ObjMaker::CSC); |
214 |
> |
std::vector<L1Obj> l1Rpcs = l1(L1Obj::RPCB,L1Obj::RPCF); |
215 |
> |
std::vector<L1Obj> l1Others = l1(L1Obj::DT,L1Obj::CSC); |
216 |
> |
std::vector<L1Obj> l1Gmts = l1(L1Obj::GMT); |
217 |
|
std::vector<bool> l1RpcsMatching(l1Rpcs.size(), false); |
218 |
|
std::vector<bool> l1OthersMatching(l1Others.size(), false); |
219 |
+ |
std::vector<bool> l1GmtsMatching(l1Gmts.size(), false); |
220 |
|
for(unsigned int i=0; i< l1Rpcs.size(); ++i) if (matcher(l1Rpcs[i].eta, l1Rpcs[i].phi, theMuon, ev,es)) l1RpcsMatching[i]=true; |
221 |
|
for(unsigned int i=0; i< l1Others.size(); ++i) if (matcher(l1Others[i].eta, l1Others[i].phi, theMuon, ev,es)) l1OthersMatching[i]=true; |
222 |
+ |
for(unsigned int i=0; i< l1Gmts.size(); ++i) if (matcher(l1Gmts[i].eta, l1Gmts[i].phi, theMuon, ev,es)) l1GmtsMatching[i]=true; |
223 |
|
l1RpcColl->set(l1Rpcs); |
224 |
|
l1RpcColl->set(l1RpcsMatching); |
225 |
|
l1OtherColl->set(l1Others); |
226 |
|
l1OtherColl->set(l1OthersMatching); |
227 |
+ |
l1GmtColl->set(l1Gmts); |
228 |
+ |
l1GmtColl->set(l1GmtsMatching); |
229 |
+ |
|
230 |
|
|
231 |
|
// std::cout <<"RPCColl:"<<std::endl; l1RpcColl->print(); |
232 |
|
// std::cout <<"RPCCollEmu:"<<std::endl; l1RpcCollEmu->print(); |
244 |
|
delete l1RpcColl; l1RpcColl = 0; |
245 |
|
delete l1OtherColl; l1OtherColl = 0; |
246 |
|
delete l1RpcCollEmu; l1RpcCollEmu = 0; |
247 |
+ |
delete l1GmtColl; l1GmtColl = 0; |
248 |
|
} |
249 |
|
|