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
JetMonitor Class Reference

#include <JetMonitor.h>

Inheritance diagram for JetMonitor:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  JetME
 
struct  MEbinning
 

Public Member Functions

 JetMonitor (const edm::ParameterSet &)
 
 ~JetMonitor () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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 edm::one::EDProducerBase
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 &, JetME &me, std::string &histname, std::string &histtitle, unsigned int nbins, double xmin, double xmax)
 
void bookME (DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, std::vector< double > binningX)
 
void bookME (DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, std::vector< double > binningX, std::vector< double > binningY)
 
void bookME (DQMStore::IBooker &, MonitorElement *me, std::string &histname, std::string &histtitle, int nbins, double xmin, double xmax)
 
void bookME (DQMStore::IBooker &, MonitorElement *me, std::string &histname, std::string &histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax)
 
void bookMESub (DQMStore::IBooker &, JetME *a_me, const int len_, const std::string &h_Name, const std::string &h_Title, const std::string &h_subOptName, std::string h_subOptTitle, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
 
void FillME (JetME *a_me, double pt_, double phi_, double eta_, int ls_, const std::string &denu, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
 
bool isBarrel (double eta)
 
bool isEndCapM (double eta)
 
bool isEndCapP (double eta)
 For Hcal Endcap Plus Area. More...
 
bool isForward (double eta)
 For Hcal Forward Plus Area. More...
 
bool isHEM17 (double eta, double phi)
 For Hcal HEM17 Area. More...
 
bool isHEP17 (double eta, double phi)
 For Hcal HEP17 Area. More...
 
bool isHEP18 (double eta, double phi)
 For Hcal HEP18 Area. More...
 
void setMETitle (JetME &me, const std::string &titleX, const std::string &titleY)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &pset)
 

Private Attributes

JetME a_ME [7]
 
JetME a_ME_HB [7]
 
JetME a_ME_HE [7]
 
JetME a_ME_HE_m [7]
 
JetME a_ME_HE_p [7]
 
JetME a_ME_HEM17 [7]
 
JetME a_ME_HEP17 [7]
 
JetME a_ME_HEP18 [7]
 
JetME a_ME_HF [7]
 
edm::EDGetTokenT< reco::CaloJetCollectioncalojetToken_
 
std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
edm::EDGetTokenT< reco::GsfElectronCollectioneleToken_
 
MEbinning eta_binning_hem17_ {N_ETA_HEP17, -Jet_MAX_ETA_HEP17, -Jet_MIN_ETA_HEP17}
 
MEbinning eta_binning_hep17_ {N_ETA_HEP17, Jet_MIN_ETA_HEP17, Jet_MAX_ETA_HEP17}
 
std::string folderName_
 
std::string histoSuffix_
 
bool isCaloJetTrig
 
bool isPFJetTrig
 
MEbinning jet_eta_binning_ {Jet_N_ETA, -Jet_MAX_ETA, Jet_MAX_ETA}
 
double Jet_MAX_ETA = 5
 
double Jet_MAX_ETA_HEP17 = 3.0
 
double Jet_MAX_PHI = 3.2
 
double Jet_MAX_PHI_HEP17 = -0.52
 
double Jet_MAX_PHI_HEP18 = -0.17
 
double Jet_MIN_ETA_HEP17 = 1.3
 
double Jet_MIN_PHI_HEP17 = -0.87
 
double Jet_MIN_PHI_HEP18 = -0.52
 
unsigned int Jet_N_ETA
 
unsigned int Jet_N_PHI = 32
 
MEbinning jet_phi_binning_ {Jet_N_PHI, -Jet_MAX_PHI, Jet_MAX_PHI}
 
JetME jetHEM17_AbsEta_
 
JetME jetHEM17_AbsEtaVsPhi_
 
JetME jetHEP17_AbsEta_
 
JetME jetHEP17_AbsEtaVsPhi_
 
MEbinning jetpT_binning
 
std::vector< double > jetpT_variable_binning_
 
MEbinning jetptThr_binning_
 
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
 
MEbinning ls_binning_
 
edm::EDGetTokenT< reco::PFMETCollectionmetToken_
 
edm::EDGetTokenT< reco::MuonCollectionmuoToken_
 
unsigned int N_ETA_HEP17 = 9
 
unsigned int N_PHI_HEP17 = 7
 
unsigned int N_PHI_HEP18 = 7
 
int nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
edm::EDGetTokenT< reco::PFJetCollectionpfjetToken_
 
MEbinning phi_binning_hep17_ {N_PHI_HEP17, Jet_MIN_PHI_HEP17, Jet_MAX_PHI_HEP17}
 
MEbinning phi_binning_hep18_ {N_PHI_HEP18, Jet_MIN_PHI_HEP18, Jet_MAX_PHI_HEP18}
 
double ptcut_
 
std::vector< double > v_jeteta
 
std::vector< double > v_jetphi
 
std::vector< double > v_jetpt
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 47 of file JetMonitor.h.

Constructor & Destructor Documentation

JetMonitor::JetMonitor ( const edm::ParameterSet iConfig)

Definition at line 15 of file JetMonitor.cc.

References folderName_, getHistoPSet(), edm::ParameterSet::getParameter(), isCaloJetTrig, isPFJetTrig, jetpT_binning, jetpT_variable_binning_, jetptThr_binning_, jetSrc_, ls_binning_, ptcut_, AlCaHLTBitMon_QueryRunRegistry::string, and ~JetMonitor().

17  iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
19  iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)) {
20  folderName_ = iConfig.getParameter<std::string>("FolderName");
21  jetSrc_ = mayConsume<edm::View<reco::Jet> >(iConfig.getParameter<edm::InputTag>("jetSrc")); //jet
23  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("jetptBinning");
27  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("jetPtThrPSet"));
28  ls_binning_ =
30 
31  ptcut_ = iConfig.getParameter<double>("ptcut"); // for HLT Jet
32  isPFJetTrig = iConfig.getParameter<bool>("ispfjettrg");
33  isCaloJetTrig = iConfig.getParameter<bool>("iscalojettrg");
34 }
T getParameter(std::string const &) const
MEbinning ls_binning_
Definition: JetMonitor.h:171
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: JetMonitor.cc:38
std::string folderName_
Definition: JetMonitor.h:157
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
bool isCaloJetTrig
Definition: JetMonitor.h:195
MEbinning jetpT_binning
Definition: JetMonitor.h:169
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.h:190
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< double > jetpT_variable_binning_
Definition: JetMonitor.h:168
MEbinning jetptThr_binning_
Definition: JetMonitor.h:170
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
Definition: JetMonitor.h:166
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.h:189
bool isPFJetTrig
Definition: JetMonitor.h:194
double ptcut_
Definition: JetMonitor.h:193
JetMonitor::~JetMonitor ( )
overridedefault

