CMS 3D CMS Logo

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

 HigPhotonJetHLTOfflineSource (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
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)
 

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_
 
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 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
 
- 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
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)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 46 of file HigPhotonJetHLTOfflineSource.cc.

Constructor & Destructor Documentation

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

Definition at line 109 of file HigPhotonJetHLTOfflineSource.cc.

References dirname_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hltPathsToCheck_, hltProcessName_, pfjetMinPt_, pfJetsToken_, pfMetToken_, photonMinPt_, photonsToken_, 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  triggerAccept_ = pset.getUntrackedParameter<bool>("triggerAccept", true);
114  triggerResultsToken_ = consumes<edm::TriggerResults>(pset.getParameter<edm::InputTag>("triggerResultsToken"));
115  dirname_ = pset.getUntrackedParameter<std::string>("dirname", std::string("HLT/Higgs/PhotonJet/"));
116  pvToken_ = consumes<reco::VertexCollection>(pset.getParameter<edm::InputTag>("pvToken"));
117  photonsToken_ = consumes<reco::PhotonCollection>(pset.getParameter<edm::InputTag>("photonsToken"));
118  pfMetToken_ = consumes<reco::PFMETCollection>(pset.getParameter<edm::InputTag>("pfMetToken"));
119  pfJetsToken_ = consumes<reco::PFJetCollection>(pset.getParameter<edm::InputTag>("pfJetsToken"));
120  pfjetMinPt_ = pset.getUntrackedParameter<double>("pfjetMinPt", 0.0);
121  photonMinPt_ = pset.getUntrackedParameter<double>("photonMinPt", 0.0);
122 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
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

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

Definition at line 185 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(), edm::Event::getByToken(), hltPathsToCheck_, mps_fire::i, 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(), edm::HLTGlobalStatus::size(), AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerName(), L1TEGammaOffline_cfi::triggerNames, edm::Event::triggerNames(), triggerResults, triggerResultsToken_, triggers_, triggers_reco_, trigvsnvtx_, trigvsnvtx_reco_, verbose_, and pwdgSkimBPark_cfi::vertices.

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

Implements DQMEDAnalyzer.

Definition at line 136 of file HigPhotonJetHLTOfflineSource.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::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::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), triggers_, triggers_reco_, trigvsnvtx_, and trigvsnvtx_reco_.

