CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Static Public Member Functions
RPCRollMapHisto Struct Reference

#include <RPCRollMapHisto.h>

Public Types

typedef
dqm::reco::DQMStore::IBooker 
IBooker
 
typedef dqm::reco::MonitorElement MonitorElement
 

Static Public Member Functions

static MonitorElementbookBarrel (IBooker &booker, const int wheel, const std::string &prefix, const std::string &title, const bool useRollInfo)
 
static MonitorElementbookEndcap (IBooker &booker, const int disk, const std::string &prefix, const std::string &title, const bool useRollInfo)
 
static void setBarrelRollAxis (MonitorElement *me, const int wheel, const int axis, const bool useRollInfo)
 
static void setEndcapRollAxis (MonitorElement *me, const int disk, const int axis, const bool useRollInfo)
 

Detailed Description

Definition at line 7 of file RPCRollMapHisto.h.

Member Typedef Documentation

Definition at line 11 of file RPCRollMapHisto.h.

Definition at line 8 of file RPCRollMapHisto.h.

Member Function Documentation

MonitorElement * RPCRollMapHisto::bookBarrel ( IBooker booker,
const int  wheel,
const std::string &  prefix,
const std::string &  title,
const bool  useRollInfo 
)
static

Definition at line 8 of file RPCRollMapHisto.cc.

References dqm::implementation::IBooker::book2D(), diffTreeTool::format(), dqm::impl::MonitorElement::getTH1(), h, mps_fire::i, hlt_dqm_clientPB-live_cfg::me, setBarrelRollAxis(), and dqm::impl::MonitorElement::setBinLabel().

Referenced by RPCMonitorDigi::bookWheelDiskME(), RPCNoisyStripTest::myBooker(), RPCDeadChannelTest::myBooker(), RPCMultiplicityTest::myBooker(), RPCOccupancyTest::myBooker(), RPCClusterSizeTest::myBooker(), and RPCChamberQuality::myBooker().

9  {
10  MonitorElement* me = booker.book2D(name, title, 12, 0.5, 12.5, 21, 0.5, 21.5);
11 
12  TH2* h = dynamic_cast<TH2*>(me->getTH1());
13  h->GetXaxis()->SetNoAlphanumeric(true);
14  // Set x-axis labels
15  for (int i = 1; i <= 12; ++i) {
16  me->setBinLabel(i, fmt::format("Sec{}", i), 1);
17  }
18 
19  // Set y-axis labels
20  RPCRollMapHisto::setBarrelRollAxis(me, wheel, 2, useRollInfo);
21 
22  return me;
23 }
static void setBarrelRollAxis(MonitorElement *me, const int wheel, const int axis, const bool useRollInfo)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
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
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
virtual TH1 * getTH1() const
MonitorElement * RPCRollMapHisto::bookEndcap ( IBooker booker,
const int  disk,
const std::string &  prefix,
const std::string &  title,
const bool  useRollInfo 
)
static

Definition at line 81 of file RPCRollMapHisto.cc.

References dqm::implementation::IBooker::book2D(), diffTreeTool::format(), dqm::impl::MonitorElement::getTH1(), h, mps_fire::i, hlt_dqm_clientPB-live_cfg::me, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), and setEndcapRollAxis().

Referenced by RPCMonitorDigi::bookWheelDiskME(), RPCNoisyStripTest::myBooker(), RPCMultiplicityTest::myBooker(), RPCOccupancyTest::myBooker(), RPCClusterSizeTest::myBooker(), and RPCChamberQuality::myBooker().

82  {
83  MonitorElement* me = booker.book2D(name, title, 36, 0.5, 36.5, 6, 0.5, 6.5);
84  TH2* h = dynamic_cast<TH2*>(me->getTH1());
85  h->GetXaxis()->SetNoAlphanumeric(true);
86  h->GetYaxis()->SetNoAlphanumeric(true);
87 
88  // Set x-axis labels
89  for (int i = 1; i <= 36; ++i) {
90  me->setBinLabel(i, fmt::format("{}", i), 1);
91  }
92  me->setAxisTitle("Segments", 1);
93 
94  RPCRollMapHisto::setEndcapRollAxis(me, disk, 2, useRollInfo);
95 
96  return me;
97 }
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
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
static void setEndcapRollAxis(MonitorElement *me, const int disk, const int axis, const bool useRollInfo)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
virtual TH1 * getTH1() const
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void RPCRollMapHisto::setBarrelRollAxis ( MonitorElement me,
const int  wheel,
const int  axis,
const bool  useRollInfo 
)
static

