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
EgHLTOfflineSource Class Reference

#include <EgHLTOfflineSource.h>

Inheritance diagram for EgHLTOfflineSource:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void addEleTrigPath (egHLT::MonElemFuncs &monElemFuncs, const std::string &name)
 
void addPhoTrigPath (egHLT::MonElemFuncs &monElemFuncs, const std::string &name)
 
virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 EgHLTOfflineSource (const edm::ParameterSet &)
 
void filterTriggers (const HLTConfigProvider &hltConfig)
 
void getHLTFilterNamesUsed (std::vector< std::string > &filterNames) const
 
virtual ~EgHLTOfflineSource ()
 
- 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
 
 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

 EgHLTOfflineSource (const EgHLTOfflineSource &rhs)=delete
 
EgHLTOfflineSourceoperator= (const EgHLTOfflineSource &rhs)=delete
 

Private Attributes

egHLT::BinData binData_
 
egHLT::CutMasks cutMasks_
 
std::vector< std::string > diEleTightLooseTrigNames_
 
std::vector< std::string > diPhoTightLooseTrigNames_
 
std::string dirName_
 
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::unique_ptr< egHLT::TrigCodestrigCodes
 

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 58 of file EgHLTOfflineSource.h.

Constructor & Destructor Documentation

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

Definition at line 23 of file EgHLTOfflineSource.cc.

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

23  :
25 {
26  binData_.setup(iConfig.getParameter<edm::ParameterSet>("binData"));
27  cutMasks_.setup(iConfig.getParameter<edm::ParameterSet>("cutMasks"));
28  eleHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames");
29  eleHLTFilterNames2Leg_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames2Leg");
30  phoHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("phoHLTFilterNames");
31  eleTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("eleTightLooseTrigNames");
32  diEleTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("diEleTightLooseTrigNames");
33  phoTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("phoTightLooseTrigNames");
34  diPhoTightLooseTrigNames_ = iConfig.getParameter<std::vector<std::string> >("diPhoTightLooseTrigNames");
35 
36  filterInactiveTriggers_ =iConfig.getParameter<bool>("filterInactiveTriggers");
37  hltTag_ = iConfig.getParameter<std::string>("hltTag");
38 
39 
40  dirName_=iConfig.getParameter<std::string>("DQMDirName");//"HLT/EgHLTOfflineSource_" + iConfig.getParameter<std::string>("@module_label");
41 
42 
44 }
std::vector< std::string > diPhoTightLooseTrigNames_
T getParameter(std::string const &) const
egHLT::OffHelper offEvtHelper_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames2Leg_
void setup(const edm::ParameterSet &conf)
Definition: EgHLTBinData.cc:6
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
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:23
EgHLTOfflineSource::~EgHLTOfflineSource ( )
virtual

Definition at line 47 of file EgHLTOfflineSource.cc.

References eleFilterMonHists_, eleMonElems_, i, phoFilterMonHists_, and phoMonElems_.

48 {
49  // LogDebug("EgHLTOfflineSource") << "destructor called";
50  for(size_t i=0;i<eleFilterMonHists_.size();i++){
51  delete eleFilterMonHists_[i];
52  }
53  for(size_t i=0;i<phoFilterMonHists_.size();i++){
54  delete phoFilterMonHists_[i];
55  }
56  for(size_t i=0;i<eleMonElems_.size();i++){
57  delete eleMonElems_[i];
58  }
59  for(size_t i=0;i<phoMonElems_.size();i++){
60  delete phoMonElems_[i];
61  }
62 }
int i
Definition: DBlmapReader.cc:9
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

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

Definition at line 174 of file EgHLTOfflineSource.cc.

References binData_, cutMasks_, eleFilterMonHists_, and trigCodes.

Referenced by bookHistograms().

175 {
176  EleHLTFilterMon* filterMon = new EleHLTFilterMon(monElemFuncs,name,trigCodes->getCode(name.c_str()),binData_,cutMasks_);
177  eleFilterMonHists_.push_back(filterMon);
178  std::sort(eleFilterMonHists_.begin(),eleFilterMonHists_.end(),EleHLTFilterMon::ptrLess<EleHLTFilterMon>()); //takes a minor efficiency hit at initalisation to ensure that the vector is always sorted
179 }
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
std::unique_ptr< egHLT::TrigCodes > trigCodes
egHLT::BinData binData_
egHLT::CutMasks cutMasks_
void EgHLTOfflineSource::addPhoTrigPath ( egHLT::MonElemFuncs monElemFuncs,
const std::string &  name 
)

Definition at line 181 of file EgHLTOfflineSource.cc.

References binData_, cutMasks_, phoFilterMonHists_, and trigCodes.

Referenced by bookHistograms().

