CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
RPCNoisyStripTest Class Reference

#include <RPCNoisyStripTest.h>

Inheritance diagram for RPCNoisyStripTest:
RPCClient

Public Member Functions

void beginJob (std::string &) override
 
void clientOperation () override
 
void getMonitorElements (std::vector< MonitorElement * > &, std::vector< RPCDetId > &, std::string &) override
 
void myBooker (DQMStore::IBooker &) override
 
 RPCNoisyStripTest (const edm::ParameterSet &ps)
 
 ~RPCNoisyStripTest () override
 
- Public Member Functions inherited from RPCClient
virtual ~RPCClient (void)
 

Protected Member Functions

void fillGlobalME (RPCDetId &, MonitorElement *)
 

Private Attributes

MonitorElementDEVDDisk [10]
 
MonitorElementDEVDWheel [5]
 
std::string globalFolder_
 
std::vector< RPCDetIdmyDetIds_
 
std::vector< MonitorElement * > myOccupancyMe_
 
MonitorElementNOISEDDisk [10]
 
MonitorElementNOISEDisk [10]
 
MonitorElementNOISEDWheel [5]
 
MonitorElementNOISEWheel [5]
 
int numberOfDisks_
 
int numberOfRings_
 
int prescaleFactor_
 
bool testMode_
 
bool useRollInfo_
 

Additional Inherited Members

- Public Types inherited from RPCClient
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 

Detailed Description

Definition at line 8 of file RPCNoisyStripTest.h.

Constructor & Destructor Documentation

◆ RPCNoisyStripTest()

RPCNoisyStripTest::RPCNoisyStripTest ( const edm::ParameterSet ps)

Definition at line 14 of file RPCNoisyStripTest.cc.

14  {
15  edm::LogVerbatim("rpcnoisetest") << "[RPCNoisyStripTest]: Constructor";
16 
17  prescaleFactor_ = ps.getUntrackedParameter<int>("DiagnosticPrescale", 1);
18  numberOfDisks_ = ps.getUntrackedParameter<int>("NumberOfEndcapDisks", 4);
19  numberOfRings_ = ps.getUntrackedParameter<int>("NumberOfEndcapRings", 2);
20  useRollInfo_ = ps.getUntrackedParameter<bool>("UseRollInfo", false);
21  testMode_ = ps.getUntrackedParameter<bool>("testMode", false);
22 }

References edm::ParameterSet::getUntrackedParameter(), numberOfDisks_, numberOfRings_, prescaleFactor_, testMode_, and useRollInfo_.

◆ ~RPCNoisyStripTest()

RPCNoisyStripTest::~RPCNoisyStripTest ( )
override

Definition at line 24 of file RPCNoisyStripTest.cc.

24 {}

Member Function Documentation

◆ beginJob()

void RPCNoisyStripTest::beginJob ( std::string &  workingFolder)
overridevirtual

Implements RPCClient.

Definition at line 26 of file RPCNoisyStripTest.cc.

26  {
27  edm::LogVerbatim("rpcnoisetest") << "[RPCNoisyStripTest]: Begin job ";
28  globalFolder_ = workingFolder;
29 }

References globalFolder_.

◆ clientOperation()

void RPCNoisyStripTest::clientOperation ( )
overridevirtual

Implements RPCClient.

Definition at line 31 of file RPCNoisyStripTest.cc.

31  {
32  edm::LogVerbatim("rpcnoisetest") << "[RPCNoisyStripTest]: Client Operation";
33 
34  //Loop on MEs
35  for (unsigned int i = 0; i < myOccupancyMe_.size(); i++) {
37  } //End loop on MEs
38 }

References fillGlobalME(), mps_fire::i, myDetIds_, and myOccupancyMe_.

◆ fillGlobalME()

void RPCNoisyStripTest::fillGlobalME ( RPCDetId detId,
MonitorElement myMe 
)
protected

Definition at line 114 of file RPCNoisyStripTest.cc.

