CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
JetMonitor Class Reference
Inheritance diagram for JetMonitor:
DQMEDAnalyzer TriggerDQMBase edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Public Types inherited from TriggerDQMBase
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

 JetMonitor (const edm::ParameterSet &)
 
 ~JetMonitor () override throw ()
 
- 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
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
- Public Member Functions inherited from TriggerDQMBase
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbinsX, const double xmin, const double xmax, const double ymin, const double ymax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbinsX, const double xmin, const double xmax, const uint nbinsY, const double ymin, const double ymax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY, const bool bookDen=true)
 
void setMETitle (ObjME &me, const std::string &titleX, const std::string &titleY)
 
 TriggerDQMBase ()=default
 
virtual ~TriggerDQMBase ()=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Static Public Member Functions inherited from TriggerDQMBase
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 
static MEbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &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 bookMESub (DQMStore::IBooker &, ObjME *a_me, const int len_, const std::string &h_Name, const std::string &h_Title, const std::string &h_subOptName, const std::string &h_subOptTitle, const bool doPhi=true, const bool doEta=true, const bool doEtaPhi=true, const bool doVsLS=true)
 
void FillME (ObjME *a_me, const double pt_, const double phi_, const double eta_, const int ls_, const std::string &denu, const bool doPhi=true, const bool doEta=true, const bool doEtaPhi=true, const 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 Area. More...
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Attributes

ObjME a_ME [7]
 
ObjME a_ME_HB [7]
 
ObjME a_ME_HE [7]
 
ObjME a_ME_HE_m [7]
 
ObjME a_ME_HE_p [7]
 
ObjME a_ME_HF [7]
 
std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
const bool enableFullMonitoring_
 
const std::string folderName_
 
bool hltPathsAreValid_
 
bool isCaloJetTrig
 
bool isPFJetTrig
 
MEbinning jet_eta_binning_ {50, -5, 5}
 
MEbinning jet_phi_binning_ {64, -3.2, 3.2}
 
MEbinning jetpt_binning_
 
MEbinning jetptThr_binning_
 
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
 
MEbinning ls_binning_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
double ptcut_
 
const bool requireValidHLTPaths_
 
std::vector< double > v_jeteta
 
std::vector< double > v_jetphi
 
std::vector< double > v_jetpt
 

Additional Inherited Members

- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 19 of file JetMonitor.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 22 of file JetMonitor.cc.

◆ MonitorElement

Definition at line 21 of file JetMonitor.cc.

Constructor & Destructor Documentation

◆ JetMonitor()

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

Definition at line 97 of file JetMonitor.cc.

98  : folderName_(iConfig.getParameter<std::string>("FolderName")),
99  requireValidHLTPaths_(iConfig.getParameter<bool>("requireValidHLTPaths")),
100  hltPathsAreValid_(false),
101  ptcut_(iConfig.getParameter<double>("ptcut")),
102  isPFJetTrig(iConfig.getParameter<bool>("ispfjettrg")),
103  isCaloJetTrig(iConfig.getParameter<bool>("iscalojettrg")),
104  enableFullMonitoring_(iConfig.getParameter<bool>("enableFullMonitoring")),
105  jetSrc_(mayConsume<edm::View<reco::Jet> >(iConfig.getParameter<edm::InputTag>("jetSrc"))),
107  iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
109  iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)),
111  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("jetPSet"))),
113  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("jetPtThrPSet"))),
115  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("lsPSet"))) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const bool enableFullMonitoring_
Definition: JetMonitor.cc:70
MEbinning ls_binning_
Definition: JetMonitor.cc:79
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
bool hltPathsAreValid_
Definition: JetMonitor.cc:64
bool isCaloJetTrig
Definition: JetMonitor.cc:68
const std::string folderName_
Definition: JetMonitor.cc:61
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.cc:75
MEbinning jetpt_binning_
Definition: JetMonitor.cc:77
MEbinning jetptThr_binning_
Definition: JetMonitor.cc:78
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
Definition: JetMonitor.cc:72
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.cc:74
bool isPFJetTrig
Definition: JetMonitor.cc:67
const bool requireValidHLTPaths_
Definition: JetMonitor.cc:63
double ptcut_
Definition: JetMonitor.cc:66

