CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
RPCMonitorDigi Class Reference

Data Format. More...

#include <RPCMonitorDigi.h>

Inheritance diagram for RPCMonitorDigi:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 RPCMonitorDigi (const edm::ParameterSet &)
 
 ~RPCMonitorDigi ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
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 &, RPCDetId &, const edm::EventSetup &, 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 edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Types

enum  detectorRegions { EM = 0, B = 1, EP = 2, ALL =3 }
 

Private Member Functions

void performSourceOperation (std::map< RPCDetId, std::vector< RPCRecHit > > &, std::string)
 
int stripsInRoll (RPCDetId &, const edm::EventSetup &)
 

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
 
std::string RootFileName
 
edm::EDGetTokenT
< RPCRecHitCollection
rpcRecHitLabel_
 
bool saveRootFile
 
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::string regionNames_ [3] = {"Endcap-", "Barrel", "Endcap+"}
 Geometry. More...
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Data Format.

Definition at line 25 of file RPCMonitorDigi.h.

Member Enumeration Documentation

Enumerator
EM 
B 
EP 
ALL 

Definition at line 46 of file RPCMonitorDigi.h.

Constructor & Destructor Documentation

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

Definition at line 19 of file RPCMonitorDigi.cc.

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

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

Definition at line 46 of file RPCMonitorDigi.cc.

46 {}

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 121 of file RPCMonitorDigi.cc.

References TrackingRecHit::clone(), counter, reco::LeafCandidate::eta(), MonitorElement::Fill(), 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_.

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

Implements DQMEDAnalyzer.

Definition at line 49 of file RPCMonitorDigi.cc.

References DQMStore::IBooker::book1D(), bookRegionME(), bookRollME(), bookSectorRingME(), bookWheelDiskME(), RPCGeomServ::chambername(), edm::EventSetup::get(), meMuonCollection, meNoiseCollection, muonFolder_, muonRPCEvents_, RPCGeomServ::name(), noiseFolder_, noiseRPCEvents_, numberOfDisks_, numberOfInnerRings_, NumberOfMuon_, NumberOfRecHitMuon_, 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.

49  {
50 
51  edm::LogInfo ("rpcmonitordigi") <<"[RPCMonitorDigi]: Begin Run " ;
52 
53  std::set<int> disk_set, ring_set;
55  iSetup.get<MuonGeometryRecord>().get(rpcGeo);
56 
57  //loop on geometry to book all MEs
58  edm::LogInfo ("rpcmonitordigi") <<"[RPCMonitorDigi]: Booking histograms per roll. " ;
59  for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
60  if(dynamic_cast< const RPCChamber* >( *it ) != 0 ){
61  const RPCChamber* ch = dynamic_cast< const RPCChamber* >( *it );
62  std::vector< const RPCRoll*> roles = (ch->rolls());
63  if(useRollInfo_){
64  for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
65  RPCDetId rpcId = (*r)->id();
66 
67  //get station and inner ring
68  if(rpcId.region()!=0){
69  disk_set.insert(rpcId.station());
70  ring_set.insert(rpcId.ring());
71  }
72 
73  //booking all histograms
74  RPCGeomServ rpcsrv(rpcId);
75  std::string nameID = rpcsrv.name();
76  if(useMuonDigis_) bookRollME(ibooker,rpcId ,iSetup, muonFolder_, meMuonCollection[nameID]);
77  bookRollME(ibooker, rpcId, iSetup, noiseFolder_, meNoiseCollection[nameID]);
78  }
79  }else{
80  RPCDetId rpcId = roles[0]->id(); //any roll would do - here I just take the first one
81  RPCGeomServ rpcsrv(rpcId);
82  std::string nameID = rpcsrv.chambername();
83  if(useMuonDigis_) bookRollME(ibooker, rpcId,iSetup, muonFolder_, meMuonCollection[nameID]);
84  bookRollME(ibooker, rpcId, iSetup, noiseFolder_, meNoiseCollection[nameID]);
85  if(rpcId.region()!=0){
86  disk_set.insert(rpcId.station());
87  ring_set.insert(rpcId.ring());
88  }
89  }
90  }
91  }//end loop on geometry to book all MEs
92 
93  numberOfDisks_ = disk_set.size();
94  numberOfInnerRings_ = (*ring_set.begin());
95 
96  //Book
100 
101  std::string currentFolder = subsystemFolder_ +"/"+noiseFolder_;
102  ibooker.setCurrentFolder(currentFolder);
103 
104  noiseRPCEvents_ = ibooker.book1D("RPCEvents","RPCEvents", 1, 0.5, 1.5);
105 
106  if(useMuonDigis_ ){
110 
111  currentFolder = subsystemFolder_ +"/"+muonFolder_;
112  ibooker.setCurrentFolder(currentFolder);
113 
114  muonRPCEvents_ = ibooker.book1D("RPCEvents", "RPCEvents", 1, 0.5, 1.5);
115  NumberOfMuon_ = ibooker.book1D("NumberOfMuons", "Number of Muons", 11, -0.5, 10.5);
116  NumberOfRecHitMuon_ = ibooker.book1D("NumberOfRecHitMuons", "Number of RPC RecHits per Muon", 8, -0.5, 7.5);
117  }
118 
119 }
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
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
int ring() const
Definition: RPCDetId.h:72
void bookRollME(DQMStore::IBooker &, RPCDetId &, const edm::EventSetup &, const std::string &, std::map< std::string, MonitorElement * > &)
Booking of MonitoringElement for one RPCDetId (= roll)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Definition: RPCChamber.cc:68
MonitorElement * NumberOfRecHitMuon_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
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_
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 314 of file RPCBookDetUnitME.cc.

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

