CMS 3D CMS Logo

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

 ObjMonitor (const edm::ParameterSet &)
 
 ~ObjMonitor () 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
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

bool looseJetId (const double &abseta, const double &NHF, const double &NEMF, const double &CHF, const double &CEMF, const unsigned &NumNeutralParticles, const unsigned &CHM)
 
bool tightJetId (const double &abseta, const double &NHF, const double &NEMF, const double &CHF, const double &CEMF, const unsigned &NumNeutralParticles, const unsigned &CHM)
 

Private Attributes

std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
bool do_hmg_
 
bool do_ht_
 
bool do_jet_
 
bool do_met_
 
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
 
edm::EDGetTokenT< reco::GsfElectronCollectioneleToken_
 
const std::string folderName_
 
bool hltPathsAreValid_
 
HMesonGammaDQM hmgDQM_
 
HTDQM htDQM_
 
StringCutObjectSelector< reco::PFJet, true > htjetSelection_
 
JetDQM jetDQM_
 
std::string jetId_
 
StringCutObjectSelector< reco::PFJet, true > jetSelection_
 
edm::EDGetTokenT< reco::PFJetCollectionjetToken_
 
METDQM metDQM_
 
StringCutObjectSelector< reco::MET, true > metSelection_
 
edm::EDGetTokenT< reco::PFMETCollectionmetToken_
 
StringCutObjectSelector< reco::Muon, true > muoSelection_
 
edm::EDGetTokenT< reco::MuonCollectionmuoToken_
 
unsigned nelectrons_
 
unsigned njets_
 
unsigned nmesons_
 
unsigned nmuons_
 
unsigned nphotons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
StringCutObjectSelector< reco::Photon, true > phoSelection_
 
edm::EDGetTokenT< reco::PhotonCollectionphoToken_
 
const bool requireValidHLTPaths_
 
StringCutObjectSelector< reco::Track, true > trkSelection_
 
edm::EDGetTokenT< reco::TrackCollectiontrkToken_
 

Additional Inherited Members

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

Detailed Description

Definition at line 30 of file ObjMonitor.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 33 of file ObjMonitor.cc.

◆ MonitorElement

Definition at line 32 of file ObjMonitor.cc.

Constructor & Destructor Documentation

◆ ObjMonitor()

ObjMonitor::ObjMonitor ( const edm::ParameterSet iConfig)

Definition at line 102 of file ObjMonitor.cc.

References do_hmg_, do_ht_, do_jet_, do_met_, hmgDQM_, htDQM_, HTDQM::initialise(), METDQM::initialise(), JetDQM::initialise(), HMesonGammaDQM::initialise(), jetDQM_, and metDQM_.

