CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EgHLTOfflineSource Class Reference

#include <EgHLTOfflineSource.h>

Inheritance diagram for EgHLTOfflineSource:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void addEleTrigPath (egHLT::MonElemFuncs &monElemFuncs, const std::string &name)
 
void addPhoTrigPath (egHLT::MonElemFuncs &monElemFuncs, const std::string &name)
 
void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 EgHLTOfflineSource (const edm::ParameterSet &)
 
 EgHLTOfflineSource (const EgHLTOfflineSource &rhs)=delete
 
void filterTriggers (const HLTConfigProvider &hltConfig)
 
void getHLTFilterNamesUsed (std::vector< std::string > &filterNames) const
 
EgHLTOfflineSourceoperator= (const EgHLTOfflineSource &rhs)=delete
 
 ~EgHLTOfflineSource () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
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
 

Private Attributes

egHLT::BinData binData_
 
egHLT::CutMasks cutMasks_
 
std::vector< std::string > diEleTightLooseTrigNames_
 
std::vector< std::string > diPhoTightLooseTrigNames_
 
std::string dirName_
 
bool dohep_
 
MonitorElementdqmErrsMonElem_
 
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
 
std::vector< std::string > eleHLTFilterNames2Leg_
 
std::vector< std::string > eleHLTFilterNames_
 
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
 
std::vector< std::string > eleTightLooseTrigNames_
 
bool filterInactiveTriggers_
 
std::string hltTag_
 
int nrEventsProcessed_
 
MonitorElementnrEventsProcessedMonElem_
 
egHLT::OffEvt offEvt_
 
egHLT::OffHelper offEvtHelper_
 
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
 
std::vector< std::string > phoHLTFilterNames_
 
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_
 
std::vector< std::string > phoTightLooseTrigNames_
 
std::string subdirName_
 
std::unique_ptr< egHLT::TrigCodestrigCodes
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 57 of file EgHLTOfflineSource.h.

Constructor & Destructor Documentation

◆ EgHLTOfflineSource() [1/2]

EgHLTOfflineSource::EgHLTOfflineSource ( const edm::ParameterSet iConfig)
explicit

Definition at line 22 of file EgHLTOfflineSource.cc.

References binData_, cutMasks_, diEleTightLooseTrigNames_, diPhoTightLooseTrigNames_, dirName_, dohep_, eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleTightLooseTrigNames_, filterInactiveTriggers_, edm::ParameterSet::getParameter(), hltTag_, offEvtHelper_, phoHLTFilterNames_, phoTightLooseTrigNames_, egHLT::CutMasks::setup(), egHLT::BinData::setup(), egHLT::OffHelper::setup(), AlCaHLTBitMon_QueryRunRegistry::string, and subdirName_.