138  {
139  iBooker.setCurrentFolder(dirname_);
140  nvertices_reco_ = iBooker.book1D("nvertices_reco", "Reco: Number of vertices", 100, 0, 100);
141  nvertices_ = iBooker.book1D("nvertices", "Number of vertices", 100, 0, 100);
142  nphotons_reco_ = iBooker.book1D("nphotons_reco", "Reco: Number of photons", 100, 0, 10);
143  nphotons_ = iBooker.book1D("nphotons", "Number of photons", 100, 0, 10);
144  photonpt_reco_ = iBooker.book1D("photonpt_reco", "Reco: Photons pT", 100, 0, 500);
145  photonpt_ = iBooker.book1D("photonpt", "Photons pT", 100, 0, 500);
146  photonrapidity_reco_ = iBooker.book1D("photonrapidity_reco", "Reco: Photons rapidity;y_{#gamma}", 100, -2.5, 2.5);
147  photonrapidity_ = iBooker.book1D("photonrapidity", "Photons rapidity;y_{#gamma}", 100, -2.5, 2.5);
148  pfmet_reco_ = iBooker.book1D("pfmet_reco", "Reco: PF MET", 100, 0, 250);
149  pfmet_ = iBooker.book1D("pfmet", "PF MET", 100, 0, 250);
150  pfmetphi_reco_ = iBooker.book1D("pfmetphi_reco", "Reco: PF MET phi;#phi_{PFMET}", 100, -4, 4);
151  pfmetphi_ = iBooker.book1D("pfmetphi", "PF MET phi;#phi_{PFMET}", 100, -4, 4);
153  iBooker.book1D("delphiphomet_reco", "Reco: #Delta#phi(photon, MET);#Delta#phi(#gamma,MET)", 100, 0, 4);
154  delphiphomet_ = iBooker.book1D("delphiphomet", "#Delta#phi(photon, MET);#Delta#phi(#gamma,MET)", 100, 0, 4);
155  npfjets_reco_ = iBooker.book1D("npfjets_reco", "Reco: Number of PF Jets", 100, 0, 20);
156  npfjets_ = iBooker.book1D("npfjets", "Number of PF Jets", 100, 0, 20);
158  iBooker.book1D("delphijetmet_reco", "Reco: #Delta#phi(PFJet, MET);#Delta#phi(Jet,MET)", 100, 0, 4);
159  delphijetmet_ = iBooker.book1D("delphijetmet", "#Delta#phi(PFJet, MET);#Delta#phi(Jet,MET)", 100, 0, 4);
160  invmassjj_reco_ = iBooker.book1D("invmassjj_reco", "Reco: Inv mass two leading jets;M_{jj}[GeV]", 100, 0, 2000);
161  invmassjj_ = iBooker.book1D("invmassjj", "Inv mass two leading jets;M_{jj}[GeV]", 100, 0, 2000);
162  deletajj_reco_ = iBooker.book1D("deletajj_reco", "Reco: #Delta#eta(jj);|#Delta#eta_{jj}|", 100, 0, 6);
163  deletajj_ = iBooker.book1D("deletajj", "#Delta#eta(jj);|#Delta#eta_{jj}|", 100, 0, 6);
165  iBooker.book1D("triggers_reco", "Reco: Triggers", hltPathsToCheck_.size(), 0, hltPathsToCheck_.size());
166  triggers_ = iBooker.book1D("triggers", "Triggers", hltPathsToCheck_.size(), 0, hltPathsToCheck_.size());
167  trigvsnvtx_reco_ = iBooker.book2D("trigvsnvtx_reco",
168  "Reco: Trigger vs. # vertices;N_{vertices};Trigger",
169  100,
170  0,
171  100,
172  hltPathsToCheck_.size(),
173  0,
174  hltPathsToCheck_.size());
175  trigvsnvtx_ = iBooker.book2D("trigvsnvtx",
176  "Trigger vs. # vertices;N_{vertices};Trigger",
177  100,
178  0,
179  100,
180  hltPathsToCheck_.size(),
181  0,
182  hltPathsToCheck_.size());
183 }
std::vector< std::string > hltPathsToCheck_
void HigPhotonJetHLTOfflineSource::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 124 of file HigPhotonJetHLTOfflineSource.cc.

References evtsrun_, HltComparatorCreateWorkflow::hltConfig, hltProcessName_, and HLTConfigProvider::init().

125  { // Initialize hltConfig
127  bool changedConfig;
128  if (!hltConfig.init(iRun, iSetup, hltProcessName_, changedConfig)) {
129  edm::LogError("HLTPhotonJetVal") << "Initialization of HLTConfigProvider failed!!";
130  return;
131  }
132 
133  evtsrun_ = 0;
134 }
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
void HigPhotonJetHLTOfflineSource::dqmEndRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 329 of file HigPhotonJetHLTOfflineSource.cc.

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

