16 if ( GEMGeometry_ ==
nullptr) {
17 std::cout<<
"geometry is wrong! Terminated."<<std::endl;
24 edm::LogInfo(
"MuonGEMHitsValidation")<<
"+++ Info : # of eta partition : "<<
nPart()<<std::endl;
26 LogDebug(
"MuonGEMHitsValidation")<<
"+++ Info : finish to get geometry information from ES.\n";
29 LogDebug(
"MuonGEMHitsValidation")<<
"+++ Region independant part.\n";
35 TString hist_name_for_tofMu = TString::Format(
"gem_sh_simple_tofMuon_st%s",
getStationLabel(st).c_str());
36 TString hist_name_for_elossMu = TString::Format(
"gem_sh_simple_energylossMuon_st%s",
getStationLabel(st).c_str());
37 TString hist_label_for_tofMu = TString::Format(
"SimHit TOF(Muon only) station : station %s ; Time of flight [ns] ; entries",
getStationLabel(st).c_str());
38 TString hist_label_for_elossMu = TString::Format(
"SimHit energy loss(Muon only) : station %s ; Energy loss [eV] ; entries",
getStationLabel(st).c_str());
40 double tof_min, tof_max;
41 if( st == 1 ) { tof_min = 18; tof_max = 22; }
42 else { tof_min = 26; tof_max = 30; }
43 gem_sh_simple_tofMu[ hist_name_for_tofMu.Hash() ] = ibooker.
book1D( hist_name_for_tofMu.Data(), hist_label_for_tofMu.Data(), 40,tof_min,tof_max);
44 gem_sh_simple_elossMu[ hist_name_for_elossMu.Hash() ] = ibooker.
book1D( hist_name_for_elossMu.Data(), hist_label_for_elossMu.Data(), 60,0.,6000.);
47 LogDebug(
"MuonGEMHitsValidation")<<
"+++ Region+Station part.\n";
49 for(
auto& region : GEMGeometry_->
regions() ){
50 int re = region->region();
53 LogDebug(
"MuonGEMHitsValidation")<<
"+++ SimpleZR Occupancy\n";
54 TString simpleZR_title = TString::Format(
"ZR Occupancy%s; |Z|(cm); R(cm)", title_suffix.Data());
55 TString simpleZR_histname = TString::Format(
"hit_simple_zr%s", histname_suffix.Data());
58 if ( simpleZR !=
nullptr) {
62 for(
auto&
station : region->stations() ){
66 LogDebug(
"MuonGEMHitsValidation")<<
"+++ dcEta Occupancy\n";
67 TString dcEta_title = TString::Format(
"Occupancy for detector component %s;;#eta-partition",title_suffix2.Data());
68 TString dcEta_histname = TString::Format(
"hit_dcEta%s",histname_suffix2.Data());
70 if ( dcEta !=
nullptr) {
71 Hit_dcEta[ dcEta_histname.Hash() ] = dcEta;
77 LogDebug(
"MuonGEMHitsValidation")<<
"+++ Begining Detail Plots\n";
79 for(
auto& region : GEMGeometry_->
regions() ){
80 for(
auto&
station : region->stations() ){
83 if (
ring->ring() != 1 )
break ;
87 TString hist_name = TString::Format(
"gem_sh_xy%s",name_suffix.c_str());
88 TString hist_title = TString::Format(
"Simhit Global XY Plots at %s",title_suffix.c_str());
90 if ( temp !=
nullptr ) {
91 LogDebug(
"MuonGEMHitsValidation")<<
"ME can be acquired!";
94 LogDebug(
"MuonGEMHitsValidation")<<
"ME can not be acquired!";
100 if ( temp2 !=
nullptr ) {
101 LogDebug(
"MuonGEMHitsValidation")<<
"ME can be acquired!";
104 LogDebug(
"MuonGEMHitsValidation")<<
"ME can not be acquired!";
111 for(
unsigned int region_num = 0 ; region_num <
nRegion() ; region_num++ ) {
112 for(
unsigned int station_num = 0 ; station_num <
nStation() ; station_num++) {
113 for(
unsigned int layer_num = 0 ; layer_num < 2 ; layer_num++) {
114 gem_sh_zr[region_num][station_num][layer_num] =
BookHistZR(ibooker,
"gem_sh",
"SimHit",region_num,station_num,layer_num);
115 gem_sh_xy[region_num][station_num][layer_num] =
BookHistXY(ibooker,
"gem_sh",
"SimHit",region_num,station_num,layer_num);
117 int re = ((
unsigned int)region_num)*2-1;
124 std::string hist_label_for_xy =
"SimHit occupancy : region"+suffixtitle+
" ; globalX [cm]; globalY[cm]";
125 std::string hist_label_for_tof =
"SimHit TOF : region"+suffixtitle+
" ; Time of flight [ns] ; entries";
126 std::string hist_label_for_tofMu =
"SimHit TOF(Muon only) : "+suffixtitle+
" ; Time of flight [ns] ; entries";
127 std::string hist_label_for_eloss =
"SimHit energy loss : "+suffixtitle +
" ; Energy loss [eV] ; entries";
128 std::string hist_label_for_elossMu =
"SimHit energy loss(Muon only) : "+suffixtitle+
" ; Energy loss [eV] ; entries";
130 double tof_min, tof_max;
131 if( station_num == 0 ) { tof_min = 18; tof_max = 22; }
132 else { tof_min = 26; tof_max = 30; }
133 gem_sh_tof[region_num][station_num][layer_num] = ibooker.
book1D( hist_name_for_tof.c_str(), hist_label_for_tof.c_str(), 40,tof_min,tof_max);
134 gem_sh_tofMu[region_num][station_num][layer_num] = ibooker.
book1D( hist_name_for_tofMu.c_str(), hist_label_for_tofMu.c_str(), 40,tof_min,tof_max);
135 gem_sh_eloss[region_num][station_num][layer_num] = ibooker.
book1D( hist_name_for_eloss.c_str(), hist_label_for_eloss.c_str(), 60,0.,6000.);
136 gem_sh_elossMu[region_num][station_num][layer_num] = ibooker.
book1D( hist_name_for_elossMu.c_str(), hist_label_for_elossMu.c_str(), 60,0.,6000.);
MonitorElement * gem_sh_tof[2][3][2]
std::unordered_map< UInt_t, MonitorElement * > gem_sh_xy_st_ch
MonitorElement * BookHistZR(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int station_num, unsigned int layer_num=99)
MonitorElement * getSimpleZR(DQMStore::IBooker &, TString, TString)
MonitorElement * BookHistXY(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int station_num, unsigned int layer_num=99)
MonitorElement * gem_sh_eloss[2][3][2]
std::string getSuffixTitle(int region, int station, int layer)
const GEMGeometry * initGeometry(const edm::EventSetup &)
MonitorElement * gem_sh_zr[2][3][2]
std::string getSuffixName(int region, int station, int layer)
void setCurrentFolder(std::string const &fullpath)
std::unordered_map< UInt_t, MonitorElement * > gem_sh_simple_elossMu
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
MonitorElement * book1D(Args &&...args)
std::unordered_map< UInt_t, MonitorElement * > gem_sh_simple_tofMu
std::unordered_map< UInt_t, MonitorElement * > Hit_dcEta
MonitorElement * book2D(Args &&...args)
MonitorElement * gem_sh_tofMu[2][3][2]
std::unordered_map< UInt_t, MonitorElement * > Hit_simple_zr
MonitorElement * getDCEta(DQMStore::IBooker &, const GEMStation *, TString, TString)
MonitorElement * gem_sh_elossMu[2][3][2]
std::string getStationLabel(int i)
MonitorElement * gem_sh_xy[2][3][2]