test
CMS 3D CMS Logo

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

#include <MuonIdDQM.h>

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

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 MuonIdDQM (const edm::ParameterSet &)
 
 ~MuonIdDQM ()
 
- 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 ()
 

Private Member Functions

virtual void Fill (MonitorElement *, float)
 

Private Attributes

std::string baseFolder_
 
edm::Handle< CSCSegmentCollectioncscSegmentCollectionH_
 
edm::Handle
< DTRecSegment4DCollection
dtSegmentCollectionH_
 
edm::ESHandle
< GlobalTrackingGeometry
geometry_
 
MonitorElementhCSCDdXdZ [4][4]
 
MonitorElementhCSCDdYdZ [4][4]
 
MonitorElementhCSCDx [4][4]
 
MonitorElementhCSCDy [4][4]
 
MonitorElementhCSCNumSegments [4][4]
 
MonitorElementhCSCPulldXdZ [4][4]
 
MonitorElementhCSCPulldYdZ [4][4]
 
MonitorElementhCSCPullx [4][4]
 
MonitorElementhCSCPully [4][4]
 
MonitorElementhDTDdXdZ [4][4]
 
MonitorElementhDTDdYdZ [4][3]
 
MonitorElementhDTDx [4][4]
 
MonitorElementhDTDy [4][3]
 
MonitorElementhDTNumSegments [4][4]
 
MonitorElementhDTPulldXdZ [4][4]
 
MonitorElementhDTPulldYdZ [4][3]
 
MonitorElementhDTPullx [4][4]
 
MonitorElementhDTPully [4][3]
 
MonitorElementhNumChambers [4]
 
MonitorElementhNumChambersNoRPC [4]
 
MonitorElementhNumMatches [4]
 
MonitorElementhSegmentIsAssociatedBool
 
edm::EDGetTokenT
< CSCSegmentCollection
inputCSCSegmentCollection_
 
edm::EDGetTokenT
< DTRecSegment4DCollection
inputDTRecSegment4DCollection_
 
edm::EDGetTokenT
< reco::MuonCollection
inputMuonCollection_
 
edm::Handle< reco::MuonCollectionmuonCollectionH_
 
bool useGlobalMuons_
 
bool useGlobalMuonsNotTrackerMuons_
 
bool useTrackerMuons_
 
bool useTrackerMuonsNotGlobalMuons_
 

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

Detailed Description

Definition at line 50 of file MuonIdDQM.h.

Constructor & Destructor Documentation

MuonIdDQM::MuonIdDQM ( const edm::ParameterSet iConfig)
explicit

Definition at line 3 of file MuonIdDQM.cc.

References baseFolder_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), inputCSCSegmentCollection_, inputDTRecSegment4DCollection_, inputMuonCollection_, AlCaHLTBitMon_QueryRunRegistry::string, useGlobalMuons_, useGlobalMuonsNotTrackerMuons_, useTrackerMuons_, and useTrackerMuonsNotGlobalMuons_.