22  : nrEventsProcessed_(0) {
23  binData_.setup(iConfig.getParameter<edm::ParameterSet>("binData"));
24  cutMasks_.setup(iConfig.getParameter<edm::ParameterSet>("cutMasks"));
25  eleHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames");
26  eleHLTFilterNames2Leg_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames2Leg");
27  phoHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("phoHLTFilterNames");
28  eleTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("eleTightLooseTrigNames");
29  diEleTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("diEleTightLooseTrigNames");
30  phoTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("phoTightLooseTrigNames");
31  diPhoTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("diPhoTightLooseTrigNames");
32 
33  filterInactiveTriggers_ = iConfig.getParameter<bool>("filterInactiveTriggers");
34  hltTag_ = iConfig.getParameter<std::string>("hltTag");
35  dohep_ = iConfig.getParameter<bool>("doHEP");
36 
38  "DQMDirName"); //"HLT/EgHLTOfflineSource_" + iConfig.getParameter<std::string>("@module_label");
39 
40  subdirName_ = iConfig.getParameter<std::string>("subDQMDirName");
41 
42  offEvtHelper_.setup(iConfig, consumesCollector());
43 }
std::vector< std::string > diPhoTightLooseTrigNames_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
egHLT::OffHelper offEvtHelper_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames2Leg_
void setup(const edm::ParameterSet &conf)
Definition: EgHLTBinData.cc:5
std::vector< std::string > eleTightLooseTrigNames_
std::vector< std::string > phoHLTFilterNames_
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
void setup(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
egHLT::BinData binData_
egHLT::CutMasks cutMasks_
void setup(const edm::ParameterSet &conf)
Definition: EgHLTCutMasks.h:21

◆ EgHLTOfflineSource() [2/2]

EgHLTOfflineSource::EgHLTOfflineSource ( const EgHLTOfflineSource rhs)
delete

◆ ~EgHLTOfflineSource()

EgHLTOfflineSource::~EgHLTOfflineSource ( )
override

Definition at line 45 of file EgHLTOfflineSource.cc.

References eleFilterMonHists_, eleMonElems_, phoFilterMonHists_, and phoMonElems_.

45  {
46  // LogDebug("EgHLTOfflineSource") << "destructor called";
47  for (auto& eleFilterMonHist : eleFilterMonHists_) {
48  delete eleFilterMonHist;
49  }
50  for (auto& phoFilterMonHist : phoFilterMonHists_) {
51  delete phoFilterMonHist;
52  }
53  for (auto& eleMonElem : eleMonElems_) {
54  delete eleMonElem;
55  }
56  for (auto& phoMonElem : phoMonElems_) {
57  delete phoMonElem;
58  }
59 }
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_

Member Function Documentation

◆ addEleTrigPath()

void EgHLTOfflineSource::addEleTrigPath ( egHLT::MonElemFuncs monElemFuncs,
const std::string &  name 
)

Definition at line 172 of file EgHLTOfflineSource.cc.

References binData_, cutMasks_, dohep_, eleFilterMonHists_, Skims_PA_cff::name, jetUpdater_cfi::sort, trigCodes, x, and y.

Referenced by bookHistograms().

172  {
173  auto* filterMon =
174  new EleHLTFilterMon(monElemFuncs, name, trigCodes->getCode(name.c_str()), binData_, cutMasks_, dohep_);
175  eleFilterMonHists_.push_back(filterMon);
176  std::sort(eleFilterMonHists_.begin(), eleFilterMonHists_.end(), [](auto const& x, auto const& y) { return *x < *y; });
177  //takes a minor efficiency hit at initalisation to ensure that the vector is always sorted
178 }
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
std::unique_ptr< egHLT::TrigCodes > trigCodes
egHLT::BinData binData_
egHLT::CutMasks cutMasks_

◆ addPhoTrigPath()

void EgHLTOfflineSource::addPhoTrigPath ( egHLT::MonElemFuncs monElemFuncs,
const std::string &  name 
)

Definition at line 180 of file EgHLTOfflineSource.cc.

References binData_, cutMasks_, dohep_, Skims_PA_cff::name, phoFilterMonHists_, jetUpdater_cfi::sort, trigCodes, x, and y.

Referenced by bookHistograms().

180  {
181  PhoHLTFilterMon* filterMon =
182  new PhoHLTFilterMon(monElemFuncs, name, trigCodes->getCode(name.c_str()), binData_, cutMasks_, dohep_);
183  phoFilterMonHists_.push_back(filterMon);
184  std::sort(phoFilterMonHists_.begin(), phoFilterMonHists_.end(), [](auto const& x, auto const& y) { return *x < *y; });
185  //takes a minor efficiency hit at initalisation to ensure that the vector is always sorted
186 }
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
std::unique_ptr< egHLT::TrigCodes > trigCodes
egHLT::BinData binData_
egHLT::CutMasks cutMasks_

◆ analyze()

void EgHLTOfflineSource::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 140 of file EgHLTOfflineSource.cc.

References dqmErrsMonElem_, eleFilterMonHists_, eleMonElems_, hltEgammaEleL1TrkIsoL1Seeded_cfi::eles, egHLT::OffEvt::eles(), dqm::impl::MonitorElement::Fill(), iEvent, egHLT::OffHelper::makeOffEvt(), nrEventsProcessed_, nrEventsProcessedMonElem_, offEvt_, offEvtHelper_, phoFilterMonHists_, phoMonElems_, egHLT::OffEvt::phos(), and trigCodes.

140  {
141  const double weight = 1.; //we have the ability to weight but its disabled for now - maybe use this for prescales?
144  int errCode = offEvtHelper_.makeOffEvt(iEvent, iSetup, offEvt_, *trigCodes);
145  if (errCode != 0) {
146  dqmErrsMonElem_->Fill(errCode);
147  return;
148  }
149 
150  for (auto& eleFilterMonHist : eleFilterMonHists_) {
151  eleFilterMonHist->fill(offEvt_, weight);
152  }
153  for (auto& phoFilterMonHist : phoFilterMonHists_) {
154  phoFilterMonHist->fill(offEvt_, weight);
155  }
156 
157  for (auto& eleMonElem : eleMonElems_) {
158  const std::vector<OffEle>& eles = offEvt_.eles();
159  for (auto const& ele : eles) {
160  eleMonElem->fill(ele, offEvt_, weight);
161  }
162  }
163 
164  for (auto& phoMonElem : phoMonElems_) {
165  const std::vector<OffPho>& phos = offEvt_.phos();
166  for (auto const& pho : phos) {
167  phoMonElem->fill(pho, offEvt_, weight);
168  }
169  }
170 }
egHLT::OffHelper offEvtHelper_
MonitorElement * dqmErrsMonElem_
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
const std::vector< OffEle > & eles() const
Definition: EgHLTOffEvt.h:48
Definition: weight.py:1
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:50
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_
MonitorElement * nrEventsProcessedMonElem_
int makeOffEvt(const edm::Event &edmEvent, const edm::EventSetup &setup, egHLT::OffEvt &offEvent, const TrigCodes &trigCodes)
std::unique_ptr< egHLT::TrigCodes > trigCodes

◆ bookHistograms()

void EgHLTOfflineSource::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  run,
edm::EventSetup const &  c 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 61 of file EgHLTOfflineSource.cc.

References addEleTrigPath(), addPhoTrigPath(), binData_, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookInt(), HltBtagPostValidation_cff::c, cutMasks_, diEleTightLooseTrigNames_, diPhoTightLooseTrigNames_, dirName_, dohep_, dqmErrsMonElem_, eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleMonElems_, eleTightLooseTrigNames_, filterInactiveTriggers_, filterTriggers(), getHLTFilterNamesUsed(), HltComparatorCreateWorkflow::hltConfig, hltTag_, mps_fire::i, egHLT::MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(), egHLT::MonElemFuncs::initTightLooseTrigHists(), egHLT::MonElemFuncs::initTrigTagProbeHist(), egHLT::MonElemFuncs::initTrigTagProbeHist_2Leg(), nrEventsProcessedMonElem_, offEvtHelper_, phoHLTFilterNames_, phoMonElems_, phoTightLooseTrigNames_, writedatasetfile::run, dqm::implementation::NavigatorBase::setCurrentFolder(), egHLT::OffHelper::setupTriggers(), subdirName_, trigCodes, egHLT::CutMasks::trigTPEle, and egHLT::CutMasks::trigTPPho.

61  {
62  iBooker.setCurrentFolder(dirName_);
63 
64  //the one monitor element the source fills directly
65  dqmErrsMonElem_ = iBooker.book1D("dqmErrors", "EgHLTOfflineSource Errors", 101, -0.5, 100.5);
66  nrEventsProcessedMonElem_ = iBooker.bookInt("nrEventsProcessed");
67 
68  //if the HLTConfig changes during the job, the results are "un predictable" but in practice should be fine
69  //the HLTConfig is used for working out which triggers are active, working out which filternames correspond to paths and L1 seeds
70  //assuming those dont change for E/g it *should* be fine
72  bool changed = false;
73  hltConfig.init(run, c, hltTag_, changed);
76 
77  std::vector<std::string> hltFiltersUsed;
78  getHLTFilterNamesUsed(hltFiltersUsed);
79  trigCodes.reset(TrigCodes::makeCodes(hltFiltersUsed));
80 
82 
83  MonElemFuncs monElemFuncs(iBooker, *trigCodes);
84 
85  //now book ME's
86  iBooker.setCurrentFolder(dirName_ + "/" + subdirName_);
87  //each trigger path with generate object distributions and efficiencies (BUT not trigger efficiencies...)
88  for (auto const& eleHLTFilterName : eleHLTFilterNames_) {
89  iBooker.setCurrentFolder(dirName_ + "/" + subdirName_ + "/" + eleHLTFilterName);
90  addEleTrigPath(monElemFuncs, eleHLTFilterName);
91  }
92  for (auto const& phoHLTFilterName : phoHLTFilterNames_) {
93  iBooker.setCurrentFolder(dirName_ + "/" + subdirName_ + "/" + phoHLTFilterName);
94  addPhoTrigPath(monElemFuncs, phoHLTFilterName);
95  }
96  //efficiencies of one trigger path relative to another
97  monElemFuncs.initTightLooseTrigHists(eleMonElems_, eleTightLooseTrigNames_, binData_, "gsfEle");
98  //new EgHLTDQMVarCut<OffEle>(cutMasks_.stdEle,&OffEle::cutCode));
99  //monElemFuncs.initTightLooseTrigHistsTrigCuts(eleMonElems_,eleTightLooseTrigNames_,binData_);
100 
101  monElemFuncs.initTightLooseTrigHists(phoMonElems_, phoTightLooseTrigNames_, binData_, "pho");
102  // new EgHLTDQMVarCut<OffPho>(cutMasks_.stdPho,&OffPho::cutCode));
103  //monElemFuncs.initTightLooseTrigHistsTrigCuts(phoMonElems_,phoTightLooseTrigNames_,binData_);
104 
105  //di-object triggers
106  monElemFuncs.initTightLooseTrigHists(eleMonElems_, diEleTightLooseTrigNames_, binData_, "gsfEle");
107  // new EgDiEleCut(cutMasks_.stdEle,&OffEle::cutCode));
108  monElemFuncs.initTightLooseTrigHists(phoMonElems_, diPhoTightLooseTrigNames_, binData_, "pho");
109  // new EgDiPhoCut(cutMasks_.stdPho,&OffPho::cutCode));
110 
111  monElemFuncs.initTightLooseDiObjTrigHistsTrigCuts(eleMonElems_, diEleTightLooseTrigNames_, binData_);
112  monElemFuncs.initTightLooseDiObjTrigHistsTrigCuts(phoMonElems_, diPhoTightLooseTrigNames_, binData_);
113 
114  //tag and probe trigger efficiencies
115  //this is to do measure the trigger efficiency with respect to a fully selected offline electron
116  //using a tag and probe technique (note: this will be different to the trigger efficiency normally calculated)
117  bool doTrigTagProbeEff = false;
118  if (doTrigTagProbeEff && (!dohep_)) {
119  for (auto const& eleHLTFilterName : eleHLTFilterNames_) {
120  iBooker.setCurrentFolder(dirName_ + "/" + subdirName_ + "/" + eleHLTFilterName);
121  monElemFuncs.initTrigTagProbeHist(eleMonElems_, eleHLTFilterName, cutMasks_.trigTPEle, binData_);
122  }
123  for (auto const& phoHLTFilterName : phoHLTFilterNames_) {
124  iBooker.setCurrentFolder(dirName_ + "/" + subdirName_ + "/" + phoHLTFilterName);
125  monElemFuncs.initTrigTagProbeHist(phoMonElems_, phoHLTFilterName, cutMasks_.trigTPPho, binData_);
126  }
127  for (auto& i : eleHLTFilterNames2Leg_) {
128  iBooker.setCurrentFolder(dirName_ + "/" + subdirName_ + "/" + i.substr(i.find("::") + 2));
129  //std::cout<<"FilterName: "<<eleHLTFilterNames2Leg_[i]<<std::endl;
130  //std::cout<<"Folder: "<<eleHLTFilterNames2Leg_[i].substr(eleHLTFilterNames2Leg_[i].find("::")+2)<<std::endl;
131  monElemFuncs.initTrigTagProbeHist_2Leg(eleMonElems_, i, cutMasks_.trigTPEle, binData_);
132  }
133  //tag and probe not yet implimented for photons (attemping to see if it makes sense first)
134  // monElemFuncs.initTrigTagProbeHists(phoMonElems,phoHLTFilterNames_);
135  }
136 
137  iBooker.setCurrentFolder(dirName_);
138 }
std::vector< std::string > diPhoTightLooseTrigNames_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
egHLT::OffHelper offEvtHelper_
MonitorElement * dqmErrsMonElem_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames2Leg_
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
void addEleTrigPath(egHLT::MonElemFuncs &monElemFuncs, const std::string &name)
void addPhoTrigPath(egHLT::MonElemFuncs &monElemFuncs, const std::string &name)
std::vector< std::string > eleTightLooseTrigNames_
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_
std::vector< std::string > phoHLTFilterNames_
MonitorElement * nrEventsProcessedMonElem_
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
void filterTriggers(const HLTConfigProvider &hltConfig)
std::unique_ptr< egHLT::TrigCodes > trigCodes
egHLT::BinData binData_
void setupTriggers(const HLTConfigProvider &config, const std::vector< std::string > &hltFiltersUsed, const TrigCodes &trigCodes)
egHLT::CutMasks cutMasks_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void getHLTFilterNamesUsed(std::vector< std::string > &filterNames) const

◆ filterTriggers()

void EgHLTOfflineSource::filterTriggers ( const HLTConfigProvider hltConfig)

Definition at line 240 of file EgHLTOfflineSource.cc.

References diEleTightLooseTrigNames_, diPhoTightLooseTrigNames_, eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleTightLooseTrigNames_, egHLT::trigTools::filterInactiveTightLooseTriggers(), EgHLTOfflineClient_cfi::filterInactiveTriggers, egHLT::trigTools::getActiveFilters(), HltComparatorCreateWorkflow::hltConfig, phoHLTFilterNames_, and phoTightLooseTrigNames_.

Referenced by bookHistograms().

240  {
241  std::vector<std::string> activeFilters;
242  std::vector<std::string> activeEleFilters;
243  std::vector<std::string> activeEle2LegFilters;
244  std::vector<std::string> activePhoFilters;
245  std::vector<std::string> activePho2LegFilters;
246 
248  hltConfig, activeFilters, activeEleFilters, activeEle2LegFilters, activePhoFilters, activePho2LegFilters);
249 
257 }
std::vector< std::string > diPhoTightLooseTrigNames_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames2Leg_
std::vector< std::string > eleTightLooseTrigNames_
std::vector< std::string > phoHLTFilterNames_
void getActiveFilters(const HLTConfigProvider &hltConfig, std::vector< std::string > &activeFilters, std::vector< std::string > &activeEleFilters, std::vector< std::string > &activeEle2LegFilters, std::vector< std::string > &activePhoFilters, std::vector< std::string > &activePho2LegFilters)
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
void filterInactiveTightLooseTriggers(std::vector< std::string > &namesToFilter, const std::vector< std::string > &activeFilters)

