CMS 3D CMS Logo

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

#include <RPCMonitorDigi.h>

Inheritance diagram for RPCMonitorDigi:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 RPCMonitorDigi (const edm::ParameterSet &)
 
 ~RPCMonitorDigi () override=default
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Protected Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void bookRegionME (DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
 Booking of MonitoringElemnt at region (Barrel/Endcap) level. More...
 
void bookRollME (DQMStore::IBooker &, const RPCDetId &, const RPCGeometry *rpcGeo, const std::string &, std::map< std::string, MonitorElement * > &)
 Booking of MonitoringElement for one RPCDetId (= roll) More...
 
void bookSectorRingME (DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
 Booking of MonitoringElement at Sector/Ring level. More...
 
void bookWheelDiskME (DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
 Booking of MonitoringElemnt at Wheel/Disk level. More...
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

void performSourceOperation (std::map< RPCDetId, std::vector< RPCRecHit > > &, std::string)
 
int stripsInRoll (const RPCDetId &id, const RPCGeometry *rpcGeo) const
 

Private Attributes

int counter
 
std::string globalFolder_
 
std::map< std::string, std::map< std::string, MonitorElement * > > meMuonCollection
 
std::map< std::string, std::map< std::string, MonitorElement * > > meNoiseCollection
 
float muEtaCut_
 
std::string muonFolder_
 
edm::EDGetTokenT< reco::CandidateViewmuonLabel_
 
MonitorElementmuonRPCEvents_
 
float muPtCut_
 
std::string noiseFolder_
 
MonitorElementnoiseRPCEvents_
 
int numberOfDisks_
 
int numberOfInnerRings_
 
MonitorElementNumberOfMuon_
 
MonitorElementNumberOfRecHitMuon_
 
std::map< std::string, MonitorElement * > regionMuonCollection
 
std::map< std::string, MonitorElement * > regionNoiseCollection
 
edm::EDGetTokenT< RPCRecHitCollectionrpcRecHitLabel_
 
edm::EDGetTokenT< DcsStatusCollectionscalersRawToDigiLabel_
 
std::map< std::string, MonitorElement * > sectorRingMuonCollection
 
std::map< std::string, MonitorElement * > sectorRingNoiseCollection
 
std::string subsystemFolder_
 
bool useMuonDigis_
 
bool useRollInfo_
 
std::map< std::string, MonitorElement * > wheelDiskMuonCollection
 
std::map< std::string, MonitorElement * > wheelDiskNoiseCollection
 

Static Private Attributes

static const std::array< std::string, 3 > regionNames_ = {{"Endcap-", "Barrel", "Endcap+"}}
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 21 of file RPCMonitorDigi.h.

Constructor & Destructor Documentation

◆ RPCMonitorDigi()

RPCMonitorDigi::RPCMonitorDigi ( const edm::ParameterSet pset)
explicit

Definition at line 18 of file RPCMonitorDigi.cc.

19  : counter(0),
20  muonRPCEvents_(nullptr),
21  NumberOfRecHitMuon_(nullptr),
22  NumberOfMuon_(nullptr),
23  numberOfDisks_(0),
25  useMuonDigis_ = pset.getUntrackedParameter<bool>("UseMuon", true);
26  useRollInfo_ = pset.getUntrackedParameter<bool>("UseRollInfo", false);
27 
28  muPtCut_ = pset.getUntrackedParameter<double>("MuonPtCut", 3.0);
29  muEtaCut_ = pset.getUntrackedParameter<double>("MuonEtaCut", 1.9);
30 
31  subsystemFolder_ = pset.getUntrackedParameter<std::string>("RPCFolder", "RPC");
32  globalFolder_ = pset.getUntrackedParameter<std::string>("GlobalFolder", "SummaryHistograms");
33 
34  //Parametersets for tokens
35  muonLabel_ = consumes<reco::CandidateView>(pset.getParameter<edm::InputTag>("MuonLabel"));
36  rpcRecHitLabel_ = consumes<RPCRecHitCollection>(pset.getParameter<edm::InputTag>("RecHitLabel"));
37  scalersRawToDigiLabel_ = consumes<DcsStatusCollection>(pset.getParameter<edm::InputTag>("ScalersRawToDigiLabel"));
38 
39  noiseFolder_ = pset.getUntrackedParameter<std::string>("NoiseFolder", "AllHits");
40  muonFolder_ = pset.getUntrackedParameter<std::string>("MuonFolder", "Muon");
41 }

References globalFolder_, muEtaCut_, muonFolder_, muonLabel_, muPtCut_, noiseFolder_, muonDTDigis_cfi::pset, rpcRecHitLabel_, scalersRawToDigiLabel_, AlCaHLTBitMon_QueryRunRegistry::string, subsystemFolder_, useMuonDigis_, and useRollInfo_.

◆ ~RPCMonitorDigi()

RPCMonitorDigi::~RPCMonitorDigi ( )
overridedefault

Member Function Documentation

◆ analyze()

void RPCMonitorDigi::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 116 of file RPCMonitorDigi.cc.

116  {
117  counter++;
118  edm::LogInfo("rpcmonitordigi") << "[RPCMonitorDigi]: Beginning analyzing event " << counter;
119 
120  //Muons
122  event.getByToken(muonLabel_, muonCands);
123 
124  std::map<RPCDetId, std::vector<RPCRecHit> > rechitMuon;
125 
126  int numMuons = 0;
127  int numRPCRecHit = 0;
128 
129  if (muonCands.isValid()) {
130  int nStaMuons = muonCands->size();
131 
132  for (int i = 0; i < nStaMuons; i++) {
133  const reco::Candidate& goodMuon = (*muonCands)[i];
134  const reco::Muon* muCand = dynamic_cast<const reco::Muon*>(&goodMuon);
135 
136  if (!muCand->isGlobalMuon())
137  continue;
138  if (muCand->pt() < muPtCut_ || fabs(muCand->eta()) > muEtaCut_)
139  continue;
140  numMuons++;
141  reco::Track muTrack = (*(muCand->outerTrack()));
142  std::vector<TrackingRecHitRef> rpcTrackRecHits;
143  //loop on mu rechits
144  for (trackingRecHit_iterator it = muTrack.recHitsBegin(); it != muTrack.recHitsEnd(); it++) {
145  if (!(*it)->isValid())
146  continue;
147  int muSubDetId = (*it)->geographicalId().subdetId();
148  if (muSubDetId == MuonSubdetId::RPC) {
149  numRPCRecHit++;
150  TrackingRecHit* tkRecHit = (*it)->clone();
151  RPCRecHit* rpcRecHit = dynamic_cast<RPCRecHit*>(tkRecHit);
152  int detId = (int)rpcRecHit->rpcId();
153  if (rechitMuon.find(detId) == rechitMuon.end() || rechitMuon[detId].empty()) {
154  std::vector<RPCRecHit> myVect(1, *rpcRecHit);
155  rechitMuon[detId] = myVect;
156  } else {
157  rechitMuon[detId].push_back(*rpcRecHit);
158  }
159  }
160  } // end loop on mu rechits
161  }
162 
163  //Fill muon counter
164  if (NumberOfMuon_) {
166  }
167 
168  //Fill rechit counter for muons
169  if (NumberOfRecHitMuon_ && numMuons > 0) {
170  NumberOfRecHitMuon_->Fill(numRPCRecHit);
171  }
172 
173  //Fill counter of RPC events with rechits associated in with a muon
174  if (muonRPCEvents_ != nullptr && numRPCRecHit > 0) {
175  muonRPCEvents_->Fill(1);
176  }
177 
178  //Perform client operation
179  this->performSourceOperation(rechitMuon, muonFolder_);
180 
181  } else {
182  edm::LogError("rpcmonitordigi") << "[RPCMonitorDigi]: Muons - Product not valid for event" << counter;
183  }
184 
185  //RecHits
187  event.getByToken(rpcRecHitLabel_, rpcHits);
188  std::map<RPCDetId, std::vector<RPCRecHit> > rechitNoise;
189 
190  if (rpcHits.isValid()) {
191  // RPC rec hits NOT associated to a muon
192  for (auto rpcRecHitIter = rpcHits->begin(); rpcRecHitIter != rpcHits->end(); rpcRecHitIter++) {
193  RPCRecHit rpcRecHit = (*rpcRecHitIter);
194  int detId = (int)rpcRecHit.rpcId();
195  if (rechitNoise.find(detId) == rechitNoise.end() || rechitNoise[detId].empty()) {
196  std::vector<RPCRecHit> myVect(1, rpcRecHit);
197  rechitNoise[detId] = myVect;
198  } else {
199  rechitNoise[detId].push_back(rpcRecHit);
200  }
201  }
202  } else {
203  edm::LogError("rpcmonitordigi") << "[RPCMonitorDigi]: RPCRecHits - Product not valid for event" << counter;
204  }
205 
206  //Fill counter for all RPC events
207  if (noiseRPCEvents_ != nullptr && !rechitNoise.empty()) {
208  noiseRPCEvents_->Fill(1);
209  }
210  //Perform client operation
211  this->performSourceOperation(rechitNoise, noiseFolder_);
212 }

References TrackingRecHit::clone(), counter, reco::LeafCandidate::eta(), dqm::impl::MonitorElement::Fill(), mps_fire::i, createfilelist::int, reco::Muon::isGlobalMuon(), edm::HandleBase::isValid(), muEtaCut_, muonFolder_, muonLabel_, muonRPCEvents_, muPtCut_, noiseFolder_, noiseRPCEvents_, NumberOfMuon_, NumberOfRecHitMuon_, patZpeak::numMuons, reco::Muon::outerTrack(), performSourceOperation(), reco::LeafCandidate::pt(), reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), MuonSubdetId::RPC, RPCRecHit::rpcId(), rpcRecHitLabel_, and edm::View< T >::size().

◆ bookHistograms()

void RPCMonitorDigi::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  r,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 43 of file RPCMonitorDigi.cc.

43  {
44  edm::LogInfo("rpcmonitordigi") << "[RPCMonitorDigi]: Begin Run ";
45 
46  std::set<int> disk_set, ring_set;
47  edm::ESHandle<RPCGeometry> rpcGeoHandle;
48  iSetup.get<MuonGeometryRecord>().get(rpcGeoHandle);
49  const RPCGeometry* rpcGeo = rpcGeoHandle.product();
50 
51  //loop on geometry to book all MEs
52  edm::LogInfo("rpcmonitordigi") << "[RPCMonitorDigi]: Booking histograms per roll. ";
53  for (TrackingGeometry::DetContainer::const_iterator it = rpcGeo->dets().begin(); it < rpcGeo->dets().end(); it++) {
54  if (dynamic_cast<const RPCChamber*>(*it) != nullptr) {
55  const RPCChamber* ch = dynamic_cast<const RPCChamber*>(*it);
56  std::vector<const RPCRoll*> roles = (ch->rolls());
57  if (useRollInfo_) {
58  for (std::vector<const RPCRoll*>::const_iterator r = roles.begin(); r != roles.end(); ++r) {
59  RPCDetId rpcId = (*r)->id();
60 
61  //get station and inner ring
62  if (rpcId.region() != 0) {
63  disk_set.insert(rpcId.station());
64  ring_set.insert(rpcId.ring());
65  }
66 
67  //booking all histograms
68  RPCGeomServ rpcsrv(rpcId);
69  std::string nameID = rpcsrv.name();
70  if (useMuonDigis_)
71  bookRollME(ibooker, rpcId, rpcGeo, muonFolder_, meMuonCollection[nameID]);
72  bookRollME(ibooker, rpcId, rpcGeo, noiseFolder_, meNoiseCollection[nameID]);
73  }
74  } else {
75  RPCDetId rpcId = roles[0]->id(); //any roll would do - here I just take the first one
76  RPCGeomServ rpcsrv(rpcId);
77  std::string nameID = rpcsrv.chambername();
78  if (useMuonDigis_)
79  bookRollME(ibooker, rpcId, rpcGeo, muonFolder_, meMuonCollection[nameID]);
80  bookRollME(ibooker, rpcId, rpcGeo, noiseFolder_, meNoiseCollection[nameID]);
81  if (rpcId.region() != 0) {
82  disk_set.insert(rpcId.station());
83  ring_set.insert(rpcId.ring());
84  }
85  }
86  }
87  } //end loop on geometry to book all MEs
88 
89  numberOfDisks_ = disk_set.size();
90  numberOfInnerRings_ = (*ring_set.begin());
91 
92  //Book
96 
97  std::string currentFolder = subsystemFolder_ + "/" + noiseFolder_;
98  ibooker.setCurrentFolder(currentFolder);
99 
100  noiseRPCEvents_ = ibooker.book1D("RPCEvents", "RPCEvents", 1, 0.5, 1.5);
101 
102  if (useMuonDigis_) {
106 
107  currentFolder = subsystemFolder_ + "/" + muonFolder_;
108  ibooker.setCurrentFolder(currentFolder);
109 
110  muonRPCEvents_ = ibooker.book1D("RPCEvents", "RPCEvents", 1, 0.5, 1.5);
111  NumberOfMuon_ = ibooker.book1D("NumberOfMuons", "Number of Muons", 11, -0.5, 10.5);
112  NumberOfRecHitMuon_ = ibooker.book1D("NumberOfRecHitMuons", "Number of RPC RecHits per Muon", 8, -0.5, 7.5);
113  }
114 }

References dqm::implementation::IBooker::book1D(), bookRegionME(), bookRollME(), bookSectorRingME(), bookWheelDiskME(), RPCGeomServ::chambername(), RPCGeometry::dets(), edm::EventSetup::get(), get, meMuonCollection, meNoiseCollection, muonFolder_, muonRPCEvents_, RPCGeomServ::name(), noiseFolder_, noiseRPCEvents_, numberOfDisks_, numberOfInnerRings_, NumberOfMuon_, NumberOfRecHitMuon_, edm::ESHandle< T >::product(), alignCSCRings::r, RPCDetId::region(), regionMuonCollection, regionNoiseCollection, RPCDetId::ring(), RPCChamber::rolls(), sectorRingMuonCollection, sectorRingNoiseCollection, dqm::implementation::NavigatorBase::setCurrentFolder(), RPCDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, subsystemFolder_, useMuonDigis_, useRollInfo_, wheelDiskMuonCollection, and wheelDiskNoiseCollection.

◆ bookRegionME()

void RPCMonitorDigi::bookRegionME ( DQMStore::IBooker ibooker,
const std::string &  recHitType,
std::map< std::string, MonitorElement * > &  meMap 
)
protected

Booking of MonitoringElemnt at region (Barrel/Endcap) level.

Definition at line 287 of file RPCBookDetUnitME.cc.

289  {
290  std::string currentFolder = subsystemFolder_ + "/" + recHitType + "/" + globalFolder_;
291  ibooker.setCurrentFolder(currentFolder);
292 
293  std::stringstream name;
294  std::stringstream title;
295  for (int r = 0; r < 3; r++) { //RPC regions are E-, B, and E+
296 
298  //Cluster size
299  name.str("");
300  title.str("");
301  name << "ClusterSize_" << regionName;
302  title << "ClusterSize - " << regionName;
303  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
304  }
305 
306  //Number of Cluster
307  name.str("");
308  title.str("");
309  name << "NumberOfClusters_Barrel";
310  title << "Number of Clusters per Event - Barrel";
311  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 30, 0.5, 30.5);
312 
313  name.str("");
314  title.str("");
315  name << "NumberOfClusters_Endcap+";
316  title << "Number of Clusters per Event - Endcap+";
317  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 15, 0.5, 15.5);
318 
319  name.str("");
320  title.str("");
321  name << "NumberOfClusters_Endcap-";
322  title << "Number of Clusters per Event - Endcap-";
323  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 15, 0.5, 15.5);
324 
325  //Number of Digis
326  name.str("");
327  title.str("");
328  name << "Multiplicity_Barrel";
329  title << "Multiplicity per Event per Roll - Barrel";
330  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 50, 0.5, 50.5);
331 
332  name.str("");
333  title.str("");
334  name << "Multiplicity_Endcap+";
335  title << "Multiplicity per Event per Roll - Endcap+";
336  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 32, 0.5, 32.5);
337 
338  name.str("");
339  title.str("");
340  name << "Multiplicity_Endcap-";
341  title << "Multiplicity per Event per Roll - Endcap-";
342  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 32, 0.5, 32.5);
343 
344  for (int layer = 1; layer <= 6; layer++) {
345  name.str("");
346  title.str("");
347  name << "ClusterSize_Layer" << layer;
348  title << "ClusterSize - Layer" << layer;
349  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
350  }
351 
352  for (int ring = RPCMonitorDigi::numberOfInnerRings_; ring <= 3; ring++) {
353  name.str("");
354  title.str("");
355  name << "ClusterSize_Ring" << ring;
356  title << "ClusterSize - Ring" << ring;
357  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
358  }
359 
360  meMap["Occupancy_for_Endcap"] = ibooker.book2D("Occupancy_for_Endcap",
361  "Occupancy Endcap",
363  0.5,
364  ((float)RPCMonitorDigi::numberOfDisks_ * 2.0) + 0.5,
365  2,
366  1.5,
367  3.5);
368  meMap["Occupancy_for_Endcap"]->setAxisTitle("Disk", 1);
369  meMap["Occupancy_for_Endcap"]->setAxisTitle("Ring", 2);
370 
371  std::stringstream binlabel;
372  for (int bin = 1; bin <= RPCMonitorDigi::numberOfDisks_ * 2; bin++) {
373  binlabel.str("");
374  if (bin < (RPCMonitorDigi::numberOfDisks_ + 1)) { //negative endcap
375  binlabel << (bin - (RPCMonitorDigi::numberOfDisks_ + 1));
376  } else { //positive endcaps
377  binlabel << (bin - RPCMonitorDigi::numberOfDisks_);
378  }
379  meMap["Occupancy_for_Endcap"]->setBinLabel(bin, binlabel.str(), 1);
380  }
381 
382  meMap["Occupancy_for_Endcap"]->setBinLabel(1, "2", 2);
383  meMap["Occupancy_for_Endcap"]->setBinLabel(2, "3", 2);
384 
385  meMap["Occupancy_for_Barrel"] =
386  ibooker.book2D("Occupancy_for_Barrel", "Occupancy Barrel", 12, 0.5, 12.5, 5, -2.5, 2.5);
387  meMap["Occupancy_for_Barrel"]->setAxisTitle("Sec", 1);
388  meMap["Occupancy_for_Barrel"]->setAxisTitle("Wheel", 2);
389 
390  for (int bin = 1; bin <= 12; bin++) {
391  binlabel.str("");
392  binlabel << bin;
393  meMap["Occupancy_for_Barrel"]->setBinLabel(bin, binlabel.str(), 1);
394  if (bin <= 5) {
395  binlabel.str("");
396  binlabel << (bin - 3);
397  meMap["Occupancy_for_Barrel"]->setBinLabel(bin, binlabel.str(), 2);
398  }
399  }
400 }

