CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HigPhotonJetHLTOfflineSource Class Reference
Inheritance diagram for HigPhotonJetHLTOfflineSource:
DQMOneEDAnalyzer<> edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HigPhotonJetHLTOfflineSource (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMOneEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
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::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
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
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void dqmEndRun (const edm::Run &, const edm::EventSetup &) override
 
bool isMonitoredTriggerAccepted (const edm::TriggerNames &, const edm::Handle< edm::TriggerResults > &)
 

Private Attributes

MonitorElementdeletajj_
 
MonitorElementdeletajj_reco_
 
MonitorElementdelphijetmet_
 
MonitorElementdelphijetmet_reco_
 
MonitorElementdelphiphomet_
 
MonitorElementdelphiphomet_reco_
 
std::string dirname_
 
double evtsrun_
 
std::vector< std::string > hltPathsToCheck_
 
std::string hltProcessName_
 
MonitorElementinvmassjj_
 
MonitorElementinvmassjj_reco_
 
MonitorElementnpfjets_
 
MonitorElementnpfjets_reco_
 
MonitorElementnphotons_
 
MonitorElementnphotons_reco_
 
MonitorElementnvertices_
 
MonitorElementnvertices_reco_
 
bool perLSsaving_
 
double pfjetMinPt_
 
edm::EDGetTokenT< reco::PFJetCollectionpfJetsToken_
 
MonitorElementpfmet_
 
MonitorElementpfmet_reco_
 
MonitorElementpfmetphi_
 
MonitorElementpfmetphi_reco_
 
edm::EDGetTokenT< reco::PFMETCollectionpfMetToken_
 
double photonMinPt_
 
MonitorElementphotonpt_
 
MonitorElementphotonpt_reco_
 
MonitorElementphotonrapidity_
 
MonitorElementphotonrapidity_reco_
 
edm::EDGetTokenT< reco::PhotonCollectionphotonsToken_
 
edm::ParameterSet pset_
 
edm::EDGetTokenT< reco::VertexCollectionpvToken_
 
bool triggerAccept_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResultsToken_
 
MonitorElementtriggers_
 
MonitorElementtriggers_reco_
 
MonitorElementtrigvsnvtx_
 
MonitorElementtrigvsnvtx_reco_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer<>
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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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
 
- 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 inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 
- Protected Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 45 of file HigPhotonJetHLTOfflineSource.cc.

Constructor & Destructor Documentation

◆ HigPhotonJetHLTOfflineSource()

HigPhotonJetHLTOfflineSource::HigPhotonJetHLTOfflineSource ( const edm::ParameterSet pset)
explicit

Definition at line 109 of file HigPhotonJetHLTOfflineSource.cc.

References dirname_, hltPathsToCheck_, hltProcessName_, perLSsaving_, pfjetMinPt_, pfJetsToken_, pfMetToken_, photonMinPt_, photonsToken_, muonDTDigis_cfi::pset, pvToken_, AlCaHLTBitMon_QueryRunRegistry::string, triggerAccept_, triggerResultsToken_, and verbose_.

109  : pset_(pset) {
110  hltProcessName_ = pset.getParameter<std::string>("hltProcessName");
111  hltPathsToCheck_ = pset.getParameter<std::vector<std::string>>("hltPathsToCheck");
112  verbose_ = pset.getUntrackedParameter<bool>("verbose", false);
113  perLSsaving_ = pset.getUntrackedParameter<bool>("perLSsaving", false);
114  triggerAccept_ = pset.getUntrackedParameter<bool>("triggerAccept", true);
115  triggerResultsToken_ = consumes<edm::TriggerResults>(pset.getParameter<edm::InputTag>("triggerResultsToken"));
116  dirname_ = pset.getUntrackedParameter<std::string>("dirname", std::string("HLT/Higgs/PhotonJet/"));
117  pvToken_ = consumes<reco::VertexCollection>(pset.getParameter<edm::InputTag>("pvToken"));
118  photonsToken_ = consumes<reco::PhotonCollection>(pset.getParameter<edm::InputTag>("photonsToken"));
119  pfMetToken_ = consumes<reco::PFMETCollection>(pset.getParameter<edm::InputTag>("pfMetToken"));
120  pfJetsToken_ = consumes<reco::PFJetCollection>(pset.getParameter<edm::InputTag>("pfJetsToken"));
121  pfjetMinPt_ = pset.getUntrackedParameter<double>("pfjetMinPt", 0.0);
122  photonMinPt_ = pset.getUntrackedParameter<double>("photonMinPt", 0.0);
123 }
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
edm::EDGetTokenT< reco::VertexCollection > pvToken_
edm::EDGetTokenT< reco::PhotonCollection > photonsToken_
std::vector< std::string > hltPathsToCheck_

Member Function Documentation

◆ analyze()

void HigPhotonJetHLTOfflineSource::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 186 of file HigPhotonJetHLTOfflineSource.cc.

References gather_cfg::cout, deletajj_, deletajj_reco_, delphijetmet_, delphijetmet_reco_, delphiphomet_, delphiphomet_reco_, SiPixelRawToDigiRegional_cfi::deltaPhi, reco::LeafCandidate::et(), evtsrun_, dqm::impl::MonitorElement::Fill(), hltPathsToCheck_, mps_fire::i, iEvent, invmassjj_, invmassjj_reco_, isMonitoredTriggerAccepted(), edm::HandleBase::isValid(), njet, npfjets_, npfjets_reco_, HMesonGammaMonitor_cff::nphotons, nphotons_, nphotons_reco_, nvertices_, nvertices_reco_, pfjetMinPt_, pfJetsToken_, pfmet_, pfmet_reco_, pfmetphi_, pfmetphi_reco_, pfMetToken_, reco::LeafCandidate::phi(), photonMinPt_, photonpt_, photonpt_reco_, photonrapidity_, photonrapidity_reco_, BPHMonitor_cfi::photons, photonsToken_, pvToken_, dqm::impl::MonitorElement::setBinLabel(), AlCaHLTBitMon_QueryRunRegistry::string, L1TEGammaOffline_cfi::triggerNames, triggerResults, triggerResultsToken_, triggers_, triggers_reco_, trigvsnvtx_, trigvsnvtx_reco_, verbose_, and AlignmentTracksFromVertexSelector_cfi::vertices.

186  {
187  // Count total number of events in one run
188  evtsrun_++;
189 
192  if (!triggerResults.isValid()) {
193  edm::LogError("HigPhotonJetHLT") << "Missing triggerResults collection" << std::endl;
194  return;
195  }
196 
197  // Check whether contains monitored trigger and accepted
198  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
200 
201  // if (!triggered) return;
202 
203  // Test scale
204  // if (evtsrun_ > 10) return;
205 
206  // N Vertices
208  iEvent.getByToken(pvToken_, vertices);
209  if (!vertices.isValid())
210  return;
211  if (verbose_)
212  std::cout << "xshi:: N vertices : " << vertices->size() << std::endl;
213 
214  // Set trigger name labels
215  for (size_t i = 0; i < hltPathsToCheck_.size(); i++) {
217  }
218 
219  // Fill trigger info
220  for (unsigned int itrig = 0; itrig < triggerResults->size(); itrig++) {
221  const std::string& triggername = triggerNames.triggerName(itrig);
222  for (size_t i = 0; i < hltPathsToCheck_.size(); i++) {
223  if (triggername.find(hltPathsToCheck_[i]) != std::string::npos) {
225  trigvsnvtx_reco_->Fill(vertices->size(), i);
226  if (triggered)
227  triggers_->Fill(i);
228  if (triggered)
229  trigvsnvtx_->Fill(vertices->size(), i);
230  }
231  }
232  }
233 
234  nvertices_reco_->Fill(vertices->size());
235  if (triggered)
236  nvertices_->Fill(vertices->size());
237 
238  // PF MET
240  iEvent.getByToken(pfMetToken_, pfmets);
241  if (!pfmets.isValid())
242  return;
243  const reco::PFMET pfmet = pfmets->front();
244  pfmet_reco_->Fill(pfmet.et());
245  if (triggered)
246  pfmet_->Fill(pfmet.et());
247  if (verbose_)
248  std::cout << "xshi:: number of pfmets: " << pfmets->size() << std::endl;
249 
250  pfmetphi_reco_->Fill(pfmet.phi());
251  if (triggered)
252  pfmetphi_->Fill(pfmet.phi());
253 
254  // Photons
256  iEvent.getByToken(photonsToken_, photons);
257  if (!photons.isValid())
258  return;
259  int nphotons = 0;
260  for (auto const& phoIter : *photons) {
261  if (phoIter.pt() < photonMinPt_)
262  continue;
263  nphotons++;
264  photonpt_reco_->Fill(phoIter.pt());
265  photonrapidity_reco_->Fill(phoIter.rapidity());
266  if (triggered)
267  photonpt_->Fill(phoIter.pt());
268  if (triggered)
269  photonrapidity_->Fill(phoIter.rapidity());
270  double tmp_delphiphomet = fabs(deltaPhi(phoIter.phi(), pfmet.phi()));
271  delphiphomet_reco_->Fill(tmp_delphiphomet);
272  if (triggered)
273  delphiphomet_->Fill(tmp_delphiphomet);
274  }
276  if (triggered)
278 
279  // PF Jet
281  iEvent.getByToken(pfJetsToken_, pfjets);
282  if (!pfjets.isValid())
283  return;
284  if (verbose_)
285  std::cout << "xshi:: N pfjets : " << pfjets->size() << std::endl;
286 
287  double min_delphijetmet = 6.0;
288  TLorentzVector p4jet1, p4jet2, p4jj;
289  // Two leading jets eta
290  double etajet1(0), etajet2(0);
291  int njet = 0;
292  for (auto const& jetIter : *pfjets) {
293  if (jetIter.pt() < pfjetMinPt_)
294  continue;
295  njet++;
296 
297  double tmp_delphijetmet = fabs(deltaPhi(jetIter.phi(), pfmet.phi()));
298  if (tmp_delphijetmet < min_delphijetmet)
299  min_delphijetmet = tmp_delphijetmet;
300 
301  if (njet == 1) {
302  p4jet1.SetXYZM(jetIter.px(), jetIter.py(), jetIter.pz(), jetIter.mass());
303  etajet1 = jetIter.eta();
304  }
305  if (njet == 2) {
306  p4jet2.SetXYZM(jetIter.px(), jetIter.py(), jetIter.pz(), jetIter.mass());
307  etajet2 = jetIter.eta();
308  }
309  }
311  if (triggered)
312  npfjets_->Fill(njet);
313 
314  delphijetmet_reco_->Fill(min_delphijetmet);
315  if (triggered)
316  delphijetmet_->Fill(min_delphijetmet);
317  p4jj = p4jet1 + p4jet2;
318  double deletajj = etajet1 - etajet2;
319  if (verbose_)
320  std::cout << "xshi:: invmass jj " << p4jj.M() << std::endl;
321 
322  invmassjj_reco_->Fill(p4jj.M());
323  deletajj_reco_->Fill(deletajj);
324  if (triggered)
325  invmassjj_->Fill(p4jj.M());
326  if (triggered)
327  deletajj_->Fill(deletajj);
328 }
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
edm::EDGetTokenT< reco::VertexCollection > pvToken_
Log< level::Error, false > LogError
int njet
Definition: HydjetWrapper.h:91
void Fill(long long x)
edm::EDGetTokenT< reco::PhotonCollection > photonsToken_
int iEvent
Definition: GenABIO.cc:224
static std::string const triggerResults
Definition: EdmProvDump.cc:47
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
bool isMonitoredTriggerAccepted(const edm::TriggerNames &, const edm::Handle< edm::TriggerResults > &)
bool isValid() const
Definition: HandleBase.h:70
double et() const final
transverse energy
std::vector< std::string > hltPathsToCheck_
double phi() const final
momentum azimuthal angle

◆ bookHistograms()

void HigPhotonJetHLTOfflineSource::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements DQMOneEDAnalyzer<>.

Definition at line 137 of file HigPhotonJetHLTOfflineSource.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), deletajj_, deletajj_reco_, delphijetmet_, delphijetmet_reco_, delphiphomet_, delphiphomet_reco_, dirname_, hltPathsToCheck_, invmassjj_, invmassjj_reco_, npfjets_, npfjets_reco_, nphotons_, nphotons_reco_, nvertices_, nvertices_reco_, pfmet_, pfmet_reco_, pfmetphi_, pfmetphi_reco_, photonpt_, photonpt_reco_, photonrapidity_, photonrapidity_reco_, dqm::implementation::NavigatorBase::setCurrentFolder(), triggers_, triggers_reco_, trigvsnvtx_, and trigvsnvtx_reco_.