◆ ~JetMonitor()

JetMonitor::~JetMonitor ( )
throw (
)
override

Definition at line 117 of file JetMonitor.cc.

References den_genTriggerEventFlag_, and num_genTriggerEventFlag_.

117  {
119  num_genTriggerEventFlag_.reset();
120  }
122  den_genTriggerEventFlag_.reset();
123  }
124 }
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.cc:75
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.cc:74

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 227 of file JetMonitor.cc.

References a_ME, a_ME_HB, a_ME_HE, a_ME_HE_m, a_ME_HE_p, a_ME_HF, den_genTriggerEventFlag_, enableFullMonitoring_, FillME(), hltPathsAreValid_, iEvent, isBarrel(), isEndCapM(), isEndCapP(), isForward(), edm::HandleBase::isValid(), jetSrc_, eostools::ls(), num_genTriggerEventFlag_, ptcut_, requireValidHLTPaths_, v_jeteta, v_jetphi, and v_jetpt.

227  {
228  // if valid HLT paths are required,
229  // analyze event only if all paths are valid
231  return;
232  }
233 
234  // Filter out events if Trigger Filtering is requested
235  if (den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup))
236  return;
237 
238  const int ls = iEvent.id().luminosityBlock();
239 
240  v_jetpt.clear();
241  v_jeteta.clear();
242  v_jetphi.clear();
243 
245  iEvent.getByToken(jetSrc_, offjets);
246  if (!offjets.isValid()) {
247  edm::LogWarning("JetMonitor") << "Jet handle not valid \n";
248  return;
249  }
250  for (edm::View<reco::Jet>::const_iterator ibegin = offjets->begin(), iend = offjets->end(), ijet = ibegin;
251  ijet != iend;
252  ++ijet) {
253  if (ijet->pt() < ptcut_) {
254  continue;
255  }
256  v_jetpt.push_back(ijet->pt());
257  v_jeteta.push_back(ijet->eta());
258  v_jetphi.push_back(ijet->phi());
259  // cout << "jetpt (view ) : " << ijet->pt() << endl;
260  }
261 
262  if (v_jetpt.empty())
263  return;
264  double jetpt_ = v_jetpt[0];
265  double jeteta_ = v_jeteta[0];
266  double jetphi_ = v_jetphi[0];
267 
268  FillME(a_ME, jetpt_, jetphi_, jeteta_, ls, "denominator");
269  if (isBarrel(jeteta_)) {
270  FillME(a_ME_HB, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
271  } else if (isEndCapP(jeteta_)) {
272  FillME(a_ME_HE, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
273  if (enableFullMonitoring_) {
274  FillME(a_ME_HE_p, jetpt_, jetphi_, jeteta_, ls, "denominator", true, false, true, false);
275  }
276  } else if (isEndCapM(jeteta_)) {
277  FillME(a_ME_HE, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
278  if (enableFullMonitoring_) {
279  FillME(a_ME_HE_m, jetpt_, jetphi_, jeteta_, ls, "denominator", true, false, true, false);
280  }
281  } else if (isForward(jeteta_)) {
282  FillME(a_ME_HF, jetpt_, jetphi_, jeteta_, ls, "denominator", true, true, true, false);
283  }
284 
285  if (num_genTriggerEventFlag_->on() && !num_genTriggerEventFlag_->accept(iEvent, iSetup))
286  return; // Require Numerator //
287 
288  FillME(a_ME, jetpt_, jetphi_, jeteta_, ls, "numerator");
289  if (isBarrel(jeteta_)) {
290  FillME(a_ME_HB, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
291  } else if (isEndCapP(jeteta_)) {
292  FillME(a_ME_HE, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
293  if (enableFullMonitoring_) {
294  FillME(a_ME_HE_p, jetpt_, jetphi_, jeteta_, ls, "numerator", true, false, true, false);
295  }
296  } else if (isEndCapM(jeteta_)) {
297  FillME(a_ME_HE, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
298  if (enableFullMonitoring_) {
299  FillME(a_ME_HE_m, jetpt_, jetphi_, jeteta_, ls, "numerator", true, false, true, false);
300  }
301  } else if (isForward(jeteta_)) {
302  FillME(a_ME_HF, jetpt_, jetphi_, jeteta_, ls, "numerator", true, true, true, false);
303  }
304 }
ObjME a_ME_HB[7]
Definition: JetMonitor.cc:82
bool isBarrel(double eta)
Definition: JetMonitor.cc:306
const bool enableFullMonitoring_
Definition: JetMonitor.cc:70
ObjME a_ME_HE[7]
Definition: JetMonitor.cc:83
void FillME(ObjME *a_me, const double pt_, const double phi_, const double eta_, const int ls_, const std::string &denu, const bool doPhi=true, const bool doEta=true, const bool doEtaPhi=true, const bool doVsLS=true)
Definition: JetMonitor.cc:336
bool hltPathsAreValid_
Definition: JetMonitor.cc:64
ObjME a_ME_HE_p[7]
Definition: JetMonitor.cc:85
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.cc:75
bool isEndCapM(double eta)
Definition: JetMonitor.cc:313
ObjME a_ME_HF[7]
Definition: JetMonitor.cc:84
ObjME a_ME[7]
Definition: JetMonitor.cc:81
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
Definition: JetMonitor.cc:72
def ls(path, rec=False)
Definition: eostools.py:349
std::vector< double > v_jetpt
Definition: JetMonitor.cc:88
bool isValid() const
Definition: HandleBase.h:70
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.cc:74
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
Log< level::Warning, false > LogWarning
std::vector< double > v_jeteta
Definition: JetMonitor.cc:89
const bool requireValidHLTPaths_
Definition: JetMonitor.cc:63
bool isForward(double eta)
For Hcal Forward Area.
Definition: JetMonitor.cc:329
std::vector< double > v_jetphi
Definition: JetMonitor.cc:90
ObjME a_ME_HE_m[7]
Definition: JetMonitor.cc:86
bool isEndCapP(double eta)
For Hcal Endcap Plus Area.
Definition: JetMonitor.cc:321
double ptcut_
Definition: JetMonitor.cc:66

◆ bookHistograms()

void JetMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 126 of file JetMonitor.cc.

References a_ME, a_ME_HB, a_ME_HE, a_ME_HE_m, a_ME_HE_p, a_ME_HF, bookMESub(), den_genTriggerEventFlag_, enableFullMonitoring_, folderName_, hltPathsAreValid_, isCaloJetTrig, isPFJetTrig, num_genTriggerEventFlag_, requireValidHLTPaths_, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

126  {
127  // Initialize the GenericTriggerEventFlag
129  num_genTriggerEventFlag_->initRun(iRun, iSetup);
130  }
132  den_genTriggerEventFlag_->initRun(iRun, iSetup);
133  }
134 
135  // check if every HLT path specified in numerator and denominator has a valid match in the HLT Menu
137  den_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->allHLTPathsAreValid() &&
138  den_genTriggerEventFlag_->allHLTPathsAreValid());
139 
140  // if valid HLT paths are required,
141  // create DQM outputs only if all paths are valid
143  return;
144  }
145 
146  std::string histname, histtitle;
147  std::string hist_obtag = "";
148  std::string histtitle_obtag = "";
149  std::string currentFolder = folderName_;
150  ibooker.setCurrentFolder(currentFolder);
151 
152  if (isPFJetTrig) {
153  hist_obtag = "pfjet";
154  histtitle_obtag = "PFJet";
155  } else if (isCaloJetTrig) {
156  hist_obtag = "calojet";
157  histtitle_obtag = "CaloJet";
158  } else {
159  hist_obtag = "pfjet";
160  histtitle_obtag = "PFJet";
161  } //default is pfjet
162 
163  bookMESub(ibooker, a_ME, sizeof(a_ME) / sizeof(a_ME[0]), hist_obtag, histtitle_obtag, "", "");
164  bookMESub(ibooker,
165  a_ME_HB,
166  sizeof(a_ME_HB) / sizeof(a_ME_HB[0]),
167  hist_obtag,
168  histtitle_obtag,
169  "HB",
170  "(HB)",
171  true,
172  true,
173  true,
174  false);
175  bookMESub(ibooker,
176  a_ME_HE,
177  sizeof(a_ME_HE) / sizeof(a_ME_HE[0]),
178  hist_obtag,
179  histtitle_obtag,
180  "HE",
181  "(HE)",
182  true,
183  true,
184  true,
185  false);
186  bookMESub(ibooker,
187  a_ME_HF,
188  sizeof(a_ME_HF) / sizeof(a_ME_HF[0]),
189  hist_obtag,
190  histtitle_obtag,
191  "HF",
192  "(HF)",
193  true,
194  true,
195  true,
196  false);
197 
198  //check the flag
199  if (!enableFullMonitoring_) {
200  return;
201  }
202 
203  bookMESub(ibooker,
204  a_ME_HE_p,
205  sizeof(a_ME_HE_p) / sizeof(a_ME_HE_p[0]),
206  hist_obtag,
207  histtitle_obtag,
208  "HE_p",
209  "(HE+)",
210  true,
211  false,
212  true,
213  false);
214  bookMESub(ibooker,
215  a_ME_HE_m,
216  sizeof(a_ME_HE_m) / sizeof(a_ME_HE_m[0]),
217  hist_obtag,
218  histtitle_obtag,
219  "HE_m",
220  "(HE-)",
221  true,
222  false,
223  true,
224  false);
225 }
ObjME a_ME_HB[7]
Definition: JetMonitor.cc:82
const bool enableFullMonitoring_
Definition: JetMonitor.cc:70
ObjME a_ME_HE[7]
Definition: JetMonitor.cc:83
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
bool hltPathsAreValid_
Definition: JetMonitor.cc:64
bool isCaloJetTrig
Definition: JetMonitor.cc:68
const std::string folderName_
Definition: JetMonitor.cc:61
ObjME a_ME_HE_p[7]
Definition: JetMonitor.cc:85
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.cc:75
ObjME a_ME_HF[7]
Definition: JetMonitor.cc:84
ObjME a_ME[7]
Definition: JetMonitor.cc:81
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.cc:74
bool isPFJetTrig
Definition: JetMonitor.cc:67
void bookMESub(DQMStore::IBooker &, ObjME *a_me, const int len_, const std::string &h_Name, const std::string &h_Title, const std::string &h_subOptName, const std::string &h_subOptTitle, const bool doPhi=true, const bool doEta=true, const bool doEtaPhi=true, const bool doVsLS=true)
Definition: JetMonitor.cc:379
const bool requireValidHLTPaths_
Definition: JetMonitor.cc:63
ObjME a_ME_HE_m[7]
Definition: JetMonitor.cc:86

◆ bookMESub()

void JetMonitor::bookMESub ( DQMStore::IBooker Ibooker,
ObjME a_me,
const int  len_,
const std::string &  h_Name,
const std::string &  h_Title,
const std::string &  h_subOptName,
const std::string &  h_subOptTitle,
const bool  doPhi = true,
const bool  doEta = true,
const bool  doEtaPhi = true,
const bool  doVsLS = true 
)
protected

Definition at line 379 of file JetMonitor.cc.

References TriggerDQMBase::bookME(), jet_eta_binning_, jet_phi_binning_, jetpt_binning_, jetptThr_binning_, ls_binning_, TriggerDQMBase::MEbinning::nbins, TriggerDQMBase::setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, TriggerDQMBase::MEbinning::xmax, and TriggerDQMBase::MEbinning::xmin.

Referenced by bookHistograms().

389  {
390  std::string hName = h_Name;
391  std::string hTitle = h_Title;
392  const std::string hSubN = h_subOptName.empty() ? "" : "_" + h_subOptName;
393 
394  int nbin_phi = jet_phi_binning_.nbins;
395  double maxbin_phi = jet_phi_binning_.xmax;
396  double minbin_phi = jet_phi_binning_.xmin;
397 
398  int nbin_eta = jet_eta_binning_.nbins;
399  double maxbin_eta = jet_eta_binning_.xmax;
400  double minbin_eta = jet_eta_binning_.xmin;
401 
402  hName = h_Name + "pT" + hSubN;
403  hTitle = h_Title + " pT " + hSubT;
404  bookME(Ibooker, a_me[0], hName, hTitle, jetpt_binning_.nbins, jetpt_binning_.xmin, jetpt_binning_.xmax);
405  setMETitle(a_me[0], h_Title + " pT [GeV]", "events / [GeV]");
406 
407  hName = h_Name + "pT_pTThresh" + hSubN;
408  hTitle = h_Title + " pT " + hSubT;
409  bookME(Ibooker, a_me[1], hName, hTitle, jetptThr_binning_.nbins, jetptThr_binning_.xmin, jetptThr_binning_.xmax);
410  setMETitle(a_me[1], h_Title + "pT [GeV]", "events / [GeV]");
411 
412  if (doVsLS) {
413  hName = h_Name + "pTVsLS" + hSubN;
414  hTitle = h_Title + " vs LS " + hSubT;
415  bookME(Ibooker,
416  a_me[2],
417  hName,
418  hTitle,
424  setMETitle(a_me[2], "LS", h_Title + "pT [GeV]");
425  }
426 
427  if (doPhi) {
428  hName = h_Name + "phi" + hSubN;
429  hTitle = h_Title + " phi " + hSubT;
430  bookME(Ibooker, a_me[3], hName, hTitle, nbin_phi, minbin_phi, maxbin_phi);
431  setMETitle(a_me[3], h_Title + " #phi", "events / 0.1 rad");
432  }
433 
434  if (doEta) {
435  hName = h_Name + "eta" + hSubN;
436  hTitle = h_Title + " eta " + hSubT;
437  bookME(Ibooker, a_me[4], hName, hTitle, nbin_eta, minbin_eta, maxbin_eta);
438  setMETitle(a_me[4], h_Title + " #eta", "events");
439  }
440 
441  if (doEtaPhi) {
442  hName = h_Name + "EtaVsPhi" + hSubN;
443  hTitle = h_Title + " eta Vs phi " + hSubT;
444  bookME(Ibooker, a_me[5], hName, hTitle, nbin_eta, minbin_eta, maxbin_eta, nbin_phi, minbin_phi, maxbin_phi);
445  setMETitle(a_me[5], h_Title + " #eta", "#phi");
446  }
447 
448  if (doEtaPhi) {
449  hName = h_Name + "EtaVspT" + hSubN;
450  hTitle = h_Title + " eta Vs pT " + hSubT;
451  bookME(Ibooker,
452  a_me[6],
453  hName,
454  hTitle,
455  nbin_eta,
456  minbin_eta,
457  maxbin_eta,
461  setMETitle(a_me[6], h_Title + " #eta", "Leading Jet pT [GeV]");
462  }
463 }
MEbinning ls_binning_
Definition: JetMonitor.cc:79
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
MEbinning jet_phi_binning_
Definition: JetMonitor.cc:93
MEbinning jetpt_binning_
Definition: JetMonitor.cc:77
MEbinning jetptThr_binning_
Definition: JetMonitor.cc:78
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
MEbinning jet_eta_binning_
Definition: JetMonitor.cc:94

◆ fillDescriptions()

void JetMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 465 of file JetMonitor.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, TriggerDQMBase::fillHistoLSPSetDescription(), TriggerDQMBase::fillHistoPSetDescription(), GenericTriggerEventFlag::fillPSetDescription(), SiStripSourceConfigTier0_cff::genericTriggerEventPSet, LumiMonitor_cff::histoPSet, HLT_2022v12_cff::InputTag, JetMonitor_cfi::jetPSet, JetMonitor_cff::jetPtThrPSet, LumiMonitor_cff::lsPSet, and AlCaHLTBitMon_QueryRunRegistry::string.

465  {
467  desc.add<std::string>("FolderName", "HLT/Jet");
468  desc.add<bool>("requireValidHLTPaths", true);
469 
470  desc.add<edm::InputTag>("jetSrc", edm::InputTag("ak4PFJetsCHS"));
471  desc.add<double>("ptcut", 20);
472  desc.add<bool>("ispfjettrg", true);
473  desc.add<bool>("iscalojettrg", false);
474 
475  desc.add<bool>("enableFullMonitoring", true);
476 
479 
480  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
481  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
482 
490  histoPSet.add<std::vector<double> >("jetptBinning",
491  {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
492  170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.});
493 
497 
498  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
499 
500  descriptions.add("jetMonitoring", desc);
501 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillPSetDescription(edm::ParameterSetDescription &desc)

◆ FillME()

void JetMonitor::FillME ( ObjME a_me,
const double  pt_,
const double  phi_,
const double  eta_,
const int  ls_,
const std::string &  denu,
const bool  doPhi = true,
const bool  doEta = true,
const bool  doEtaPhi = true,
const bool  doVsLS = true 
)
protected

Definition at line 336 of file JetMonitor.cc.

References TriggerDQMBase::ObjME::denominator, dqm::impl::MonitorElement::Fill(), and TriggerDQMBase::ObjME::numerator.

Referenced by analyze().

345  {
346  if (DenoOrNume == "denominator") {
347  // index 0 = pt, 1 = ptThreshold , 2 = pt vs ls , 3 = phi, 4 = eta,
348  // 5 = eta vs phi, 6 = eta vs pt , 7 = abs(eta) , 8 = abs(eta) vs phi
349  a_me[0].denominator->Fill(pt_); // pt
350  a_me[1].denominator->Fill(pt_); // jetpT Threshold binning for pt
351  if (doVsLS)
352  a_me[2].denominator->Fill(ls_, pt_); // pt vs ls
353  if (doPhi)
354  a_me[3].denominator->Fill(phi_); // phi
355  if (doEta)
356  a_me[4].denominator->Fill(eta_); // eta
357  if (doEtaPhi)
358  a_me[5].denominator->Fill(eta_, phi_); // eta vs phi
359  if (doEtaPhi)
360  a_me[6].denominator->Fill(eta_, pt_); // eta vs pT
361  } else if (DenoOrNume == "numerator") {
362  a_me[0].numerator->Fill(pt_); // pt
363  a_me[1].numerator->Fill(pt_); // jetpT Threshold binning for pt
364  if (doVsLS)
365  a_me[2].numerator->Fill(ls_, pt_); // pt vs ls
366  if (doPhi)
367  a_me[3].numerator->Fill(phi_); // phi
368  if (doEta)
369  a_me[4].numerator->Fill(eta_); // eta
370  if (doEtaPhi)
371  a_me[5].numerator->Fill(eta_, phi_); // eta vs phi
372  if (doEtaPhi)
373  a_me[6].numerator->Fill(eta_, pt_); // eta vs pT
374  } else {
375  edm::LogWarning("JetMonitor") << "CHECK OUT denu option in FillME !!! DenoOrNume ? : " << DenoOrNume << std::endl;
376  }
377 }
Log< level::Warning, false > LogWarning

◆ isBarrel()

bool JetMonitor::isBarrel ( double  eta)
protected

Definition at line 306 of file JetMonitor.cc.

References PVValHelper::eta, and convertSQLitetoXML_cfg::output.

Referenced by analyze().

306  {
307  bool output = false;
308  if (fabs(eta) <= 1.3)
309  output = true;
310  return output;
311 }

◆ isEndCapM()

bool JetMonitor::isEndCapM ( double  eta)
protected

Definition at line 313 of file JetMonitor.cc.

References PVValHelper::eta, and convertSQLitetoXML_cfg::output.

Referenced by analyze().

313  {
314  bool output = false;
315  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0))
316  output = true; // (mia) this magic number should come from some file in CMSSW !!!
317  return output;
318 }

◆ isEndCapP()

bool JetMonitor::isEndCapP ( double  eta)
protected

For Hcal Endcap Plus Area.

Definition at line 321 of file JetMonitor.cc.

References PVValHelper::eta, and convertSQLitetoXML_cfg::output.

Referenced by analyze().

321  {
322  bool output = false;
323  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0))
324  output = true; // (mia) this magic number should come from some file in CMSSW !!!
325  return output;
326 }