114  {
115  std::stringstream meName;
116 
117  MonitorElement* NOISE = nullptr;
118  MonitorElement* DEVD = nullptr;
119  MonitorElement* NOISED = nullptr;
120 
121  if (detId.region() == 0) { //BARREL
122  NOISE = NOISEWheel[detId.ring() + 2];
123  if (testMode_) {
124  DEVD = DEVDWheel[detId.ring() + 2];
125  NOISED = NOISEDWheel[detId.ring() + 2];
126  }
127  } else if (detId.region() < 0 && (-detId.station() + numberOfDisks_) >= 0) { //ENDCAP-
128  NOISE = NOISEDisk[-detId.station() + numberOfDisks_];
129  if (testMode_) {
130  DEVD = DEVDDisk[-detId.station() + numberOfDisks_];
131  NOISED = NOISEDDisk[-detId.station() + numberOfDisks_];
132  }
133  } else if ((-detId.station() + numberOfDisks_) >= 0) { //ENDCAP +
134  NOISE = NOISEDisk[detId.station() + numberOfDisks_ - 1];
135  if (testMode_) {
136  DEVD = DEVDDisk[detId.station() + numberOfDisks_ - 1];
137  NOISED = NOISEDDisk[detId.station() + numberOfDisks_ - 1];
138  }
139  }
140 
141  int entries = (int)myMe->getEntries();
142  int bins = (int)myMe->getNbinsX();
143 
144  std::vector<float> myvector;
145 
146  // count alive strips and alive strip values put in the vector
147  for (int xbin = 1; xbin <= bins; xbin++) {
148  float binContent = myMe->getBinContent(xbin);
149  if (binContent > 0)
150  myvector.push_back(binContent);
151  }
152 
153  int noisyStrips = 0;
154  // calculate mean on YAxis and check diff between bins and mean
155  if (!myvector.empty()) {
156  float ymean = entries / myvector.size(); //mean on Yaxis
157  for (unsigned int i = 0; i < myvector.size(); i++) {
158  float deviation = myvector[i] / ymean;
159  if (deviation > 3.5)
160  noisyStrips++;
161  if (deviation > 5)
162  deviation = 5; //overflow
163  if (DEVD)
164  DEVD->Fill(deviation);
165  }
166 
167  int xBin, yBin;
168  if (detId.region() == 0) { //Barrel
169  xBin = detId.sector();
170  rpcdqm::utils rollNumber;
171  yBin = rollNumber.detId2RollNr(detId);
172  } else { //Endcap
173  //get segment number
174  RPCGeomServ RPCServ(detId);
175  xBin = RPCServ.segment();
176  (numberOfRings_ == 3 ? yBin = detId.ring() * 3 - detId.roll() + 1
177  : yBin = (detId.ring() - 1) * 3 - detId.roll() + 1);
178  }
179 
180  if (NOISE)
181  NOISE->setBinContent(xBin, yBin, noisyStrips);
182  if (NOISED)
183  NOISED->Fill(noisyStrips);
184  }
185 }

References trigObjTnPSource_cfi::bins, rpcdqm::utils::detId2RollNr(), DEVDDisk, DEVDWheel, dqm::impl::MonitorElement::Fill(), dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getEntries(), dqm::impl::MonitorElement::getNbinsX(), mps_fire::i, createfilelist::int, sistrip::NOISE, NOISEDDisk, NOISEDisk, NOISEDWheel, NOISEWheel, numberOfDisks_, numberOfRings_, RPCDetId::region(), RPCDetId::ring(), RPCDetId::roll(), RPCDetId::sector(), RPCGeomServ::segment(), RPCDetId::station(), testMode_, photonAnalyzer_cfi::xBin, and photonAnalyzer_cfi::yBin.

Referenced by clientOperation().

◆ getMonitorElements()

void RPCNoisyStripTest::getMonitorElements ( std::vector< MonitorElement * > &  meVector,
std::vector< RPCDetId > &  detIdVector,
std::string &  clientHistoName 
)
overridevirtual

Implements RPCClient.

Definition at line 100 of file RPCNoisyStripTest.cc.

102  {
103  //Get NumberOfDigi ME for each roll
104  for (unsigned int i = 0; i < meVector.size(); i++) {
105  std::string meName = meVector[i]->getName();
106 
107  if (meName.find(clientHistoName) != std::string::npos) {
108  myOccupancyMe_.push_back(meVector[i]);
109  myDetIds_.push_back(detIdVector[i]);
110  }
111  }
112 }

References mps_fire::i, myDetIds_, myOccupancyMe_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ myBooker()

void RPCNoisyStripTest::myBooker ( DQMStore::IBooker ibooker)
overridevirtual

Implements RPCClient.

Definition at line 40 of file RPCNoisyStripTest.cc.

