CMS 3D CMS Logo

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

#include <NoBPTXMonitor.h>

Inheritance diagram for NoBPTXMonitor:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Classes

struct  NoBPTXbinning
 
struct  NoBPTXME
 

Public Member Functions

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

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 

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 bookNoBPTX (DQMStore::IBooker &, NoBPTXME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
 
void bookNoBPTX (DQMStore::IBooker &, NoBPTXME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX)
 
void bookNoBPTX (DQMStore::IBooker &, NoBPTXME &me, const std::string &histname, const std::string &histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax, bool bookDen)
 
void bookNoBPTX (DQMStore::IBooker &, NoBPTXME &me, const std::string &histname, const std::string &histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax)
 
void bookNoBPTX (DQMStore::IBooker &, NoBPTXME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY)
 
void setNoBPTXTitle (NoBPTXME &me, const std::string &titleX, const std::string &titleY, bool bookDen)
 

Static Private Member Functions

static NoBPTXbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static NoBPTXbinning getHistoPSet (const edm::ParameterSet &pset)
 

Private Attributes

NoBPTXbinning bx_binning_
 
std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
std::string folderName_
 
std::string histoSuffix_
 
NoBPTXbinning jetE_binning_
 
std::vector< double > jetE_variable_binning_
 
NoBPTXME jetENoBPTX_
 
NoBPTXME jetENoBPTX_variableBinning_
 
NoBPTXbinning jetEta_binning_
 
NoBPTXME jetEtaNoBPTX_
 
NoBPTXME jetEtaVsBX_
 
NoBPTXME jetEtaVsLS_
 
NoBPTXME jetEVsBX_
 
NoBPTXME jetEVsLS_
 
NoBPTXbinning jetPhi_binning_
 
NoBPTXME jetPhiNoBPTX_
 
NoBPTXME jetPhiVsBX_
 
NoBPTXME jetPhiVsLS_
 
StringCutObjectSelector< reco::CaloJet, true > jetSelection_
 
edm::EDGetTokenT< reco::CaloJetCollectionjetToken_
 
NoBPTXbinning ls_binning_
 
NoBPTXbinning muonEta_binning_
 
NoBPTXME muonEtaNoBPTX_
 
NoBPTXME muonEtaVsBX_
 
NoBPTXME muonEtaVsLS_
 
NoBPTXbinning muonPhi_binning_
 
NoBPTXME muonPhiNoBPTX_
 
NoBPTXME muonPhiVsBX_
 
NoBPTXME muonPhiVsLS_
 
NoBPTXbinning muonPt_binning_
 
std::vector< double > muonPt_variable_binning_
 
NoBPTXME muonPtNoBPTX_
 
NoBPTXME muonPtNoBPTX_variableBinning_
 
NoBPTXME muonPtVsBX_
 
NoBPTXME muonPtVsLS_
 
StringCutObjectSelector< reco::Track, true > muonSelection_
 
edm::EDGetTokenT< reco::TrackCollectionmuonToken_
 
unsigned int njets_
 
unsigned int nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 

Detailed Description

Definition at line 42 of file NoBPTXMonitor.h.

Constructor & Destructor Documentation

NoBPTXMonitor::NoBPTXMonitor ( const edm::ParameterSet iConfig)

Definition at line 7 of file NoBPTXMonitor.cc.

References NoBPTXMonitor::NoBPTXME::denominator, jetENoBPTX_, jetENoBPTX_variableBinning_, jetEtaNoBPTX_, jetEtaVsBX_, jetEtaVsLS_, jetEVsBX_, jetEVsLS_, jetPhiNoBPTX_, jetPhiVsBX_, jetPhiVsLS_, muonEtaNoBPTX_, muonEtaVsBX_, muonEtaVsLS_, muonPhiNoBPTX_, muonPhiVsBX_, muonPhiVsLS_, muonPtNoBPTX_, muonPtNoBPTX_variableBinning_, muonPtVsBX_, muonPtVsLS_, NoBPTXMonitor::NoBPTXME::numerator, and ~NoBPTXMonitor().

7  :
8  folderName_ ( iConfig.getParameter<std::string>("FolderName") )
9  , jetToken_ ( consumes<reco::CaloJetCollection> (iConfig.getParameter<edm::InputTag>("jets") ) )
10  , muonToken_ ( consumes<reco::TrackCollection> (iConfig.getParameter<edm::InputTag>("muons") ) )
11  , jetE_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("jetEBinning") )
12  , jetE_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("jetEPSet") ) )
13  , jetEta_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("jetEtaPSet") ) )
14  , jetPhi_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("jetPhiPSet") ) )
15  , muonPt_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("muonPtBinning") )
16  , muonPt_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("muonPtPSet") ) )
17  , muonEta_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("muonEtaPSet") ) )
18  , muonPhi_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("muonPhiPSet") ) )
19  , ls_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("lsPSet") ) )
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  , jetSelection_ ( iConfig.getParameter<std::string>("jetSelection") )
24  , muonSelection_ ( iConfig.getParameter<std::string>("muonSelection") )
25  , njets_ ( iConfig.getParameter<unsigned int>("njets" ) )
26  , nmuons_ ( iConfig.getParameter<unsigned int>("nmuons" ) )
27 {
28 
29  jetENoBPTX_.numerator = nullptr;
30  jetENoBPTX_.denominator = nullptr;
33  jetEVsLS_.numerator = nullptr;
34  jetEVsLS_.denominator = nullptr;
35  jetEVsBX_.numerator = nullptr;
36  jetEtaNoBPTX_.numerator = nullptr;
37  jetEtaNoBPTX_.denominator = nullptr;
38  jetEtaVsLS_.numerator = nullptr;
39  jetEtaVsBX_.numerator = nullptr;
40  jetPhiNoBPTX_.numerator = nullptr;
41  jetPhiNoBPTX_.denominator = nullptr;
42  jetPhiVsLS_.numerator = nullptr;
43  jetPhiVsBX_.numerator = nullptr;
44 
45  muonPtNoBPTX_.numerator = nullptr;
46  muonPtNoBPTX_.denominator = nullptr;
49  muonPtVsLS_.numerator = nullptr;
50  muonPtVsBX_.numerator = nullptr;
51  muonEtaNoBPTX_.numerator = nullptr;
52  muonEtaNoBPTX_.denominator = nullptr;
53  muonEtaVsLS_.numerator = nullptr;
54  muonEtaVsBX_.numerator = nullptr;
55  muonPhiNoBPTX_.numerator = nullptr;
56  muonPhiNoBPTX_.denominator = nullptr;
57  muonPhiVsLS_.numerator = nullptr;
58  muonPhiVsBX_.numerator = nullptr;
59 
60 }
static NoBPTXbinning getHistoPSet(const edm::ParameterSet &pset)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::TrackCollection > muonToken_
Definition: NoBPTXMonitor.h:82
NoBPTXME muonPtVsBX_
NoBPTXME jetEVsLS_
Definition: NoBPTXMonitor.h:97
std::string folderName_
Definition: NoBPTXMonitor.h:78
NoBPTXbinning jetE_binning_
Definition: NoBPTXMonitor.h:85
NoBPTXME jetPhiVsLS_
NoBPTXME muonEtaVsBX_
edm::EDGetTokenT< reco::CaloJetCollection > jetToken_
Definition: NoBPTXMonitor.h:81
StringCutObjectSelector< reco::CaloJet, true > jetSelection_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
std::vector< double > jetE_variable_binning_
Definition: NoBPTXMonitor.h:84
MonitorElement * denominator
Definition: NoBPTXMonitor.h:53
NoBPTXbinning muonPt_binning_
Definition: NoBPTXMonitor.h:89
NoBPTXME muonEtaVsLS_
NoBPTXbinning bx_binning_
Definition: NoBPTXMonitor.h:93
StringCutObjectSelector< reco::Track, true > muonSelection_
NoBPTXME muonPtNoBPTX_variableBinning_
MonitorElement * numerator
Definition: NoBPTXMonitor.h:52
NoBPTXME jetEtaNoBPTX_
Definition: NoBPTXMonitor.h:99
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
NoBPTXME jetEtaVsBX_
NoBPTXME muonPtNoBPTX_
NoBPTXME jetENoBPTX_
Definition: NoBPTXMonitor.h:95
NoBPTXME jetEVsBX_
Definition: NoBPTXMonitor.h:98
unsigned int njets_
NoBPTXME jetPhiVsBX_
NoBPTXME muonPhiVsBX_
unsigned int nmuons_
NoBPTXbinning jetEta_binning_
Definition: NoBPTXMonitor.h:86
NoBPTXME jetENoBPTX_variableBinning_
Definition: NoBPTXMonitor.h:96
static NoBPTXbinning getHistoLSPSet(const edm::ParameterSet &pset)
NoBPTXbinning muonPhi_binning_
Definition: NoBPTXMonitor.h:91
NoBPTXME muonEtaNoBPTX_
NoBPTXbinning muonEta_binning_
Definition: NoBPTXMonitor.h:90
NoBPTXME jetEtaVsLS_
NoBPTXbinning jetPhi_binning_
Definition: NoBPTXMonitor.h:87
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
NoBPTXME jetPhiNoBPTX_
NoBPTXbinning ls_binning_
Definition: NoBPTXMonitor.h:92
NoBPTXME muonPhiVsLS_
std::vector< double > muonPt_variable_binning_
Definition: NoBPTXMonitor.h:88
NoBPTXME muonPtVsLS_
NoBPTXME muonPhiNoBPTX_
NoBPTXMonitor::~NoBPTXMonitor ( )
overridedefault

