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 | Static Private Attributes
HTMonitor Class Reference

#include <HTMonitor.h>

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

Classes

struct  HTME
 
struct  MEHTbinning
 

Public Member Functions

 HTMonitor (const edm::ParameterSet &)
 
 ~HTMonitor () override
 
- 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
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 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 & itemsToGetFrom (BranchType iType) 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 &, HTME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
 
void bookME (DQMStore::IBooker &, HTME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX)
 
void bookME (DQMStore::IBooker &, HTME &me, const std::string &histname, const std::string &histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, HTME &me, const std::string &histname, const std::string &histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, HTME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY)
 
void setHTitle (HTME &me, const std::string &titleX, const 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 MEHTbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEHTbinning getHistoPSet (const edm::ParameterSet &pset)
 

Private Attributes

HTME deltaphij1j2ME_
 
HTME deltaphimetj1ME_
 
std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
 
edm::EDGetTokenT< reco::GsfElectronCollectioneleToken_
 
std::string folderName_
 
std::string histoSuffix_
 
MEHTbinning ht_binning_
 
std::vector< double > ht_variable_binning_
 
HTME htME_variableBinning_
 
HTME htVsLS_
 
StringCutObjectSelector< reco::PFJet, true > jetSelection_
 
StringCutObjectSelector< reco::PFJet, true > jetSelection_HT_
 
edm::EDGetTokenT< reco::PFJetCollectionjetToken_
 
MEHTbinning ls_binning_
 
StringCutObjectSelector< reco::MET, true > metSelection_
 
edm::EDGetTokenT< reco::PFMETCollectionmetToken_
 
StringCutObjectSelector< reco::Muon, true > muoSelection_
 
edm::EDGetTokenT< reco::MuonCollectionmuoToken_
 
unsigned nelectrons_
 
unsigned njets_
 
unsigned nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
edm::EDGetTokenT< reco::VertexCollectionvtxToken_
 

Static Private Attributes

static double MAXedge_PHI = 3.2
 
static int Nbin_PHI = 64
 
static MEHTbinning phi_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 49 of file HTMonitor.h.

Constructor & Destructor Documentation

HTMonitor::HTMonitor ( const edm::ParameterSet iConfig)

Definition at line 11 of file HTMonitor.cc.

References ~HTMonitor().

11  :
12  folderName_ ( iConfig.getParameter<std::string>("FolderName") )
13  , metToken_ ( consumes<reco::PFMETCollection> (iConfig.getParameter<edm::InputTag>("met") ) )
14  , jetToken_ ( mayConsume<reco::PFJetCollection> (iConfig.getParameter<edm::InputTag>("jets") ) )
15  , eleToken_ ( mayConsume<reco::GsfElectronCollection>(iConfig.getParameter<edm::InputTag>("electrons") ) )
16  , muoToken_ ( mayConsume<reco::MuonCollection> (iConfig.getParameter<edm::InputTag>("muons") ) )
17  , vtxToken_ ( mayConsume<reco::VertexCollection> (iConfig.getParameter<edm::InputTag>("vertices") ) )
18  , ht_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("htBinning") )
19  , ht_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("htPSet") ) )
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  , metSelection_ ( iConfig.getParameter<std::string>("metSelection") )
24  , jetSelection_ ( iConfig.getParameter<std::string>("jetSelection") )
25  , eleSelection_ ( iConfig.getParameter<std::string>("eleSelection") )
26  , muoSelection_ ( iConfig.getParameter<std::string>("muoSelection") )
27  , jetSelection_HT_ ( iConfig.getParameter<std::string>("jetSelection_HT") )
28  , njets_ ( iConfig.getParameter<unsigned>("njets" ) )
29  , nelectrons_ ( iConfig.getParameter<unsigned>("nelectrons" ) )
30  , nmuons_ ( iConfig.getParameter<unsigned>("nmuons" ) )
31 {
32 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: HTMonitor.h:94
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: HTMonitor.h:92
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: HTMonitor.h:112
std::vector< double > ht_variable_binning_
Definition: HTMonitor.h:97
unsigned njets_
Definition: HTMonitor.h:114
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: HTMonitor.h:95
static MEHTbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: HTMonitor.cc:36
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: HTMonitor.h:107
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: HTMonitor.h:109
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
MEHTbinning ht_binning_
Definition: HTMonitor.h:98
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Definition: HTMonitor.h:93
MEHTbinning ls_binning_
Definition: HTMonitor.h:99
unsigned nelectrons_
Definition: HTMonitor.h:115
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: HTMonitor.h:111
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: HTMonitor.h:110
std::string folderName_
Definition: HTMonitor.h:88
StringCutObjectSelector< reco::PFJet, true > jetSelection_HT_
Definition: HTMonitor.h:113
static MEHTbinning getHistoLSPSet(const edm::ParameterSet &pset)
Definition: HTMonitor.cc:45
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: HTMonitor.h:91
unsigned nmuons_
Definition: HTMonitor.h:116
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: HTMonitor.h:106
HTMonitor::~HTMonitor ( )
overridedefault

Referenced by HTMonitor().

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 135 of file HTMonitor.cc.

References hiPixelPairStep_cff::deltaPhi, deltaphij1j2ME_, deltaphimetj1ME_, den_genTriggerEventFlag_, HTMonitor::HTME::denominator, MillePedeFileConverter_cfg::e, genericTrackCleaner_cfi::electrons, eleSelection_, eleToken_, HcalObjRepresent::Fill(), edm::Event::getByToken(), htME_variableBinning_, htVsLS_, edm::EventBase::id(), fwrapper::jets, jetSelection_, jetSelection_HT_, jetToken_, eostools::ls(), edm::EventID::luminosityBlock(), funct::m, metSelection_, metToken_, electronCleaner_cfi::muons, muoSelection_, muoToken_, nelectrons_, njets_, nmuons_, num_genTriggerEventFlag_, HTMonitor::HTME::numerator, phi, reco::LeafCandidate::phi(), reco::Vertex::position(), findQualityFiles::v, badGlobalMuonTaggersAOD_cff::vtx, and vtxToken_.

135  {
136 
137  // Filter out events if Trigger Filtering is requested
138  if (den_genTriggerEventFlag_->on() && ! den_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
139 
141  iEvent.getByToken( metToken_, metHandle );
142  reco::PFMET pfmet = metHandle->front();
143  if ( ! metSelection_( pfmet ) ) return;
144 
145  float ht = 0.0;
146 
147  edm::Handle<reco::PFJetCollection> jetHandle; //add a configurable jet collection & jet pt selection
148  iEvent.getByToken( jetToken_, jetHandle );
149  std::vector<reco::PFJet> jets;
150  if ( jetHandle->size() < njets_ ) return;
151  for ( auto const & j : *jetHandle ) {
152  if ( jetSelection_( j ) ) {
153  jets.push_back(j);
154  }
155  }
156  for ( auto const & j : *jetHandle ) {
157  if ( jetSelection_HT_(j)) ht += j.pt();
158  }
159  if ( jets.size() < njets_ ) return;
160 
161  float deltaPhi_met_j1 = 10.0;
162  float deltaPhi_j1_j2 = 10.0;
163 
164  if (jets.size() >= 1) deltaPhi_met_j1 = fabs( deltaPhi( pfmet.phi(), jets[0].phi() ));
165  if (jets.size() >= 2) deltaPhi_j1_j2 = fabs( deltaPhi( jets[0].phi(), jets[1].phi() ));
166 
168  iEvent.getByToken( eleToken_, eleHandle );
169  std::vector<reco::GsfElectron> electrons;
170  if ( eleHandle->size() < nelectrons_ ) return;
171  for ( auto const & e : *eleHandle ) {
172  if ( eleSelection_( e ) ) electrons.push_back(e);
173  }
174  if ( electrons.size() < nelectrons_ ) return;
175 
177  iEvent.getByToken(vtxToken_, vtxHandle);
178 
180  for (auto const & v : *vtxHandle) {
181  bool isFake = v.isFake() ;
182 
183  if (!isFake) {
184  vtx = v;
185  break;
186  }
187  }
188 
190  iEvent.getByToken( muoToken_, muoHandle );
191  if ( muoHandle->size() < nmuons_ ) return;
192  std::vector<reco::Muon> muons;
193  for ( auto const & m : *muoHandle ) {
194  if ( muoSelection_( m ) && m.isGlobalMuon() && m.isPFMuon() && m.globalTrack()->normalizedChi2() < 10. && m.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 && m.numberOfMatchedStations() > 1 && fabs(m.muonBestTrack()->dxy(vtx.position())) < 0.2 && fabs(m.muonBestTrack()->dz(vtx.position())) < 0.5 && m.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 && m.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 ) muons.push_back(m);
195  }
196  if ( muons.size() < nmuons_ ) return;
197 
198  // filling histograms (denominator)
200  deltaphimetj1ME_.denominator -> Fill(deltaPhi_met_j1);
201  deltaphij1j2ME_.denominator -> Fill(deltaPhi_j1_j2);
202 
203  int ls = iEvent.id().luminosityBlock();
204  htVsLS_.denominator -> Fill(ls, ht);
205 
206  // applying selection for numerator
207  if (num_genTriggerEventFlag_->on() && ! num_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
208 
209  // filling histograms (num_genTriggerEventFlag_)
211  htVsLS_.numerator -> Fill(ls, ht);
212  deltaphimetj1ME_.numerator -> Fill(deltaPhi_met_j1);
213  deltaphij1j2ME_.numerator -> Fill(deltaPhi_j1_j2);
214 
215 }
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: HTMonitor.h:94
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: HTMonitor.h:92
HTME htME_variableBinning_
Definition: HTMonitor.h:101
MonitorElement * denominator
Definition: HTMonitor.h:62
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: HTMonitor.h:112
unsigned njets_
Definition: HTMonitor.h:114
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: HTMonitor.h:95
const Point & position() const
position
Definition: Vertex.h:109
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: HTMonitor.h:107
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: HTMonitor.h:109
virtual double phi() const final
momentum azimuthal angle
int iEvent
Definition: GenABIO.cc:230
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
vector< PseudoJet > jets
MonitorElement * numerator
Definition: HTMonitor.h:61
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Definition: HTMonitor.h:93
def ls(path, rec=False)
Definition: eostools.py:348
unsigned nelectrons_
Definition: HTMonitor.h:115
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: HTMonitor.h:111
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: HTMonitor.h:110
HTME deltaphimetj1ME_
Definition: HTMonitor.h:103
StringCutObjectSelector< reco::PFJet, true > jetSelection_HT_
Definition: HTMonitor.h:113
HTME deltaphij1j2ME_
Definition: HTMonitor.h:104
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: HTMonitor.h:91
HTME htVsLS_
Definition: HTMonitor.h:102
unsigned nmuons_
Definition: HTMonitor.h:116
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: HTMonitor.h:106
void HTMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 99 of file HTMonitor.cc.

References bookME(), deltaphij1j2ME_, deltaphimetj1ME_, den_genTriggerEventFlag_, folderName_, ht_binning_, ht_variable_binning_, htME_variableBinning_, htVsLS_, ls_binning_, HTMonitor::MEHTbinning::nbins, num_genTriggerEventFlag_, phi_binning_, DQMStore::IBooker::setCurrentFolder(), setHTitle(), AlCaHLTBitMon_QueryRunRegistry::string, HTMonitor::MEHTbinning::xmax, and HTMonitor::MEHTbinning::xmin.

102 {
103 
104  std::string histname, histtitle;
105 
106  std::string currentFolder = folderName_ ;
107  ibooker.setCurrentFolder(currentFolder.c_str());
108 
109  histname = "ht_variable"; histtitle = "HT";
110  bookME(ibooker,htME_variableBinning_,histname,histtitle,ht_variable_binning_);
111  setHTitle(htME_variableBinning_,"HT [GeV]","events / [GeV]");
112 
113  histname = "htVsLS"; histtitle = "HT vs LS";
115  setHTitle(htVsLS_,"LS","HT [GeV]");
116 
117  histname = "deltaphi_metjet1"; histtitle = "DPHI_METJ1";
119  setHTitle(deltaphimetj1ME_,"delta phi (met, j1)","events / 0.1 rad");
120 
121  histname = "deltaphi_jet1jet2"; histtitle = "DPHI_J1J2";
123  setHTitle(deltaphij1j2ME_,"delta phi (j1, j2)","events / 0.1 rad");
124 
125  // Initialize the GenericTriggerEventFlag
126  if ( num_genTriggerEventFlag_ && num_genTriggerEventFlag_->on() ) num_genTriggerEventFlag_->initRun( iRun, iSetup );
127  if ( den_genTriggerEventFlag_ && den_genTriggerEventFlag_->on() ) den_genTriggerEventFlag_->initRun( iRun, iSetup );
128 
129 }
HTME htME_variableBinning_
Definition: HTMonitor.h:101
void setHTitle(HTME &me, const std::string &titleX, const std::string &titleY)
Definition: HTMonitor.cc:54
void bookME(DQMStore::IBooker &, HTME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
Definition: HTMonitor.cc:63
std::vector< double > ht_variable_binning_
Definition: HTMonitor.h:97
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: HTMonitor.h:107
MEHTbinning ht_binning_
Definition: HTMonitor.h:98
MEHTbinning ls_binning_
Definition: HTMonitor.h:99
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
std::string folderName_
Definition: HTMonitor.h:88
HTME deltaphimetj1ME_
Definition: HTMonitor.h:103
HTME deltaphij1j2ME_
Definition: HTMonitor.h:104
HTME htVsLS_
Definition: HTMonitor.h:102
static MEHTbinning phi_binning_
Definition: HTMonitor.h:120
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: HTMonitor.h:106
void HTMonitor::bookME ( DQMStore::IBooker ibooker,
HTME me,
const std::string &  histname,
const std::string &  histtitle,
int  nbins,
double  xmin,
double  xmax 
)
protected

Definition at line 63 of file HTMonitor.cc.

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

Referenced by bookHistograms().

64 {
65  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, min, max);
66  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, min, max);
67 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
T min(T a, T b)
Definition: MathUtil.h:58
void HTMonitor::bookME ( DQMStore::IBooker ibooker,
HTME me,
const std::string &  histname,
const std::string &  histtitle,
const std::vector< double > &  binningX 
)
protected

Definition at line 68 of file HTMonitor.cc.

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

69 {
70  int nbins = binning.size()-1;
71  std::vector<float> fbinning(binning.begin(),binning.end());
72  float* arr = &fbinning[0];
73  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, arr);
74  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, arr);
75 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void HTMonitor::bookME ( DQMStore::IBooker ibooker,
HTME me,
const std::string &  histname,
const std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
double  ymin,
double  ymax 
)
protected

Definition at line 76 of file HTMonitor.cc.

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

77 {
78  me.numerator = ibooker.bookProfile(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
79  me.denominator = ibooker.bookProfile(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
80 }
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
void HTMonitor::bookME ( DQMStore::IBooker ibooker,
HTME 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 81 of file HTMonitor.cc.

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

82 {
83  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
84  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
85 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
void HTMonitor::bookME ( DQMStore::IBooker ibooker,
HTME me,
const std::string &  histname,
const std::string &  histtitle,
const std::vector< double > &  binningX,
const std::vector< double > &  binningY 
)
protected

Definition at line 86 of file HTMonitor.cc.

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

87 {
88  int nbinsX = binningX.size()-1;
89  std::vector<float> fbinningX(binningX.begin(),binningX.end());
90  float* arrX = &fbinningX[0];
91  int nbinsY = binningY.size()-1;
92  std::vector<float> fbinningY(binningY.begin(),binningY.end());
93  float* arrY = &fbinningY[0];
94 
95  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, arrX, nbinsY, arrY);
96  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, arrX, nbinsY, arrY);
97 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
void HTMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 229 of file HTMonitor.cc.

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

230 {
232  desc.add<std::string> ( "FolderName", "HLT/HT" );
233 
234  desc.add<edm::InputTag>( "met", edm::InputTag("pfMet") );
235  desc.add<edm::InputTag>( "jets", edm::InputTag("ak4PFJetsCHS") );
236  desc.add<edm::InputTag>( "electrons",edm::InputTag("gedGsfElectrons") );
237  desc.add<edm::InputTag>( "muons", edm::InputTag("muons") );
238  desc.add<edm::InputTag>( "vertices",edm::InputTag("offlinePrimaryVertices") );
239  desc.add<std::string>("metSelection", "pt > 0");
240  desc.add<std::string>("jetSelection", "pt > 0");
241  desc.add<std::string>("eleSelection", "pt > 0");
242  desc.add<std::string>("muoSelection", "pt > 0");
243  desc.add<std::string>("jetSelection_HT", "pt > 30 && eta < 2.5");
244  desc.add<unsigned>("njets", 0);
245  desc.add<unsigned>("nelectrons", 0);
246  desc.add<unsigned>("nmuons", 0);
247 
248  edm::ParameterSetDescription genericTriggerEventPSet;
249  genericTriggerEventPSet.add<bool>("andOr");
250  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi") );
251  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions",{});
252  genericTriggerEventPSet.add<bool>("andOrDcs", false);
253  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
254  genericTriggerEventPSet.add<std::string>("dbLabel","");
255  genericTriggerEventPSet.add<bool>("andOrHlt", true);
256  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT") );
257  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths",{});
258  genericTriggerEventPSet.add<std::string>("hltDBKey","");
259  genericTriggerEventPSet.add<bool>("errorReplyHlt",false);
260  genericTriggerEventPSet.add<unsigned int>("verbosityLevel",1);
261 
262  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
263  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
264 
267  fillHistoPSetDescription(htPSet);
268  histoPSet.add<edm::ParameterSetDescription>("htPSet", htPSet);
269  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.,500.,550.,600.,650.,700.,750.,800.,850.,900.,950.,1000.,1050.,1100.,1200.,1300.,1400.,1500.,2000.,2500.};
270  histoPSet.add<std::vector<double> >("htBinning", bins);
271 
274  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
275 
276  desc.add<edm::ParameterSetDescription>("histoPSet",histoPSet);
277 
278  descriptions.add("htMonitoring", desc);
279 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
Definition: HTMonitor.cc:224
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: HTMonitor.cc:217
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void HTMonitor::fillHistoLSPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 224 of file HTMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

225 {
226  pset.add<unsigned> ( "nbins", 2500);
227 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void HTMonitor::fillHistoPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 217 of file HTMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

218 {
219  pset.add<unsigned> ( "nbins");
220  pset.add<double>( "xmin" );
221  pset.add<double>( "xmax" );
222 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
HTMonitor::MEHTbinning HTMonitor::getHistoLSPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 45 of file HTMonitor.cc.

References edm::ParameterSet::getParameter().

46 {
48  pset.getParameter<unsigned>("nbins"),
49  0.,
50  double(pset.getParameter<unsigned>("nbins"))
51  };
52 }
T getParameter(std::string const &) const
HTMonitor::MEHTbinning HTMonitor::getHistoPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 36 of file HTMonitor.cc.

References edm::ParameterSet::getParameter().

37 {
39  pset.getParameter<unsigned>("nbins"),
40  pset.getParameter<double>("xmin"),
41  pset.getParameter<double>("xmax"),
42  };
43 }
T getParameter(std::string const &) const
void HTMonitor::setHTitle ( HTME me,
const std::string &  titleX,
const std::string &  titleY 
)
protected

Definition at line 54 of file HTMonitor.cc.

References HTMonitor::HTME::denominator, HTMonitor::HTME::numerator, and MonitorElement::setAxisTitle().

Referenced by bookHistograms().

55 {
56  me.numerator->setAxisTitle(titleX,1);
57  me.numerator->setAxisTitle(titleY,2);
58  me.denominator->setAxisTitle(titleX,1);
59  me.denominator->setAxisTitle(titleY,2);
60 
61 }

Member Data Documentation

HTME HTMonitor::deltaphij1j2ME_
private

Definition at line 104 of file HTMonitor.h.

Referenced by analyze(), and bookHistograms().

HTME HTMonitor::deltaphimetj1ME_
private

Definition at line 103 of file HTMonitor.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 107 of file HTMonitor.h.

Referenced by analyze(), and bookHistograms().

StringCutObjectSelector<reco::GsfElectron,true> HTMonitor::eleSelection_
private

Definition at line 111 of file HTMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::GsfElectronCollection> HTMonitor::eleToken_
private

Definition at line 93 of file HTMonitor.h.

Referenced by analyze().

std::string HTMonitor::folderName_
private

Definition at line 88 of file HTMonitor.h.

Referenced by bookHistograms().

std::string HTMonitor::histoSuffix_
private

Definition at line 89 of file HTMonitor.h.

MEHTbinning HTMonitor::ht_binning_
private

Definition at line 98 of file HTMonitor.h.

Referenced by bookHistograms().

std::vector<double> HTMonitor::ht_variable_binning_
private

Definition at line 97 of file HTMonitor.h.

Referenced by bookHistograms().

HTME HTMonitor::htME_variableBinning_
private

Definition at line 101 of file HTMonitor.h.

Referenced by analyze(), and bookHistograms().

HTME HTMonitor::htVsLS_
private

Definition at line 102 of file HTMonitor.h.

Referenced by analyze(), and bookHistograms().

StringCutObjectSelector<reco::PFJet,true > HTMonitor::jetSelection_
private

Definition at line 110 of file HTMonitor.h.

Referenced by analyze().

StringCutObjectSelector<reco::PFJet,true > HTMonitor::jetSelection_HT_
private

Definition at line 113 of file HTMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::PFJetCollection> HTMonitor::jetToken_
private

Definition at line 92 of file HTMonitor.h.

Referenced by analyze().

MEHTbinning HTMonitor::ls_binning_
private

Definition at line 99 of file HTMonitor.h.

Referenced by bookHistograms().

double HTMonitor::MAXedge_PHI = 3.2
staticprivate

Definition at line 118 of file HTMonitor.h.

StringCutObjectSelector<reco::MET,true> HTMonitor::metSelection_
private

Definition at line 109 of file HTMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::PFMETCollection> HTMonitor::metToken_
private

Definition at line 91 of file HTMonitor.h.

Referenced by analyze().

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

Definition at line 112 of file HTMonitor.h.

Referenced by analyze().

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

Definition at line 94 of file HTMonitor.h.

Referenced by analyze().

int HTMonitor::Nbin_PHI = 64
staticprivate

Definition at line 119 of file HTMonitor.h.

unsigned HTMonitor::nelectrons_
private

Definition at line 115 of file HTMonitor.h.

Referenced by analyze().

unsigned HTMonitor::njets_
private

Definition at line 114 of file HTMonitor.h.

Referenced by analyze().

unsigned HTMonitor::nmuons_
private

Definition at line 116 of file HTMonitor.h.

Referenced by analyze().

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

Definition at line 106 of file HTMonitor.h.

Referenced by analyze(), and bookHistograms().

MEHTbinning HTMonitor::phi_binning_
staticprivate
Initial value:
{
Nbin_PHI, -MAXedge_PHI, MAXedge_PHI
}

Definition at line 120 of file HTMonitor.h.

Referenced by bookHistograms().

edm::EDGetTokenT<reco::VertexCollection> HTMonitor::vtxToken_
private

Definition at line 95 of file HTMonitor.h.

Referenced by analyze().