10 LogDebug(
"MuonME0HitsValidation") <<
"Info : Loading Geometry information\n";
13 unsigned int nregion = 2;
15 edm::LogInfo(
"MuonME0HitsValidation") <<
"+++ Info : # of region : " << nregion << std::endl;
17 LogDebug(
"MuonME0HitsValidation") <<
"+++ Info : finish to get geometry information from ES.\n";
19 for (
unsigned int region_num = 0; region_num < nregion; region_num++) {
21 for (
unsigned int layer_num = 0; layer_num < 6; layer_num++) {
22 me0_sh_zr[region_num][layer_num] =
BookHistZR(ibooker,
"me0_sh",
"SimHit", region_num, layer_num);
23 me0_sh_xy[region_num][layer_num] =
BookHistXY(ibooker,
"me0_sh",
"SimHit", region_num, layer_num);
33 layerLabel[layer_num] +
" ; globalX [cm]; globalY[cm]";
35 layerLabel[layer_num] +
" " +
" ; Time of flight [ns] ; entries";
36 std::string hist_label_for_tofMu =
"SimHit TOF(Muon only) : region" +
regionLabel[region_num] +
" layer " +
37 layerLabel[layer_num] +
" " +
" ; Time of flight [ns] ; entries";
39 layerLabel[layer_num] +
" " +
" ; Energy loss [eV] ; entries";
41 " layer " +
layerLabel[layer_num] +
" " +
" ; Energy loss [eV] ; entries";
43 double tof_min, tof_max;
47 ibooker.
book1D(hist_name_for_tof.c_str(), hist_label_for_tof.c_str(), 40, tof_min, tof_max);
49 ibooker.
book1D(hist_name_for_tofMu.c_str(), hist_label_for_tofMu.c_str(), 40, tof_min, tof_max);
51 ibooker.
book1D(hist_name_for_eloss.c_str(), hist_label_for_eloss.c_str(), 60, 0., 6000.);
53 ibooker.
book1D(hist_name_for_elossMu.c_str(), hist_label_for_elossMu.c_str(), 60, 0., 6000.);
68 edm::LogError(
"ME0HitsValidation") <<
"Cannot get ME0Hits by Token simInputTagToken";
72 Float_t timeOfFlightMuon = 0.;
73 Float_t energyLossMuon = 0;
75 for (
auto hits = ME0Hits->begin();
hits != ME0Hits->end();
hits++) {
77 Int_t
region =
id.region();
78 Int_t layer =
id.layer();
81 if (ME0Geometry_->
idToDet(
hits->detUnitId()) ==
nullptr) {
82 std::cout <<
"simHit did not matched with GEMGeometry." << std::endl;
89 Float_t g_r = hitGP.
perp();
90 Float_t g_x = hitGP.x();
91 Float_t g_y = hitGP.y();
92 Float_t g_z = hitGP.z();
96 if (
abs(
hits->particleType()) == 13) {
97 timeOfFlightMuon =
hits->timeOfFlight();
98 energyLossMuon =
hits->energyLoss();