75 |
|
typedef RPCRecHitCollection::const_iterator IH; |
76 |
|
for (IH ih=recHits->begin(); ih != recHits->end(); ++ih) { |
77 |
|
|
78 |
+ |
if (ih->BunchX() != 0) continue; |
79 |
+ |
if (! ih->isValid() ) continue; |
80 |
|
RPCDetId rpcDet = ih->rpcId(); |
81 |
|
GlobalPoint detPosition = rpcGeometry->idToDet(rpcDet)->position(); |
82 |
|
GlobalPoint hitPosition = rpcGeometry->idToDet(rpcDet)->toGlobal(ih->localPosition()); |
131 |
|
return detsHitsCompatibleWithMuon; |
132 |
|
} |
133 |
|
|
134 |
+ |
std::vector<uint32_t> DetHitCompatibleCollector::clSizeCompDets(const std::vector<uint32_t> & detIds, const edm::Event &ev, const edm::EventSetup &es) |
135 |
+ |
{ |
136 |
+ |
std::vector<uint32_t> cluInDets; |
137 |
+ |
edm::Handle<RPCRecHitCollection> recHits; |
138 |
+ |
ev.getByLabel("rpcRecHits", recHits); |
139 |
+ |
for (std::vector<uint32_t>::const_iterator it = detIds.begin(); it != detIds.end(); ++it) { |
140 |
+ |
RPCRecHitCollection::range range = recHits->get(*it); |
141 |
+ |
if (range.second-range.first) cluInDets.push_back(range.first->clusterSize()); |
142 |
+ |
for (RPCRecHitCollection::const_iterator ih= range.first; ih != range.second; ++ih) { |
143 |
+ |
} |
144 |
+ |
} |
145 |
+ |
return cluInDets; |
146 |
+ |
} |
147 |
+ |
|
148 |
|
std::vector<uint32_t> DetHitCompatibleCollector::nDigisCompDets(const std::vector<uint32_t> & detIds, const edm::Event &ev, const edm::EventSetup &es) |
149 |
|
{ |
150 |
|
std::vector<uint32_t> digisInDets; |
151 |
|
edm::Handle<RPCDigiCollection> rpcDigis; |
152 |
|
ev.getByLabel("muonRPCDigis", rpcDigis); |
137 |
– |
|
153 |
|
for (std::vector<uint32_t>::const_iterator it = detIds.begin(); it != detIds.end(); ++it) { |
154 |
|
const RPCDigiCollection::Range range = rpcDigis->get(*it); |
140 |
– |
//unsigned int ndigis = (range.second-range.first); |
155 |
|
std::map<int, bool> strips; |
156 |
+ |
// for (RPCDigiCollection::const_iterator id = range.first; id != range.second; ++id) id->print() ; |
157 |
|
for (RPCDigiCollection::const_iterator id = range.first; id != range.second; ++id) if (id->bx() == 0) strips[id->strip()] = true; |
158 |
+ |
if ( strips.size() == 0 ) std::cout <<"WARNING ***************"<<std::endl; |
159 |
|
digisInDets.push_back( strips.size()); |
160 |
|
} |
161 |
|
return digisInDets; |
146 |
– |
|
162 |
|
} |
163 |
+ |
|
164 |
|
std::vector<uint32_t> DetHitCompatibleCollector::compatibleDets( const reco::Muon* muon, const edm::Event &ev, const edm::EventSetup &es, bool deepInside) |
165 |
|
{ |
166 |
|
std::vector<uint32_t> detsCrossedByMuon; |