CMS 3D CMS Logo

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

#include <BPHMonitor.h>

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

Public Member Functions

 BPHMonitor (const edm::ParameterSet &)
 
 ~BPHMonitor ()
 
- 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 ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (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

void analyze (edm::Event const &iEvent, edm::EventSetup const &iSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void bookME (DQMStore::IBooker &, METME &me, std::string &histname, std::string &histtitle, int &nbins, double &xmin, double &xmax)
 
void bookME (DQMStore::IBooker &, METME &me, std::string &histname, std::string &histtitle, std::vector< double > binningX)
 
void bookME (DQMStore::IBooker &, METME &me, std::string &histname, std::string &histtitle, int &nbinsX, double &xmin, double &xmax, double &ymin, double &ymax)
 
void bookME (DQMStore::IBooker &, METME &me, std::string &histname, std::string &histtitle, int &nbinsX, double &xmin, double &xmax, int &nbinsY, double &ymin, double &ymax)
 
void bookME (DQMStore::IBooker &, METME &me, std::string &histname, std::string &histtitle, std::vector< double > binningX, std::vector< double > binningY)
 
void setMETitle (METME &me, std::string titleX, std::string titleY)
 
- 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)
 

Static Private Member Functions

static MEbinning getHistoLSPSet (edm::ParameterSet pset)
 
static MEbinning getHistoPSet (edm::ParameterSet pset)
 

Private Attributes

edm::EDGetTokenT< reco::BeamSpotbsToken_
 
MEbinning d0_binning_
 
GenericTriggerEventFlagden_genTriggerEventFlag_
 
MEbinning eta_binning_
 
std::string folderName_
 
std::string histoSuffix_
 
MEbinning ls_binning_
 
METME mud0_
 
METME muEta_
 
StringCutObjectSelector< reco::Muon, true > muoSelection_
 
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
 
edm::EDGetTokenT< reco::MuonCollectionmuoToken_
 
METME muPhi_
 
METME muPt_
 
METME muz0_
 
int nmuons_
 
GenericTriggerEventFlagnum_genTriggerEventFlag_
 
MEbinning phi_binning_
 
MEbinning pt_binning_
 
MEbinning z0_binning_
 

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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Detailed Description

Definition at line 53 of file BPHMonitor.h.

Constructor & Destructor Documentation

BPHMonitor::BPHMonitor ( const edm::ParameterSet iConfig)

Definition at line 12 of file BPHMonitor.cc.

References METME::denominator, mud0_, muEta_, muPhi_, muPt_, muz0_, and METME::numerator.

12  :
13  folderName_ ( iConfig.getParameter<std::string>("FolderName") )
14  , muoToken_ ( mayConsume<reco::MuonCollection> (iConfig.getParameter<edm::InputTag>("muons") ) )
15  , bsToken_ ( mayConsume<reco::BeamSpot> (iConfig.getParameter<edm::InputTag>("beamSpot")))
16  , phi_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("phiPSet") ) )
17  , pt_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("ptPSet") ) )
18  , eta_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("etaPSet") ) )
21  , num_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"),consumesCollector(), *this))
22  , den_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"),consumesCollector(), *this))
23  , muoSelection_ ( iConfig.getParameter<std::string>("muoSelection") )
24  , muoSelection_ref ( iConfig.getParameter<std::string>("muoSelection_ref") )
25  , nmuons_ ( iConfig.getParameter<int>("nmuons" ) )
26 {
27 
28  muPhi_.numerator = nullptr;
29  muPhi_.denominator = nullptr;
30  muEta_.numerator = nullptr;
31  muEta_.denominator = nullptr;
32  muPt_.numerator = nullptr;
33  muPt_.denominator = nullptr;
34  mud0_.numerator = nullptr;
35  mud0_.denominator = nullptr;
36  muz0_.numerator = nullptr;
37  muz0_.denominator = nullptr;
38 }
MonitorElement * numerator
Definition: BPHMonitor.h:45
MEbinning z0_binning_
Definition: BPHMonitor.h:88
T getParameter(std::string const &) const
METME muPt_
Definition: BPHMonitor.h:93
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: BPHMonitor.h:81
std::string folderName_
Definition: BPHMonitor.h:78
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
MEbinning eta_binning_
Definition: BPHMonitor.h:86
static MEbinning getHistoLSPSet(edm::ParameterSet pset)
Definition: BPHMonitor.cc:55
MEbinning pt_binning_
Definition: BPHMonitor.h:85
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
GenericTriggerEventFlag * den_genTriggerEventFlag_
Definition: BPHMonitor.h:99
MEbinning phi_binning_
Definition: BPHMonitor.h:84
MonitorElement * denominator
Definition: BPHMonitor.h:46
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: BPHMonitor.h:100
METME muz0_
Definition: BPHMonitor.h:95
MEbinning d0_binning_
Definition: BPHMonitor.h:87
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: BPHMonitor.h:82
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
Definition: BPHMonitor.h:101
static MEbinning getHistoPSet(edm::ParameterSet pset)
Definition: BPHMonitor.cc:46
METME muEta_
Definition: BPHMonitor.h:92
METME mud0_
Definition: BPHMonitor.h:94
GenericTriggerEventFlag * num_genTriggerEventFlag_
Definition: BPHMonitor.h:98
METME muPhi_
Definition: BPHMonitor.h:91
BPHMonitor::~BPHMonitor ( )