Referenced by bookHistograms().

314  {
315  //std::map<std::string, MonitorElement*> RPCMonitorDigi::bookRegionME(std::string recHitType) {
316 
317  // std::map<std::string, MonitorElement*> meMap;
318 
319  std::string currentFolder = subsystemFolder_ +"/"+recHitType+"/"+ globalFolder_;
320  ibooker.setCurrentFolder(currentFolder);
321 
322  std::stringstream name;
323  std::stringstream title;
324  for(int r = 0; r < 3; r++){ //RPC regions are E-, B, and E+
325 
327  //Cluster size
328  name.str("");
329  title.str("");
330  name<<"ClusterSize_"<< regionName;
331  title<< "ClusterSize - "<<regionName;
332  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
333 
334 
335  }
336 
337 
338  //Number of Cluster
339  name.str("");
340  title.str("");
341  name<<"NumberOfClusters_Barrel";
342  title<< "Number of Clusters per Event - Barrel";
343  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 30, 0.5, 30.5);
344 
345  name.str("");
346  title.str("");
347  name<<"NumberOfClusters_Endcap+";
348  title<< "Number of Clusters per Event - Endcap+";
349  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 15, 0.5, 15.5);
350 
351  name.str("");
352  title.str("");
353  name<<"NumberOfClusters_Endcap-";
354  title<< "Number of Clusters per Event - Endcap-";
355  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 15, 0.5, 15.5);
356 
357  //Number of Digis
358  name.str("");
359  title.str("");
360  name<<"Multiplicity_Barrel";
361  title<< "Multiplicity per Event per Roll - Barrel";
362  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 50, 0.5, 50.5);
363 
364 
365  name.str("");
366  title.str("");
367  name<<"Multiplicity_Endcap+";
368  title<< "Multiplicity per Event per Roll - Endcap+";
369  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 32, 0.5, 32.5);
370 
371  name.str("");
372  title.str("");
373  name<<"Multiplicity_Endcap-";
374  title<< "Multiplicity per Event per Roll - Endcap-";
375  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 32, 0.5, 32.5);
376 
377 
378  for(int layer = 1 ; layer <= 6 ; layer ++){
379 
380  name.str("");
381  title.str("");
382  name<<"ClusterSize_Layer"<< layer;
383  title<< "ClusterSize - Layer"<<layer;
384  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
385  }
386 
387  for(int ring = RPCMonitorDigi::numberOfInnerRings_ ; ring <= 3 ; ring ++){
388 
389  name.str("");
390  title.str("");
391  name<<"ClusterSize_Ring"<< ring;
392  title<< "ClusterSize - Ring"<<ring;
393  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
394 
395  }
396 
397 
398  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);
399  meMap["Occupancy_for_Endcap"] ->setAxisTitle("Disk", 1);
400  meMap["Occupancy_for_Endcap"] ->setAxisTitle("Ring", 2);
401 
402  std::stringstream binlabel;
403  for (int bin = 1 ; bin <= RPCMonitorDigi::numberOfDisks_*2 ; bin++){
404  binlabel.str("");
405  if(bin< (RPCMonitorDigi::numberOfDisks_+1)) {//negative endcap
406  binlabel<<(bin-( RPCMonitorDigi::numberOfDisks_+1));
407  }else{//positive endcaps
408  binlabel<<(bin- RPCMonitorDigi::numberOfDisks_);
409  }
410  meMap["Occupancy_for_Endcap"]->setBinLabel( bin , binlabel.str(), 1);
411  }
412 
413  meMap["Occupancy_for_Endcap"]->setBinLabel( 1 , "2", 2);
414  meMap["Occupancy_for_Endcap"]->setBinLabel( 2 , "3", 2);
415 
416  meMap["Occupancy_for_Barrel"] = ibooker.book2D("Occupancy_for_Barrel", "Occupancy Barrel", 12, 0.5 , 12.5, 5, -2.5, 2.5 );
417  meMap["Occupancy_for_Barrel"] ->setAxisTitle("Sec", 1);
418  meMap["Occupancy_for_Barrel"] ->setAxisTitle("Wheel", 2);
419 
420  for (int bin = 1 ; bin <= 12 ; bin++){
421  binlabel.str("");
422  binlabel<<bin;
423  meMap["Occupancy_for_Barrel"]->setBinLabel( bin , binlabel.str(), 1);
424  if(bin <= 5 ){
425  binlabel.str("");
426  binlabel<< (bin - 3);
427  meMap["Occupancy_for_Barrel"]->setBinLabel( bin , binlabel.str(), 2);
428  }
429  }
430  // return meMap;
431 
432 }
std::string globalFolder_
static const std::string regionNames_[3]
Geometry.
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
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,
RPCDetId detId,
const edm::EventSetup iSetup,
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 9 of file RPCBookDetUnitME.cc.

