45 event.getByToken(simHitToken, simHit);
46 event.getByToken(rpcDigiToken, rpcDigis);
49 PSimHitContainer::const_iterator simIt;
52 std::map<RPCDetId, std::vector<double> > allsims;
54 for (simIt = simHit->begin(); simIt != simHit->end(); simIt++)
57 const RPCRoll* soll =
dynamic_cast<const RPCRoll*
> (rpcGeom->roll(Rsid));
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());
78 xyview->Fill(sim_x, sim_y);
84 xyvDplu4->Fill(sim_x, sim_y);
87 else if (Rsid.
region() == (-1))
91 xyvDmin4->Fill(sim_x, sim_y);
94 rzview->Fill(p.
z(), p.
perp());
98 for (detUnitIt = rpcDigis->begin(); detUnitIt != rpcDigis->end(); ++detUnitIt)
100 const RPCDetId Rsid = (*detUnitIt).first;
101 const RPCRoll* roll =
dynamic_cast<const RPCRoll*
> (rpcGeom->roll(Rsid));
104 std::vector<double> sims;
105 if (allsims.find(Rsid) != allsims.end())
107 sims = allsims[Rsid];
113 StripProf->Fill(digiIt->strip());
114 BxDist->Fill(digiIt->bx());
116 if (Rsid.
region() == (+1))
119 BxDisc_4Plus->Fill(digiIt->bx());
121 else if (Rsid.
region() == (-1))
124 BxDisc_4Min->Fill(digiIt->bx());
129 if (sims.size() == 0)
131 noiseCLS->Fill(ndigi);
134 noiseCLSBarrel->Fill(ndigi);
138 noiseCLSEndcaps->Fill(ndigi);
144 clsBarrel->Fill(ndigi);
149 if (Rsid.
ring() == 2)
153 if (Rsid.
roll() == 1)
154 CLS_Endcap_1_Ring2_A->Fill(ndigi);
155 if (Rsid.
roll() == 2)
156 CLS_Endcap_1_Ring2_B->Fill(ndigi);
157 if (Rsid.
roll() == 3)
158 CLS_Endcap_1_Ring2_C->Fill(ndigi);
162 if (Rsid.
roll() == 1)
163 CLS_Endcap_23_Ring2_A->Fill(ndigi);
164 if (Rsid.
roll() == 2)
165 CLS_Endcap_23_Ring2_B->Fill(ndigi);
166 if (Rsid.
roll() == 3)
167 CLS_Endcap_23_Ring2_C->Fill(ndigi);
170 if (Rsid.
ring() == 3)
172 if (Rsid.
roll() == 1)
173 CLS_Endcap_123_Ring3_A->Fill(ndigi);
174 if (Rsid.
roll() == 2)
175 CLS_Endcap_123_Ring3_B->Fill(ndigi);
176 if (Rsid.
roll() == 3)
177 CLS_Endcap_123_Ring3_C->Fill(ndigi);
180 CLS_Endcap_4->Fill(ndigi);
183 if (sims.size() == 1 && ndigi == 1)
185 double dis = roll->
centreOfStrip(range.first->strip()).
x() - sims[0];
190 if (Rsid.
ring() == -2)
192 else if (Rsid.
ring() == -1)
194 else if (Rsid.
ring() == 0)
196 else if (Rsid.
ring() == 1)
198 else if (Rsid.
ring() == 2)
202 ResLayer1_barrel->Fill(dis);
204 ResLayer2_barrel->Fill(dis);
206 ResLayer3_barrel->Fill(dis);
208 ResLayer4_barrel->Fill(dis);
210 ResLayer5_barrel->Fill(dis);
212 ResLayer6_barrel->Fill(dis);
217 if (Rsid.
ring() == 2)
221 if (Rsid.
roll() == 1)
222 Res_Endcap1_Ring2_A->Fill(dis);
223 if (Rsid.
roll() == 2)
224 Res_Endcap1_Ring2_B->Fill(dis);
225 if (Rsid.
roll() == 3)
226 Res_Endcap1_Ring2_C->Fill(dis);
230 if (Rsid.
roll() == 1)
231 Res_Endcap23_Ring2_A->Fill(dis);
232 if (Rsid.
roll() == 2)
233 Res_Endcap23_Ring2_B->Fill(dis);
234 if (Rsid.
roll() == 3)
235 Res_Endcap23_Ring2_C->Fill(dis);
238 if (Rsid.
ring() == 3)
240 if (Rsid.
roll() == 1)
241 Res_Endcap123_Ring3_A->Fill(dis);
242 if (Rsid.
roll() == 2)
243 Res_Endcap123_Ring3_B->Fill(dis);
244 if (Rsid.
roll() == 3)
245 Res_Endcap123_Ring3_C->Fill(dis);
249 if (Rsid.
region() == (+1))
261 if (Rsid.
region() == (-1))
281 xyview = booker.
book2D(
"X_Vs_Y_View",
"X_Vs_Y_View", 155, -775., 775., 155, -775., 775.);
283 xyvDplu4 = booker.
book2D(
"Dplu4_XvsY",
"Dplu4_XvsY", 155, -775., 775., 155, -775., 775.);
284 xyvDmin4 = booker.
book2D(
"Dmin4_XvsY",
"Dmin4_XvsY", 155, -775., 775., 155, -775., 775.);
286 rzview = booker.
book2D(
"R_Vs_Z_View",
"R_Vs_Z_View", 216, -1080., 1080., 52, 260., 780.);
287 Res = booker.
book1D(
"Digi_SimHit_difference",
"Digi_SimHit_difference", 300, -8, 8);
288 ResWmin2 = booker.
book1D(
"W_Min2_Residuals",
"W_Min2_Residuals", 400, -8, 8);
289 ResWmin1 = booker.
book1D(
"W_Min1_Residuals",
"W_Min1_Residuals", 400, -8, 8);
290 ResWzer0 = booker.
book1D(
"W_Zer0_Residuals",
"W_Zer0_Residuals", 400, -8, 8);
291 ResWplu1 = booker.
book1D(
"W_Plu1_Residuals",
"W_Plu1_Residuals", 400, -8, 8);
292 ResWplu2 = booker.
book1D(
"W_Plu2_Residuals",
"W_Plu2_Residuals", 400, -8, 8);
294 ResLayer1_barrel = booker.
book1D(
"ResLayer1_barrel",
"ResLayer1_barrel", 400, -8, 8);
295 ResLayer2_barrel = booker.
book1D(
"ResLayer2_barrel",
"ResLayer2_barrel", 400, -8, 8);
296 ResLayer3_barrel = booker.
book1D(
"ResLayer3_barrel",
"ResLayer3_barrel", 400, -8, 8);
297 ResLayer4_barrel = booker.
book1D(
"ResLayer4_barrel",
"ResLayer4_barrel", 400, -8, 8);
298 ResLayer5_barrel = booker.
book1D(
"ResLayer5_barrel",
"ResLayer5_barrel", 400, -8, 8);
299 ResLayer6_barrel = booker.
book1D(
"ResLayer6_barrel",
"ResLayer6_barrel", 400, -8, 8);
301 BxDist = booker.
book1D(
"Bunch_Crossing",
"Bunch_Crossing", 20, -10., 10.);
302 StripProf = booker.
book1D(
"Strip_Profile",
"Strip_Profile", 100, 0, 100);
304 BxDisc_4Plus = booker.
book1D(
"BxDisc_4Plus",
"BxDisc_4Plus", 20, -10., 10.);
305 BxDisc_4Min = booker.
book1D(
"BxDisc_4Min",
"BxDisc_4Min", 20, -10., 10.);
308 noiseCLS = booker.
book1D(
"noiseCLS",
"noiseCLS", 10, 0.5, 10.5);
309 noiseCLSBarrel = booker.
book1D(
"noiseCLSBarrel",
"noiseCLSBarrel", 10, 0.5, 10.5);
310 noiseCLSEndcaps = booker.
book1D(
"noiseCLSEndcaps",
"noiseCLSEndcaps", 10, 0.5, 10.5);
312 clsBarrel = booker.
book1D(
"clsBarrel",
"clsBarrel", 10, 0.5, 10.5);
315 CLS_Endcap_1_Ring2_A = booker.
book1D(
"CLS_Endcap_1_1Ring2_A",
"CLS_Endcap_1_Ring2_A", 10, 0.5, 10.5);
316 CLS_Endcap_1_Ring2_B = booker.
book1D(
"CLS_Endcap_1_1Ring2_B",
"CLS_Endcap_1_Ring2_B", 10, 0.5, 10.5);
317 CLS_Endcap_1_Ring2_C = booker.
book1D(
"CLS_Endcap_1_1Ring2_C",
"CLS_Endcap_1_Ring2_C", 10, 0.5, 10.5);
319 CLS_Endcap_23_Ring2_A = booker.
book1D(
"CLS_Endcap_23_Ring2_A",
"CLS_Endcap_23_Ring2_A", 10, 0.5, 10.5);
320 CLS_Endcap_23_Ring2_B = booker.
book1D(
"CLS_Endcap_23_Ring2_B",
"CLS_Endcap_23_Ring2_B", 10, 0.5, 10.5);
321 CLS_Endcap_23_Ring2_C = booker.
book1D(
"CLS_Endcap_23_Ring2_C",
"CLS_Endcap_23_Ring2_C", 10, 0.5, 10.5);
323 CLS_Endcap_123_Ring3_A = booker.
book1D(
"CLS_Endcap_123_Ring3_A",
"CLS_Endcap_123_Ring3_A", 10, 0.5, 10.5);
324 CLS_Endcap_123_Ring3_B = booker.
book1D(
"CLS_Endcap_123_Ring3_B",
"CLS_Endcap_123_Ring3_B", 10, 0.5, 10.5);
325 CLS_Endcap_123_Ring3_C = booker.
book1D(
"CLS_Endcap_123_Ring3_C",
"CLS_Endcap_123_Ring3_C", 10, 0.5, 10.5);
327 CLS_Endcap_4 = booker.
book1D(
"CLS_Endcap_4",
"CLS_Endcap_4", 10, 0.5, 10.5);
330 ResDmin1 = booker.
book1D(
"Disk_Min1_Residuals",
"Disk_Min1_Residuals", 400, -8, 8);
331 ResDmin2 = booker.
book1D(
"Disk_Min2_Residuals",
"Disk_Min2_Residuals", 400, -8, 8);
332 ResDmin3 = booker.
book1D(
"Disk_Min3_Residuals",
"Disk_Min3_Residuals", 400, -8, 8);
333 ResDplu1 = booker.
book1D(
"Disk_Plu1_Residuals",
"Disk_Plu1_Residuals", 400, -8, 8);
334 ResDplu2 = booker.
book1D(
"Disk_Plu2_Residuals",
"Disk_Plu2_Residuals", 400, -8, 8);
335 ResDplu3 = booker.
book1D(
"Disk_Plu3_Residuals",
"Disk_Plu3_Residuals", 400, -8, 8);
337 ResDmin4 = booker.
book1D(
"Disk_Min4_Residuals",
"Disk_Min4_Residuals", 400, -8, 8);
338 ResDplu4 = booker.
book1D(
"Disk_Plu4_Residuals",
"Disk_Plu4_Residuals", 400, -8, 8);
340 Res_Endcap1_Ring2_A = booker.
book1D(
"Res_Endcap1_Ring2_A",
"Res_Endcap1_Ring2_A", 400, -8, 8);
341 Res_Endcap1_Ring2_B = booker.
book1D(
"Res_Endcap1_Ring2_B",
"Res_Endcap1_Ring2_B", 400, -8, 8);
342 Res_Endcap1_Ring2_C = booker.
book1D(
"Res_Endcap1_Ring2_C",
"Res_Endcap1_Ring2_C", 400, -8, 8);
344 Res_Endcap23_Ring2_A = booker.
book1D(
"Res_Endcap23_Ring2_A",
"Res_Endcap23_Ring2_A", 400, -8, 8);
345 Res_Endcap23_Ring2_B = booker.
book1D(
"Res_Endcap23_Ring2_B",
"Res_Endcap23_Ring2_B", 400, -8, 8);
346 Res_Endcap23_Ring2_C = booker.
book1D(
"Res_Endcap23_Ring2_C",
"Res_Endcap23_Ring2_C", 400, -8, 8);
348 Res_Endcap123_Ring3_A = booker.
book1D(
"Res_Endcap123_Ring3_A",
"Res_Endcap123_Ring3_A", 400, -8, 8);
349 Res_Endcap123_Ring3_B = booker.
book1D(
"Res_Endcap123_Ring3_B",
"Res_Endcap123_Ring3_B", 400, -8, 8);
350 Res_Endcap123_Ring3_C = booker.
book1D(
"Res_Endcap123_Ring3_C",
"Res_Endcap123_Ring3_C", 400, -8, 8);
T getUntrackedParameter(std::string const &, T const &) const
LocalPoint centreOfStrip(int strip) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
RPCDigiValid(const edm::ParameterSet &ps)
void analyze(const edm::Event &e, const edm::EventSetup &c)
T x() const
Cartesian x coordinate.
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
std::vector< RPCDigi >::const_iterator const_iterator
std::pair< const_iterator, const_iterator > Range
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.