103  : folderName_(iConfig.getParameter<std::string>("FolderName")),
104  requireValidHLTPaths_(iConfig.getParameter<bool>("requireValidHLTPaths")),
105  hltPathsAreValid_(false),
106  metToken_(consumes<reco::PFMETCollection>(iConfig.getParameter<edm::InputTag>("met"))),
107  jetToken_(mayConsume<reco::PFJetCollection>(iConfig.getParameter<edm::InputTag>("jets"))),
108  eleToken_(mayConsume<reco::GsfElectronCollection>(iConfig.getParameter<edm::InputTag>("electrons"))),
109  muoToken_(mayConsume<reco::MuonCollection>(iConfig.getParameter<edm::InputTag>("muons"))),
110  phoToken_(mayConsume<reco::PhotonCollection>(iConfig.getParameter<edm::InputTag>("photons"))),
111  trkToken_(mayConsume<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"))),
112  do_met_(iConfig.getParameter<bool>("doMETHistos")),
113  do_jet_(iConfig.getParameter<bool>("doJetHistos")),
114  do_ht_(iConfig.getParameter<bool>("doHTHistos")),
115  do_hmg_(iConfig.getParameter<bool>("doHMesonGammaHistos")),
116  num_genTriggerEventFlag_(std::make_unique<GenericTriggerEventFlag>(
117  iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
118  den_genTriggerEventFlag_(std::make_unique<GenericTriggerEventFlag>(
119  iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)),
120  metSelection_(iConfig.getParameter<std::string>("metSelection")),
121  jetSelection_(iConfig.getParameter<std::string>("jetSelection")),
122  jetId_(iConfig.getParameter<std::string>("jetId")),
123  htjetSelection_(iConfig.getParameter<std::string>("htjetSelection")),
124  eleSelection_(iConfig.getParameter<std::string>("eleSelection")),
125  muoSelection_(iConfig.getParameter<std::string>("muoSelection")),
126  phoSelection_(iConfig.getParameter<std::string>("phoSelection")),
127  trkSelection_(iConfig.getParameter<std::string>("trkSelection")),
128  njets_(iConfig.getParameter<int>("njets")),
129  nelectrons_(iConfig.getParameter<int>("nelectrons")),
130  nmuons_(iConfig.getParameter<int>("nmuons")),
131  nphotons_(iConfig.getParameter<int>("nphotons")),
132  nmesons_(iConfig.getParameter<int>("nmesons")) {
133  if (do_met_) {
134  metDQM_.initialise(iConfig);
135  }
136  if (do_jet_) {
137  jetDQM_.initialise(iConfig);
138  }
139  if (do_ht_) {
140  htDQM_.initialise(iConfig);
141  }
142  if (do_hmg_) {
143  hmgDQM_.initialise(iConfig);
144  }
145 }
edm::EDGetTokenT< reco::TrackCollection > trkToken_
Definition: ObjMonitor.cc:70
unsigned nelectrons_
Definition: ObjMonitor.cc:96
void initialise(const edm::ParameterSet &iConfig)
Definition: JetDQM.cc:8
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: ObjMonitor.cc:90
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: ObjMonitor.cc:86
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Definition: ObjMonitor.cc:67
void initialise(const edm::ParameterSet &iConfig)
Definition: HTDQM.cc:7
const bool requireValidHLTPaths_
Definition: ObjMonitor.cc:62
unsigned nmuons_
Definition: ObjMonitor.cc:97
const std::string folderName_
Definition: ObjMonitor.cc:60
unsigned nphotons_
Definition: ObjMonitor.cc:98
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: ObjMonitor.cc:87
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: ObjMonitor.cc:91
void initialise(const edm::ParameterSet &iConfig)
std::string jetId_
Definition: ObjMonitor.cc:88
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: ObjMonitor.cc:83
bool hltPathsAreValid_
Definition: ObjMonitor.cc:63
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: ObjMonitor.cc:65
void initialise(const edm::ParameterSet &iConfig)
Definition: METDQM.cc:7
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: ObjMonitor.cc:84
bool do_met_
Definition: ObjMonitor.cc:74
bool do_jet_
Definition: ObjMonitor.cc:76
edm::EDGetTokenT< reco::PhotonCollection > phoToken_
Definition: ObjMonitor.cc:69
bool do_ht_
Definition: ObjMonitor.cc:78
JetDQM jetDQM_
Definition: ObjMonitor.cc:77
unsigned nmesons_
Definition: ObjMonitor.cc:99
HMesonGammaDQM hmgDQM_
Definition: ObjMonitor.cc:81
bool do_hmg_
Definition: ObjMonitor.cc:80
StringCutObjectSelector< reco::PFJet, true > htjetSelection_
Definition: ObjMonitor.cc:89
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: ObjMonitor.cc:66
StringCutObjectSelector< reco::Photon, true > phoSelection_
Definition: ObjMonitor.cc:92
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: ObjMonitor.cc:68
unsigned njets_
Definition: ObjMonitor.cc:95
METDQM metDQM_
Definition: ObjMonitor.cc:75
StringCutObjectSelector< reco::Track, true > trkSelection_
Definition: ObjMonitor.cc:93
HTDQM htDQM_
Definition: ObjMonitor.cc:79

◆ ~ObjMonitor()

ObjMonitor::~ObjMonitor ( )
throw (
)
override

Definition at line 147 of file ObjMonitor.cc.

References den_genTriggerEventFlag_, and num_genTriggerEventFlag_.

147  {
149  num_genTriggerEventFlag_.reset();
150  }
152  den_genTriggerEventFlag_.reset();
153  }
154 }
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: ObjMonitor.cc:83
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: ObjMonitor.cc:84

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 187 of file ObjMonitor.cc.

References funct::abs(), objects.autophobj::absIso, reco::TrackBase::charge(), HLT_2024v14_cff::CHF, PbPb_ZMuSkimMuonDPG_cff::deltaR, den_genTriggerEventFlag_, do_hmg_, do_ht_, do_jet_, do_met_, reco::TrackBase::dz(), MillePedeFileConverter_cfg::e, pwdgSkimBPark_cfi::electrons, eleSelection_, eleToken_, reco::TrackBase::eta(), METDQM::fillHistograms(), HTDQM::fillHistograms(), JetDQM::fillHistograms(), HMesonGammaDQM::fillHistograms(), hltPathsAreValid_, hmgDQM_, htDQM_, htjetSelection_, mps_fire::i, iEvent, dqmiolumiharvest::j, jetDQM_, jetId_, PDWG_EXODelayedJetMET_cff::jets, jetSelection_, jetToken_, dqmdumpme::k, looseJetId(), eostools::ls(), visualization-live-secondInstance_cfg::m, BTaggingMonitor_cfi::met, metDQM_, metSelection_, metToken_, DiMuonV_cfg::muons, muoSelection_, muoToken_, nelectrons_, HLT_2024v14_cff::NHF, njets_, nmesons_, nmuons_, nphotons_, num_genTriggerEventFlag_, phi, reco::LeafCandidate::phi(), reco::TrackBase::phi(), phoSelection_, phoToken_, BPHMonitor_cfi::photons, reco::LeafCandidate::pt(), reco::TrackBase::pt(), requireValidHLTPaths_, RandomServiceHelper::t1, RandomServiceHelper::t2, tightJetId(), trkSelection_, and trkToken_.

187  {
188  // if valid HLT paths are required,
189  // analyze event only if all paths are valid
191  return;
192  }
193 
194  // Filter out events if Trigger Filtering is requested
195  if (den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup))
196  return;
197 
199  iEvent.getByToken(metToken_, metHandle);
200  reco::PFMET pfmet = metHandle->front();
201  if (!metSelection_(pfmet))
202  return;
203 
204  float met = pfmet.pt();
205  float phi = pfmet.phi();
206 
208  iEvent.getByToken(jetToken_, jetHandle);
209  std::vector<reco::PFJet> jets;
210  std::vector<reco::PFJet> htjets;
211  if (jetHandle->size() < njets_)
212  return;
213  for (auto const& j : *jetHandle) {
214  if (jetSelection_(j)) {
215  if (jetId_ == "loose" || jetId_ == "tight") {
216  double abseta = abs(j.eta());
217  double NHF = j.neutralHadronEnergyFraction();
218  double NEMF = j.neutralEmEnergyFraction();
219  double CHF = j.chargedHadronEnergyFraction();
220  double CEMF = j.chargedEmEnergyFraction();
221  unsigned NumNeutralParticles = j.neutralMultiplicity();
222  unsigned CHM = j.chargedMultiplicity();
223  bool passId = (jetId_ == "loose" && looseJetId(abseta, NHF, NEMF, CHF, CEMF, NumNeutralParticles, CHM)) ||
224  (jetId_ == "tight" && tightJetId(abseta, NHF, NEMF, CHF, CEMF, NumNeutralParticles, CHM));
225  if (passId)
226  jets.push_back(j);
227  } else
228  jets.push_back(j);
229  }
230  if (htjetSelection_(j))
231  htjets.push_back(j);
232  }
233  if (jets.size() < njets_)
234  return;
235 
237  iEvent.getByToken(eleToken_, eleHandle);
238  std::vector<reco::GsfElectron> electrons;
239  if (eleHandle->size() < nelectrons_)
240  return;
241  for (auto const& e : *eleHandle) {
242  if (eleSelection_(e))
243  electrons.push_back(e);
244  }
245  if (electrons.size() < nelectrons_)
246  return;
247 
249  iEvent.getByToken(muoToken_, muoHandle);
250  if (muoHandle->size() < nmuons_)
251  return;
252  std::vector<reco::Muon> muons;
253  for (auto const& m : *muoHandle) {
254  if (muoSelection_(m))
255  muons.push_back(m);
256  }
257  if (muons.size() < nmuons_)
258  return;
259 
261  iEvent.getByToken(phoToken_, phoHandle);
262  if (phoHandle->size() < nphotons_)
263  return;
264  std::vector<reco::Photon> photons;
265  for (auto const& m : *phoHandle) {
266  if (phoSelection_(m))
267  photons.push_back(m);
268  }
269  if (photons.size() < nphotons_)
270  return;
271 
272  std::vector<TLorentzVector> passedMesons;
273  if (do_hmg_) {
275  iEvent.getByToken(trkToken_, trkHandle);
276  // find isolated mesons (phi or rho)
277  TLorentzVector t1, t2;
278  float hadronMassHyp[2] = {0.1396, 0.4937}; // pi or K mass
279  float loMassLim[2] = {0.5, 0.9}; // rho or phi mass
280  float hiMassLim[2] = {1.0, 1.11}; // rho or phi mass
281 
282  for (size_t i = 0; i < trkHandle->size(); ++i) {
283  const reco::Track trk1 = trkHandle->at(i);
284  if (!trkSelection_(trk1))
285  continue;
286  for (size_t j = i + 1; j < trkHandle->size(); ++j) {
287  const reco::Track trk2 = trkHandle->at(j);
288  if (!trkSelection_(trk2))
289  continue;
290  if (trk1.charge() * trk2.charge() != -1)
291  continue;
292 
293  for (unsigned hyp = 0; hyp < 2; ++hyp) {
294  t1.SetPtEtaPhiM(trk1.pt(), trk1.eta(), trk1.phi(), hadronMassHyp[hyp]);
295  t2.SetPtEtaPhiM(trk2.pt(), trk2.eta(), trk2.phi(), hadronMassHyp[hyp]);
296  TLorentzVector mesCand = t1 + t2;
297 
298  // cuts
299  if (mesCand.M() < loMassLim[hyp] || mesCand.M() > hiMassLim[hyp])
300  continue; //mass
301  if (mesCand.Pt() < 35. || fabs(mesCand.Rapidity()) > 2.1)
302  continue; //pT eta
303 
304  // isolation
305  float absIso = 0.;
306  for (size_t k = 0; k < trkHandle->size(); ++k) {
307  if (k == i || k == j)
308  continue;
309  const reco::Track trkN = trkHandle->at(k);
310  if (trkN.charge() == 0 || trkN.pt() < 0.5 || (trkN.dz() > 0.1) ||
311  deltaR(trkN.eta(), trkN.phi(), mesCand.Eta(), mesCand.Phi()) > 0.5)
312  continue;
313  absIso += trkN.pt();
314  }
315  if (absIso / mesCand.Pt() > 0.2)
316  continue;
317  passedMesons.push_back(mesCand);
318  }
319  }
320  }
321  if (passedMesons.size() < nmesons_)
322  return;
323  }
324 
325  bool passNumCond = num_genTriggerEventFlag_->off() || num_genTriggerEventFlag_->accept(iEvent, iSetup);
326  int ls = iEvent.id().luminosityBlock();
327 
328  if (do_met_)
329  metDQM_.fillHistograms(met, phi, ls, passNumCond);
330  if (do_jet_)
331  jetDQM_.fillHistograms(jets, pfmet, ls, passNumCond);
332  if (do_ht_)
333  htDQM_.fillHistograms(htjets, met, ls, passNumCond);
334  if (do_hmg_)
335  hmgDQM_.fillHistograms(photons, passedMesons, ls, passNumCond);
336 }
void fillHistograms(const double &met, const double &phi, const int &ls, const bool passCond)
Definition: METDQM.cc:50
edm::EDGetTokenT< reco::TrackCollection > trkToken_
Definition: ObjMonitor.cc:70
void fillHistograms(const std::vector< reco::PFJet > &jets, const reco::PFMET &pfmet, const int ls, const bool passCond)
Definition: JetDQM.cc:130
unsigned nelectrons_
Definition: ObjMonitor.cc:96
bool looseJetId(const double &abseta, const double &NHF, const double &NEMF, const double &CHF, const double &CEMF, const unsigned &NumNeutralParticles, const unsigned &CHM)
Definition: ObjMonitor.cc:338
double pt() const final
transverse momentum
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: ObjMonitor.cc:90
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: ObjMonitor.cc:86
void fillHistograms(const reco::PhotonCollection &photons, const std::vector< TLorentzVector > &mesons, const int ls, const bool passCond)
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Definition: ObjMonitor.cc:67
const bool requireValidHLTPaths_
Definition: ObjMonitor.cc:62
bool tightJetId(const double &abseta, const double &NHF, const double &NEMF, const double &CHF, const double &CEMF, const unsigned &NumNeutralParticles, const unsigned &CHM)
Definition: ObjMonitor.cc:356
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
Definition: DiMuonV_cfg.py:214
unsigned nmuons_
Definition: ObjMonitor.cc:97
unsigned nphotons_
Definition: ObjMonitor.cc:98
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: ObjMonitor.cc:87
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: ObjMonitor.cc:91
double pt() const
track transverse momentum
Definition: TrackBase.h:637
int charge() const
track electric charge
Definition: TrackBase.h:596
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:622
int iEvent
Definition: GenABIO.cc:224
std::string jetId_
Definition: ObjMonitor.cc:88
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: ObjMonitor.cc:83
bool hltPathsAreValid_
Definition: ObjMonitor.cc:63
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: ObjMonitor.cc:65
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: ObjMonitor.cc:84
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
bool do_met_
Definition: ObjMonitor.cc:74
bool do_jet_
Definition: ObjMonitor.cc:76
edm::EDGetTokenT< reco::PhotonCollection > phoToken_
Definition: ObjMonitor.cc:69
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
def ls(path, rec=False)
Definition: eostools.py:349
bool do_ht_
Definition: ObjMonitor.cc:78
JetDQM jetDQM_
Definition: ObjMonitor.cc:77
unsigned nmesons_
Definition: ObjMonitor.cc:99
HMesonGammaDQM hmgDQM_
Definition: ObjMonitor.cc:81
bool do_hmg_
Definition: ObjMonitor.cc:80
StringCutObjectSelector< reco::PFJet, true > htjetSelection_
Definition: ObjMonitor.cc:89
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: ObjMonitor.cc:66
StringCutObjectSelector< reco::Photon, true > phoSelection_
Definition: ObjMonitor.cc:92
void fillHistograms(const std::vector< reco::PFJet > &htjets, const double &met, const int &ls, const bool passCond)
Definition: HTDQM.cc:45
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: ObjMonitor.cc:68
unsigned njets_
Definition: ObjMonitor.cc:95
double phi() const final
momentum azimuthal angle
METDQM metDQM_
Definition: ObjMonitor.cc:75
StringCutObjectSelector< reco::Track, true > trkSelection_
Definition: ObjMonitor.cc:93
HTDQM htDQM_
Definition: ObjMonitor.cc:79

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 156 of file ObjMonitor.cc.