329  {
330  // Normalize to the total number of events in the run
331  TH2F* h = trigvsnvtx_->getTH2F();
332  double integral = h->Integral();
333  double norm = (integral > 0.) ? evtsrun_ * hltPathsToCheck_.size() / integral : 1.;
334  h->Scale(norm);
335  if (verbose_) {
336  std::cout << "xshi:: endRun total number of events: " << evtsrun_ << ", integral = " << h->Integral()
337  << ", norm = " << norm << std::endl;
338  }
339 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:70
std::vector< std::string > hltPathsToCheck_
bool HigPhotonJetHLTOfflineSource::isMonitoredTriggerAccepted ( const edm::TriggerNames triggerNames,
const edm::Handle< edm::TriggerResults > &  triggerResults 
)
private

Definition at line 341 of file HigPhotonJetHLTOfflineSource.cc.

References accept(), DEFINE_FWK_MODULE, hltPathsToCheck_, mps_fire::i, edm::HLTGlobalStatus::size(), AlCaHLTBitMon_QueryRunRegistry::string, triggerAccept_, and edm::TriggerNames::triggerName().

Referenced by analyze().

342  {
343  for (unsigned int itrig = 0; itrig < triggerResults->size(); itrig++) {
344  // Only consider the triggered case.
345  if (triggerAccept_ && ((*triggerResults)[itrig].accept() != 1))
346  continue;
347  const std::string& triggername = triggerNames.triggerName(itrig);
348  for (auto const& i : hltPathsToCheck_) {
349  if (triggername.find(i) != std::string::npos) {
350  return true;
351  }
352  }
353  }
354 
355  return false;
356 }
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
unsigned int size() const
Get number of paths stored.
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
std::vector< std::string > hltPathsToCheck_

Member Data Documentation

MonitorElement* HigPhotonJetHLTOfflineSource::deletajj_
private

Definition at line 98 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::deletajj_reco_
private

Definition at line 97 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::delphijetmet_
private

Definition at line 94 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::delphijetmet_reco_
private

Definition at line 93 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::delphiphomet_
private

Definition at line 92 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::delphiphomet_reco_
private

Definition at line 91 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

std::string HigPhotonJetHLTOfflineSource::dirname_
private

Definition at line 62 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by bookHistograms(), and HigPhotonJetHLTOfflineSource().

double HigPhotonJetHLTOfflineSource::evtsrun_
private

Definition at line 104 of file HigPhotonJetHLTOfflineSource.cc.

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

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

Definition at line 60 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by dqmBeginRun(), and HigPhotonJetHLTOfflineSource().

MonitorElement* HigPhotonJetHLTOfflineSource::invmassjj_
private

Definition at line 96 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::invmassjj_reco_
private

Definition at line 95 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::npfjets_
private

Definition at line 90 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::npfjets_reco_
private

Definition at line 89 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::nphotons_
private

Definition at line 80 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::nphotons_reco_
private

Definition at line 79 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::nvertices_
private

Definition at line 78 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::nvertices_reco_
private

Definition at line 77 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

double HigPhotonJetHLTOfflineSource::pfjetMinPt_
private

Definition at line 72 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

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

Definition at line 70 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

MonitorElement* HigPhotonJetHLTOfflineSource::pfmet_
private

Definition at line 86 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::pfmet_reco_
private

Definition at line 85 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::pfmetphi_
private

Definition at line 88 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::pfmetphi_reco_
private

Definition at line 87 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 69 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

double HigPhotonJetHLTOfflineSource::photonMinPt_
private

Definition at line 73 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

MonitorElement* HigPhotonJetHLTOfflineSource::photonpt_
private

Definition at line 82 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::photonpt_reco_
private

Definition at line 81 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::photonrapidity_
private

Definition at line 84 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::photonrapidity_reco_
private

Definition at line 83 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 68 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

edm::ParameterSet HigPhotonJetHLTOfflineSource::pset_
private

Definition at line 59 of file HigPhotonJetHLTOfflineSource.cc.

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

Definition at line 67 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

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

Definition at line 66 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

MonitorElement* HigPhotonJetHLTOfflineSource::triggers_
private

Definition at line 100 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::triggers_reco_
private

Definition at line 99 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::trigvsnvtx_
private

Definition at line 102 of file HigPhotonJetHLTOfflineSource.cc.

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

MonitorElement* HigPhotonJetHLTOfflineSource::trigvsnvtx_reco_
private

Definition at line 101 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

bool HigPhotonJetHLTOfflineSource::verbose_
private