◆ getHLTFilterNamesUsed()

void EgHLTOfflineSource::getHLTFilterNamesUsed ( std::vector< std::string > &  filterNames) const

Definition at line 195 of file EgHLTOfflineSource.cc.

References diEleTightLooseTrigNames_, diPhoTightLooseTrigNames_, eleHLTFilterNames_, eleTightLooseTrigNames_, phoHLTFilterNames_, phoTightLooseTrigNames_, submitPVValidationJobs::split(), AlCaHLTBitMon_QueryRunRegistry::string, edm::swap(), and trigNames.

Referenced by bookHistograms().

195  {
196  std::set<std::string> filterNameSet;
197  for (auto const& eleHLTFilterName : eleHLTFilterNames_)
198  filterNameSet.insert(eleHLTFilterName);
199  for (auto const& phoHLTFilterName : phoHLTFilterNames_)
200  filterNameSet.insert(phoHLTFilterName);
201  //here we are little more complicated as entries are of the form "tightTrig:looseTrig"
202  //so we need to split them first
203  for (auto const& eleTightLooseTrigName : eleTightLooseTrigNames_) {
204  std::vector<std::string> trigNames;
205  boost::split(trigNames, eleTightLooseTrigName, boost::is_any_of(std::string(":")));
206  if (trigNames.size() != 2)
207  continue; //format incorrect
208  filterNameSet.insert(trigNames[0]);
209  filterNameSet.insert(trigNames[1]);
210  }
211  for (auto const& diEleTightLooseTrigName : diEleTightLooseTrigNames_) {
212  std::vector<std::string> trigNames;
213  boost::split(trigNames, diEleTightLooseTrigName, boost::is_any_of(std::string(":")));
214  if (trigNames.size() != 2)
215  continue; //format incorrect
216  filterNameSet.insert(trigNames[0]);
217  filterNameSet.insert(trigNames[1]);
218  }
219  for (auto const& phoTightLooseTrigName : phoTightLooseTrigNames_) {
220  std::vector<std::string> trigNames;
221  boost::split(trigNames, phoTightLooseTrigName, boost::is_any_of(std::string(":")));
222  if (trigNames.size() != 2)
223  continue; //format incorrect
224  filterNameSet.insert(trigNames[0]);
225  filterNameSet.insert(trigNames[1]);
226  }
227  for (auto const& diPhoTightLooseTrigName : diPhoTightLooseTrigNames_) {
228  std::vector<std::string> trigNames;
229  boost::split(trigNames, diPhoTightLooseTrigName, boost::is_any_of(std::string(":")));
230  if (trigNames.size() != 2)
231  continue; //format incorrect
232  filterNameSet.insert(trigNames[0]);
233  filterNameSet.insert(trigNames[1]);
234  }
235  //right all the triggers are inserted once and only once in the set, convert to vector
236  //very lazy, create a new vector so can use the constructor and then use swap to transfer
237  std::vector<std::string>(filterNameSet.begin(), filterNameSet.end()).swap(filterNames);
238 }
std::vector< std::string > diPhoTightLooseTrigNames_
std::vector< std::string > phoTightLooseTrigNames_
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
std::vector< std::string > eleTightLooseTrigNames_
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
std::vector< std::string > phoHLTFilterNames_
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_