References METDQM::bookHistograms(), HTDQM::bookHistograms(), JetDQM::bookHistograms(), HMesonGammaDQM::bookHistograms(), den_genTriggerEventFlag_, do_hmg_, do_ht_, do_jet_, do_met_, folderName_, hltPathsAreValid_, hmgDQM_, htDQM_, jetDQM_, metDQM_, num_genTriggerEventFlag_, requireValidHLTPaths_, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

156  {
157  // Initialize the GenericTriggerEventFlag
159  num_genTriggerEventFlag_->initRun(iRun, iSetup);
161  den_genTriggerEventFlag_->initRun(iRun, iSetup);
162 
163  // check if every HLT path specified in numerator and denominator has a valid match in the HLT Menu
165  den_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->allHLTPathsAreValid() &&
166  den_genTriggerEventFlag_->allHLTPathsAreValid());
167 
168  // if valid HLT paths are required,
169  // create DQM outputs only if all paths are valid
171  return;
172  }
173 
174  std::string currentFolder = folderName_;
175  ibooker.setCurrentFolder(currentFolder);
176 
177  if (do_met_)
178  metDQM_.bookHistograms(ibooker);
179  if (do_jet_)
180  jetDQM_.bookHistograms(ibooker);
181  if (do_ht_)
182  htDQM_.bookHistograms(ibooker);
183  if (do_hmg_)
184  hmgDQM_.bookHistograms(ibooker);
185 }
void bookHistograms(DQMStore::IBooker &)
Definition: METDQM.cc:18
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
void bookHistograms(DQMStore::IBooker &)
Definition: HTDQM.cc:18
const bool requireValidHLTPaths_
Definition: ObjMonitor.cc:62
const std::string folderName_
Definition: ObjMonitor.cc:60
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: ObjMonitor.cc:83
bool hltPathsAreValid_
Definition: ObjMonitor.cc:63
void bookHistograms(DQMStore::IBooker &)
Definition: JetDQM.cc:29
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: ObjMonitor.cc:84
bool do_met_
Definition: ObjMonitor.cc:74
bool do_jet_
Definition: ObjMonitor.cc:76
void bookHistograms(DQMStore::IBooker &)
bool do_ht_
Definition: ObjMonitor.cc:78
JetDQM jetDQM_
Definition: ObjMonitor.cc:77
HMesonGammaDQM hmgDQM_
Definition: ObjMonitor.cc:81
bool do_hmg_
Definition: ObjMonitor.cc:80
METDQM metDQM_
Definition: ObjMonitor.cc:75
HTDQM htDQM_
Definition: ObjMonitor.cc:79

