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:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 RPCMonitorDigi (const edm::ParameterSet &)
 
 ~RPCMonitorDigi () override=default
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

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...
 

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+"}}
 

Detailed Description

Definition at line 22 of file RPCMonitorDigi.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file RPCMonitorDigi.cc.

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

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

Definition at line 115 of file RPCMonitorDigi.cc.

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

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

Definition at line 42 of file RPCMonitorDigi.cc.

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

42  {
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_) bookRollME(ibooker,rpcId , rpcGeo, muonFolder_, meMuonCollection[nameID]);
71  bookRollME(ibooker, rpcId, rpcGeo, noiseFolder_, meNoiseCollection[nameID]);
72  }
73  }else{
74  RPCDetId rpcId = roles[0]->id(); //any roll would do - here I just take the first one
75  RPCGeomServ rpcsrv(rpcId);
76  std::string nameID = rpcsrv.chambername();
77  if(useMuonDigis_) bookRollME(ibooker, rpcId, rpcGeo, muonFolder_, meMuonCollection[nameID]);
78  bookRollME(ibooker, rpcId, rpcGeo, noiseFolder_, meNoiseCollection[nameID]);
79  if(rpcId.region()!=0){
80  disk_set.insert(rpcId.station());
81  ring_set.insert(rpcId.ring());
82  }
83  }
84  }
85  }//end loop on geometry to book all MEs
86 
87  numberOfDisks_ = disk_set.size();
88  numberOfInnerRings_ = (*ring_set.begin());
89 
90  //Book
94 
95  std::string currentFolder = subsystemFolder_ +"/"+noiseFolder_;
96  ibooker.setCurrentFolder(currentFolder);
97 
98  noiseRPCEvents_ = ibooker.book1D("RPCEvents","RPCEvents", 1, 0.5, 1.5);
99 
100  if(useMuonDigis_ ){
104 
105  currentFolder = subsystemFolder_ +"/"+muonFolder_;
106  ibooker.setCurrentFolder(currentFolder);
107 
108  muonRPCEvents_ = ibooker.book1D("RPCEvents", "RPCEvents", 1, 0.5, 1.5);
109  NumberOfMuon_ = ibooker.book1D("NumberOfMuons", "Number of Muons", 11, -0.5, 10.5);
110  NumberOfRecHitMuon_ = ibooker.book1D("NumberOfRecHitMuons", "Number of RPC RecHits per Muon", 8, -0.5, 7.5);
111  }
112 
113 }
std::map< std::string, MonitorElement * > regionMuonCollection
std::map< std::string, MonitorElement * > sectorRingNoiseCollection
std::string muonFolder_
std::map< std::string, MonitorElement * > wheelDiskMuonCollection
std::map< std::string, MonitorElement * > regionNoiseCollection
#define nullptr
std::map< std::string, std::map< std::string, MonitorElement * > > meNoiseCollection
MonitorElement * muonRPCEvents_
void bookSectorRingME(DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElement at Sector/Ring level.
std::string noiseFolder_
std::map< std::string, MonitorElement * > wheelDiskNoiseCollection
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
int ring() const
Definition: RPCDetId.h:72
void bookRollME(DQMStore::IBooker &, const RPCDetId &, const RPCGeometry *rpcGeo, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElement for one RPCDetId (= roll)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Definition: RPCChamber.cc:68
MonitorElement * NumberOfRecHitMuon_
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: RPCGeometry.cc:33
void bookWheelDiskME(DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElemnt at Wheel/Disk level.
MonitorElement * noiseRPCEvents_
std::map< std::string, MonitorElement * > sectorRingMuonCollection
std::map< std::string, std::map< std::string, MonitorElement * > > meMuonCollection
void bookRegionME(DQMStore::IBooker &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElemnt at region (Barrel/Endcap) level.
MonitorElement * NumberOfMuon_
T const * product() const
Definition: ESHandle.h:86
std::string subsystemFolder_
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96
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 279 of file RPCBookDetUnitME.cc.

References stringResolutionProvider_cfi::bin, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), globalFolder_, dataset::name, numberOfDisks_, numberOfInnerRings_, alignCSCRings::r, regionNames_, relativeConstraints::ring, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, subsystemFolder_, and fftjetcommon_cfi::title.

Referenced by bookHistograms().

280 {
281  std::string currentFolder = subsystemFolder_ +"/"+recHitType+"/"+ globalFolder_;
282  ibooker.setCurrentFolder(currentFolder);
283 
284  std::stringstream name;
285  std::stringstream title;
286  for(int r = 0; r < 3; r++){ //RPC regions are E-, B, and E+
287 
289  //Cluster size
290  name.str("");
291  title.str("");
292  name<<"ClusterSize_"<< regionName;
293  title<< "ClusterSize - "<<regionName;
294  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
295 
296 
297  }
298 
299 
300  //Number of Cluster
301  name.str("");
302  title.str("");
303  name<<"NumberOfClusters_Barrel";
304  title<< "Number of Clusters per Event - Barrel";
305  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 30, 0.5, 30.5);
306 
307  name.str("");
308  title.str("");
309  name<<"NumberOfClusters_Endcap+";
310  title<< "Number of Clusters per Event - Endcap+";
311  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 15, 0.5, 15.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  //Number of Digis
320  name.str("");
321  title.str("");
322  name<<"Multiplicity_Barrel";
323  title<< "Multiplicity per Event per Roll - Barrel";
324  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 50, 0.5, 50.5);
325 
326 
327  name.str("");
328  title.str("");
329  name<<"Multiplicity_Endcap+";
330  title<< "Multiplicity per Event per Roll - Endcap+";
331  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 32, 0.5, 32.5);
332 
333  name.str("");
334  title.str("");
335  name<<"Multiplicity_Endcap-";
336  title<< "Multiplicity per Event per Roll - Endcap-";
337  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 32, 0.5, 32.5);
338 
339 
340  for(int layer = 1 ; layer <= 6 ; layer ++){
341 
342  name.str("");
343  title.str("");
344  name<<"ClusterSize_Layer"<< layer;
345  title<< "ClusterSize - Layer"<<layer;
346  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
347  }
348 
349  for(int ring = RPCMonitorDigi::numberOfInnerRings_ ; ring <= 3 ; ring ++){
350 
351  name.str("");
352  title.str("");
353  name<<"ClusterSize_Ring"<< ring;
354  title<< "ClusterSize - Ring"<<ring;
355  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
356 
357  }
358 
359 
360  meMap["Occupancy_for_Endcap"] = ibooker.book2D("Occupancy_for_Endcap", "Occupancy Endcap", (int)RPCMonitorDigi::numberOfDisks_*2.0 , 0.5, ((float)RPCMonitorDigi::numberOfDisks_*2.0)+0.5, 2, 1.5, 3.5);
361  meMap["Occupancy_for_Endcap"] ->setAxisTitle("Disk", 1);
362  meMap["Occupancy_for_Endcap"] ->setAxisTitle("Ring", 2);
363 
364  std::stringstream binlabel;
365  for (int bin = 1 ; bin <= RPCMonitorDigi::numberOfDisks_*2 ; bin++){
366  binlabel.str("");
367  if(bin< (RPCMonitorDigi::numberOfDisks_+1)) {//negative endcap
368  binlabel<<(bin-( RPCMonitorDigi::numberOfDisks_+1));
369  }else{//positive endcaps
370  binlabel<<(bin- RPCMonitorDigi::numberOfDisks_);
371  }
372  meMap["Occupancy_for_Endcap"]->setBinLabel( bin , binlabel.str(), 1);
373  }
374 
375  meMap["Occupancy_for_Endcap"]->setBinLabel( 1 , "2", 2);
376  meMap["Occupancy_for_Endcap"]->setBinLabel( 2 , "3", 2);
377 
378  meMap["Occupancy_for_Barrel"] = ibooker.book2D("Occupancy_for_Barrel", "Occupancy Barrel", 12, 0.5 , 12.5, 5, -2.5, 2.5 );
379  meMap["Occupancy_for_Barrel"] ->setAxisTitle("Sec", 1);
380  meMap["Occupancy_for_Barrel"] ->setAxisTitle("Wheel", 2);
381 
382  for (int bin = 1 ; bin <= 12 ; bin++){
383  binlabel.str("");
384  binlabel<<bin;
385  meMap["Occupancy_for_Barrel"]->setBinLabel( bin , binlabel.str(), 1);
386  if(bin <= 5 ){
387  binlabel.str("");
388  binlabel<< (bin - 3);
389  meMap["Occupancy_for_Barrel"]->setBinLabel( bin , binlabel.str(), 2);
390  }
391  }
392 }
std::string globalFolder_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
static const std::array< std::string, 3 > regionNames_
bin
set the eta bin as selection string.
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::string subsystemFolder_
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.