◆ operator=()

EgHLTOfflineSource& EgHLTOfflineSource::operator= ( const EgHLTOfflineSource rhs)
delete

Member Data Documentation

◆ binData_

egHLT::BinData EgHLTOfflineSource::binData_
private

◆ cutMasks_

egHLT::CutMasks EgHLTOfflineSource::cutMasks_
private

◆ diEleTightLooseTrigNames_

std::vector<std::string> EgHLTOfflineSource::diEleTightLooseTrigNames_
private

◆ diPhoTightLooseTrigNames_

std::vector<std::string> EgHLTOfflineSource::diPhoTightLooseTrigNames_
private

◆ dirName_

std::string EgHLTOfflineSource::dirName_
private

Definition at line 70 of file EgHLTOfflineSource.h.

Referenced by bookHistograms(), and EgHLTOfflineSource().

◆ dohep_

bool EgHLTOfflineSource::dohep_
private

◆ dqmErrsMonElem_

MonitorElement* EgHLTOfflineSource::dqmErrsMonElem_
private

Definition at line 59 of file EgHLTOfflineSource.h.

Referenced by analyze(), and bookHistograms().

◆ eleFilterMonHists_

std::vector<egHLT::EleHLTFilterMon*> EgHLTOfflineSource::eleFilterMonHists_
private