References newFWLiteAna::bin, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), globalFolder_, phase1PixelTopology::layer, Skims_PA_cff::name, numberOfDisks_, numberOfInnerRings_, alignCSCRings::r, regionNames_, relativeConstraints::ring, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, subsystemFolder_, and runGCPTkAlMap::title.

Referenced by bookHistograms().

◆ bookRollME()

void RPCMonitorDigi::bookRollME ( DQMStore::IBooker ibooker,
const RPCDetId detId,
const RPCGeometry rpcGeo,
const std::string &  recHitType,
std::map< std::string, MonitorElement * > &  meMap 
)
protected

Booking of MonitoringElement for one RPCDetId (= roll)

Name components common to current RPCDetId

Definition at line 8 of file RPCBookDetUnitME.cc.

12  {
13  RPCBookFolderStructure folderStr;
14  std::string folder = subsystemFolder_ + "/" + recHitType + "/" + folderStr.folderStructure(detId);
15 
16  ibooker.setCurrentFolder(folder);
17 
18  //get number of strips in current roll
19  int nstrips = this->stripsInRoll(detId, rpcGeo);
20  if (nstrips == 0) {
21  nstrips = 1;
22  }
23 
25  RPCGeomServ RPCname(detId);
26  std::string nameRoll = "";
27 
29  nameRoll = RPCname.name();
30  } else {
31  nameRoll = RPCname.chambername();
32 
33  if (detId.region() != 0 || //Endcaps
34  (abs(detId.ring()) == 2 && detId.station() == 2 && detId.layer() != 1) || //Wheel -/+2 RB2out
35  (abs(detId.ring()) != 2 && detId.station() == 2 && detId.layer() == 1)) {
36  nstrips *= 3;
37  } //Wheel -1,0,+1 RB2in
38  else {
39  nstrips *= 2;
40  }
41  }
42 
43  std::stringstream os;
44  os.str("");
45  os << "Occupancy_" << nameRoll;
46  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), nstrips, 0.5, nstrips + 0.5);
47 
48  os.str("");
49  os << "BXDistribution_" << nameRoll;
50  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 7, -3.5, 3.5);
51 
52  if (detId.region() == 0) {
53  os.str("");
54  os << "ClusterSize_" << nameRoll;
55  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 15, 0.5, 15.5);
56 
57  os.str("");
58  os << "Multiplicity_" << nameRoll;
59  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 30, 0.5, 30.5);
60 
61  } else {
62  os.str("");
63  os << "ClusterSize_" << nameRoll;
64  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 10, 0.5, 10.5);
65 
66  os.str("");
67  os << "Multiplicity_" << nameRoll;
68  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 15, 0.5, 15.5);
69  }
70 
71  os.str("");
72  os << "NumberOfClusters_" << nameRoll;
73  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 10, 0.5, 10.5);
74 }