References funct::abs(), DQMStore::IBooker::book1D(), rpcdqm::BX, RPCGeomServ::chambername(), rpcdqm::CLUSTERSIZE, 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 
12  std::string folder = subsystemFolder_+ "/"+ recHitType +"/"+folderStr->folderStructure(detId);
13 
14  ibooker.setCurrentFolder(folder);
15 
16  //get number of strips in current roll
17  int nstrips = this->stripsInRoll(detId, iSetup);
18  if (nstrips == 0 ){ nstrips = 1;}
19 
21  RPCGeomServ RPCname(detId);
22  std::string nameRoll = "";
23 
25  nameRoll = RPCname.name();
26  }else{
27  nameRoll = RPCname.chambername();
28 
29  if(detId.region() != 0 || //Endcaps
30  (abs(detId.ring()) == 2 && detId.station()== 2 && detId.layer() != 1) || //Wheel -/+2 RB2out
31  (abs(detId.ring()) != 2 && detId.station()== 2 && detId.layer() == 1)){nstrips *= 3;} //Wheel -1,0,+1 RB2in
32  else {
33  nstrips *= 2;
34  }
35 
36  }
37 
38 
39  std::stringstream os;
40  os.str("");
41  os<<"Occupancy_"<<nameRoll;
42  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), nstrips, 0.5, nstrips+0.5);
43  ibooker.tag( meMap[os.str()], rpcdqm::OCCUPANCY);
44 
45  os.str("");
46  os<<"BXDistribution_"<<nameRoll;
47  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 7, -3.5, 3.5);
48  ibooker.tag( meMap[os.str()], rpcdqm::BX);
49 
50  if(detId.region() == 0){
51  os.str("");
52  os<<"ClusterSize_"<<nameRoll;
53  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 15, 0.5, 15.5);
54  ibooker.tag( meMap[os.str()], rpcdqm::CLUSTERSIZE);
55 
56  os.str("");
57  os<<"Multiplicity_"<<nameRoll;
58  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 30, 0.5, 30.5);
59  ibooker.tag( meMap[os.str()], rpcdqm::MULTIPLICITY);
60 
61  }else{
62  os.str("");
63  os<<"ClusterSize_"<<nameRoll;
64  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 10, 0.5, 10.5);
65  ibooker.tag( meMap[os.str()], rpcdqm::CLUSTERSIZE);
66 
67  os.str("");
68  os<<"Multiplicity_"<<nameRoll;
69  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 15, 0.5, 15.5);
70  ibooker.tag( meMap[os.str()], rpcdqm::MULTIPLICITY);
71  }
72 
73 
74  os.str("");
75  os<<"NumberOfClusters_"<<nameRoll;
76  meMap[os.str()] = ibooker.book1D(os.str(), os.str(),10,0.5,10.5);
77 
78 
79  delete folderStr;
80  // return meMap;
81 }
int ring() const
Definition: RPCDetId.h:72
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:286
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int layer() const
Definition: RPCDetId.h:108
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
std::string folderStructure(RPCDetId detId)
int stripsInRoll(RPCDetId &, const edm::EventSetup &)
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 84 of file RPCBookDetUnitME.cc.