40  {
41  ibooker.setCurrentFolder(globalFolder_);
42 
43  std::stringstream histoName;
44 
45  rpcdqm::utils rpcUtils;
46 
47  for (int w = -2; w <= 2; w++) { //loop on wheels and disks
48 
49  if (testMode_) {
50  histoName.str("");
51  histoName << "RPCNoisyStrips_Distribution_Wheel" << w;
52  NOISEDWheel[w + 2] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 6, -0.5, 5.5);
53 
54  histoName.str("");
55  histoName << "RPCStripsDeviation_Distribution_Wheel" << w;
56  DEVDWheel[w + 2] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 101, -0.01, 10.01);
57  }
58 
59  histoName.str("");
60  histoName << "RPCNoisyStrips_Roll_vs_Sector_Wheel" << w;
61  NOISEWheel[w + 2] = ibooker.book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5);
62  rpcUtils.labelXAxisSector(NOISEWheel[w + 2]);
63  rpcUtils.labelYAxisRoll(NOISEWheel[w + 2], 0, w, useRollInfo_);
64  }
65 
66  for (int d = -numberOfDisks_; d <= numberOfDisks_; d++) { //ENDCAP
67 
68  if (d == 0)
69  continue;
70 
71  int offset = numberOfDisks_;
72  if (d > 0)
73  offset--;
74 
75  if (testMode_) {
76  histoName.str("");
77  histoName << "RPCNoisyStrips_Distribution_Disk" << d;
78  NOISEDDisk[d + offset] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 6, -0.5, 5.5);
79 
80  histoName.str("");
81  histoName << "RPCStripsDeviation_Distribution_Disk" << d;
82  DEVDDisk[d + offset] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 101, -0.01, 10.01);
83  }
84 
85  histoName.str("");
86  histoName << "RPCNoisyStrips_Ring_vs_Segment_Disk" << d;
87  NOISEDisk[d + offset] = ibooker.book2D(histoName.str().c_str(),
88  histoName.str().c_str(),
89  36,
90  0.5,
91  36.5,
92  3 * numberOfRings_,
93  0.5,
94  3 * numberOfRings_ + 0.5);
95  rpcUtils.labelXAxisSegment(NOISEDisk[d + offset]);
97  }
98 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), ztail::d, DEVDDisk, DEVDWheel, globalFolder_, HltBtagPostValidation_cff::histoName, rpcdqm::utils::labelXAxisSector(), rpcdqm::utils::labelXAxisSegment(), rpcdqm::utils::labelYAxisRing(), rpcdqm::utils::labelYAxisRoll(), NOISEDDisk, NOISEDisk, NOISEDWheel, NOISEWheel, numberOfDisks_, numberOfRings_, hltrates_dqm_sourceclient-live_cfg::offset, dqm::implementation::NavigatorBase::setCurrentFolder(), testMode_, useRollInfo_, and w.

Member Data Documentation

◆ DEVDDisk

MonitorElement* RPCNoisyStripTest::DEVDDisk[10]
private

Definition at line 35 of file RPCNoisyStripTest.h.

Referenced by fillGlobalME(), and myBooker().

◆ DEVDWheel

MonitorElement* RPCNoisyStripTest::DEVDWheel[5]
private

Definition at line 31 of file RPCNoisyStripTest.h.

Referenced by fillGlobalME(), and myBooker().

◆ globalFolder_

std::string RPCNoisyStripTest::globalFolder_
private

Definition at line 21 of file RPCNoisyStripTest.h.

Referenced by beginJob(), and myBooker().

◆ myDetIds_

std::vector<RPCDetId> RPCNoisyStripTest::myDetIds_
private

Definition at line 27 of file RPCNoisyStripTest.h.

Referenced by clientOperation(), and getMonitorElements().

◆ myOccupancyMe_

std::vector<MonitorElement *> RPCNoisyStripTest::myOccupancyMe_
private

Definition at line 26 of file RPCNoisyStripTest.h.

Referenced by clientOperation(), and getMonitorElements().

◆ NOISEDDisk

MonitorElement* RPCNoisyStripTest::NOISEDDisk[10]
private

Definition at line 34 of file RPCNoisyStripTest.h.

Referenced by fillGlobalME(), and myBooker().

◆ NOISEDisk

MonitorElement* RPCNoisyStripTest::NOISEDisk[10]
private

Definition at line 33 of file RPCNoisyStripTest.h.

Referenced by fillGlobalME(), and myBooker().

◆ NOISEDWheel

MonitorElement* RPCNoisyStripTest::NOISEDWheel[5]
private

Definition at line 30 of file RPCNoisyStripTest.h.

Referenced by fillGlobalME(), and myBooker().

◆ NOISEWheel

MonitorElement* RPCNoisyStripTest::NOISEWheel[5]
private

Definition at line 29 of file RPCNoisyStripTest.h.

Referenced by fillGlobalME(), and myBooker().

◆ numberOfDisks_

int RPCNoisyStripTest::numberOfDisks_
private

Definition at line 36 of file RPCNoisyStripTest.h.

Referenced by fillGlobalME(), myBooker(), and RPCNoisyStripTest().

◆ numberOfRings_

int RPCNoisyStripTest::numberOfRings_
private

Definition at line 22 of file RPCNoisyStripTest.h.

Referenced by fillGlobalME(), myBooker(), and RPCNoisyStripTest().

◆ prescaleFactor_

int RPCNoisyStripTest::prescaleFactor_
private

Definition at line 23 of file RPCNoisyStripTest.h.

