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 }
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
phase2tkutil::book1DFromPSet
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
Definition: TrackerPhase2DQMUtil.cc:50
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
TrackerTopology::getITPixelLayerNumber
int getITPixelLayerNumber(const DetId &id) const
Definition: TrackerTopology.cc:436
TrackerTopology::getOTLayerNumber
int getOTLayerNumber(const DetId &id) const
Definition: TrackerTopology.cc:421
TrackerTopology
Definition: TrackerTopology.h:16
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
TtSemiLepEvtBuilder_cfi.disc
disc
Definition: TtSemiLepEvtBuilder_cfi.py:60
TrackerTopology::tidRing
unsigned int tidRing(const DetId &id) const
Definition: TrackerTopology.h:218
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
dqm::legacy::DQMStore
Definition: DQMStore.h:727
TrackerPhase2DQMUtil.h
dqm::implementation::IBooker::bookProfile
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:322
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
phase2tkutil::book2DFromPSet
MonitorElement * book2DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
Definition: TrackerPhase2DQMUtil.cc:62
edm::ParameterSet
Definition: ParameterSet.h:47
TrackerTopology::tidSide
unsigned int tidSide(const DetId &id) const
Definition: TrackerTopology.h:190
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
DQMStore
dqm::reco::DQMStore DQMStore
Definition: TrackerPhase2DQMUtil.cc:49
phase2tkutil::getITHistoId
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
Definition: TrackerPhase2DQMUtil.cc:2
phase2tkutil::bookProfile1DFromPSet
MonitorElement * bookProfile1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
Definition: TrackerPhase2DQMUtil.cc:77
dqm::implementation::IBooker::book2D
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:177
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
TrackerTopology::pxfBlade
unsigned int pxfBlade(const DetId &id) const
Definition: TrackerTopology.h:447
MonitorElement
dqm::reco::MonitorElement MonitorElement
Definition: TrackerPhase2DQMUtil.cc:48
phase2tkutil::getOTHistoId
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)
Definition: TrackerPhase2DQMUtil.cc:25
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98