References funct::abs(), dqm::implementation::IBooker::book1D(), RPCGeomServ::chambername(), printsummarytable::folder, RPCBookFolderStructure::folderStructure(), RPCDetId::layer(), RPCGeomServ::name(), RPCDetId::region(), RPCDetId::ring(), dqm::implementation::NavigatorBase::setCurrentFolder(), RPCDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, stripsInRoll(), subsystemFolder_, and useRollInfo_.

Referenced by bookHistograms().

◆ bookSectorRingME()

void RPCMonitorDigi::bookSectorRingME ( DQMStore::IBooker ibooker,
const std::string &  recHitType,
std::map< std::string, MonitorElement * > &  meMap 
)
protected

Booking of MonitoringElement at Sector/Ring level.

Definition at line 76 of file RPCBookDetUnitME.cc.

78  {
79  std::stringstream os;
80 
81  for (int wheel = -2; wheel <= 2; wheel++) {
82  os.str("");
83  os << subsystemFolder_ << "/" << recHitType << "/Barrel/Wheel_" << wheel << "/SummaryBySectors";
84  ibooker.setCurrentFolder(os.str());
85 
86  for (int sector = 1; sector <= 12; sector++) {
87  os.str("");
88  os << "Occupancy_Wheel_" << wheel << "_Sector_" << sector;
89 
90  if (sector == 9 || sector == 11)
91  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 91, 0.5, 91.5, 15, 0.5, 15.5);
92  else if (sector == 4)
93  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 91, 0.5, 91.5, 21, 0.5, 21.5);
94  else
95  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 91, 0.5, 91.5, 17, 0.5, 17.5);
96 
97  meMap[os.str()]->setAxisTitle("strip", 1);
98  rpcdqm::utils rpcUtils;
99  rpcUtils.labelYAxisRoll(meMap[os.str()], 0, wheel, true);
100  }
101  }
102 
103  for (int region = -1; region <= 1; region++) {
104  if (region == 0)
105  continue;
106 
107  std::string regionName = "Endcap-";
108  if (region == 1)
109  regionName = "Endcap+";
110 
111  for (int disk = 1; disk <= RPCMonitorDigi::numberOfDisks_; disk++) {
112  os.str("");
113  os << subsystemFolder_ << "/" << recHitType << "/" << regionName << "/Disk_" << (region * disk)
114  << "/SummaryByRings/";
115 
116  ibooker.setCurrentFolder(os.str());
117 
118  for (int ring = RPCMonitorDigi::numberOfInnerRings_; ring <= 3; ring++) {
119  os.str("");
120  os << "Occupancy_Disk_" << (region * disk) << "_Ring_" << ring << "_CH01-CH18";
121 
122  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 96, 0.5, 96.5, 18, 0.5, 18.5);
123  meMap[os.str()]->setAxisTitle("strip", 1);
125 
126  std::stringstream yLabel;
127  for (int i = 1; i <= 18; i++) {
128  yLabel.str("");
129  yLabel << "R" << ring << "_CH" << std::setw(2) << std::setfill('0') << i;
130  meMap[os.str()]->setBinLabel(i, yLabel.str(), 2);
131  }
132 
133  for (int i = 1; i <= 96; i++) {
134  if (i == 1)
135  meMap[os.str()]->setBinLabel(i, "1", 1);
136  else if (i == 16)
137  meMap[os.str()]->setBinLabel(i, "RollA", 1);
138  else if (i == 32)
139  meMap[os.str()]->setBinLabel(i, "32", 1);
140  else if (i == 33)
141  meMap[os.str()]->setBinLabel(i, "1", 1);
142  else if (i == 48)
143  meMap[os.str()]->setBinLabel(i, "RollB", 1);
144  else if (i == 64)
145  meMap[os.str()]->setBinLabel(i, "32", 1);
146  else if (i == 65)
147  meMap[os.str()]->setBinLabel(i, "1", 1);
148  else if (i == 80)
149  meMap[os.str()]->setBinLabel(i, "RollC", 1);
150  else if (i == 96)
151  meMap[os.str()]->setBinLabel(i, "32", 1);
152  else
153  meMap[os.str()]->setBinLabel(i, "", 1);
154  }
155 
156  os.str("");
157  os << "Occupancy_Disk_" << (region * disk) << "_Ring_" << ring << "_CH19-CH36";
158 
159  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 96, 0.5, 96.5, 18, 18.5, 36.5);
160  meMap[os.str()]->setAxisTitle("strip", 1);
162 
163  for (int i = 1; i <= 18; i++) {
164  yLabel.str("");
165  yLabel << "R" << ring << "_CH" << i + 18;
166  meMap[os.str()]->setBinLabel(i, yLabel.str(), 2);
167  }
168 
169  for (int i = 1; i <= 96; i++) {
170  if (i == 1)
171  meMap[os.str()]->setBinLabel(i, "1", 1);
172  else if (i == 16)
173  meMap[os.str()]->setBinLabel(i, "RollA", 1);
174  else if (i == 32)
175  meMap[os.str()]->setBinLabel(i, "32", 1);
176  else if (i == 33)
177  meMap[os.str()]->setBinLabel(i, "1", 1);
178  else if (i == 48)
179  meMap[os.str()]->setBinLabel(i, "RollB", 1);
180  else if (i == 64)
181  meMap[os.str()]->setBinLabel(i, "32", 1);
182  else if (i == 65)
183  meMap[os.str()]->setBinLabel(i, "1", 1);
184  else if (i == 80)
185  meMap[os.str()]->setBinLabel(i, "RollC", 1);
186  else if (i == 96)
187  meMap[os.str()]->setBinLabel(i, "32", 1);
188  else
189  meMap[os.str()]->setBinLabel(i, "", 1);
190  }
191 
192  } //loop ring
193  } //loop disk
194  } //loop region
195 }

