14 LogDebug(
"MuonME0DigisValidation") <<
"Info: Loading Geometry information\n";
17 unsigned int nregion = 2;
19 edm::LogInfo(
"MuonME0DigisValidation") <<
"+++ Info : # of region: " << nregion << std::endl;
21 LogDebug(
"MuonME0DigisValidation") <<
"+++ Info : finish to get geometry information from ES.\n";
23 num_evts = ibooker.
book1D(
"num_evts",
"Number of events; ; Number of events", 1, 0, 2);
26 ibooker.
book1D(
"me0_strip_dg_x_local_tot",
"Local X; X_{local} [cm]; Entries", 60, -30.0, +30.0);
28 ibooker.
book1D(
"me0_strip_dg_y_local_tot",
"Local Y; Y_{local} [cm]; Entries", 100, -50.0, +50.0);
32 ibooker.
book1D(
"me0_strip_dg_dx_local_tot",
"Local DeltaX; #Delta X_{local} [cm]; Entries", 50, -0.1, +0.1);
34 ibooker.
book1D(
"me0_strip_dg_dy_local_tot",
"Local DeltaY; #Delta Y_{local} [cm]; Entries", 500, -10.0, +10.0);
36 "me0_strip_dg_dphi_global_tot",
"Global DeltaPhi; #Delta #phi_{global} [rad]; Entries", 50, -0.01, +0.01);
38 ibooker.
book1D(
"me0_strip_dg_dtime_tot",
"DeltaToF; #Delta ToF [ns]; Entries", 50, -5, +5);
41 "Global DeltaPhi vs. Phi; #phi_{global} [rad]; #Delta "
42 "#phi_{global} [rad]",
53 float bins[] = {62.3, 70.0, 77.7, 87.1, 96.4, 108.2, 119.9, 134.7, 149.5};
54 int binnum =
sizeof(
bins) /
sizeof(
float) - 1;
57 ibooker.
book1D(
"me0_strip_dg_bkg_radius_tot",
"Total neutron background; Radius [cm]; Entries", binnum,
bins);
59 "me0_strip_dg_bkgElePos_radius",
"Neutron background: electrons+positrons; Radius [cm]; Entries", binnum,
bins);
61 "me0_strip_dg_bkgNeutral_radius",
"Neutron background: gammas+neutrons; Radius [cm]; Entries", binnum,
bins);
64 "Total expected neutron background; Radius [cm]; Hit Rate [Hz/cm^{2}]",
68 "Expected neutron background: electrons+positrons; Radius "
69 "[cm]; Hit Rate [Hz/cm^{2}]",
73 "Expected neutron background: gammas+neutrons; Radius "
74 "[cm]; Hit Rate [Hz/cm^{2}]",
78 std::vector<double> neuBkg, eleBkg;
79 neuBkg.push_back(899644.0);
80 neuBkg.push_back(-30841.0);
81 neuBkg.push_back(441.28);
82 neuBkg.push_back(-3.3405);
83 neuBkg.push_back(0.0140588);
84 neuBkg.push_back(-3.11473
e-05);
85 neuBkg.push_back(2.83736
e-08);
86 eleBkg.push_back(4.68590
e+05);
87 eleBkg.push_back(-1.63834
e+04);
88 eleBkg.push_back(2.35700
e+02);
89 eleBkg.push_back(-1.77706
e+00);
90 eleBkg.push_back(7.39960
e-03);
91 eleBkg.push_back(-1.61448
e-05);
92 eleBkg.push_back(1.44368
e-08);
99 double pos_helper = 1.0;
100 for (
int j = 0;
j < 7; ++
j) {
101 neutral += neuBkg[
j] * pos_helper;
102 charged += eleBkg[
j] * pos_helper;
111 for (
unsigned int region_num = 0; region_num < nregion; region_num++) {
114 for (
unsigned int layer_num = 0; layer_num < 6; layer_num++) {
128 layerLabel[layer_num] +
" ; #Delta X_{local} [cm]; Entries";
130 layerLabel[layer_num] +
" ; #Delta Y_{local} [cm]; Entries";
131 std::string hist_label_for_dphi_global =
"Global DeltaPhi: region" +
regionLabel[region_num] +
" layer " +
132 layerLabel[layer_num] +
" ; #Delta #phi_{global} [rad]; Entries";
135 "Denominator: region" +
regionLabel[region_num] +
" layer " +
layerLabel[layer_num] +
" ; #eta; Entries";
137 "Numerator: region" +
regionLabel[region_num] +
" layer " +
layerLabel[layer_num] +
" ; #eta; Entries";
141 BookHistXY(ibooker,
"me0_strip_dg_Muon",
"Digi Muon", region_num, layer_num);
144 ibooker.
book1D(hist_name_for_dx_local.c_str(), hist_label_for_dx_local.c_str(), 50, -0.1, +0.1);
146 ibooker.
book1D(hist_name_for_dy_local.c_str(), hist_label_for_dy_local.c_str(), 500, -10.0, +10.0);
148 ibooker.
book1D(hist_name_for_dphi_global.c_str(), hist_label_for_dphi_global.c_str(), 50, -0.01, +0.01);
151 ibooker.
book1D(hist_name_for_den_eta, hist_label_for_den_eta, 12, 1.8, 3.0);
153 ibooker.
book1D(hist_name_for_num_eta, hist_label_for_num_eta, 12, 1.8, 3.0);
170 edm::LogError(
"ME0DigisValidation") <<
"Cannot get ME0Hits/ME0Digis by Token simInputTagToken";
175 bool toBeCounted1 =
true;
181 if (gdet ==
nullptr) {
182 edm::LogWarning(
"ME0DigisValidation") <<
"Getting DetId failed. Discard this gem strip hit. Maybe it comes "
183 "from unmatched geometry.";
191 int roll = (
int)
id.roll();
194 for (digiItr = (*cItr).second.first; digiItr != (*cItr).second.second; ++digiItr) {
205 int isPrompt = digiItr->prompt();
219 int layer_num =
layer - 1;
221 bool toBeCounted2 =
true;
227 for (
auto hits = ME0Hits->begin();
hits != ME0Hits->end();
hits++) {
228 int particleType_sh =
hits->particleType();
229 int evtId_sh =
hits->eventId().event();
230 int bx_sh =
hits->eventId().bunchCrossing();
231 int procType_sh =
hits->processType();
233 if (!(
abs(particleType_sh) == 13 && evtId_sh == 0 && bx_sh == 0 && procType_sh == 0))
237 int region_sh =
id.region();
238 int layer_sh =
id.layer();
239 int chamber_sh =
id.chamber();
240 int roll_sh =
id.roll();
242 int region_sh_num = 0;
245 else if (region_sh == 1)
247 int layer_sh_num = layer_sh - 1;
257 if (!(
region == region_sh &&
layer == layer_sh &&
chamber == chamber_sh && roll == roll_sh))
260 float dx_loc = lp_sh.
x() - lp.x();
261 float dy_loc = lp_sh.
y() - lp.y();
262 float dphi_glob = gp_sh.
phi() -
gp.phi();
263 float deta_glob = gp_sh.
eta() -
gp.eta();
268 float timeOfFlight_sh =
hits->tof();
271 float centralTOF(centralGP.mag() / 29.98);
272 float timeOfFlight_sh_corr = timeOfFlight_sh - centralTOF;
289 toBeCounted2 =
false;
293 toBeCounted1 =
false;