CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MuonGEMDigisHarvestor.cc
Go to the documentation of this file.
3 
5  : MuonGEMBaseHarvestor(pset, "MuonGEMDigisHarvestor") {
6  // to make it compatible to both full geometry and slice test
7  region_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("regionIds");
8  station_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("stationIds");
9  layer_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("layerIds");
10 
11  detail_plot_ = pset.getParameter<Bool_t>("detailPlot");
12 }
13 
15 
17  TString simhit_occ_folder = "GEM/SimHits/";
18  TString occ_folder = "GEM/Digis/";
19  TString eff_folder = "GEM/Digis/";
20  TString occ_folder_pad = "GEM/Pad/";
21  TString eff_folder_pad = "GEM/Pad/";
22  TString occ_folder_cluster = "GEM/PadCluster/";
23  TString eff_folder_cluster = "GEM/PadCluster/";
24 
25  for (Int_t region_id : region_ids_) {
26  for (Int_t station_id : station_ids_) {
27  TString name_suffix_re_st = GEMUtils::getSuffixName(region_id, station_id);
28  TString title_suffix_re_st = GEMUtils::getSuffixTitle(region_id, station_id);
29 
30  if (detail_plot_) {
31  // NOTE Detector Component efficiency
32  TString strip_det_name = "sim_matched_occ_det" + name_suffix_re_st;
33  TString pad_det_name = "sim_matched_occ_det" + name_suffix_re_st;
34  TString simhit_det_name = "sim_muon_occ_det" + name_suffix_re_st;
35  TString strip_det_path = occ_folder + strip_det_name;
36  TString pad_det_path = occ_folder_pad + pad_det_name;
37  TString cluster_det_path = occ_folder_cluster + pad_det_name;
38  TString simhit_det_path = simhit_occ_folder + simhit_det_name;
39  TString eff_det_name = "eff_det" + name_suffix_re_st;
40  TString eff_det_title = "Detector Component Efficiency (Muon Only) :" + title_suffix_re_st;
41 
42  bookEff2D(booker, getter, strip_det_path, simhit_det_path, eff_folder, eff_det_name, eff_det_title);
43  bookEff2D(booker, getter, pad_det_path, simhit_det_path, eff_folder_pad, eff_det_name, eff_det_title);
44  bookEff2D(booker, getter, cluster_det_path, simhit_det_path, eff_folder_cluster, eff_det_name, eff_det_title);
45  }
46 
47  for (Int_t layer_id : layer_ids_) {
48  if (station_id != 0 and layer_id > 2)
49  continue;
50  TString name_suffix_re_st_ly = GEMUtils::getSuffixName(region_id, station_id, layer_id);
51  TString title_suffix_re_st_ly = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
52 
53  // NOTE eta efficiency
54  TString strip_eta_name = "sim_matched_occ_eta" + name_suffix_re_st_ly;
55  TString pad_eta_name = "sim_matched_occ_eta" + name_suffix_re_st_ly;
56  TString simhit_eta_name = "sim_muon_occ_eta" + name_suffix_re_st_ly;
57  TString strip_eta_path = occ_folder + strip_eta_name;
58  TString pad_eta_path = occ_folder_pad + pad_eta_name;
59  TString cluster_eta_path = occ_folder_cluster + pad_eta_name;
60  TString simhit_eta_path = simhit_occ_folder + simhit_eta_name;
61  TString eff_eta_name = "eff_eta" + name_suffix_re_st_ly;
62  TString eff_eta_title = "Eta Efficiency (Muon Only) :" + title_suffix_re_st_ly;
63 
64  if (detail_plot_)
65  bookEff1D(booker, getter, strip_eta_path, simhit_eta_path, eff_folder, eff_eta_name, eff_eta_title);
66  bookEff1D(booker, getter, pad_eta_path, simhit_eta_path, eff_folder_pad, eff_eta_name, eff_eta_title);
67  bookEff1D(booker, getter, cluster_eta_path, simhit_eta_path, eff_folder_cluster, eff_eta_name, eff_eta_title);
68 
69  // NOTE phi efficiency
70  TString strip_phi_name = "sim_matched_occ_phi" + name_suffix_re_st_ly;
71  TString pad_phi_name = "sim_matched_occ_phi" + name_suffix_re_st_ly;
72  TString simhit_phi_name = "sim_muon_occ_phi" + name_suffix_re_st_ly;
73  TString strip_phi_path = occ_folder + strip_phi_name;
74  TString pad_phi_path = occ_folder_pad + pad_phi_name;
75  TString cluster_phi_path = occ_folder_cluster + pad_phi_name;
76  TString simhit_phi_path = simhit_occ_folder + simhit_phi_name;
77  TString eff_phi_name = "eff_phi" + name_suffix_re_st_ly;
78  TString eff_phi_title = "Phi Efficiency (Muon Only) :" + title_suffix_re_st_ly;
79 
80  if (detail_plot_)
81  bookEff1D(booker, getter, strip_phi_path, simhit_phi_path, eff_folder, eff_phi_name, eff_phi_title);
82  bookEff1D(booker, getter, pad_phi_path, simhit_phi_path, eff_folder_pad, eff_phi_name, eff_phi_title);
83  bookEff1D(booker, getter, cluster_phi_path, simhit_phi_path, eff_folder_cluster, eff_phi_name, eff_phi_title);
84  } // layer loop
85  } // statino loop
86  } // region loop
87 }
T getUntrackedParameter(std::string const &, T const &) const
TString getSuffixName(Int_t region_id)
TString getSuffixTitle(Int_t region_id)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
void bookEff2D(DQMStore::IBooker &ibooker, DQMStore::IGetter &getter, const TString &passed_path, const TString &total_path, const TString &folder, const TString &eff_name, const TString &eff_title="Efficiency")
std::vector< Int_t > region_ids_
void bookEff1D(DQMStore::IBooker &ibooker, DQMStore::IGetter &getter, const TString &passed_path, const TString &total_path, const TString &folder, const TString &eff_name, const TString &eff_title="Efficiency")
std::vector< Int_t > layer_ids_
MuonGEMDigisHarvestor(const edm::ParameterSet &)
constructor
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
~MuonGEMDigisHarvestor() override
destructor
std::vector< Int_t > station_ids_