CMS 3D CMS Logo

MuonGEMRecHitsHarvestor.cc
Go to the documentation of this file.
5 
7  : MuonGEMBaseHarvestor(pset, "MuonGEMRecHitsHarvestor") {
8  region_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("regionIds");
9  station_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("stationIds");
10  layer_ids_ = pset.getUntrackedParameter<std::vector<Int_t> >("layerIds");
11 
12  detail_plot_ = pset.getParameter<Bool_t>("detailPlot");
13 }
14 
16 
18  TString simhit_occ_folder = "GEM/SimHits/";
19  TString occ_folder = "GEM/RecHits/";
20  TString eff_folder = "GEM/RecHits/";
21 
22  for (const auto& region_id : region_ids_) {
23  for (const auto& station_id : station_ids_) {
24  TString name_suf_re_st = GEMUtils::getSuffixName(region_id, station_id);
25  TString title_suf_re_st = GEMUtils::getSuffixTitle(region_id, station_id);
26 
27  if (detail_plot_) {
28  // NOTE Detector Component
29  TString rechit_det_path = occ_folder + "sim_matched_occ_det" + name_suf_re_st;
30  TString simhit_det_path = simhit_occ_folder + "sim_muon_occ_det" + name_suf_re_st;
31 
32  TString eff_det_name = "eff_det" + name_suf_re_st;
33  TString eff_det_title = "Detector Component Efficiency :" + title_suf_re_st;
34 
35  bookEff2D(booker, getter, rechit_det_path, simhit_det_path, eff_folder, eff_det_name, eff_det_title);
36  }
37  for (const auto& layer_id : layer_ids_) {
38  if (station_id != 0 and layer_id > 2)
39  continue;
40  TString name_suf_re_st_ly = GEMUtils::getSuffixName(region_id, station_id, layer_id);
41  TString title_suf_re_st_ly = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
42 
43  // NOTE Eta
44  TString rechit_eta_path = occ_folder + "sim_matched_occ_eta" + name_suf_re_st_ly;
45  TString simhit_eta_path = simhit_occ_folder + "sim_muon_occ_eta" + name_suf_re_st_ly;
46 
47  TString eff_eta_name = "eff_eta" + name_suf_re_st_ly;
48  TString eff_eta_title = "Eta Efficiency :" + title_suf_re_st_ly;
49 
50  bookEff1D(booker, getter, rechit_eta_path, simhit_eta_path, eff_folder, eff_eta_name, eff_eta_title);
51 
52  // NOTE Phi
53  TString rechit_phi_path = occ_folder + "sim_matched_occ_phi" + name_suf_re_st_ly;
54  TString simhit_phi_path = simhit_occ_folder + "sim_muon_occ_phi" + name_suf_re_st_ly;
55 
56  TString eff_phi_name = "eff_phi" + name_suf_re_st_ly;
57  TString eff_phi_title = "Phi Efficiency :" + title_suf_re_st_ly;
58 
59  bookEff1D(booker, getter, rechit_phi_path, simhit_phi_path, eff_folder, eff_phi_name, eff_phi_title);
60  } // layer loop
61  } // station loop
62  } // region loop
63 }
std::vector< Int_t > region_ids_
TString getSuffixName(Int_t region_id)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
TString getSuffixTitle(Int_t region_id)
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")
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_
MuonGEMRecHitsHarvestor(const edm::ParameterSet &)
std::vector< Int_t > station_ids_