Definition at line 64 of file EgHLTOfflineSource.h.

Referenced by addEleTrigPath(), analyze(), and ~EgHLTOfflineSource().

◆ eleHLTFilterNames2Leg_

std::vector<std::string> EgHLTOfflineSource::eleHLTFilterNames2Leg_
private

Definition at line 83 of file EgHLTOfflineSource.h.

Referenced by bookHistograms(), EgHLTOfflineSource(), and filterTriggers().

◆ eleHLTFilterNames_

std::vector<std::string> EgHLTOfflineSource::eleHLTFilterNames_
private

◆ eleMonElems_

std::vector<egHLT::MonElemContainer<egHLT::OffEle>*> EgHLTOfflineSource::eleMonElems_
private

Definition at line 67 of file EgHLTOfflineSource.h.

Referenced by analyze(), bookHistograms(), and ~EgHLTOfflineSource().

◆ eleTightLooseTrigNames_

std::vector<std::string> EgHLTOfflineSource::eleTightLooseTrigNames_
private

◆ filterInactiveTriggers_

bool EgHLTOfflineSource::filterInactiveTriggers_
private

Definition at line 92 of file EgHLTOfflineSource.h.

Referenced by bookHistograms(), and EgHLTOfflineSource().

◆ hltTag_

std::string EgHLTOfflineSource::hltTag_
private

