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=default
 
- 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 8 of file RPCNoisyStripTest.cc.

8  {
9  edm::LogVerbatim("rpcnoisetest") << "[RPCNoisyStripTest]: Constructor";
10 
11  prescaleFactor_ = ps.getUntrackedParameter<int>("DiagnosticPrescale", 1);
12  numberOfDisks_ = ps.getUntrackedParameter<int>("NumberOfEndcapDisks", 4);
13  numberOfRings_ = ps.getUntrackedParameter<int>("NumberOfEndcapRings", 2);
14  useRollInfo_ = ps.getUntrackedParameter<bool>("UseRollInfo", false);
15  testMode_ = ps.getUntrackedParameter<bool>("testMode", false);
16 }

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

◆ ~RPCNoisyStripTest()

RPCNoisyStripTest::~RPCNoisyStripTest ( )
overridedefault

Member Function Documentation

◆ beginJob()

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

Implements RPCClient.

Definition at line 18 of file RPCNoisyStripTest.cc.

18  {
19  edm::LogVerbatim("rpcnoisetest") << "[RPCNoisyStripTest]: Begin job ";
20  globalFolder_ = workingFolder;
21 }

References globalFolder_.

◆ clientOperation()

void RPCNoisyStripTest::clientOperation ( )
overridevirtual

Implements RPCClient.

Definition at line 23 of file RPCNoisyStripTest.cc.

23  {
24  edm::LogVerbatim("rpcnoisetest") << "[RPCNoisyStripTest]: Client Operation";
25 
26  //Loop on MEs
27  for (unsigned int i = 0; i < myOccupancyMe_.size(); i++) {
29  } //End loop on MEs
30 }

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

◆ fillGlobalME()

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

Definition at line 95 of file RPCNoisyStripTest.cc.

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

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 81 of file RPCNoisyStripTest.cc.

83  {
84  //Get NumberOfDigi ME for each roll
85  for (unsigned int i = 0; i < meVector.size(); i++) {
86  std::string meName = meVector[i]->getName();
87 
88  if (meName.find(clientHistoName) != std::string::npos) {
89  myOccupancyMe_.push_back(meVector[i]);
90  myDetIds_.push_back(detIdVector[i]);
91  }
92  }
93 }

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

◆ myBooker()

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

Implements RPCClient.

Definition at line 32 of file RPCNoisyStripTest.cc.

32  {
34 
35  std::stringstream histoName;
36 
37  for (int w = -2; w <= 2; w++) { //loop on wheels and disks
38 
39  if (testMode_) {
40  histoName.str("");
41  histoName << "RPCNoisyStrips_Distribution_Wheel" << w;
42  NOISEDWheel[w + 2] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 6, -0.5, 5.5);
43 
44  histoName.str("");
45  histoName << "RPCStripsDeviation_Distribution_Wheel" << w;
46  DEVDWheel[w + 2] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 101, -0.01, 10.01);
47  }
48 
49  histoName.str("");
50  histoName << "RPCNoisyStrips_Roll_vs_Sector_Wheel" << w;
51  auto me = RPCRollMapHisto::bookBarrel(ibooker, w, histoName.str(), histoName.str(), useRollInfo_);
52  NOISEWheel[w + 2] = dynamic_cast<MonitorElement*>(me);
53  }
54 
55  for (int d = -numberOfDisks_; d <= numberOfDisks_; d++) { //ENDCAP
56 
57  if (d == 0)
58  continue;
59 
60  int offset = numberOfDisks_;
61  if (d > 0)
62  offset--;
63 
64  if (testMode_) {
65  histoName.str("");
66  histoName << "RPCNoisyStrips_Distribution_Disk" << d;
67  NOISEDDisk[d + offset] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 6, -0.5, 5.5);
68 
69  histoName.str("");
70  histoName << "RPCStripsDeviation_Distribution_Disk" << d;
71  DEVDDisk[d + offset] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 101, -0.01, 10.01);
72  }
73 
74  histoName.str("");
75  histoName << "RPCNoisyStrips_Ring_vs_Segment_Disk" << d;
76  auto me = RPCRollMapHisto::bookEndcap(ibooker, d, histoName.str(), histoName.str(), useRollInfo_);
77  NOISEDisk[d + offset] = dynamic_cast<MonitorElement*>(me);
78  }
79 }

References dqm::implementation::IBooker::book1D(), RPCRollMapHisto::bookBarrel(), RPCRollMapHisto::bookEndcap(), ztail::d, DEVDDisk, DEVDWheel, globalFolder_, HltBtagPostValidation_cff::histoName, hlt_dqm_clientPB-live_cfg::me, NOISEDDisk, NOISEDisk, NOISEDWheel, NOISEWheel, numberOfDisks_, 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(), 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().

RPCRollMapHisto::bookBarrel
static MonitorElement * bookBarrel(IBooker &booker, const int wheel, const std::string &prefix, const std::string &title, const bool useRollInfo)
Definition: RPCRollMapHisto.cc:8
RPCNoisyStripTest::DEVDDisk
MonitorElement * DEVDDisk[10]
Definition: RPCNoisyStripTest.h:35
mps_fire.i
i
Definition: mps_fire.py:428
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
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
RPCNoisyStripTest::testMode_
bool testMode_
Definition: RPCNoisyStripTest.h:24
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
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
RPCRollMapHisto::bookEndcap
static MonitorElement * bookEndcap(IBooker &booker, const int disk, const std::string &prefix, const std::string &title, const bool useRollInfo)
Definition: RPCRollMapHisto.cc:81
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
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
RPCNoisyStripTest::numberOfRings_
int numberOfRings_
Definition: RPCNoisyStripTest.h:22
rpcdqm::utils::detId2RollNr
int detId2RollNr(const RPCDetId &_id)
Definition: utils.h:31
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RPCNoisyStripTest::DEVDWheel
MonitorElement * DEVDWheel[5]
Definition: RPCNoisyStripTest.h:31
RPCDetId::ring
int ring() const
Definition: RPCDetId.h:59
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
RPCNoisyStripTest::fillGlobalME
void fillGlobalME(RPCDetId &, MonitorElement *)
Definition: RPCNoisyStripTest.cc:95
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
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
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
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
RPCNoisyStripTest::useRollInfo_
bool useRollInfo_
Definition: RPCNoisyStripTest.h:28