19 pt_binning_ =
pset.getUntrackedParameter<std::vector<double> >(
"ptBinning");
22 eta_up_ =
pset.getUntrackedParameter<
double>(
"etaUp");
37 if (not
gem.isValid()) {
43 const int region_number =
region->region();
44 const char* region_sign = region_number > 0 ?
"+" :
"-";
47 const int station_number =
station->station();
49 const MEMapKey1 key1{region_number, station_number};
50 const auto&& station_name_suffix = TString::Format(
"_ge%s%d1", region_sign, station_number);
51 const auto&& station_title_suffix = TString::Format(
" : GE %s%d/1", region_sign, station_number);
56 if (station_number == 1) {
57 for (
const bool is_odd : {
true,
false}) {
58 std::tuple<int, int, bool> key2{region_number, station_number, is_odd};
59 const TString&& parity_name_suffix = station_name_suffix + (is_odd ?
"_odd" :
"_even");
60 const TString&& parity_title_suffix =
61 station_title_suffix + (is_odd ?
", Odd Superchamber" :
", Even Superchamber");
62 bookOccupancy(ibooker, key2, parity_name_suffix, parity_title_suffix);
65 const TString&& ieta_name_suffix = parity_name_suffix + Form(
"_ieta%d",
ieta);
66 const TString&& ieta_title_suffix = parity_title_suffix + Form(
", i#eta = %d",
ieta);
67 const MEMapKey3 key3{region_number, station_number, is_odd,
ieta};
68 bookResolution(ibooker, key3, ieta_name_suffix, ieta_title_suffix);
73 std::tuple<int, int, bool> key2{region_number, station_number,
false};
74 bookOccupancy(ibooker, key2, station_name_suffix, station_title_suffix);
77 const MEMapKey3 key3{region_number, station_number,
false,
ieta};
78 const TString&& ieta_name_suffix = station_name_suffix + Form(
"_ieta%d",
ieta);
79 const TString&& ieta_title_suffix = station_title_suffix + Form(
", i#eta = %d",
ieta);
80 bookResolution(ibooker, key3, ieta_name_suffix, ieta_title_suffix);
90 const TString& name_suffix,
91 const TString& title_suffix) {
95 const auto&& superchambers =
station->superChambers();
102 const int num_ch = superchambers.size() * superchambers.front()->nChambers();
109 helper.book2D(
"detector_matched",
matched_title_, num_ch, 0.5, num_ch + 0.5, num_etas, 0.5, num_etas + 0.5);
117 const TString& name_suffix,
118 const TString& title_suffix) {
132 const TString& name_suffix,
133 const TString& title_suffix) {
149 if (not rechit_collection.
isValid()) {
162 if (not
gem.isValid()) {
169 if (not transient_track_builder.
isValid()) {
191 if (
track ==
nullptr) {
197 if (not transient_track.
isValid()) {
204 if (
muon.eta() * eta_partition->id().region() < 0)
207 const BoundPlane& bound_plane = eta_partition->surface();
216 const LocalPoint tsos_local_pos_2d(tsos_local_pos.
x(), tsos_local_pos.
y(), 0.0f);
217 if (not bound_plane.bounds().inside(tsos_local_pos_2d)) {
221 const GEMDetId&& gem_id = eta_partition->id();
223 bool is_odd = gem_id.
station() == 1 ? (gem_id.
chamber() % 2 == 1) :
false;
224 const std::tuple<int, int> key1{gem_id.
region(), gem_id.
station()};
225 const std::tuple<int, int, bool> key2{gem_id.
region(), gem_id.
station(), is_odd};
226 const std::tuple<int, int, bool, int> key3{gem_id.
region(), gem_id.
station(), is_odd, gem_id.
roll()};
235 if (matched_hit ==
nullptr) {
244 const GlobalPoint&& hit_global_pos = eta_partition->toGlobal(hit_local_pos);
247 const float residual_x = tsos_local_pos.
x() - hit_local_pos.
x();
248 const float residual_y = tsos_local_pos.
y() - hit_local_pos.
y();
254 const float pull_x = residual_x /
std::sqrt(tsos_err.xx() + hit_err.
xx());
255 const float pull_y = residual_y /
std::sqrt(tsos_err.yy() + hit_err.
yy());
273 float residual_x = std::fabs(track_local_x -
hit->localPosition().
x());
274 if (residual_x <= min_residual_x) {
275 min_residual_x = residual_x;
276 closest_hit = &(*hit);