test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
 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
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
virtual void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual 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::PFJetCollection
pfJetsToken_
 
MonitorElementpfmet_
 
MonitorElementpfmet_reco_
 
MonitorElementpfmetphi_
 
MonitorElementpfmetphi_reco_
 
edm::EDGetTokenT
< reco::PFMETCollection
pfMetToken_
 
double photonMinPt_
 
MonitorElementphotonpt_
 
MonitorElementphotonpt_reco_
 
MonitorElementphotonrapidity_
 
MonitorElementphotonrapidity_reco_
 
edm::EDGetTokenT
< reco::PhotonCollection
photonsToken_
 
edm::ParameterSet pset_
 
edm::EDGetTokenT
< reco::VertexCollection
pvToken_
 
bool triggerAccept_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResultsToken_
 
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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
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::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (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 
)
overrideprivatevirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 189 of file HigPhotonJetHLTOfflineSource.cc.

References gather_cfg::cout, deletajj_, deletajj_reco_, delphijetmet_, delphijetmet_reco_, delphiphomet_, delphiphomet_reco_, SiPixelRawToDigiRegional_cfi::deltaPhi, reco::LeafCandidate::et(), evtsrun_, MonitorElement::Fill(), edm::Event::getByToken(), hltPathsToCheck_, i, invmassjj_, invmassjj_reco_, isMonitoredTriggerAccepted(), edm::HandleBase::isValid(), njet, 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_, interactiveExample::photons, photonsToken_, pvToken_, MonitorElement::setBinLabel(), AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerResults, triggerResultsToken_, triggers_, triggers_reco_, trigvsnvtx_, trigvsnvtx_reco_, verbose_, and HLT_25ns10e33_v2_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  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(reco::PhotonCollection::const_iterator phoIter=photons->begin();
258  phoIter!=photons->end();++phoIter){
259  if (phoIter->pt() < photonMinPt_ ) continue;
260  nphotons++;
261  photonpt_reco_->Fill(phoIter->pt());
262  photonrapidity_reco_->Fill(phoIter->rapidity());
263  if (triggered) photonpt_->Fill(phoIter->pt());
264  if (triggered) photonrapidity_->Fill(phoIter->rapidity());
265  double tmp_delphiphomet = fabs(deltaPhi(phoIter->phi(), pfmet.phi()));
266  delphiphomet_reco_->Fill(tmp_delphiphomet);
267  if (triggered) delphiphomet_->Fill(tmp_delphiphomet);
268  }
269  nphotons_reco_->Fill(nphotons);
270  if (triggered) nphotons_->Fill(nphotons);
271 
272  // PF Jet
274  iEvent.getByToken(pfJetsToken_, pfjets);
275  if(!pfjets.isValid()) return;
276  if (verbose_)
277  std::cout << "xshi:: N pfjets : " << pfjets->size() << std::endl;
278 
279  double min_delphijetmet = 6.0;
280  TLorentzVector p4jet1, p4jet2, p4jj;
281  // Two leading jets eta
282  double etajet1(0), etajet2(0);
283  int njet = 0;
284  for(reco::PFJetCollection::const_iterator jetIter=pfjets->begin();
285  jetIter!=pfjets->end();++jetIter){
286  if (jetIter->pt() < pfjetMinPt_ ) continue;
287  njet++;
288 
289  double tmp_delphijetmet = fabs(deltaPhi(jetIter->phi(), pfmet.phi()));
290  if (tmp_delphijetmet < min_delphijetmet)
291  min_delphijetmet = tmp_delphijetmet;
292 
293  if (njet == 1) {
294  p4jet1.SetXYZM(jetIter->px(), jetIter->py(), jetIter->pz(), jetIter->mass());
295  etajet1 = jetIter->eta();
296  }
297  if (njet == 2){
298  p4jet2.SetXYZM(jetIter->px(), jetIter->py(), jetIter->pz(), jetIter->mass());
299  etajet2 = jetIter->eta();
300  }
301  }
302  npfjets_reco_->Fill(njet);
303  if (triggered) npfjets_->Fill(njet);
304 
305  delphijetmet_reco_->Fill(min_delphijetmet);
306  if (triggered) delphijetmet_->Fill(min_delphijetmet);
307  p4jj = p4jet1 + p4jet2;
308  double deletajj = etajet1 - etajet2 ;
309  if (verbose_)
310  std::cout << "xshi:: invmass jj " << p4jj.M() << std::endl;
311 
312  invmassjj_reco_->Fill(p4jj.M());
313  deletajj_reco_->Fill(deletajj);
314  if (triggered) invmassjj_->Fill(p4jj.M());
315  if (triggered) deletajj_->Fill(deletajj);
316 }
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:215
bool isMonitoredTriggerAccepted(const edm::TriggerNames, const edm::Handle< edm::TriggerResults >)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
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_
virtual double phi() const final
momentum azimuthal angle
edm::EDGetTokenT< reco::VertexCollection > pvToken_
int njet
Definition: HydjetWrapper.h:95
void Fill(long long x)
edm::EDGetTokenT< reco::PhotonCollection > photonsToken_
static std::string const triggerResults
Definition: EdmProvDump.cc:41
bool isValid() const
Definition: HandleBase.h:75
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
virtual double et() const final
transverse energy
tuple cout
Definition: gather_cfg.py:145
std::vector< std::string > hltPathsToCheck_
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:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::vector< std::string > hltPathsToCheck_
void HigPhotonJetHLTOfflineSource::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 139 of file HigPhotonJetHLTOfflineSource.cc.

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

141 { // Initialize 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 
)
overrideprivatevirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 320 of file HigPhotonJetHLTOfflineSource.cc.

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

322 {
323  // Normalize to the total number of events in the run
324  TH2F* h = trigvsnvtx_->getTH2F();
325  double norm = evtsrun_*hltPathsToCheck_.size()/h->Integral();
326  h->Scale(norm);
327  if (verbose_) {
328  std::cout << "xshi:: endRun total number of events: " << evtsrun_
329  << ", integral = " << h->Integral()
330  << ", norm = " << norm << std::endl;
331  }
332 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
tuple cout
Definition: gather_cfg.py:145
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 335 of file HigPhotonJetHLTOfflineSource.cc.

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

Referenced by analyze().

337 {
338  for (unsigned int itrig = 0; itrig < triggerResults->size(); itrig++){
339  // Only consider the triggered case.
340  if ( triggerAccept_ && ( (*triggerResults)[itrig].accept() != 1) ) continue;
341  std::string triggername = triggerNames.triggerName(itrig);
342  for (size_t i = 0; i < hltPathsToCheck_.size(); i++) {
343  if ( triggername.find(hltPathsToCheck_[i]) != std::string::npos) {
344  return true;
345  }
346  }
347  }
348 
349  return false;
350 }
int i
Definition: DBlmapReader.cc:9
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
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().