References dqm::implementation::IBooker::book2D(), mps_fire::i, rpcdqm::utils::labelYAxisRoll(), numberOfDisks_, numberOfInnerRings_, HLT_FULL_cff::region, relativeConstraints::ring, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), rpcdqm::RPCMEHelper::setNoAlphanumeric(), AlCaHLTBitMon_QueryRunRegistry::string, subsystemFolder_, and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

◆ bookWheelDiskME()

void RPCMonitorDigi::bookWheelDiskME ( DQMStore::IBooker ibooker,
const std::string &  recHitType,
std::map< std::string, MonitorElement * > &  meMap 
)
protected

Booking of MonitoringElemnt at Wheel/Disk level.

Definition at line 197 of file RPCBookDetUnitME.cc.

199  {
200  ibooker.setCurrentFolder(subsystemFolder_ + "/" + recHitType + "/" + globalFolder_);
201 
202  std::stringstream os, label, name, title;
203  rpcdqm::utils rpcUtils;
204 
205  for (int wheel = -2; wheel <= 2; wheel++) { //Loop on wheel
206  os.str("");
207  os << "1DOccupancy_Wheel_" << wheel;
208  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 12, 0.5, 12.5);
209  for (int i = 1; i < 12; i++) {
210  label.str("");
211  label << "Sec" << i;
212  meMap[os.str()]->setBinLabel(i, label.str(), 1);
213  }
214 
215  os.str("");
216  os << "Occupancy_Roll_vs_Sector_Wheel_" << wheel;
217  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 12, 0.5, 12.5, 21, 0.5, 21.5);
218  rpcUtils.labelXAxisSector(meMap[os.str()]);
219  rpcUtils.labelYAxisRoll(meMap[os.str()], 0, wheel, true);
220 
221  os.str("");
222  os << "BxDistribution_Wheel_" << wheel;
223  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 9, -4.5, 4.5);
224 
225  for (int layer = 1; layer <= 6; layer++) {
226  name.str("");
227  title.str("");
228  name << "ClusterSize_Wheel_" << wheel << "_Layer" << layer;
229  title << "ClusterSize - Wheel " << wheel << " Layer" << layer;
230  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
231  }
232 
233  } //end loop on wheel
234 
235  for (int disk = -RPCMonitorDigi::numberOfDisks_; disk <= RPCMonitorDigi::numberOfDisks_; disk++) {
236  if (disk == 0)
237  continue;
238 
239  os.str("");
240  os << "Occupancy_Ring_vs_Segment_Disk_" << disk;
241  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 36, 0.5, 36.5, 6, 0.5, 6.5);
242 
243  rpcUtils.labelXAxisSegment(meMap[os.str()]);
244  rpcUtils.labelYAxisRing(meMap[os.str()], 2, true);
245 
246  os.str("");
247  os << "BxDistribution_Disk_" << disk;
248  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 9, -4.5, 4.5);
249 
250  for (int ring = RPCMonitorDigi::numberOfInnerRings_; ring <= 3; ring++) {
251  name.str("");
252  title.str("");
253  name << "ClusterSize_Disk_" << disk << "_Ring" << ring;
254  title << "ClusterSize - Disk" << disk << " Ring" << ring;
255  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
256  }
257  }
258 
259  for (int ring = RPCMonitorDigi::numberOfInnerRings_; ring <= 3; ring++) {
260  os.str("");
261  os << "1DOccupancy_Ring_" << ring;
262  meMap[os.str()] = ibooker.book1D(os.str(),
263  os.str(),
265  0.5,
266  ((double)RPCMonitorDigi::numberOfDisks_ * 2.0) + 0.5);
267  for (int xbin = 1; xbin <= RPCMonitorDigi::numberOfDisks_ * 2; xbin++) {
268  label.str("");
269  if (xbin < RPCMonitorDigi::numberOfDisks_ + 1)
270  label << "Disk " << (xbin - (RPCMonitorDigi::numberOfDisks_ + 1));
271  else
272  label << "Disk " << (xbin - RPCMonitorDigi::numberOfDisks_);
273  meMap[os.str()]->setBinLabel(xbin, label.str(), 1);
274  }
275  }
276 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), globalFolder_, mps_fire::i, label, rpcdqm::utils::labelXAxisSector(), rpcdqm::utils::labelXAxisSegment(), rpcdqm::utils::labelYAxisRing(), rpcdqm::utils::labelYAxisRoll(), phase1PixelTopology::layer, Skims_PA_cff::name, numberOfDisks_, numberOfInnerRings_, relativeConstraints::ring, dqm::implementation::NavigatorBase::setCurrentFolder(), subsystemFolder_, runGCPTkAlMap::title, and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

