44 |
|
|
45 |
|
|
46 |
|
DetHitCompatibleCollector::DetHitCompatibleCollector(const edm::ParameterSet& cfg) |
47 |
+ |
: theNoDigiWarning(false) |
48 |
+ |
{ } |
49 |
+ |
|
50 |
+ |
DetHitCompatibleCollector::~ DetHitCompatibleCollector() |
51 |
|
{ |
52 |
+ |
if (theNoDigiWarning) std::cout <<" **** DetHitCompatibleCollector **** WARNING - NoDigiWarning was set!" << std::endl; |
53 |
|
} |
54 |
|
|
55 |
|
std::vector<uint32_t> DetHitCompatibleCollector::compatibleSIMU( const reco::Muon* muon, const edm::Event &ev, const edm::EventSetup &es) |
125 |
|
unsigned int clusterSize = ih->clusterSize(); |
126 |
|
if ( aMap[rpcDet.rawId()].first < clusterSize) aMap[rpcDet.rawId()].first = clusterSize; |
127 |
|
|
128 |
< |
const RPCDigiCollection::Range range = rpcDigis->get( rpcDet.rawId() ); |
129 |
< |
std::map<int, bool> strips; |
130 |
< |
for (RPCDigiCollection::const_iterator id = range.first; id != range.second; ++id) if (id->bx() == 0) strips[id->strip()] = true; |
131 |
< |
if ( strips.size() == 0 ) std::cout <<"WARNING ***************"<<std::endl; |
132 |
< |
aMap[rpcDet.rawId()].second = strips.size(); |
128 |
> |
if (rpcDigis.isValid()) { |
129 |
> |
const RPCDigiCollection::Range range = rpcDigis->get( rpcDet.rawId() ); |
130 |
> |
std::map<int, bool> strips; |
131 |
> |
for (RPCDigiCollection::const_iterator id = range.first; id != range.second; ++id) if (id->bx() == 0) strips[id->strip()] = true; |
132 |
> |
if ( strips.size() == 0 ) std::cout <<"WARNING ***************"<<std::endl; |
133 |
> |
aMap[rpcDet.rawId()].second = strips.size(); |
134 |
> |
} else theNoDigiWarning = true; |
135 |
|
} |
136 |
|
|
137 |
|
RPCDetIdUtil place(rpcDet); |