◆ isForward()

bool JetMonitor::isForward ( double  eta)
protected

For Hcal Forward Area.

Definition at line 329 of file JetMonitor.cc.

References PVValHelper::eta, and convertSQLitetoXML_cfg::output.

Referenced by analyze().

329  {
330  bool output = false;
331  if (fabs(eta) > 3.0)
332  output = true;
333  return output;
334 }

Member Data Documentation

◆ a_ME

ObjME JetMonitor::a_ME[7]
private

Definition at line 81 of file JetMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HB

ObjME JetMonitor::a_ME_HB[7]
private

Definition at line 82 of file JetMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE

ObjME JetMonitor::a_ME_HE[7]
private

Definition at line 83 of file JetMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_m

ObjME JetMonitor::a_ME_HE_m[7]
private

Definition at line 86 of file JetMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_p

ObjME JetMonitor::a_ME_HE_p[7]
private

Definition at line 85 of file JetMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HF

ObjME JetMonitor::a_ME_HF[7]
private

Definition at line 84 of file JetMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ den_genTriggerEventFlag_

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

Definition at line 75 of file JetMonitor.cc.

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

◆ enableFullMonitoring_

const bool JetMonitor::enableFullMonitoring_
private

Definition at line 70 of file JetMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ folderName_

const std::string JetMonitor::folderName_
private