◆ fillDescriptions()

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

Definition at line 374 of file ObjMonitor.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, HMesonGammaDQM::fillHmgDescription(), HTDQM::fillHtDescription(), JetDQM::fillJetDescription(), METDQM::fillMetDescription(), GenericTriggerEventFlag::fillPSetDescription(), SiStripSourceConfigTier0_cff::genericTriggerEventPSet, V0Monitor_cff::histoPSet, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

374  {
376  desc.add<std::string>("FolderName", "HLT/OBJ");
377  desc.add<bool>("requireValidHLTPaths", true);
378 
379  desc.add<edm::InputTag>("met", edm::InputTag("pfMet"));
380  desc.add<edm::InputTag>("jets", edm::InputTag("ak4PFJetsCHS"));
381  desc.add<edm::InputTag>("electrons", edm::InputTag("gedGsfElectrons"));
382  desc.add<edm::InputTag>("muons", edm::InputTag("muons"));
383  desc.add<edm::InputTag>("photons", edm::InputTag("gedPhotons"));
384  desc.add<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
385  desc.add<std::string>("metSelection", "pt > 0");
386  desc.add<std::string>("jetSelection", "pt > 0");
387  desc.add<std::string>("jetId", "");
388  desc.add<std::string>("htjetSelection", "pt > 30");
389  desc.add<std::string>("eleSelection", "pt > 0");
390  desc.add<std::string>("muoSelection", "pt > 0");
391  desc.add<std::string>("phoSelection", "pt > 0");
392  desc.add<std::string>("trkSelection", "pt > 0");
393  desc.add<int>("njets", 0);
394  desc.add<int>("nelectrons", 0);
395  desc.add<int>("nmuons", 0);
396  desc.add<int>("nphotons", 0);
397  desc.add<int>("nmesons", 0);
398 
401  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
402  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
403 
404  desc.add<bool>("doMETHistos", true);
407  desc.add<bool>("doJetHistos", true);
409  desc.add<bool>("doHTHistos", true);
411  desc.add<bool>("doHMesonGammaHistos", true);
413 
414  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
415 
416  descriptions.add("objMonitoring", desc);
417 }
static void fillJetDescription(edm::ParameterSetDescription &histoPSet)
Definition: JetDQM.cc:220
static void fillMetDescription(edm::ParameterSetDescription &histoPSet)
Definition: METDQM.cc:68
static void fillHmgDescription(edm::ParameterSetDescription &histoPSet)
static void fillHtDescription(edm::ParameterSetDescription &histoPSet)
Definition: HTDQM.cc:69
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillPSetDescription(edm::ParameterSetDescription &desc)