Definition at line 40 of file BPHMonitor.cc.

References den_genTriggerEventFlag_, and num_genTriggerEventFlag_.

41 {
44 }
GenericTriggerEventFlag * den_genTriggerEventFlag_
Definition: BPHMonitor.h:99
GenericTriggerEventFlag * num_genTriggerEventFlag_
Definition: BPHMonitor.h:98

Member Function Documentation

void BPHMonitor::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 149 of file BPHMonitor.cc.

References GenericTriggerEventFlag::accept(), ecalDrivenElectronSeedsParameters_cff::beamSpot, bsToken_, allConversions_cfi::d0, den_genTriggerEventFlag_, METME::denominator, reco::TrackBase::dxy(), reco::TrackBase::dz(), MonitorElement::Fill(), edm::Event::getByToken(), funct::m, mud0_, muEta_, muoSelection_, muoSelection_ref, muoToken_, muPhi_, muPt_, muz0_, num_genTriggerEventFlag_, METME::numerator, GenericTriggerEventFlag::on(), reco::BeamSpot::position(), and HiIsolationCommonParameters_cff::track.

149  {
150 
151 // edm::Handle<reco::BeamSpot> const& beamSpot;
152  // Filter out events if Trigger Filtering is requested
153  if (den_genTriggerEventFlag_->on() && ! den_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
154 
155 
157  iEvent.getByToken( bsToken_, beamSpot);
159  iEvent.getByToken( muoToken_, muoHandle );
160 
161  for (auto const & m : *muoHandle) {
162  if(!muoSelection_ref(m))continue;
163  muPhi_.denominator->Fill(m.phi());
164  muEta_.denominator->Fill(m.eta());
165  muPt_.denominator ->Fill(m.pt());
166  const reco::Track * track = 0;
167  if (m.isTrackerMuon()) track = & * m.innerTrack();
168  else if (m.isStandAloneMuon()) track = & * m.outerTrack();
169  if (track) {
170  double d0 = track->dxy(beamSpot->position());
171  double z0 = track->dz(beamSpot->position());
172  mud0_.denominator ->Fill(d0);
173  muz0_.denominator ->Fill(z0);
174  }
175  }
176  // applying selection for numerator
177  if (num_genTriggerEventFlag_->on() && ! num_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
178  for (auto const & m : *muoHandle) {
179  if(!muoSelection_(m))continue;
180  muPhi_.numerator->Fill(m.phi());
181  muEta_.numerator->Fill(m.eta());
182  muPt_.numerator ->Fill(m.pt());
183  const reco::Track * track = 0;
184  if (m.isTrackerMuon()) track = & * m.innerTrack();
185  else if (m.isStandAloneMuon()) track = & * m.outerTrack();
186  if (track) {
187  double d0 = track->dxy(beamSpot->position());
188  double z0 = track->dz(beamSpot->position());
189  mud0_.numerator ->Fill(d0);
190  muz0_.numerator ->Fill(z0);
191  }
192  }
193 
194  // filling histograms (num_genTriggerEventFlag_)
195 
196 }
MonitorElement * numerator
Definition: BPHMonitor.h:45
METME muPt_
Definition: BPHMonitor.h:93
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: BPHMonitor.h:81
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:230
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
GenericTriggerEventFlag * den_genTriggerEventFlag_
Definition: BPHMonitor.h:99
MonitorElement * denominator
Definition: BPHMonitor.h:46
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: BPHMonitor.h:100
METME muz0_
Definition: BPHMonitor.h:95
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:604
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: BPHMonitor.h:82
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
Definition: BPHMonitor.h:101
METME muEta_
Definition: BPHMonitor.h:92
METME mud0_
Definition: BPHMonitor.h:94
const Point & position() const
position
Definition: BeamSpot.h:62
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:586
GenericTriggerEventFlag * num_genTriggerEventFlag_
Definition: BPHMonitor.h:98
METME muPhi_
Definition: BPHMonitor.h:91
void BPHMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 109 of file BPHMonitor.cc.

References bookME(), d0_binning_, den_genTriggerEventFlag_, eta_binning_, folderName_, GenericTriggerEventFlag::initRun(), mud0_, muEta_, muPhi_, muPt_, muz0_, MEbinning::nbins, num_genTriggerEventFlag_, GenericTriggerEventFlag::on(), phi_binning_, pt_binning_, DQMStore::IBooker::setCurrentFolder(), setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, MEbinning::xmax, MEbinning::xmin, and z0_binning_.

112 {
113 
114  std::string histname, histtitle;
115 
116  std::string currentFolder = folderName_ ;
117  ibooker.setCurrentFolder(currentFolder.c_str());
118 
119  histname = "muPt"; histtitle = "mu_P_{t}";
120  bookME(ibooker,muPt_,histname,histtitle, pt_binning_.nbins, pt_binning_.xmin, pt_binning_.xmax);
121  setMETitle(muPt_,"Mu_Pt[GeV]","events/1GeV");
122 
123  histname = "muPhi"; histtitle = "muPhi";
124  bookME(ibooker,muPhi_,histname,histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
125  setMETitle(muPhi_," mu_#phi","events / 0.1 rad");
126 
127  histname = "muEta"; histtitle = "mu_Eta";
128  bookME(ibooker,muEta_,histname,histtitle, eta_binning_.nbins,eta_binning_.xmin, eta_binning_.xmax);
129  setMETitle(muEta_," mu_#eta","events/ ");
130 
131  histname = "mu_d0"; histtitle = "mu_d0";
132  bookME(ibooker,mud0_,histname,histtitle, d0_binning_.nbins,d0_binning_.xmin, d0_binning_.xmax);
133  setMETitle(mud0_," mu_d0","events/bin ");
134 
135  histname = "mu_z0"; histtitle = "mu_z0";
136  bookME(ibooker,muz0_,histname,histtitle, z0_binning_.nbins,z0_binning_.xmin, z0_binning_.xmax);
137  setMETitle(muz0_," mu_z0","events/bin ");
138 
139  // Initialize the GenericTriggerEventFlag
142 
143 }
MEbinning z0_binning_
Definition: BPHMonitor.h:88
METME muPt_
Definition: BPHMonitor.h:93
void bookME(DQMStore::IBooker &, METME &me, std::string &histname, std::string &histtitle, int &nbins, double &xmin, double &xmax)
Definition: BPHMonitor.cc:73
std::string folderName_
Definition: BPHMonitor.h:78
MEbinning eta_binning_
Definition: BPHMonitor.h:86
void setMETitle(METME &me, std::string titleX, std::string titleY)
Definition: BPHMonitor.cc:64
MEbinning pt_binning_
Definition: BPHMonitor.h:85
double xmin
Definition: LumiMonitor.h:30
GenericTriggerEventFlag * den_genTriggerEventFlag_
Definition: BPHMonitor.h:99
MEbinning phi_binning_
Definition: BPHMonitor.h:84
METME muz0_
Definition: BPHMonitor.h:95
MEbinning d0_binning_
Definition: BPHMonitor.h:87
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
METME muEta_
Definition: BPHMonitor.h:92
METME mud0_
Definition: BPHMonitor.h:94
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
GenericTriggerEventFlag * num_genTriggerEventFlag_
Definition: BPHMonitor.h:98
METME muPhi_
Definition: BPHMonitor.h:91
double xmax
Definition: LumiMonitor.h:31
void BPHMonitor::bookME ( DQMStore::IBooker ibooker,
METME me,
std::string &  histname,
std::string &  histtitle,
int &  nbins,
double &  xmin,
double &  xmax 
)
protected

Definition at line 73 of file BPHMonitor.cc.

References DQMStore::IBooker::book1D(), METME::denominator, and METME::numerator.

Referenced by bookHistograms().

74 {
75  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, min, max);
76  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, min, max);
77 }
MonitorElement * numerator
Definition: BPHMonitor.h:45
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * denominator
Definition: BPHMonitor.h:46
T min(T a, T b)
Definition: MathUtil.h:58
void BPHMonitor::bookME ( DQMStore::IBooker ibooker,
METME me,
std::string &  histname,
std::string &  histtitle,
std::vector< double >  binningX 
)
protected

Definition at line 78 of file BPHMonitor.cc.

References DQMStore::IBooker::book1D(), METME::denominator, pileupCalc::nbins, and METME::numerator.

79 {
80  int nbins = binning.size()-1;
81  std::vector<float> fbinning(binning.begin(),binning.end());
82  float* arr = &fbinning[0];
83  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, arr);
84  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, arr);
85 }
MonitorElement * numerator
Definition: BPHMonitor.h:45
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * denominator
Definition: BPHMonitor.h:46
void BPHMonitor::bookME ( DQMStore::IBooker ibooker,
METME me,
std::string &  histname,
std::string &  histtitle,
int &  nbinsX,
double &  xmin,
double &  xmax,
double &  ymin,
double &  ymax 
)
protected