Definition at line 93 of file EgHLTOfflineSource.h.

Referenced by bookHistograms(), and EgHLTOfflineSource().

◆ nrEventsProcessed_

int EgHLTOfflineSource::nrEventsProcessed_
private

Definition at line 61 of file EgHLTOfflineSource.h.

Referenced by analyze().

◆ nrEventsProcessedMonElem_

MonitorElement* EgHLTOfflineSource::nrEventsProcessedMonElem_
private

Definition at line 60 of file EgHLTOfflineSource.h.

Referenced by analyze(), and bookHistograms().

◆ offEvt_

egHLT::OffEvt EgHLTOfflineSource::offEvt_
private

Definition at line 73 of file EgHLTOfflineSource.h.

Referenced by analyze().

◆ offEvtHelper_

egHLT::OffHelper EgHLTOfflineSource::offEvtHelper_
private

Definition at line 75 of file EgHLTOfflineSource.h.

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

◆ phoFilterMonHists_

std::vector<egHLT::PhoHLTFilterMon*> EgHLTOfflineSource::phoFilterMonHists_
private

Definition at line 66 of file EgHLTOfflineSource.h.

Referenced by addPhoTrigPath(), analyze(), and ~EgHLTOfflineSource().

◆ phoHLTFilterNames_

std::vector<std::string> EgHLTOfflineSource::phoHLTFilterNames_
private

◆ phoMonElems_

std::vector<egHLT::MonElemContainer<egHLT::OffPho>*> EgHLTOfflineSource::phoMonElems_
private

Definition at line 68 of file EgHLTOfflineSource.h.

Referenced by analyze(), bookHistograms(), and ~EgHLTOfflineSource().

◆ phoTightLooseTrigNames_

std::vector<std::string> EgHLTOfflineSource::phoTightLooseTrigNames_
private

◆ subdirName_

std::string EgHLTOfflineSource::subdirName_
private

Definition at line 71 of file EgHLTOfflineSource.h.

Referenced by bookHistograms(), and EgHLTOfflineSource().

◆ trigCodes

std::unique_ptr<egHLT::TrigCodes> EgHLTOfflineSource::trigCodes
private

Definition at line 76 of file EgHLTOfflineSource.h.

Referenced by addEleTrigPath(), addPhoTrigPath(), analyze(), and bookHistograms().