CMS 3D CMS Logo

TrackerPhase2DQMUtil.cc
Go to the documentation of this file.
2 std::string phase2tkutil::getITHistoId(uint32_t det_id, const TrackerTopology* tTopo) {
3  std::string Disc;
4  std::ostringstream fname1;
5  int layer = tTopo->getITPixelLayerNumber(det_id);
6 
7  if (layer < 0)
8  return "";
9  if (layer < 100) {
10  fname1 << "Barrel/";
11  fname1 << "Layer" << layer;
12  fname1 << "";
13  } else {
14  int side = tTopo->pxfSide(det_id);
15  fname1 << "EndCap_Side" << side << "/";
16  int disc = tTopo->pxfDisk(det_id);
17  Disc = (disc < 9) ? "FPix" : "EPix";
18  fname1 << Disc << "/";
19  int ring = tTopo->pxfBlade(det_id);
20  fname1 << "Ring" << ring;
21  }
22  return fname1.str();
23 }
24 
25 std::string phase2tkutil::getOTHistoId(uint32_t det_id, const TrackerTopology* tTopo) {
26  std::string Disc;
27  std::ostringstream fname1;
28  int layer = tTopo->getOTLayerNumber(det_id);
29 
30  if (layer < 0)
31  return "";
32  if (layer < 100) {
33  fname1 << "Barrel/";
34  fname1 << "Layer" << layer;
35  fname1 << "";
36  } else {
37  int side = tTopo->tidSide(det_id);
38  fname1 << "EndCap_Side" << side << "/";
39  int disc = tTopo->tidWheel(det_id);
40  Disc = (disc < 3) ? "TEDD_1" : "TEDD_2";
41  fname1 << Disc << "/";
42  int ring = tTopo->tidRing(det_id);
43  fname1 << "Ring" << ring;
44  }
45  return fname1.str();
46 }
47 
51  MonitorElement* temp = nullptr;
52  if (hpars.getParameter<bool>("switch")) {
53  temp = ibooker.book1D(hpars.getParameter<std::string>("name"),
54  hpars.getParameter<std::string>("title"),
55  hpars.getParameter<int32_t>("NxBins"),
56  hpars.getParameter<double>("xmin"),
57  hpars.getParameter<double>("xmax"));
58  }
59  return temp;
60 }
61 
63  MonitorElement* temp = nullptr;
64  if (hpars.getParameter<bool>("switch")) {
65  temp = ibooker.book2D(hpars.getParameter<std::string>("name"),
66  hpars.getParameter<std::string>("title"),
67  hpars.getParameter<int32_t>("NxBins"),
68  hpars.getParameter<double>("xmin"),
69  hpars.getParameter<double>("xmax"),
70  hpars.getParameter<int32_t>("NyBins"),
71  hpars.getParameter<double>("ymin"),
72  hpars.getParameter<double>("ymax"));
73  }
74  return temp;
75 }
76 
78  MonitorElement* temp = nullptr;
79  if (hpars.getParameter<bool>("switch")) {
80  temp = ibooker.bookProfile(hpars.getParameter<std::string>("name"),
81  hpars.getParameter<std::string>("title"),
82  hpars.getParameter<int32_t>("NxBins"),
83  hpars.getParameter<double>("xmin"),
84  hpars.getParameter<double>("xmax"),
85  hpars.getParameter<double>("ymin"),
86  hpars.getParameter<double>("ymax"));
87  }
88  return temp;
89 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MonitorElement * book2DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
dqm::reco::DQMStore DQMStore
unsigned int pxfBlade(const DetId &id) const
unsigned int tidSide(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
dqm::reco::MonitorElement MonitorElement
MonitorElement * bookProfile1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
int getITPixelLayerNumber(const DetId &id) const
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)
int getOTLayerNumber(const DetId &id) const
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
unsigned int pxfDisk(const DetId &id) const
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
unsigned int pxfSide(const DetId &id) const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
unsigned int tidRing(const DetId &id) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98