CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
ObjMonitor Class Reference

#include <ObjMonitor.h>

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

Public Member Functions

 ObjMonitor (const edm::ParameterSet &)
 
 ~ObjMonitor () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &iSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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_
 
std::string folderName_
 
std::string histoSuffix_
 
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_
 
StringCutObjectSelector< reco::Track, true > trkSelection_
 
edm::EDGetTokenT< reco::TrackCollectiontrkToken_
 

Additional Inherited Members

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

Detailed Description

Definition at line 53 of file ObjMonitor.h.

Constructor & Destructor Documentation

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

Definition at line 19 of file ObjMonitor.cc.

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

20  : folderName_(iConfig.getParameter<std::string>("FolderName")),
21  metToken_(consumes<reco::PFMETCollection>(iConfig.getParameter<edm::InputTag>("met"))),
22  jetToken_(mayConsume<reco::PFJetCollection>(iConfig.getParameter<edm::InputTag>("jets"))),
23  eleToken_(mayConsume<reco::GsfElectronCollection>(iConfig.getParameter<edm::InputTag>("electrons"))),
24  muoToken_(mayConsume<reco::MuonCollection>(iConfig.getParameter<edm::InputTag>("muons"))),
25  phoToken_(mayConsume<reco::PhotonCollection>(iConfig.getParameter<edm::InputTag>("photons"))),
26  trkToken_(mayConsume<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"))),
27  do_met_(iConfig.getParameter<bool>("doMETHistos")),
28  do_jet_(iConfig.getParameter<bool>("doJetHistos")),
29  do_ht_(iConfig.getParameter<bool>("doHTHistos")),
30  do_hmg_(iConfig.getParameter<bool>("doHMesonGammaHistos")),
31  num_genTriggerEventFlag_(std::make_unique<GenericTriggerEventFlag>(
32  iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
33  den_genTriggerEventFlag_(std::make_unique<GenericTriggerEventFlag>(
34  iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)),
35  metSelection_(iConfig.getParameter<std::string>("metSelection")),
36  jetSelection_(iConfig.getParameter<std::string>("jetSelection")),
37  jetId_(iConfig.getParameter<std::string>("jetId")),
38  htjetSelection_(iConfig.getParameter<std::string>("htjetSelection")),
39  eleSelection_(iConfig.getParameter<std::string>("eleSelection")),
40  muoSelection_(iConfig.getParameter<std::string>("muoSelection")),
41  phoSelection_(iConfig.getParameter<std::string>("phoSelection")),
42  trkSelection_(iConfig.getParameter<std::string>("trkSelection")),
43  njets_(iConfig.getParameter<int>("njets")),
44  nelectrons_(iConfig.getParameter<int>("nelectrons")),
45  nmuons_(iConfig.getParameter<int>("nmuons")),
46  nphotons_(iConfig.getParameter<int>("nphotons")),
47  nmesons_(iConfig.getParameter<int>("nmesons")) {
48  if (do_met_) {
49  metDQM_.initialise(iConfig);
50  }
51  if (do_jet_) {
52  jetDQM_.initialise(iConfig);
53  }
54  if (do_ht_) {
55  htDQM_.initialise(iConfig);
56  }
57  if (do_hmg_) {
58  hmgDQM_.initialise(iConfig);
59  }
60 }
edm::EDGetTokenT< reco::TrackCollection > trkToken_
Definition: ObjMonitor.h:89
T getParameter(std::string const &) const
unsigned nelectrons_
Definition: ObjMonitor.h:115
void initialise(const edm::ParameterSet &iConfig)
Definition: JetDQM.cc:8
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: ObjMonitor.h:109
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: ObjMonitor.h:105
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Definition: ObjMonitor.h:86
void initialise(const edm::ParameterSet &iConfig)
Definition: HTDQM.cc:7
unsigned nmuons_
Definition: ObjMonitor.h:116
unsigned nphotons_
Definition: ObjMonitor.h:117
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: ObjMonitor.h:106
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: ObjMonitor.h:110
void initialise(const edm::ParameterSet &iConfig)
std::string jetId_
Definition: ObjMonitor.h:107
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: ObjMonitor.h:102
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: ObjMonitor.h:84
void initialise(const edm::ParameterSet &iConfig)
Definition: METDQM.cc:7
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: ObjMonitor.h:103
std::string folderName_
Definition: ObjMonitor.h:81
bool do_met_
Definition: ObjMonitor.h:93
bool do_jet_
Definition: ObjMonitor.h:95
edm::EDGetTokenT< reco::PhotonCollection > phoToken_
Definition: ObjMonitor.h:88
bool do_ht_
Definition: ObjMonitor.h:97
JetDQM jetDQM_
Definition: ObjMonitor.h:96
unsigned nmesons_
Definition: ObjMonitor.h:118
HMesonGammaDQM hmgDQM_
Definition: ObjMonitor.h:100
bool do_hmg_
Definition: ObjMonitor.h:99
StringCutObjectSelector< reco::PFJet, true > htjetSelection_
Definition: ObjMonitor.h:108
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: ObjMonitor.h:85
StringCutObjectSelector< reco::Photon, true > phoSelection_
Definition: ObjMonitor.h:111
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: ObjMonitor.h:87
unsigned njets_
Definition: ObjMonitor.h:114
METDQM metDQM_
Definition: ObjMonitor.h:94
StringCutObjectSelector< reco::Track, true > trkSelection_
Definition: ObjMonitor.h:112
HTDQM htDQM_
Definition: ObjMonitor.h:98
ObjMonitor::~ObjMonitor ( )
overridedefault

Referenced by ObjMonitor().

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 84 of file ObjMonitor.cc.

References funct::abs(), objects.autophobj::absIso, reco::TrackBase::charge(), HLT_2018_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(), edm::Event::getByToken(), hmgDQM_, htDQM_, htjetSelection_, mps_fire::i, edm::EventBase::id(), dqmiolumiharvest::j, jetDQM_, jetId_, singleTopDQM_cfi::jets, jetSelection_, jetToken_, dqmdumpme::k, looseJetId(), eostools::ls(), edm::EventID::luminosityBlock(), visualization-live-secondInstance_cfg::m, BTaggingMonitor_cfi::met, metDQM_, metSelection_, metToken_, PDWG_BPHSkim_cff::muons, muoSelection_, muoToken_, nelectrons_, HLT_2018_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(), RandomServiceHelper::t1, RandomServiceHelper::t2, tightJetId(), trkSelection_, and trkToken_.

84  {
85  // Filter out events if Trigger Filtering is requested
86  if (den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup))
87  return;
88 
90  iEvent.getByToken(metToken_, metHandle);
91  reco::PFMET pfmet = metHandle->front();
92  if (!metSelection_(pfmet))
93  return;
94 
95  float met = pfmet.pt();
96  float phi = pfmet.phi();
97 
99  iEvent.getByToken(jetToken_, jetHandle);
100  std::vector<reco::PFJet> jets;
101  std::vector<reco::PFJet> htjets;
102  if (jetHandle->size() < njets_)
103  return;
104  for (auto const& j : *jetHandle) {
105  if (jetSelection_(j)) {
106  if (jetId_ == "loose" || jetId_ == "tight") {
107  double abseta = abs(j.eta());
108  double NHF = j.neutralHadronEnergyFraction();
109  double NEMF = j.neutralEmEnergyFraction();
110  double CHF = j.chargedHadronEnergyFraction();
111  double CEMF = j.chargedEmEnergyFraction();
112  unsigned NumNeutralParticles = j.neutralMultiplicity();
113  unsigned CHM = j.chargedMultiplicity();
114  bool passId = (jetId_ == "loose" && looseJetId(abseta, NHF, NEMF, CHF, CEMF, NumNeutralParticles, CHM)) ||
115  (jetId_ == "tight" && tightJetId(abseta, NHF, NEMF, CHF, CEMF, NumNeutralParticles, CHM));
116  if (passId)
117  jets.push_back(j);
118  } else
119  jets.push_back(j);
120  }
121  if (htjetSelection_(j))
122  htjets.push_back(j);
123  }
124  if (jets.size() < njets_)
125  return;
126 
128  iEvent.getByToken(eleToken_, eleHandle);
129  std::vector<reco::GsfElectron> electrons;
130  if (eleHandle->size() < nelectrons_)
131  return;
132  for (auto const& e : *eleHandle) {
133  if (eleSelection_(e))
134  electrons.push_back(e);
135  }
136  if (electrons.size() < nelectrons_)
137  return;
138 
140  iEvent.getByToken(muoToken_, muoHandle);
141  if (muoHandle->size() < nmuons_)
142  return;
143  std::vector<reco::Muon> muons;
144  for (auto const& m : *muoHandle) {
145  if (muoSelection_(m))
146  muons.push_back(m);
147  }
148  if (muons.size() < nmuons_)
149  return;
150 
152  iEvent.getByToken(phoToken_, phoHandle);
153  if (phoHandle->size() < nphotons_)
154  return;
155  std::vector<reco::Photon> photons;
156  for (auto const& m : *phoHandle) {
157  if (phoSelection_(m))
158  photons.push_back(m);
159  }
160  if (photons.size() < nphotons_)
161  return;
162 
163  std::vector<TLorentzVector> passedMesons;
164  if (do_hmg_) {
166  iEvent.getByToken(trkToken_, trkHandle);
167  // find isolated mesons (phi or rho)
168  TLorentzVector t1, t2;
169  float hadronMassHyp[2] = {0.1396, 0.4937}; // pi or K mass
170  float loMassLim[2] = {0.5, 0.9}; // rho or phi mass
171  float hiMassLim[2] = {1.0, 1.11}; // rho or phi mass
172 
173  for (size_t i = 0; i < trkHandle->size(); ++i) {
174  const reco::Track trk1 = trkHandle->at(i);
175  if (!trkSelection_(trk1))
176  continue;
177  for (size_t j = i + 1; j < trkHandle->size(); ++j) {
178  const reco::Track trk2 = trkHandle->at(j);
179  if (!trkSelection_(trk2))
180  continue;
181  if (trk1.charge() * trk2.charge() != -1)
182  continue;
183 
184  for (unsigned hyp = 0; hyp < 2; ++hyp) {
185  t1.SetPtEtaPhiM(trk1.pt(), trk1.eta(), trk1.phi(), hadronMassHyp[hyp]);
186  t2.SetPtEtaPhiM(trk2.pt(), trk2.eta(), trk2.phi(), hadronMassHyp[hyp]);
187  TLorentzVector mesCand = t1 + t2;
188 
189  // cuts
190  if (mesCand.M() < loMassLim[hyp] || mesCand.M() > hiMassLim[hyp])
191  continue; //mass
192  if (mesCand.Pt() < 35. || fabs(mesCand.Rapidity()) > 2.1)
193  continue; //pT eta
194 
195  // isolation
196  float absIso = 0.;
197  for (size_t k = 0; k < trkHandle->size(); ++k) {
198  if (k == i || k == j)
199  continue;
200  const reco::Track trkN = trkHandle->at(k);
201  if (trkN.charge() == 0 || trkN.pt() < 0.5 || (trkN.dz() > 0.1) ||
202  deltaR(trkN.eta(), trkN.phi(), mesCand.Eta(), mesCand.Phi()) > 0.5)
203  continue;
204  absIso += trkN.pt();
205  }
206  if (absIso / mesCand.Pt() > 0.2)
207  continue;
208  passedMesons.push_back(mesCand);
209  }
210  }
211  }
212  if (passedMesons.size() < nmesons_)
213  return;
214  }
215 
216  bool passNumCond = num_genTriggerEventFlag_->off() || num_genTriggerEventFlag_->accept(iEvent, iSetup);
217  int ls = iEvent.id().luminosityBlock();
218 
219  if (do_met_)
220  metDQM_.fillHistograms(met, phi, ls, passNumCond);
221  if (do_jet_)
222  jetDQM_.fillHistograms(jets, pfmet, ls, passNumCond);
223  if (do_ht_)
224  htDQM_.fillHistograms(htjets, met, ls, passNumCond);
225  if (do_hmg_)
226  hmgDQM_.fillHistograms(photons, passedMesons, ls, passNumCond);
227 }
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.h:89
unsigned nelectrons_
Definition: ObjMonitor.h:115
void fillHistograms(const std::vector< reco::PFJet > &jets, const reco::PFMET &pfmet, const int &ls, const bool passCond)
Definition: JetDQM.cc:131
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:229
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: ObjMonitor.h:109
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: ObjMonitor.h:105
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Definition: ObjMonitor.h:86
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:614
double pt() const final
transverse momentum
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:247
unsigned nmuons_
Definition: ObjMonitor.h:116
unsigned nphotons_
Definition: ObjMonitor.h:117
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: ObjMonitor.h:106
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: ObjMonitor.h:110
int iEvent
Definition: GenABIO.cc:224
std::string jetId_
Definition: ObjMonitor.h:107
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: ObjMonitor.h:102
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:617
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: ObjMonitor.h:84
double pt() const
track transverse momentum
Definition: TrackBase.h:602
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: ObjMonitor.h:103
bool do_met_
Definition: ObjMonitor.h:93
bool do_jet_
Definition: ObjMonitor.h:95
edm::EDGetTokenT< reco::PhotonCollection > phoToken_
Definition: ObjMonitor.h:88
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:596
def ls(path, rec=False)
Definition: eostools.py:349
bool do_ht_
Definition: ObjMonitor.h:97
JetDQM jetDQM_
Definition: ObjMonitor.h:96
unsigned nmesons_
Definition: ObjMonitor.h:118
HMesonGammaDQM hmgDQM_
Definition: ObjMonitor.h:100
bool do_hmg_
Definition: ObjMonitor.h:99
StringCutObjectSelector< reco::PFJet, true > htjetSelection_
Definition: ObjMonitor.h:108
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: ObjMonitor.h:85
StringCutObjectSelector< reco::Photon, true > phoSelection_
Definition: ObjMonitor.h:111
void fillHistograms(const reco::PhotonCollection &photons, std::vector< TLorentzVector > mesons, const int &ls, const bool passCond)
void fillHistograms(const std::vector< reco::PFJet > &htjets, const double &met, const int &ls, const bool passCond)
Definition: HTDQM.cc:45
int charge() const
track electric charge
Definition: TrackBase.h:575
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: ObjMonitor.h:87
unsigned njets_
Definition: ObjMonitor.h:114
double phi() const final
momentum azimuthal angle
METDQM metDQM_
Definition: ObjMonitor.h:94
StringCutObjectSelector< reco::Track, true > trkSelection_
Definition: ObjMonitor.h:112
HTDQM htDQM_
Definition: ObjMonitor.h:98
void ObjMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 64 of file ObjMonitor.cc.

References METDQM::bookHistograms(), HTDQM::bookHistograms(), JetDQM::bookHistograms(), HMesonGammaDQM::bookHistograms(), den_genTriggerEventFlag_, do_hmg_, do_ht_, do_jet_, do_met_, folderName_, hmgDQM_, htDQM_, jetDQM_, metDQM_, num_genTriggerEventFlag_, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

64  {
65  std::string currentFolder = folderName_;
66  ibooker.setCurrentFolder(currentFolder);
67 
68  if (do_met_)
69  metDQM_.bookHistograms(ibooker);
70  if (do_jet_)
71  jetDQM_.bookHistograms(ibooker);
72  if (do_ht_)
73  htDQM_.bookHistograms(ibooker);
74  if (do_hmg_)
75  hmgDQM_.bookHistograms(ibooker);
76 
77  // Initialize the GenericTriggerEventFlag
79  num_genTriggerEventFlag_->initRun(iRun, iSetup);
81  den_genTriggerEventFlag_->initRun(iRun, iSetup);
82 }
void bookHistograms(DQMStore::IBooker &)
Definition: METDQM.cc:18
void bookHistograms(DQMStore::IBooker &)
Definition: HTDQM.cc:18
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: ObjMonitor.h:102
void bookHistograms(DQMStore::IBooker &)
Definition: JetDQM.cc:30
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: ObjMonitor.h:103
std::string folderName_
Definition: ObjMonitor.h:81
bool do_met_
Definition: ObjMonitor.h:93
bool do_jet_
Definition: ObjMonitor.h:95
void bookHistograms(DQMStore::IBooker &)
bool do_ht_
Definition: ObjMonitor.h:97
JetDQM jetDQM_
Definition: ObjMonitor.h:96
HMesonGammaDQM hmgDQM_
Definition: ObjMonitor.h:100
bool do_hmg_
Definition: ObjMonitor.h:99
METDQM metDQM_
Definition: ObjMonitor.h:94
HTDQM htDQM_
Definition: ObjMonitor.h:98
void ObjMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 265 of file ObjMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, HMesonGammaDQM::fillHmgDescription(), HTDQM::fillHtDescription(), JetDQM::fillJetDescription(), METDQM::fillMetDescription(), SiStripSourceConfigTier0_cff::genericTriggerEventPSet, LumiMonitor_cff::histoPSet, HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

265  {
267  desc.add<std::string>("FolderName", "HLT/OBJ");
268 
269  desc.add<edm::InputTag>("met", edm::InputTag("pfMet"));
270  desc.add<edm::InputTag>("jets", edm::InputTag("ak4PFJetsCHS"));
271  desc.add<edm::InputTag>("electrons", edm::InputTag("gedGsfElectrons"));
272  desc.add<edm::InputTag>("muons", edm::InputTag("muons"));
273  desc.add<edm::InputTag>("photons", edm::InputTag("gedPhotons"));
274  desc.add<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
275  desc.add<std::string>("metSelection", "pt > 0");
276  desc.add<std::string>("jetSelection", "pt > 0");
277  desc.add<std::string>("jetId", "");
278  desc.add<std::string>("htjetSelection", "pt > 30");
279  desc.add<std::string>("eleSelection", "pt > 0");
280  desc.add<std::string>("muoSelection", "pt > 0");
281  desc.add<std::string>("phoSelection", "pt > 0");
282  desc.add<std::string>("trkSelection", "pt > 0");
283  desc.add<int>("njets", 0);
284  desc.add<int>("nelectrons", 0);
285  desc.add<int>("nmuons", 0);
286  desc.add<int>("nphotons", 0);
287  desc.add<int>("nmesons", 0);
288 
290  genericTriggerEventPSet.add<bool>("andOr");
291  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi"));
292  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions", {});
293  genericTriggerEventPSet.add<bool>("andOrDcs", false);
294  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
295  genericTriggerEventPSet.add<std::string>("dbLabel", "");
296  genericTriggerEventPSet.add<bool>("andOrHlt", true);
297  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT"));
298  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths", {});
299  genericTriggerEventPSet.add<std::string>("hltDBKey", "");
300  genericTriggerEventPSet.add<bool>("errorReplyHlt", false);
301  genericTriggerEventPSet.add<unsigned int>("verbosityLevel", 1);
302 
303  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
304  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
305 
306  desc.add<bool>("doMETHistos", true);
308  METDQM::fillMetDescription(histoPSet);
309  desc.add<bool>("doJetHistos", true);
310  JetDQM::fillJetDescription(histoPSet);
311  desc.add<bool>("doHTHistos", true);
312  HTDQM::fillHtDescription(histoPSet);
313  desc.add<bool>("doHMesonGammaHistos", true);
315 
316  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
317 
318  descriptions.add("objMonitoring", desc);
319 }
static void fillJetDescription(edm::ParameterSetDescription &histoPSet)
Definition: JetDQM.cc:221
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
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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 229 of file ObjMonitor.cc.

Referenced by analyze().

235  {
236  if (abseta <= 2.7) {
237  unsigned NumConst = CHM + NumNeutralParticles;
238 
239  return ((NumConst > 1 && NHF < 0.99 && NEMF < 0.99) &&
240  ((abseta <= 2.4 && CHF > 0 && CHM > 0 && CEMF < 0.99) || abseta > 2.4));
241  } else if (abseta <= 3) {
242  return (NumNeutralParticles > 2 && NEMF > 0.01 && NHF < 0.98);
243  } else {
244  return NumNeutralParticles > 10 && NEMF < 0.90;
245  }
246 }
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 247 of file ObjMonitor.cc.

Referenced by analyze().

253  {
254  if (abseta <= 2.7) {
255  unsigned NumConst = CHM + NumNeutralParticles;
256  return (NumConst > 1 && NHF < 0.90 && NEMF < 0.90) &&
257  ((abseta <= 2.4 && CHF > 0 && CHM > 0 && CEMF < 0.99) || abseta > 2.4);
258  } else if (abseta <= 3) {
259  return (NHF < 0.98 && NEMF > 0.01 && NumNeutralParticles > 2);
260  } else {
261  return (NEMF < 0.90 && NumNeutralParticles > 10);
262  }
263 }

Member Data Documentation

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

Definition at line 103 of file ObjMonitor.h.

Referenced by analyze(), and bookHistograms().

bool ObjMonitor::do_hmg_
private

Definition at line 99 of file ObjMonitor.h.

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

bool ObjMonitor::do_ht_
private

Definition at line 97 of file ObjMonitor.h.

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

bool ObjMonitor::do_jet_
private

Definition at line 95 of file ObjMonitor.h.

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

bool ObjMonitor::do_met_
private

Definition at line 93 of file ObjMonitor.h.

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

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

Definition at line 109 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 86 of file ObjMonitor.h.

Referenced by analyze().

std::string ObjMonitor::folderName_
private

Definition at line 81 of file ObjMonitor.h.

Referenced by bookHistograms().

std::string ObjMonitor::histoSuffix_
private

Definition at line 82 of file ObjMonitor.h.

HMesonGammaDQM ObjMonitor::hmgDQM_
private

Definition at line 100 of file ObjMonitor.h.

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

HTDQM ObjMonitor::htDQM_
private

Definition at line 98 of file ObjMonitor.h.

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

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

Definition at line 108 of file ObjMonitor.h.

Referenced by analyze().

JetDQM ObjMonitor::jetDQM_
private

Definition at line 96 of file ObjMonitor.h.

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

std::string ObjMonitor::jetId_
private

Definition at line 107 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 106 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 85 of file ObjMonitor.h.

Referenced by analyze().

METDQM ObjMonitor::metDQM_
private

Definition at line 94 of file ObjMonitor.h.

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

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

Definition at line 105 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 84 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 110 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 87 of file ObjMonitor.h.

Referenced by analyze().

unsigned ObjMonitor::nelectrons_
private

Definition at line 115 of file ObjMonitor.h.

Referenced by analyze().

unsigned ObjMonitor::njets_
private

Definition at line 114 of file ObjMonitor.h.

Referenced by analyze().

unsigned ObjMonitor::nmesons_
private

Definition at line 118 of file ObjMonitor.h.

Referenced by analyze().

unsigned ObjMonitor::nmuons_
private

Definition at line 116 of file ObjMonitor.h.

Referenced by analyze().

unsigned ObjMonitor::nphotons_
private

Definition at line 117 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 102 of file ObjMonitor.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 111 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 88 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 112 of file ObjMonitor.h.

Referenced by analyze().

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

Definition at line 89 of file ObjMonitor.h.

Referenced by analyze().