Referenced by JetMonitor().

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 275 of file JetMonitor.cc.

References a_ME, a_ME_HB, a_ME_HE, a_ME_HE_m, a_ME_HE_p, a_ME_HEM17, a_ME_HEP17, a_ME_HEP18, a_ME_HF, funct::abs(), den_genTriggerEventFlag_, JetMonitor::JetME::denominator, dqm::impl::MonitorElement::Fill(), FillME(), edm::Event::getByToken(), edm::EventBase::id(), isBarrel(), isEndCapM(), isEndCapP(), isForward(), isHEM17(), isHEP17(), isHEP18(), edm::HandleBase::isValid(), jetHEM17_AbsEta_, jetHEP17_AbsEta_, jetSrc_, eostools::ls(), edm::EventID::luminosityBlock(), num_genTriggerEventFlag_, JetMonitor::JetME::numerator, ptcut_, v_jeteta, v_jetphi, and v_jetpt.

275  {
276  // Filter out events if Trigger Filtering is requested
277  if (den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup))
278  return;
279  // edm::Handle<reco::PFJetCollection> pfjetHandle;
280  // iEvent.getByToken( pfjetToken_, pfjetHandle );
281 
282  // edm::Handle<reco::CaloJetCollection> calojetHandle;
283  // iEvent.getByToken( calojetToken_, calojetHandle );
284 
285  int ls = iEvent.id().luminosityBlock();
286  v_jetpt.clear();
287  v_jeteta.clear();
288  v_jetphi.clear();
289 
291  iEvent.getByToken(jetSrc_, offjets);
292  if (!offjets.isValid()) {
293  edm::LogWarning("JetMonitor") << "Jet handle not valid \n";
294  return;
295  }
296  for (edm::View<reco::Jet>::const_iterator ibegin = offjets->begin(), iend = offjets->end(), ijet = ibegin;
297  ijet != iend;
298  ++ijet) {
299  //if (ijet->pt()< 20) {continue;}
300  if (ijet->pt() < ptcut_) {
301  continue;
302  }
303  v_jetpt.push_back(ijet->pt());
304  v_jeteta.push_back(ijet->eta());
305  v_jetphi.push_back(ijet->phi());
306  // cout << "jetpt (view ) : " << ijet->pt() << endl;
307  }
308 
309  if (v_jetpt.empty())
310  return;
311  double jetpt_ = v_jetpt[0];
312  double jeteta_ = v_jeteta[0];
313  double jetphi_ = v_jetphi[0];
314 
315  FillME(a_ME, jetpt_, jetphi_, jeteta_, ls, "denominator");
316  if (isBarrel(jeteta_)) {
317  FillME(a_ME_HB, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
318  } else if (isEndCapP(jeteta_)) {
319  FillME(a_ME_HE, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
320  FillME(a_ME_HE_p, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
321  } else if (isEndCapM(jeteta_)) {
322  FillME(a_ME_HE, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
323  FillME(a_ME_HE_m, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
324  } else if (isForward(jeteta_)) {
325  FillME(a_ME_HF, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
326  }
327 
328  if (isHEP17(jeteta_, jetphi_)) {
330  jetpt_,
331  jetphi_,
332  jeteta_,
333  ls,
334  "denominator",
335  true,
336  false,
337  false,
338  false); // doPhi, doEta, doEtaPhi, doVsLS
340  } else if (isHEM17(jeteta_, jetphi_)) {
341  FillME(
342  a_ME_HEM17, jetpt_, jetphi_, jeteta_, ls, "denominator", true, false, false, false); // doPhi, doEta, doEtaPhi
344  } else if (isHEP18(jeteta_, jetphi_)) {
345  FillME(
346  a_ME_HEP18, jetpt_, jetphi_, jeteta_, ls, "denominator", false, false, false, false); // doPhi, doEta, doEtaPhi
347  }
348 
349  if (num_genTriggerEventFlag_->on() && !num_genTriggerEventFlag_->accept(iEvent, iSetup))
350  return; // Require Numerator //
351 
352  FillME(a_ME, jetpt_, jetphi_, jeteta_, ls, "numerator");
353  if (isBarrel(jeteta_)) {
354  FillME(a_ME_HB, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
355  } else if (isEndCapP(jeteta_)) {
356  FillME(a_ME_HE, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
357  FillME(a_ME_HE_p, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
358  } else if (isEndCapM(jeteta_)) {
359  FillME(a_ME_HE, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
360  FillME(a_ME_HE_m, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
361  } else if (isForward(jeteta_)) {
362  FillME(a_ME_HF, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
363  }
364 
365  if (isHEP17(jeteta_, jetphi_)) {
367  jetpt_,
368  jetphi_,
369  jeteta_,
370  ls,
371  "numerator",
372  true,
373  false,
374  false,
375  false); // doPhi, doEta, doEtaPhi, doVsLS
376  jetHEP17_AbsEta_.numerator->Fill(abs(jeteta_));
377  } else if (isHEM17(jeteta_, jetphi_)) {
379  jetpt_,
380  jetphi_,
381  jeteta_,
382  ls,
383  "numerator",
384  true,
385  false,
386  false,
387  false); // doPhi, doEta, doEtaPhi, doVsLS
388  jetHEM17_AbsEta_.numerator->Fill(abs(jeteta_));
389  } else if (isHEP18(jeteta_, jetphi_)) {
391  jetpt_,
392  jetphi_,
393  jeteta_,
394  ls,
395  "numerator",
396  false,
397  false,
398  false,
399  false); // doPhi, doEta, doEtaPhi, doVsLS
400  }
401 }
bool isBarrel(double eta)
Definition: JetMonitor.cc:469
JetME a_ME_HB[7]
Definition: JetMonitor.h:174
bool isHEP17(double eta, double phi)
For Hcal HEP17 Area.
Definition: JetMonitor.cc:499
JetME a_ME_HE_m[7]
Definition: JetMonitor.h:178
JetME jetHEP17_AbsEta_
Definition: JetMonitor.h:186
JetME a_ME_HEM17[7]
Definition: JetMonitor.h:179
JetME a_ME_HE_p[7]
Definition: JetMonitor.h:177
void FillME(JetME *a_me, double pt_, double phi_, double eta_, int ls_, const std::string &denu, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
Definition: JetMonitor.cc:531
JetME a_ME_HEP18[7]
Definition: JetMonitor.h:181
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.h:190
bool isEndCapM(double eta)
Definition: JetMonitor.cc:477
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
JetME a_ME_HF[7]
Definition: JetMonitor.h:176
JetME a_ME_HEP17[7]
Definition: JetMonitor.h:180
bool isValid() const
Definition: HandleBase.h:70
bool isHEM17(double eta, double phi)
For Hcal HEM17 Area.
Definition: JetMonitor.cc:508
JetME jetHEM17_AbsEta_
Definition: JetMonitor.h:187
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
Definition: JetMonitor.h:166
def ls(path, rec=False)
Definition: eostools.py:349
JetME a_ME_HE[7]
Definition: JetMonitor.h:175
std::vector< double > v_jetpt
Definition: JetMonitor.h:197
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.h:189
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
JetME a_ME[7]
Definition: JetMonitor.h:173
std::vector< double > v_jeteta
Definition: JetMonitor.h:198
MonitorElement * denominator
Definition: JetMonitor.h:57
bool isForward(double eta)
For Hcal Forward Plus Area.
Definition: JetMonitor.cc:492
std::vector< double > v_jetphi
Definition: JetMonitor.h:199
MonitorElement * numerator
Definition: JetMonitor.h:56
bool isHEP18(double eta, double phi)
For Hcal HEP18 Area.
Definition: JetMonitor.cc:516
bool isEndCapP(double eta)
For Hcal Endcap Plus Area.
Definition: JetMonitor.cc:484
double ptcut_
Definition: JetMonitor.h:193
void JetMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 121 of file JetMonitor.cc.

References a_ME, a_ME_HB, a_ME_HE, a_ME_HE_m, a_ME_HE_p, a_ME_HEM17, a_ME_HEP17, a_ME_HEP18, a_ME_HF, bookME(), bookMESub(), den_genTriggerEventFlag_, eta_binning_hep17_, folderName_, isCaloJetTrig, isPFJetTrig, jetHEM17_AbsEta_, jetHEP17_AbsEta_, JetMonitor::MEbinning::nbins, num_genTriggerEventFlag_, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, JetMonitor::MEbinning::xmax, and JetMonitor::MEbinning::xmin.

121  {
122  std::string histname, histtitle;
123  std::string hist_obtag = "";
124  std::string histtitle_obtag = "";
125  std::string currentFolder = folderName_;
126  ibooker.setCurrentFolder(currentFolder);
127 
128  if (isPFJetTrig) {
129  hist_obtag = "pfjet";
130  histtitle_obtag = "PFJet";
131  } else if (isCaloJetTrig) {
132  hist_obtag = "calojet";
133  histtitle_obtag = "CaloJet";
134  } else {
135  hist_obtag = "pfjet";
136  histtitle_obtag = "PFJet";
137  } //default is pfjet
138 
139  bookMESub(ibooker, a_ME, sizeof(a_ME) / sizeof(a_ME[0]), hist_obtag, histtitle_obtag, "", "");
140  bookMESub(ibooker,
141  a_ME_HB,
142  sizeof(a_ME_HB) / sizeof(a_ME_HB[0]),
143  hist_obtag,
144  histtitle_obtag,
145  "HB",
146  "(HB)",
147  true,
148  true,
149  true,
150  false);
151  bookMESub(ibooker,
152  a_ME_HE,
153  sizeof(a_ME_HE) / sizeof(a_ME_HE[0]),
154  hist_obtag,
155  histtitle_obtag,
156  "HE",
157  "(HE)",
158  true,
159  true,
160  true,
161  false);
162  bookMESub(ibooker,
163  a_ME_HF,
164  sizeof(a_ME_HF) / sizeof(a_ME_HF[0]),
165  hist_obtag,
166  histtitle_obtag,
167  "HF",
168  "(HF)",
169  true,
170  true,
171  true,
172  false);
173  bookMESub(ibooker,
174  a_ME_HE_p,
175  sizeof(a_ME_HE_p) / sizeof(a_ME_HE_p[0]),
176  hist_obtag,
177  histtitle_obtag,
178  "HE_p",
179  "(HE+)",
180  true,
181  true,
182  true,
183  false);
184  bookMESub(ibooker,
185  a_ME_HE_m,
186  sizeof(a_ME_HE_m) / sizeof(a_ME_HE_m[0]),
187  hist_obtag,
188  histtitle_obtag,
189  "HE_m",
190  "(HE-)",
191  true,
192  true,
193  true,
194  false);
195  bookMESub(ibooker,
196  a_ME_HEP17,
197  sizeof(a_ME_HEP17) / sizeof(a_ME_HEP17[0]),
198  hist_obtag,
199  histtitle_obtag,
200  "HEP17",
201  "(HEP17)",
202  true,
203  false,
204  false,
205  false);
206  bookMESub(ibooker,
207  a_ME_HEM17,
208  sizeof(a_ME_HEM17) / sizeof(a_ME_HEM17[0]),
209  hist_obtag,
210  histtitle_obtag,
211  "HEM17",
212  "(HEM17)",
213  true,
214  false,
215  false,
216  false);
217  bookMESub(ibooker,
218  a_ME_HEP18,
219  sizeof(a_ME_HEP18) / sizeof(a_ME_HEP18[0]),
220  hist_obtag,
221  histtitle_obtag,
222  "HEP18",
223  "(HEP18)",
224  false,
225  false,
226  false,
227  false);
228 
229  /*
230  WE WOULD NEED TURNON CURVES TO BE COMPARED NOT JUST THE ZOOM OF A 2D MAP !!!
231 
232  histname = hist_obtag +"AbsEtaVsPhi_HEP17"; histtitle = histtitle_obtag + " |eta| Vs phi (HEP17) ";
233  bookME(ibooker,jetHEP17_AbsEtaVsPhi_,histname,histtitle, eta_binning_hep17_.nbins, eta_binning_hep17_.xmin, eta_binning_hep17_.xmax, phi_binning_hep17_.nbins,phi_binning_hep17_.xmin,phi_binning_hep17_.xmax);
234  setMETitle(jetHEP17_AbsEtaVsPhi_,histtitle_obtag + " |#eta|","#phi");
235 
236  histname = hist_obtag +"AbsEtaVsPhi_HEM17"; histtitle = histtitle_obtag + " |eta| Vs phi (HEM17) ";
237  bookME(ibooker,jetHEM17_AbsEtaVsPhi_,histname,histtitle, eta_binning_hep17_.nbins, eta_binning_hep17_.xmin, eta_binning_hep17_.xmax, phi_binning_hep17_.nbins,phi_binning_hep17_.xmin,phi_binning_hep17_.xmax);
238  setMETitle(jetHEM17_AbsEtaVsPhi_,histtitle_obtag + " |#eta|","#phi");
239  */
240 
241  histname = hist_obtag + "abseta_HEP17";
242  histtitle = histtitle_obtag + " |#eta| (HEP17) ";
243  bookME(ibooker,
245  histname,
246  histtitle,
250  setMETitle(jetHEP17_AbsEta_, histtitle_obtag + " |#eta|", "events / |#eta|");
251 
252  histname = hist_obtag + "abseta_HEM17";
253  histtitle = histtitle_obtag + " |eta| (HEM17) ";
254  bookME(ibooker,
256  histname,
257  histtitle,
261  setMETitle(jetHEM17_AbsEta_, histtitle_obtag + " |#eta|", "events / |#eta|");
262 
263  // Initialize the GenericTriggerEventFlag
265  num_genTriggerEventFlag_->initRun(iRun, iSetup);
267  den_genTriggerEventFlag_->initRun(iRun, iSetup);
268 }
JetME a_ME_HB[7]
Definition: JetMonitor.h:174
JetME a_ME_HE_m[7]
Definition: JetMonitor.h:178
JetME jetHEP17_AbsEta_
Definition: JetMonitor.h:186
JetME a_ME_HEM17[7]
Definition: JetMonitor.h:179
std::string folderName_
Definition: JetMonitor.h:157
JetME a_ME_HE_p[7]
Definition: JetMonitor.h:177
void bookME(DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, unsigned int nbins, double xmin, double xmax)
Definition: JetMonitor.cc:57
JetME a_ME_HEP18[7]
Definition: JetMonitor.h:181
bool isCaloJetTrig
Definition: JetMonitor.h:195
void bookMESub(DQMStore::IBooker &, JetME *a_me, const int len_, const std::string &h_Name, const std::string &h_Title, const std::string &h_subOptName, std::string h_subOptTitle, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
Definition: JetMonitor.cc:578
MEbinning eta_binning_hep17_
Definition: JetMonitor.h:228
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.h:190
JetME a_ME_HF[7]
Definition: JetMonitor.h:176
JetME a_ME_HEP17[7]
Definition: JetMonitor.h:180
JetME jetHEM17_AbsEta_
Definition: JetMonitor.h:187
JetME a_ME_HE[7]
Definition: JetMonitor.h:175
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.h:189
bool isPFJetTrig
Definition: JetMonitor.h:194
JetME a_ME[7]
Definition: JetMonitor.h:173
void setMETitle(JetME &me, const std::string &titleX, const std::string &titleY)
Definition: JetMonitor.cc:51
unsigned int nbins
Definition: JetMonitor.h:50
void JetMonitor::bookME ( DQMStore::IBooker ibooker,
JetME me,
std::string &  histname,
std::string &  histtitle,
unsigned int  nbins,
double  xmin,
double  xmax 
)
protected

Definition at line 57 of file JetMonitor.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), JetMonitor::JetME::denominator, and JetMonitor::JetME::numerator.

Referenced by bookHistograms(), and bookMESub().

63  {
64  me.numerator = ibooker.book1D(histname + "_numerator", histtitle + " (numerator)", nbins, min, max);
65  me.denominator = ibooker.book1D(histname + "_denominator", histtitle + " (denominator)", nbins, min, max);
66 }
T min(T a, T b)
Definition: MathUtil.h:58
void JetMonitor::bookME ( DQMStore::IBooker ibooker,
JetME me,
std::string &  histname,
std::string &  histtitle,
std::vector< double >  binningX 
)
protected

Definition at line 67 of file JetMonitor.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), JetMonitor::JetME::denominator, LaserClient_cfi::nbins, and JetMonitor::JetME::numerator.

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

Definition at line 75 of file JetMonitor.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::bookProfile(), JetMonitor::JetME::denominator, and JetMonitor::JetME::numerator.

83  {
84  me.numerator =
85  ibooker.bookProfile(histname + "_numerator", histtitle + " (numerator)", nbinsX, xmin, xmax, ymin, ymax);
86  me.denominator =
87  ibooker.bookProfile(histname + "_denominator", histtitle + " (denominator)", nbinsX, xmin, xmax, ymin, ymax);
88 }
void JetMonitor::bookME ( DQMStore::IBooker ibooker,
JetME me,
std::string &  histname,
std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
int  nbinsY,
double  ymin,
double  ymax 
)
protected
void JetMonitor::bookME ( DQMStore::IBooker ibooker,
JetME me,
std::string &  histname,
std::string &  histtitle,
std::vector< double >  binningX,
std::vector< double >  binningY 
)
protected

Definition at line 104 of file JetMonitor.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), JetMonitor::JetME::denominator, hlt_dqm_clientPB-live_cfg::nbinsX, hlt_dqm_clientPB-live_cfg::nbinsY, and JetMonitor::JetME::numerator.

109  {
110  int nbinsX = binningX.size() - 1;
111  std::vector<float> fbinningX(binningX.begin(), binningX.end());
112  float* arrX = &fbinningX[0];
113  int nbinsY = binningY.size() - 1;
114  std::vector<float> fbinningY(binningY.begin(), binningY.end());
115  float* arrY = &fbinningY[0];
116 
117  me.numerator = ibooker.book2D(histname + "_numerator", histtitle + " (numerator)", nbinsX, arrX, nbinsY, arrY);
118  me.denominator = ibooker.book2D(histname + "_denominator", histtitle + " (denominator)", nbinsX, arrX, nbinsY, arrY);
119 }
void JetMonitor::bookME ( DQMStore::IBooker ,
MonitorElement me,
std::string &  histname,
std::string &  histtitle,
int  nbins,
double  xmin,
double  xmax 
)
protected
void JetMonitor::bookME ( DQMStore::IBooker ,
MonitorElement me,
std::string &  histname,
std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
int  nbinsY,
double  ymin,
double  ymax 
)
protected
void JetMonitor::bookMESub ( DQMStore::IBooker Ibooker,
JetME a_me,
const int  len_,
const std::string &  h_Name,
const std::string &  h_Title,
const std::string &  h_subOptName,
std::string  h_subOptTitle,
bool  doPhi = true,
bool  doEta = true,
bool  doEtaPhi = true,
bool  doVsLS = true 
)
protected

Definition at line 578 of file JetMonitor.cc.

References bookME(), DEFINE_FWK_MODULE, eta_binning_hem17_, eta_binning_hep17_, jet_eta_binning_, jet_phi_binning_, jetpT_binning, jetptThr_binning_, ls_binning_, eostools::move(), JetMonitor::MEbinning::nbins, phi_binning_hep17_, phi_binning_hep18_, setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, JetMonitor::MEbinning::xmax, and JetMonitor::MEbinning::xmin.

Referenced by bookHistograms().

588  {
589  std::string hName = h_Name;
590  std::string hTitle = h_Title;
591  std::string hSubN = "";
592  std::string hSubT = "";
593  hSubT = std::move(h_suOptTitle);
594 
595  int nbin_phi = jet_phi_binning_.nbins;
596  double maxbin_phi = jet_phi_binning_.xmax;
597  double minbin_phi = jet_phi_binning_.xmin;
598 
599  int nbin_eta = jet_eta_binning_.nbins;
600  double maxbin_eta = jet_eta_binning_.xmax;
601  double minbin_eta = jet_eta_binning_.xmin;
602 
603  if (!h_subOptName.empty()) {
604  hSubN = "_" + h_subOptName;
605  }
606 
607  if (h_subOptName == "HEP17") {
608  nbin_phi = phi_binning_hep17_.nbins;
609  maxbin_phi = phi_binning_hep17_.xmax;
610  minbin_phi = phi_binning_hep17_.xmin;
611 
612  nbin_eta = eta_binning_hep17_.nbins;
613  maxbin_eta = eta_binning_hep17_.xmax;
614  minbin_eta = eta_binning_hep17_.xmin;
615  }
616  if (h_subOptName == "HEM17") {
617  nbin_phi = phi_binning_hep17_.nbins;
618  maxbin_phi = phi_binning_hep17_.xmax;
619  minbin_phi = phi_binning_hep17_.xmin;
620 
621  nbin_eta = eta_binning_hem17_.nbins;
622  maxbin_eta = eta_binning_hem17_.xmax;
623  minbin_eta = eta_binning_hem17_.xmin;
624  }
625  if (h_subOptName == "HEP18") {
626  nbin_phi = phi_binning_hep18_.nbins;
627  maxbin_phi = phi_binning_hep18_.xmax;
628  minbin_phi = phi_binning_hep18_.xmin;
629 
630  nbin_eta = eta_binning_hep17_.nbins;
631  maxbin_eta = eta_binning_hep17_.xmax;
632  minbin_eta = eta_binning_hep17_.xmin;
633  }
634  hName = h_Name + "pT" + hSubN;
635  hTitle = h_Title + " pT " + hSubT;
636  bookME(Ibooker, a_me[0], hName, hTitle, jetpT_binning.nbins, jetpT_binning.xmin, jetpT_binning.xmax);
637  setMETitle(a_me[0], h_Title + " pT [GeV]", "events / [GeV]");
638 
639  hName = h_Name + "pT_pTThresh" + hSubN;
640  hTitle = h_Title + " pT " + hSubT;
641  bookME(Ibooker, a_me[1], hName, hTitle, jetptThr_binning_.nbins, jetptThr_binning_.xmin, jetptThr_binning_.xmax);
642  setMETitle(a_me[1], h_Title + "pT [GeV]", "events / [GeV]");
643 
644  if (doVsLS) {
645  hName = h_Name + "pTVsLS" + hSubN;
646  hTitle = h_Title + " vs LS " + hSubT;
647  bookME(Ibooker,
648  a_me[2],
649  hName,
650  hTitle,
656  setMETitle(a_me[2], "LS", h_Title + "pT [GeV]");
657  }
658 
659  if (doPhi) {
660  hName = h_Name + "phi" + hSubN;
661  hTitle = h_Title + " phi " + hSubT;
662  bookME(Ibooker, a_me[3], hName, hTitle, nbin_phi, minbin_phi, maxbin_phi);
663  setMETitle(a_me[3], h_Title + " #phi", "events / 0.1 rad");
664  }
665 
666  if (doEta) {
667  hName = h_Name + "eta" + hSubN;
668  hTitle = h_Title + " eta " + hSubT;
669  bookME(Ibooker, a_me[4], hName, hTitle, nbin_eta, minbin_eta, maxbin_eta);
670  setMETitle(a_me[4], h_Title + " #eta", "events / #eta");
671  }
672 
673  if (doEtaPhi) {
674  hName = h_Name + "EtaVsPhi" + hSubN;
675  hTitle = h_Title + " eta Vs phi " + hSubT;
676  bookME(Ibooker, a_me[5], hName, hTitle, nbin_eta, minbin_eta, maxbin_eta, nbin_phi, minbin_phi, maxbin_phi);
677  setMETitle(a_me[5], h_Title + " #eta", "#phi");
678  }
679 
680  if (doEta) {
681  hName = h_Name + "EtaVspT" + hSubN;
682  hTitle = h_Title + " eta Vs pT " + hSubT;
683  bookME(Ibooker,
684  a_me[6],
685  hName,
686  hTitle,
687  nbin_eta,
688  minbin_eta,
689  maxbin_eta,
693  setMETitle(a_me[6], h_Title + " #eta", "Leading Jet pT [GeV]");
694  }
695 }
MEbinning eta_binning_hem17_
Definition: JetMonitor.h:230
MEbinning phi_binning_hep17_
Definition: JetMonitor.h:217
MEbinning ls_binning_
Definition: JetMonitor.h:171
void bookME(DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, unsigned int nbins, double xmin, double xmax)
Definition: JetMonitor.cc:57
MEbinning jetpT_binning
Definition: JetMonitor.h:169
MEbinning eta_binning_hep17_
Definition: JetMonitor.h:228
MEbinning phi_binning_hep18_
Definition: JetMonitor.h:223
MEbinning jet_phi_binning_
Definition: JetMonitor.h:205
MEbinning jetptThr_binning_
Definition: JetMonitor.h:170
def move(src, dest)
Definition: eostools.py:511
MEbinning jet_eta_binning_
Definition: JetMonitor.h:211
void setMETitle(JetME &me, const std::string &titleX, const std::string &titleY)
Definition: JetMonitor.cc:51
unsigned int nbins
Definition: JetMonitor.h:50
void JetMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 415 of file JetMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), trigObjTnPSource_cfi::bins, fillHistoLSPSetDescription(), fillHistoPSetDescription(), SiStripSourceConfigTier0_cff::genericTriggerEventPSet, LumiMonitor_cff::histoPSet, HLT_2018_cff::InputTag, JetMonitor_cfi::jetPSet, JetMonitor_cff::jetPtThrPSet, LumiMonitor_cff::lsPSet, and AlCaHLTBitMon_QueryRunRegistry::string.

415  {
417  desc.add<std::string>("FolderName", "HLT/Jet");
418 
419  desc.add<edm::InputTag>("met", edm::InputTag("pfMet"));
420  // desc.add<edm::InputTag>( "pfjets", edm::InputTag("ak4PFJetsCHS") );
421  // desc.add<edm::InputTag>( "calojets", edm::InputTag("ak4CaloJets") );
422  desc.add<edm::InputTag>("jetSrc", edm::InputTag("ak4PFJetsCHS"));
423  desc.add<edm::InputTag>("electrons", edm::InputTag("gedGsfElectrons"));
424  desc.add<edm::InputTag>("muons", edm::InputTag("muons"));
425  desc.add<int>("njets", 0);
426  desc.add<int>("nelectrons", 0);
427  desc.add<double>("ptcut", 20);
428  desc.add<bool>("ispfjettrg", true);
429  desc.add<bool>("iscalojettrg", false);
430 
432  genericTriggerEventPSet.add<bool>("andOr");
433  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi"));
434  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions", {});
435  genericTriggerEventPSet.add<bool>("andOrDcs", false);
436  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
437  genericTriggerEventPSet.add<std::string>("dbLabel", "");
438  genericTriggerEventPSet.add<bool>("andOrHlt", true);
439  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT"));
440  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths", {});
441  // genericTriggerEventPSet.add<std::string>("hltDBKey","");
442  genericTriggerEventPSet.add<bool>("errorReplyHlt", false);
443  genericTriggerEventPSet.add<unsigned int>("verbosityLevel", 1);
444 
445  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
446  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
447 
451  fillHistoPSetDescription(jetPSet);
452  fillHistoPSetDescription(jetPtThrPSet);
453  histoPSet.add<edm::ParameterSetDescription>("jetPSet", jetPSet);
454  histoPSet.add<edm::ParameterSetDescription>("jetPtThrPSet", jetPtThrPSet);
455  std::vector<double> bins = {
456  0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
457  170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.}; // Jet pT Binning
458  histoPSet.add<std::vector<double> >("jetptBinning", bins);
459 
462  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
463 
464  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
465 
466  descriptions.add("jetMonitoring", desc);
467 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
Definition: JetMonitor.cc:409
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: JetMonitor.cc:403
void JetMonitor::fillHistoLSPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 409 of file JetMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

409  {
410  pset.add<unsigned int>("nbins", 2500);
411  pset.add<double>("xmin", 0.);
412  pset.add<double>("xmax", 2500.);
413 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void JetMonitor::fillHistoPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 403 of file JetMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

403  {
404  pset.add<unsigned int>("nbins");
405  pset.add<double>("xmin");
406  pset.add<double>("xmax");
407 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void JetMonitor::FillME ( JetME a_me,
double  pt_,
double  phi_,
double  eta_,
int  ls_,
const std::string &  denu,
bool  doPhi = true,
bool  doEta = true,
bool  doEtaPhi = true,
bool  doVsLS = true 
)
protected

Definition at line 531 of file JetMonitor.cc.

References JetMonitor::JetME::denominator, dqm::impl::MonitorElement::Fill(), JetMonitor::JetME::numerator, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by analyze().

540  {
541  std::string isDeno = "";
542  isDeno = denu;
543  std::string DenoOrNume = "";
544  DenoOrNume = denu;
545 
546  if (DenoOrNume == "denominator") {
547  // index 0 = pt, 1 = ptThreshold , 2 = pt vs ls , 3 = phi, 4 = eta,
548  // 5 = eta vs phi, 6 = eta vs pt , 7 = abs(eta) , 8 = abs(eta) vs phi
549  a_me[0].denominator->Fill(pt_); // pt
550  a_me[1].denominator->Fill(pt_); // jetpT Threshold binning for pt
551  if (doVsLS)
552  a_me[2].denominator->Fill(ls_, pt_); // pt vs ls
553  if (doPhi)
554  a_me[3].denominator->Fill(phi_); // phi
555  if (doEta)
556  a_me[4].denominator->Fill(eta_); // eta
557  if (doEtaPhi)
558  a_me[5].denominator->Fill(eta_, phi_); // eta vs phi
559  if (doEta)
560  a_me[6].denominator->Fill(eta_, pt_); // eta vs pT
561  } else if (DenoOrNume == "numerator") {
562  a_me[0].numerator->Fill(pt_); // pt
563  a_me[1].numerator->Fill(pt_); // jetpT Threshold binning for pt
564  if (doVsLS)
565  a_me[2].numerator->Fill(ls_, pt_); // pt vs ls
566  if (doPhi)
567  a_me[3].numerator->Fill(phi_); // phi
568  if (doEta)
569  a_me[4].numerator->Fill(eta_); // eat
570  if (doEtaPhi)
571  a_me[5].numerator->Fill(eta_, phi_); // eta vs phi
572  if (doEta)
573  a_me[6].numerator->Fill(eta_, pt_); // eta vs pT
574  } else {
575  edm::LogWarning("JetMonitor") << "CHECK OUT denu option in FillME !!! DenoOrNume ? : " << DenoOrNume << std::endl;
576  }
577 }
JetMonitor::MEbinning JetMonitor::getHistoLSPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 46 of file JetMonitor.cc.

References edm::ParameterSet::getParameter().

46  {
47  return JetMonitor::MEbinning{
48  pset.getParameter<unsigned int>("nbins"), 0., double(pset.getParameter<unsigned int>("nbins"))};
49 }
T getParameter(std::string const &) const
JetMonitor::MEbinning JetMonitor::getHistoPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 38 of file JetMonitor.cc.

References edm::ParameterSet::getParameter().

Referenced by JetMonitor().

38  {
39  return JetMonitor::MEbinning{
40  pset.getParameter<unsigned int>("nbins"),
41  pset.getParameter<double>("xmin"),
42  pset.getParameter<double>("xmax"),
43  };
44 }
T getParameter(std::string const &) const
bool JetMonitor::isBarrel ( double  eta)
protected

Definition at line 469 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

469  {
470  bool output = false;
471  if (fabs(eta) <= 1.3)
472  output = true;
473  return output;
474 }
bool JetMonitor::isEndCapM ( double  eta)
protected

Definition at line 477 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

477  {
478  bool output = false;
479  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0))
480  output = true; // (mia) this magic number should come from some file in CMSSW !!!
481  return output;
482 }
bool JetMonitor::isEndCapP ( double  eta)
protected

For Hcal Endcap Plus Area.

Definition at line 484 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

484  {
485  bool output = false;
486  //if ( eta<=3.0 && eta >1.3) output=true;
487  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0))
488  output = true; // (mia) this magic number should come from some file in CMSSW !!!
489  return output;
490 }
bool JetMonitor::isForward ( double  eta)
protected

For Hcal Forward Plus Area.

Definition at line 492 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

492  {
493  bool output = false;
494  if (fabs(eta) > 3.0)
495  output = true;
496  return output;
497 }
bool JetMonitor::isHEM17 ( double  eta,
double  phi 
)
protected

For Hcal HEM17 Area.

Definition at line 508 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

508  {
509  bool output = false;
510  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0) && phi > -0.87 && phi <= -0.52) {
511  output = true;
512  } // (mia) this magic number should come from some file in CMSSW !!!
513  return output;
514 }
bool JetMonitor::isHEP17 ( double  eta,
double  phi 
)
protected

For Hcal HEP17 Area.

Definition at line 499 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

499  {
500  bool output = false;
501  // phi -0.87 to -0.52
502  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) && phi > -0.87 && phi <= -0.52) {
503  output = true;
504  } // (mia) this magic number should come from some file in CMSSW !!!
505  return output;
506 }
bool JetMonitor::isHEP18 ( double  eta,
double  phi 
)
protected

For Hcal HEP18 Area.

Definition at line 516 of file JetMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

516  {
517  bool output = false;
518  // phi -0.87 to -0.52
519  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) && phi > -0.52 && phi <= -0.17) {
520  output = true;
521  } // (mia) this magic number should come from some file in CMSSW !!!
522  return output;
523 }
void JetMonitor::setMETitle ( JetME me,
const std::string &  titleX,
const std::string &  titleY 
)
protected

Definition at line 51 of file JetMonitor.cc.

References JetMonitor::JetME::denominator, JetMonitor::JetME::numerator, and dqm::impl::MonitorElement::setAxisTitle().

Referenced by bookHistograms(), and bookMESub().

51  {
52  me.numerator->setAxisTitle(titleX, 1);
53  me.numerator->setAxisTitle(titleY, 2);
54  me.denominator->setAxisTitle(titleX, 1);
55  me.denominator->setAxisTitle(titleY, 2);
56 }

Member Data Documentation

JetME JetMonitor::a_ME[7]
private

Definition at line 173 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HB[7]
private

Definition at line 174 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HE[7]
private

Definition at line 175 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HE_m[7]
private

Definition at line 178 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HE_p[7]
private

Definition at line 177 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HEM17[7]
private

Definition at line 179 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HEP17[7]
private

Definition at line 180 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HEP18[7]
private

Definition at line 181 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::a_ME_HF[7]
private

Definition at line 176 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<reco::CaloJetCollection> JetMonitor::calojetToken_
private

Definition at line 162 of file JetMonitor.h.

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

Definition at line 190 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 163 of file JetMonitor.h.

MEbinning JetMonitor::eta_binning_hem17_ {N_ETA_HEP17, -Jet_MAX_ETA_HEP17, -Jet_MIN_ETA_HEP17}
private

Definition at line 230 of file JetMonitor.h.

Referenced by bookMESub().

MEbinning JetMonitor::eta_binning_hep17_ {N_ETA_HEP17, Jet_MIN_ETA_HEP17, Jet_MAX_ETA_HEP17}
private

Definition at line 228 of file JetMonitor.h.

Referenced by bookHistograms(), and bookMESub().

std::string JetMonitor::folderName_
private

Definition at line 157 of file JetMonitor.h.

Referenced by bookHistograms(), and JetMonitor().

std::string JetMonitor::histoSuffix_
private

Definition at line 158 of file JetMonitor.h.

bool JetMonitor::isCaloJetTrig
private

Definition at line 195 of file JetMonitor.h.

Referenced by bookHistograms(), and JetMonitor().

bool JetMonitor::isPFJetTrig
private

Definition at line 194 of file JetMonitor.h.

Referenced by bookHistograms(), and JetMonitor().

MEbinning JetMonitor::jet_eta_binning_ {Jet_N_ETA, -Jet_MAX_ETA, Jet_MAX_ETA}
private

Definition at line 211 of file JetMonitor.h.

Referenced by bookMESub().

double JetMonitor::Jet_MAX_ETA = 5
private

Definition at line 207 of file JetMonitor.h.

double JetMonitor::Jet_MAX_ETA_HEP17 = 3.0
private

Definition at line 225 of file JetMonitor.h.

double JetMonitor::Jet_MAX_PHI = 3.2
private

Definition at line 202 of file JetMonitor.h.

double JetMonitor::Jet_MAX_PHI_HEP17 = -0.52
private

Definition at line 214 of file JetMonitor.h.

double JetMonitor::Jet_MAX_PHI_HEP18 = -0.17
private

Definition at line 220 of file JetMonitor.h.

double JetMonitor::Jet_MIN_ETA_HEP17 = 1.3
private

Definition at line 226 of file JetMonitor.h.

double JetMonitor::Jet_MIN_PHI_HEP17 = -0.87
private

Definition at line 215 of file JetMonitor.h.

double JetMonitor::Jet_MIN_PHI_HEP18 = -0.52
private

Definition at line 221 of file JetMonitor.h.

unsigned int JetMonitor::Jet_N_ETA
private
Initial value:
=
20

Definition at line 209 of file JetMonitor.h.

unsigned int JetMonitor::Jet_N_PHI = 32
private

Definition at line 204 of file JetMonitor.h.

MEbinning JetMonitor::jet_phi_binning_ {Jet_N_PHI, -Jet_MAX_PHI, Jet_MAX_PHI}
private

Definition at line 205 of file JetMonitor.h.

Referenced by bookMESub().

JetME JetMonitor::jetHEM17_AbsEta_
private

Definition at line 187 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::jetHEM17_AbsEtaVsPhi_
private

Definition at line 184 of file JetMonitor.h.

JetME JetMonitor::jetHEP17_AbsEta_
private

Definition at line 186 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

JetME JetMonitor::jetHEP17_AbsEtaVsPhi_
private

Definition at line 183 of file JetMonitor.h.

MEbinning JetMonitor::jetpT_binning
private

Definition at line 169 of file JetMonitor.h.

Referenced by bookMESub(), and JetMonitor().

std::vector<double> JetMonitor::jetpT_variable_binning_
private

Definition at line 168 of file JetMonitor.h.

Referenced by JetMonitor().

MEbinning JetMonitor::jetptThr_binning_
private

Definition at line 170 of file JetMonitor.h.

Referenced by bookMESub(), and JetMonitor().

edm::EDGetTokenT<edm::View<reco::Jet> > JetMonitor::jetSrc_
private

Definition at line 166 of file JetMonitor.h.

Referenced by analyze(), and JetMonitor().

MEbinning JetMonitor::ls_binning_
private

Definition at line 171 of file JetMonitor.h.

Referenced by bookMESub(), and JetMonitor().

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

Definition at line 160 of file JetMonitor.h.

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

Definition at line 164 of file JetMonitor.h.

unsigned int JetMonitor::N_ETA_HEP17 = 9
private

Definition at line 227 of file JetMonitor.h.

unsigned int JetMonitor::N_PHI_HEP17 = 7
private

Definition at line 216 of file JetMonitor.h.

unsigned int JetMonitor::N_PHI_HEP18 = 7
private

Definition at line 222 of file JetMonitor.h.

int JetMonitor::nmuons_
private

Definition at line 192 of file JetMonitor.h.

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

Definition at line 189 of file JetMonitor.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<reco::PFJetCollection> JetMonitor::pfjetToken_
private

Definition at line 161 of file JetMonitor.h.

MEbinning JetMonitor::phi_binning_hep17_ {N_PHI_HEP17, Jet_MIN_PHI_HEP17, Jet_MAX_PHI_HEP17}
private

Definition at line 217 of file JetMonitor.h.

Referenced by bookMESub().

MEbinning JetMonitor::phi_binning_hep18_ {N_PHI_HEP18, Jet_MIN_PHI_HEP18, Jet_MAX_PHI_HEP18}
private

Definition at line 223 of file JetMonitor.h.

Referenced by bookMESub().

double JetMonitor::ptcut_
private

Definition at line 193 of file JetMonitor.h.

Referenced by analyze(), and JetMonitor().

std::vector<double> JetMonitor::v_jeteta
private

Definition at line 198 of file JetMonitor.h.

Referenced by analyze().

std::vector<double> JetMonitor::v_jetphi
private

Definition at line 199 of file JetMonitor.h.

Referenced by analyze().

std::vector<double> JetMonitor::v_jetpt
private

Definition at line 197 of file JetMonitor.h.

Referenced by analyze().