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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HigPhotonJetHLTOfflineSource (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- 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
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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 endRun (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 edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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)
 

Detailed Description

Definition at line 47 of file HigPhotonJetHLTOfflineSource.cc.

Constructor & Destructor Documentation

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

Definition at line 121 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_.

121  :
122  pset_(pset)
123 {
124  hltProcessName_ = pset.getParameter<std::string>("hltProcessName");
125  hltPathsToCheck_ = pset.getParameter<std::vector<std::string>>("hltPathsToCheck");
126  verbose_ = pset.getUntrackedParameter<bool>("verbose", false);
127  triggerAccept_ = pset.getUntrackedParameter<bool>("triggerAccept", true);
128  triggerResultsToken_ = consumes <edm::TriggerResults> (pset.getParameter<edm::InputTag>("triggerResultsToken"));
129  dirname_ = pset.getUntrackedParameter<std::string>("dirname", std::string("HLT/Higgs/PhotonJet/"));
130  pvToken_ = consumes<reco::VertexCollection> (pset.getParameter<edm::InputTag>("pvToken"));
131  photonsToken_ = consumes<reco::PhotonCollection> (pset.getParameter<edm::InputTag>("photonsToken"));
132  pfMetToken_ = consumes<reco::PFMETCollection> (pset.getParameter<edm::InputTag>("pfMetToken"));
133  pfJetsToken_ = consumes<reco::PFJetCollection> (pset.getParameter<edm::InputTag>("pfJetsToken"));
134  pfjetMinPt_ = pset.getUntrackedParameter<double>("pfjetMinPt", 0.0);
135  photonMinPt_ = pset.getUntrackedParameter<double>("photonMinPt", 0.0);
136 }
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 189 of file HigPhotonJetHLTOfflineSource.cc.

References gather_cfg::cout, deletajj_, deletajj_reco_, delphijetmet_, delphijetmet_reco_, delphiphomet_, delphiphomet_reco_, hiPixelPairStep_cff::deltaPhi, reco::LeafCandidate::et(), evtsrun_, MonitorElement::Fill(), edm::Event::getByToken(), hltPathsToCheck_, mps_fire::i, invmassjj_, invmassjj_reco_, isMonitoredTriggerAccepted(), edm::HandleBase::isValid(), npfjets_, npfjets_reco_, 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_, jetCleaner_cfi::photons, photonsToken_, pvToken_, MonitorElement::setBinLabel(), edm::HLTGlobalStatus::size(), AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerResults, triggerResultsToken_, triggers_, triggers_reco_, trigvsnvtx_, trigvsnvtx_reco_, verbose_, and ecalDrivenElectronSeedsParameters_cff::vertices.

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

Implements DQMEDAnalyzer.

Definition at line 154 of file HigPhotonJetHLTOfflineSource.cc.

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

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

Definition at line 139 of file HigPhotonJetHLTOfflineSource.cc.

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

141 { // Initialize hltConfig
142  HLTConfigProvider hltConfig;
143  bool changedConfig;
144  if (!hltConfig.init(iRun, iSetup, hltProcessName_, changedConfig)) {
145  edm::LogError("HLTPhotonJetVal") << "Initialization of HLTConfigProvider failed!!";
146  return;
147  }
148 
149  evtsrun_ = 0;
150 }
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
void HigPhotonJetHLTOfflineSource::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 318 of file HigPhotonJetHLTOfflineSource.cc.

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

320 {
321  // Normalize to the total number of events in the run
322  TH2F* h = trigvsnvtx_->getTH2F();
323  double integral = h->Integral();
324  double norm = (integral > 0.) ? evtsrun_*hltPathsToCheck_.size()/integral : 1.;
325  h->Scale(norm);
326  if (verbose_) {
327  std::cout << "xshi:: endRun total number of events: " << evtsrun_
328  << ", integral = " << h->Integral()
329  << ", norm = " << norm << std::endl;
330  }
331 }
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:69
std::vector< std::string > hltPathsToCheck_
TH2F * getTH2F(void) const
bool HigPhotonJetHLTOfflineSource::isMonitoredTriggerAccepted ( const edm::TriggerNames triggerNames,
const edm::Handle< edm::TriggerResults > &  triggerResults 
)
private

Definition at line 334 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().

336 {
337  for (unsigned int itrig = 0; itrig < triggerResults->size(); itrig++){
338  // Only consider the triggered case.
339  if ( triggerAccept_ && ( (*triggerResults)[itrig].accept() != 1) ) continue;
340  const std::string& triggername = triggerNames.triggerName(itrig);
341  for (auto const & i : hltPathsToCheck_) {
342  if ( triggername.find(i) != std::string::npos) {
343  return true;
344  }
345  }
346  }
347 
348  return false;
349 }
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:27
std::vector< std::string > hltPathsToCheck_

Member Data Documentation

MonitorElement* HigPhotonJetHLTOfflineSource::deletajj_
private

Definition at line 108 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::deletajj_reco_
private

Definition at line 107 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::delphijetmet_
private

Definition at line 104 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::delphijetmet_reco_
private

Definition at line 103 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::delphiphomet_
private

Definition at line 102 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::delphiphomet_reco_
private

Definition at line 101 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

std::string HigPhotonJetHLTOfflineSource::dirname_
private

Definition at line 72 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by bookHistograms(), and HigPhotonJetHLTOfflineSource().

double HigPhotonJetHLTOfflineSource::evtsrun_
private

Definition at line 114 of file HigPhotonJetHLTOfflineSource.cc.

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

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

Definition at line 70 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by dqmBeginRun(), and HigPhotonJetHLTOfflineSource().

MonitorElement* HigPhotonJetHLTOfflineSource::invmassjj_
private

Definition at line 106 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::invmassjj_reco_
private

Definition at line 105 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::npfjets_
private

Definition at line 100 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::npfjets_reco_
private

Definition at line 99 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::nphotons_
private

Definition at line 90 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::nphotons_reco_
private

Definition at line 89 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::nvertices_
private

Definition at line 88 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::nvertices_reco_
private

Definition at line 87 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

double HigPhotonJetHLTOfflineSource::pfjetMinPt_
private

Definition at line 82 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

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

Definition at line 80 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

MonitorElement* HigPhotonJetHLTOfflineSource::pfmet_
private

Definition at line 96 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::pfmet_reco_
private

Definition at line 95 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::pfmetphi_
private

Definition at line 98 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::pfmetphi_reco_
private

Definition at line 97 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 79 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

double HigPhotonJetHLTOfflineSource::photonMinPt_
private

Definition at line 83 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

MonitorElement* HigPhotonJetHLTOfflineSource::photonpt_
private

Definition at line 92 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::photonpt_reco_
private

Definition at line 91 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::photonrapidity_
private

Definition at line 94 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::photonrapidity_reco_
private

Definition at line 93 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 78 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

edm::ParameterSet HigPhotonJetHLTOfflineSource::pset_
private

Definition at line 69 of file HigPhotonJetHLTOfflineSource.cc.

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

Definition at line 77 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

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

Definition at line 76 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and HigPhotonJetHLTOfflineSource().

MonitorElement* HigPhotonJetHLTOfflineSource::triggers_
private

Definition at line 110 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::triggers_reco_
private

Definition at line 109 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HigPhotonJetHLTOfflineSource::trigvsnvtx_
private

Definition at line 112 of file HigPhotonJetHLTOfflineSource.cc.

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

MonitorElement* HigPhotonJetHLTOfflineSource::trigvsnvtx_reco_
private

Definition at line 111 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), and bookHistograms().

bool HigPhotonJetHLTOfflineSource::verbose_
private

Definition at line 73 of file HigPhotonJetHLTOfflineSource.cc.

Referenced by analyze(), endRun(), and HigPhotonJetHLTOfflineSource().