◆ looseJetId()

bool ObjMonitor::looseJetId ( const double &  abseta,
const double &  NHF,
const double &  NEMF,
const double &  CHF,
const double &  CEMF,
const unsigned &  NumNeutralParticles,
const unsigned &  CHM 
)
private

Definition at line 338 of file ObjMonitor.cc.

References HLT_2024v14_cff::NHF.

Referenced by analyze().

344  {
345  if (abseta <= 2.7) {
346  unsigned NumConst = CHM + NumNeutralParticles;
347 
348  return ((NumConst > 1 && NHF < 0.99 && NEMF < 0.99) &&
349  ((abseta <= 2.4 && CHF > 0 && CHM > 0 && CEMF < 0.99) || abseta > 2.4));
350  } else if (abseta <= 3) {
351  return (NumNeutralParticles > 2 && NEMF > 0.01 && NHF < 0.98);
352  } else {
353  return NumNeutralParticles > 10 && NEMF < 0.90;
354  }
355 }

◆ tightJetId()

bool ObjMonitor::tightJetId ( const double &  abseta,
const double &  NHF,
const double &  NEMF,
const double &  CHF,
const double &  CEMF,
const unsigned &  NumNeutralParticles,
const unsigned &  CHM 
)
private

Definition at line 356 of file ObjMonitor.cc.