3  {
4  inputMuonCollection_ = consumes<reco::MuonCollection>(iConfig.getParameter<edm::InputTag>("inputMuonCollection"));
5  inputDTRecSegment4DCollection_ = consumes<DTRecSegment4DCollection>(iConfig.getParameter<edm::InputTag>("inputDTRecSegment4DCollection"));
6  inputCSCSegmentCollection_ = consumes<CSCSegmentCollection>(iConfig.getParameter<edm::InputTag>("inputCSCSegmentCollection"));
7  useTrackerMuons_ = iConfig.getUntrackedParameter<bool>("useTrackerMuons");
8  useGlobalMuons_ = iConfig.getUntrackedParameter<bool>("useGlobalMuons");
9  useTrackerMuonsNotGlobalMuons_ = iConfig.getUntrackedParameter<bool>("useTrackerMuonsNotGlobalMuons");
10  useGlobalMuonsNotTrackerMuons_ = iConfig.getUntrackedParameter<bool>("useGlobalMuonsNotTrackerMuons");
11  baseFolder_ = iConfig.getUntrackedParameter<std::string>("baseFolder");
12 
13 }
bool useTrackerMuons_
Definition: MuonIdDQM.h:66
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< DTRecSegment4DCollection > inputDTRecSegment4DCollection_
Definition: MuonIdDQM.h:64
bool useGlobalMuonsNotTrackerMuons_
Definition: MuonIdDQM.h:69
bool useTrackerMuonsNotGlobalMuons_
Definition: MuonIdDQM.h:68
bool useGlobalMuons_
Definition: MuonIdDQM.h:67
edm::EDGetTokenT< reco::MuonCollection > inputMuonCollection_
Definition: MuonIdDQM.h:63
edm::EDGetTokenT< CSCSegmentCollection > inputCSCSegmentCollection_
Definition: MuonIdDQM.h:65
std::string baseFolder_
Definition: MuonIdDQM.h:70
MuonIdDQM::~MuonIdDQM ( )

Definition at line 15 of file MuonIdDQM.cc.

15 {}

Member Function Documentation

void MuonIdDQM::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 123 of file MuonIdDQM.cc.

References MuonSubdetId::CSC, cscSegmentCollectionH_, MuonSubdetId::DT, dtSegmentCollectionH_, Fill(), MonitorElement::Fill(), geometry_, edm::EventSetup::get(), edm::Event::getByToken(), hCSCDdXdZ, hCSCDdYdZ, hCSCDx, hCSCDy, hCSCNumSegments, hCSCPulldXdZ, hCSCPulldYdZ, hCSCPullx, hCSCPully, hDTDdXdZ, hDTDdYdZ, hDTDx, hDTDy, hDTNumSegments, hDTPulldXdZ, hDTPulldYdZ, hDTPullx, hDTPully, hNumChambers, hNumChambersNoRPC, hNumMatches, hSegmentIsAssociatedBool, i, inputCSCSegmentCollection_, inputDTRecSegment4DCollection_, inputMuonCollection_, metsig::muon, muonCollectionH_, dt_dqm_sourceclient_common_cff::reco, mathSSE::sqrt(), relativeConstraints::station, useGlobalMuons_, useGlobalMuonsNotTrackerMuons_, useTrackerMuons_, useTrackerMuonsNotGlobalMuons_, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

