26 rpcDigiToken = consumes<RPCDigiCollection>(
42 event.getByToken(rpcDigiToken, rpcDigis);
45 PSimHitContainer::const_iterator simIt;
48 std::map<RPCDetId, std::vector<double>> allsims;
50 for (simIt =
simHit->begin(); simIt !=
simHit->end(); simIt++) {
52 const RPCRoll *soll = dynamic_cast<const RPCRoll *>(rpcGeom->
roll(Rsid));
53 int ptype = simIt->particleType();
56 std::vector<double> buff;
57 if (allsims.find(Rsid) != allsims.end()) {
61 buff.push_back(simIt->localPosition().x());
70 xyview->Fill(sim_x, sim_y);
72 if (Rsid.
region() == (+1)) {
74 xyvDplu4->Fill(sim_x, sim_y);
76 }
else if (Rsid.
region() == (-1)) {
78 xyvDmin4->Fill(sim_x, sim_y);
81 rzview->Fill(
p.z(),
p.perp());
85 for (detUnitIt = rpcDigis->begin(); detUnitIt != rpcDigis->end(); ++detUnitIt) {
86 const RPCDetId Rsid = (*detUnitIt).first;
87 const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->
roll(Rsid));
90 std::vector<double> sims;
91 if (allsims.find(Rsid) != allsims.end()) {
97 StripProf->Fill(digiIt->strip());
98 BxDist->Fill(digiIt->bx());
100 if (Rsid.
region() == (+1)) {
102 BxDisc_4Plus->Fill(digiIt->bx());
103 }
else if (Rsid.
region() == (-1)) {
105 BxDisc_4Min->Fill(digiIt->bx());
109 const double digiTime = digiIt->hasTime() ? digiIt->time() : digiIt->bx() * 25;
110 hDigiTimeAll->Fill(digiTime);
111 if (digiIt->hasTime()) {
112 hDigiTime->Fill(digiTime);
114 hDigiTimeIRPC->Fill(digiTime);
116 hDigiTimeNoIRPC->Fill(digiTime);
120 if (sims.size() == 1 && ndigi == 1) {
125 if (Rsid.
ring() == -2)
127 else if (Rsid.
ring() == -1)
129 else if (Rsid.
ring() == 0)
131 else if (Rsid.
ring() == 1)
133 else if (Rsid.
ring() == 2)
137 ResLayer1_barrel->Fill(dis);
139 ResLayer2_barrel->Fill(dis);
141 ResLayer3_barrel->Fill(dis);
143 ResLayer4_barrel->Fill(dis);
145 ResLayer5_barrel->Fill(dis);
147 ResLayer6_barrel->Fill(dis);
151 if (Rsid.
ring() == 2) {
153 if (Rsid.
roll() == 1)
154 Res_Endcap1_Ring2_A->Fill(dis);
155 if (Rsid.
roll() == 2)
156 Res_Endcap1_Ring2_B->Fill(dis);
157 if (Rsid.
roll() == 3)
158 Res_Endcap1_Ring2_C->Fill(dis);
161 if (Rsid.
roll() == 1)
162 Res_Endcap23_Ring2_A->Fill(dis);
163 if (Rsid.
roll() == 2)
164 Res_Endcap23_Ring2_B->Fill(dis);
165 if (Rsid.
roll() == 3)
166 Res_Endcap23_Ring2_C->Fill(dis);
169 if (Rsid.
ring() == 3) {
170 if (Rsid.
roll() == 1)
171 Res_Endcap123_Ring3_A->Fill(dis);
172 if (Rsid.
roll() == 2)
173 Res_Endcap123_Ring3_B->Fill(dis);
174 if (Rsid.
roll() == 3)
175 Res_Endcap123_Ring3_C->Fill(dis);
179 if (Rsid.
region() == (+1)) {
189 if (Rsid.
region() == (-1)) {
206 xyview = booker.
book2D(
"X_Vs_Y_View",
"X_Vs_Y_View", 155, -775., 775., 155, -775., 775.);
208 xyvDplu4 = booker.
book2D(
"Dplu4_XvsY",
"Dplu4_XvsY", 155, -775., 775., 155, -775., 775.);
209 xyvDmin4 = booker.
book2D(
"Dmin4_XvsY",
"Dmin4_XvsY", 155, -775., 775., 155, -775., 775.);
211 rzview = booker.
book2D(
"R_Vs_Z_View",
"R_Vs_Z_View", 216, -1080., 1080., 52, 260., 780.);
212 Res = booker.
book1D(
"Digi_SimHit_difference",
"Digi_SimHit_difference", 300, -8, 8);
213 ResWmin2 = booker.
book1D(
"W_Min2_Residuals",
"W_Min2_Residuals", 400, -8, 8);
214 ResWmin1 = booker.
book1D(
"W_Min1_Residuals",
"W_Min1_Residuals", 400, -8, 8);
215 ResWzer0 = booker.
book1D(
"W_Zer0_Residuals",
"W_Zer0_Residuals", 400, -8, 8);
216 ResWplu1 = booker.
book1D(
"W_Plu1_Residuals",
"W_Plu1_Residuals", 400, -8, 8);
217 ResWplu2 = booker.
book1D(
"W_Plu2_Residuals",
"W_Plu2_Residuals", 400, -8, 8);
219 ResLayer1_barrel = booker.
book1D(
"ResLayer1_barrel",
"ResLayer1_barrel", 400, -8, 8);
220 ResLayer2_barrel = booker.
book1D(
"ResLayer2_barrel",
"ResLayer2_barrel", 400, -8, 8);
221 ResLayer3_barrel = booker.
book1D(
"ResLayer3_barrel",
"ResLayer3_barrel", 400, -8, 8);
222 ResLayer4_barrel = booker.
book1D(
"ResLayer4_barrel",
"ResLayer4_barrel", 400, -8, 8);
223 ResLayer5_barrel = booker.
book1D(
"ResLayer5_barrel",
"ResLayer5_barrel", 400, -8, 8);
224 ResLayer6_barrel = booker.
book1D(
"ResLayer6_barrel",
"ResLayer6_barrel", 400, -8, 8);
226 BxDist = booker.
book1D(
"Bunch_Crossing",
"Bunch_Crossing", 20, -10., 10.);
227 StripProf = booker.
book1D(
"Strip_Profile",
"Strip_Profile", 100, 0, 100);
229 BxDisc_4Plus = booker.
book1D(
"BxDisc_4Plus",
"BxDisc_4Plus", 20, -10., 10.);
230 BxDisc_4Min = booker.
book1D(
"BxDisc_4Min",
"BxDisc_4Min", 20, -10., 10.);
233 ResDmin1 = booker.
book1D(
"Disk_Min1_Residuals",
"Disk_Min1_Residuals", 400, -8, 8);
234 ResDmin2 = booker.
book1D(
"Disk_Min2_Residuals",
"Disk_Min2_Residuals", 400, -8, 8);
235 ResDmin3 = booker.
book1D(
"Disk_Min3_Residuals",
"Disk_Min3_Residuals", 400, -8, 8);
236 ResDplu1 = booker.
book1D(
"Disk_Plu1_Residuals",
"Disk_Plu1_Residuals", 400, -8, 8);
237 ResDplu2 = booker.
book1D(
"Disk_Plu2_Residuals",
"Disk_Plu2_Residuals", 400, -8, 8);
238 ResDplu3 = booker.
book1D(
"Disk_Plu3_Residuals",
"Disk_Plu3_Residuals", 400, -8, 8);
240 ResDmin4 = booker.
book1D(
"Disk_Min4_Residuals",
"Disk_Min4_Residuals", 400, -8, 8);
241 ResDplu4 = booker.
book1D(
"Disk_Plu4_Residuals",
"Disk_Plu4_Residuals", 400, -8, 8);
243 Res_Endcap1_Ring2_A = booker.
book1D(
"Res_Endcap1_Ring2_A",
"Res_Endcap1_Ring2_A", 400, -8, 8);
244 Res_Endcap1_Ring2_B = booker.
book1D(
"Res_Endcap1_Ring2_B",
"Res_Endcap1_Ring2_B", 400, -8, 8);
245 Res_Endcap1_Ring2_C = booker.
book1D(
"Res_Endcap1_Ring2_C",
"Res_Endcap1_Ring2_C", 400, -8, 8);
247 Res_Endcap23_Ring2_A = booker.
book1D(
"Res_Endcap23_Ring2_A",
"Res_Endcap23_Ring2_A", 400, -8, 8);
248 Res_Endcap23_Ring2_B = booker.
book1D(
"Res_Endcap23_Ring2_B",
"Res_Endcap23_Ring2_B", 400, -8, 8);
249 Res_Endcap23_Ring2_C = booker.
book1D(
"Res_Endcap23_Ring2_C",
"Res_Endcap23_Ring2_C", 400, -8, 8);
251 Res_Endcap123_Ring3_A = booker.
book1D(
"Res_Endcap123_Ring3_A",
"Res_Endcap123_Ring3_A", 400, -8, 8);
252 Res_Endcap123_Ring3_B = booker.
book1D(
"Res_Endcap123_Ring3_B",
"Res_Endcap123_Ring3_B", 400, -8, 8);
253 Res_Endcap123_Ring3_C = booker.
book1D(
"Res_Endcap123_Ring3_C",
"Res_Endcap123_Ring3_C", 400, -8, 8);
257 booker.
book1D(
"DigiTimeAll",
"Digi time including present electronics;Digi time (ns)", 100, -12.5, 12.5);
258 hDigiTime = booker.
book1D(
"DigiTime",
"Digi time only with timing information;Digi time (ns)", 100, -12.5, 12.5);
259 hDigiTimeIRPC = booker.
book1D(
"DigiTimeIRPC",
"IRPC Digi time;Digi time (ns)", 100, -12.5, 12.5);
260 hDigiTimeNoIRPC = booker.
book1D(
"DigiTimeNoIRPC",
"non-IRPC Digi time;Digi time (ns)", 100, -12.5, 12.5);