CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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::CandidateView
muonLabel_
 
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::ESGetToken< RPCGeometry,
MuonGeometryRecord
rpcGeomToken_
 
edm::EDGetTokenT
< RPCRecHitCollection
rpcRecHitLabel_
 
edm::EDGetTokenT
< DcsStatusCollection
scalersRawToDigiLabel_
 
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 >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 20 of file RPCMonitorDigi.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file RPCMonitorDigi.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), globalFolder_, muEtaCut_, muonFolder_, muonLabel_, muPtCut_, noiseFolder_, rpcGeomToken_, rpcRecHitLabel_, scalersRawToDigiLabel_, AlCaHLTBitMon_QueryRunRegistry::string, subsystemFolder_, useMuonDigis_, and useRollInfo_.

18  : counter(0),
19  muonRPCEvents_(nullptr),
20  NumberOfRecHitMuon_(nullptr),
21  NumberOfMuon_(nullptr),
22  numberOfDisks_(0),
24  useMuonDigis_ = pset.getUntrackedParameter<bool>("UseMuon", true);
25  useRollInfo_ = pset.getUntrackedParameter<bool>("UseRollInfo", false);
26 
27  muPtCut_ = pset.getUntrackedParameter<double>("MuonPtCut", 3.0);
28  muEtaCut_ = pset.getUntrackedParameter<double>("MuonEtaCut", 1.9);
29 
30  subsystemFolder_ = pset.getUntrackedParameter<std::string>("RPCFolder", "RPC");
31  globalFolder_ = pset.getUntrackedParameter<std::string>("GlobalFolder", "SummaryHistograms");
32 
33  //Parametersets for tokens
34  muonLabel_ = consumes<reco::CandidateView>(pset.getParameter<edm::InputTag>("MuonLabel"));
35  rpcRecHitLabel_ = consumes<RPCRecHitCollection>(pset.getParameter<edm::InputTag>("RecHitLabel"));
36  scalersRawToDigiLabel_ = consumes<DcsStatusCollection>(pset.getParameter<edm::InputTag>("ScalersRawToDigiLabel"));
37 
38  noiseFolder_ = pset.getUntrackedParameter<std::string>("NoiseFolder", "AllHits");
39  muonFolder_ = pset.getUntrackedParameter<std::string>("MuonFolder", "Muon");
40 
41  rpcGeomToken_ = esConsumes<edm::Transition::BeginRun>();
42 }
T getUntrackedParameter(std::string const &, T const &) const
std::string globalFolder_
std::string muonFolder_
MonitorElement * muonRPCEvents_
std::string noiseFolder_
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
MonitorElement * NumberOfRecHitMuon_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< RPCRecHitCollection > rpcRecHitLabel_
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
MonitorElement * NumberOfMuon_
std::string subsystemFolder_
edm::EDGetTokenT< reco::CandidateView > muonLabel_
RPCMonitorDigi::~RPCMonitorDigi ( )
overridedefault

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 113 of file RPCMonitorDigi.cc.

References TrackingRecHit::clone(), counter, reco::LeafCandidate::eta(), dqm::impl::MonitorElement::Fill(), mps_fire::i, 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(), and rpcRecHitLabel_.