Definition at line 86 of file BPHMonitor.cc.

References DQMStore::IBooker::bookProfile(), METME::denominator, and METME::numerator.

87 {
88  me.numerator = ibooker.bookProfile(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
89  me.denominator = ibooker.bookProfile(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
90 }
MonitorElement * numerator
Definition: BPHMonitor.h:45
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * denominator
Definition: BPHMonitor.h:46
void BPHMonitor::bookME ( DQMStore::IBooker ibooker,
METME me,
std::string &  histname,
std::string &  histtitle,
int &  nbinsX,
double &  xmin,
double &  xmax,
int &  nbinsY,
double &  ymin,
double &  ymax 
)
protected

Definition at line 91 of file BPHMonitor.cc.

References DQMStore::IBooker::book2D(), METME::denominator, and METME::numerator.

92 {
93  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
94  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
95 }
MonitorElement * numerator
Definition: BPHMonitor.h:45
MonitorElement * denominator
Definition: BPHMonitor.h:46
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
void BPHMonitor::bookME ( DQMStore::IBooker ibooker,
METME me,
std::string &  histname,
std::string &  histtitle,
std::vector< double >  binningX,
std::vector< double >  binningY 
)
protected

Definition at line 96 of file BPHMonitor.cc.

References DQMStore::IBooker::book2D(), METME::denominator, and METME::numerator.

97 {
98  int nbinsX = binningX.size()-1;
99  std::vector<float> fbinningX(binningX.begin(),binningX.end());
100  float* arrX = &fbinningX[0];
101  int nbinsY = binningY.size()-1;
102  std::vector<float> fbinningY(binningY.begin(),binningY.end());
103  float* arrY = &fbinningY[0];
104 
105  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, arrX, nbinsY, arrY);
106  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, arrX, nbinsY, arrY);
107 }
MonitorElement * numerator
Definition: BPHMonitor.h:45
MonitorElement * denominator
Definition: BPHMonitor.h:46
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
void BPHMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 210 of file BPHMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, fillHistoPSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