Definition at line 61 of file JetMonitor.cc.

Referenced by bookHistograms().

◆ hltPathsAreValid_

bool JetMonitor::hltPathsAreValid_
private

Definition at line 64 of file JetMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ isCaloJetTrig

bool JetMonitor::isCaloJetTrig
private

Definition at line 68 of file JetMonitor.cc.

Referenced by bookHistograms().

◆ isPFJetTrig

bool JetMonitor::isPFJetTrig
private

Definition at line 67 of file JetMonitor.cc.

Referenced by bookHistograms().

◆ jet_eta_binning_

MEbinning JetMonitor::jet_eta_binning_ {50, -5, 5}
private

Definition at line 94 of file JetMonitor.cc.

Referenced by bookMESub().

◆ jet_phi_binning_

MEbinning JetMonitor::jet_phi_binning_ {64, -3.2, 3.2}
private

Definition at line 93 of file JetMonitor.cc.

Referenced by bookMESub().

◆ jetpt_binning_

MEbinning JetMonitor::jetpt_binning_
private

Definition at line 77 of file JetMonitor.cc.

Referenced by bookMESub().

◆ jetptThr_binning_

MEbinning JetMonitor::jetptThr_binning_
private

Definition at line 78 of file JetMonitor.cc.

Referenced by bookMESub().

◆ jetSrc_

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

Definition at line 72 of file JetMonitor.cc.

Referenced by analyze().

◆ ls_binning_

MEbinning JetMonitor::ls_binning_
private

Definition at line 79 of file JetMonitor.cc.

Referenced by bookMESub().

◆ num_genTriggerEventFlag_

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

Definition at line 74 of file JetMonitor.cc.

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

◆ ptcut_

double JetMonitor::ptcut_
private

Definition at line 66 of file JetMonitor.cc.

Referenced by analyze().

◆ requireValidHLTPaths_

const bool JetMonitor::requireValidHLTPaths_
private

Definition at line 63 of file JetMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ v_jeteta

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

Definition at line 89 of file JetMonitor.cc.

Referenced by analyze().

◆ v_jetphi

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

Definition at line 90 of file JetMonitor.cc.

Referenced by analyze().

◆ v_jetpt

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

Definition at line 88 of file JetMonitor.cc.

Referenced by analyze().