◆ performSourceOperation()

void RPCMonitorDigi::performSourceOperation ( std::map< RPCDetId, std::vector< RPCRecHit > > &  recHitMap,
std::string  recHittype 
)
private

Definition at line 214 of file RPCMonitorDigi.cc.

215  {
216  edm::LogInfo("rpcmonitordigi") << "[RPCMonitorDigi]: Performing DQM source operations for ";
217 
218  if (recHitMap.empty())
219  return;
220 
221  std::map<std::string, std::map<std::string, MonitorElement*> > meRollCollection;
222  std::map<std::string, MonitorElement*> meWheelDisk;
223  std::map<std::string, MonitorElement*> meRegion;
224  std::map<std::string, MonitorElement*> meSectorRing;
225 
226  if (recHittype == muonFolder_) {
227  meRollCollection = meMuonCollection;
228  meWheelDisk = wheelDiskMuonCollection;
229  meRegion = regionMuonCollection;
230  meSectorRing = sectorRingMuonCollection;
231  } else if (recHittype == noiseFolder_) {
232  meRollCollection = meNoiseCollection;
233  meWheelDisk = wheelDiskNoiseCollection;
234  meRegion = regionNoiseCollection;
235  meSectorRing = sectorRingNoiseCollection;
236  } else {
237  edm::LogWarning("rpcmonitordigi") << "[RPCMonitorDigi]: RecHit type not valid.";
238  return;
239  }
240 
241  int totalNumberOfRecHits[3] = {0, 0, 0};
242  std::stringstream os;
243 
244  //Loop on Rolls
245  for (std::map<RPCDetId, std::vector<RPCRecHit> >::const_iterator detIdIter = recHitMap.begin();
246  detIdIter != recHitMap.end();
247  detIdIter++) {
248  RPCDetId detId = (*detIdIter).first;
249 
250  //get roll number
251  rpcdqm::utils rpcUtils;
252  int nr = rpcUtils.detId2RollNr(detId);
253 
254  RPCGeomServ geoServ(detId);
255  std::string nameRoll = "";
256 
257  if (useRollInfo_)
258  nameRoll = geoServ.name();
259  else
260  nameRoll = geoServ.chambername();
261 
262  int region = (int)detId.region();
263  int wheelOrDiskNumber;
264  std::string wheelOrDiskType;
265  int ring = 0;
266  int sector = detId.sector();
267  int layer = 0;
268  int totalRolls = 3;
269  int roll = detId.roll();
270  if (region == 0) {
271  wheelOrDiskType = "Wheel";
272  wheelOrDiskNumber = (int)detId.ring();
273  int station = detId.station();
274 
275  if (station == 1) {
276  if (detId.layer() == 1) {
277  layer = 1; //RB1in
278  totalRolls = 2;
279  } else {
280  layer = 2; //RB1out
281  totalRolls = 2;
282  }
283  if (roll == 3)
284  roll = 2; // roll=3 is Forward
285  } else if (station == 2) {
286  if (detId.layer() == 1) {
287  layer = 3; //RB2in
288  if (abs(wheelOrDiskNumber) == 2 && roll == 3) {
289  roll = 2; //W -2, +2 RB2in has only 2 rolls
290  totalRolls = 2;
291  }
292  } else {
293  layer = 4; //RB2out
294  if (abs(wheelOrDiskNumber) != 2 && roll == 3) {
295  roll = 2; //W -1, 0, +1 RB2out has only 2 rolls
296  totalRolls = 2;
297  }
298  }
299  } else if (station == 3) {
300  layer = 5; //RB3
301  totalRolls = 2;
302  if (roll == 3)
303  roll = 2;
304  } else {
305  layer = 6; //RB4
306  totalRolls = 2;
307  if (roll == 3)
308  roll = 2;
309  }
310 
311  } else {
312  wheelOrDiskType = "Disk";
313  wheelOrDiskNumber = region * (int)detId.station();
314  ring = detId.ring();
315  }
316 
317  std::vector<RPCRecHit> recHits = (*detIdIter).second;
318  int numberOfRecHits = recHits.size();
319  totalNumberOfRecHits[region + 1] += numberOfRecHits;
320 
321  std::set<int> bxSet;
322  int numDigi = 0;
323 
324  std::map<std::string, MonitorElement*> meMap = meRollCollection[nameRoll];
325 
326  //Loop on recHits
327  for (std::vector<RPCRecHit>::const_iterator recHitIter = recHits.begin(); recHitIter != recHits.end();
328  recHitIter++) {
329  RPCRecHit recHit = (*recHitIter);
330 
331  int bx = recHit.BunchX();
332  bxSet.insert(bx);
333  int clusterSize = (int)recHit.clusterSize();
334  numDigi += clusterSize;
335  int firstStrip = recHit.firstClusterStrip();
336  int lastStrip = clusterSize + firstStrip - 1;
337 
338  // ###################### Roll Level #################################
339 
340  os.str("");
341  os << "Occupancy_" << nameRoll;
342  if (meMap[os.str()]) {
343  for (int s = firstStrip; s <= lastStrip; s++) {
344  if (useRollInfo_) {
345  meMap[os.str()]->Fill(s);
346  } else {
347  int nstrips = meMap[os.str()]->getNbinsX() / totalRolls;
348  meMap[os.str()]->Fill(s + nstrips * (roll - 1));
349  }
350  }
351  }
352 
353  os.str("");
354  os << "BXDistribution_" << nameRoll;
355  if (meMap[os.str()])
356  meMap[os.str()]->Fill(bx);
357 
358  os.str("");
359  os << "ClusterSize_" << nameRoll;
360  if (meMap[os.str()])
361  meMap[os.str()]->Fill(clusterSize);
362 
363  // ###################### Sector- Ring Level #################################
364 
365  os.str("");
366  os << "Occupancy_" << wheelOrDiskType << "_" << wheelOrDiskNumber << "_Sector_" << sector;
367  if (meSectorRing[os.str()]) {
368  for (int s = firstStrip; s <= lastStrip; s++) { //Loop on digis
369  meSectorRing[os.str()]->Fill(s, nr);
370  }
371  }
372 
373  os.str("");
374  if (geoServ.segment() > 0 && geoServ.segment() < 19) {
375  os << "Occupancy_" << wheelOrDiskType << "_" << wheelOrDiskNumber << "_Ring_" << ring << "_CH01-CH18";
376  } else if (geoServ.segment() > 18) {
377  os << "Occupancy_" << wheelOrDiskType << "_" << wheelOrDiskNumber << "_Ring_" << ring << "_CH19-CH36";
378  }
379 
380  if (meSectorRing[os.str()]) {
381  for (int s = firstStrip; s <= lastStrip; s++) { //Loop on digis
382  meSectorRing[os.str()]->Fill(s + 32 * (detId.roll() - 1), geoServ.segment());
383  }
384  }
385 
386  // ###################### Wheel/Disk Level #########################
387  if (region == 0) {
388  os.str("");
389  os << "1DOccupancy_Wheel_" << wheelOrDiskNumber;
390  if (meWheelDisk[os.str()])
391  meWheelDisk[os.str()]->Fill(sector, clusterSize);
392 
393  os.str("");
394  os << "Occupancy_Roll_vs_Sector_" << wheelOrDiskType << "_" << wheelOrDiskNumber;
395  if (meWheelDisk[os.str()])
396  meWheelDisk[os.str()]->Fill(sector, nr, clusterSize);
397 
398  } else {
399  os.str("");
400  os << "1DOccupancy_Ring_" << ring;
401  if ((meWheelDisk[os.str()])) {
402  if (wheelOrDiskNumber > 0) {
403  meWheelDisk[os.str()]->Fill(wheelOrDiskNumber + numberOfDisks_, clusterSize);
404  } else {
405  meWheelDisk[os.str()]->Fill(wheelOrDiskNumber + numberOfDisks_ + 1, clusterSize);
406  }
407  }
408 
409  os.str("");
410  os << "Occupancy_Ring_vs_Segment_" << wheelOrDiskType << "_" << wheelOrDiskNumber;
411  if (meWheelDisk[os.str()])
412  meWheelDisk[os.str()]->Fill(geoServ.segment(), (ring - 1) * 3 - detId.roll() + 1, clusterSize);
413  }
414 
415  os.str("");
416  os << "BxDistribution_" << wheelOrDiskType << "_" << wheelOrDiskNumber;
417  if (meWheelDisk[os.str()])
418  meWheelDisk[os.str()]->Fill(bx);
419 
420  os.str("");
421  os << "ClusterSize_" << wheelOrDiskType << "_" << wheelOrDiskNumber << "_Layer" << layer;
422  if (meWheelDisk[os.str()])
423  meWheelDisk[os.str()]->Fill(clusterSize);
424 
425  os.str("");
426  os << "ClusterSize_" << wheelOrDiskType << "_" << wheelOrDiskNumber << "_Ring" << ring;
427  if (meWheelDisk[os.str()])
428  meWheelDisk[os.str()]->Fill(clusterSize);
429 
430  // ###################### Global ##################################
431 
432  os.str("");
433  os << "ClusterSize_" << RPCMonitorDigi::regionNames_[region + 1];
434  if (meRegion[os.str()])
435  meRegion[os.str()]->Fill(clusterSize);
436 
437  os.str("");
438  os << "ClusterSize_";
439  if (region == 0) {
440  os << "Layer" << layer;
441  } else {
442  os << "Ring" << ring;
443  }
444  if (meRegion[os.str()])
445  meRegion[os.str()]->Fill(clusterSize);
446 
447  } //end loop on recHits
448 
449  os.str("");
450  os << "BXWithData_" << nameRoll;
451  if (meMap[os.str()])
452  meMap[os.str()]->Fill(bxSet.size());
453 
454  os.str("");
455  os << "NumberOfClusters_" << nameRoll;
456  if (meMap[os.str()])
457  meMap[os.str()]->Fill(numberOfRecHits);
458 
459  os.str("");
460  os << "Multiplicity_" << RPCMonitorDigi::regionNames_[region + 1];
461  if (meRegion[os.str()])
462  meRegion[os.str()]->Fill(numDigi);
463 
464  os.str("");
465  if (region == 0) {
466  os << "Occupancy_for_Barrel";
467  if (meRegion[os.str()])
468  meRegion[os.str()]->Fill(sector, wheelOrDiskNumber, numDigi);
469  } else {
470  os << "Occupancy_for_Endcap";
471  int xbin = wheelOrDiskNumber + numberOfDisks_;
472  if (region == -1) {
473  xbin = wheelOrDiskNumber + numberOfDisks_ + 1;
474  }
475  if (meRegion[os.str()]) {
476  meRegion[os.str()]->Fill(xbin, ring, numDigi);
477  }
478  }
479 
480  os.str("");
481  os << "Multiplicity_" << nameRoll;
482  if (meMap[os.str()])
483  meMap[os.str()]->Fill(numDigi);
484 
485  } //end loop on rolls
486 
487  for (int i = 0; i < 3; i++) {
488  os.str("");
489  os << "NumberOfClusters_" << RPCMonitorDigi::regionNames_[i];
490  if (meRegion[os.str()])
491  meRegion[os.str()]->Fill(totalNumberOfRecHits[i]);
492  }
493 }