References HLT_2024v14_cff::CHF, and HLT_2024v14_cff::NHF.

Referenced by analyze().

362  {
363  if (abseta <= 2.7) {
364  unsigned NumConst = CHM + NumNeutralParticles;
365  return (NumConst > 1 && NHF < 0.90 && NEMF < 0.90) &&
366  ((abseta <= 2.4 && CHF > 0 && CHM > 0 && CEMF < 0.99) || abseta > 2.4);
367  } else if (abseta <= 3) {
368  return (NHF < 0.98 && NEMF > 0.01 && NumNeutralParticles > 2);
369  } else {
370  return (NEMF < 0.90 && NumNeutralParticles > 10);
371  }
372 }

Member Data Documentation

◆ den_genTriggerEventFlag_

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

Definition at line 84 of file ObjMonitor.cc.

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

◆ do_hmg_

bool ObjMonitor::do_hmg_
private

Definition at line 80 of file ObjMonitor.cc.

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

◆ do_ht_

bool ObjMonitor::do_ht_
private

Definition at line 78 of file ObjMonitor.cc.

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

◆ do_jet_

bool ObjMonitor::do_jet_
private

Definition at line 76 of file ObjMonitor.cc.

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

◆ do_met_

bool ObjMonitor::do_met_
private

Definition at line 74 of file ObjMonitor.cc.

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