Definition at line 25 of file RPCRollMapHisto.cc.

References funct::abs(), dqm::impl::MonitorElement::getNbinsY(), dqm::impl::MonitorElement::getTH1(), h, mps_fire::i, label, SiStripPI::min, dqmiodumpmetadata::n, dqm::impl::MonitorElement::setBinLabel(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by bookBarrel(), and RPCMonitorDigi::bookSectorRingME().

25  {
26  TH1* h = dynamic_cast<TH1*>(me->getTH1());
27  if (axis == 1)
28  h->GetXaxis()->SetNoAlphanumeric(true);
29  else if (axis == 2)
30  h->GetYaxis()->SetNoAlphanumeric(true);
31 
32  const std::array<const std::string, 21> labelsRoll = {
33  {"RB1in_B", "RB1in_F", "RB1out_B", "RB1out_F", "RB2in_B", "RB2in_F", "RB2in_M",
34  "RB2out_B", "RB2out_F", "RB3-_B", "RB3-_F", "RB3+_B", "RB3+_F", "RB4,-_B",
35  "RB4,-_F", "RB4+_B", "RB4+_F", "RB4--_B", "RB4--_F", "RB4++_B", "RB4++_F"}};
36  const std::array<const std::string, 21> labelsCh = {{"RB1in", "", "RB1out", "", "RB2in", "", "",
37  "RB2out", "", "RB3-", "", "RB3+", "", "RB4,-",
38  "", "RB4+", "", "RB4--", "", "RB4++", ""}};
39 
40  for (int i = 0, n = std::min(21, me->getNbinsY()); i < n; ++i) {
41  const std::string label = useRollInfo ? labelsRoll[i] : labelsCh[i];
42  me->setBinLabel(i + 1, label, 2);
43  }
44  if (useRollInfo and std::abs(wheel) == 2) {
45  // We have RB2out_M for the wheel +-2, otherwise, RB2in_M as in the default array
46  me->setBinLabel(7, "RB2out_M", 2);
47  }
48 }
virtual int getNbinsY() const
get # of bins in Y-axis
char const * label
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
virtual TH1 * getTH1() const
void RPCRollMapHisto::setEndcapRollAxis ( MonitorElement me,
const int  disk,
const int  axis,
const bool  useRollInfo 
)
static

Definition at line 50 of file RPCRollMapHisto.cc.

References dqm::impl::MonitorElement::getTH1(), h, mps_fire::i, label, dqm::impl::MonitorElement::setBinLabel(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by bookEndcap().

50  {
51  TH1* h = dynamic_cast<TH1*>(me->getTH1());
52  if (axis == 1)
53  h->GetXaxis()->SetNoAlphanumeric(true);
54  else if (axis == 2)
55  h->GetYaxis()->SetNoAlphanumeric(true);
56 
57  // NOTE: Let us keep only Ring2 and Ring3 for the Run3
58  // There will be Ring1, RE3/1 and RE4/1 only from the phase-2
59  const std::array<const std::string, 6> labelsRoll = {{//"C", "Ring1 B", "A",
60  "C",
61  "Ring2 B",
62  "A",
63  "C",
64  "Ring3 B",
65  "A"}};
66  const std::array<const std::string, 6> labelsCh = {{//"", "Ring1", "",
67  "",
68  "Ring2",
69  "",
70  "",
71  "Ring3",
72  ""}};
73 
74  //const int offset = std::abs(disk) >= 3 ? 0 : 3;
75  for (int i = 0; i < 6; ++i) {
76  const std::string label = useRollInfo ? labelsRoll[i] : labelsCh[i];
77  me->setBinLabel(i + 1, label, 2);
78  }
79 }
char const * label
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
virtual TH1 * getTH1() const