113  {
114  counter++;
115  edm::LogInfo("rpcmonitordigi") << "[RPCMonitorDigi]: Beginning analyzing event " << counter;
116 
117  //Muons
119  event.getByToken(muonLabel_, muonCands);
120 
121  std::map<RPCDetId, std::vector<RPCRecHit> > rechitMuon;
122 
123  int numMuons = 0;
124  int numRPCRecHit = 0;
125 
126  if (muonCands.isValid()) {
127  int nStaMuons = muonCands->size();
128 
129  for (int i = 0; i < nStaMuons; i++) {
130  const reco::Candidate& goodMuon = (*muonCands)[i];
131  const reco::Muon* muCand = dynamic_cast<const reco::Muon*>(&goodMuon);
132 
133  if (!muCand->isGlobalMuon())
134  continue;
135  if (muCand->pt() < muPtCut_ || fabs(muCand->eta()) > muEtaCut_)
136  continue;
137  numMuons++;
138  reco::Track muTrack = (*(muCand->outerTrack()));
139  std::vector<TrackingRecHitRef> rpcTrackRecHits;
140  //loop on mu rechits
141  for (trackingRecHit_iterator it = muTrack.recHitsBegin(); it != muTrack.recHitsEnd(); it++) {
142  if (!(*it)->isValid())
143  continue;
144  int muSubDetId = (*it)->geographicalId().subdetId();
145  if (muSubDetId == MuonSubdetId::RPC) {
146  numRPCRecHit++;
147  TrackingRecHit* tkRecHit = (*it)->clone();
148  RPCRecHit* rpcRecHit = dynamic_cast<RPCRecHit*>(tkRecHit);
149  int detId = (int)rpcRecHit->rpcId();
150  if (rechitMuon.find(detId) == rechitMuon.end() || rechitMuon[detId].empty()) {
151  std::vector<RPCRecHit> myVect(1, *rpcRecHit);
152  rechitMuon[detId] = myVect;
153  } else {
154  rechitMuon[detId].push_back(*rpcRecHit);
155  }
156  }
157  } // end loop on mu rechits
158  }
159 
160  //Fill muon counter
161  if (NumberOfMuon_) {
162  NumberOfMuon_->Fill(numMuons);
163  }
164 
165  //Fill rechit counter for muons
166  if (NumberOfRecHitMuon_ && numMuons > 0) {
167  NumberOfRecHitMuon_->Fill(numRPCRecHit);
168  }
169 
170  //Fill counter of RPC events with rechits associated in with a muon
171  if (muonRPCEvents_ != nullptr && numRPCRecHit > 0) {
172  muonRPCEvents_->Fill(1);
173  }
174 
175  //Perform client operation
176  this->performSourceOperation(rechitMuon, muonFolder_);
177 
178  } else {
179  edm::LogError("rpcmonitordigi") << "[RPCMonitorDigi]: Muons - Product not valid for event" << counter;
180  }
181 
182  //RecHits
184  event.getByToken(rpcRecHitLabel_, rpcHits);
185  std::map<RPCDetId, std::vector<RPCRecHit> > rechitNoise;
186 
187  if (rpcHits.isValid()) {
188  // RPC rec hits NOT associated to a muon
189  for (auto rpcRecHitIter = rpcHits->begin(); rpcRecHitIter != rpcHits->end(); rpcRecHitIter++) {
190  RPCRecHit rpcRecHit = (*rpcRecHitIter);
191  int detId = (int)rpcRecHit.rpcId();
192  if (rechitNoise.find(detId) == rechitNoise.end() || rechitNoise[detId].empty()) {
193  std::vector<RPCRecHit> myVect(1, rpcRecHit);
194  rechitNoise[detId] = myVect;
195  } else {
196  rechitNoise[detId].push_back(rpcRecHit);
197  }
198  }
199  } else {
200  edm::LogError("rpcmonitordigi") << "[RPCMonitorDigi]: RPCRecHits - Product not valid for event" << counter;
201  }
202 
203  //Fill counter for all RPC events
204  if (noiseRPCEvents_ != nullptr && !rechitNoise.empty()) {
205  noiseRPCEvents_->Fill(1);
206  }
207  //Perform client operation
208  this->performSourceOperation(rechitNoise, noiseFolder_);
209 }
double pt() const final
transverse momentum
std::string muonFolder_
MonitorElement * muonRPCEvents_
Log< level::Error, false > LogError
std::string noiseFolder_
void Fill(long long x)
tuple numMuons
Definition: patZpeak.py:41
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:71
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
bool isValid() const
Definition: HandleBase.h:70
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
Definition: Muon.h:48
MonitorElement * NumberOfRecHitMuon_
virtual TrackingRecHit * clone() const =0
Log< level::Info, false > LogInfo
static constexpr int RPC
Definition: MuonSubdetId.h:13
edm::EDGetTokenT< RPCRecHitCollection > rpcRecHitLabel_
void performSourceOperation(std::map< RPCDetId, std::vector< RPCRecHit > > &, std::string)
MonitorElement * noiseRPCEvents_
MonitorElement * NumberOfMuon_
bool isGlobalMuon() const override
Definition: Muon.h:299
edm::EDGetTokenT< reco::CandidateView > muonLabel_
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
double eta() const final
momentum pseudorapidity
void RPCMonitorDigi::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  r,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 44 of file RPCMonitorDigi.cc.