123  {
124  using namespace edm;
125  using namespace reco;
126 
131 
132  for(MuonCollection::const_iterator muon = muonCollectionH_->begin();
133  muon != muonCollectionH_->end(); ++muon)
134  {
135  // trackerMuon == 0; globalMuon == 1; trackerMuon && !globalMuon == 2; globalMuon && !trackerMuon == 3
136  for (unsigned int i = 0; i < 4; i++) {
137  if (i == 0 && (! useTrackerMuons_ || ! muon->isTrackerMuon())) continue;
138  if (i == 1 && (! useGlobalMuons_ || ! muon->isGlobalMuon())) continue;
139  if (i == 2 && (! useTrackerMuonsNotGlobalMuons_ || (! (muon->isTrackerMuon() && ! muon->isGlobalMuon())))) continue;
140  if (i == 3 && (! useGlobalMuonsNotTrackerMuons_ || (! (muon->isGlobalMuon() && ! muon->isTrackerMuon())))) continue;
141 
142  hNumChambers[i]->Fill(muon->numberOfChambers());
143  hNumMatches[i]->Fill(muon->numberOfMatches(Muon::SegmentAndTrackArbitration));
144  hNumChambersNoRPC[i]->Fill(muon->numberOfChambersNoRPC());
145 
146  // by station
147  for(int station = 0; station < 4; ++station)
148  {
149  // only fill num segments if we crossed (or nearly crossed) a chamber
150  if (muon->trackX(station+1, MuonSubdetId::DT, Muon::NoArbitration) < 900000)
151  hDTNumSegments[i][station]->Fill(muon->numberOfSegments(station+1, MuonSubdetId::DT, Muon::NoArbitration));
152  Fill(hDTDx[i][station], muon->dX(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration));
153  Fill(hDTPullx[i][station], muon->pullX(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, true));
154  Fill(hDTDdXdZ[i][station], muon->dDxDz(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration));
155  Fill(hDTPulldXdZ[i][station], muon->pullDxDz(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, true));
156 
157  if (station < 3) {
158  Fill(hDTDy[i][station], muon->dY(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration));
159  Fill(hDTPully[i][station], muon->pullY(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, true));
160  Fill(hDTDdYdZ[i][station], muon->dDyDz(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration));
161  Fill(hDTPulldYdZ[i][station], muon->pullDyDz(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, true));
162  }
163 
164  // only fill num segments if we crossed (or nearly crossed) a chamber
165  if (muon->trackX(station+1, MuonSubdetId::CSC, Muon::NoArbitration) < 900000)
166  hCSCNumSegments[i][station]->Fill(muon->numberOfSegments(station+1, MuonSubdetId::CSC, Muon::NoArbitration));
167  Fill(hCSCDx[i][station], muon->dX(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration));
168  Fill(hCSCPullx[i][station], muon->pullX(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, true));
169  Fill(hCSCDdXdZ[i][station], muon->dDxDz(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration));
170  Fill(hCSCPulldXdZ[i][station], muon->pullDxDz(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, true));
171  Fill(hCSCDy[i][station], muon->dY(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration));
172  Fill(hCSCPully[i][station], muon->pullY(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, true));
173  Fill(hCSCDdYdZ[i][station], muon->dDyDz(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration));
174  Fill(hCSCPulldYdZ[i][station], muon->pullDyDz(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, true));
175  }
176  }
177  }// muon
178 
180  segment != dtSegmentCollectionH_->end(); ++segment)
181  {
182  LocalPoint segmentLocalPosition = segment->localPosition();
183  LocalVector segmentLocalDirection = segment->localDirection();
184  LocalError segmentLocalPositionError = segment->localPositionError();
185  LocalError segmentLocalDirectionError = segment->localDirectionError();
186  bool segmentFound = false;
187 
188  for(MuonCollection::const_iterator muon = muonCollectionH_->begin();
189  muon != muonCollectionH_->end(); ++muon)
190  {
191  if (! muon->isMatchesValid())
192  continue;
193 
194  for(std::vector<MuonChamberMatch>::const_iterator chamberMatch = muon->matches().begin();
195  chamberMatch != muon->matches().end(); ++chamberMatch) {
196  for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
197  segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
198  {
199  if (fabs(segmentMatch->x - segmentLocalPosition.x() ) < 1E-6 &&
200  fabs(segmentMatch->y - segmentLocalPosition.y() ) < 1E-6 &&
201  fabs(segmentMatch->dXdZ - segmentLocalDirection.x()/segmentLocalDirection.z()) < 1E-6 &&
202  fabs(segmentMatch->dYdZ - segmentLocalDirection.y()/segmentLocalDirection.z()) < 1E-6 &&
203  fabs(segmentMatch->xErr - sqrt(segmentLocalPositionError.xx()) ) < 1E-6 &&
204  fabs(segmentMatch->yErr - sqrt(segmentLocalPositionError.yy()) ) < 1E-6 &&
205  fabs(segmentMatch->dXdZErr - sqrt(segmentLocalDirectionError.xx()) ) < 1E-6 &&
206  fabs(segmentMatch->dYdZErr - sqrt(segmentLocalDirectionError.yy()) ) < 1E-6)
207  {
208  segmentFound = true;
209  break;
210  }
211  }// segmentMatch
212  if (segmentFound) break;
213  }// chamberMatch
214  if (segmentFound) break;
215  }// muon
216 
217  if (segmentFound)
219  else
221  }// dt segment
222 
224  segment != cscSegmentCollectionH_->end(); ++segment)
225  {
226  LocalPoint segmentLocalPosition = segment->localPosition();
227  LocalVector segmentLocalDirection = segment->localDirection();
228  LocalError segmentLocalPositionError = segment->localPositionError();
229  LocalError segmentLocalDirectionError = segment->localDirectionError();
230  bool segmentFound = false;
231 
232  for(MuonCollection::const_iterator muon = muonCollectionH_->begin();
233  muon != muonCollectionH_->end(); ++muon)
234  {
235  if (! muon->isMatchesValid())
236  continue;
237 
238  for(std::vector<MuonChamberMatch>::const_iterator chamberMatch = muon->matches().begin();
239  chamberMatch != muon->matches().end(); ++chamberMatch) {
240  for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
241  segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
242  {
243  if (fabs(segmentMatch->x - segmentLocalPosition.x() ) < 1E-6 &&
244  fabs(segmentMatch->y - segmentLocalPosition.y() ) < 1E-6 &&
245  fabs(segmentMatch->dXdZ - segmentLocalDirection.x()/segmentLocalDirection.z()) < 1E-6 &&
246  fabs(segmentMatch->dYdZ - segmentLocalDirection.y()/segmentLocalDirection.z()) < 1E-6 &&
247  fabs(segmentMatch->xErr - sqrt(segmentLocalPositionError.xx()) ) < 1E-6 &&
248  fabs(segmentMatch->yErr - sqrt(segmentLocalPositionError.yy()) ) < 1E-6 &&
249  fabs(segmentMatch->dXdZErr - sqrt(segmentLocalDirectionError.xx()) ) < 1E-6 &&
250  fabs(segmentMatch->dYdZErr - sqrt(segmentLocalDirectionError.yy()) ) < 1E-6)
251  {
252  segmentFound = true;
253  break;
254  }
255  }// segmentMatch
256  if (segmentFound) break;
257  }// chamberMatch
258  if (segmentFound) break;
259  }// muon
260 
261  if (segmentFound)
263  else
265  }// csc segment
266 }
bool useTrackerMuons_
Definition: MuonIdDQM.h:66
MonitorElement * hCSCDx[4][4]
Definition: MuonIdDQM.h:93
int i
Definition: DBlmapReader.cc:9
float xx() const
Definition: LocalError.h:24
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
MonitorElement * hCSCDdYdZ[4][4]
Definition: MuonIdDQM.h:99
MonitorElement * hCSCDdXdZ[4][4]
Definition: MuonIdDQM.h:95
MonitorElement * hCSCPulldXdZ[4][4]
Definition: MuonIdDQM.h:96
T y() const
Definition: PV3DBase.h:63
edm::EDGetTokenT< DTRecSegment4DCollection > inputDTRecSegment4DCollection_
Definition: MuonIdDQM.h:64
bool useGlobalMuonsNotTrackerMuons_
Definition: MuonIdDQM.h:69
bool useTrackerMuonsNotGlobalMuons_
Definition: MuonIdDQM.h:68
MonitorElement * hDTDdYdZ[4][3]
Definition: MuonIdDQM.h:90
void Fill(long long x)
MonitorElement * hDTPully[4][3]
Definition: MuonIdDQM.h:89
MonitorElement * hCSCDy[4][4]
Definition: MuonIdDQM.h:97
static const int CSC
Definition: MuonSubdetId.h:13
edm::Handle< DTRecSegment4DCollection > dtSegmentCollectionH_
Definition: MuonIdDQM.h:73
MonitorElement * hCSCPully[4][4]
Definition: MuonIdDQM.h:98
MonitorElement * hSegmentIsAssociatedBool
Definition: MuonIdDQM.h:103
float yy() const
Definition: LocalError.h:26
MonitorElement * hDTPullx[4][4]
Definition: MuonIdDQM.h:85
MonitorElement * hCSCPullx[4][4]
Definition: MuonIdDQM.h:94
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
bool useGlobalMuons_
Definition: MuonIdDQM.h:67
MonitorElement * hNumMatches[4]
Definition: MuonIdDQM.h:79
MonitorElement * hDTDdXdZ[4][4]
Definition: MuonIdDQM.h:86
edm::Handle< reco::MuonCollection > muonCollectionH_
Definition: MuonIdDQM.h:72
edm::EDGetTokenT< reco::MuonCollection > inputMuonCollection_
Definition: MuonIdDQM.h:63
MonitorElement * hDTDx[4][4]
Definition: MuonIdDQM.h:84
MonitorElement * hDTPulldYdZ[4][3]
Definition: MuonIdDQM.h:91
MonitorElement * hDTDy[4][3]
Definition: MuonIdDQM.h:88
MonitorElement * hCSCPulldYdZ[4][4]
Definition: MuonIdDQM.h:100
const T & get() const
Definition: EventSetup.h:56
virtual void Fill(MonitorElement *, float)
Definition: MuonIdDQM.cc:268
MonitorElement * hDTNumSegments[4][4]
Definition: MuonIdDQM.h:83
MonitorElement * hCSCNumSegments[4][4]
Definition: MuonIdDQM.h:92
MonitorElement * hNumChambersNoRPC[4]
Definition: MuonIdDQM.h:80
edm::ESHandle< GlobalTrackingGeometry > geometry_
Definition: MuonIdDQM.h:75
edm::EDGetTokenT< CSCSegmentCollection > inputCSCSegmentCollection_
Definition: MuonIdDQM.h:65
static const int DT
Definition: MuonSubdetId.h:12
T x() const
Definition: PV3DBase.h:62
MonitorElement * hDTPulldXdZ[4][4]
Definition: MuonIdDQM.h:87
MonitorElement * hNumChambers[4]
Definition: MuonIdDQM.h:78
edm::Handle< CSCSegmentCollection > cscSegmentCollectionH_
Definition: MuonIdDQM.h:74
void MuonIdDQM::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 18 of file MuonIdDQM.cc.

