CMS 3D CMS Logo

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 = "MuonGEMHitsV/GEMHitsTask/Occupancy/";
18  TString occ_folder = "MuonGEMDigisV/GEMDigisTask/Strip/Occupancy/";
19  TString eff_folder = "MuonGEMDigisV/GEMDigisTask/Strip/Efficiency/";
20  TString occ_folder_pad = "MuonGEMDigisV/GEMDigisTask/Pad/Occupancy/";
21  TString eff_folder_pad = "MuonGEMDigisV/GEMDigisTask/Pad/Efficiency/";
22  TString occ_folder_cluster = "MuonGEMDigisV/GEMDigisTask/PadCluster/Occupancy/";
23  TString eff_folder_cluster = "MuonGEMDigisV/GEMDigisTask/PadCluster/Efficiency/";
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 = "matched_strip_occ_det" + name_suffix_re_st;
33  TString pad_det_name = "matched_pad_occ_det" + name_suffix_re_st;
34  TString simhit_det_name = "muon_simhit_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 = "matched_strip_occ_eta" + name_suffix_re_st_ly;
55  TString pad_eta_name = "matched_pad_occ_eta" + name_suffix_re_st_ly;
56  TString simhit_eta_name = "muon_simhit_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 = "matched_strip_occ_phi" + name_suffix_re_st_ly;
71  TString pad_phi_name = "matched_pad_occ_phi" + name_suffix_re_st_ly;
72  TString simhit_phi_name = "muon_simhit_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 }
MuonGEMDigisHarvestor::station_ids_
std::vector< Int_t > station_ids_
Definition: MuonGEMDigisHarvestor.h:16
MessageLogger.h
MuonGEMDigisHarvestor::MuonGEMDigisHarvestor
MuonGEMDigisHarvestor(const edm::ParameterSet &)
constructor
Definition: MuonGEMDigisHarvestor.cc:4
MuonGEMDigisHarvestor::region_ids_
std::vector< Int_t > region_ids_
Definition: MuonGEMDigisHarvestor.h:16
MuonGEMDigisHarvestor::layer_ids_
std::vector< Int_t > layer_ids_
Definition: MuonGEMDigisHarvestor.h:16
GEMUtils::getSuffixName
TString getSuffixName(Int_t region_id)
Definition: GEMValidationUtils.cc:5
MuonGEMDigisHarvestor::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition: MuonGEMDigisHarvestor.cc:16
MuonGEMDigisHarvestor.h
edm::ParameterSet
Definition: ParameterSet.h:47
MuonGEMBaseHarvestor::bookEff2D
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")
Definition: MuonGEMBaseHarvestor.cc:100
MuonGEMDigisHarvestor::~MuonGEMDigisHarvestor
~MuonGEMDigisHarvestor() override
destructor
Definition: MuonGEMDigisHarvestor.cc:14
MuonGEMBaseHarvestor
Definition: MuonGEMBaseHarvestor.h:14
MuonGEMBaseHarvestor::bookEff1D
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")
Definition: MuonGEMBaseHarvestor.cc:75
dqm::implementation::IGetter
Definition: DQMStore.h:484
GEMUtils::getSuffixTitle
TString getSuffixTitle(Int_t region_id)
Definition: GEMValidationUtils.cc:34
MuonGEMDigisHarvestor::detail_plot_
Bool_t detail_plot_
Definition: MuonGEMDigisHarvestor.h:17
dqm::implementation::IBooker
Definition: DQMStore.h:43
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27