139  {
140  iBooker.setCurrentFolder(dirname_);
141  nvertices_reco_ = iBooker.book1D("nvertices_reco", "Reco: Number of vertices", 100, 0, 100);
142  nvertices_ = iBooker.book1D("nvertices", "Number of vertices", 100, 0, 100);
143  nphotons_reco_ = iBooker.book1D("nphotons_reco", "Reco: Number of photons", 100, 0, 10);
144  nphotons_ = iBooker.book1D("nphotons", "Number of photons", 100, 0, 10);
145  photonpt_reco_ = iBooker.book1D("photonpt_reco", "Reco: Photons pT", 100, 0, 500);
146  photonpt_ = iBooker.book1D("photonpt", "Photons pT", 100, 0, 500);
147  photonrapidity_reco_ = iBooker.book1D("photonrapidity_reco", "Reco: Photons rapidity;y_{#gamma}", 100, -2.5, 2.5);
148  photonrapidity_ = iBooker.book1D("photonrapidity", "Photons rapidity;y_{#gamma}", 100, -2.5, 2.5);
149  pfmet_reco_ = iBooker.book1D("pfmet_reco", "Reco: PF MET", 100, 0, 250);
150  pfmet_ = iBooker.book1D("pfmet", "PF MET", 100, 0, 250);
151  pfmetphi_reco_ = iBooker.book1D("pfmetphi_reco", "Reco: PF MET phi;#phi_{PFMET}", 100, -4, 4);
152  pfmetphi_ = iBooker.book1D("pfmetphi", "PF MET phi;#phi_{PFMET}", 100, -4, 4);
154  iBooker.book1D("delphiphomet_reco", "Reco: #Delta#phi(photon, MET);#Delta#phi(#gamma,MET)", 100, 0, 4);
155  delphiphomet_ = iBooker.book1D("delphiphomet", "#Delta#phi(photon, MET);#Delta#phi(#gamma,MET)", 100, 0, 4);
156  npfjets_reco_ = iBooker.book1D("npfjets_reco", "Reco: Number of PF Jets", 100, 0, 20);
157  npfjets_ = iBooker.book1D("npfjets", "Number of PF Jets", 100, 0, 20);
159  iBooker.book1D("delphijetmet_reco", "Reco: #Delta#phi(PFJet, MET);#Delta#phi(Jet,MET)", 100, 0, 4);
160  delphijetmet_ = iBooker.book1D("delphijetmet", "#Delta#phi(PFJet, MET);#Delta#phi(Jet,MET)", 100, 0, 4);
161  invmassjj_reco_ = iBooker.book1D("invmassjj_reco", "Reco: Inv mass two leading jets;M_{jj}[GeV]", 100, 0, 2000);
162  invmassjj_ = iBooker.book1D("invmassjj", "Inv mass two leading jets;M_{jj}[GeV]", 100, 0, 2000);
163  deletajj_reco_ = iBooker.book1D("deletajj_reco", "Reco: #Delta#eta(jj);|#Delta#eta_{jj}|", 100, 0, 6);
164  deletajj_ = iBooker.book1D("deletajj", "#Delta#eta(jj);|#Delta#eta_{jj}|", 100, 0, 6);
166  iBooker.book1D("triggers_reco", "Reco: Triggers", hltPathsToCheck_.size(), 0, hltPathsToCheck_.size());
167  triggers_ = iBooker.book1D("triggers", "Triggers", hltPathsToCheck_.size(), 0, hltPathsToCheck_.size());
168  trigvsnvtx_reco_ = iBooker.book2D("trigvsnvtx_reco",
169  "Reco: Trigger vs. # vertices;N_{vertices};Trigger",
170  100,
171  0,
172  100,
173  hltPathsToCheck_.size(),
174  0,
175  hltPathsToCheck_.size());
176  trigvsnvtx_ = iBooker.book2D("trigvsnvtx",
177  "Trigger vs. # vertices;N_{vertices};Trigger",
178  100,
179  0,
180  100,
181  hltPathsToCheck_.size(),
182  0,
183  hltPathsToCheck_.size());
184 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:221
std::vector< std::string > hltPathsToCheck_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ dqmBeginRun()

void HigPhotonJetHLTOfflineSource::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 125 of file HigPhotonJetHLTOfflineSource.cc.

References evtsrun_, HltComparatorCreateWorkflow::hltConfig, and hltProcessName_.

126  { // Initialize hltConfig
128  bool changedConfig;
129  if (!hltConfig.init(iRun, iSetup, hltProcessName_, changedConfig)) {
130  edm::LogError("HLTPhotonJetVal") << "Initialization of HLTConfigProvider failed!!";
131  return;
132  }
133 
134  evtsrun_ = 0;
135 }
Log< level::Error, false > LogError

◆ dqmEndRun()

void HigPhotonJetHLTOfflineSource::dqmEndRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 330 of file HigPhotonJetHLTOfflineSource.cc.

References gather_cfg::cout, evtsrun_, dqm::impl::MonitorElement::getTH2F(), h, hltPathsToCheck_, funct::integral(), perLSsaving_, trigvsnvtx_, and verbose_.

330  {
331  // Normalize to the total number of events in the run
332  if (!perLSsaving_) {
333  TH2F* h = trigvsnvtx_->getTH2F();
334  double integral = h->Integral();
335  double norm = (integral > 0.) ? evtsrun_ * hltPathsToCheck_.size() / integral : 1.;
336  h->Scale(norm);
337  if (verbose_) {
338  std::cout << "xshi:: endRun total number of events: " << evtsrun_ << ", integral = " << h->Integral()
339  << ", norm = " << norm << std::endl;
340  }
341  }
342 }
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:70
std::vector< std::string > hltPathsToCheck_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ isMonitoredTriggerAccepted()

bool HigPhotonJetHLTOfflineSource::isMonitoredTriggerAccepted ( const edm::TriggerNames triggerNames,
const edm::Handle< edm::TriggerResults > &  triggerResults 
)
private

Definition at line 344 of file HigPhotonJetHLTOfflineSource.cc.

References accept(), hltPathsToCheck_, mps_fire::i, AlCaHLTBitMon_QueryRunRegistry::string, triggerAccept_, L1TEGammaOffline_cfi::triggerNames, and triggerResults.

Referenced by analyze().

345  {
346  for (unsigned int itrig = 0; itrig < triggerResults->size(); itrig++) {
347  // Only consider the triggered case.
348  if (triggerAccept_ && ((*triggerResults)[itrig].accept() != 1))
349  continue;
350  const std::string& triggername = triggerNames.triggerName(itrig);
351  for (auto const& i : hltPathsToCheck_) {
352  if (triggername.find(i) != std::string::npos) {
353  return true;
354  }
355  }
356  }
357 
358  return false;
359 }
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
static std::string const triggerResults
Definition: EdmProvDump.cc:47
std::vector< std::string > hltPathsToCheck_

Member Data Documentation

◆ deletajj_

MonitorElement* HigPhotonJetHLTOfflineSource::deletajj_
private

Definition at line 98 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ deletajj_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::deletajj_reco_
private

Definition at line 97 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ delphijetmet_

MonitorElement* HigPhotonJetHLTOfflineSource::delphijetmet_
private

Definition at line 94 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ delphijetmet_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::delphijetmet_reco_
private

Definition at line 93 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ delphiphomet_

MonitorElement* HigPhotonJetHLTOfflineSource::delphiphomet_
private

Definition at line 92 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ delphiphomet_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::delphiphomet_reco_
private

Definition at line 91 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ dirname_

std::string HigPhotonJetHLTOfflineSource::dirname_
private

Definition at line 61 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by bookHistograms(), and HigPhotonJetHLTOfflineSource().

◆ evtsrun_

double HigPhotonJetHLTOfflineSource::evtsrun_
private

Definition at line 104 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), dqmBeginRun(), and dqmEndRun().

