24 rpcDigiToken = consumes<RPCDigiCollection>(
36 auto rpcGeom = eventSetup.
getHandle(rpcGeomToken_);
41 event.getByToken(rpcDigiToken, rpcDigis);
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();
55 std::vector<double> buff;
56 if (allsims.find(Rsid) != allsims.end()) {
60 buff.push_back(simIt->localPosition().x());
69 xyview->Fill(sim_x, sim_y);
71 if (Rsid.
region() == (+1)) {
73 xyvDplu4->Fill(sim_x, sim_y);
75 }
else if (Rsid.
region() == (-1)) {
77 xyvDmin4->Fill(sim_x, sim_y);
80 rzview->Fill(
p.z(),
p.perp());
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()) {
96 StripProf->Fill(digiIt->strip());
97 BxDist->Fill(digiIt->bx());
99 if (Rsid.
region() == (+1)) {
101 BxDisc_4Plus->Fill(digiIt->bx());
102 }
else if (Rsid.
region() == (-1)) {
104 BxDisc_4Min->Fill(digiIt->bx());
108 const double digiTime = digiIt->hasTime() ? digiIt->time() : digiIt->bx() * 25;
109 hDigiTimeAll->Fill(digiTime);
110 if (digiIt->hasTime()) {
111 hDigiTime->Fill(digiTime);
113 hDigiTimeIRPC->Fill(digiTime);
115 hDigiTimeNoIRPC->Fill(digiTime);
119 if (sims.size() == 1 && ndigi == 1) {
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)
136 ResLayer1_barrel->Fill(dis);
138 ResLayer2_barrel->Fill(dis);
140 ResLayer3_barrel->Fill(dis);
142 ResLayer4_barrel->Fill(dis);
144 ResLayer5_barrel->Fill(dis);
146 ResLayer6_barrel->Fill(dis);
150 if (Rsid.
ring() == 2) {
152 if (Rsid.
roll() == 1)
153 Res_Endcap1_Ring2_A->Fill(dis);
154 if (Rsid.
roll() == 2)
155 Res_Endcap1_Ring2_B->Fill(dis);
156 if (Rsid.
roll() == 3)
157 Res_Endcap1_Ring2_C->Fill(dis);
160 if (Rsid.
roll() == 1)
161 Res_Endcap23_Ring2_A->Fill(dis);
162 if (Rsid.
roll() == 2)
163 Res_Endcap23_Ring2_B->Fill(dis);
164 if (Rsid.
roll() == 3)
165 Res_Endcap23_Ring2_C->Fill(dis);
168 if (Rsid.
ring() == 3) {
169 if (Rsid.
roll() == 1)
170 Res_Endcap123_Ring3_A->Fill(dis);
171 if (Rsid.
roll() == 2)
172 Res_Endcap123_Ring3_B->Fill(dis);
173 if (Rsid.
roll() == 3)
174 Res_Endcap123_Ring3_C->Fill(dis);
178 if (Rsid.
region() == (+1)) {
188 if (Rsid.
region() == (-1)) {
205 xyview = booker.
book2D(
"X_Vs_Y_View",
"X_Vs_Y_View", 155, -775., 775., 155, -775., 775.);
207 xyvDplu4 = booker.
book2D(
"Dplu4_XvsY",
"Dplu4_XvsY", 155, -775., 775., 155, -775., 775.);
208 xyvDmin4 = booker.
book2D(
"Dmin4_XvsY",
"Dmin4_XvsY", 155, -775., 775., 155, -775., 775.);
210 rzview = booker.
book2D(
"R_Vs_Z_View",
"R_Vs_Z_View", 216, -1080., 1080., 52, 260., 780.);
211 Res = booker.
book1D(
"Digi_SimHit_difference",
"Digi_SimHit_difference", 300, -8, 8);
212 ResWmin2 = booker.
book1D(
"W_Min2_Residuals",
"W_Min2_Residuals", 400, -8, 8);
213 ResWmin1 = booker.
book1D(
"W_Min1_Residuals",
"W_Min1_Residuals", 400, -8, 8);
214 ResWzer0 = booker.
book1D(
"W_Zer0_Residuals",
"W_Zer0_Residuals", 400, -8, 8);
215 ResWplu1 = booker.
book1D(
"W_Plu1_Residuals",
"W_Plu1_Residuals", 400, -8, 8);
216 ResWplu2 = booker.
book1D(
"W_Plu2_Residuals",
"W_Plu2_Residuals", 400, -8, 8);
218 ResLayer1_barrel = booker.
book1D(
"ResLayer1_barrel",
"ResLayer1_barrel", 400, -8, 8);
219 ResLayer2_barrel = booker.
book1D(
"ResLayer2_barrel",
"ResLayer2_barrel", 400, -8, 8);
220 ResLayer3_barrel = booker.
book1D(
"ResLayer3_barrel",
"ResLayer3_barrel", 400, -8, 8);
221 ResLayer4_barrel = booker.
book1D(
"ResLayer4_barrel",
"ResLayer4_barrel", 400, -8, 8);
222 ResLayer5_barrel = booker.
book1D(
"ResLayer5_barrel",
"ResLayer5_barrel", 400, -8, 8);
223 ResLayer6_barrel = booker.
book1D(
"ResLayer6_barrel",
"ResLayer6_barrel", 400, -8, 8);
225 BxDist = booker.
book1D(
"Bunch_Crossing",
"Bunch_Crossing", 20, -10., 10.);
226 StripProf = booker.
book1D(
"Strip_Profile",
"Strip_Profile", 100, 0, 100);
228 BxDisc_4Plus = booker.
book1D(
"BxDisc_4Plus",
"BxDisc_4Plus", 20, -10., 10.);
229 BxDisc_4Min = booker.
book1D(
"BxDisc_4Min",
"BxDisc_4Min", 20, -10., 10.);
232 ResDmin1 = booker.
book1D(
"Disk_Min1_Residuals",
"Disk_Min1_Residuals", 400, -8, 8);
233 ResDmin2 = booker.
book1D(
"Disk_Min2_Residuals",
"Disk_Min2_Residuals", 400, -8, 8);
234 ResDmin3 = booker.
book1D(
"Disk_Min3_Residuals",
"Disk_Min3_Residuals", 400, -8, 8);
235 ResDplu1 = booker.
book1D(
"Disk_Plu1_Residuals",
"Disk_Plu1_Residuals", 400, -8, 8);
236 ResDplu2 = booker.
book1D(
"Disk_Plu2_Residuals",
"Disk_Plu2_Residuals", 400, -8, 8);
237 ResDplu3 = booker.
book1D(
"Disk_Plu3_Residuals",
"Disk_Plu3_Residuals", 400, -8, 8);
239 ResDmin4 = booker.
book1D(
"Disk_Min4_Residuals",
"Disk_Min4_Residuals", 400, -8, 8);
240 ResDplu4 = booker.
book1D(
"Disk_Plu4_Residuals",
"Disk_Plu4_Residuals", 400, -8, 8);
242 Res_Endcap1_Ring2_A = booker.
book1D(
"Res_Endcap1_Ring2_A",
"Res_Endcap1_Ring2_A", 400, -8, 8);
243 Res_Endcap1_Ring2_B = booker.
book1D(
"Res_Endcap1_Ring2_B",
"Res_Endcap1_Ring2_B", 400, -8, 8);
244 Res_Endcap1_Ring2_C = booker.
book1D(
"Res_Endcap1_Ring2_C",
"Res_Endcap1_Ring2_C", 400, -8, 8);
246 Res_Endcap23_Ring2_A = booker.
book1D(
"Res_Endcap23_Ring2_A",
"Res_Endcap23_Ring2_A", 400, -8, 8);
247 Res_Endcap23_Ring2_B = booker.
book1D(
"Res_Endcap23_Ring2_B",
"Res_Endcap23_Ring2_B", 400, -8, 8);
248 Res_Endcap23_Ring2_C = booker.
book1D(
"Res_Endcap23_Ring2_C",
"Res_Endcap23_Ring2_C", 400, -8, 8);
250 Res_Endcap123_Ring3_A = booker.
book1D(
"Res_Endcap123_Ring3_A",
"Res_Endcap123_Ring3_A", 400, -8, 8);
251 Res_Endcap123_Ring3_B = booker.
book1D(
"Res_Endcap123_Ring3_B",
"Res_Endcap123_Ring3_B", 400, -8, 8);
252 Res_Endcap123_Ring3_C = booker.
book1D(
"Res_Endcap123_Ring3_C",
"Res_Endcap123_Ring3_C", 400, -8, 8);
256 booker.
book1D(
"DigiTimeAll",
"Digi time including present electronics;Digi time (ns)", 100, -12.5, 12.5);
257 hDigiTime = booker.
book1D(
"DigiTime",
"Digi time only with timing information;Digi time (ns)", 100, -12.5, 12.5);
258 hDigiTimeIRPC = booker.
book1D(
"DigiTimeIRPC",
"IRPC Digi time;Digi time (ns)", 100, -12.5, 12.5);
259 hDigiTimeNoIRPC = booker.
book1D(
"DigiTimeNoIRPC",
"non-IRPC Digi time;Digi time (ns)", 100, -12.5, 12.5);