References funct::abs(), DQMStore::IBooker::book1D(), rpcdqm::BX, RPCGeomServ::chambername(), rpcdqm::CLUSTERSIZE, printsummarytable::folder, RPCBookFolderStructure::folderStructure(), RPCDetId::layer(), rpcdqm::MULTIPLICITY, RPCGeomServ::name(), rpcdqm::OCCUPANCY, RPCDetId::region(), RPCDetId::ring(), DQMStore::IBooker::setCurrentFolder(), RPCDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, stripsInRoll(), subsystemFolder_, DQMStore::IBooker::tag(), and useRollInfo_.

Referenced by bookHistograms().

9 {
10  RPCBookFolderStructure folderStr;
11  std::string folder = subsystemFolder_+ "/"+ recHitType +"/"+folderStr.folderStructure(detId);
12 
13  ibooker.setCurrentFolder(folder);
14 
15  //get number of strips in current roll
16  int nstrips = this->stripsInRoll(detId, rpcGeo);
17  if (nstrips == 0 ){ nstrips = 1;}
18 
20  RPCGeomServ RPCname(detId);
21  std::string nameRoll = "";
22 
24  nameRoll = RPCname.name();
25  }else{
26  nameRoll = RPCname.chambername();
27 
28  if(detId.region() != 0 || //Endcaps
29  (abs(detId.ring()) == 2 && detId.station()== 2 && detId.layer() != 1) || //Wheel -/+2 RB2out
30  (abs(detId.ring()) != 2 && detId.station()== 2 && detId.layer() == 1)){nstrips *= 3;} //Wheel -1,0,+1 RB2in
31  else {
32  nstrips *= 2;
33  }
34  }
35 
36  std::stringstream os;
37  os.str("");
38  os<<"Occupancy_"<<nameRoll;
39  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), nstrips, 0.5, nstrips+0.5);
40  ibooker.tag( meMap[os.str()], rpcdqm::OCCUPANCY);
41 
42  os.str("");
43  os<<"BXDistribution_"<<nameRoll;
44  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 7, -3.5, 3.5);
45  ibooker.tag( meMap[os.str()], rpcdqm::BX);
46 
47  if(detId.region() == 0){
48  os.str("");
49  os<<"ClusterSize_"<<nameRoll;
50  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 15, 0.5, 15.5);
51  ibooker.tag( meMap[os.str()], rpcdqm::CLUSTERSIZE);
52 
53  os.str("");
54  os<<"Multiplicity_"<<nameRoll;
55  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 30, 0.5, 30.5);
56  ibooker.tag( meMap[os.str()], rpcdqm::MULTIPLICITY);
57 
58  }else{
59  os.str("");
60  os<<"ClusterSize_"<<nameRoll;
61  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 10, 0.5, 10.5);
62  ibooker.tag( meMap[os.str()], rpcdqm::CLUSTERSIZE);
63 
64  os.str("");
65  os<<"Multiplicity_"<<nameRoll;
66  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 15, 0.5, 15.5);
67  ibooker.tag( meMap[os.str()], rpcdqm::MULTIPLICITY);
68  }
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 }
int stripsInRoll(const RPCDetId &id, const RPCGeometry *rpcGeo) const
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
int ring() const
Definition: RPCDetId.h:72
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:283
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int layer() const
Definition: RPCDetId.h:108
std::string folderStructure(RPCDetId detId)
std::string subsystemFolder_
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96
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 77 of file RPCBookDetUnitME.cc.

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