References funct::abs(), l1GtPatternGenerator_cfi::bx, RPCGeomServ::chambername(), rpcdqm::utils::detId2RollNr(), mps_fire::i, createfilelist::int, RPCDetId::layer(), phase1PixelTopology::layer, genParticles_cff::map, meMuonCollection, meNoiseCollection, muonFolder_, RPCGeomServ::name(), noiseFolder_, EgHLTOffHistBins_cfi::nr, numberOfDisks_, rpcPointValidation_cfi::recHit, FastTrackerRecHitMaskProducer_cfi::recHits, RPCDetId::region(), HLT_FULL_cff::region, regionMuonCollection, regionNames_, regionNoiseCollection, RPCDetId::ring(), relativeConstraints::ring, RPCDetId::roll(), alignCSCRings::s, RPCDetId::sector(), sectorRingMuonCollection, sectorRingNoiseCollection, RPCGeomServ::segment(), relativeConstraints::station, RPCDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, useRollInfo_, wheelDiskMuonCollection, and wheelDiskNoiseCollection.

Referenced by analyze().

◆ stripsInRoll()

int RPCMonitorDigi::stripsInRoll ( const RPCDetId id,
const RPCGeometry rpcGeo 
) const
private

Definition at line 279 of file RPCBookDetUnitME.cc.