References dqm::implementation::IBooker::book1D(), bookRegionME(), bookRollME(), bookSectorRingME(), bookWheelDiskME(), RPCNameHelper::chamberName(), edm::EventSetup::getData(), meMuonCollection, meNoiseCollection, min(), muonFolder_, muonRPCEvents_, noiseFolder_, noiseRPCEvents_, numberOfDisks_, numberOfInnerRings_, NumberOfMuon_, NumberOfRecHitMuon_, RPCDetId::region(), regionMuonCollection, regionNoiseCollection, RPCDetId::ring(), RPCNameHelper::rollName(), RPCChamber::rolls(), rpcGeomToken_, sectorRingMuonCollection, sectorRingNoiseCollection, dqm::implementation::NavigatorBase::setCurrentFolder(), RPCDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, subsystemFolder_, useMuonDigis_, useRollInfo_, wheelDiskMuonCollection, and wheelDiskNoiseCollection.

44  {
45  edm::LogInfo("rpcmonitordigi") << "[RPCMonitorDigi]: Begin Run ";
46 
47  numberOfInnerRings_ = 4; // set default value
48 
49  std::set<int> disk_set;
50  const auto& rpcGeo = iSetup.getData(rpcGeomToken_);
51 
52  //loop on geometry to book all MEs
53  edm::LogInfo("rpcmonitordigi") << "[RPCMonitorDigi]: Booking histograms per roll. ";
54  for (auto ich : rpcGeo.dets()) {
55  const RPCChamber* ch = dynamic_cast<const RPCChamber*>(ich);
56  if (!ch)
57  continue;
58  const auto& roles = ch->rolls();
59 
60  if (useRollInfo_) {
61  for (auto roll : roles) {
62  const RPCDetId& rpcId = roll->id();
63 
64  //get station and inner ring
65  if (rpcId.region() != 0) {
66  disk_set.insert(rpcId.station());
68  }
69 
70  //booking all histograms
71  const std::string nameID = RPCNameHelper::rollName(rpcId);
72  if (useMuonDigis_)
73  bookRollME(ibooker, rpcId, &rpcGeo, muonFolder_, meMuonCollection[nameID]);
74  bookRollME(ibooker, rpcId, &rpcGeo, noiseFolder_, meNoiseCollection[nameID]);
75  }
76  } else {
77  const RPCDetId& rpcId = roles[0]->id(); //any roll would do - here I just take the first one
78  const std::string nameID = RPCNameHelper::chamberName(rpcId);
79  if (useMuonDigis_)
80  bookRollME(ibooker, rpcId, &rpcGeo, muonFolder_, meMuonCollection[nameID]);
81  bookRollME(ibooker, rpcId, &rpcGeo, noiseFolder_, meNoiseCollection[nameID]);
82  if (rpcId.region() != 0) {
83  disk_set.insert(rpcId.station());
85  }
86  }
87  } //end loop on geometry to book all MEs
88 
89  numberOfDisks_ = disk_set.size();
90 
91  //Book
95 
97 
98  noiseRPCEvents_ = ibooker.book1D("RPCEvents", "RPCEvents", 1, 0.5, 1.5);
99 
100  if (useMuonDigis_) {
104 
106 
107  muonRPCEvents_ = ibooker.book1D("RPCEvents", "RPCEvents", 1, 0.5, 1.5);
108  NumberOfMuon_ = ibooker.book1D("NumberOfMuons", "Number of Muons", 11, -0.5, 10.5);
109  NumberOfRecHitMuon_ = ibooker.book1D("NumberOfRecHitMuons", "Number of RPC RecHits per Muon", 8, -0.5, 7.5);
110  }
111 }
std::map< std::string, std::map< std::string, MonitorElement * > > meMuonCollection
std::string muonFolder_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::map< std::string, MonitorElement * > wheelDiskNoiseCollection
std::map< std::string, MonitorElement * > sectorRingMuonCollection
MonitorElement * muonRPCEvents_
void bookSectorRingME(DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElement at Sector/Ring level.
std::string noiseFolder_
static std::string rollName(const RPCDetId &detId)
int ring() const
Definition: RPCDetId.h:59
void bookRollME(DQMStore::IBooker &, const RPCDetId &, const RPCGeometry *rpcGeo, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElement for one RPCDetId (= roll)
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Definition: RPCChamber.cc:40
T min(T a, T b)
Definition: MathUtil.h:58
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
MonitorElement * NumberOfRecHitMuon_
std::map< std::string, MonitorElement * > regionMuonCollection
Log< level::Info, false > LogInfo
std::map< std::string, MonitorElement * > sectorRingNoiseCollection
static std::string chamberName(const RPCDetId &detId)
std::map< std::string, std::map< std::string, MonitorElement * > > meNoiseCollection
std::map< std::string, MonitorElement * > wheelDiskMuonCollection
void bookWheelDiskME(DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElemnt at Wheel/Disk level.
std::map< std::string, MonitorElement * > regionNoiseCollection
MonitorElement * noiseRPCEvents_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void bookRegionME(DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElemnt at region (Barrel/Endcap) level.
MonitorElement * NumberOfMuon_
std::string subsystemFolder_
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:53
int station() const
Definition: RPCDetId.h:78
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 213 of file RPCBookDetUnitME.cc.

References newFWLiteAna::bin, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), globalFolder_, phase1PixelTopology::layer, mergeVDriftHistosByStation::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().

215  {
216  std::string currentFolder = subsystemFolder_ + "/" + recHitType + "/" + globalFolder_;
217  ibooker.setCurrentFolder(currentFolder);
218 
219  std::stringstream name;
220  std::stringstream title;
221  for (int r = 0; r < 3; r++) { //RPC regions are E-, B, and E+
222 
224  //Cluster size
225  name.str("");
226  title.str("");
227  name << "ClusterSize_" << regionName;
228  title << "ClusterSize - " << regionName;
229  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
230  }
231 
232  //Number of Cluster
233  name.str("");
234  title.str("");
235  name << "NumberOfClusters_Barrel";
236  title << "Number of Clusters per Event - Barrel";
237  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 30, 0.5, 30.5);
238 
239  name.str("");
240  title.str("");
241  name << "NumberOfClusters_Endcap+";
242  title << "Number of Clusters per Event - Endcap+";
243  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 15, 0.5, 15.5);
244 
245  name.str("");
246  title.str("");
247  name << "NumberOfClusters_Endcap-";
248  title << "Number of Clusters per Event - Endcap-";
249  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 15, 0.5, 15.5);
250 
251  //Number of Digis
252  name.str("");
253  title.str("");
254  name << "Multiplicity_Barrel";
255  title << "Multiplicity per Event per Roll - Barrel";
256  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 50, 0.5, 50.5);
257 
258  name.str("");
259  title.str("");
260  name << "Multiplicity_Endcap+";
261  title << "Multiplicity per Event per Roll - Endcap+";
262  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 32, 0.5, 32.5);
263 
264  name.str("");
265  title.str("");
266  name << "Multiplicity_Endcap-";
267  title << "Multiplicity per Event per Roll - Endcap-";
268  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 32, 0.5, 32.5);
269 
270  for (int layer = 1; layer <= 6; layer++) {
271  name.str("");
272  title.str("");
273  name << "ClusterSize_Layer" << layer;
274  title << "ClusterSize - Layer" << layer;
275  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
276  }
277 
278  for (int ring = RPCMonitorDigi::numberOfInnerRings_; ring <= 3; ring++) {
279  name.str("");
280  title.str("");
281  name << "ClusterSize_Ring" << ring;
282  title << "ClusterSize - Ring" << ring;
283  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
284  }
285 
286  meMap["Occupancy_for_Endcap"] = ibooker.book2D("Occupancy_for_Endcap",
287  "Occupancy Endcap",
289  0.5,
290  ((float)RPCMonitorDigi::numberOfDisks_ * 2.0) + 0.5,
291  2,
292  1.5,
293  3.5);
294  meMap["Occupancy_for_Endcap"]->setAxisTitle("Disk", 1);
295  meMap["Occupancy_for_Endcap"]->setAxisTitle("Ring", 2);
296 
297  std::stringstream binlabel;
298  for (int bin = 1; bin <= RPCMonitorDigi::numberOfDisks_ * 2; bin++) {
299  binlabel.str("");
300  if (bin < (RPCMonitorDigi::numberOfDisks_ + 1)) { //negative endcap
301  binlabel << (bin - (RPCMonitorDigi::numberOfDisks_ + 1));
302  } else { //positive endcaps
303  binlabel << (bin - RPCMonitorDigi::numberOfDisks_);
304  }
305  meMap["Occupancy_for_Endcap"]->setBinLabel(bin, binlabel.str(), 1);
306  }
307 
308  meMap["Occupancy_for_Endcap"]->setBinLabel(1, "2", 2);
309  meMap["Occupancy_for_Endcap"]->setBinLabel(2, "3", 2);
310 
311  meMap["Occupancy_for_Barrel"] =
312  ibooker.book2D("Occupancy_for_Barrel", "Occupancy Barrel", 12, 0.5, 12.5, 5, -2.5, 2.5);
313  meMap["Occupancy_for_Barrel"]->setAxisTitle("Sec", 1);
314  meMap["Occupancy_for_Barrel"]->setAxisTitle("Wheel", 2);
315 
316  for (int bin = 1; bin <= 12; bin++) {
317  binlabel.str("");
318  binlabel << bin;
319  meMap["Occupancy_for_Barrel"]->setBinLabel(bin, binlabel.str(), 1);
320  if (bin <= 5) {
321  binlabel.str("");
322  binlabel << (bin - 3);
323  meMap["Occupancy_for_Barrel"]->setBinLabel(bin, binlabel.str(), 2);
324  }
325  }
326 }
std::string globalFolder_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
constexpr std::array< uint8_t, layerIndexSize > layer
static const std::array< std::string, 3 > regionNames_
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
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
std::string subsystemFolder_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
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 7 of file RPCBookDetUnitME.cc.

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

