CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
ZGammaplusJetsMonitor Class Reference
Inheritance diagram for ZGammaplusJetsMonitor:
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

 ZGammaplusJetsMonitor (const edm::ParameterSet &)
 
 ~ZGammaplusJetsMonitor () 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
 
 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 doDirectBalancevsReferencePt=true, const bool bookDen=false)
 
void dqmBeginRun (edm::Run const &iRun, edm::EventSetup const &iSetup) override
 
void fillME (ObjME *a_me, const double directbalance_, const double Difjetref_, const double Assymetry_, const double ReferencePt_, const double Jetpt_, const bool doDirectBalancevsReferencePt=true)
 
bool isBarrel (double eta)
 
bool isEndCapInner (double eta)
 
bool isEndCapOuter (double eta)
 
bool isForward (double eta)
 
bool ishighRefPt (double RefPt)
 
bool islowRefPt (double RefPt)
 
bool isMatched (double hltJetEta, double hltJetPhi, double OffJetEta, double OffJetPhi)
 
bool ismediumRefPt (double RefPt)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Attributes

ObjME a_ME [6]
 
ObjME a_ME_HB [6]
 
ObjME a_ME_HB_highRefPt [6]
 
ObjME a_ME_HB_lowRefPt [6]
 
ObjME a_ME_HB_mediumRefPt [6]
 
ObjME a_ME_HE_I [6]
 
ObjME a_ME_HE_I_highRefPt [6]
 
ObjME a_ME_HE_I_lowRefPt [6]
 
ObjME a_ME_HE_I_mediumRefPt [6]
 
ObjME a_ME_HE_O [6]
 
ObjME a_ME_HE_O_highRefPt [6]
 
ObjME a_ME_HE_O_lowRefPt [6]
 
ObjME a_ME_HE_O_mediumRefPt [6]
 
ObjME a_ME_HF [6]
 
ObjME a_ME_HF_highRefPt [6]
 
ObjME a_ME_HF_lowRefPt [6]
 
ObjME a_ME_HF_mediumRefPt [6]
 
const edm::EDGetTokenT< reco::JetCorrectorcorrectorToken_
 
MEbinning DifJetRefPT_Binning {50, -75.0, 75.0}
 
std::vector< double > directbalance_Binning
 
double dphi_cut
 
ObjME DPhiRefJetME_
 
const std::string folderName_
 
std::string fullpathName
 
HLTConfigProvider hltConfig_
 
bool isMuonPath_
 
const edm::InputTag jetInputTag_
 
std::vector< double > jetpt_Binning
 
const edm::EDGetTokenT< reco::PFJetCollectionjetToken_
 
const std::string moduleName
 
TLorentzVector muon_1
 
TLorentzVector muon_2
 
double muon_eta
 
double muon_pt
 
ObjME mZMassME_
 
double offline_cut
 
const std::string pathName
 
const std::string processName_
 
double pt_cut
 
const edm::EDGetTokenT< trigger::TriggerEventtriggerEventObject_
 
const edm::EDGetTokenT< edm::TriggerResultstriggerResultsToken_
 
std::vector< double > trigobj_eta
 
std::vector< double > trigobj_phi
 
std::vector< double > trigobj_pt
 
std::vector< double > TrObjPt_Binning
 
std::vector< double > v_jeteta
 
std::vector< double > v_jetphi
 
std::vector< double > v_jetpt
 
double Z_DM
 
double Z_Pt
 
TLorentzVector Zhltreco
 

Additional Inherited Members

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

Detailed Description

Definition at line 28 of file ZGammaplusJetsMonitor.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 31 of file ZGammaplusJetsMonitor.cc.

◆ MonitorElement

Definition at line 30 of file ZGammaplusJetsMonitor.cc.

Constructor & Destructor Documentation

◆ ZGammaplusJetsMonitor()

ZGammaplusJetsMonitor::ZGammaplusJetsMonitor ( const edm::ParameterSet iConfig)

Definition at line 137 of file ZGammaplusJetsMonitor.cc.

138  : folderName_(iConfig.getParameter<std::string>("FolderName")),
139  processName_(iConfig.getParameter<std::string>("processName")),
140  triggerEventObject_(consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("triggerEventObject"))),
141  triggerResultsToken_(consumes<edm::TriggerResults>(iConfig.getParameter<edm::InputTag>("TriggerResultsLabel"))),
142  pathName(iConfig.getParameter<std::string>("PathName")),
143  moduleName(iConfig.getParameter<std::string>("ModuleName")),
144  jetInputTag_(iConfig.getParameter<edm::InputTag>("jets")),
145  jetToken_(mayConsume<reco::PFJetCollection>(jetInputTag_)),
146  correctorToken_(mayConsume<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("corrector"))),
147  muon_pt(iConfig.getParameter<double>("muonpt")),
148  muon_eta(iConfig.getParameter<double>("muoneta")),
149  pt_cut(iConfig.getParameter<double>("ptcut")),
150  Z_DM(iConfig.getParameter<double>("Z_Dmass")),
151  Z_Pt(iConfig.getParameter<double>("Z_pt")),
152  dphi_cut(iConfig.getParameter<double>("DeltaPhi")),
153  offline_cut(iConfig.getParameter<double>("OfflineCut")),
154  isMuonPath_(iConfig.getParameter<bool>("isMuonPath")),
156  .getParameter<std::vector<double> >("directbalanceBinning")),
158  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("TrObjPtBinning")),
160  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("jetptBinning")) {}
const edm::InputTag jetInputTag_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< reco::JetCorrector > correctorToken_
std::vector< double > directbalance_Binning
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
const std::string processName_
const edm::EDGetTokenT< trigger::TriggerEvent > triggerEventObject_
const edm::EDGetTokenT< reco::PFJetCollection > jetToken_
std::vector< double > jetpt_Binning
const std::string moduleName
const std::string folderName_
std::vector< double > TrObjPt_Binning

◆ ~ZGammaplusJetsMonitor()

ZGammaplusJetsMonitor::~ZGammaplusJetsMonitor ( )
throw (
)
override

Definition at line 162 of file ZGammaplusJetsMonitor.cc.

162 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 305 of file ZGammaplusJetsMonitor.cc.