211 {
213  desc.add<std::string> ( "FolderName", "HLT/BPH/" );
214 
215  desc.add<edm::InputTag>( "tracks", edm::InputTag("generalTracks") );
216  desc.add<edm::InputTag>( "offlinePVs", edm::InputTag("offlinePrimaryVertices") );
217  desc.add<edm::InputTag>( "beamSpot",edm::InputTag("offlineBeamSpot") );
218  desc.add<edm::InputTag>( "muons", edm::InputTag("muons") );
219  desc.add<std::string>("muoSelection", "abs(eta)<1.4 & isPFMuon & isGlobalMuon & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits>0");
220  desc.add<std::string>("muoSelection_ref", "isPFMuon & isGlobalMuon & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits>0");
221  desc.add<int>("nmuons", 1);
222 
223  edm::ParameterSetDescription genericTriggerEventPSet;
224  genericTriggerEventPSet.add<bool>("andOr");
225  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi") );
226  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions",{});
227  genericTriggerEventPSet.add<bool>("andOrDcs", false);
228  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
229  genericTriggerEventPSet.add<std::string>("dbLabel","");
230  genericTriggerEventPSet.add<bool>("andOrHlt", true);
231  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT") );
232  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths",{});
233  genericTriggerEventPSet.add<std::string>("hltDBKey","");
234  genericTriggerEventPSet.add<bool>("errorReplyHlt",false);
235  genericTriggerEventPSet.add<unsigned int>("verbosityLevel",0);
236 
237  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
238  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
239 
246  fillHistoPSetDescription(phiPSet);
247  fillHistoPSetDescription(ptPSet);
248  fillHistoPSetDescription(etaPSet);
249  fillHistoPSetDescription(z0PSet);
250  fillHistoPSetDescription(d0PSet);
251  histoPSet.add<edm::ParameterSetDescription>("d0PSet", d0PSet);
252  histoPSet.add<edm::ParameterSetDescription>("etaPSet", etaPSet);
253  histoPSet.add<edm::ParameterSetDescription>("phiPSet", phiPSet);
254  histoPSet.add<edm::ParameterSetDescription>("ptPSet", ptPSet);
255  histoPSet.add<edm::ParameterSetDescription>("z0PSet", z0PSet);
256  desc.add<edm::ParameterSetDescription>("histoPSet",histoPSet);
257 
258  descriptions.add("bphMonitoring", desc);
259 }
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: BPHMonitor.cc:198
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void BPHMonitor::fillHistoLSPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 205 of file BPHMonitor.cc.