Referenced by bookHistograms().

11  {
12  ibooker.setCurrentFolder(
14 
15  //get number of strips in current roll
16  int nstrips = this->stripsInRoll(detId, rpcGeo);
17  if (nstrips == 0) {
18  nstrips = 1;
19  }
20 
22  const std::string nameRoll = RPCNameHelper::name(detId, useRollInfo_);
23 
25  if (detId.region() != 0 || //Endcaps
26  (abs(detId.ring()) == 2 && detId.station() == 2 && detId.layer() != 1) || //Wheel -/+2 RB2out
27  (abs(detId.ring()) != 2 && detId.station() == 2 && detId.layer() == 1)) {
28  nstrips *= 3;
29  } //Wheel -1,0,+1 RB2in
30  else {
31  nstrips *= 2;
32  }
33  }
34 
35  std::string tmpStr;
36 
37  tmpStr = "Occupancy_" + nameRoll;
38  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, nstrips, 0.5, nstrips + 0.5);
39 
40  tmpStr = "BXDistribution_" + nameRoll;
41  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, 7, -3.5, 3.5);
42 
43  if (detId.region() == 0) {
44  tmpStr = "ClusterSize_" + nameRoll;
45  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, 15, 0.5, 15.5);
46 
47  tmpStr = "Multiplicity_" + nameRoll;
48  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, 30, 0.5, 30.5);
49 
50  } else {
51  tmpStr = "ClusterSize_" + nameRoll;
52  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, 10, 0.5, 10.5);
53 
54  tmpStr = "Multiplicity_" + nameRoll;
55  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, 15, 0.5, 15.5);
56  }
57 
58  tmpStr = "NumberOfClusters_" + nameRoll;
59  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, 10, 0.5, 10.5);
60 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
int stripsInRoll(const RPCDetId &id, const RPCGeometry *rpcGeo) const
int ring() const
Definition: RPCDetId.h:59
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static std::string name(const RPCDetId &detId, const bool useRoll)
Definition: RPCNameHelper.cc:6
int layer() const
Definition: RPCDetId.h:85
static std::string folderStructure(const RPCDetId &detId)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
std::string subsystemFolder_
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:53
int station() const
Definition: RPCDetId.h:78
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 62 of file RPCBookDetUnitME.cc.