◆ eleSelection_

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

Definition at line 90 of file ObjMonitor.cc.

Referenced by analyze().

◆ eleToken_

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

Definition at line 67 of file ObjMonitor.cc.

Referenced by analyze().

◆ folderName_

const std::string ObjMonitor::folderName_
private

Definition at line 60 of file ObjMonitor.cc.

Referenced by bookHistograms().

◆ hltPathsAreValid_

bool ObjMonitor::hltPathsAreValid_
private

Definition at line 63 of file ObjMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ hmgDQM_

HMesonGammaDQM ObjMonitor::hmgDQM_
private

Definition at line 81 of file ObjMonitor.cc.

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

◆ htDQM_

HTDQM ObjMonitor::htDQM_
private

Definition at line 79 of file ObjMonitor.cc.

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

◆ htjetSelection_

StringCutObjectSelector<reco::PFJet, true> ObjMonitor::htjetSelection_
private

Definition at line 89 of file ObjMonitor.cc.

Referenced by analyze().

◆ jetDQM_

JetDQM ObjMonitor::jetDQM_
private

Definition at line 77 of file ObjMonitor.cc.

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

◆ jetId_

std::string ObjMonitor::jetId_
private

Definition at line 88 of file ObjMonitor.cc.

Referenced by analyze().

