CMS 3D CMS Logo

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

◆ IBooker

Definition at line 11 of file RPCRollMapHisto.h.

◆ MonitorElement

Definition at line 8 of file RPCRollMapHisto.h.

Member Function Documentation

◆ bookBarrel()

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.

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
21 
22  return me;
23 }

References dqm::implementation::IBooker::book2D(), dqm-mbProfile::format, mps_fire::i, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, setBarrelRollAxis(), runGCPTkAlMap::title, and makeMuonMisalignmentScenario::wheel.

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

◆ bookEndcap()

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.

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 }

References dqm::implementation::IBooker::book2D(), dqm-mbProfile::format, mps_fire::i, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, setEndcapRollAxis(), and runGCPTkAlMap::title.

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

◆ setBarrelRollAxis()

void RPCRollMapHisto::setBarrelRollAxis ( MonitorElement me,
const int  wheel,
const int  axis,
const bool  useRollInfo 
)
static

Definition at line 25 of file RPCRollMapHisto.cc.

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 }

References funct::abs(), mps_fire::i, label, hlt_dqm_clientPB-live_cfg::me, min(), dqmiodumpmetadata::n, AlCaHLTBitMon_QueryRunRegistry::string, and makeMuonMisalignmentScenario::wheel.

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

◆ setEndcapRollAxis()

void RPCRollMapHisto::setEndcapRollAxis ( MonitorElement me,
const int  disk,
const int  axis,
const bool  useRollInfo 
)
static

Definition at line 50 of file RPCRollMapHisto.cc.

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 }

References mps_fire::i, label, hlt_dqm_clientPB-live_cfg::me, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by bookEndcap().

RPCRollMapHisto::setEndcapRollAxis
static void setEndcapRollAxis(MonitorElement *me, const int disk, const int axis, const bool useRollInfo)
Definition: RPCRollMapHisto.cc:50
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
min
T min(T a, T b)
Definition: MathUtil.h:58
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
dqm-mbProfile.format
format
Definition: dqm-mbProfile.py:16
h
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
RPCRollMapHisto::setBarrelRollAxis
static void setBarrelRollAxis(MonitorElement *me, const int wheel, const int axis, const bool useRollInfo)
Definition: RPCRollMapHisto.cc:25
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
label
const char * label
Definition: PFTauDecayModeTools.cc:11