49 PSimHitContainer::const_iterator simIt;
52 std::map<RPCDetId, std::vector<double> > allsims;
54 for (simIt = simHit->begin(); simIt != simHit->end(); simIt++)
58 int ptype = simIt->particleType();
60 if (ptype == 13 || ptype == -13)
63 std::vector<double> buff;
64 if (allsims.find(Rsid) != allsims.end())
69 buff.push_back(simIt->localPosition().x());
87 else if (Rsid.
region() == (-1))
98 for (detUnitIt = rpcDigis->begin(); detUnitIt != rpcDigis->end(); ++detUnitIt)
100 const RPCDetId Rsid = (*detUnitIt).first;
104 std::vector<double> sims;
105 if (allsims.find(Rsid) != allsims.end())
107 sims = allsims[Rsid];
116 if (Rsid.
region() == (+1))
121 else if (Rsid.
region() == (-1))
128 const double digiTime = digiIt->hasTime() ? digiIt->time() : digiIt->bx()*25;
130 if ( digiIt->hasTime() ) {
137 if (sims.size() == 1 && ndigi == 1)
139 double dis = roll->
centreOfStrip(range.first->strip()).
x() - sims[0];
144 if (Rsid.
ring() == -2)
146 else if (Rsid.
ring() == -1)
148 else if (Rsid.
ring() == 0)
150 else if (Rsid.
ring() == 1)
152 else if (Rsid.
ring() == 2)
171 if (Rsid.
ring() == 2)
175 if (Rsid.
roll() == 1)
177 if (Rsid.
roll() == 2)
179 if (Rsid.
roll() == 3)
184 if (Rsid.
roll() == 1)
186 if (Rsid.
roll() == 2)
188 if (Rsid.
roll() == 3)
192 if (Rsid.
ring() == 3)
194 if (Rsid.
roll() == 1)
196 if (Rsid.
roll() == 2)
198 if (Rsid.
roll() == 3)
203 if (Rsid.
region() == (+1))
215 if (Rsid.
region() == (-1))
MonitorElement * hDigiTime
LocalPoint centreOfStrip(int strip) const
MonitorElement * ResLayer6_barrel
MonitorElement * Res_Endcap1_Ring2_A
MonitorElement * Res_Endcap123_Ring3_A
MonitorElement * ResLayer3_barrel
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
MonitorElement * ResWplu2
MonitorElement * BxDisc_4Min
MonitorElement * StripProf
MonitorElement * ResWzer0
MonitorElement * ResDmin3
MonitorElement * ResLayer5_barrel
MonitorElement * ResWmin1
MonitorElement * ResLayer2_barrel
MonitorElement * hDigiTimeIRPC
MonitorElement * ResDplu4
MonitorElement * ResDplu3
MonitorElement * ResDmin1
MonitorElement * ResWplu1
MonitorElement * Res_Endcap123_Ring3_C
MonitorElement * BxDisc_4Plus
MonitorElement * hDigiTimeNoIRPC
Abs< T >::type abs(const T &t)
MonitorElement * Res_Endcap123_Ring3_B
MonitorElement * ResWmin2
MonitorElement * xyvDmin4
MonitorElement * ResDplu2
MonitorElement * Res_Endcap23_Ring2_C
MonitorElement * ResLayer1_barrel
MonitorElement * Res_Endcap1_Ring2_B
MonitorElement * ResDmin2
std::vector< RPCDigi >::const_iterator const_iterator
edm::EDGetTokenT< RPCDigiCollection > rpcDigiToken
MonitorElement * hDigiTimeAll
MonitorElement * Res_Endcap23_Ring2_A
MonitorElement * ResDmin4
MonitorElement * ResLayer4_barrel
std::pair< const_iterator, const_iterator > Range
MonitorElement * ResDplu1
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken
MonitorElement * Res_Endcap23_Ring2_B
MonitorElement * xyvDplu4
MonitorElement * Res_Endcap1_Ring2_C
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.