Referenced by NoBPTXMonitor().

Member Function Documentation

void NoBPTXMonitor::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprotected

Definition at line 246 of file NoBPTXMonitor.cc.

References edm::EventBase::bunchCrossing(), den_genTriggerEventFlag_, NoBPTXMonitor::NoBPTXME::denominator, HcalObjRepresent::Fill(), edm::Event::getByToken(), edm::EventBase::id(), jetENoBPTX_, jetENoBPTX_variableBinning_, reco::btau::jetEta, jetEtaNoBPTX_, jetEtaVsBX_, jetEtaVsLS_, jetEVsBX_, jetEVsLS_, reco::btau::jetPhi, jetPhiNoBPTX_, jetPhiVsBX_, jetPhiVsLS_, fwrapper::jets, jetSelection_, jetToken_, eostools::ls(), edm::EventID::luminosityBlock(), funct::m, PatBasicFWLiteAnalyzer::muonEta, muonEtaNoBPTX_, muonEtaVsBX_, muonEtaVsLS_, PatBasicFWLiteAnalyzer::muonPhi, muonPhiNoBPTX_, muonPhiVsBX_, muonPhiVsLS_, PatBasicFWLiteAnalyzer::muonPt, muonPtNoBPTX_, muonPtNoBPTX_variableBinning_, muonPtVsBX_, muonPtVsLS_, extraflags_cff::muons, muonSelection_, muonToken_, njets_, nmuons_, num_genTriggerEventFlag_, and NoBPTXMonitor::NoBPTXME::numerator.