References dqm::implementation::IBooker::book2D(), diffTreeTool::format(), mps_fire::i, hlt_dqm_clientPB-live_cfg::me1, hlt_dqm_clientPB-live_cfg::me2, numberOfDisks_, numberOfInnerRings_, HLT_FULL_cff::region, relativeConstraints::ring, dqm::impl::MonitorElement::setAxisTitle(), RPCRollMapHisto::setBarrelRollAxis(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and subsystemFolder_.

Referenced by bookHistograms().

64  {
65  for (int wheel = -2; wheel <= 2; wheel++) {
66  ibooker.setCurrentFolder(
67  fmt::format("{}/{}/Barrel/Wheel_{}/SummaryBySectors", subsystemFolder_, recHitType, wheel));
68 
69  for (int sector = 1; sector <= 12; sector++) {
70  const std::string meName = fmt::format("Occupancy_Wheel_{}_Sector_{}", wheel, sector);
71 
72  if (sector == 9 || sector == 11)
73  meMap[meName] = ibooker.book2D(meName, meName, 91, 0.5, 91.5, 15, 0.5, 15.5);
74  else if (sector == 4)
75  meMap[meName] = ibooker.book2D(meName, meName, 91, 0.5, 91.5, 21, 0.5, 21.5);
76  else
77  meMap[meName] = ibooker.book2D(meName, meName, 91, 0.5, 91.5, 17, 0.5, 17.5);
78 
79  meMap[meName]->setAxisTitle("strip", 1);
80  RPCRollMapHisto::setBarrelRollAxis(meMap[meName], wheel, 2, true);
81  }
82  }
83 
84  for (int region = -1; region <= 1; region++) {
85  if (region == 0)
86  continue;
87 
88  std::string regionName = "Endcap-";
89  if (region == 1)
90  regionName = "Endcap+";
91 
92  for (int disk = 1; disk <= RPCMonitorDigi::numberOfDisks_; disk++) {
93  ibooker.setCurrentFolder(
94  fmt::format("{}/{}/{}/Disk_{}/SummaryByRings/", subsystemFolder_, recHitType, regionName, region * disk));
95 
96  for (int ring = RPCMonitorDigi::numberOfInnerRings_; ring <= 3; ring++) {
97  const std::string meName1 = fmt::format("Occupancy_Disk_{}_Ring_{}_CH01-CH18", (region * disk), ring);
98 
99  auto me1 = ibooker.book2D(meName1, meName1, 96, 0.5, 96.5, 18, 0.5, 18.5);
100  me1->setAxisTitle("strip", 1);
101 
102  for (int i = 1; i <= 18; i++) {
103  const std::string ylabel = fmt::format("R{}_CH{:02d}", ring, i);
104  me1->setBinLabel(i, ylabel, 2);
105  }
106 
107  me1->setBinLabel(1, "1", 1);
108  me1->setBinLabel(16, "RollA", 1);
109  me1->setBinLabel(32, "32", 1);
110  me1->setBinLabel(33, "1", 1);
111  me1->setBinLabel(48, "RollB", 1);
112  me1->setBinLabel(64, "32", 1);
113  me1->setBinLabel(65, "1", 1);
114  me1->setBinLabel(80, "RollC", 1);
115  me1->setBinLabel(96, "32", 1);
116 
117  const std::string meName2 = fmt::format("Occupancy_Disk_{}_Ring_{}_CH19-CH36", (region * disk), ring);
118 
119  auto me2 = ibooker.book2D(meName2, meName2, 96, 0.5, 96.5, 18, 18.5, 36.5);
120  me2->setAxisTitle("strip", 1);
121 
122  for (int i = 1; i <= 18; i++) {
123  const std::string ylabel = fmt::format("R{}_CH{:02d}", ring, i + 18);
124  me2->setBinLabel(i, ylabel, 2);
125  }
126 
127  me2->setBinLabel(1, "1", 1);
128  me2->setBinLabel(16, "RollA", 1);
129  me2->setBinLabel(32, "32", 1);
130  me2->setBinLabel(33, "1", 1);
131  me2->setBinLabel(48, "RollB", 1);
132  me2->setBinLabel(64, "32", 1);
133  me2->setBinLabel(65, "1", 1);
134  me2->setBinLabel(80, "RollC", 1);
135  me2->setBinLabel(96, "32", 1);
136 
137  meMap[meName1] = me1;
138  meMap[meName2] = me2;
139  } //loop ring
140  } //loop disk
141  } //loop region
142 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
static void setBarrelRollAxis(MonitorElement *me, const int wheel, const int axis, const bool useRollInfo)
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
std::string subsystemFolder_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
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 144 of file RPCBookDetUnitME.cc.

References dqm::implementation::IBooker::book1D(), RPCRollMapHisto::bookBarrel(), RPCRollMapHisto::bookEndcap(), diffTreeTool::format(), globalFolder_, mps_fire::i, label, phase1PixelTopology::layer, mergeVDriftHistosByStation::name, numberOfDisks_, numberOfInnerRings_, relativeConstraints::ring, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, subsystemFolder_, and runGCPTkAlMap::title.

Referenced by bookHistograms().

146  {
147  ibooker.setCurrentFolder(subsystemFolder_ + "/" + recHitType + "/" + globalFolder_);
148 
149  std::string tmpStr;
150 
151  for (int wheel = -2; wheel <= 2; wheel++) { //Loop on wheel
152  tmpStr = fmt::format("1DOccupancy_Wheel_{}", wheel);
153  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, 12, 0.5, 12.5);
154  for (int i = 1; i <= 12; ++i) {
155  meMap[tmpStr]->setBinLabel(i, fmt::format("Sec{}", i), 1);
156  }
157 
158  tmpStr = fmt::format("Occupancy_Roll_vs_Sector_Wheel_{}", wheel);
159  meMap[tmpStr] = RPCRollMapHisto::bookBarrel(ibooker, wheel, tmpStr, tmpStr, true);
160 
161  tmpStr = fmt::format("BxDistribution_Wheel_{}", wheel);
162  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, 9, -4.5, 4.5);
163 
164  for (int layer = 1; layer <= 6; layer++) {
165  const std::string name = fmt::format("ClusterSize_Wheel_{}_Layer{}", wheel, layer);
166  const std::string title = fmt::format("ClusterSize - Wheel {} Layer{}", wheel, layer);
167  meMap[name] = ibooker.book1D(name, title, 16, 0.5, 16.5);
168  }
169 
170  } //end loop on wheel
171 
172  for (int disk = -RPCMonitorDigi::numberOfDisks_; disk <= RPCMonitorDigi::numberOfDisks_; disk++) {
173  if (disk == 0)
174  continue;
175 
176  tmpStr = fmt::format("Occupancy_Ring_vs_Segment_Disk_{}", disk);
177  meMap[tmpStr] = RPCRollMapHisto::bookEndcap(ibooker, disk, tmpStr, tmpStr, true);
178 
179  tmpStr = fmt::format("BxDistribution_Disk_{}", disk);
180  meMap[tmpStr] = ibooker.book1D(tmpStr, tmpStr, 9, -4.5, 4.5);
181 
182  for (int ring = RPCMonitorDigi::numberOfInnerRings_; ring <= 3; ring++) {
183  const std::string name = fmt::format("ClusterSize_Disk_{}_Ring{}", disk, ring);
184  const std::string title = fmt::format("ClusterSize - Disk{} Ring{}", disk, ring);
185  meMap[name] = ibooker.book1D(name, title, 16, 0.5, 16.5);
186  }
187  }
188 
189  for (int ring = RPCMonitorDigi::numberOfInnerRings_; ring <= 3; ring++) {
190  const std::string meName = fmt::format("1DOccupancy_Ring_{}", ring);
191  meMap[meName] = ibooker.book1D(
192  meName, meName, RPCMonitorDigi::numberOfDisks_ * 2, 0.5, (RPCMonitorDigi::numberOfDisks_ * 2.0) + 0.5);
193  for (int xbin = 1; xbin <= RPCMonitorDigi::numberOfDisks_ * 2; xbin++) {
195  if (xbin < RPCMonitorDigi::numberOfDisks_ + 1)
196  label = fmt::format("Disk {}", (xbin - (RPCMonitorDigi::numberOfDisks_ + 1)));
197  else
198  label = fmt::format("Disk {}", (xbin - RPCMonitorDigi::numberOfDisks_));
199  meMap[meName]->setBinLabel(xbin, label, 1);
200  }
201  }
202 }
std::string globalFolder_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
constexpr std::array< uint8_t, layerIndexSize > layer
char const * label
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
static MonitorElement * bookBarrel(IBooker &booker, const int wheel, const std::string &prefix, const std::string &title, const bool useRollInfo)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
static MonitorElement * bookEndcap(IBooker &booker, const int disk, const std::string &prefix, const std::string &title, const bool useRollInfo)
std::string subsystemFolder_
void RPCMonitorDigi::performSourceOperation ( std::map< RPCDetId, std::vector< RPCRecHit > > &  recHitMap,
std::string  recHittype 
)
private