Referenced by RPCNoisyStripTest().

◆ testMode_

bool RPCNoisyStripTest::testMode_
private

Definition at line 24 of file RPCNoisyStripTest.h.

Referenced by fillGlobalME(), myBooker(), and RPCNoisyStripTest().

◆ useRollInfo_

bool RPCNoisyStripTest::useRollInfo_
private

Definition at line 28 of file RPCNoisyStripTest.h.

Referenced by myBooker(), and RPCNoisyStripTest().

rpcdqm::utils::labelXAxisSegment
void labelXAxisSegment(MonitorElement *myMe)
Definition: utils.h:247
RPCNoisyStripTest::DEVDDisk
MonitorElement * DEVDDisk[10]
Definition: RPCNoisyStripTest.h:35
mps_fire.i
i
Definition: mps_fire.py:355
RPCGeomServ
Definition: RPCGeomServ.h:8
RPCDetId::station
int station() const
Definition: RPCDetId.h:78
RPCDetId::region
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:53
photonAnalyzer_cfi.xBin
xBin
Definition: photonAnalyzer_cfi.py:81
RPCNoisyStripTest::testMode_
bool testMode_
Definition: RPCNoisyStripTest.h:24
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
rpcdqm::utils::labelYAxisRoll
void labelYAxisRoll(MonitorElement *myMe, int region, int ring, bool useRollInfo)
Definition: utils.h:265
photonAnalyzer_cfi.yBin
yBin
Definition: photonAnalyzer_cfi.py:85
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
RPCNoisyStripTest::NOISEDDisk
MonitorElement * NOISEDDisk[10]
Definition: RPCNoisyStripTest.h:34
rpcdqm::utils
Definition: utils.h:29
w
const double w
Definition: UKUtility.cc:23
RPCNoisyStripTest::NOISEDWheel
MonitorElement * NOISEDWheel[5]
Definition: RPCNoisyStripTest.h:30
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
RPCNoisyStripTest::globalFolder_
std::string globalFolder_
Definition: RPCNoisyStripTest.h:21
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
dqm::impl::MonitorElement::getEntries
virtual double getEntries() const
get # of entries
Definition: MonitorElement.cc:628
RPCNoisyStripTest::myOccupancyMe_
std::vector< MonitorElement * > myOccupancyMe_
Definition: RPCNoisyStripTest.h:26
RPCNoisyStripTest::myDetIds_
std::vector< RPCDetId > myDetIds_
Definition: RPCNoisyStripTest.h:27
RPCNoisyStripTest::prescaleFactor_
int prescaleFactor_
Definition: RPCNoisyStripTest.h:23
RPCDetId::roll
int roll() const
Definition: RPCDetId.h:92
RPCNoisyStripTest::numberOfDisks_
int numberOfDisks_
Definition: RPCNoisyStripTest.h:36
RPCNoisyStripTest::NOISEDisk
MonitorElement * NOISEDisk[10]
Definition: RPCNoisyStripTest.h:33
createfilelist.int
int
Definition: createfilelist.py:10
edm::LogVerbatim
Definition: MessageLogger.h:297
rpcdqm::utils::labelYAxisRing
void labelYAxisRing(MonitorElement *myMe, int numberOfRings, bool useRollInfo)
Definition: utils.h:291
RPCNoisyStripTest::numberOfRings_
int numberOfRings_
Definition: RPCNoisyStripTest.h:22
rpcdqm::utils::detId2RollNr
int detId2RollNr(const RPCDetId &_id)
Definition: utils.h:31
RPCNoisyStripTest::DEVDWheel
MonitorElement * DEVDWheel[5]
Definition: RPCNoisyStripTest.h:31
RPCDetId::ring
int ring() const
Definition: RPCDetId.h:59
RPCNoisyStripTest::fillGlobalME
void fillGlobalME(RPCDetId &, MonitorElement *)
Definition: RPCNoisyStripTest.cc:114
dqm::impl::MonitorElement::getNbinsX
virtual int getNbinsX() const
get # of bins in X-axis
Definition: MonitorElement.cc:574
RPCDetId::sector
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:81
rpcdqm::utils::labelXAxisSector
void labelXAxisSector(MonitorElement *myMe)
Definition: utils.h:231
sistrip::NOISE
Definition: ConstantsForRunType.h:91
HltBtagPostValidation_cff.histoName
histoName
Definition: HltBtagPostValidation_cff.py:17
ztail.d
d
Definition: ztail.py:151
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
RPCNoisyStripTest::NOISEWheel
MonitorElement * NOISEWheel[5]
Definition: RPCNoisyStripTest.h:29
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:78
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
RPCNoisyStripTest::useRollInfo_
bool useRollInfo_
Definition: RPCNoisyStripTest.h:28