182 {
183  PhoHLTFilterMon* filterMon = new PhoHLTFilterMon(monElemFuncs,name,trigCodes->getCode(name.c_str()),binData_,cutMasks_);
184  phoFilterMonHists_.push_back(filterMon);
185  std::sort(phoFilterMonHists_.begin(),phoFilterMonHists_.end(),PhoHLTFilterMon::ptrLess<PhoHLTFilterMon>()); //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_
void EgHLTOfflineSource::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 139 of file EgHLTOfflineSource.cc.

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

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 
151  for(size_t pathNr=0;pathNr<eleFilterMonHists_.size();pathNr++){
152  eleFilterMonHists_[pathNr]->fill(offEvt_,weight);
153  }
154  for(size_t pathNr=0;pathNr<phoFilterMonHists_.size();pathNr++){
155  phoFilterMonHists_[pathNr]->fill(offEvt_,weight);
156  }
157 
158  for(size_t monElemNr=0;monElemNr<eleMonElems_.size();monElemNr++){
159  const std::vector<OffEle>& eles = offEvt_.eles();
160  for(size_t eleNr=0;eleNr<eles.size();eleNr++){
161  eleMonElems_[monElemNr]->fill(eles[eleNr],offEvt_,weight);
162  }
163  }
164 
165  for(size_t monElemNr=0;monElemNr<phoMonElems_.size();monElemNr++){
166  const std::vector<OffPho>& phos = offEvt_.phos();
167  for(size_t phoNr=0;phoNr<phos.size();phoNr++){
168  phoMonElems_[monElemNr]->fill(phos[phoNr],offEvt_,weight);
169  }
170  }
171 }
egHLT::OffHelper offEvtHelper_
MonitorElement * dqmErrsMonElem_
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
void Fill(long long x)
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:48
MonitorElement * nrEventsProcessedMonElem_
int makeOffEvt(const edm::Event &edmEvent, const edm::EventSetup &setup, egHLT::OffEvt &offEvent, const TrigCodes &trigCodes)
const std::vector< OffEle > & eles() const
Definition: EgHLTOffEvt.h:46
std::unique_ptr< egHLT::TrigCodes > trigCodes
int weight
Definition: histoStyle.py:50
void EgHLTOfflineSource::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  run,
edm::EventSetup const &  c 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 64 of file EgHLTOfflineSource.cc.

References addEleTrigPath(), addPhoTrigPath(), binData_, DQMStore::IBooker::book1D(), DQMStore::IBooker::bookInt(), cutMasks_, diEleTightLooseTrigNames_, diPhoTightLooseTrigNames_, dirName_, dqmErrsMonElem_, eleHLTFilterNames2Leg_, eleHLTFilterNames_, eleMonElems_, eleTightLooseTrigNames_, filterInactiveTriggers_, filterTriggers(), spr::find(), getHLTFilterNamesUsed(), HltComparatorCreateWorkflow::hltConfig, hltTag_, i, HLTConfigProvider::init(), egHLT::MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(), egHLT::MonElemFuncs::initTightLooseTrigHists(), egHLT::MonElemFuncs::initTrigTagProbeHist(), egHLT::MonElemFuncs::initTrigTagProbeHist_2Leg(), nrEventsProcessedMonElem_, offEvtHelper_, phoHLTFilterNames_, phoMonElems_, phoTightLooseTrigNames_, DQMStore::IBooker::setCurrentFolder(), egHLT::OffHelper::setupTriggers(), trigCodes, egHLT::CutMasks::trigTPEle, and egHLT::CutMasks::trigTPPho.

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

Definition at line 235 of file EgHLTOfflineSource.cc.

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

Referenced by bookHistograms().

236 {
237 
238  std::vector<std::string> activeFilters;
239  std::vector<std::string> activeEleFilters;
240  std::vector<std::string> activeEle2LegFilters;
241  std::vector<std::string> activePhoFilters;
242  std::vector<std::string> activePho2LegFilters;
243 
244  trigTools::getActiveFilters(hltConfig,activeFilters,activeEleFilters,activeEle2LegFilters,activePhoFilters,activePho2LegFilters);
245 
253 }
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 filterInactiveTriggers(std::vector< std::string > &namesToFilter, std::vector< std::string > &activeFilters)
void filterInactiveTightLooseTriggers(std::vector< std::string > &namesToFilter, const std::vector< std::string > &activeFilters)
void EgHLTOfflineSource::getHLTFilterNamesUsed ( std::vector< std::string > &  filterNames) const

Definition at line 195 of file EgHLTOfflineSource.cc.

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

Referenced by bookHistograms().