279  {
280  const RPCRoll* rpcRoll = rpcGeo->roll(id);
281  if (!rpcRoll)
282  return 1;
283 
284  return rpcRoll->nstrips();
285 }

References RPCRoll::nstrips(), and RPCGeometry::roll().

Referenced by bookRollME().

Member Data Documentation

◆ counter

int RPCMonitorDigi::counter
private

Definition at line 51 of file RPCMonitorDigi.h.

Referenced by counter.Counters::__getitem__(), and analyze().

◆ globalFolder_

std::string RPCMonitorDigi::globalFolder_
private

Definition at line 73 of file RPCMonitorDigi.h.

Referenced by bookRegionME(), bookWheelDiskME(), and RPCMonitorDigi().

◆ meMuonCollection

std::map<std::string, std::map<std::string, MonitorElement *> > RPCMonitorDigi::meMuonCollection
private

Definition at line 63 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

◆ meNoiseCollection

std::map<std::string, std::map<std::string, MonitorElement *> > RPCMonitorDigi::meNoiseCollection
private

Definition at line 68 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

◆ muEtaCut_

float RPCMonitorDigi::muEtaCut_
private

Definition at line 53 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

◆ muonFolder_

std::string RPCMonitorDigi::muonFolder_
private

Definition at line 49 of file RPCMonitorDigi.h.

Referenced by analyze(), bookHistograms(), performSourceOperation(), and RPCMonitorDigi().

◆ muonLabel_

edm::EDGetTokenT<reco::CandidateView> RPCMonitorDigi::muonLabel_
private

Definition at line 76 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

◆ muonRPCEvents_

MonitorElement* RPCMonitorDigi::muonRPCEvents_
private

Definition at line 56 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

◆ muPtCut_

float RPCMonitorDigi::muPtCut_
private

Definition at line 53 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

◆ noiseFolder_

std::string RPCMonitorDigi::noiseFolder_
private

Definition at line 50 of file RPCMonitorDigi.h.

Referenced by analyze(), bookHistograms(), performSourceOperation(), and RPCMonitorDigi().

◆ noiseRPCEvents_

MonitorElement* RPCMonitorDigi::noiseRPCEvents_
private

Definition at line 55 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

◆ numberOfDisks_

int RPCMonitorDigi::numberOfDisks_
private

◆ numberOfInnerRings_

int RPCMonitorDigi::numberOfInnerRings_
private

Definition at line 61 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), bookRegionME(), bookSectorRingME(), and bookWheelDiskME().

◆ NumberOfMuon_

MonitorElement* RPCMonitorDigi::NumberOfMuon_
private

Definition at line 59 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

◆ NumberOfRecHitMuon_

MonitorElement* RPCMonitorDigi::NumberOfRecHitMuon_
private

Definition at line 58 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

◆ regionMuonCollection

std::map<std::string, MonitorElement *> RPCMonitorDigi::regionMuonCollection
private

Definition at line 65 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

◆ regionNames_

const std::array< std::string, 3 > RPCMonitorDigi::regionNames_ = {{"Endcap-", "Barrel", "Endcap+"}}
staticprivate

Definition at line 48 of file RPCMonitorDigi.h.

Referenced by bookRegionME(), and performSourceOperation().

◆ regionNoiseCollection

std::map<std::string, MonitorElement *> RPCMonitorDigi::regionNoiseCollection
private

Definition at line 70 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

◆ rpcRecHitLabel_

edm::EDGetTokenT<RPCRecHitCollection> RPCMonitorDigi::rpcRecHitLabel_
private

Definition at line 77 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

◆ scalersRawToDigiLabel_

edm::EDGetTokenT<DcsStatusCollection> RPCMonitorDigi::scalersRawToDigiLabel_
private

Definition at line 78 of file RPCMonitorDigi.h.

Referenced by RPCMonitorDigi().

◆ sectorRingMuonCollection

std::map<std::string, MonitorElement *> RPCMonitorDigi::sectorRingMuonCollection
private

Definition at line 66 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

◆ sectorRingNoiseCollection

std::map<std::string, MonitorElement *> RPCMonitorDigi::sectorRingNoiseCollection
private

Definition at line 71 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

◆ subsystemFolder_

std::string RPCMonitorDigi::subsystemFolder_
private

◆ useMuonDigis_

bool RPCMonitorDigi::useMuonDigis_
private

Definition at line 43 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and RPCMonitorDigi().

◆ useRollInfo_

bool RPCMonitorDigi::useRollInfo_
private

◆ wheelDiskMuonCollection

std::map<std::string, MonitorElement *> RPCMonitorDigi::wheelDiskMuonCollection
private

Definition at line 64 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

◆ wheelDiskNoiseCollection

std::map<std::string, MonitorElement *> RPCMonitorDigi::wheelDiskNoiseCollection
private

Definition at line 69 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