246  {
247 
248  // Filter out events if Trigger Filtering is requested
249  if (den_genTriggerEventFlag_->on() && ! den_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
250 
251  int ls = iEvent.id().luminosityBlock();
252  int bx = iEvent.bunchCrossing();
253 
255  iEvent.getByToken( jetToken_, jetHandle );
256  std::vector<reco::CaloJet> jets;
257  if ((unsigned int)(jetHandle->size()) < njets_ ) return;
258  for ( auto const & j : *jetHandle ) {
259  if ( jetSelection_( j ) ) jets.push_back(j);
260  }
261  if ((unsigned int)(jets.size()) < njets_ ) return;
262  double jetE = -999;
263  double jetEta = -999;
264  double jetPhi = -999;
265  if(!jets.empty()){
266  jetE = jets[0].energy();
267  jetEta = jets[0].eta();
268  jetPhi = jets[0].phi();
269  }
270 
272  iEvent.getByToken( muonToken_, DSAHandle );
273  if ((unsigned int)(DSAHandle->size()) < nmuons_ ) return;
274  std::vector<reco::Track> muons;
275  for ( auto const & m : *DSAHandle ) {
276  if ( muonSelection_( m ) ) muons.push_back(m);
277  }
278  if ((unsigned int)(muons.size()) < nmuons_ ) return;
279  double muonPt = -999;
280  double muonEta = -999;
281  double muonPhi = -999;
282  if(!muons.empty()){
283  muonPt = muons[0].pt();
284  muonEta = muons[0].eta();
285  muonPhi = muons[0].phi();
286  }
287 
288  // filling histograms (denominator)
289  jetENoBPTX_.denominator -> Fill(jetE);
291  jetEVsLS_.denominator -> Fill(ls, jetE);
292  jetEtaNoBPTX_.denominator -> Fill(jetEta);
293  jetPhiNoBPTX_.denominator -> Fill(jetPhi);
294  muonPtNoBPTX_.denominator -> Fill(muonPt);
296  muonEtaNoBPTX_.denominator -> Fill(muonEta);
297  muonPhiNoBPTX_.denominator -> Fill(muonPhi);
298 
299  // filling histograms (numerator)
300  if (num_genTriggerEventFlag_->on() && ! num_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
301  jetENoBPTX_.numerator -> Fill(jetE);
303  jetEVsLS_.numerator -> Fill(ls, jetE);
304  jetEVsBX_.numerator -> Fill(bx, jetE);
305  jetEtaNoBPTX_.numerator -> Fill(jetEta);
306  jetEtaVsLS_.numerator -> Fill(ls, jetEta);
307  jetEtaVsBX_.numerator -> Fill(bx, jetEta);
308  jetPhiNoBPTX_.numerator -> Fill(jetPhi);
309  jetPhiVsLS_.numerator -> Fill(ls, jetPhi);
310  jetPhiVsBX_.numerator -> Fill(bx, jetPhi);
311  muonPtNoBPTX_.numerator -> Fill(muonPt);
313  muonPtVsLS_.numerator -> Fill(ls, muonPt);
314  muonPtVsBX_.numerator -> Fill(bx, muonPt);
315  muonEtaNoBPTX_.numerator -> Fill(muonEta);
316  muonEtaVsLS_.numerator -> Fill(ls, muonEta);
317  muonEtaVsBX_.numerator -> Fill(bx, muonEta);
318  muonPhiNoBPTX_.numerator -> Fill(muonPhi);
319  muonPhiVsLS_.numerator -> Fill(ls, muonPhi);
320  muonPhiVsBX_.numerator -> Fill(bx, muonPhi);
321 
322 }
edm::EDGetTokenT< reco::TrackCollection > muonToken_
Definition: NoBPTXMonitor.h:82
NoBPTXME muonPtVsBX_
NoBPTXME jetEVsLS_
Definition: NoBPTXMonitor.h:97
NoBPTXME jetPhiVsLS_
NoBPTXME muonEtaVsBX_
edm::EDGetTokenT< reco::CaloJetCollection > jetToken_
Definition: NoBPTXMonitor.h:81
StringCutObjectSelector< reco::CaloJet, true > jetSelection_
MonitorElement * denominator
Definition: NoBPTXMonitor.h:53
NoBPTXME muonEtaVsLS_
StringCutObjectSelector< reco::Track, true > muonSelection_
NoBPTXME muonPtNoBPTX_variableBinning_
int iEvent
Definition: GenABIO.cc:224
MonitorElement * numerator
Definition: NoBPTXMonitor.h:52
NoBPTXME jetEtaNoBPTX_
Definition: NoBPTXMonitor.h:99
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
vector< PseudoJet > jets
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
NoBPTXME jetEtaVsBX_
NoBPTXME muonPtNoBPTX_
NoBPTXME jetENoBPTX_
Definition: NoBPTXMonitor.h:95
NoBPTXME jetEVsBX_
Definition: NoBPTXMonitor.h:98
unsigned int njets_
NoBPTXME jetPhiVsBX_
NoBPTXME muonPhiVsBX_
unsigned int nmuons_
def ls(path, rec=False)
Definition: eostools.py:349
NoBPTXME jetENoBPTX_variableBinning_
Definition: NoBPTXMonitor.h:96
NoBPTXME muonEtaNoBPTX_
NoBPTXME jetEtaVsLS_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
NoBPTXME jetPhiNoBPTX_
NoBPTXME muonPhiVsLS_
NoBPTXME muonPtVsLS_
NoBPTXME muonPhiNoBPTX_
void NoBPTXMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotected

Definition at line 129 of file NoBPTXMonitor.cc.

References bookNoBPTX(), bx_binning_, den_genTriggerEventFlag_, folderName_, jetE_binning_, jetE_variable_binning_, jetENoBPTX_, jetENoBPTX_variableBinning_, jetEta_binning_, jetEtaNoBPTX_, jetEtaVsBX_, jetEtaVsLS_, jetEVsBX_, jetEVsLS_, jetPhi_binning_, jetPhiNoBPTX_, jetPhiVsBX_, jetPhiVsLS_, ls_binning_, muonEta_binning_, muonEtaNoBPTX_, muonEtaVsBX_, muonEtaVsLS_, muonPhi_binning_, muonPhiNoBPTX_, muonPhiVsBX_, muonPhiVsLS_, muonPt_binning_, muonPt_variable_binning_, muonPtNoBPTX_, muonPtNoBPTX_variableBinning_, muonPtVsBX_, muonPtVsLS_, NoBPTXMonitor::NoBPTXbinning::nbins, num_genTriggerEventFlag_, DQMStore::IBooker::setCurrentFolder(), setNoBPTXTitle(), AlCaHLTBitMon_QueryRunRegistry::string, NoBPTXMonitor::NoBPTXbinning::xmax, and NoBPTXMonitor::NoBPTXbinning::xmin.

132 {
133 
134  std::string histname, histtitle;
135  bool bookDen;
136 
137  std::string currentFolder = folderName_ ;
138  ibooker.setCurrentFolder(currentFolder);
139 
140  histname = "jetE"; histtitle = "jetE";
141  bookDen = true;
143  setNoBPTXTitle(jetENoBPTX_,"Jet E [GeV]","Events / [GeV]", bookDen);
144 
145  histname = "jetE_variable"; histtitle = "jetE";
146  bookDen = true;
148  setNoBPTXTitle(jetENoBPTX_variableBinning_,"Jet E [GeV]","Events / [GeV]", bookDen);
149 
150  histname = "jetEVsLS"; histtitle = "jetE vs LS";
151  bookDen = true;
153  setNoBPTXTitle(jetEVsLS_,"LS","Jet E [GeV]", bookDen);
154 
155  histname = "jetEVsBX"; histtitle = "jetE vs BX";
156  bookDen = false;
158  setNoBPTXTitle(jetEVsBX_,"BX","Jet E [GeV]", bookDen);
159 
160  histname = "jetEta"; histtitle = "jetEta";
161  bookDen = true;
163  setNoBPTXTitle(jetEtaNoBPTX_,"Jet #eta","Events", bookDen);
164 
165  histname = "jetEtaVsLS"; histtitle = "jetEta vs LS";
166  bookDen = false;
168  setNoBPTXTitle(jetEtaVsLS_,"LS","Jet #eta", bookDen);
169 
170  histname = "jetEtaVsBX"; histtitle = "jetEta vs BX";
171  bookDen = false;
173  setNoBPTXTitle(jetEtaVsBX_,"BX","Jet #eta", bookDen);
174 
175  histname = "jetPhi"; histtitle = "jetPhi";
176  bookDen = true;
178  setNoBPTXTitle(jetPhiNoBPTX_,"Jet #phi","Events", bookDen);
179 
180  histname = "jetPhiVsLS"; histtitle = "jetPhi vs LS";
181  bookDen = false;
183  setNoBPTXTitle(jetPhiVsLS_,"LS","Jet #phi", bookDen);
184 
185  histname = "jetPhiVsBX"; histtitle = "jetPhi vs BX";
186  bookDen = false;
188  setNoBPTXTitle(jetPhiVsBX_,"BX","Jet #phi", bookDen);
189 
190  histname = "muonPt"; histtitle = "muonPt";
191  bookDen = true;
193  setNoBPTXTitle(muonPtNoBPTX_,"DisplacedStandAlone Muon p_{T} [GeV]","Events / [GeV]", bookDen);
194 
195  histname = "muonPt_variable"; histtitle = "muonPt";
196  bookDen = true;
198  setNoBPTXTitle(muonPtNoBPTX_variableBinning_,"DisplacedStandAlone Muon p_{T} [GeV]","Events / [GeV]", bookDen);
199 
200  histname = "muonPtVsLS"; histtitle = "muonPt vs LS";
201  bookDen = false;
203  setNoBPTXTitle(muonPtVsLS_,"LS","DisplacedStandAlone Muon p_{T} [GeV]", bookDen);
204 
205  histname = "muonPtVsBX"; histtitle = "muonPt vs BX";
206  bookDen = false;
208  setNoBPTXTitle(muonPtVsBX_,"BX","DisplacedStandAlone Muon p_{T} [GeV]", bookDen);
209 
210  histname = "muonEta"; histtitle = "muonEta";
211  bookDen = true;
213  setNoBPTXTitle(muonEtaNoBPTX_,"DisplacedStandAlone Muon #eta","Events", bookDen);
214 
215  histname = "muonEtaVsLS"; histtitle = "muonEta vs LS";
216  bookDen = false;
218  setNoBPTXTitle(muonEtaVsLS_,"LS","DisplacedStandAlone Muon #eta", bookDen);
219 
220  histname = "muonEtaVsBX"; histtitle = "muonEta vs BX";
221  bookDen = false;
223  setNoBPTXTitle(muonEtaVsBX_,"BX","DisplacedStandAlone Muon #eta", bookDen);
224 
225  histname = "muonPhi"; histtitle = "muonPhi";
226  bookDen = true;
228  setNoBPTXTitle(muonPhiNoBPTX_,"DisplacedStandAlone Muon #phi","Events", bookDen);
229 
230  histname = "muonPhiVsLS"; histtitle = "muonPhi vs LS";
231  bookDen = false;
233  setNoBPTXTitle(muonPhiVsLS_,"LS","DisplacedStandAlone Muon #phi", bookDen);
234 
235  histname = "muonPhiVsBX"; histtitle = "muonPhi vs BX";
236  bookDen = false;
238  setNoBPTXTitle(muonPhiVsBX_,"BX","DisplacedStandAlone Muon #phi", bookDen);
239 
240  // Initialize the GenericTriggerEventFlag
241  if ( num_genTriggerEventFlag_ && num_genTriggerEventFlag_->on() ) num_genTriggerEventFlag_->initRun( iRun, iSetup );
242  if ( den_genTriggerEventFlag_ && den_genTriggerEventFlag_->on() ) den_genTriggerEventFlag_->initRun( iRun, iSetup );
243 
244 }
NoBPTXME muonPtVsBX_
NoBPTXME jetEVsLS_
Definition: NoBPTXMonitor.h:97
std::string folderName_
Definition: NoBPTXMonitor.h:78
NoBPTXbinning jetE_binning_
Definition: NoBPTXMonitor.h:85
NoBPTXME jetPhiVsLS_
NoBPTXME muonEtaVsBX_
std::vector< double > jetE_variable_binning_
Definition: NoBPTXMonitor.h:84
NoBPTXbinning muonPt_binning_
Definition: NoBPTXMonitor.h:89
void bookNoBPTX(DQMStore::IBooker &, NoBPTXME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
NoBPTXME muonEtaVsLS_
NoBPTXbinning bx_binning_
Definition: NoBPTXMonitor.h:93
NoBPTXME muonPtNoBPTX_variableBinning_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
NoBPTXME jetEtaNoBPTX_
Definition: NoBPTXMonitor.h:99
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
NoBPTXME jetEtaVsBX_
NoBPTXME muonPtNoBPTX_
NoBPTXME jetENoBPTX_
Definition: NoBPTXMonitor.h:95
NoBPTXME jetEVsBX_
Definition: NoBPTXMonitor.h:98
NoBPTXME jetPhiVsBX_
NoBPTXME muonPhiVsBX_
NoBPTXbinning jetEta_binning_
Definition: NoBPTXMonitor.h:86
NoBPTXME jetENoBPTX_variableBinning_
Definition: NoBPTXMonitor.h:96
NoBPTXbinning muonPhi_binning_
Definition: NoBPTXMonitor.h:91
NoBPTXME muonEtaNoBPTX_
NoBPTXbinning muonEta_binning_
Definition: NoBPTXMonitor.h:90
NoBPTXME jetEtaVsLS_
NoBPTXbinning jetPhi_binning_
Definition: NoBPTXMonitor.h:87
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
NoBPTXME jetPhiNoBPTX_
NoBPTXbinning ls_binning_
Definition: NoBPTXMonitor.h:92
NoBPTXME muonPhiVsLS_
void setNoBPTXTitle(NoBPTXME &me, const std::string &titleX, const std::string &titleY, bool bookDen)
std::vector< double > muonPt_variable_binning_
Definition: NoBPTXMonitor.h:88
NoBPTXME muonPtVsLS_
NoBPTXME muonPhiNoBPTX_
void NoBPTXMonitor::bookNoBPTX ( DQMStore::IBooker ibooker,
NoBPTXME me,
const std::string &  histname,
const std::string &  histtitle,
int  nbins,
double  xmin,
double  xmax 
)
protected

Definition at line 93 of file NoBPTXMonitor.cc.

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

Referenced by bookHistograms().

94 {
95  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, min, max);
96  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, min, max);
97 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
T min(T a, T b)
Definition: MathUtil.h:58
void NoBPTXMonitor::bookNoBPTX ( DQMStore::IBooker ibooker,
NoBPTXME me,
const std::string &  histname,
const std::string &  histtitle,
const std::vector< double > &  binningX 
)
protected

Definition at line 98 of file NoBPTXMonitor.cc.

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

99 {
100  int nbins = binning.size()-1;
101  std::vector<float> fbinning(binning.begin(),binning.end());
102  float* arr = &fbinning[0];
103  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, arr);
104  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, arr);
105 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void NoBPTXMonitor::bookNoBPTX ( DQMStore::IBooker ibooker,
NoBPTXME me,
const std::string &  histname,
const std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
double  ymin,
double  ymax,
bool  bookDen 
)
protected

Definition at line 106 of file NoBPTXMonitor.cc.

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

107 {
108  me.numerator = ibooker.bookProfile(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
109  if(bookDen) me.denominator = ibooker.bookProfile(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
110 }
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
void NoBPTXMonitor::bookNoBPTX ( DQMStore::IBooker ibooker,
NoBPTXME me,
const std::string &  histname,
const std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
int  nbinsY,
double  ymin,
double  ymax 
)
protected

Definition at line 111 of file NoBPTXMonitor.cc.

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

112 {
113  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
114  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
115 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
void NoBPTXMonitor::bookNoBPTX ( DQMStore::IBooker ibooker,
NoBPTXME me,
const std::string &  histname,
const std::string &  histtitle,
const std::vector< double > &  binningX,
const std::vector< double > &  binningY 
)
protected

Definition at line 116 of file NoBPTXMonitor.cc.

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

117 {
118  int nbinsX = binningX.size()-1;
119  std::vector<float> fbinningX(binningX.begin(),binningX.end());
120  float* arrX = &fbinningX[0];
121  int nbinsY = binningY.size()-1;
122  std::vector<float> fbinningY(binningY.begin(),binningY.end());
123  float* arrY = &fbinningY[0];
124 
125  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, arrX, nbinsY, arrY);
126  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, arrX, nbinsY, arrY);
127 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
void NoBPTXMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 336 of file NoBPTXMonitor.cc.

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

337 {
339  desc.add<std::string> ( "FolderName", "HLT/NoBPTX" );
340 
341  desc.add<edm::InputTag>( "jets", edm::InputTag("ak4CaloJets") );
342  desc.add<edm::InputTag>( "muons", edm::InputTag("displacedStandAloneMuons") );
343  desc.add<std::string>("jetSelection", "pt > 0");
344  desc.add<std::string>("muonSelection", "pt > 0");
345  desc.add<unsigned int>("njets", 0);
346  desc.add<unsigned int>("nmuons", 0);
347 
348  edm::ParameterSetDescription genericTriggerEventPSet;
349  genericTriggerEventPSet.add<bool>("andOr");
350  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi") );
351  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions",{});
352  genericTriggerEventPSet.add<bool>("andOrDcs", false);
353  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
354  genericTriggerEventPSet.add<std::string>("dbLabel","");
355  genericTriggerEventPSet.add<bool>("andOrHlt", true);
356  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT") );
357  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths",{});
358  genericTriggerEventPSet.add<std::string>("hltDBKey","");
359  genericTriggerEventPSet.add<bool>("errorReplyHlt",false);
360  genericTriggerEventPSet.add<unsigned int>("verbosityLevel",1);
361 
362  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
363  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
364 
367  edm::ParameterSetDescription jetEtaPSet;
368  edm::ParameterSetDescription jetPhiPSet;
369  edm::ParameterSetDescription muonPtPSet;
370  edm::ParameterSetDescription muonEtaPSet;
371  edm::ParameterSetDescription muonPhiPSet;
374  fillHistoPSetDescription(jetEPSet);
375  fillHistoPSetDescription(jetEtaPSet);
376  fillHistoPSetDescription(jetPhiPSet);
377  fillHistoPSetDescription(muonPtPSet);
378  fillHistoPSetDescription(muonEtaPSet);
379  fillHistoPSetDescription(muonPhiPSet);
380  fillHistoPSetDescription(lsPSet);
382  histoPSet.add<edm::ParameterSetDescription>("jetEPSet", jetEPSet);
383  histoPSet.add<edm::ParameterSetDescription>("jetEtaPSet", jetEtaPSet);
384  histoPSet.add<edm::ParameterSetDescription>("jetPhiPSet", jetPhiPSet);
385  histoPSet.add<edm::ParameterSetDescription>("muonPtPSet", muonPtPSet);
386  histoPSet.add<edm::ParameterSetDescription>("muonEtaPSet", muonEtaPSet);
387  histoPSet.add<edm::ParameterSetDescription>("muonPhiPSet", muonPhiPSet);
388  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
389  histoPSet.add<edm::ParameterSetDescription>("bxPSet", bxPSet);
390  std::vector<double> bins = {0.,20.,40.,60.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.,180.,190.,200.,220.,240.,260.,280.,300.,350.,400.,450.,1000.};
391  histoPSet.add<std::vector<double> >("jetEBinning", bins);
392  histoPSet.add<std::vector<double> >("muonPtBinning", bins);
393 
394  desc.add<edm::ParameterSetDescription>("histoPSet",histoPSet);
395 
396  descriptions.add("NoBPTXMonitoring", desc);
397 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void NoBPTXMonitor::fillHistoLSPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 331 of file NoBPTXMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

332 {
333  pset.add<unsigned int> ( "nbins", 2000);
334 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void NoBPTXMonitor::fillHistoPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 324 of file NoBPTXMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

325 {
326  pset.add<unsigned int> ( "nbins", 200);
327  pset.add<double>( "xmin", -0.5 );
328  pset.add<double>( "xmax", 19999.5 );
329 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
NoBPTXMonitor::NoBPTXbinning NoBPTXMonitor::getHistoLSPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 73 of file NoBPTXMonitor.cc.

References edm::ParameterSet::getParameter().

74 {
75  return NoBPTXbinning{
76  pset.getParameter<unsigned int>("nbins"),
77  0.,
78  double(pset.getParameter<unsigned int>("nbins"))
79  };
80 }
T getParameter(std::string const &) const
NoBPTXMonitor::NoBPTXbinning NoBPTXMonitor::getHistoPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 64 of file NoBPTXMonitor.cc.

References edm::ParameterSet::getParameter().

65 {
66  return NoBPTXbinning{
67  pset.getParameter<unsigned int>("nbins"),
68  pset.getParameter<double>("xmin"),
69  pset.getParameter<double>("xmax"),
70  };
71 }
T getParameter(std::string const &) const
void NoBPTXMonitor::setNoBPTXTitle ( NoBPTXME me,
const std::string &  titleX,
const std::string &  titleY,
bool  bookDen 
)
protected

Definition at line 82 of file NoBPTXMonitor.cc.

References NoBPTXMonitor::NoBPTXME::denominator, NoBPTXMonitor::NoBPTXME::numerator, and MonitorElement::setAxisTitle().

Referenced by bookHistograms().

83 {
84  me.numerator->setAxisTitle(titleX,1);
85  me.numerator->setAxisTitle(titleY,2);
86  if(bookDen) {
87  me.denominator->setAxisTitle(titleX,1);
88  me.denominator->setAxisTitle(titleY,2);
89  }
90 
91 }

Member Data Documentation

NoBPTXbinning NoBPTXMonitor::bx_binning_
private

Definition at line 93 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

std::unique_ptr<GenericTriggerEventFlag> NoBPTXMonitor::den_genTriggerEventFlag_
private

Definition at line 117 of file NoBPTXMonitor.h.

Referenced by analyze(), and bookHistograms().

std::string NoBPTXMonitor::folderName_
private

Definition at line 78 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

std::string NoBPTXMonitor::histoSuffix_
private

Definition at line 79 of file NoBPTXMonitor.h.

NoBPTXbinning NoBPTXMonitor::jetE_binning_
private

Definition at line 85 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

std::vector<double> NoBPTXMonitor::jetE_variable_binning_
private

Definition at line 84 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

NoBPTXME NoBPTXMonitor::jetENoBPTX_
private

Definition at line 95 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::jetENoBPTX_variableBinning_
private

Definition at line 96 of file NoBPTXMonitor.h.

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

NoBPTXbinning NoBPTXMonitor::jetEta_binning_
private

Definition at line 86 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

NoBPTXME NoBPTXMonitor::jetEtaNoBPTX_
private

Definition at line 99 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::jetEtaVsBX_
private

Definition at line 101 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::jetEtaVsLS_
private

Definition at line 100 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::jetEVsBX_
private

Definition at line 98 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::jetEVsLS_
private

Definition at line 97 of file NoBPTXMonitor.h.

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

NoBPTXbinning NoBPTXMonitor::jetPhi_binning_
private

Definition at line 87 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

NoBPTXME NoBPTXMonitor::jetPhiNoBPTX_
private

Definition at line 102 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::jetPhiVsBX_
private

Definition at line 104 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::jetPhiVsLS_
private

Definition at line 103 of file NoBPTXMonitor.h.

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

StringCutObjectSelector<reco::CaloJet,true > NoBPTXMonitor::jetSelection_
private

Definition at line 119 of file NoBPTXMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::CaloJetCollection> NoBPTXMonitor::jetToken_
private

Definition at line 81 of file NoBPTXMonitor.h.

Referenced by analyze().

NoBPTXbinning NoBPTXMonitor::ls_binning_
private

Definition at line 92 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

NoBPTXbinning NoBPTXMonitor::muonEta_binning_
private

Definition at line 90 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

NoBPTXME NoBPTXMonitor::muonEtaNoBPTX_
private

Definition at line 109 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::muonEtaVsBX_
private

Definition at line 111 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::muonEtaVsLS_
private

Definition at line 110 of file NoBPTXMonitor.h.

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

NoBPTXbinning NoBPTXMonitor::muonPhi_binning_
private

Definition at line 91 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

NoBPTXME NoBPTXMonitor::muonPhiNoBPTX_
private

Definition at line 112 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::muonPhiVsBX_
private

Definition at line 114 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::muonPhiVsLS_
private

Definition at line 113 of file NoBPTXMonitor.h.

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

NoBPTXbinning NoBPTXMonitor::muonPt_binning_
private

Definition at line 89 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

std::vector<double> NoBPTXMonitor::muonPt_variable_binning_
private

Definition at line 88 of file NoBPTXMonitor.h.

Referenced by bookHistograms().

NoBPTXME NoBPTXMonitor::muonPtNoBPTX_
private

Definition at line 105 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::muonPtNoBPTX_variableBinning_
private

Definition at line 106 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::muonPtVsBX_
private

Definition at line 108 of file NoBPTXMonitor.h.

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

NoBPTXME NoBPTXMonitor::muonPtVsLS_
private

Definition at line 107 of file NoBPTXMonitor.h.

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

StringCutObjectSelector<reco::Track,true> NoBPTXMonitor::muonSelection_
private

Definition at line 120 of file NoBPTXMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::TrackCollection> NoBPTXMonitor::muonToken_
private

Definition at line 82 of file NoBPTXMonitor.h.

Referenced by analyze().

unsigned int NoBPTXMonitor::njets_
private

Definition at line 121 of file NoBPTXMonitor.h.

Referenced by analyze().

unsigned int NoBPTXMonitor::nmuons_
private

Definition at line 122 of file NoBPTXMonitor.h.

Referenced by analyze().

std::unique_ptr<GenericTriggerEventFlag> NoBPTXMonitor::num_genTriggerEventFlag_
private

Definition at line 116 of file NoBPTXMonitor.h.

Referenced by analyze(), and bookHistograms().