References a_ME, a_ME_HB, a_ME_HB_highRefPt, a_ME_HB_lowRefPt, a_ME_HB_mediumRefPt, a_ME_HE_I, a_ME_HE_I_highRefPt, a_ME_HE_I_lowRefPt, a_ME_HE_I_mediumRefPt, a_ME_HE_O, a_ME_HE_O_highRefPt, a_ME_HE_O_lowRefPt, a_ME_HE_O_mediumRefPt, a_ME_HF, a_ME_HF_highRefPt, a_ME_HF_lowRefPt, a_ME_HF_mediumRefPt, funct::abs(), cms::cuda::assert(), reco::JetCorrector::correction(), correctorToken_, dphi_cut, DPhiRefJetME_, trigger::TriggerObject::eta(), PVValHelper::eta, HLT_2024v12_cff::eta2, dqm::impl::MonitorElement::Fill(), fillME(), trigger::TriggerEvent::filterIds(), trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), fullpathName, trigger::TriggerEvent::getObjects(), hltConfig_, trigger::TriggerObject::id(), globals_cff::id2, heavyIonCSV_trainingSettings::idx, iEvent, ProducerED_cfi::InputTag, isBarrel(), isEndCapInner(), isEndCapOuter(), isForward(), ishighRefPt(), islowRefPt(), isMatched(), ismediumRefPt(), isMuonPath_, edm::HandleBase::isValid(), dqmiolumiharvest::j, jetMETDQMOfflineSource_cff::jec, jetInputTag_, jetToken_, submitPVResolutionJobs::key, edm::InputTag::label(), M_PI, EgHLTOffHistBins_cfi::mass, trigger::TriggerObject::mass(), HLTConfigProvider::moduleLabels(), moduleName, HLTConfigProvider::moduleType(), muon_1, muon_2, muon_eta, muon_pt, mZMassME_, TriggerDQMBase::ObjME::numerator, L1TPhase2Offline_cfi::objects, offline_cut, hltdqm::passTrig(), phi, trigger::TriggerObject::phi(), processName_, DiDispStaMuonMonitor_cfi::pt, trigger::TriggerObject::pt(), HLT_2024v12_cff::pt2, pt_cut, HLTConfigProvider::size(), edm::TriggerNames::size(), trigger::TriggerEvent::sizeFilters(), AlCaHLTBitMon_QueryRunRegistry::string, triggerEventObject_, HLTConfigProvider::triggerIndex(), edm::TriggerNames::triggerIndex(), triggerResults, triggerResultsToken_, trigobj_eta, trigobj_phi, trigobj_pt, v_jeteta, v_jetphi, v_jetpt, Z_DM, Z_Pt, and Zhltreco.