◆ hltPathsToCheck_

std::vector<std::string> HigPhotonJetHLTOfflineSource::hltPathsToCheck_
private

◆ hltProcessName_

std::string HigPhotonJetHLTOfflineSource::hltProcessName_
private

Definition at line 59 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by dqmBeginRun(), and HigPhotonJetHLTOfflineSource().

◆ invmassjj_

MonitorElement* HigPhotonJetHLTOfflineSource::invmassjj_
private

Definition at line 96 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ invmassjj_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::invmassjj_reco_
private

Definition at line 95 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ npfjets_

MonitorElement* HigPhotonJetHLTOfflineSource::npfjets_
private

Definition at line 90 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ npfjets_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::npfjets_reco_
private

Definition at line 89 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ nphotons_

MonitorElement* HigPhotonJetHLTOfflineSource::nphotons_
private

Definition at line 80 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ nphotons_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::nphotons_reco_
private

Definition at line 79 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ nvertices_

MonitorElement* HigPhotonJetHLTOfflineSource::nvertices_
private

Definition at line 78 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ nvertices_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::nvertices_reco_
private

Definition at line 77 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ perLSsaving_

bool HigPhotonJetHLTOfflineSource::perLSsaving_
private

Definition at line 64 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by dqmEndRun(), and HigPhotonJetHLTOfflineSource().