References DQMStore::IBooker::book2D(), i, rpcdqm::utils::labelYAxisRoll(), numberOfDisks_, numberOfInnerRings_, HLT_25ns14e33_v3_cff::region, relativeConstraints::ring, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and subsystemFolder_.

Referenced by bookHistograms().

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

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), globalFolder_, i, diffTwoXMLs::label, rpcdqm::utils::labelXAxisSector(), rpcdqm::utils::labelXAxisSegment(), rpcdqm::utils::labelYAxisRing(), rpcdqm::utils::labelYAxisRoll(), mergeVDriftHistosByStation::name, numberOfDisks_, numberOfInnerRings_, relativeConstraints::ring, DQMStore::IBooker::setCurrentFolder(), subsystemFolder_, and indexGen::title.

Referenced by bookHistograms().

200  {
201  //std::map<std::string, MonitorElement*> RPCMonitorDigi::bookWheelDiskME(std::string recHitType) {
202 
203  // std::map<std::string, MonitorElement*> meMap;
204  ibooker.setCurrentFolder(subsystemFolder_ +"/"+recHitType+"/"+ globalFolder_);
205 
206  std::stringstream os, label, name, title ;
207  rpcdqm::utils rpcUtils;
208 
209  for (int wheel = -2 ; wheel<= 2; wheel++ ) {//Loop on wheel
210 
211  // os<<"OccupancyXY_"<<ringType<<"_"<<ring;
212  // meMap[os.str()] = ibooker.book2D(os.str(), os.str(),63, -800, 800, 63, -800, 800);
213  // meMap[os.str()] = ibooker.book2D(os.str(), os.str(),1000, -800, 800, 1000, -800, 800);
214 
215 
216  os.str("");
217  os<<"1DOccupancy_Wheel_"<<wheel;
218  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 12, 0.5, 12.5);
219  for(int i=1; i<12; i++) {
220  label.str("");
221  label<<"Sec"<<i;
222  meMap[os.str()] ->setBinLabel(i, label.str(), 1);
223  }
224 
225  os.str("");
226  os<<"Occupancy_Roll_vs_Sector_Wheel_"<<wheel;
227  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 12, 0.5,12.5, 21, 0.5, 21.5);
228  rpcUtils.labelXAxisSector(meMap[os.str()]);
229  rpcUtils.labelYAxisRoll( meMap[os.str()], 0, wheel, true);
230 
231  os.str("");
232  os<<"BxDistribution_Wheel_"<<wheel;
233  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 9, -4.5, 4.5);
234 
235 
236  for(int layer = 1 ; layer <= 6 ; layer ++){
237  name.str("");
238  title.str("");
239  name<<"ClusterSize_Wheel_"<<wheel<<"_Layer"<< layer;
240  title<< "ClusterSize - Wheel "<<wheel<<" Layer"<<layer;
241  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
242  }
243 
244 
245 
246  }//end loop on wheel
247 
248 
249  for (int disk = - RPCMonitorDigi::numberOfDisks_; disk <= RPCMonitorDigi::numberOfDisks_; disk++){
250 
251  if(disk == 0) continue;
252 
253 
254  os.str("");
255  os<<"Occupancy_Ring_vs_Segment_Disk_"<<disk;
256  meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 36, 0.5,36.5, 6, 0.5, 6.5);
257 
258  rpcUtils.labelXAxisSegment(meMap[os.str()]);
259  rpcUtils.labelYAxisRing(meMap[os.str()], 2, true);
260 
261  os.str("");
262  os<<"BxDistribution_Disk_"<<disk;
263  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), 9, -4.5, 4.5);
264 
265 
266  for(int ring = RPCMonitorDigi::numberOfInnerRings_ ; ring <= 3 ; ring ++){
267 
268  name.str("");
269  title.str("");
270  name<<"ClusterSize_Disk_"<<disk<<"_Ring"<< ring;
271  title<< "ClusterSize - Disk"<<disk<<" Ring"<<ring;
272  meMap[name.str()] = ibooker.book1D(name.str(), title.str(), 16, 0.5, 16.5);
273 
274  }
275 
276  }
277 
278  for(int ring = RPCMonitorDigi::numberOfInnerRings_ ; ring <= 3 ; ring ++){
279  os.str("");
280  os<<"1DOccupancy_Ring_"<<ring;
281  meMap[os.str()] = ibooker.book1D(os.str(), os.str(), RPCMonitorDigi::numberOfDisks_*2 , 0.5, ((double)RPCMonitorDigi::numberOfDisks_*2.0)+0.5);
282  for(int xbin= 1 ; xbin<= RPCMonitorDigi::numberOfDisks_*2 ; xbin++) {
283  label.str("");
284  if (xbin < RPCMonitorDigi::numberOfDisks_+1) label<<"Disk "<< (xbin -(RPCMonitorDigi::numberOfDisks_+1));
285  else label<<"Disk "<< (xbin - RPCMonitorDigi::numberOfDisks_);
286  meMap[os.str()] ->setBinLabel(xbin, label.str(), 1);
287  }
288  }
289 
290 
291 
292 
293  // return meMap;
294 }
int i
Definition: DBlmapReader.cc:9
std::string globalFolder_
void labelXAxisSegment(MonitorElement *myMe)
Definition: utils.h:250
void labelYAxisRoll(MonitorElement *myMe, int region, int ring, bool useRollInfo)
Definition: utils.h:268
void labelYAxisRing(MonitorElement *myMe, int numberOfRings, bool useRollInfo)
Definition: utils.h:295
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void labelXAxisSector(MonitorElement *myMe)
Definition: utils.h:236
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::string subsystemFolder_
void RPCMonitorDigi::performSourceOperation ( std::map< RPCDetId, std::vector< RPCRecHit > > &  recHitMap,
std::string  recHittype 
)
private