◆ jetSelection_

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

Definition at line 87 of file ObjMonitor.cc.

Referenced by analyze().

◆ jetToken_

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

Definition at line 66 of file ObjMonitor.cc.

Referenced by analyze().

◆ metDQM_

METDQM ObjMonitor::metDQM_
private

Definition at line 75 of file ObjMonitor.cc.

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

◆ metSelection_

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

Definition at line 86 of file ObjMonitor.cc.

Referenced by analyze().

◆ metToken_

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

Definition at line 65 of file ObjMonitor.cc.

Referenced by analyze().

◆ muoSelection_

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

Definition at line 91 of file ObjMonitor.cc.

Referenced by analyze().

◆ muoToken_

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

Definition at line 68 of file ObjMonitor.cc.

Referenced by analyze().

◆ nelectrons_

unsigned ObjMonitor::nelectrons_
private

Definition at line 96 of file ObjMonitor.cc.

Referenced by analyze().

◆ njets_

unsigned ObjMonitor::njets_
private

Definition at line 95 of file ObjMonitor.cc.

Referenced by analyze().

◆ nmesons_

unsigned ObjMonitor::nmesons_
private

Definition at line 99 of file ObjMonitor.cc.

Referenced by analyze().

◆ nmuons_

unsigned ObjMonitor::nmuons_
private

Definition at line 97 of file ObjMonitor.cc.

Referenced by analyze().

◆ nphotons_

unsigned ObjMonitor::nphotons_
private

Definition at line 98 of file ObjMonitor.cc.

Referenced by analyze().

◆ num_genTriggerEventFlag_

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

Definition at line 83 of file ObjMonitor.cc.

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

◆ phoSelection_

StringCutObjectSelector<reco::Photon, true> ObjMonitor::phoSelection_
private

Definition at line 92 of file ObjMonitor.cc.

Referenced by analyze().

◆ phoToken_

edm::EDGetTokenT<reco::PhotonCollection> ObjMonitor::phoToken_
private

Definition at line 69 of file ObjMonitor.cc.

Referenced by analyze().

◆ requireValidHLTPaths_

const bool ObjMonitor::requireValidHLTPaths_
private

Definition at line 62 of file ObjMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ trkSelection_

StringCutObjectSelector<reco::Track, true> ObjMonitor::trkSelection_
private

Definition at line 93 of file ObjMonitor.cc.

Referenced by analyze().

◆ trkToken_

edm::EDGetTokenT<reco::TrackCollection> ObjMonitor::trkToken_
private

Definition at line 70 of file ObjMonitor.cc.

Referenced by analyze().