References baseFolder_, DQMStore::IBooker::book1D(), DQMStore::IBooker::cd(), hCSCDdXdZ, hCSCDdYdZ, hCSCDx, hCSCDy, hCSCNumSegments, hCSCPulldXdZ, hCSCPulldYdZ, hCSCPullx, hCSCPully, hDTDdXdZ, hDTDdYdZ, hDTDx, hDTDy, hDTNumSegments, hDTPulldXdZ, hDTPulldYdZ, hDTPullx, hDTPully, hNumChambers, hNumChambersNoRPC, hNumMatches, hSegmentIsAssociatedBool, i, mergeVDriftHistosByStation::name, DQMStore::IBooker::setCurrentFolder(), relativeConstraints::station, indexGen::title, useGlobalMuons_, useGlobalMuonsNotTrackerMuons_, useTrackerMuons_, and useTrackerMuonsNotGlobalMuons_.

20  {
21 
22  char name[100], title[200];
23 
24  ibooker.cd();
26  // trackerMuon == 0; globalMuon == 1; trackerMuon && !globalMuon == 2; globalMuon && !trackerMuon == 3
27 
28  hSegmentIsAssociatedBool = ibooker.book1D("hSegmentIsAssociatedBool", "Segment Is Associated Boolean", 2, -0.5, 1.5);
29 
30  for (unsigned int i = 0; i < 4; i++) {
31  if ((i == 0 && ! useTrackerMuons_) || (i == 1 && ! useGlobalMuons_)) continue;
32  if ((i == 2 && ! useTrackerMuonsNotGlobalMuons_) || (i == 3 && ! useGlobalMuonsNotTrackerMuons_)) continue;
33  if (i == 0) ibooker.setCurrentFolder(baseFolder_+"/TrackerMuons");
34  if (i == 1) ibooker.setCurrentFolder(baseFolder_+"/GlobalMuons");
35  if (i == 2) ibooker.setCurrentFolder(baseFolder_+"/TrackerMuonsNotGlobalMuons");
36  if (i == 3) ibooker.setCurrentFolder(baseFolder_+"/GlobalMuonsNotTrackerMuons");
37 
38  hNumChambers[i] = ibooker.book1D("hNumChambers", "Number of Chambers", 17, -0.5, 16.5);
39  hNumMatches[i] = ibooker.book1D("hNumMatches", "Number of Matches", 11, -0.5, 10.5);
40  hNumChambersNoRPC[i] = ibooker.book1D("hNumChambersNoRPC", "Number of Chambers No RPC", 11, -0.5, 10.5);
41 
42  // by station
43  for(int station = 0; station < 4; ++station)
44  {
45  sprintf(name, "hDT%iNumSegments", station+1);
46  sprintf(title, "DT Station %i Number of Segments (No Arbitration)", station+1);
47  hDTNumSegments[i][station] = ibooker.book1D(name, title, 11, -0.5, 10.5);
48 
49  sprintf(name, "hDT%iDx", station+1);
50  sprintf(title, "DT Station %i Delta X", station+1);
51  hDTDx[i][station] = ibooker.book1D(name, title, 100, -100., 100.);
52 
53  sprintf(name, "hDT%iPullx", station+1);
54  sprintf(title, "DT Station %i Pull X", station+1);
55  hDTPullx[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
56 
57  sprintf(name, "hDT%iDdXdZ", station+1);
58  sprintf(title, "DT Station %i Delta DxDz", station+1);
59  hDTDdXdZ[i][station] = ibooker.book1D(name, title, 100, -1., 1.);
60 
61  sprintf(name, "hDT%iPulldXdZ", station+1);
62  sprintf(title, "DT Station %i Pull DxDz", station+1);
63  hDTPulldXdZ[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
64 
65  if (station < 3) {
66  sprintf(name, "hDT%iDy", station+1);
67  sprintf(title, "DT Station %i Delta Y", station+1);
68  hDTDy[i][station] = ibooker.book1D(name, title, 100, -150., 150.);
69 
70  sprintf(name, "hDT%iPully", station+1);
71  sprintf(title, "DT Station %i Pull Y", station+1);
72  hDTPully[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
73 
74  sprintf(name, "hDT%iDdYdZ", station+1);
75  sprintf(title, "DT Station %i Delta DyDz", station+1);
76  hDTDdYdZ[i][station] = ibooker.book1D(name, title, 100, -2., 2.);
77 
78  sprintf(name, "hDT%iPulldYdZ", station+1);
79  sprintf(title, "DT Station %i Pull DyDz", station+1);
80  hDTPulldYdZ[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
81  }
82 
83  sprintf(name, "hCSC%iNumSegments", station+1);
84  sprintf(title, "CSC Station %i Number of Segments (No Arbitration)", station+1);
85  hCSCNumSegments[i][station] = ibooker.book1D(name, title, 11, -0.5, 10.5);
86 
87  sprintf(name, "hCSC%iDx", station+1);
88  sprintf(title, "CSC Station %i Delta X", station+1);
89  hCSCDx[i][station] = ibooker.book1D(name, title, 100, -50., 50.);
90 
91  sprintf(name, "hCSC%iPullx", station+1);
92  sprintf(title, "CSC Station %i Pull X", station+1);
93  hCSCPullx[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
94 
95  sprintf(name, "hCSC%iDdXdZ", station+1);
96  sprintf(title, "CSC Station %i Delta DxDz", station+1);
97  hCSCDdXdZ[i][station] = ibooker.book1D(name, title, 100, -1., 1.);
98 
99  sprintf(name, "hCSC%iPulldXdZ", station+1);
100  sprintf(title, "CSC Station %i Pull DxDz", station+1);
101  hCSCPulldXdZ[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
102 
103  sprintf(name, "hCSC%iDy", station+1);
104  sprintf(title, "CSC Station %i Delta Y", station+1);
105  hCSCDy[i][station] = ibooker.book1D(name, title, 100, -50., 50.);
106 
107  sprintf(name, "hCSC%iPully", station+1);
108  sprintf(title, "CSC Station %i Pull Y", station+1);
109  hCSCPully[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
110 
111  sprintf(name, "hCSC%iDdYdZ", station+1);
112  sprintf(title, "CSC Station %i Delta DyDz", station+1);
113  hCSCDdYdZ[i][station] = ibooker.book1D(name, title, 100, -1., 1.);
114 
115  sprintf(name, "hCSC%iPulldYdZ", station+1);
116  sprintf(title, "CSC Station %i Pull DyDz", station+1);
117  hCSCPulldYdZ[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
118  }// station
119  }
120 
121 }
bool useTrackerMuons_
Definition: MuonIdDQM.h:66
MonitorElement * hCSCDx[4][4]
Definition: MuonIdDQM.h:93
int i
Definition: DBlmapReader.cc:9
void cd(void)
Definition: DQMStore.cc:268
MonitorElement * hCSCDdYdZ[4][4]
Definition: MuonIdDQM.h:99
MonitorElement * hCSCDdXdZ[4][4]
Definition: MuonIdDQM.h:95
MonitorElement * hCSCPulldXdZ[4][4]
Definition: MuonIdDQM.h:96
bool useGlobalMuonsNotTrackerMuons_
Definition: MuonIdDQM.h:69
bool useTrackerMuonsNotGlobalMuons_
Definition: MuonIdDQM.h:68
MonitorElement * hDTDdYdZ[4][3]
Definition: MuonIdDQM.h:90
MonitorElement * hDTPully[4][3]
Definition: MuonIdDQM.h:89
MonitorElement * hCSCDy[4][4]
Definition: MuonIdDQM.h:97
MonitorElement * hCSCPully[4][4]
Definition: MuonIdDQM.h:98
MonitorElement * hSegmentIsAssociatedBool
Definition: MuonIdDQM.h:103
MonitorElement * hDTPullx[4][4]
Definition: MuonIdDQM.h:85
MonitorElement * hCSCPullx[4][4]
Definition: MuonIdDQM.h:94
bool useGlobalMuons_
Definition: MuonIdDQM.h:67
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * hNumMatches[4]
Definition: MuonIdDQM.h:79
MonitorElement * hDTDdXdZ[4][4]
Definition: MuonIdDQM.h:86
MonitorElement * hDTDx[4][4]
Definition: MuonIdDQM.h:84
MonitorElement * hDTPulldYdZ[4][3]
Definition: MuonIdDQM.h:91
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * hDTDy[4][3]
Definition: MuonIdDQM.h:88
MonitorElement * hCSCPulldYdZ[4][4]
Definition: MuonIdDQM.h:100
MonitorElement * hDTNumSegments[4][4]
Definition: MuonIdDQM.h:83
MonitorElement * hCSCNumSegments[4][4]
Definition: MuonIdDQM.h:92
MonitorElement * hNumChambersNoRPC[4]
Definition: MuonIdDQM.h:80
std::string baseFolder_
Definition: MuonIdDQM.h:70
MonitorElement * hDTPulldXdZ[4][4]
Definition: MuonIdDQM.h:87
MonitorElement * hNumChambers[4]
Definition: MuonIdDQM.h:78
void MuonIdDQM::Fill ( MonitorElement me,
float  f 
)
privatevirtual

Definition at line 268 of file MuonIdDQM.cc.

References MonitorElement::Fill().

Referenced by analyze().

268  {
269  if (fabs(f) > 900000) return;
270  //if (fabs(f) < 1E-8) return;
271  me->Fill(f);
272 }
void Fill(long long x)
double f[11][100]

Member Data Documentation

std::string MuonIdDQM::baseFolder_
private

Definition at line 70 of file MuonIdDQM.h.

Referenced by bookHistograms(), and MuonIdDQM().

edm::Handle<CSCSegmentCollection> MuonIdDQM::cscSegmentCollectionH_
private

Definition at line 74 of file MuonIdDQM.h.

Referenced by analyze().

edm::Handle<DTRecSegment4DCollection> MuonIdDQM::dtSegmentCollectionH_
private

Definition at line 73 of file MuonIdDQM.h.

Referenced by analyze().

edm::ESHandle<GlobalTrackingGeometry> MuonIdDQM::geometry_
private

Definition at line 75 of file MuonIdDQM.h.

Referenced by analyze().

MonitorElement* MuonIdDQM::hCSCDdXdZ[4][4]
private

Definition at line 95 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hCSCDdYdZ[4][4]
private

Definition at line 99 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hCSCDx[4][4]
private

Definition at line 93 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hCSCDy[4][4]
private

Definition at line 97 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hCSCNumSegments[4][4]
private

Definition at line 92 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hCSCPulldXdZ[4][4]
private

Definition at line 96 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hCSCPulldYdZ[4][4]
private

Definition at line 100 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hCSCPullx[4][4]
private

Definition at line 94 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hCSCPully[4][4]
private

Definition at line 98 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hDTDdXdZ[4][4]
private

Definition at line 86 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hDTDdYdZ[4][3]
private

Definition at line 90 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hDTDx[4][4]
private

Definition at line 84 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hDTDy[4][3]
private

Definition at line 88 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hDTNumSegments[4][4]
private

Definition at line 83 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hDTPulldXdZ[4][4]
private

Definition at line 87 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hDTPulldYdZ[4][3]
private

Definition at line 91 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hDTPullx[4][4]
private

Definition at line 85 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hDTPully[4][3]
private

Definition at line 89 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hNumChambers[4]
private

Definition at line 78 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hNumChambersNoRPC[4]
private

Definition at line 80 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hNumMatches[4]
private

Definition at line 79 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MuonIdDQM::hSegmentIsAssociatedBool
private

Definition at line 103 of file MuonIdDQM.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<CSCSegmentCollection> MuonIdDQM::inputCSCSegmentCollection_
private

Definition at line 65 of file MuonIdDQM.h.

Referenced by analyze(), and MuonIdDQM().

edm::EDGetTokenT<DTRecSegment4DCollection> MuonIdDQM::inputDTRecSegment4DCollection_
private

Definition at line 64 of file MuonIdDQM.h.

Referenced by analyze(), and MuonIdDQM().

edm::EDGetTokenT<reco::MuonCollection> MuonIdDQM::inputMuonCollection_
private

Definition at line 63 of file MuonIdDQM.h.

Referenced by analyze(), and MuonIdDQM().

edm::Handle<reco::MuonCollection> MuonIdDQM::muonCollectionH_
private

Definition at line 72 of file MuonIdDQM.h.

Referenced by analyze().

bool MuonIdDQM::useGlobalMuons_
private

Definition at line 67 of file MuonIdDQM.h.

Referenced by analyze(), bookHistograms(), and MuonIdDQM().

bool MuonIdDQM::useGlobalMuonsNotTrackerMuons_
private

Definition at line 69 of file MuonIdDQM.h.

Referenced by analyze(), bookHistograms(), and MuonIdDQM().

bool MuonIdDQM::useTrackerMuons_
private

Definition at line 66 of file MuonIdDQM.h.

Referenced by analyze(), bookHistograms(), and MuonIdDQM().

bool MuonIdDQM::useTrackerMuonsNotGlobalMuons_
private

Definition at line 68 of file MuonIdDQM.h.

Referenced by analyze(), bookHistograms(), and MuonIdDQM().