Definition at line 211 of file RPCMonitorDigi.cc.

References funct::abs(), RPCRecHit::BunchX(), makePileupJSON::bx, RPCRecHit::clusterSize(), rpcdqm::utils::detId2RollNr(), RPCRecHit::firstClusterStrip(), diffTreeTool::format(), mps_fire::i, RPCDetId::layer(), phase1PixelTopology::layer, meMuonCollection, meNoiseCollection, muonFolder_, RPCNameHelper::name(), noiseFolder_, numberOfDisks_, HLT_FULL_cff::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().

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

Definition at line 205 of file RPCBookDetUnitME.cc.

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

Referenced by bookRollME().

205  {
206  const RPCRoll* rpcRoll = rpcGeo->roll(id);
207  if (!rpcRoll)
208  return 1;
209 
210  return rpcRoll->nstrips();
211 }
int nstrips() const
Definition: RPCRoll.cc:24
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:50

Member Data Documentation

int RPCMonitorDigi::counter
private

Definition at line 50 of file RPCMonitorDigi.h.

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

std::string RPCMonitorDigi::globalFolder_
private

Definition at line 72 of file RPCMonitorDigi.h.

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

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

Definition at line 62 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

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

Definition at line 67 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

float RPCMonitorDigi::muEtaCut_
private