◆ pfjetMinPt_

double HigPhotonJetHLTOfflineSource::pfjetMinPt_
private

Definition at line 72 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

◆ pfJetsToken_

edm::EDGetTokenT<reco::PFJetCollection> HigPhotonJetHLTOfflineSource::pfJetsToken_
private

Definition at line 70 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

◆ pfmet_

MonitorElement* HigPhotonJetHLTOfflineSource::pfmet_
private

Definition at line 86 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ pfmet_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::pfmet_reco_
private

Definition at line 85 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ pfmetphi_

MonitorElement* HigPhotonJetHLTOfflineSource::pfmetphi_
private

Definition at line 88 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ pfmetphi_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::pfmetphi_reco_
private

Definition at line 87 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ pfMetToken_

edm::EDGetTokenT<reco::PFMETCollection> HigPhotonJetHLTOfflineSource::pfMetToken_
private

Definition at line 69 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

◆ photonMinPt_

double HigPhotonJetHLTOfflineSource::photonMinPt_
private

Definition at line 73 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

◆ photonpt_

MonitorElement* HigPhotonJetHLTOfflineSource::photonpt_
private

Definition at line 82 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ photonpt_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::photonpt_reco_
private

Definition at line 81 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ photonrapidity_

MonitorElement* HigPhotonJetHLTOfflineSource::photonrapidity_
private