Referenced by bookHistograms().

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 
88  os.str("");
89  os<<"Occupancy_Wheel_"<<wheel<<"_Sector_"<<sector;
90 
91  if (sector==9 || sector==11)
92  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 91, 0.5, 91.5, 15, 0.5, 15.5);
93  else if (sector==4)
94  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 91, 0.5, 91.5, 21, 0.5, 21.5);
95  else
96  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 91, 0.5, 91.5, 17, 0.5, 17.5);
97 
98  meMap[os.str()]->setAxisTitle("strip", 1);
99  rpcdqm::utils rpcUtils;
100  rpcUtils.labelYAxisRoll( meMap[os.str()], 0, wheel, true);
101 
102  }
103  }
104 
105 
106  for (int region = -1 ; region <= 1; region++){
107  if( region == 0 ) continue;
108 
109  std::string regionName = "Endcap-";
110  if(region == 1) regionName = "Endcap+";
111 
112  for (int disk = 1; disk <= RPCMonitorDigi::numberOfDisks_; disk++) {
113  os.str("");
114  os<< subsystemFolder_<< "/"<<recHitType<<"/"<<regionName<<"/Disk_"<<(region * disk)<<"/SummaryByRings/";
115 
116  ibooker.setCurrentFolder(os.str());
117 
118  for (int ring = RPCMonitorDigi::numberOfInnerRings_ ; ring <= 3; ring ++) {
119 
120  os.str("");
121  os<<"Occupancy_Disk_"<<(region * disk)<<"_Ring_"<<ring<<"_CH01-CH18";
122 
123  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 96, 0.5, 96.5, 18 , 0.5, 18.5);
124  meMap[os.str()]->setAxisTitle("strip", 1);
126 
127  std::stringstream yLabel;
128  for (int i = 1 ; i<=18; i++) {
129  yLabel.str("");
130  yLabel<<"R"<<ring<<"_CH"<<std::setw(2)<<std::setfill('0')<<i;
131  meMap[os.str()]->setBinLabel(i, yLabel.str(), 2);
132  }
133 
134 
135  for(int i = 1; i <= 96 ; i++) {
136  if (i ==1) meMap[os.str()]->setBinLabel(i, "1", 1);
137  else if (i==16) meMap[os.str()]->setBinLabel(i, "RollA", 1);
138  else if (i==32) meMap[os.str()]->setBinLabel(i, "32", 1);
139  else if (i==33) meMap[os.str()]->setBinLabel(i, "1", 1);
140  else if (i==48) meMap[os.str()]->setBinLabel(i, "RollB", 1);
141  else if (i==64) meMap[os.str()]->setBinLabel(i, "32", 1);
142  else if (i==65) meMap[os.str()]->setBinLabel(i, "1", 1);
143  else if (i==80) meMap[os.str()]->setBinLabel(i, "RollC", 1);
144  else if (i==96) meMap[os.str()]->setBinLabel(i, "32", 1);
145  else meMap[os.str()]->setBinLabel(i, "", 1);
146  }
147 
148 
149  os.str("");
150  os<<"Occupancy_Disk_"<<(region * disk)<<"_Ring_"<<ring<<"_CH19-CH36";
151 
152  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 96, 0.5, 96.5, 18 , 18.5, 36.5);
153  meMap[os.str()]->setAxisTitle("strip", 1);
155 
156  for (int i = 1 ; i<= 18; i++) {
157  yLabel.str("");
158  yLabel<<"R"<<ring<<"_CH"<<i+18;
159  meMap[os.str()]->setBinLabel(i, yLabel.str(), 2);
160  }
161 
162 
163  for(int i = 1; i <= 96 ; i++) {
164  if (i ==1) meMap[os.str()]->setBinLabel(i, "1", 1);
165  else if (i==16) meMap[os.str()]->setBinLabel(i, "RollA", 1);
166  else if (i==32) meMap[os.str()]->setBinLabel(i, "32", 1);
167  else if (i==33) meMap[os.str()]->setBinLabel(i, "1", 1);
168  else if (i==48) meMap[os.str()]->setBinLabel(i, "RollB", 1);
169  else if (i==64) meMap[os.str()]->setBinLabel(i, "32", 1);
170  else if (i==65) meMap[os.str()]->setBinLabel(i, "1", 1);
171  else if (i==80) meMap[os.str()]->setBinLabel(i, "RollC", 1);
172  else if (i==96) meMap[os.str()]->setBinLabel(i, "32", 1);
173  else meMap[os.str()]->setBinLabel(i, "", 1);
174  }
175 
176  } //loop ring
177  } //loop disk
178  } //loop region
179 }
void labelYAxisRoll(MonitorElement *myMe, int region, int ring, bool useRollInfo)
Definition: utils.h:283
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
static void setNoAlphanumeric(MonitorElement *myMe)
Definition: utils.h:18
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::string subsystemFolder_
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 182 of file RPCBookDetUnitME.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), globalFolder_, mps_fire::i, label, rpcdqm::utils::labelXAxisSector(), rpcdqm::utils::labelXAxisSegment(), rpcdqm::utils::labelYAxisRing(), rpcdqm::utils::labelYAxisRoll(), dataset::name, numberOfDisks_, numberOfInnerRings_, relativeConstraints::ring, DQMStore::IBooker::setCurrentFolder(), subsystemFolder_, fftjetcommon_cfi::title, and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