Definition at line 52 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

std::string RPCMonitorDigi::muonFolder_
private

Definition at line 48 of file RPCMonitorDigi.h.

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

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

Definition at line 75 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

MonitorElement* RPCMonitorDigi::muonRPCEvents_
private

Definition at line 55 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

float RPCMonitorDigi::muPtCut_
private

Definition at line 52 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

std::string RPCMonitorDigi::noiseFolder_
private

Definition at line 49 of file RPCMonitorDigi.h.

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

MonitorElement* RPCMonitorDigi::noiseRPCEvents_
private

Definition at line 54 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

int RPCMonitorDigi::numberOfDisks_
private
int RPCMonitorDigi::numberOfInnerRings_
private

Definition at line 60 of file RPCMonitorDigi.h.

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

MonitorElement* RPCMonitorDigi::NumberOfMuon_
private

Definition at line 58 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* RPCMonitorDigi::NumberOfRecHitMuon_
private

Definition at line 57 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 64 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

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

Definition at line 47 of file RPCMonitorDigi.h.

Referenced by bookRegionME(), and performSourceOperation().

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

Definition at line 69 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

edm::ESGetToken<RPCGeometry, MuonGeometryRecord> RPCMonitorDigi::rpcGeomToken_
private

Definition at line 79 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and RPCMonitorDigi().

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

Definition at line 76 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

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

Definition at line 77 of file RPCMonitorDigi.h.

Referenced by RPCMonitorDigi().

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

Definition at line 65 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

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

Definition at line 70 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

std::string RPCMonitorDigi::subsystemFolder_
private
bool RPCMonitorDigi::useMuonDigis_
private

Definition at line 42 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and RPCMonitorDigi().

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

Definition at line 63 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

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

Definition at line 68 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().