Definition at line 84 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ photonrapidity_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::photonrapidity_reco_
private

Definition at line 83 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ photonsToken_

edm::EDGetTokenT<reco::PhotonCollection> HigPhotonJetHLTOfflineSource::photonsToken_
private

Definition at line 68 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

◆ pset_

edm::ParameterSet HigPhotonJetHLTOfflineSource::pset_
private

Definition at line 58 of file HigPhotonJetHLTOfflineSource.cc.

◆ pvToken_

edm::EDGetTokenT<reco::VertexCollection> HigPhotonJetHLTOfflineSource::pvToken_
private

Definition at line 67 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

◆ triggerAccept_

bool HigPhotonJetHLTOfflineSource::triggerAccept_
private

◆ triggerResultsToken_

edm::EDGetTokenT<edm::TriggerResults> HigPhotonJetHLTOfflineSource::triggerResultsToken_
private

Definition at line 66 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

◆ triggers_

MonitorElement* HigPhotonJetHLTOfflineSource::triggers_
private

Definition at line 100 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ triggers_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::triggers_reco_
private

Definition at line 99 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ trigvsnvtx_

MonitorElement* HigPhotonJetHLTOfflineSource::trigvsnvtx_
private

Definition at line 102 of file HigPhotonJetHLTOfflineSource.cc.

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

◆ trigvsnvtx_reco_

MonitorElement* HigPhotonJetHLTOfflineSource::trigvsnvtx_reco_
private

Definition at line 101 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

◆ verbose_

bool HigPhotonJetHLTOfflineSource::verbose_
private