Definition at line 220 of file RPCMonitorDigi.cc.

References funct::abs(), RPCRecHit::BunchX(), RPCGeomServ::chambername(), RPCRecHit::clusterSize(), rpcdqm::utils::detId2RollNr(), HcalObjRepresent::Fill(), RPCRecHit::firstClusterStrip(), i, RPCDetId::layer(), python.multivaluedict::map(), meMuonCollection, meNoiseCollection, muonFolder_, RPCGeomServ::name(), noiseFolder_, numberOfDisks_, HLT_25ns14e33_v3_cff::recHits, RPCDetId::region(), HLT_25ns14e33_v3_cff::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().

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

Definition at line 299 of file RPCBookDetUnitME.cc.

References edm::EventSetup::get(), and RPCRoll::nstrips().

Referenced by bookRollME().

299  {
301  iSetup.get<MuonGeometryRecord>().get(rpcgeo);
302 
303  const RPCRoll * rpcRoll = rpcgeo->roll(id);
304 
305  if (!rpcRoll) return 1;
306 
307  return rpcRoll->nstrips();
308 
309 
310 
311 }
int nstrips() const
Definition: RPCRoll.cc:46
const T & get() const
Definition: EventSetup.h:55

Member Data Documentation

int RPCMonitorDigi::counter
private

Definition at line 56 of file RPCMonitorDigi.h.

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

std::string RPCMonitorDigi::globalFolder_
private

Definition at line 79 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 69 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

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

Definition at line 74 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

float RPCMonitorDigi::muEtaCut_
private

Definition at line 58 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

std::string RPCMonitorDigi::muonFolder_
private

Definition at line 54 of file RPCMonitorDigi.h.

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

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

Definition at line 85 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

MonitorElement* RPCMonitorDigi::muonRPCEvents_
private

Definition at line 61 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

float RPCMonitorDigi::muPtCut_
private

Definition at line 58 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

std::string RPCMonitorDigi::noiseFolder_
private

Definition at line 55 of file RPCMonitorDigi.h.

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

MonitorElement* RPCMonitorDigi::noiseRPCEvents_
private

Definition at line 60 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 66 of file RPCMonitorDigi.h.

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

MonitorElement* RPCMonitorDigi::NumberOfMuon_
private

Definition at line 64 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* RPCMonitorDigi::NumberOfRecHitMuon_
private

Definition at line 63 of file RPCMonitorDigi.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 71 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

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

Geometry.

Definition at line 53 of file RPCMonitorDigi.h.

Referenced by bookRegionME(), and performSourceOperation().

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

Definition at line 76 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

std::string RPCMonitorDigi::RootFileName
private

Definition at line 83 of file RPCMonitorDigi.h.

Referenced by RPCMonitorDigi().

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

Definition at line 86 of file RPCMonitorDigi.h.

Referenced by analyze(), and RPCMonitorDigi().

bool RPCMonitorDigi::saveRootFile
private

Definition at line 82 of file RPCMonitorDigi.h.

Referenced by RPCMonitorDigi().

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

Definition at line 87 of file RPCMonitorDigi.h.

Referenced by RPCMonitorDigi().

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

Definition at line 72 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

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

Definition at line 77 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

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

Definition at line 48 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and RPCMonitorDigi().

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

Definition at line 70 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().

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

Definition at line 75 of file RPCMonitorDigi.h.

Referenced by bookHistograms(), and performSourceOperation().