rpcdqm::utils::labelXAxisSegment
void labelXAxisSegment(MonitorElement *myMe)
Definition: utils.h:247
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
RPCRoll
Definition: RPCRoll.h:12
counter
Definition: counter.py:1
RPCMonitorDigi::counter
int counter
Definition: RPCMonitorDigi.h:51
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
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
RPCMonitorDigi::NumberOfRecHitMuon_
MonitorElement * NumberOfRecHitMuon_
Definition: RPCMonitorDigi.h:58
reco::Track::recHitsBegin
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
rpcdqm::RPCMEHelper::setNoAlphanumeric
static void setNoAlphanumeric(MonitorElement *myMe)
Definition: utils.h:18
RPCMonitorDigi::muEtaCut_
float muEtaCut_
Definition: RPCMonitorDigi.h:53
printsummarytable.folder
folder
Definition: printsummarytable.py:7
relativeConstraints.station
station
Definition: relativeConstraints.py:67
RPCMonitorDigi::performSourceOperation
void performSourceOperation(std::map< RPCDetId, std::vector< RPCRecHit > > &, std::string)
Definition: RPCMonitorDigi.cc:214
RPCDetId
Definition: RPCDetId.h:16
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
RPCMonitorDigi::NumberOfMuon_
MonitorElement * NumberOfMuon_
Definition: RPCMonitorDigi.h:59
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
RPCMonitorDigi::sectorRingNoiseCollection
std::map< std::string, MonitorElement * > sectorRingNoiseCollection
Definition: RPCMonitorDigi.h:71
RPCGeometry::roll
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:50
rpcdqm::utils::labelYAxisRoll
void labelYAxisRoll(MonitorElement *myMe, int region, int ring, bool useRollInfo)
Definition: utils.h:265
RPCMonitorDigi::subsystemFolder_
std::string subsystemFolder_
Definition: RPCMonitorDigi.h:74
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
RPCChamber::rolls
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Definition: RPCChamber.cc:40
RPCMonitorDigi::numberOfDisks_
int numberOfDisks_
Definition: RPCMonitorDigi.h:61
edm::Handle
Definition: AssociativeIterator.h:50
RPCMonitorDigi::noiseFolder_
std::string noiseFolder_
Definition: RPCMonitorDigi.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
RPCChamber
Definition: RPCChamber.h:19
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
RPCMonitorDigi::meMuonCollection
std::map< std::string, std::map< std::string, MonitorElement * > > meMuonCollection
Definition: RPCMonitorDigi.h:63
reco::Muon
Definition: Muon.h:27
RPCBookFolderStructure::folderStructure
std::string folderStructure(RPCDetId detId)
Definition: RPCBookFolderStructure.h:18
RPCMonitorDigi::bookRollME
void bookRollME(DQMStore::IBooker &, const RPCDetId &, const RPCGeometry *rpcGeo, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElement for one RPCDetId (= roll)
Definition: RPCBookDetUnitME.cc:8
alignCSCRings.s
s
Definition: alignCSCRings.py:92
RPCMonitorDigi::wheelDiskNoiseCollection
std::map< std::string, MonitorElement * > wheelDiskNoiseCollection
Definition: RPCMonitorDigi.h:69
RPCMonitorDigi::regionMuonCollection
std::map< std::string, MonitorElement * > regionMuonCollection
Definition: RPCMonitorDigi.h:65
rpcdqm::utils
Definition: utils.h:29
RPCMonitorDigi::muonLabel_
edm::EDGetTokenT< reco::CandidateView > muonLabel_
Definition: RPCMonitorDigi.h:76
RPCRecHit
Definition: RPCRecHit.h:14
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
reco::Track::recHitsEnd
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
reco::Track
Definition: Track.h:27
reco::Muon::outerTrack
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
Definition: Muon.h:48
edm::ESHandle< RPCGeometry >
RPCMonitorDigi::muPtCut_
float muPtCut_
Definition: RPCMonitorDigi.h:53
RPCGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: RPCGeometry.cc:24
RPCMonitorDigi::scalersRawToDigiLabel_
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCMonitorDigi.h:78
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::View::size
size_type size() const
RPCMonitorDigi::regionNames_
static const std::array< std::string, 3 > regionNames_
Definition: RPCMonitorDigi.h:48
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
reco::Muon::isGlobalMuon
bool isGlobalMuon() const override
Definition: Muon.h:299
RPCBookFolderStructure
Definition: RPCBookFolderStructure.h:13
RPCDetId::roll
int roll() const
Definition: RPCDetId.h:92
RPCMonitorDigi::bookWheelDiskME
void bookWheelDiskME(DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElemnt at Wheel/Disk level.
Definition: RPCBookDetUnitME.cc:197
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
RPCMonitorDigi::useMuonDigis_
bool useMuonDigis_
Definition: RPCMonitorDigi.h:43
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
RPCMonitorDigi::stripsInRoll
int stripsInRoll(const RPCDetId &id, const RPCGeometry *rpcGeo) const
Definition: RPCBookDetUnitME.cc:279
RPCMonitorDigi::meNoiseCollection
std::map< std::string, std::map< std::string, MonitorElement * > > meNoiseCollection
Definition: RPCMonitorDigi.h:68
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88271
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
createfilelist.int
int
Definition: createfilelist.py:10
RPCMonitorDigi::numberOfInnerRings_
int numberOfInnerRings_
Definition: RPCMonitorDigi.h:61
RPCRoll::nstrips
int nstrips() const
Definition: RPCRoll.cc:24
rpcdqm::utils::labelYAxisRing
void labelYAxisRing(MonitorElement *myMe, int numberOfRings, bool useRollInfo)
Definition: utils.h:291
RPCMonitorDigi::noiseRPCEvents_
MonitorElement * noiseRPCEvents_
Definition: RPCMonitorDigi.h:55
RPCMonitorDigi::bookRegionME
void bookRegionME(DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElemnt at region (Barrel/Endcap) level.
Definition: RPCBookDetUnitME.cc:287
rpcdqm::utils::detId2RollNr
int detId2RollNr(const RPCDetId &_id)
Definition: utils.h:31
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
TrackingRecHit::clone
virtual TrackingRecHit * clone() const =0
reco::Candidate
Definition: Candidate.h:27
RPCDetId::ring
int ring() const
Definition: RPCDetId.h:59
TrackingRecHit
Definition: TrackingRecHit.h:21
RPCMonitorDigi::sectorRingMuonCollection
std::map< std::string, MonitorElement * > sectorRingMuonCollection
Definition: RPCMonitorDigi.h:66
alignCSCRings.r
r
Definition: alignCSCRings.py:93
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
RPCMonitorDigi::globalFolder_
std::string globalFolder_
Definition: RPCMonitorDigi.h:73
RPCMonitorDigi::regionNoiseCollection
std::map< std::string, MonitorElement * > regionNoiseCollection
Definition: RPCMonitorDigi.h:70
RPCMonitorDigi::bookSectorRingME
void bookSectorRingME(DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElement at Sector/Ring level.
Definition: RPCBookDetUnitME.cc:76
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
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
RPCMonitorDigi::useRollInfo_
bool useRollInfo_
Definition: RPCMonitorDigi.h:54
RPCDetId::sector
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:81
RPCMonitorDigi::muonFolder_
std::string muonFolder_
Definition: RPCMonitorDigi.h:49
rpcdqm::utils::labelXAxisSector
void labelXAxisSector(MonitorElement *myMe)
Definition: utils.h:231
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
RPCMonitorDigi::wheelDiskMuonCollection
std::map< std::string, MonitorElement * > wheelDiskMuonCollection
Definition: RPCMonitorDigi.h:64
RPCGeometry
Definition: RPCGeometry.h:20
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
genParticles_cff.map
map
Definition: genParticles_cff.py:11
RPCMonitorDigi::rpcRecHitLabel_
edm::EDGetTokenT< RPCRecHitCollection > rpcRecHitLabel_
Definition: RPCMonitorDigi.h:77
RPCRecHit::rpcId
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:71
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
RPCDetId::layer
int layer() const
Definition: RPCDetId.h:85
patZpeak.numMuons
numMuons
Definition: patZpeak.py:41
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
RPCMonitorDigi::muonRPCEvents_
MonitorElement * muonRPCEvents_
Definition: RPCMonitorDigi.h:56
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
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