183 {
184  ibooker.setCurrentFolder(subsystemFolder_ +"/"+recHitType+"/"+ globalFolder_);
185 
186  std::stringstream os, label, name, title ;
187  rpcdqm::utils rpcUtils;
188 
189  for (int wheel = -2 ; wheel<= 2; wheel++ ) {//Loop on wheel
190  os.str("");
191  os<<"1DOccupancy_Wheel_"<<wheel;
192  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 12, 0.5, 12.5);
193  for(int i=1; i<12; i++) {
194  label.str("");
195  label<<"Sec"<<i;
196  meMap[os.str()] ->setBinLabel(i, label.str(), 1);
197  }
198 
199  os.str("");
200  os<<"Occupancy_Roll_vs_Sector_Wheel_"<<wheel;
201  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 12, 0.5,12.5, 21, 0.5, 21.5);
202  rpcUtils.labelXAxisSector(meMap[os.str()]);
203  rpcUtils.labelYAxisRoll( meMap[os.str()], 0, wheel, true);
204 
205  os.str("");
206  os<<"BxDistribution_Wheel_"<<wheel;
207  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 9, -4.5, 4.5);
208 
209 
210  for(int layer = 1 ; layer <= 6 ; layer ++){
211  name.str("");
212  title.str("");
213  name<<"ClusterSize_Wheel_"<<wheel<<"_Layer"<< layer;
214  title<< "ClusterSize - Wheel "<<wheel<<" Layer"<<layer;
215  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
216  }
217 
218 
219 
220  }//end loop on wheel
221 
222 
223  for (int disk = - RPCMonitorDigi::numberOfDisks_; disk <= RPCMonitorDigi::numberOfDisks_; disk++){
224 
225  if(disk == 0) continue;
226 
227 
228  os.str("");
229  os<<"Occupancy_Ring_vs_Segment_Disk_"<<disk;
230  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 36, 0.5,36.5, 6, 0.5, 6.5);
231 
232  rpcUtils.labelXAxisSegment(meMap[os.str()]);
233  rpcUtils.labelYAxisRing(meMap[os.str()], 2, true);
234 
235  os.str("");
236  os<<"BxDistribution_Disk_"<<disk;
237  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 9, -4.5, 4.5);
238 
239 
240  for(int ring = RPCMonitorDigi::numberOfInnerRings_ ; ring <= 3 ; ring ++){
241 
242  name.str("");
243  title.str("");
244  name<<"ClusterSize_Disk_"<<disk<<"_Ring"<< ring;
245  title<< "ClusterSize - Disk"<<disk<<" Ring"<<ring;
246  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
247 
248  }
249 
250  }
251 
252  for(int ring = RPCMonitorDigi::numberOfInnerRings_ ; ring <= 3 ; ring ++){
253  os.str("");
254  os<<"1DOccupancy_Ring_"<<ring;
255  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), RPCMonitorDigi::numberOfDisks_*2 , 0.5, ((double)RPCMonitorDigi::numberOfDisks_*2.0)+0.5);
256  for(int xbin= 1 ; xbin<= RPCMonitorDigi::numberOfDisks_*2 ; xbin++) {
257  label.str("");
258  if (xbin < RPCMonitorDigi::numberOfDisks_+1) label<<"Disk "<< (xbin -(RPCMonitorDigi::numberOfDisks_+1));
259  else label<<"Disk "<< (xbin - RPCMonitorDigi::numberOfDisks_);
260  meMap[os.str()] ->setBinLabel(xbin, label.str(), 1);
261  }
262  }
263 
264 
265 }
std::string globalFolder_
void labelXAxisSegment(MonitorElement *myMe)
Definition: utils.h:264
void labelYAxisRoll(MonitorElement *myMe, int region, int ring, bool useRollInfo)
Definition: utils.h:283
char const * label
void labelYAxisRing(MonitorElement *myMe, int numberOfRings, bool useRollInfo)
Definition: utils.h:311
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void labelXAxisSector(MonitorElement *myMe)
Definition: utils.h:249
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
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(), RPCGeomServ::chambername(), RPCRecHit::clusterSize(), rpcdqm::utils::detId2RollNr(), HcalObjRepresent::Fill(), RPCRecHit::firstClusterStrip(), mps_fire::i, createfilelist::int, RPCDetId::layer(), genParticles_cff::map, meMuonCollection, meNoiseCollection, muonFolder_, RPCGeomServ::name(), noiseFolder_, numberOfDisks_, rpcPointValidation_cfi::recHit, RPCDetId::region(), regionMuonCollection, regionNames_, regionNoiseCollection, relativeConstraints::ring, RPCDetId::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().

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

Definition at line 270 of file RPCBookDetUnitME.cc.

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

Referenced by bookRollME().

271 {
272  const RPCRoll * rpcRoll = rpcGeo->roll(id);
273  if (!rpcRoll) return 1;
274 
275  return rpcRoll->nstrips();
276 }
int nstrips() const
Definition: RPCRoll.cc:46
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:75

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::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().