305  {
306  v_jetpt.clear();
307  v_jeteta.clear();
308  v_jetphi.clear();
309 
310  trigobj_pt.clear();
311  trigobj_eta.clear();
312  trigobj_phi.clear();
313 
314  // ------------------ Get TriggerResults -----------------
317  if (!triggerResults.isValid())
318  return;
319 
320  edm::Handle<trigger::TriggerEvent> aodTriggerEvent;
321  iEvent.getByToken(triggerEventObject_, aodTriggerEvent);
322  if (!aodTriggerEvent.isValid())
323  return;
324 
325  edm::TriggerNames triggerNames_ = iEvent.triggerNames(*triggerResults); // all trigger names available
326 
327  bool passTrig = false;
328 
329  unsigned hltcfgIndex = hltConfig_.triggerIndex(fullpathName);
330  unsigned index = triggerNames_.triggerIndex(fullpathName); // find in which index is that path
331  if (!(hltcfgIndex == index)) {
332  edm::LogInfo("ZGammaplusJetsMonitor") << " Error in trigger index";
333  return;
334  }
335 
336  if (index > 0 && index < triggerNames_.size() &&
337  triggerResults->accept(index)) { //trigger is accepted and index is valid
338  edm::LogInfo("ZGammaplusJetsMonitor") << " Trigger accepted";
339  passTrig = true;
340  }
341  if (!passTrig) {
342  edm::LogInfo("ZGammaplusJetsMonitor") << " Trigger did not pass"; // skip event if trigger fails
343  return;
344  }
345 
346  // ---------------- find module for this path ------------------------
347  const unsigned int module_size = hltConfig_.size(index);
348  std::vector<std::string> module_names = hltConfig_.moduleLabels(index); // (pathname) works too
349  if (!(module_size == module_names.size())) {
350  edm::LogInfo("ZGammaplusJetsMonitor") << "ERROR IN MODULES COUNTING";
351  return;
352  }
353  if (module_size == 0) {
354  edm::LogInfo("ZGammaplusJetsMonitor") << "no modules in this path ?!?!";
355  return;
356  }
357 
358  // Find the module
359  edm::InputTag moduleFilter;
360  moduleFilter = edm::InputTag(moduleName, "", processName_);
361  edm::LogInfo("ZGammaplusJetsMonitor") << " ModuleFilter " << moduleFilter;
362 
363  // check whether the module is packed up in TriggerEvent product
364  trigger::size_type filterIndex_ = aodTriggerEvent->filterIndex(moduleFilter);
365  edm::LogInfo("ZGammaplusJetsMonitor") << " filter index " << filterIndex_ << " | filter size "
366  << aodTriggerEvent->sizeFilters();
367  if (filterIndex_ >= aodTriggerEvent->sizeFilters()) {
368  return;
369  }
370 
371  edm::LogInfo("ZGammaplusJetsMonitor") << " filter label|filter index" << moduleName << "|" << filterIndex_;
372 
373  const trigger::Vids& VIDS_ = aodTriggerEvent->filterIds(filterIndex_);
374  const trigger::Keys& KEYS_ = aodTriggerEvent->filterKeys(filterIndex_);
375  const trigger::size_type nI_ = VIDS_.size();
376  const trigger::size_type nK_ = KEYS_.size();
377  assert(nI_ == nK_);
378  const trigger::TriggerObjectCollection& TOC(aodTriggerEvent->getObjects());
379  for (trigger::size_type idx = 0; idx < nI_; ++idx) {
380  const trigger::TriggerObject& TO(TOC[KEYS_[idx]]);
381  //VIDS : muons-->83 / jets-->85 / met-->87 / photon-->81
382  edm::LogInfo("ZGammaplusJetsMonitor") << " idx: " << idx << "| vid " << VIDS_[idx] << "|"
383  << " keys " << KEYS_[idx] << "triggerobject: "
384  << " obj_id " << TO.id() << " Pt " << TO.pt() << " eta " << TO.eta()
385  << " phi " << TO.phi() << " mass " << TO.mass();
386  }
387  if (VIDS_[0] == 81) { //photon
388  for (const auto& key : KEYS_) {
389  trigobj_pt.push_back(TOC[key].pt());
390  trigobj_eta.push_back(TOC[key].eta());
391  trigobj_phi.push_back(TOC[key].phi());
392  }
393  }
394  if (VIDS_[0] == 83 && nK_ < 2) { //muon
395  edm::LogInfo("ZGammaplusJetsMonitor") << " under 2 objects cant have a dimuon";
396  return;
397  } else {
398  for (const auto& key : KEYS_) {
399  double pt = TOC[key].pt();
400  double eta = TOC[key].eta();
401  double phi = TOC[key].phi();
402  double mass = TOC[key].mass();
403  int id = TOC[key].id();
404  unsigned int kCnt0 = 0;
405 
406  TLorentzVector v1; //keep first muon
407  if (std::abs(id) == 13) { // check if it is a muon
408  v1.SetPtEtaPhiM(pt, eta, phi, mass);
409  } else {
410  v1.SetPtEtaPhiM(0., 0., 0., 0.);
411  }
412  unsigned int kCnt1 = 0;
413  for (const auto& key1 : KEYS_) {
414  if (key != key1 && kCnt1 > kCnt0) { // avoid double counting separate objs
415 
416  double pt2 = TOC[key1].pt();
417  double eta2 = TOC[key1].eta();
418  double phi2 = TOC[key1].phi();
419  double mass2 = TOC[key1].mass();
420  int id2 = TOC[key1].id();
421 
422  if ((id + id2) == 0) { // check di-object system charge and flavor
423 
424  TLorentzVector v2;
425  if (std::abs(id2) == 13) { // check if it is a muon
426  v2.SetPtEtaPhiM(pt2, eta2, phi2, mass2);
427  } else {
428  v2.SetPtEtaPhiM(0., 0., 0., 0.0);
429  }
430 
431  muon_1 = v1;
432  muon_2 = v2;
433  bool muon_pass = muon_1.Pt() > muon_pt && muon_2.Pt() > muon_pt && std::abs(muon_1.Eta()) < muon_eta &&
434  std::abs(muon_2.Eta()) < muon_eta;
435  if (!muon_pass) {
436  return;
437  }
438 
439  Zhltreco = muon_1 + muon_2;
440  bool Z_pass = std::abs(Zhltreco.M() - 91.2) < Z_DM && Zhltreco.Pt() > Z_Pt;
441  if (!Z_pass) {
442  return;
443  }
444  trigobj_pt.push_back(Zhltreco.Pt());
445  trigobj_eta.push_back(Zhltreco.Eta());
446  trigobj_phi.push_back(Zhltreco.Phi());
447  } //end check di-object
448  else { //if not di-object
449  return;
450  }
451  } // end avoid duplicate objects
452  kCnt1++;
453  } // key1
454  kCnt0++;
455  } // key
456  } // end else
457 
458  // ---------------- module for Jet leg Jets --------------------------
459  // index of last module executed in this Path
460  const unsigned int moduleIndex = triggerResults->index(index); // here would be HLTBool at the end
461  edm::LogInfo("ZGammaplusJetsMonitor")
462  << " Module Index " << moduleIndex - 1 << " Module Name "
463  << module_names[moduleIndex - 1]; // the second to last would be the last module that is saved
464  assert(moduleIndex < module_size);
465 
466  // results from TriggerEvent product
467  const std::string& ImoduleLabel = module_names[moduleIndex - 1];
468  const std::string ImoduleType = hltConfig_.moduleType(ImoduleLabel);
469  edm::LogInfo("ZGammaplusJetsMonitor") << ImoduleLabel << " | " << ImoduleType;
470  // check whether the module is packed up in TriggerEvent product
471  const unsigned int filterIndex = aodTriggerEvent->filterIndex(edm::InputTag(ImoduleLabel, "", processName_));
472  if (filterIndex >= aodTriggerEvent->sizeFilters()) {
473  return;
474  }
475  const trigger::Vids& VIDS = aodTriggerEvent->filterIds(filterIndex);
476  const trigger::Keys& KEYS = aodTriggerEvent->filterKeys(filterIndex);
477  const trigger::size_type nI = VIDS.size();
478  const trigger::size_type nK = KEYS.size();
479  assert(nI == nK);
480  const trigger::TriggerObjectCollection& objects(aodTriggerEvent->getObjects());
481  for (trigger::size_type idx = 0; idx < nI; ++idx) {
482  const trigger::TriggerObject& TO_(objects[KEYS[idx]]);
483  //VIDS : muons-->83 / jets-->85 / met-->87
484  edm::LogInfo("ZGammaplusJetsMonitor")
485  << " idx " << idx << " vid " << VIDS[idx] << "/"
486  << " keys " << KEYS[idx] << ": "
487  << " obj_id " << TO_.id() << " " << TO_.pt() << " " << TO_.eta() << " " << TO_.phi() << " " << TO_.mass();
488  }
489  for (const auto& key : KEYS) {
490  v_jetpt.push_back(objects[key].pt());
491  v_jeteta.push_back(objects[key].eta());
492  v_jetphi.push_back(objects[key].phi());
493  }
494  bool Jet_pass = (!v_jetpt.empty() && v_jetpt[0] >= pt_cut);
495  if (!Jet_pass) {
496  return;
497  }
498  double dphi = std::abs(v_jetphi[0] - trigobj_phi[0]);
499  if (dphi > M_PI) {
500  dphi = 2 * M_PI - dphi;
501  }
502  if (dphi < dphi_cut) { // be sure is back to back
503  return;
504  }
505  // --- offline Jets -----
507  iEvent.getByToken(jetToken_, jetHandle);
509  iEvent.getByToken(correctorToken_, Corrector);
510  double leading_JetPt = -10.0;
511  double leading_JetEta = -10.0;
512  double leading_JetPhi = -10.0;
513  int ind = 0;
514 
515  if (!jetHandle.isValid()) {
516  edm::LogWarning("ZGammaplusJetsMonitor")
517  << "skipping events because the collection " << jetInputTag_.label().c_str() << " is not available";
518  return;
519  }
520  for (auto const& j : *jetHandle) {
521  if (Corrector.isValid()) {
522  double jec = Corrector->correction(j);
523  double cor_jet = jec * j.pt();
524  if (cor_jet > leading_JetPt) {
525  leading_JetPt = cor_jet;
526  leading_JetEta = j.eta();
527  leading_JetPhi = j.phi();
528  }
529  } else if (!Corrector.isValid() && ind == 0) {
530  leading_JetPt = j.pt();
531  leading_JetEta = j.eta();
532  leading_JetPhi = j.phi();
533  ind += 1;
534  }
535  }
536  if (leading_JetPt < offline_cut) { // offline cuts
537  return;
538  }
539 
540  if (!(isMatched(v_jeteta[0], v_jetphi[0], leading_JetEta, leading_JetPhi))) {
541  return;
542  }
543 
544  double DirectBalance_ = v_jetpt[0] / trigobj_pt[0];
545  double DifJ1PtTrObjPt_ = v_jetpt[0] - trigobj_pt[0];
546  double asymmetry = (trigobj_pt[0] - v_jetpt[0]) / (trigobj_pt[0] + v_jetpt[0]);
547 
548  // ------------------------- Filling Histos -----------------------------------
549  if (isMuonPath_) {
551  }
553  fillME(a_ME, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
554  if (isBarrel(v_jeteta[0])) {
555  fillME(a_ME_HB, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
556  if (islowRefPt(trigobj_pt[0])) {
557  fillME(a_ME_HB_lowRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
558  } else if (ismediumRefPt(trigobj_pt[0])) {
559  fillME(a_ME_HB_mediumRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
560  } else if (ishighRefPt(trigobj_pt[0])) {
561  fillME(a_ME_HB_highRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
562  }
563  } // end is barrel
564  if (isEndCapInner(v_jeteta[0])) {
565  fillME(a_ME_HE_I, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
566  if (islowRefPt(trigobj_pt[0])) {
567  fillME(a_ME_HE_I_lowRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
568  } else if (ismediumRefPt(trigobj_pt[0])) {
569  fillME(a_ME_HE_I_mediumRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
570  } else if (ishighRefPt(trigobj_pt[0])) {
571  fillME(a_ME_HE_I_highRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
572  }
573  } // end is endcap-inner
574  if (isEndCapOuter(v_jeteta[0])) {
575  fillME(a_ME_HE_O, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
576  if (islowRefPt(trigobj_pt[0])) {
577  fillME(a_ME_HE_O_lowRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
578  } else if (ismediumRefPt(trigobj_pt[0])) {
579  fillME(a_ME_HE_O_mediumRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
580  } else if (ishighRefPt(trigobj_pt[0])) {
581  fillME(a_ME_HE_O_highRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
582  }
583  } // end is endcap-outer
584  if (isForward(v_jeteta[0])) {
585  fillME(a_ME_HF, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
586  if (islowRefPt(trigobj_pt[0])) {
587  fillME(a_ME_HF_lowRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
588  } else if (ismediumRefPt(trigobj_pt[0])) {
589  fillME(a_ME_HF_mediumRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
590  } else if (ishighRefPt(trigobj_pt[0])) {
591  fillME(a_ME_HF_highRefPt, DirectBalance_, DifJ1PtTrObjPt_, asymmetry, trigobj_pt[0], v_jetpt[0], true);
592  }
593  } // end is Forward
594 }
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:119
const edm::InputTag jetInputTag_
const edm::EDGetTokenT< reco::JetCorrector > correctorToken_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:147
HLTConfigProvider hltConfig_
std::vector< double > v_jetphi
bool isMatched(double hltJetEta, double hltJetPhi, double OffJetEta, double OffJetPhi)
bool islowRefPt(double RefPt)
const std::string moduleType(const std::string &module) const
C++ class name of module.
std::vector< double > trigobj_eta
std::string const & label() const
Definition: InputTag.h:36
std::vector< double > v_jeteta
double correction(const LorentzVector &fJet) const
get correction using Jet information only
Definition: JetCorrector.h:46
assert(be >=bs)
uint16_t size_type
std::vector< double > trigobj_phi
const std::string processName_
unsigned int triggerIndex(std::string_view name) const
Definition: TriggerNames.cc:52
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
int iEvent
Definition: GenABIO.cc:224
unsigned int size() const
number of trigger paths in trigger table
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const edm::EDGetTokenT< trigger::TriggerEvent > triggerEventObject_
MonitorElement * numerator
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:102
key
prepare the HTCondor submission files and eventually submit them
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
static std::string const triggerResults
Definition: EdmProvDump.cc:47
std::size_t size() const
Definition: TriggerNames.cc:59
#define M_PI
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
Log< level::Info, false > LogInfo
const Vids & filterIds(trigger::size_type index) const
Definition: TriggerEvent.h:118
std::vector< double > v_jetpt
bool ismediumRefPt(double RefPt)
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:133
std::vector< double > trigobj_pt
std::vector< size_type > Keys
const edm::EDGetTokenT< reco::PFJetCollection > jetToken_
bool ishighRefPt(double RefPt)
void fillME(ObjME *a_me, const double directbalance_, const double Difjetref_, const double Assymetry_, const double ReferencePt_, const double Jetpt_, const bool doDirectBalancevsReferencePt=true)
bool isValid() const
Definition: HandleBase.h:70
const std::string moduleName
Log< level::Warning, false > LogWarning
std::vector< int > Vids
bool passTrig(const float objEta, float objPhi, const trigger::TriggerEvent &trigEvt, const std::string &filterName, const std::string &processName)
Definition: UtilFuncs.h:14

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 164 of file ZGammaplusJetsMonitor.cc.

References a_ME, a_ME_HB, a_ME_HB_highRefPt, a_ME_HB_lowRefPt, a_ME_HB_mediumRefPt, a_ME_HE_I, a_ME_HE_I_highRefPt, a_ME_HE_I_lowRefPt, a_ME_HE_I_mediumRefPt, a_ME_HE_O, a_ME_HE_O_highRefPt, a_ME_HE_O_lowRefPt, a_ME_HE_O_mediumRefPt, a_ME_HF, a_ME_HF_highRefPt, a_ME_HF_lowRefPt, a_ME_HF_mediumRefPt, TriggerDQMBase::bookME(), bookMESub(), DPhiRefJetME_, folderName_, isMuonPath_, mZMassME_, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

166  {
167  std::string histname, histtitle;
168  std::string hist_obtag = "";
169  std::string histtitle_obtag = "";
170  std::string currentFolder = folderName_;
171  ibooker.setCurrentFolder(currentFolder);
172 
173  if (isMuonPath_) {
174  hist_obtag = "Z";
175  histtitle_obtag = "Z ";
176  histname = "DiMuonMass";
177  histtitle = "DiMuonMass";
178  bookME(ibooker, mZMassME_, histname, histtitle, 50, 71., 111., false);
179  } else {
180  hist_obtag = "Photon";
181  histtitle_obtag = "Photon";
182  }
183 
184  histname = "DPhi" + hist_obtag + "Jet";
185  histtitle = "DPhi " + hist_obtag + " Jet";
186  bookME(ibooker, DPhiRefJetME_, histname, histtitle, 100, 0., acos(-1.), false);
187 
188  bookMESub(ibooker, a_ME, sizeof(a_ME) / sizeof(a_ME[0]), hist_obtag, histtitle_obtag, "", "");
189  bookMESub(ibooker, a_ME_HB, sizeof(a_ME_HB) / sizeof(a_ME_HB[0]), hist_obtag, histtitle_obtag, "HB", "(HB)", true);
190  bookMESub(ibooker,
191  a_ME_HE_I,
192  sizeof(a_ME_HE_I) / sizeof(a_ME_HE_I[0]),
193  hist_obtag,
194  histtitle_obtag,
195  "HEInner",
196  "(HE Inner)",
197  true);
198  bookMESub(ibooker,
199  a_ME_HE_O,
200  sizeof(a_ME_HE_O) / sizeof(a_ME_HE_O[0]),
201  hist_obtag,
202  histtitle_obtag,
203  "HEOuter",
204  "(HE Outer)",
205  true);
206  bookMESub(ibooker, a_ME_HF, sizeof(a_ME_HF) / sizeof(a_ME_HF[0]), hist_obtag, histtitle_obtag, "HF", "(HF)", true);
207  bookMESub(ibooker,
209  sizeof(a_ME_HB_lowRefPt) / sizeof(a_ME_HB_lowRefPt[0]),
210  hist_obtag,
211  histtitle_obtag,
212  "HB_lowRefPt",
213  "(HB) lowRefPt",
214  true);
215  bookMESub(ibooker,
217  sizeof(a_ME_HE_I_lowRefPt) / sizeof(a_ME_HE_I_lowRefPt[0]),
218  hist_obtag,
219  histtitle_obtag,
220  "HEInner_lowRefPt",
221  "(HE Inner) lowRefPt",
222  true);
223  bookMESub(ibooker,
225  sizeof(a_ME_HE_O_lowRefPt) / sizeof(a_ME_HE_O_lowRefPt[0]),
226  hist_obtag,
227  histtitle_obtag,
228  "HEOuter_lowRefPt",
229  "(HE Outer) lowRefPt",
230  true);
231  bookMESub(ibooker,
233  sizeof(a_ME_HF_lowRefPt) / sizeof(a_ME_HF_lowRefPt[0]),
234  hist_obtag,
235  histtitle_obtag,
236  "HF_lowRefPt",
237  "(HF) lowRefPt",
238  true);
239  bookMESub(ibooker,
241  sizeof(a_ME_HB_mediumRefPt) / sizeof(a_ME_HB_mediumRefPt[0]),
242  hist_obtag,
243  histtitle_obtag,
244  "HB_mediumRefPt",
245  "(HB) mediumRefPt",
246  true);
247  bookMESub(ibooker,
249  sizeof(a_ME_HE_I_mediumRefPt) / sizeof(a_ME_HE_I_mediumRefPt[0]),
250  hist_obtag,
251  histtitle_obtag,
252  "HEInner_mediumRefPt",
253  "(HE Inner) mediumRefPt",
254  true);
255  bookMESub(ibooker,
257  sizeof(a_ME_HE_O_mediumRefPt) / sizeof(a_ME_HE_O_mediumRefPt[0]),
258  hist_obtag,
259  histtitle_obtag,
260  "HEOuter_mediumRefPt",
261  "(HE Outer) mediumRefPt",
262  true);
263  bookMESub(ibooker,
265  sizeof(a_ME_HF_mediumRefPt) / sizeof(a_ME_HF_mediumRefPt[0]),
266  hist_obtag,
267  histtitle_obtag,
268  "HF_mediumRefPt",
269  "(HF) mediumRefPt",
270  true);
271  bookMESub(ibooker,
273  sizeof(a_ME_HB_highRefPt) / sizeof(a_ME_HB_highRefPt[0]),
274  hist_obtag,
275  histtitle_obtag,
276  "HB_highRefPt",
277  "(HB) highRefPt",
278  true);
279  bookMESub(ibooker,
281  sizeof(a_ME_HE_I_highRefPt) / sizeof(a_ME_HE_I_highRefPt[0]),
282  hist_obtag,
283  histtitle_obtag,
284  "HEInner_highRefPt",
285  "(HE Inner) highRefPt",
286  true);
287  bookMESub(ibooker,
289  sizeof(a_ME_HE_O_highRefPt) / sizeof(a_ME_HE_O_highRefPt[0]),
290  hist_obtag,
291  histtitle_obtag,
292  "HEOuter_highRefPt",
293  "(HE Outer) highRefPt",
294  true);
295  bookMESub(ibooker,
297  sizeof(a_ME_HF_highRefPt) / sizeof(a_ME_HF_highRefPt[0]),
298  hist_obtag,
299  histtitle_obtag,
300  "HF_highRefPt",
301  "(HF) highRefPt",
302  true);
303 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
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 doDirectBalancevsReferencePt=true, const bool bookDen=false)
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)
const std::string folderName_

◆ bookMESub()

void ZGammaplusJetsMonitor::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  doDirectBalancevsReferencePt = true,
const bool  bookDen = false 
)
protected

Definition at line 671 of file ZGammaplusJetsMonitor.cc.

References TriggerDQMBase::bookME(), DifJetRefPT_Binning, directbalance_Binning, jetpt_Binning, TriggerDQMBase::MEbinning::nbins, TriggerDQMBase::setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, TrObjPt_Binning, TriggerDQMBase::MEbinning::xmax, and TriggerDQMBase::MEbinning::xmin.

Referenced by bookHistograms().

679  {
680  std::string hName = h_Name;
681  std::string hTitle = h_Title;
682  const std::string hSubN = h_subOptName.empty() ? "" : "_" + h_subOptName;
683 
684  int nbin_DifJetRef = DifJetRefPT_Binning.nbins;
685  double maxbin_DifJetRef = DifJetRefPT_Binning.xmax;
686  double minbin_DifJetRef = DifJetRefPT_Binning.xmin;
687 
688  hName = "DirectBalance" + hSubN;
689  hTitle = " DirectBalance " + hSubT;
690  bookME(Ibooker, a_me[0], hName, hTitle, directbalance_Binning, bookDen);
691  setMETitle(a_me[0], "HLTJetPt/" + h_Name + "Pt", "events");
692 
693  hName = "JetPt1_minus_" + h_Name + "Pt" + hSubN;
694  hTitle = "LeadingJet Pt minus " + h_Name + " Pt " + hSubT;
695  bookME(Ibooker, a_me[1], hName, hTitle, nbin_DifJetRef, minbin_DifJetRef, maxbin_DifJetRef, bookDen);
696  setMETitle(a_me[1], "Pt dif [GeV]", "events");
697 
698  hName = h_Name + "JetAsymmetry" + hSubN;
699  hTitle = h_Title + " Jet Asymmetry " + hSubT;
700  bookME(Ibooker, a_me[2], hName, hTitle, directbalance_Binning, bookDen);
701  setMETitle(a_me[2], hTitle, "events");
702 
703  hName = h_Name + "pT" + hSubN;
704  hTitle = h_Title + " pT " + hSubT;
705  bookME(Ibooker, a_me[3], hName, hTitle, TrObjPt_Binning, bookDen);
706  setMETitle(a_me[3], h_Title + " pT [GeV]", "events / [GeV]");
707 
708  hName = "JetpT" + hSubN;
709  hTitle = "Jet pT " + hSubN;
710  bookME(Ibooker, a_me[4], hName, hTitle, jetpt_Binning, bookDen);
711  setMETitle(a_me[4], hTitle + " [GeV]", "events / [GeV]");
712 
713  if (doDirectBalancevsReferencePt) {
714  hName = "DirectBalanceVs" + h_Name + "Pt" + hSubN;
715  hTitle = "Direct Balance vs " + h_Title + " Pt " + hSubT;
716  bookME(Ibooker, a_me[5], hName, hTitle, TrObjPt_Binning, directbalance_Binning, bookDen);
717  setMETitle(a_me[5], h_Title + " pt", "Direct Balance");
718  }
719 }
std::vector< double > directbalance_Binning
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
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)
std::vector< double > jetpt_Binning
std::vector< double > TrObjPt_Binning

◆ dqmBeginRun()

void ZGammaplusJetsMonitor::dqmBeginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 721 of file ZGammaplusJetsMonitor.cc.

References fullpathName, hltConfig_, HLTConfigProvider::init(), pathName, topSingleLeptonDQM_PU_cfi::pattern, processName_, HLTConfigProvider::triggerNames(), and triggerPaths.

721  {
722  TPRegexp pattern(pathName);
723  // https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHighLevelTrigger#Access_to_the_HLT_configuration
724  // "init" return value indicates whether intitialisation has succeeded
725  // "changed" parameter indicates whether the config has actually changed
726  bool changed(true);
727  if (hltConfig_.init(iRun, iSetup, processName_, changed)) {
728  // if init returns TRUE, initialisation has succeeded!
729  if (changed) {
730  // The HLT config has actually changed wrt the previous Run, hence rebook your
731  // histograms or do anything else dependent on the revised HLT config
732  std::vector<std::string> triggerPaths = hltConfig_.triggerNames();
733  for (const auto& PATHNAME : triggerPaths) {
734  edm::LogInfo("ZGammaplusJetsMonitor::dqmBeginRun ") << PATHNAME;
735  if (TString(PATHNAME).Contains(pattern)) {
736  fullpathName = PATHNAME;
737  }
738  }
739  }
740  } else {
741  // if init returns FALSE, initialisation has NOT succeeded, which indicates a problem
742  // with the file and/or code and needs to be investigated!
743  edm::LogError("ZGammaplusJetsMonitor") << " HLT config extraction failure with process name " << processName_;
744  // In this case, all access methods will return empty values!
745  }
746 }
HLTConfigProvider hltConfig_
Log< level::Error, false > LogError
const std::string processName_
Log< level::Info, false > LogInfo
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
const std::vector< std::string > & triggerNames() const
names of trigger paths
static std::string const triggerPaths
Definition: EdmProvDump.cc:48

◆ fillDescriptions()

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

Definition at line 748 of file ZGammaplusJetsMonitor.cc.

References edm::ConfigurationDescriptions::add(), trigObjTnPSource_cfi::bins, submitPVResolutionJobs::desc, V0Monitor_cff::histoPSet, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

748  {
750  desc.add<std::string>("FolderName", "HLT/JME/ZGammaPlusJets");
751  desc.add<std::string>("processName", "HLT");
752  desc.add<edm::InputTag>("triggerEventObject", edm::InputTag("hltTriggerSummaryAOD::HLT"));
753  desc.add<edm::InputTag>("TriggerResultsLabel", edm::InputTag("TriggerResults::HLT"));
754  desc.add<std::string>("PathName", "");
755  desc.add<std::string>("ModuleName", "");
756  desc.add<edm::InputTag>("jets", edm::InputTag("ak4PFJetsPuppi"));
757  desc.add<edm::InputTag>("corrector", edm::InputTag("ak4PFPuppiL1FastL2L3Corrector"));
758 
759  desc.add<double>("muonpt", 20.);
760  desc.add<double>("muoneta", 2.3);
761  desc.add<double>("ptcut", 30.);
762  desc.add<double>("Z_Dmass", 20.);
763  desc.add<double>("Z_pt", 30.);
764  desc.add<double>("DeltaPhi", 2.7);
765  desc.add<double>("OfflineCut", 20.0);
766  desc.add<bool>("isMuonPath", true);
767 
769 
770  std::vector<double> bins = {
771  -3.99, -3.97, -3.95, -3.93, -3.91, -3.89, -3.87, -3.85, -3.83, -3.81, -3.79, -3.77, -3.75, -3.73, -3.71, -3.69,
772  -3.67, -3.65, -3.63, -3.61, -3.59, -3.57, -3.55, -3.53, -3.51, -3.49, -3.47, -3.45, -3.43, -3.41, -3.39, -3.37,
773  -3.35, -3.33, -3.31, -3.29, -3.27, -3.25, -3.23, -3.21, -3.19, -3.17, -3.15, -3.13, -3.11, -3.09, -3.07, -3.05,
774  -3.03, -3.01, -2.99, -2.97, -2.95, -2.93, -2.91, -2.89, -2.87, -2.85, -2.83, -2.81, -2.79, -2.77, -2.75, -2.73,
775  -2.71, -2.69, -2.67, -2.65, -2.63, -2.61, -2.59, -2.57, -2.55, -2.53, -2.51, -2.49, -2.47, -2.45, -2.43, -2.41,
776  -2.39, -2.37, -2.35, -2.33, -2.31, -2.29, -2.27, -2.25, -2.23, -2.21, -2.19, -2.17, -2.15, -2.13, -2.11, -2.09,
777  -2.07, -2.05, -2.03, -2.01, -1.99, -1.97, -1.95, -1.93, -1.91, -1.89, -1.87, -1.85, -1.83, -1.81, -1.79, -1.77,
778  -1.75, -1.73, -1.71, -1.69, -1.67, -1.65, -1.63, -1.61, -1.59, -1.57, -1.55, -1.53, -1.51, -1.49, -1.47, -1.45,
779  -1.43, -1.41, -1.39, -1.37, -1.35, -1.33, -1.31, -1.29, -1.27, -1.25, -1.23, -1.21, -1.19, -1.17, -1.15, -1.13,
780  -1.11, -1.09, -1.07, -1.05, -1.03, -1.01, -0.99, -0.97, -0.95, -0.93, -0.91, -0.89, -0.87, -0.85, -0.83, -0.81,
781  -0.79, -0.77, -0.75, -0.73, -0.71, -0.69, -0.67, -0.65, -0.63, -0.61, -0.59, -0.57, -0.55, -0.53, -0.51, -0.49,
782  -0.47, -0.45, -0.43, -0.41, -0.39, -0.37, -0.35, -0.33, -0.31, -0.29, -0.27, -0.25, -0.23, -0.21, -0.19, -0.17,
783  -0.15, -0.13, -0.11, -0.09, -0.07, -0.05, -0.03, -0.01, 0.01, 0.03, 0.05, 0.07, 0.09, 0.11, 0.13, 0.15,
784  0.17, 0.19, 0.21, 0.23, 0.25, 0.27, 0.29, 0.31, 0.33, 0.35, 0.37, 0.39, 0.41, 0.43, 0.45, 0.47,
785  0.49, 0.51, 0.53, 0.55, 0.57, 0.59, 0.61, 0.63, 0.65, 0.67, 0.69, 0.71, 0.73, 0.75, 0.77, 0.79,
786  0.81, 0.83, 0.85, 0.87, 0.89, 0.91, 0.93, 0.95, 0.97, 0.99, 1.01, 1.03, 1.05, 1.07, 1.09, 1.11,
787  1.13, 1.15, 1.17, 1.19, 1.21, 1.23, 1.25, 1.27, 1.29, 1.31, 1.33, 1.35, 1.37, 1.39, 1.41, 1.43,
788  1.45, 1.47, 1.49, 1.51, 1.53, 1.55, 1.57, 1.59, 1.61, 1.63, 1.65, 1.67, 1.69, 1.71, 1.73, 1.75,
789  1.77, 1.79, 1.81, 1.83, 1.85, 1.87, 1.89, 1.91, 1.93, 1.95, 1.97, 1.99, 2.01, 2.03, 2.05, 2.07,
790  2.09, 2.11, 2.13, 2.15, 2.17, 2.19, 2.21, 2.23, 2.25, 2.27, 2.29, 2.31, 2.33, 2.35, 2.37, 2.39,
791  2.41, 2.43, 2.45, 2.47, 2.49, 2.51, 2.53, 2.55, 2.57, 2.59, 2.61, 2.63, 2.65, 2.67, 2.69, 2.71,
792  2.73, 2.75, 2.77, 2.79, 2.81, 2.83, 2.85, 2.87, 2.89, 2.91, 2.93, 2.95, 2.97, 2.99, 3.01, 3.03,
793  3.05, 3.07, 3.09, 3.11, 3.13, 3.15, 3.17, 3.19, 3.21, 3.23, 3.25, 3.27, 3.29, 3.31, 3.33, 3.35,
794  3.37, 3.39, 3.41, 3.43, 3.45, 3.47, 3.49, 3.51, 3.53, 3.55, 3.57, 3.59, 3.61, 3.63, 3.65, 3.67,
795  3.69, 3.71, 3.73, 3.75, 3.77, 3.79, 3.81, 3.83, 3.85, 3.87, 3.89, 3.91, 3.93, 3.95, 3.97, 3.99,
796  4.01, 4.03, 4.05, 4.07, 4.09, 4.11, 4.13, 4.15, 4.17, 4.19, 4.21, 4.23, 4.25, 4.27, 4.29, 4.31,
797  4.33, 4.35, 4.37, 4.39, 4.41, 4.43, 4.45, 4.47, 4.49, 4.51, 4.53, 4.55, 4.57, 4.59, 4.61, 4.63,
798  4.65, 4.67, 4.69, 4.71, 4.73, 4.75, 4.77, 4.79, 4.81, 4.83, 4.85, 4.87, 4.89, 4.91, 4.93, 4.95,
799  4.97, 4.99, 5.01, 5.03, 5.05, 5.07, 5.09, 5.11, 5.13, 5.15, 5.17, 5.19, 5.21, 5.23, 5.25, 5.27,
800  5.29, 5.31, 5.33, 5.35, 5.37, 5.39, 5.41, 5.43, 5.45, 5.47, 5.49, 5.51, 5.53, 5.55, 5.57, 5.59,
801  5.61, 5.63, 5.65, 5.67, 5.69, 5.71, 5.73, 5.75, 5.77, 5.79, 5.81, 5.83, 5.85, 5.87, 5.89, 5.91,
802  5.93, 5.95, 5.97, 5.99};
803 
804  histoPSet.add<std::vector<double> >("directbalanceBinning", bins);
805 
806  std::vector<double> bins_ = {12, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70,
807  85, 105, 130, 175, 230, 300, 400, 500, 700, 1000, 1500}; // Z or photon pT Binning
808  histoPSet.add<std::vector<double> >("TrObjPtBinning", bins_);
809  std::vector<double> Jbins_ = {
810  0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
811  170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.}; // Jet pT Binning
812  histoPSet.add<std::vector<double> >("jetptBinning", Jbins_);
813 
814  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
815 
816  descriptions.add("zgammajetsmonitoring", desc);
817 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillME()

void ZGammaplusJetsMonitor::fillME ( ObjME a_me,
const double  directbalance_,
const double  Difjetref_,
const double  Assymetry_,
const double  ReferencePt_,
const double  Jetpt_,
const bool  doDirectBalancevsReferencePt = true 
)
protected

Definition at line 654 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

660  {
661  a_me[0].numerator->Fill(directbalance_); // index 0 = DirectBalance
662  a_me[1].numerator->Fill(Difjetref_); // index 1 = Leading JetPt minus Reference Pt
663  a_me[2].numerator->Fill(Asymmetry_); // index 2 = asymmetry
664  a_me[3].numerator->Fill(ReferencePt_); // index 3 = Reference Pt
665  a_me[4].numerator->Fill(Jetpt_); // index 4 = Jet Pt
666  if (doDirectBalancevsReferencePt) {
667  a_me[5].numerator->Fill(ReferencePt_, directbalance_); // index 5 = Balance vs Reference' Pt
668  }
669 }

◆ isBarrel()

bool ZGammaplusJetsMonitor::isBarrel ( double  eta)
protected

Definition at line 617 of file ZGammaplusJetsMonitor.cc.

References funct::abs(), PVValHelper::eta, and convertSQLitetoXML_cfg::output.

Referenced by analyze().

617  {
618  bool output = false;
619  if (std::abs(eta) <= 1.3)
620  output = true;
621  return output;
622 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Definition: output.py:1

◆ isEndCapInner()

bool ZGammaplusJetsMonitor::isEndCapInner ( double  eta)
protected

Definition at line 624 of file ZGammaplusJetsMonitor.cc.

References funct::abs(), PVValHelper::eta, and convertSQLitetoXML_cfg::output.

Referenced by analyze().

624  {
625  bool output = false;
626  if (std::abs(eta) <= 2.5 && std::abs(eta) > 1.3)
627  output = true;
628  return output;
629 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Definition: output.py:1

◆ isEndCapOuter()

bool ZGammaplusJetsMonitor::isEndCapOuter ( double  eta)
protected

Definition at line 631 of file ZGammaplusJetsMonitor.cc.

References funct::abs(), PVValHelper::eta, and convertSQLitetoXML_cfg::output.

Referenced by analyze().

631  {
632  bool output = false;
633  if (std::abs(eta) <= 3.0 && std::abs(eta) > 2.5)
634  output = true;
635  return output;
636 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Definition: output.py:1

◆ isForward()

bool ZGammaplusJetsMonitor::isForward ( double  eta)
protected

Definition at line 638 of file ZGammaplusJetsMonitor.cc.

References funct::abs(), PVValHelper::eta, and convertSQLitetoXML_cfg::output.

Referenced by analyze().

638  {
639  bool output = false;
640  if (std::abs(eta) > 3.0)
641  output = true;
642  return output;
643 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Definition: output.py:1

◆ ishighRefPt()

bool ZGammaplusJetsMonitor::ishighRefPt ( double  RefPt)
protected

Definition at line 610 of file ZGammaplusJetsMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

610  {
611  bool output = false;
612  if (refPt >= 100.)
613  output = true;
614  return output;
615 }
Definition: output.py:1

◆ islowRefPt()

bool ZGammaplusJetsMonitor::islowRefPt ( double  RefPt)
protected

Definition at line 596 of file ZGammaplusJetsMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

596  {
597  bool output = false;
598  if (refPt >= 30. && refPt < 50.)
599  output = true;
600  return output;
601 }
Definition: output.py:1

◆ isMatched()

bool ZGammaplusJetsMonitor::isMatched ( double  hltJetEta,
double  hltJetPhi,
double  OffJetEta,
double  OffJetPhi 
)
protected

Definition at line 645 of file ZGammaplusJetsMonitor.cc.

References HLTMuonOfflineAnalyzer_cfi::deltaR2, ALPAKA_ACCELERATOR_NAMESPACE::dR2(), and convertSQLitetoXML_cfg::output.

Referenced by analyze().

645  {
646  bool output = false;
647  double DRMatched2 = 0.16;
648  double dR2 = deltaR2(hltJetEta, hltJetPhi, OffJetEta, OffJetPhi);
649  if (dR2 < DRMatched2)
650  output = true;
651  return output;
652 }
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)
Definition: output.py:1

◆ ismediumRefPt()

bool ZGammaplusJetsMonitor::ismediumRefPt ( double  RefPt)
protected

Definition at line 603 of file ZGammaplusJetsMonitor.cc.

References convertSQLitetoXML_cfg::output.

Referenced by analyze().

603  {
604  bool output = false;
605  if (refPt >= 50. && refPt < 100.)
606  output = true;
607  return output;
608 }
Definition: output.py:1

Member Data Documentation

◆ a_ME

ObjME ZGammaplusJetsMonitor::a_ME[6]
private

Definition at line 102 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HB

ObjME ZGammaplusJetsMonitor::a_ME_HB[6]
private

Definition at line 103 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HB_highRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HB_highRefPt[6]
private

Definition at line 115 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HB_lowRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HB_lowRefPt[6]
private

Definition at line 107 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HB_mediumRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HB_mediumRefPt[6]
private

Definition at line 111 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_I

ObjME ZGammaplusJetsMonitor::a_ME_HE_I[6]
private

Definition at line 104 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_I_highRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HE_I_highRefPt[6]
private

Definition at line 116 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_I_lowRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HE_I_lowRefPt[6]
private

Definition at line 108 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_I_mediumRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HE_I_mediumRefPt[6]
private

Definition at line 112 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_O

ObjME ZGammaplusJetsMonitor::a_ME_HE_O[6]
private

Definition at line 105 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_O_highRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HE_O_highRefPt[6]
private

Definition at line 117 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_O_lowRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HE_O_lowRefPt[6]
private

Definition at line 109 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HE_O_mediumRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HE_O_mediumRefPt[6]
private

Definition at line 113 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HF

ObjME ZGammaplusJetsMonitor::a_ME_HF[6]
private

Definition at line 106 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HF_highRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HF_highRefPt[6]
private

Definition at line 118 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HF_lowRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HF_lowRefPt[6]
private

Definition at line 110 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ a_ME_HF_mediumRefPt

ObjME ZGammaplusJetsMonitor::a_ME_HF_mediumRefPt[6]
private

Definition at line 114 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ correctorToken_

const edm::EDGetTokenT<reco::JetCorrector> ZGammaplusJetsMonitor::correctorToken_
private

Definition at line 85 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ DifJetRefPT_Binning

MEbinning ZGammaplusJetsMonitor::DifJetRefPT_Binning {50, -75.0, 75.0}
private

Definition at line 99 of file ZGammaplusJetsMonitor.cc.

Referenced by bookMESub().

◆ directbalance_Binning

std::vector<double> ZGammaplusJetsMonitor::directbalance_Binning
private

Definition at line 96 of file ZGammaplusJetsMonitor.cc.

Referenced by bookMESub().

◆ dphi_cut

double ZGammaplusJetsMonitor::dphi_cut
private

Definition at line 92 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ DPhiRefJetME_

ObjME ZGammaplusJetsMonitor::DPhiRefJetME_
private

Definition at line 121 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ folderName_

const std::string ZGammaplusJetsMonitor::folderName_
private

Definition at line 73 of file ZGammaplusJetsMonitor.cc.

Referenced by bookHistograms().

◆ fullpathName

std::string ZGammaplusJetsMonitor::fullpathName
private

Definition at line 134 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and dqmBeginRun().

◆ hltConfig_

HLTConfigProvider ZGammaplusJetsMonitor::hltConfig_
private

Definition at line 77 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and dqmBeginRun().

◆ isMuonPath_

bool ZGammaplusJetsMonitor::isMuonPath_
private

Definition at line 94 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ jetInputTag_

const edm::InputTag ZGammaplusJetsMonitor::jetInputTag_
private

Definition at line 83 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ jetpt_Binning

std::vector<double> ZGammaplusJetsMonitor::jetpt_Binning
private

Definition at line 98 of file ZGammaplusJetsMonitor.cc.

Referenced by bookMESub().

◆ jetToken_

const edm::EDGetTokenT<reco::PFJetCollection> ZGammaplusJetsMonitor::jetToken_
private

Definition at line 84 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ moduleName

const std::string ZGammaplusJetsMonitor::moduleName
private

Definition at line 82 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ muon_1

TLorentzVector ZGammaplusJetsMonitor::muon_1
private

Definition at line 131 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ muon_2

TLorentzVector ZGammaplusJetsMonitor::muon_2
private

Definition at line 132 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ muon_eta

double ZGammaplusJetsMonitor::muon_eta
private

Definition at line 88 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ muon_pt

double ZGammaplusJetsMonitor::muon_pt
private

Definition at line 87 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ mZMassME_

ObjME ZGammaplusJetsMonitor::mZMassME_
private

Definition at line 120 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ offline_cut

double ZGammaplusJetsMonitor::offline_cut
private

Definition at line 93 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ pathName

const std::string ZGammaplusJetsMonitor::pathName
private

Definition at line 81 of file ZGammaplusJetsMonitor.cc.

Referenced by dqmBeginRun().

◆ processName_

const std::string ZGammaplusJetsMonitor::processName_
private

Definition at line 75 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze(), and dqmBeginRun().

◆ pt_cut

double ZGammaplusJetsMonitor::pt_cut
private

Definition at line 89 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ triggerEventObject_

const edm::EDGetTokenT<trigger::TriggerEvent> ZGammaplusJetsMonitor::triggerEventObject_
private

Definition at line 79 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ triggerResultsToken_

const edm::EDGetTokenT<edm::TriggerResults> ZGammaplusJetsMonitor::triggerResultsToken_
private

Definition at line 80 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ trigobj_eta

std::vector<double> ZGammaplusJetsMonitor::trigobj_eta
private

Definition at line 128 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ trigobj_phi

std::vector<double> ZGammaplusJetsMonitor::trigobj_phi
private

Definition at line 129 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ trigobj_pt

std::vector<double> ZGammaplusJetsMonitor::trigobj_pt
private

Definition at line 127 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ TrObjPt_Binning

std::vector<double> ZGammaplusJetsMonitor::TrObjPt_Binning
private

Definition at line 97 of file ZGammaplusJetsMonitor.cc.

Referenced by bookMESub().

◆ v_jeteta

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

Definition at line 124 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ v_jetphi

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

Definition at line 125 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ v_jetpt

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

Definition at line 123 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ Z_DM

double ZGammaplusJetsMonitor::Z_DM
private

Definition at line 90 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ Z_Pt

double ZGammaplusJetsMonitor::Z_Pt
private

Definition at line 91 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().

◆ Zhltreco

TLorentzVector ZGammaplusJetsMonitor::Zhltreco
private

Definition at line 133 of file ZGammaplusJetsMonitor.cc.

Referenced by analyze().