References edm::ParameterSetDescription::add().

206 {
207  pset.add<int> ( "nbins", 2500);
208 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void BPHMonitor::fillHistoPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 198 of file BPHMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

199 {
200  pset.add<int> ( "nbins");
201  pset.add<double>( "xmin" );
202  pset.add<double>( "xmax" );
203 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MEbinning BPHMonitor::getHistoLSPSet ( edm::ParameterSet  pset)
staticprivate

Definition at line 55 of file BPHMonitor.cc.

References edm::ParameterSet::getParameter().

56 {
57  return MEbinning{
58  pset.getParameter<int32_t>("nbins"),
59  0.,
60  double(pset.getParameter<int32_t>("nbins"))
61  };
62 }
T getParameter(std::string const &) const
MEbinning BPHMonitor::getHistoPSet ( edm::ParameterSet  pset)
staticprivate

Definition at line 46 of file BPHMonitor.cc.

References edm::ParameterSet::getParameter().

47 {
48  return MEbinning{
49  pset.getParameter<int32_t>("nbins"),
50  pset.getParameter<double>("xmin"),
51  pset.getParameter<double>("xmax"),
52  };
53 }
T getParameter(std::string const &) const
void BPHMonitor::setMETitle ( METME me,
std::string  titleX,
std::string  titleY 
)
protected

Definition at line 64 of file BPHMonitor.cc.

References METME::denominator, METME::numerator, and MonitorElement::setAxisTitle().

Referenced by bookHistograms().

65 {
66  me.numerator->setAxisTitle(titleX,1);
67  me.numerator->setAxisTitle(titleY,2);
68  me.denominator->setAxisTitle(titleX,1);
69  me.denominator->setAxisTitle(titleY,2);
70 
71 }
MonitorElement * numerator
Definition: BPHMonitor.h:45
MonitorElement * denominator
Definition: BPHMonitor.h:46
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

edm::EDGetTokenT<reco::BeamSpot> BPHMonitor::bsToken_
private

Definition at line 82 of file BPHMonitor.h.

Referenced by analyze().

MEbinning BPHMonitor::d0_binning_
private

Definition at line 87 of file BPHMonitor.h.

Referenced by bookHistograms().

GenericTriggerEventFlag* BPHMonitor::den_genTriggerEventFlag_
private

Definition at line 99 of file BPHMonitor.h.

Referenced by analyze(), bookHistograms(), and ~BPHMonitor().

MEbinning BPHMonitor::eta_binning_
private

Definition at line 86 of file BPHMonitor.h.

Referenced by bookHistograms().

std::string BPHMonitor::folderName_
private

Definition at line 78 of file BPHMonitor.h.

Referenced by bookHistograms().

std::string BPHMonitor::histoSuffix_
private

Definition at line 79 of file BPHMonitor.h.

MEbinning BPHMonitor::ls_binning_
private

Definition at line 89 of file BPHMonitor.h.

METME BPHMonitor::mud0_
private

Definition at line 94 of file BPHMonitor.h.

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

METME BPHMonitor::muEta_
private

Definition at line 92 of file BPHMonitor.h.

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

StringCutObjectSelector<reco::Muon,true> BPHMonitor::muoSelection_
private

Definition at line 100 of file BPHMonitor.h.

Referenced by analyze().

StringCutObjectSelector<reco::Muon,true> BPHMonitor::muoSelection_ref
private

Definition at line 101 of file BPHMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::MuonCollection> BPHMonitor::muoToken_
private

Definition at line 81 of file BPHMonitor.h.

Referenced by analyze().

METME BPHMonitor::muPhi_
private

Definition at line 91 of file BPHMonitor.h.

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

METME BPHMonitor::muPt_
private

Definition at line 93 of file BPHMonitor.h.

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

METME BPHMonitor::muz0_
private

Definition at line 95 of file BPHMonitor.h.

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

int BPHMonitor::nmuons_
private

Definition at line 102 of file BPHMonitor.h.

GenericTriggerEventFlag* BPHMonitor::num_genTriggerEventFlag_
private

Definition at line 98 of file BPHMonitor.h.

Referenced by analyze(), bookHistograms(), and ~BPHMonitor().

MEbinning BPHMonitor::phi_binning_
private

Definition at line 84 of file BPHMonitor.h.

Referenced by bookHistograms().

MEbinning BPHMonitor::pt_binning_
private

Definition at line 85 of file BPHMonitor.h.

Referenced by bookHistograms().

MEbinning BPHMonitor::z0_binning_
private

Definition at line 88 of file BPHMonitor.h.

Referenced by bookHistograms().