196 {
197  std::set<std::string> filterNameSet;
198  for(size_t i=0;i<eleHLTFilterNames_.size();i++) filterNameSet.insert(eleHLTFilterNames_[i]);
199  for(size_t i=0;i<phoHLTFilterNames_.size();i++) filterNameSet.insert(phoHLTFilterNames_[i]);
200  //here we are little more complicated as entries are of the form "tightTrig:looseTrig"
201  //so we need to split them first
202  for(size_t tightLooseNr=0;tightLooseNr<eleTightLooseTrigNames_.size();tightLooseNr++){
203  std::vector<std::string> trigNames;
204  boost::split(trigNames,eleTightLooseTrigNames_[tightLooseNr],boost::is_any_of(std::string(":")));
205  if(trigNames.size()!=2) continue; //format incorrect
206  filterNameSet.insert(trigNames[0]);
207  filterNameSet.insert(trigNames[1]);
208  }
209  for(size_t tightLooseNr=0;tightLooseNr<diEleTightLooseTrigNames_.size();tightLooseNr++){
210  std::vector<std::string> trigNames;
211  boost::split(trigNames,diEleTightLooseTrigNames_[tightLooseNr],boost::is_any_of(std::string(":")));
212  if(trigNames.size()!=2) continue; //format incorrect
213  filterNameSet.insert(trigNames[0]);
214  filterNameSet.insert(trigNames[1]);
215  }
216  for(size_t tightLooseNr=0;tightLooseNr<phoTightLooseTrigNames_.size();tightLooseNr++){
217  std::vector<std::string> trigNames;
218  boost::split(trigNames,phoTightLooseTrigNames_[tightLooseNr],boost::is_any_of(std::string(":")));
219  if(trigNames.size()!=2) continue; //format incorrect
220  filterNameSet.insert(trigNames[0]);
221  filterNameSet.insert(trigNames[1]);
222  }
223  for(size_t tightLooseNr=0;tightLooseNr<diPhoTightLooseTrigNames_.size();tightLooseNr++){
224  std::vector<std::string> trigNames;
225  boost::split(trigNames,diPhoTightLooseTrigNames_[tightLooseNr],boost::is_any_of(std::string(":")));
226  if(trigNames.size()!=2) continue; //format incorrect
227  filterNameSet.insert(trigNames[0]);
228  filterNameSet.insert(trigNames[1]);
229  }
230  //right all the triggers are inserted once and only once in the set, convert to vector
231  //very lazy, create a new vector so can use the constructor and then use swap to transfer
232  std::vector<std::string>(filterNameSet.begin(),filterNameSet.end()).swap(filterNames);
233 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
std::vector< std::string > diPhoTightLooseTrigNames_
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleTightLooseTrigNames_
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:74
std::vector< std::string > phoHLTFilterNames_
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
double split
Definition: MVATrainer.cc:139
EgHLTOfflineSource& EgHLTOfflineSource::operator= ( const EgHLTOfflineSource rhs)
privatedelete

Member Data Documentation

egHLT::BinData EgHLTOfflineSource::binData_
private
egHLT::CutMasks EgHLTOfflineSource::cutMasks_
private
std::vector<std::string> EgHLTOfflineSource::diEleTightLooseTrigNames_
private
std::vector<std::string> EgHLTOfflineSource::diPhoTightLooseTrigNames_
private
std::string EgHLTOfflineSource::dirName_
private

Definition at line 70 of file EgHLTOfflineSource.h.

Referenced by bookHistograms(), and EgHLTOfflineSource().

MonitorElement* EgHLTOfflineSource::dqmErrsMonElem_
private

Definition at line 61 of file EgHLTOfflineSource.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 65 of file EgHLTOfflineSource.h.

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

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

Definition at line 80 of file EgHLTOfflineSource.h.

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

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

Definition at line 67 of file EgHLTOfflineSource.h.

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

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

Definition at line 89 of file EgHLTOfflineSource.h.

Referenced by bookHistograms(), and EgHLTOfflineSource().

std::string EgHLTOfflineSource::hltTag_
private

Definition at line 90 of file EgHLTOfflineSource.h.

Referenced by bookHistograms(), and EgHLTOfflineSource().

int EgHLTOfflineSource::nrEventsProcessed_
private

Definition at line 63 of file EgHLTOfflineSource.h.

Referenced by analyze().

MonitorElement* EgHLTOfflineSource::nrEventsProcessedMonElem_
private

Definition at line 62 of file EgHLTOfflineSource.h.

Referenced by analyze(), and bookHistograms().

egHLT::OffEvt EgHLTOfflineSource::offEvt_
private

Definition at line 72 of file EgHLTOfflineSource.h.

Referenced by analyze().

egHLT::OffHelper EgHLTOfflineSource::offEvtHelper_
private

Definition at line 73 of file EgHLTOfflineSource.h.

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

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

Definition at line 66 of file EgHLTOfflineSource.h.

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

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

Definition at line 68 of file EgHLTOfflineSource.h.

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

std::vector<std::string> EgHLTOfflineSource::phoTightLooseTrigNames_
private
std::unique_ptr<egHLT::TrigCodes> EgHLTOfflineSource::trigCodes
private

Definition at line 74 of file EgHLTOfflineSource.h.

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