44 PSimHitContainer::const_iterator simIt;
47 std::map<RPCDetId, std::vector<double>> allsims;
49 for (simIt = simHit->begin(); simIt != simHit->end(); simIt++) {
51 const RPCRoll *soll =
dynamic_cast<const RPCRoll *
>(rpcGeom->roll(Rsid));
52 int ptype = simIt->particleType();
54 if (ptype == 13 || ptype == -13) {
55 std::vector<double> buff;
56 if (allsims.find(Rsid) != allsims.end()) {
60 buff.push_back(simIt->localPosition().x());
71 if (Rsid.
region() == (+1)) {
75 }
else if (Rsid.
region() == (-1)) {
84 for (detUnitIt = rpcDigis->begin(); detUnitIt != rpcDigis->end(); ++detUnitIt) {
85 const RPCDetId Rsid = (*detUnitIt).first;
86 const RPCRoll *roll =
dynamic_cast<const RPCRoll *
>(rpcGeom->roll(Rsid));
89 std::vector<double> sims;
90 if (allsims.find(Rsid) != allsims.end()) {
99 if (Rsid.
region() == (+1)) {
102 }
else if (Rsid.
region() == (-1)) {
108 const double digiTime = digiIt->hasTime() ? digiIt->time() : digiIt->bx() * 25;
110 if (digiIt->hasTime()) {
119 if (sims.size() == 1 && ndigi == 1) {
120 double dis = roll->
centreOfStrip(range.first->strip()).
x() - sims[0];
124 if (Rsid.
ring() == -2)
126 else if (Rsid.
ring() == -1)
128 else if (Rsid.
ring() == 0)
130 else if (Rsid.
ring() == 1)
132 else if (Rsid.
ring() == 2)
150 if (Rsid.
ring() == 2) {
152 if (Rsid.
roll() == 1)
154 if (Rsid.
roll() == 2)
156 if (Rsid.
roll() == 3)
160 if (Rsid.
roll() == 1)
162 if (Rsid.
roll() == 2)
164 if (Rsid.
roll() == 3)
168 if (Rsid.
ring() == 3) {
169 if (Rsid.
roll() == 1)
171 if (Rsid.
roll() == 2)
173 if (Rsid.
roll() == 3)
178 if (Rsid.
region() == (+1)) {
188 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
const uint16_t range(const Frame &aFrame)
MonitorElement * ResDmin3
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
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
std::pair< const_iterator, const_iterator > Range
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
MonitorElement * ResDplu1
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken
MonitorElement * Res_Endcap23_Ring2_B
MonitorElement * xyvDplu4
MonitorElement * Res_Endcap1_Ring2_C
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.