6 const auto& strip_pset =
pset.getParameterSet(
"gemStripDigi");
7 const auto& strip_tag = strip_pset.getParameter<
edm::InputTag>(
"inputTag");
10 const auto& simhit_pset =
pset.getParameterSet(
"gemSimHit");
11 const auto& simhit_tag = simhit_pset.getParameter<
edm::InputTag>(
"inputTag");
27 me_bx_ = booker.
book1D(
"strip_bx",
"Strip Digi Bunch Crossing", 5, -2.5, 2.5);
30 for (
const auto&
region :
gem->regions()) {
35 Int_t region_id =
region->region();
41 Int_t station_id =
station->station();
43 const auto& superChamberVec =
station->superChambers();
44 if (superChamberVec.empty()) {
46 <<
" and station = " << station_id;
50 if (super_chamber ==
nullptr) {
52 <<
" and station = " << station_id;
56 Int_t layer_id =
chamber->id().layer();
57 ME3IdsKey key3(region_id, station_id, layer_id);
60 bookHist1D(booker, key3,
"strip_bx",
"Strip Digi Bunch Crossing", 5, -2.5, 2.5,
"Bunch crossing");
69 for (
const auto&
region :
gem->regions()) {
70 Int_t region_id =
region->region();
77 "muon_simhit_occ_eta",
78 "Muon SimHit Eta Occupancy",
86 "matched_strip_occ_eta",
87 "Matched Strip Digi Eta Occupancy",
93 Int_t station_id =
station->station();
99 bookHist1D(booker, key2,
"muon_simhit_occ_phi",
"Muon SimHit Phi Occupancy", 51, -
M_PI,
M_PI,
"#phi");
102 booker, key2,
"matched_strip_occ_phi",
"Matched Strip Digi Phi Occupancy", 51, -
M_PI,
M_PI,
"#phi");
108 const auto& superChamberVec =
station->superChambers();
109 if (superChamberVec.empty() || superChamberVec[0] ==
nullptr) {
111 <<
" and station = " << station_id;
116 << station_id <<
", " << superChamberVec[0]->id() <<
")";
119 Int_t layer_id =
chamber->id().layer();
120 ME3IdsKey key3{region_id, station_id, layer_id};
123 const auto& etaPartitionsVec =
chamber->etaPartitions();
124 if (etaPartitionsVec.empty() || etaPartitionsVec.front() ==
nullptr) {
126 <<
"Eta partition missing or null for region, station, super chamber, chamber = (" << region_id
127 <<
", " << station_id <<
", " << superChamberVec[0]->id() <<
", " <<
chamber->id() <<
")";
130 Int_t num_strips = etaPartitionsVec.front()->nstrips();
137 "Strip Digi Occupancy per strip number",
145 "strip_occ_phi_strip",
146 "Strip Digi Occupancy",
166 if (
gem ==
nullptr) {
172 if (not simhit_container.
isValid()) {
179 if (not digi_collection.
isValid()) {
185 for (
auto range_iter = digi_collection->begin(); range_iter != digi_collection->end(); range_iter++) {
187 if (
gem->idToDet(
id) ==
nullptr) {
189 <<
"from unmatched geometry." << std::endl;
193 Int_t region_id =
id.region();
194 Int_t layer_id =
id.layer();
195 Int_t station_id =
id.station();
196 Int_t chamber_id =
id.chamber();
197 Int_t roll_id =
id.roll();
200 ME3IdsKey key3{region_id, station_id, layer_id};
207 for (
auto digi =
range.first; digi !=
range.second; ++digi) {
208 Int_t
strip = digi->strip();
209 Int_t
bx = digi->bx();
213 Float_t digi_g_r = strip_global_pos.
perp();
214 Float_t digi_g_abs_z =
std::abs(strip_global_pos.
z());
220 Float_t digi_g_x = strip_global_pos.
x();
221 Float_t digi_g_y = strip_global_pos.
y();
222 Float_t digi_g_phi = strip_global_pos.
phi();
233 for (
const auto& simhit : *simhit_container.
product()) {
237 if (
gem->idToDet(simhit.detUnitId()) ==
nullptr) {
242 GEMDetId simhit_gemid(simhit.detUnitId());
244 Int_t region_id = simhit_gemid.
region();
245 Int_t station_id = simhit_gemid.station();
246 Int_t layer_id = simhit_gemid.layer();
247 Int_t chamber_id = simhit_gemid.chamber();
248 Int_t roll_id = simhit_gemid.roll();
251 ME3IdsKey key3{region_id, station_id, layer_id};
255 const auto& simhit_local_pos = simhit.localPosition();
256 const auto& simhit_global_pos = roll->
surface().
toGlobal(simhit_local_pos);
258 Float_t simhit_g_eta =
std::abs(simhit_global_pos.eta());
259 Float_t simhit_g_phi = simhit_global_pos.phi();
261 Int_t simhit_strip = roll->
strip(simhit_local_pos);
268 auto range = digi_collection->get(simhit_gemid);
269 for (
auto digi =
range.first; digi !=
range.second; ++digi) {
270 if (simhit_strip == digi->strip()) {