CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
EmDQM Class Reference

#include <EmDQM.h>

Inheritance diagram for EmDQM:
DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
 EmDQM (const edm::ParameterSet &pset)
 Constructor. More...
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
 ~EmDQM () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

bool checkGeneratedParticlesRequirement (const edm::Event &event)
 
bool checkRecoParticlesRequirement (const edm::Event &event)
 
int countSubstring (const std::string &, const std::string &)
 
std::vector< std::vector< std::string > > findEgammaPaths ()
 
std::vector< std::string > getFilterModules (const std::string &)
 
double getPrimaryEtCut (const std::string &)
 
edm::ParameterSet makePSetForEgammaDoubleEtDeltaPhiFilter (const std::string &)
 
edm::ParameterSet makePSetForEgammaGenericFilter (const std::string &)
 
edm::ParameterSet makePSetForEgammaGenericQuadraticFilter (const std::string &)
 
edm::ParameterSet makePSetForElectronGenericFilter (const std::string &)
 
edm::ParameterSet makePSetForEtFilter (const std::string &)
 
edm::ParameterSet makePSetForL1SeedFilter (const std::string &)
 
edm::ParameterSet makePSetForL1SeedToSuperClusterMatchFilter (const std::string &)
 
edm::ParameterSet makePSetForOneOEMinusOneOPFilter (const std::string &)
 
edm::ParameterSet makePSetForPixelMatchFilter (const std::string &)
 
void SetVarsFromPSet (std::vector< edm::ParameterSet >::iterator)
 

Private Attributes

bool autoConfMode_
 
std::string dirname_
 
double eta2DMax_
 
std::vector< MonitorElement * > etagens
 
std::vector< std::vector< MonitorElement * > > etahistmatchs
 
std::vector< std::vector< MonitorElement * > > etahists
 
double etaMax_
 
std::vector< MonitorElement * > etaphigens
 
std::vector< std::vector< MonitorElement * > > etaphihistmatchs
 
std::vector< std::vector< MonitorElement * > > etaphihists
 
std::vector< MonitorElement * > etgens
 
std::vector< std::vector< MonitorElement * > > ethistmatchs
 
std::vector< std::vector< MonitorElement * > > ethists
 
unsigned int gencut_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
 
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
 
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
 
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidWenu_token
 
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidZee_token
 
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
 
edm::InputTag gencutCollection_
 
double genEtaAcc_
 
double genEtAcc_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > genParticles_token
 
std::vector< std::vector< MonitorElement * > > histEtaOfHltObjMatchToGens
 
std::vector< std::vector< MonitorElement * > > histEtaPhiOfHltObjMatchToGens
 
std::vector< std::vector< MonitorElement * > > histEtOfHltObjMatchToGens
 
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerClu
 
HistoFiller< reco::ElectronCollection > * histoFillerEle
 
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1Iso
 
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1NonIso
 
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerPho
 
std::vector< std::vector< MonitorElement * > > histPhiOfHltObjMatchToGens
 
std::set< std::string > hltCollectionLabelsFound
 
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
 
std::set< std::string > hltCollectionLabelsMissed
 
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
 
HLTConfigProvider hltConfig_
 The instance of the HLTConfigProvider as a data member. More...
 
edm::EDGetTokenT< edm::TriggerResultshltResults_token
 
bool isData_
 
std::vector< std::vector< edm::InputTag > > isoNames
 
bool mcMatchedOnly_
 
unsigned int minEtForEtaEffPlot_
 
unsigned int nbins2D_
 
unsigned int nbins_
 
std::vector< unsigned int > nCandCuts
 
bool noIsolationPlots_
 
bool noPhiPlots_
 
unsigned int numOfHLTCollectionLabels
 
std::vector< edm::ParameterSetparamSets
 
unsigned int pathIndex
 
int pdgGen
 
double phi2DMax_
 
std::vector< MonitorElement * > phigens
 
std::vector< std::vector< MonitorElement * > > phihistmatchs
 
std::vector< std::vector< MonitorElement * > > phihists
 
double phiMax_
 
std::vector< std::pair< double, double > > plotBounds
 
double plotEtMin
 
std::vector< bool > plotiso
 
double plotPtMax
 
double plotPtMin
 
const edm::ParameterSetpset
 
GreaterByPt< reco::ParticlepTComparator_
 
GreaterByPt< reco::GenParticlepTGenComparator_
 
double ptMax_
 
double ptMin_
 
unsigned int reqNum
 
std::vector< std::string > theHLTCollectionHumanNames
 
std::vector< edm::InputTagtheHLTCollectionLabels
 
std::vector< int > theHLTOutputTypes
 
edm::InputTag theL1Seed
 
std::vector< MonitorElement * > totalmatchs
 
std::vector< MonitorElement * > totals
 
edm::InputTag triggerObject_
 
edm::EDGetTokenT< trigger::TriggerEventWithRefstriggerObject_token
 
bool useHumanReadableHistTitles_
 
unsigned int verbosity_
 

Static Private Attributes

static const unsigned OUTPUT_ALL = 3
 
static const unsigned OUTPUT_ERRORS = 1
 
static const unsigned OUTPUT_SILENT = 0
 
static const unsigned OUTPUT_WARNINGS = 2
 
static const unsigned TYPE_DOUBLE_ELE = 1
 
static const unsigned TYPE_DOUBLE_PHOTON = 3
 
static const unsigned TYPE_SINGLE_ELE = 0
 
static const unsigned TYPE_SINGLE_PHOTON = 2
 
static const unsigned TYPE_TRIPLE_ELE = 4
 

Friends

class HistoFiller< l1extra::L1EmParticleCollection >
 
class HistoFiller< reco::ElectronCollection >
 
class HistoFiller< reco::RecoEcalCandidateCollection >
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::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)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 63 of file EmDQM.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 12 of file EmDQM.cc.

References autoConfMode_, eta2DMax_, etaMax_, gencutColl_fidDiGamma_token, gencutColl_fidGammaJet_token, gencutColl_fidTripleEle_token, gencutColl_fidWenu_token, gencutColl_fidZee_token, gencutColl_manualConf_token, genEtaAcc_, genEtAcc_, genParticles_token, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), histoFillerClu, histoFillerEle, histoFillerL1Iso, histoFillerL1NonIso, histoFillerPho, hltResults_token, isData_, mcMatchedOnly_, minEtForEtaEffPlot_, nbins2D_, nbins_, noIsolationPlots_, noPhiPlots_, paramSets, phi2DMax_, phiMax_, pset, ptMax_, ptMin_, triggerObject_, triggerObject_token, useHumanReadableHistTitles_, and verbosity_.

12  : pset(pset_)
13 {
14  // are we running in automatic configuration mode with the HLTConfigProvider
15  // or with a per path python config file
16  autoConfMode_ = pset.getUntrackedParameter<bool>("autoConfMode", false);
17 
18  // set global parameters
19  triggerObject_ = pset_.getParameter<edm::InputTag>("triggerobject");
20  verbosity_ = pset_.getUntrackedParameter<unsigned int>("verbosity",0);
21  genEtaAcc_ = pset.getParameter<double>("genEtaAcc");
22  genEtAcc_ = pset.getParameter<double>("genEtAcc");
23  ptMax_ = pset.getUntrackedParameter<double>("PtMax",1000.);
24  ptMin_ = pset.getUntrackedParameter<double>("PtMin",0.);
25  etaMax_ = pset.getUntrackedParameter<double>("EtaMax", 2.7);
26  phiMax_ = pset.getUntrackedParameter<double>("PhiMax", 3.15);
27  nbins_ = pset.getUntrackedParameter<unsigned int>("Nbins",40);
28  eta2DMax_ = pset.getUntrackedParameter<double>("Eta2DMax", 2.8);
29  phi2DMax_ = pset.getUntrackedParameter<double>("Phi2DMax", 3.2);
30  nbins2D_ = pset.getUntrackedParameter<unsigned int>("Nbins2D",16);
31  minEtForEtaEffPlot_ = pset.getUntrackedParameter<unsigned int>("minEtForEtaEffPlot", 15);
32  useHumanReadableHistTitles_ = pset.getUntrackedParameter<bool>("useHumanReadableHistTitles", false);
33  mcMatchedOnly_ = pset.getUntrackedParameter<bool>("mcMatchedOnly", true);
34  noPhiPlots_ = pset.getUntrackedParameter<bool>("noPhiPlots", true);
35  noIsolationPlots_ = pset.getUntrackedParameter<bool>("noIsolationPlots", true);
36 
37  if (!autoConfMode_) {
38  paramSets.push_back(pset);
39  isData_ = false;
40  } else {
41  isData_ = pset.getParameter<bool>("isData");
42  }
43 
49 
50  // consumes
51  genParticles_token = consumes<edm::View<reco::Candidate> >(edm::InputTag("genParticles"));
52  triggerObject_token = consumes<trigger::TriggerEventWithRefs>(triggerObject_);
53  hltResults_token = consumes<edm::TriggerResults>(edm::InputTag("TriggerResults", "", triggerObject_.process()));
54  if (autoConfMode_) {
55  gencutColl_fidWenu_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialWenu"));
56  gencutColl_fidZee_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialZee"));
57  gencutColl_fidTripleEle_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialTripleEle"));
58  gencutColl_fidGammaJet_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialGammaJet"));
59  gencutColl_fidDiGamma_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialDiGamma"));
60  } else {
61  gencutColl_manualConf_token = consumes<edm::View<reco::Candidate> >(pset.getParameter<edm::InputTag>("cutcollection"));
62  }
63 }
double ptMax_
Definition: EmDQM.h:104
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidZee_token
Definition: EmDQM.h:227
edm::EDGetTokenT< edm::View< reco::Candidate > > genParticles_token
Definition: EmDQM.h:223
bool noPhiPlots_
Definition: EmDQM.h:115
double phiMax_
Definition: EmDQM.h:107
HistoFiller< reco::ElectronCollection > * histoFillerEle
Definition: EmDQM.h:88
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidWenu_token
Definition: EmDQM.h:226
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1Iso
Definition: EmDQM.h:92
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1NonIso
Definition: EmDQM.h:90
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerPho
Definition: EmDQM.h:91
edm::InputTag triggerObject_
Definition: EmDQM.h:99
bool noIsolationPlots_
Definition: EmDQM.h:116
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
Definition: EmDQM.h:229
const edm::ParameterSet & pset
Definition: EmDQM.h:97
unsigned int nbins_
Definition: EmDQM.h:108
bool isData_
Definition: EmDQM.h:103
double eta2DMax_
Definition: EmDQM.h:109
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
Definition: EmDQM.h:230
double ptMin_
Definition: EmDQM.h:105
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:154
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
Definition: EmDQM.h:228
unsigned int nbins2D_
Definition: EmDQM.h:111
double genEtAcc_
Definition: EmDQM.h:102
bool autoConfMode_
Definition: EmDQM.h:95
std::string const & process() const
Definition: InputTag.h:40
bool useHumanReadableHistTitles_
Definition: EmDQM.h:113
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObject_token
Definition: EmDQM.h:224
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQM.h:89
bool mcMatchedOnly_
Definition: EmDQM.h:114
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
Definition: EmDQM.h:231
unsigned int verbosity_
Definition: EmDQM.h:100
double genEtaAcc_
Definition: EmDQM.h:101
double phi2DMax_
Definition: EmDQM.h:110
unsigned int minEtForEtaEffPlot_
Definition: EmDQM.h:112
edm::EDGetTokenT< edm::TriggerResults > hltResults_token
Definition: EmDQM.h:225
double etaMax_
Definition: EmDQM.h:106
EmDQM::~EmDQM ( )
override

Destructor.

Definition at line 607 of file EmDQM.cc.

607  {
608 }

Member Function Documentation

void EmDQM::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
override

Definition at line 729 of file EmDQM.cc.

References autoConfMode_, checkGeneratedParticlesRequirement(), checkRecoParticlesRequirement(), stringResolutionProvider_cfi::et, PVValHelper::eta, etagens, etaphigens, etgens, HistoFiller< T >::fillHistos(), gencut_, gencutColl_fidDiGamma_token, gencutColl_fidGammaJet_token, gencutColl_fidTripleEle_token, gencutColl_fidWenu_token, gencutColl_fidZee_token, gencutColl_manualConf_token, histoFillerClu, histoFillerEle, histoFillerL1Iso, histoFillerL1NonIso, histoFillerPho, hltCollectionLabelsFound, hltCollectionLabelsFoundPerPath, hltCollectionLabelsMissed, hltCollectionLabelsMissedPerPath, hltConfig_, SelectingProcedure_cff::hltResults, hltResults_token, mps_fire::i, edm::HLTGlobalStatus::index(), createfilelist::int, edm::EventBase::isRealData(), edm::HandleBase::isValid(), mcMatchedOnly_, minEtForEtaEffPlot_, HLTConfigProvider::moduleIndex(), gen::n, nCandCuts, noPhiPlots_, numOfHLTCollectionLabels, OUTPUT_ERRORS, OUTPUT_WARNINGS, paramSets, pathIndex, pdgGen, phi, phigens, plotEtMin, pTComparator_, reqNum, SetVarsFromPSet(), theHLTCollectionLabels, theHLTOutputTypes, totalmatchs, totals, trigger::TriggerCluster, trigger::TriggerElectron, trigger::TriggerL1IsoEG, trigger::TriggerL1NoIsoEG, triggerObject_, triggerObject_token, trigger::TriggerPhoton, and verbosity_.

730 {
731  // loop over all the trigger path parameter sets
732  unsigned int vPos = 0;
733  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end(); ++psetIt, ++vPos) {
734  SetVarsFromPSet(psetIt);
735  // get the set forthe current path
738 
740  // Check if there's enough gen particles //
741  // of interest //
743  // get the right data according to the trigger path currently looked at
745  if (autoConfMode_) {
746  switch(reqNum) {
747  case 1:
748  if (pdgGen == 11) event.getByToken(gencutColl_fidWenu_token, cutCounter);
749  else event.getByToken(gencutColl_fidGammaJet_token, cutCounter);
750  break;
751  case 2:
752  if (pdgGen == 11) event.getByToken(gencutColl_fidZee_token, cutCounter);
753  else event.getByToken(gencutColl_fidDiGamma_token, cutCounter);
754  break;
755  case 3:
756  event.getByToken(gencutColl_fidTripleEle_token, cutCounter);
757  break;
758  }
759  } else {
760  event.getByToken(gencutColl_manualConf_token, cutCounter);
761  }
762  if (cutCounter->size() < (unsigned int)gencut_) {
763  //edm::LogWarning("EmDQM") << "Less than "<< gencut_ <<" gen particles with pdgId=" << pdgGen;
764  continue;
765  }
766 
767  // fill L1 and HLT info
768  // get objects possed by each filter
770  event.getByToken(triggerObject_token,triggerObj);
771  if(!triggerObj.isValid()) {
773  edm::LogWarning("EmDQM") << "parameter triggerobject (" << triggerObject_ << ") does not corresond to a valid TriggerEventWithRefs product. Please check especially the process name (e.g. when running over reprocessed datasets)";
774  continue;
775  }
776 
777  // Were enough high energy gen particles found?
778  if (event.isRealData()) {
779  // running validation on data.
780  // TODO: we should check that the entire
781  // run is on the same type (all data or
782  // all MC). Otherwise one gets
783  // uninterpretable results...
784  if (!checkRecoParticlesRequirement(event))
785  continue;
786  }
787  else { // MC
788  // if no, throw event away
790  continue;
791  }
792 
793  // It was an event worth keeping. Continue.
794 
796  // Fill the bin labeled "Total" //
797  // This will be the number of events looked at. //
799  if (!mcMatchedOnly_) totals.at(vPos)->Fill(numOfHLTCollectionLabels+0.5);
800  totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels+0.5);
801 
803  // Fill generator info //
805  // the gencut_ highest Et generator objects of the preselected type are our matches
806 
807  std::vector<reco::Particle> sortedGen;
808  for(edm::View<reco::Candidate>::const_iterator genpart = cutCounter->begin(); genpart != cutCounter->end();genpart++){
809  reco::Particle tmpcand( genpart->charge(), genpart->p4(), genpart->vertex(),genpart->pdgId(),genpart->status() );
810  if (tmpcand.et() >= plotEtMin) {
811  sortedGen.push_back(tmpcand);
812  }
813  }
814  std::sort(sortedGen.begin(),sortedGen.end(),pTComparator_ );
815 
816  // Now the collection of gen particles is sorted by pt.
817  // So, remove all particles from the collection so that we
818  // only have the top "1 thru gencut_" particles in it
819  if (sortedGen.size() < gencut_){
820  continue;
821  }
822  sortedGen.erase(sortedGen.begin()+gencut_,sortedGen.end());
823 
824  for (unsigned int i = 0 ; i < gencut_ ; i++ ) {
825  etgens.at(vPos)->Fill( sortedGen[i].et() ); //validity has been implicitily checked by the cut on gencut_ above
826  if (sortedGen[i].et() > minEtForEtaEffPlot_) {
827  etagens.at(vPos)->Fill( sortedGen[i].eta() );
828  if (!noPhiPlots_) phigens.at(vPos)->Fill( sortedGen[i].phi() );
829  etaphigens.at(vPos)->Fill( sortedGen[i].eta(),sortedGen[i].phi() );
830  }
831  } // END of loop over Generated particles
832  if (gencut_ >= reqNum && !mcMatchedOnly_) totals.at(vPos)->Fill(numOfHLTCollectionLabels+1.5); // this isn't really needed anymore keep for backward comp.
833  if (gencut_ >= reqNum) totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels+1.5); // this isn't really needed anymore keep for backward comp.
834 
835  bool accepted = true; // flags that the event has been accepted by all filters before
837  event.getByToken(hltResults_token, hltResults);
839  // Loop over filter modules //
841  for(unsigned int n=0; n < numOfHLTCollectionLabels ; n++) {
842  // check that there are not less sortedGen particles than nCandCut requires for this filter
843  if (sortedGen.size() < nCandCuts.at(n)) {
844  if (verbosity_ >= OUTPUT_ERRORS)
845  edm::LogError("EmDQM") << "There are less generated particles than the module '" << theHLTCollectionLabels[n].label() << "' requires.";
846  continue;
847  }
848  std::vector<reco::Particle> sortedGenForFilter(sortedGen);
849  sortedGenForFilter.erase(sortedGenForFilter.begin() + nCandCuts.at(n), sortedGenForFilter.end());
850 
851  // Fill only if this filter was run.
852  if (pathIndex != 0 && hltConfig_.moduleIndex(pathIndex, theHLTCollectionLabels[n].label()) > hltResults->index(pathIndex)) break;
853  // These numbers are from the Parameter Set, such as:
854  // theHLTOutputTypes = cms.uint32(100)
855  switch(theHLTOutputTypes[n])
856  {
857  case trigger::TriggerL1NoIsoEG: // Non-isolated Level 1
858  histoFillerL1NonIso->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
859  break;
860  case trigger::TriggerL1IsoEG: // Isolated Level 1
861  histoFillerL1Iso->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
862  break;
863  case trigger::TriggerPhoton: // Photon
864  histoFillerPho->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
865  break;
866  case trigger::TriggerElectron: // Electron
867  histoFillerEle->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
868  break;
869  case trigger::TriggerCluster: // TriggerCluster
870  histoFillerClu->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
871  break;
872  default:
873  throw(cms::Exception("Release Validation Error") << "HLT output type not implemented: theHLTOutputTypes[n]" );
874  }
875  } // END of loop over filter modules
876 
877  // earse the dummy and fill with real set
880  }
881 }
std::vector< MonitorElement * > totals
Definition: EmDQM.h:211
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidZee_token
Definition: EmDQM.h:227
void fillHistos(edm::Handle< trigger::TriggerEventWithRefs > &, const edm::Event &, unsigned int, unsigned int, std::vector< reco::Particle > &, bool &)
Definition: EmDQM.cc:887
bool checkRecoParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:668
unsigned int numOfHLTCollectionLabels
Definition: EmDQM.h:158
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
Definition: EmDQM.h:190
bool noPhiPlots_
Definition: EmDQM.h:115
int pdgGen
Definition: EmDQM.h:168
std::set< std::string > hltCollectionLabelsFound
Definition: EmDQM.h:187
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
Definition: EmDQM.h:186
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
HistoFiller< reco::ElectronCollection > * histoFillerEle
Definition: EmDQM.h:88
double plotEtMin
Definition: EmDQM.h:170
bool isRealData() const
Definition: EventBase.h:64
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:244
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidWenu_token
Definition: EmDQM.h:226
std::vector< MonitorElement * > etagens
Definition: EmDQM.h:215
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQM.h:157
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1Iso
Definition: EmDQM.h:92
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1NonIso
Definition: EmDQM.h:90
unsigned int gencut_
Definition: EmDQM.h:183
std::vector< unsigned int > nCandCuts
Definition: EmDQM.h:165
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerPho
Definition: EmDQM.h:91
edm::InputTag triggerObject_
Definition: EmDQM.h:99
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:245
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
Definition: EmDQM.h:229
std::set< std::string > hltCollectionLabelsMissed
Definition: EmDQM.h:191
void SetVarsFromPSet(std::vector< edm::ParameterSet >::iterator)
Definition: EmDQM.cc:1563
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
Definition: EmDQM.h:230
bool checkGeneratedParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:611
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:154
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
Definition: EmDQM.h:228
bool autoConfMode_
Definition: EmDQM.h:95
et
define resolution functions of each parameter
unsigned int pathIndex
Definition: EmDQM.h:156
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObject_token
Definition: EmDQM.h:224
std::vector< MonitorElement * > totalmatchs
Definition: EmDQM.h:212
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQM.h:89
bool mcMatchedOnly_
Definition: EmDQM.h:114
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
Definition: EmDQM.h:231
GreaterByPt< reco::Particle > pTComparator_
Definition: EmDQM.h:219
std::vector< MonitorElement * > phigens
Definition: EmDQM.h:216
unsigned int verbosity_
Definition: EmDQM.h:100
std::vector< int > theHLTOutputTypes
Definition: EmDQM.h:161
unsigned int reqNum
Definition: EmDQM.h:167
std::vector< MonitorElement * > etaphigens
Definition: EmDQM.h:217
unsigned int minEtForEtaEffPlot_
Definition: EmDQM.h:112
edm::EDGetTokenT< edm::TriggerResults > hltResults_token
Definition: EmDQM.h:225
std::vector< MonitorElement * > etgens
Definition: EmDQM.h:214
void EmDQM::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 390 of file EmDQM.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), dirname_, eta2DMax_, etagens, etahistmatchs, etahists, etaMax_, etaphigens, etaphihistmatchs, etaphihists, etgens, ethistmatchs, ethists, histEtaOfHltObjMatchToGens, histEtaPhiOfHltObjMatchToGens, histEtOfHltObjMatchToGens, histPhiOfHltObjMatchToGens, mps_fire::i, diffTwoXMLs::label, mcMatchedOnly_, nbins2D_, nbins_, noPhiPlots_, numOfHLTCollectionLabels, paramSets, pdgGen, phi2DMax_, phigens, phihistmatchs, phihists, phiMax_, plotPtMax, plotPtMin, MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), SetVarsFromPSet(), AlCaHLTBitMon_QueryRunRegistry::string, theHLTCollectionHumanNames, theHLTCollectionLabels, pileupDistInMC::total, totalmatchs, totals, and useHumanReadableHistTitles_.

391 {
393  // loop over all the trigger path parameter sets
395  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end(); ++psetIt) {
396  SetVarsFromPSet(psetIt);
397 
398  iBooker.setCurrentFolder(dirname_);
399 
401  // Set up Histogram of Effiency vs Step. //
402  // theHLTCollectionLabels is a vector of InputTags //
403  // from the configuration file. //
405  // Et & eta distributions
406  std::vector<MonitorElement*> etahist;
407  std::vector<MonitorElement*> phihist;
408  std::vector<MonitorElement*> ethist;
409  std::vector<MonitorElement*> etahistmatch;
410  std::vector<MonitorElement*> phihistmatch;
411  std::vector<MonitorElement*> ethistmatch;
412  std::vector<MonitorElement*> histEtOfHltObjMatchToGen;
413  std::vector<MonitorElement*> histEtaOfHltObjMatchToGen;
414  std::vector<MonitorElement*> histPhiOfHltObjMatchToGen;
415  std::vector<MonitorElement*> etaphihist;
416  std::vector<MonitorElement*> etaphihistmatch;
417  std::vector<MonitorElement*> histEtaPhiOfHltObjMatchToGen;
418  // Plots of efficiency per step
420  MonitorElement* totalmatch;
421  //generator histograms
422  MonitorElement* etgen;
423  MonitorElement* etagen;
424  MonitorElement* phigen;
425  MonitorElement* etaphigen;
426 
427  std::string histName="total_eff";
428  std::string histTitle = "total events passing";
429  if (!mcMatchedOnly_) {
430  // This plot will have bins equal to 2+(number of
431  // HLTCollectionLabels in the config file)
432  total = iBooker.book1D(histName.c_str(),histTitle.c_str(),numOfHLTCollectionLabels+2,0,numOfHLTCollectionLabels+2);
433  total->setBinLabel(numOfHLTCollectionLabels+1,"Total");
434  total->setBinLabel(numOfHLTCollectionLabels+2,"Gen");
435  for (unsigned int u=0; u<numOfHLTCollectionLabels; u++) {
436  total->setBinLabel(u+1,theHLTCollectionLabels[u].label());
437  }
438  }
439 
440  histName="total_eff_MC_matched";
441  histTitle="total events passing (mc matched)";
442  totalmatch = iBooker.book1D(histName.c_str(),histTitle.c_str(),numOfHLTCollectionLabels+2,0,numOfHLTCollectionLabels+2);
443  totalmatch->setBinLabel(numOfHLTCollectionLabels+1,"Total");
444  totalmatch->setBinLabel(numOfHLTCollectionLabels+2,"Gen");
445  for (unsigned int u=0; u<numOfHLTCollectionLabels; u++) {
446  totalmatch->setBinLabel(u+1,theHLTCollectionLabels[u].label());
447  }
448 
449  MonitorElement* tmphisto;
450  //MonitorElement* tmpiso;
451 
453  // Set up generator-level histograms //
455  std::string pdgIdString;
456  switch(pdgGen) {
457  case 11:
458  pdgIdString="Electron";break;
459  case 22:
460  pdgIdString="Photon";break;
461  default:
462  pdgIdString="Particle";
463  }
464 
465  histName = "gen_et";
466  histTitle= "E_{T} of " + pdgIdString + "s" ;
467  etgen = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,plotPtMin,plotPtMax);
468  histName = "gen_eta";
469  histTitle= "#eta of "+ pdgIdString +"s " ;
470  etagen = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,-etaMax_, etaMax_);
471  histName = "gen_phi";
472  histTitle= "#phi of "+ pdgIdString +"s " ;
473  if (!noPhiPlots_) phigen = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,-phiMax_, phiMax_);
474  histName = "gen_etaphi";
475  histTitle= "#eta-#phi of "+ pdgIdString +"s " ;
476  etaphigen = iBooker.book2D(histName.c_str(),histTitle.c_str(), nbins2D_-2,-eta2DMax_, eta2DMax_,nbins2D_,-phi2DMax_, phi2DMax_);
478  // Set up histograms of HLT objects //
480  // Determine what strings to use for histogram titles
481  std::vector<std::string> HltHistTitle;
482  if ( theHLTCollectionHumanNames.size() == numOfHLTCollectionLabels && useHumanReadableHistTitles_ ) {
483  HltHistTitle = theHLTCollectionHumanNames;
484  } else {
485  for (unsigned int i =0; i < numOfHLTCollectionLabels; i++) {
486  HltHistTitle.push_back(theHLTCollectionLabels[i].label());
487  }
488  }
489 
490  for(unsigned int i = 0; i< numOfHLTCollectionLabels ; i++){
491  if (!mcMatchedOnly_) {
492  // Et distribution of HLT objects passing filter i
493  histName = theHLTCollectionLabels[i].label()+"et_all";
494  histTitle = HltHistTitle[i]+" Et (ALL)";
495  tmphisto = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,plotPtMin,plotPtMax);
496  ethist.push_back(tmphisto);
497 
498  // Eta distribution of HLT objects passing filter i
499  histName = theHLTCollectionLabels[i].label()+"eta_all";
500  histTitle = HltHistTitle[i]+" #eta (ALL)";
501  tmphisto = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,-etaMax_, etaMax_);
502  etahist.push_back(tmphisto);
503 
504  if (!noPhiPlots_) {
505  // Phi distribution of HLT objects passing filter i
506  histName = theHLTCollectionLabels[i].label()+"phi_all";
507  histTitle = HltHistTitle[i]+" #phi (ALL)";
508  tmphisto = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,-phiMax_, phiMax_);
509  phihist.push_back(tmphisto);
510  }
511 
512  histName = theHLTCollectionLabels[i].label()+"etaphi_all";
513  histTitle = HltHistTitle[i]+" #eta-#phi (ALL)";
514  tmphisto = iBooker.book2D(histName.c_str(),histTitle.c_str(),nbins2D_-2,-eta2DMax_, eta2DMax_,nbins2D_,-phi2DMax_, phi2DMax_);
515  etaphihist.push_back(tmphisto);
516 
517 
518  // Et distribution of HLT object that is closest delta-R match to sorted gen particle(s)
519  histName = theHLTCollectionLabels[i].label()+"et";
520  histTitle = HltHistTitle[i]+" Et";
521  tmphisto = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,plotPtMin,plotPtMax);
522  histEtOfHltObjMatchToGen.push_back(tmphisto);
523 
524  // eta distribution of HLT object that is closest delta-R match to sorted gen particle(s)
525  histName = theHLTCollectionLabels[i].label()+"eta";
526  histTitle = HltHistTitle[i]+" eta";
527  tmphisto = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,-etaMax_, etaMax_);
528  histEtaOfHltObjMatchToGen.push_back(tmphisto);
529 
530  if (!noPhiPlots_) {
531  // phi distribution of HLT object that is closest delta-R match to sorted gen particle(s)
532  histName = theHLTCollectionLabels[i].label()+"phi";
533  histTitle = HltHistTitle[i]+" phi";
534  tmphisto = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,-phiMax_, phiMax_);
535  histPhiOfHltObjMatchToGen.push_back(tmphisto);
536  }
537 
538  histName = theHLTCollectionLabels[i].label()+"etaphi";
539  histTitle = HltHistTitle[i]+" eta-phi";
540  tmphisto = iBooker.book2D(histName.c_str(),histTitle.c_str(),nbins2D_-2,-eta2DMax_, eta2DMax_,nbins2D_,-phi2DMax_, phi2DMax_);
541  histEtaPhiOfHltObjMatchToGen.push_back(tmphisto);
542  }
543 
544  // Et distribution of gen object matching HLT object passing filter i
545  histName = theHLTCollectionLabels[i].label()+"et_MC_matched";
546  histTitle = HltHistTitle[i]+" Et (MC matched)";
547  tmphisto = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,plotPtMin,plotPtMax);
548  ethistmatch.push_back(tmphisto);
549 
550  // Eta distribution of gen object matching HLT object passing filter i
551  histName = theHLTCollectionLabels[i].label()+"eta_MC_matched";
552  histTitle = HltHistTitle[i]+" #eta (MC matched)";
553  tmphisto = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,-etaMax_, etaMax_);
554  etahistmatch.push_back(tmphisto);
555 
556  if (!noPhiPlots_) {
557  // Phi distribution of gen object matching HLT object passing filter i
558  histName = theHLTCollectionLabels[i].label()+"phi_MC_matched";
559  histTitle = HltHistTitle[i]+" #phi (MC matched)";
560  tmphisto = iBooker.book1D(histName.c_str(),histTitle.c_str(),nbins_,-phiMax_, phiMax_);
561  phihistmatch.push_back(tmphisto);
562  }
563 
564  histName = theHLTCollectionLabels[i].label()+"etaphi_MC_matched";
565  histTitle = HltHistTitle[i]+" #eta-#phi (MC matched)";
566  tmphisto = iBooker.book2D(histName.c_str(),histTitle.c_str(),nbins2D_-2,-eta2DMax_, eta2DMax_,nbins2D_,-phi2DMax_, phi2DMax_);
567  etaphihistmatch.push_back(tmphisto);
568  }
569 
570  // Et & eta distributions
571  etahists.push_back(etahist);
572  phihists.push_back(phihist);
573  ethists.push_back(ethist);
574  etahistmatchs.push_back(etahistmatch);
575  phihistmatchs.push_back(phihistmatch);
576  ethistmatchs.push_back(ethistmatch);
577  histEtOfHltObjMatchToGens.push_back(histEtOfHltObjMatchToGen);
578  histEtaOfHltObjMatchToGens.push_back(histEtaOfHltObjMatchToGen);
579  histPhiOfHltObjMatchToGens.push_back(histPhiOfHltObjMatchToGen);
580  etaphihists.push_back(etaphihist);
581  etaphihistmatchs.push_back(etaphihistmatch);
582  histEtaPhiOfHltObjMatchToGens.push_back(histEtaPhiOfHltObjMatchToGen);
583  // commented out because uses data not included in HTLDEBUG and uses
584  // Isolation distributions
585  //etahistisos.push_back(etahistiso);
586  //phihistisos.push_back(phihistiso);
587  //ethistisos.push_back(ethistiso);
588  //etahistisomatchs.push_back(etahistisomatch);
589  //phihistisomatchs.push_back(phihistisomatch);
590  //ethistisomatchs.push_back(ethistisomatch);
591  //histEtIsoOfHltObjMatchToGens.push_back(histEtIsoOfHltObjMatchToGen);
592  //histEtaIsoOfHltObjMatchToGens.push_back(histEtaIsoOfHltObjMatchToGen);
593  //histPhiIsoOfHltObjMatchToGens.push_back(histPhiIsoOfHltObjMatchToGen);
594 
595  totals.push_back(total);
596  totalmatchs.push_back(totalmatch);
597  etgens.push_back(etgen);
598  etagens.push_back(etagen);
599  phigens.push_back(phigen);
600  etaphigens.push_back(etaphigen);
601  }
602 }
std::vector< MonitorElement * > totals
Definition: EmDQM.h:211
std::vector< std::vector< MonitorElement * > > histEtaPhiOfHltObjMatchToGens
Definition: EmDQM.h:209
std::vector< std::vector< MonitorElement * > > histEtOfHltObjMatchToGens
Definition: EmDQM.h:204
unsigned int numOfHLTCollectionLabels
Definition: EmDQM.h:158
std::vector< std::vector< MonitorElement * > > phihists
Definition: EmDQM.h:199
std::string dirname_
Definition: EmDQM.h:86
bool noPhiPlots_
Definition: EmDQM.h:115
int pdgGen
Definition: EmDQM.h:168
std::vector< std::vector< MonitorElement * > > histPhiOfHltObjMatchToGens
Definition: EmDQM.h:206
double phiMax_
Definition: EmDQM.h:107
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)
std::vector< std::vector< MonitorElement * > > etahists
Definition: EmDQM.h:198
std::vector< MonitorElement * > etagens
Definition: EmDQM.h:215
std::vector< std::vector< MonitorElement * > > ethists
Definition: EmDQM.h:200
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQM.h:157
std::vector< std::vector< MonitorElement * > > ethistmatchs
Definition: EmDQM.h:203
double plotPtMax
Definition: EmDQM.h:172
std::vector< std::vector< MonitorElement * > > etahistmatchs
Definition: EmDQM.h:201
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void SetVarsFromPSet(std::vector< edm::ParameterSet >::iterator)
Definition: EmDQM.cc:1563
std::vector< std::vector< MonitorElement * > > etaphihists
Definition: EmDQM.h:207
double plotPtMin
Definition: EmDQM.h:171
unsigned int nbins_
Definition: EmDQM.h:108
std::vector< std::vector< MonitorElement * > > phihistmatchs
Definition: EmDQM.h:202
double eta2DMax_
Definition: EmDQM.h:109
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:154
std::vector< std::vector< MonitorElement * > > etaphihistmatchs
Definition: EmDQM.h:208
unsigned int nbins2D_
Definition: EmDQM.h:111
std::vector< std::vector< MonitorElement * > > histEtaOfHltObjMatchToGens
Definition: EmDQM.h:205
bool useHumanReadableHistTitles_
Definition: EmDQM.h:113
std::vector< MonitorElement * > totalmatchs
Definition: EmDQM.h:212
bool mcMatchedOnly_
Definition: EmDQM.h:114
std::vector< std::string > theHLTCollectionHumanNames
Definition: EmDQM.h:159
std::vector< MonitorElement * > phigens
Definition: EmDQM.h:216
double phi2DMax_
Definition: EmDQM.h:110
std::vector< MonitorElement * > etaphigens
Definition: EmDQM.h:217
double etaMax_
Definition: EmDQM.h:106
std::vector< MonitorElement * > etgens
Definition: EmDQM.h:214
bool EmDQM::checkGeneratedParticlesRequirement ( const edm::Event event)
private

helper to check whether there were enough generator level electrons/photons (MC) or enough reco level electrons/photons to analyze this event.

Returns
if the event has enough of these candidates.

Definition at line 611 of file EmDQM.cc.

References funct::abs(), reco::LeafCandidate::et(), PVValHelper::eta, gencut_, genEtaAcc_, GenHFHadronMatcher_cfi::genParticles, genParticles_token, mps_fire::i, edm::HandleBase::isValid(), OUTPUT_WARNINGS, pdgGen, plotEtMin, pTGenComparator_, and verbosity_.

Referenced by analyze().

612 {
614  // Decide if this was an event of interest. //
615  // Did the highest energy particles happen //
616  // to have |eta| < 2.5 ? Then continue. //
619  event.getByToken(genParticles_token, genParticles);
620  if(!genParticles.isValid()) {
622  edm::LogWarning("EmDQM") << "genParticles invalid.";
623  return false;
624  }
625 
626  std::vector<reco::LeafCandidate> allSortedGenParticles;
627 
628  for(edm::View<reco::Candidate>::const_iterator currentGenParticle = genParticles->begin(); currentGenParticle != genParticles->end(); currentGenParticle++){
629 
630  // TODO: do we need to check the states here again ?
631  // in principle, there should collections produced with the python configuration
632  // (other than 'genParticles') which fulfill these criteria
633  if ( !( abs((*currentGenParticle).pdgId())==pdgGen && (*currentGenParticle).status()==1 && (*currentGenParticle).et() > 2.0) ) continue;
634 
635  reco::LeafCandidate tmpcand( *(currentGenParticle) );
636 
637  if (tmpcand.et() < plotEtMin) continue;
638 
639  allSortedGenParticles.push_back(tmpcand);
640  }
641 
642  std::sort(allSortedGenParticles.begin(), allSortedGenParticles.end(),pTGenComparator_);
643 
644  // return false if not enough particles found
645  if (allSortedGenParticles.size() < gencut_)
646  return false;
647 
648  // additional check (this might be legacy code and we need to check
649  // whether this should not be removed ?)
650 
651  // We now have a sorted collection of all generated particles
652  // with pdgId = pdgGen.
653  // Loop over them to see if the top gen particles have eta within acceptance
654  // bool keepEvent = true;
655  for (unsigned int i = 0 ; i < gencut_ ; i++ ) {
656  bool inECALgap = fabs(allSortedGenParticles[i].eta()) > 1.4442 && fabs(allSortedGenParticles[i].eta()) < 1.556;
657  if ( (fabs(allSortedGenParticles[i].eta()) > genEtaAcc_) || inECALgap ) {
658  //edm::LogWarning("EmDQM") << "Throwing event away. Gen particle with pdgId="<< allSortedGenParticles[i].pdgId() <<"; et="<< allSortedGenParticles[i].et() <<"; and eta="<< allSortedGenParticles[i].eta() <<" beyond acceptance.";
659  return false;
660  }
661  }
662 
663  // all tests passed
664  return true;
665 }
edm::EDGetTokenT< edm::View< reco::Candidate > > genParticles_token
Definition: EmDQM.h:223
int pdgGen
Definition: EmDQM.h:168
double plotEtMin
Definition: EmDQM.h:170
GreaterByPt< reco::GenParticle > pTGenComparator_
Definition: EmDQM.h:220
unsigned int gencut_
Definition: EmDQM.h:183
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:245
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:74
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
unsigned int verbosity_
Definition: EmDQM.h:100
double genEtaAcc_
Definition: EmDQM.h:101
bool EmDQM::checkRecoParticlesRequirement ( const edm::Event event)
private

similar to checkGeneratedParticlesRequirement(..) but for reconstructed particles. For the moment, there are some additional requirements in the MC version so we can't use the same code for both cases.

Definition at line 668 of file EmDQM.cc.

References autoConfMode_, gencut_, gencutColl_fidDiGamma_token, gencutColl_fidGammaJet_token, gencutColl_fidTripleEle_token, gencutColl_fidWenu_token, gencutColl_fidZee_token, gencutColl_manualConf_token, edm::HandleBase::isValid(), OUTPUT_WARNINGS, pdgGen, plotEtMin, reqNum, and verbosity_.

Referenced by analyze().

669 {
670  // note that this code is very similar to the one in checkGeneratedParticlesRequirement(..)
671  // and hopefully can be merged with it at some point in the future
672 
673  edm::Handle< edm::View<reco::Candidate> > referenceParticles;
674  // get the right data according to the trigger path currently looked at
675  if (autoConfMode_) {
676  switch(reqNum) {
677  case 1:
678  if (pdgGen == 11) event.getByToken(gencutColl_fidWenu_token, referenceParticles);
679  else event.getByToken(gencutColl_fidGammaJet_token, referenceParticles);
680  break;
681  case 2:
682  if (pdgGen == 11) event.getByToken(gencutColl_fidZee_token, referenceParticles);
683  else event.getByToken(gencutColl_fidDiGamma_token, referenceParticles);
684  break;
685  case 3:
686  event.getByToken(gencutColl_fidTripleEle_token, referenceParticles);
687  break;
688  }
689  } else {
690  event.getByToken(gencutColl_manualConf_token, referenceParticles);
691  }
692  if(!referenceParticles.isValid()) {
694  edm::LogWarning("EmDQM") << "referenceParticles invalid.";
695  return false;
696  }
697 
698  std::vector<const reco::Candidate *> allSortedReferenceParticles;
699 
700  for(edm::View<reco::Candidate>::const_iterator currentReferenceParticle = referenceParticles->begin();
701  currentReferenceParticle != referenceParticles->end();
702  currentReferenceParticle++)
703  {
704  if ( currentReferenceParticle->et() <= 2.0)
705  continue;
706 
707  // Note that for determining the overall efficiency,
708  // we should only allow
709  //
710  // HOWEVER: for turn-on curves, we need to let
711  // more electrons pass
712  if (currentReferenceParticle->et() < plotEtMin)
713  continue;
714 
715  // TODO: instead of filling a new vector we could simply count here...
716  allSortedReferenceParticles.push_back(&(*currentReferenceParticle));
717  }
718 
719  // std::sort(allSortedReferenceParticles.begin(), allSortedReferenceParticles.end(),pTComparator_);
720 
721  // return false if not enough particles found
722  return allSortedReferenceParticles.size() >= gencut_;
723 }
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidZee_token
Definition: EmDQM.h:227
int pdgGen
Definition: EmDQM.h:168
double plotEtMin
Definition: EmDQM.h:170
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidWenu_token
Definition: EmDQM.h:226
unsigned int gencut_
Definition: EmDQM.h:183
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:245
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
Definition: EmDQM.h:229
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
Definition: EmDQM.h:230
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
Definition: EmDQM.h:228
bool autoConfMode_
Definition: EmDQM.h:95
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
Definition: EmDQM.h:231
unsigned int verbosity_
Definition: EmDQM.h:100
unsigned int reqNum
Definition: EmDQM.h:167
int EmDQM::countSubstring ( const std::string &  str,
const std::string &  sub 
)
private

Definition at line 1083 of file EmDQM.cc.

References KineDebug3::count(), and PFRecoTauDiscriminationByIsolation_cfi::offset.

Referenced by findEgammaPaths(), and makePSetForL1SeedFilter().

1084 {
1085  if (sub.length() == 0) return 0;
1086  int count = 0;
1087  for (size_t offset = str.find(sub); offset != std::string::npos;
1088  offset = str.find(sub, offset + sub.length()))
1089  {
1090  ++count;
1091  }
1092  return count;
1093 }
#define str(s)
void EmDQM::dqmBeginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 67 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::addUntrackedParameter(), autoConfMode_, HLTConfigProvider::changed(), edm::ParameterSet::empty(), edm::ParameterSet::exists(), ALCARECOTkAlBeamHalo_cff::filter, findEgammaPaths(), getFilterModules(), edm::ParameterSet::getParameter(), getPrimaryEtCut(), hltCollectionLabelsFound, hltCollectionLabelsFoundPerPath, hltCollectionLabelsMissed, hltCollectionLabelsMissedPerPath, hltConfig_, mps_fire::i, HLTConfigProvider::init(), HLTConfigProvider::inited(), isData_, diffTwoXMLs::label, makePSetForEgammaDoubleEtDeltaPhiFilter(), makePSetForEgammaGenericFilter(), makePSetForEgammaGenericQuadraticFilter(), makePSetForElectronGenericFilter(), makePSetForEtFilter(), makePSetForL1SeedFilter(), makePSetForL1SeedToSuperClusterMatchFilter(), makePSetForOneOEMinusOneOPFilter(), makePSetForPixelMatchFilter(), HLTConfigProvider::modulePSet(), OUTPUT_ALL, OUTPUT_ERRORS, OUTPUT_WARNINGS, paramSets, edm::InputTag::process(), HLTConfigProvider::processName(), AlignmentTrackSelector_cfi::ptMax, ptMax_, ptMin, ptMin_, HLTConfigProvider::removeVersion(), HLTConfigProvider::size(), AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::tableName(), HLTConfigProvider::triggerIndex(), triggerObject_, trigger::TriggerPhoton, TYPE_DOUBLE_ELE, TYPE_DOUBLE_PHOTON, TYPE_SINGLE_ELE, TYPE_SINGLE_PHOTON, TYPE_TRIPLE_ELE, and verbosity_.

68 {
69  bool changed(true);
70  if (hltConfig_.init(iRun, iSetup, triggerObject_.process(), changed)) {
71 
72  // if init returns TRUE, initialisation has succeeded!
73 
74  if (autoConfMode_) {
75  if (verbosity_ >= OUTPUT_ALL) {
76  // Output general information on the menu
77  edm::LogPrint("EmDQM") << "inited=" << hltConfig_.inited();
78  edm::LogPrint("EmDQM") << "changed=" << hltConfig_.changed();
79  edm::LogPrint("EmDQM") << "processName=" << hltConfig_.processName();
80  edm::LogPrint("EmDQM") << "tableName=" << hltConfig_.tableName();
81  edm::LogPrint("EmDQM") << "size=" << hltConfig_.size();
82  edm::LogInfo("EmDQM") << "The following filter types are not analyzed: \n"
83  << "\tHLTGlobalSumsMET\n"
84  << "\tHLTHtMhtFilter\n"
85  << "\tHLTMhtFilter\n"
86  << "\tHLTJetTag\n"
87  << "\tHLT1CaloJet\n"
88  << "\tHLT1CaloMET\n"
89  << "\tHLT1CaloBJet\n"
90  << "\tHLT1Tau\n"
91  << "\tHLT1PFTau\n"
92  << "\tPFTauSelector\n"
93  << "\tHLT1PFJet\n"
94  << "\tHLTPFJetCollectionsFilter\n"
95  << "\tHLTPFJetCollectionsVBFFilter\n"
96  << "\tHLTPFJetTag\n"
97  << "\tEtMinCaloJetSelector\n"
98  << "\tEtMinPFJetSelector\n"
99  << "\tLargestEtCaloJetSelector\n"
100  << "\tLargestEtPFJetSelector\n"
101  << "\tHLTEgammaTriggerFilterObjectWrapper\n"
102  << "\tHLTEgammaDoubleLegCombFilter\n"
103  << "\tHLT2ElectronTau\n"
104  << "\tHLT2ElectronMET\n"
105  << "\tHLT2ElectronPFTau\n"
106  << "\tHLTPMMassFilter\n"
107  << "\tHLTHcalTowerFilter\n"
108  << "\tHLT1Photon\n"
109  << "\tHLTRFilter\n"
110  << "\tHLTRHemisphere\n"
111  << "\tHLTElectronPFMTFilter\n"
112  << "\tPrimaryVertexObjectFilter\n"
113  << "\tHLTEgammaAllCombMassFilter\n"
114  << "\tHLTMuon*\n"
115  ;
116  }
117 
118 
119  // All electron and photon paths
120  std::vector<std::vector<std::string> > egammaPaths = findEgammaPaths();
121  //std::cout << "Found " << egammaPaths[TYPE_SINGLE_ELE].size() << " single electron paths" << std::endl;
122  //std::cout << "Found " << egammaPaths[TYPE_DOUBLE_ELE].size() << " double electron paths" << std::endl;
123  //std::cout << "Found " << egammaPaths[TYPE_TRIPLE_ELE].size() << " triple electron paths" << std::endl;
124  //std::cout << "Found " << egammaPaths[TYPE_SINGLE_PHOTON].size() << " single photon paths" << std::endl;
125  //std::cout << "Found " << egammaPaths[TYPE_DOUBLE_PHOTON].size() << " double photon paths" << std::endl;
126 
127  std::vector<std::string> filterModules;
128 
129  for (unsigned int j=0; j < egammaPaths.size() ; j++) {
130  if (verbosity_ >= OUTPUT_ALL) {
131  switch(j) {
132  case TYPE_SINGLE_ELE:
133  edm::LogPrint("EmDQM") << "/////////////////////////////////////////\nSingle electron paths: ";
134  break;
135  case TYPE_DOUBLE_ELE:
136  edm::LogPrint("EmDQM") << "/////////////////////////////////////////\nDouble electron paths: ";
137  break;
138  case TYPE_TRIPLE_ELE:
139  edm::LogPrint("EmDQM") << "/////////////////////////////////////////\nTriple electron paths: ";
140  break;
141  case TYPE_SINGLE_PHOTON:
142  edm::LogPrint("EmDQM") << "/////////////////////////////////////////\nSingle photon paths: ";
143  break;
144  case TYPE_DOUBLE_PHOTON:
145  edm::LogPrint("EmDQM") << "/////////////////////////////////////////\nDouble photon paths: ";
146  break;
147  }
148  }
149 
150  for (unsigned int i=0; i < egammaPaths.at(j).size() ; i++) {
151  // get pathname of this trigger
152  const std::string pathName = egammaPaths.at(j).at(i);
153  if (verbosity_ >= OUTPUT_ALL)
154  edm::LogPrint("EmDQM") << "Path: " << pathName;
155 
156  // get filters of the current path
157  filterModules = getFilterModules(pathName);
158 
159  //--------------------
160  edm::ParameterSet paramSet;
161 
162  paramSet.addUntrackedParameter("pathIndex", hltConfig_.triggerIndex(pathName));
163  paramSet.addParameter("@module_label", hltConfig_.removeVersion(pathName) + "_DQM");
164  //paramSet.addParameter("@module_label", pathName + "_DQM");
165 
166  // plotting parameters (untracked because they don't affect the physics)
167  double genEtMin = getPrimaryEtCut(pathName);
168  if (genEtMin >= 0) {
169  paramSet.addUntrackedParameter("genEtMin", genEtMin);
170  } else {
172  edm::LogWarning("EmDQM") << "Pathname: '" << pathName << "': Unable to determine a minimum Et. Will not include this path in the validation.";
173  continue;
174  }
175 
176  // set the x axis of the et plots to some reasonable value based
177  // on the primary et cut determined from the path name
178  double ptMax = ptMax_;
179  double ptMin = ptMin_;
180  if (ptMax < (1.2*genEtMin)) {
181  paramSet.addUntrackedParameter<double>("PtMax", (10*ceil(0.12 * genEtMin)));
182  paramSet.addUntrackedParameter<double>("PtMin", (10*ceil(0.12 * genEtMin) - ptMax + ptMin));
183  }
184  else {
185  paramSet.addUntrackedParameter<double>("PtMax", ptMax);
186  paramSet.addUntrackedParameter<double>("PtMin", ptMin);
187  }
188 
189  //preselction cuts
190  switch (j) {
191  case TYPE_SINGLE_ELE:
192  paramSet.addParameter<unsigned>("reqNum", 1);
193  paramSet.addParameter<int>("pdgGen", 11);
194  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialWenu"));
195  paramSet.addParameter<int>("cutnum", 1);
196  break;
197  case TYPE_DOUBLE_ELE:
198  paramSet.addParameter<unsigned>("reqNum", 2);
199  paramSet.addParameter<int>("pdgGen", 11);
200  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialZee"));
201  paramSet.addParameter<int>("cutnum", 2);
202  break;
203  case TYPE_TRIPLE_ELE:
204  paramSet.addParameter<unsigned>("reqNum", 3);
205  paramSet.addParameter<int>("pdgGen", 11);
206  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialTripleEle"));
207  paramSet.addParameter<int>("cutnum", 3);
208  break;
209  case TYPE_SINGLE_PHOTON:
210  paramSet.addParameter<unsigned>("reqNum", 1);
211  paramSet.addParameter<int>("pdgGen", 22);
212  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialGammaJet"));
213  paramSet.addParameter<int>("cutnum", 1);
214  break;
215  case TYPE_DOUBLE_PHOTON:
216  paramSet.addParameter<unsigned>("reqNum", 2);
217  paramSet.addParameter<int>("pdgGen", 22);
218  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialDiGamma"));
219  paramSet.addParameter<int>("cutnum", 2);
220  }
221  //--------------------
222 
223  // TODO: extend this
224  if (isData_) paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("gsfElectrons"));
225 
226  std::vector<edm::ParameterSet> filterVPSet;
227  edm::ParameterSet filterPSet;
228  std::string moduleLabel;
229 
230  // loop over filtermodules of current trigger path
231  for (std::vector<std::string>::iterator filter = filterModules.begin(); filter != filterModules.end(); ++filter) {
232  std::string moduleType = hltConfig_.modulePSet(*filter).getParameter<std::string>("@module_type");
233  moduleLabel = hltConfig_.modulePSet(*filter).getParameter<std::string>("@module_label");
234 
235  // first check if it is a filter we are not interrested in
236  if (moduleType == "Pythia6GeneratorFilter" ||
237  moduleType == "HLTTriggerTypeFilter" ||
238  moduleType == "HLTLevel1Activity" ||
239  moduleType == "HLTPrescaler" ||
240  moduleType == "HLTBool")
241  continue;
242 
243  // now check for the known filter types
244  if (moduleType == "HLTLevel1GTSeed") {
245  filterPSet = makePSetForL1SeedFilter(moduleLabel);
246  }
247  else if (moduleType == "HLTEgammaL1MatchFilterRegional") {
248  filterPSet = makePSetForL1SeedToSuperClusterMatchFilter(moduleLabel);
249  }
250  else if (moduleType == "HLTEgammaEtFilter") {
251  filterPSet = makePSetForEtFilter(moduleLabel);
252  }
253  else if (moduleType == "HLTElectronOneOEMinusOneOPFilterRegional") {
254  filterPSet = makePSetForOneOEMinusOneOPFilter(moduleLabel);
255  }
256  else if (moduleType == "HLTElectronPixelMatchFilter") {
257  filterPSet = makePSetForPixelMatchFilter(moduleLabel);
258  }
259  else if (moduleType == "HLTEgammaGenericFilter") {
260  filterPSet = makePSetForEgammaGenericFilter(moduleLabel);
261  }
262  else if (moduleType == "HLTEgammaGenericQuadraticFilter") {
263  filterPSet = makePSetForEgammaGenericQuadraticFilter(moduleLabel);
264  }
265  else if (moduleType == "HLTElectronGenericFilter") {
266  filterPSet = makePSetForElectronGenericFilter(moduleLabel);
267  }
268  else if (moduleType == "HLTEgammaDoubleEtDeltaPhiFilter") {
269  filterPSet = makePSetForEgammaDoubleEtDeltaPhiFilter(moduleLabel);
270  }
271  else if (moduleType == "HLTGlobalSumsMET"
272  || moduleType == "HLTHtMhtFilter"
273  || moduleType == "HLTMhtFilter"
274  || moduleType == "HLTJetTag"
275  || moduleType == "HLT1CaloJet"
276  || moduleType == "HLT1CaloMET"
277  || moduleType == "HLT1CaloBJet"
278  || moduleType == "HLT1Tau"
279  || moduleType == "HLT1PFTau"
280  || moduleType == "PFTauSelector"
281  || moduleType == "HLT1PFJet"
282  || moduleType == "HLTPFJetCollectionsFilter"
283  || moduleType == "HLTPFJetCollectionsVBFFilter"
284  || moduleType == "HLTPFJetTag"
285  || moduleType == "EtMinCaloJetSelector"
286  || moduleType == "EtMinPFJetSelector"
287  || moduleType == "LargestEtCaloJetSelector"
288  || moduleType == "LargestEtPFJetSelector"
289  || moduleType == "HLTEgammaTriggerFilterObjectWrapper" // 'fake' filter
290  || moduleType == "HLTEgammaDoubleLegCombFilter" // filter does not put anything in TriggerEventWithRefs
291  || moduleType == "HLT2ElectronMET"
292  || moduleType == "HLT2ElectronTau"
293  || moduleType == "HLT2ElectronPFTau"
294  || moduleType == "HLTPMMassFilter"
295  || moduleType == "HLTHcalTowerFilter"
296  || moduleType == "HLT1Photon"
297  || moduleType == "HLTRFilter"
298  || moduleType == "HLTRHemisphere"
299  || moduleType == "HLTElectronPFMTFilter"
300  || moduleType == "PrimaryVertexObjectFilter"
301  || moduleType == "HLTEgammaAllCombMassFilter"
302  || moduleType.find("HLTMuon") != std::string::npos
303  )
304  continue;
305  else {
307  edm::LogWarning("EmDQM") << "No parameter set for filter '" << moduleLabel << "' with filter type '" << moduleType << "' added. Module will not be analyzed.";
308  continue;
309  }
310 
311  // something went wrong when the parameter set is empty.
312  if (!filterPSet.empty()) {
313  if (!hltConfig_.modulePSet(moduleLabel).exists("saveTags")) {
314  // make sure that 'theHLTOutputTypes' before an unseeded filter in a photon path is set to trigger::TriggerPhoton
315  // this is coupled to the parameter 'saveTag = true'
316  if (moduleLabel.find("Unseeded") != std::string::npos && (j == TYPE_DOUBLE_PHOTON || j == TYPE_SINGLE_PHOTON)) {
317  filterVPSet.back().addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
318  }
319  }
320  // if ncandcut is -1 (when parsing for the number of particles in the name of the L1seed filter fails),
321  // fall back to setting ncandcut to the number of particles needed for the given path.
322  if (filterPSet.getParameter<int>("ncandcut") < 0) {
323  edm::LogPrint("EmDQM") << "No number of candidates for filter " << moduleLabel << " found. Set to " << paramSet.getParameter<int>("cutnum") << ", determined from path name.";
324  filterPSet.addParameter<int>("ncandcut", paramSet.getParameter<int>("cutnum"));
325  } else if (filterPSet.getParameter<int>("ncandcut") > paramSet.getParameter<int>("cutnum")) {
326  edm::LogInfo("EmDQM") << "Changed required number of candidates from " << paramSet.getParameter<int>("cutnum") << " to " << filterPSet.getParameter<int>("ncandcut") << " for filter " << moduleLabel;
327  paramSet.addParameter<int>("cutnum", filterPSet.getParameter<int>("ncandcut"));
328  paramSet.addParameter<unsigned>("reqNum", (unsigned)filterPSet.getParameter<int>("ncandcut"));
329  }
330 
331  filterVPSet.push_back(filterPSet);
332  }
333  else
334  break;
335 
336  } // end loop over filter modules of current trigger path
337 
338  // do not include this path when an empty filterPSet is detected.
339  if (!filterPSet.empty()) {
340  std::string lastModuleName = filterPSet.getParameter<edm::InputTag>("HLTCollectionLabels").label();
341  if (!hltConfig_.modulePSet(lastModuleName).exists("saveTags")) {
342  // make sure that 'theHLTOutputTypes' of the last filter of a photon path is set to trigger::TriggerPhoton
343  // this is coupled to the parameter 'saveTag = true'
344  if ((j == TYPE_SINGLE_PHOTON || j == TYPE_DOUBLE_PHOTON) && pathName.rfind("Ele") == std::string::npos) {
345  filterVPSet.back().addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
346  }
347  }
348  paramSet.addParameter<std::vector<edm::ParameterSet> >("filters", filterVPSet);
349  }
350  else {
351  if (verbosity_ >= OUTPUT_ALL)
352  edm::LogPrint("EmDQM") << "Will not include this path in the validation due to errors while generating the parameter set.";
353  continue;
354  }
355 
356  // dump generated parameter set
357  //std::cout << paramSet.dump() << std::endl;
358 
359  paramSets.push_back(paramSet);
360  } // loop over all paths of this analysis type
361 
362  } // loop over analysis types (single ele etc.)
363  }
364 
367 
369  // loop over all the trigger path parameter sets
371  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end(); ++psetIt) {
374  }
375 
376  if (changed) {
377  // The HLT config has actually changed wrt the previous Run, hence rebook your
378  // histograms or do anything else dependent on the revised HLT config
379  }
380  } else {
381  // if init returns FALSE, initialisation has NOT succeeded, which indicates a problem
382  // with the file and/or code and needs to be investigated!
383  if (verbosity_ >= OUTPUT_ERRORS)
384  edm::LogError("EmDQM") << " HLT config extraction failure with process name '" << triggerObject_.process() << "'.";
385  // In this case, all access methods will return empty values!
386  }
387 }
unsigned int size() const
number of trigger paths in trigger table
edm::ParameterSet makePSetForEgammaGenericFilter(const std::string &)
Definition: EmDQM.cc:1342
double ptMax_
Definition: EmDQM.h:104
T getParameter(std::string const &) const
bool empty() const
Definition: ParameterSet.h:218
edm::ParameterSet makePSetForEgammaGenericQuadraticFilter(const std::string &)
Definition: EmDQM.cc:1420
std::vector< std::vector< std::string > > findEgammaPaths()
Definition: EmDQM.cc:1098
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
Definition: EmDQM.h:190
static const unsigned OUTPUT_ALL
Definition: EmDQM.h:246
std::set< std::string > hltCollectionLabelsFound
Definition: EmDQM.h:187
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
Definition: EmDQM.h:186
bool exists(std::string const &parameterName) const
checks if a parameter exists
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
edm::ParameterSet makePSetForOneOEMinusOneOPFilter(const std::string &)
Definition: EmDQM.cc:1291
const std::string & tableName() const
HLT ConfDB table name.
static const unsigned TYPE_DOUBLE_PHOTON
Definition: EmDQM.h:239
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
edm::ParameterSet makePSetForElectronGenericFilter(const std::string &)
Definition: EmDQM.cc:1497
bool changed() const
changed?
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:244
static const std::string removeVersion(const std::string &trigger)
bool inited() const
Accessors (const methods)
edm::ParameterSet makePSetForL1SeedFilter(const std::string &)
Definition: EmDQM.cc:1198
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
std::vector< std::string > getFilterModules(const std::string &)
Definition: EmDQM.cc:1155
edm::InputTag triggerObject_
Definition: EmDQM.h:99
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:245
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::set< std::string > hltCollectionLabelsMissed
Definition: EmDQM.h:191
edm::ParameterSet makePSetForEgammaDoubleEtDeltaPhiFilter(const std::string &)
Definition: EmDQM.cc:1325
bool isData_
Definition: EmDQM.h:103
const std::string & processName() const
process name
static const unsigned TYPE_SINGLE_PHOTON
Definition: EmDQM.h:238
double ptMin_
Definition: EmDQM.h:105
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:208
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:154
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
bool autoConfMode_
Definition: EmDQM.h:95
std::string const & process() const
Definition: InputTag.h:40
static const unsigned TYPE_SINGLE_ELE
Definition: EmDQM.h:236
double getPrimaryEtCut(const std::string &)
Definition: EmDQM.cc:1180
edm::ParameterSet makePSetForL1SeedToSuperClusterMatchFilter(const std::string &)
Definition: EmDQM.cc:1252
static const unsigned TYPE_DOUBLE_ELE
Definition: EmDQM.h:237
static const unsigned TYPE_TRIPLE_ELE
Definition: EmDQM.h:240
unsigned int verbosity_
Definition: EmDQM.h:100
edm::ParameterSet makePSetForEtFilter(const std::string &)
Definition: EmDQM.cc:1274
edm::ParameterSet makePSetForPixelMatchFilter(const std::string &)
Definition: EmDQM.cc:1308
void EmDQM::endRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
override

Definition at line 1041 of file EmDQM.cc.

References KineDebug3::count(), edm::InputTag::encode(), hltCollectionLabelsFoundPerPath, hltCollectionLabelsMissedPerPath, OUTPUT_ALL, OUTPUT_WARNINGS, paramSets, SetVarsFromPSet(), GlobalPosition_Frontier_DevDB_cff::tag, and verbosity_.

1042 {
1043  // loop over all the trigger path parameter sets
1044  unsigned int vPos = 0;
1045  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end(); ++psetIt, ++vPos) {
1046  SetVarsFromPSet(psetIt);
1047 
1048  // print information about hltCollectionLabels which were not found
1049  // (but only those which were never found)
1050 
1051  // check which ones were never found
1052  std::vector<std::string> labelsNeverFound;
1053 
1054  BOOST_FOREACH(const edm::InputTag &tag, hltCollectionLabelsMissedPerPath.at(vPos))
1055  {
1056  if ((hltCollectionLabelsFoundPerPath.at(vPos)).count(tag.encode()) == 0)
1057  // never found
1058  labelsNeverFound.push_back(tag.encode());
1059 
1060  } // loop over all tags which were missed at least once
1061 
1062  if (labelsNeverFound.empty())
1063  continue;
1064 
1065  std::sort(labelsNeverFound.begin(), labelsNeverFound.end());
1066 
1067  // there was at least one label which was never found
1068  // (note that this could also be because the corresponding
1069  // trigger path slowly fades out to zero efficiency)
1070  if (verbosity_ >= OUTPUT_WARNINGS)
1071  edm::LogWarning("EmDQM") << "There were some HLTCollectionLabels which were never found:";
1072 
1073  BOOST_FOREACH(const edm::InputTag &tag, labelsNeverFound)
1074  {
1075  if (verbosity_ >= OUTPUT_ALL)
1076  edm::LogPrint("EmDQM") << " " << tag;
1077  }
1078  }
1079 }
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
Definition: EmDQM.h:190
static const unsigned OUTPUT_ALL
Definition: EmDQM.h:246
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
Definition: EmDQM.h:186
std::string encode() const
Definition: InputTag.cc:166
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:245
void SetVarsFromPSet(std::vector< edm::ParameterSet >::iterator)
Definition: EmDQM.cc:1563
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:154
unsigned int verbosity_
Definition: EmDQM.h:100
std::vector< std::vector< std::string > > EmDQM::findEgammaPaths ( )
private

Definition at line 1098 of file EmDQM.cc.

References countSubstring(), hltConfig_, mps_fire::i, callgraph::path, HLTConfigProvider::size(), AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerName(), TYPE_DOUBLE_ELE, TYPE_DOUBLE_PHOTON, TYPE_SINGLE_ELE, TYPE_SINGLE_PHOTON, and TYPE_TRIPLE_ELE.

Referenced by dqmBeginRun().

1099 {
1100  std::vector<std::vector<std::string> > Paths(5);
1101  // Loop over all paths in the menu
1102  for (unsigned int i=0; i<hltConfig_.size(); i++) {
1103 
1105 
1106  // Find electron and photon paths and classify them
1107  if (int(path.find("HLT_")) == 0) { // Path should start with 'HLT_'
1108 
1109  int scCount = countSubstring(path, "_SC");
1110  int eleCount = countSubstring(path, "Ele");
1111  int doubleEleCount = countSubstring(path, "DoubleEle");
1112  int doubleSCCount = countSubstring(path, "DiSC");
1113  int tripleEleCount = countSubstring(path, "TripleEle");
1114  int photonCount = countSubstring(path, "hoton");
1115  int doublePhotonCount = countSubstring(path, "DoublePhoton") + countSubstring(path, "Diphoton");
1116 
1117  int totEleCount = 2*tripleEleCount + doubleEleCount + eleCount + scCount + 2*doubleSCCount;
1118  int totPhotonCount = doublePhotonCount + photonCount;
1119 
1120  if (totEleCount + totPhotonCount < 1) continue;
1121  switch (totEleCount) {
1122  case 1:
1123  Paths[TYPE_SINGLE_ELE].push_back(path);
1124  //std::cout << "Electron \t" << path << std::endl;
1125  break;
1126  case 2:
1127  Paths[TYPE_DOUBLE_ELE].push_back(path);
1128  //std::cout << "DoubleElectron \t" << path << std::endl;
1129  break;
1130  case 3:
1131  Paths[TYPE_TRIPLE_ELE].push_back(path);
1132  //std::cout << "TripleElectron \t" << path << std::endl;
1133  break;
1134  }
1135 
1136  switch (totPhotonCount) {
1137  case 1:
1138  Paths[TYPE_SINGLE_PHOTON].push_back(path);
1139  //std::cout << "Photon \t\t" << path << std::endl;
1140  break;
1141  case 2:
1142  Paths[TYPE_DOUBLE_PHOTON].push_back(path);
1143  //std::cout << "DoublePhoton \t" << path << std::endl;
1144  break;
1145  }
1146  }
1147  //std::cout << i << " triggerName: " << path << " containing " << hltConfig_.size(i) << " modules."<< std::endl;
1148  }
1149  return Paths;
1150 }
unsigned int size() const
number of trigger paths in trigger table
const std::string & triggerName(unsigned int triggerIndex) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
static const unsigned TYPE_DOUBLE_PHOTON
Definition: EmDQM.h:239
static const unsigned TYPE_SINGLE_PHOTON
Definition: EmDQM.h:238
int countSubstring(const std::string &, const std::string &)
Definition: EmDQM.cc:1083
static const unsigned TYPE_SINGLE_ELE
Definition: EmDQM.h:236
static const unsigned TYPE_DOUBLE_ELE
Definition: EmDQM.h:237
static const unsigned TYPE_TRIPLE_ELE
Definition: EmDQM.h:240
std::vector< std::string > EmDQM::getFilterModules ( const std::string &  path)
private

Definition at line 1155 of file EmDQM.cc.

References filters, hltConfig_, mps_fire::i, HLTConfigProvider::moduleEDMType(), HLTConfigProvider::moduleLabel(), HLTConfigProvider::moduleType(), HLTConfigProvider::size(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmBeginRun().

1156 {
1157  std::vector<std::string> filters;
1158 
1159  //std::cout << "Pathname: " << path << std::endl;
1160 
1161  // Loop over all modules in the path
1162  for (unsigned int i=0; i<hltConfig_.size(path); i++) {
1163 
1165  std::string moduleType = hltConfig_.moduleType(module);
1166  std::string moduleEDMType = hltConfig_.moduleEDMType(module);
1167 
1168  // Find filters
1169  if (moduleEDMType == "EDFilter" || moduleType.find("Filter") != std::string::npos) { // older samples may not have EDMType data included
1170  filters.push_back(module);
1171  //std::cout << i << " moduleLabel: " << module << " moduleType: " << moduleType << " moduleEDMType: " << moduleEDMType << std::endl;
1172  }
1173  }
1174  return filters;
1175 }
unsigned int size() const
number of trigger paths in trigger table
const std::string moduleType(const std::string &module) const
C++ class name of module.
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
std::vector< TPRegexp > filters
Definition: eve_filter.cc:22
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
Definition: vlib.h:208
double EmDQM::getPrimaryEtCut ( const std::string &  path)
private

Definition at line 1180 of file EmDQM.cc.

Referenced by dqmBeginRun().

1181 {
1182  double minEt = -1;
1183 
1184  boost::regex reg("^HLT_.*?(Ele|hoton|EG|SC)([[:digit:]]+).*");
1185 
1186  boost::smatch what;
1187  if (boost::regex_match(path, what, reg, boost::match_extra))
1188  {
1189  minEt = boost::lexical_cast<double>(what[2]);
1190  }
1191 
1192  return minEt;
1193 }
edm::ParameterSet EmDQM::makePSetForEgammaDoubleEtDeltaPhiFilter ( const std::string &  moduleName)
private

Definition at line 1325 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::InputTag::process(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerCluster, and triggerObject_.

Referenced by dqmBeginRun().

1326 {
1327  edm::ParameterSet retPSet;
1328 
1329  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1330  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1331  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1332  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1333  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1334  retPSet.addParameter<int>("ncandcut", 2);
1335 
1336  return retPSet;
1337 }
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:99
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & process() const
Definition: InputTag.h:40
edm::ParameterSet EmDQM::makePSetForEgammaGenericFilter ( const std::string &  moduleName)
private

Definition at line 1342 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::getParameter(), hltConfig_, edm::InputTag::label(), HLTConfigProvider::modulePSet(), HLTConfigProvider::moduleType(), OUTPUT_ERRORS, edm::InputTag::process(), HLTConfigProvider::saveTags(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerCluster, triggerObject_, trigger::TriggerPhoton, and verbosity_.

Referenced by dqmBeginRun().

1343 {
1344  edm::ParameterSet retPSet;
1345 
1346  // example usages of HLTEgammaGenericFilter are:
1347  // R9 shape filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolR9ShapeFilter
1348  // cluster shape filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolClusterShapeFilter
1349  // Ecal isolation filter hltL1NonIsoHLTNonIsoSingleElectronEt17TIghterEleIdIsolEcalIsolFilter
1350  // H/E filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHEFilter
1351  // HCAL isolation filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHcalIsolFilter
1352 
1353  // infer the type of filter by the type of the producer which
1354  // generates the collection used to cut on this
1356  //edm::InputTag nonIsoTag = hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("");
1357  //std::cout << "varTag.label " << varTag.label() << " nonIsoTag.label " << nonIsoTag.label() << std::endl;
1358 
1359  std::string inputType = hltConfig_.moduleType(varTag.label());
1360  //std::cout << "inputType " << inputType << " moduleName " << moduleName << std::endl;
1361 
1362  //--------------------
1363  // sanity check: non-isolated path should be produced by the
1364  // same type of module
1365 
1366  // first check that the non-iso tag is non-empty
1367  //if (nonIsoTag.label().empty()) {
1368  // edm::LogError("EmDQM") << "nonIsoTag of HLTEgammaGenericFilter '" << moduleName << "' is empty.";
1369  // return retPSet;
1370  //}
1371  //if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1372  // edm::LogError("EmDQM") << "C++ Type of varTag '" << inputType << "' and nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the same for HLTEgammaGenericFilter '" << moduleName << "'.";
1373  // return retPSet;
1374  //}
1375  //--------------------
1376 
1377  // parameter saveTag determines the output type
1379  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
1380  else
1381  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1382 
1383  std::vector<edm::InputTag> isoCollections;
1384  isoCollections.push_back(varTag);
1385  //if (!nonIsoTag.label().empty())
1386  // isoCollections.push_back(nonIsoTag);
1387 
1388  //--------------------
1389  // the following cases seem to have identical PSets ?
1390  //--------------------
1391 
1392  if (inputType == "EgammaHLTR9Producer" || // R9 shape
1393  inputType == "EgammaHLTR9IDProducer" || // R9 ID
1394  inputType == "EgammaHLTClusterShapeProducer" || // cluster shape
1395  inputType == "EgammaHLTEcalRecIsolationProducer" || // ecal isolation
1396  inputType == "EgammaHLTHcalIsolationProducersRegional" || // HCAL isolation and HE
1397  inputType == "EgammaHLTGsfTrackVarProducer" || // GSF track deta and dphi filter
1398  inputType == "EgammaHLTBcHcalIsolationProducersRegional" || // HCAL isolation and HE
1399  inputType == "EgammaHLTEcalPFClusterIsolationProducer" || // ECAL PF isolation filter
1400  inputType == "EgammaHLTHcalPFClusterIsolationProducer" || // HCAL PF isolation filter
1401  inputType == "EgammaHLTElectronTrackIsolationProducers" // Track isolation filter
1402  ) {
1403  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1404  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1405  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1406  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", isoCollections);
1407  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1408 
1409  return retPSet;
1410  }
1411 
1412  if (verbosity_ >= OUTPUT_ERRORS)
1413  edm::LogError("EmDQM") << "Can't determine what the HLTEgammaGenericFilter '" << moduleName << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1414  return edm::ParameterSet();
1415 }
T getParameter(std::string const &) const
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
const std::string moduleType(const std::string &module) const
C++ class name of module.
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:244
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:99
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
unsigned int verbosity_
Definition: EmDQM.h:100
edm::ParameterSet EmDQM::makePSetForEgammaGenericQuadraticFilter ( const std::string &  moduleName)
private

Definition at line 1420 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::getParameter(), hltConfig_, edm::InputTag::label(), HLTConfigProvider::modulePSet(), HLTConfigProvider::moduleType(), OUTPUT_ERRORS, edm::InputTag::process(), HLTConfigProvider::saveTags(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerCluster, triggerObject_, trigger::TriggerPhoton, and verbosity_.

Referenced by dqmBeginRun().

1421 {
1422  edm::ParameterSet retPSet;
1423 
1424  // example usages of HLTEgammaGenericFilter are:
1425  // R9 shape filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolR9ShapeFilter
1426  // cluster shape filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolClusterShapeFilter
1427  // Ecal isolation filter hltL1NonIsoHLTNonIsoSingleElectronEt17TIghterEleIdIsolEcalIsolFilter
1428  // H/E filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHEFilter
1429  // HCAL isolation filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHcalIsolFilter
1430 
1431  // infer the type of filter by the type of the producer which
1432  // generates the collection used to cut on this
1434  //edm::InputTag nonIsoTag = hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("nonIsoTag");
1435  //std::cout << "varTag.label " << varTag.label() << " nonIsoTag.label " << nonIsoTag.label() << std::endl;
1436 
1437  std::string inputType = hltConfig_.moduleType(varTag.label());
1438  //std::cout << "inputType " << inputType << " moduleName " << moduleName << std::endl;
1439 
1440  //--------------------
1441  // sanity check: non-isolated path should be produced by the
1442  // same type of module
1443 
1444  // first check that the non-iso tag is non-empty
1445  //if (nonIsoTag.label().empty()) {
1446  // edm::LogError("EmDQM") << "nonIsoTag of HLTEgammaGenericFilter '" << moduleName << "' is empty.";
1447  // return retPSet;
1448  //}
1449  //if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1450  // edm::LogError("EmDQM") << "C++ Type of varTag '" << inputType << "' and nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the same for HLTEgammaGenericFilter '" << moduleName << "'.";
1451  // return retPSet;
1452  //}
1453  //--------------------
1454 
1455  // parameter saveTag determines the output type
1457  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
1458  else
1459  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1460 
1461  std::vector<edm::InputTag> isoCollections;
1462  isoCollections.push_back(varTag);
1463  //if (!nonIsoTag.label().empty())
1464  // isoCollections.push_back(nonIsoTag);
1465 
1466  //--------------------
1467  // the following cases seem to have identical PSets ?
1468  //--------------------
1469 
1470  if (inputType == "EgammaHLTR9Producer" || // R9 shape
1471  inputType == "EgammaHLTR9IDProducer" || // R9 ID
1472  inputType == "EgammaHLTClusterShapeProducer" || // cluster shape
1473  inputType == "EgammaHLTEcalRecIsolationProducer" || // ecal isolation
1474  inputType == "EgammaHLTHcalIsolationProducersRegional" || // HCAL isolation and HE
1475  inputType == "EgammaHLTBcHcalIsolationProducersRegional" || // HCAL isolation and HE
1476  inputType == "EgammaHLTEcalPFClusterIsolationProducer" || // ECAL PF isolation filter
1477  inputType == "EgammaHLTHcalPFClusterIsolationProducer" || // HCAL PF isolation filter
1478  inputType == "EgammaHLTPhotonTrackIsolationProducersRegional" // Photon track isolation
1479  ) {
1480  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1481  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1482  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1483  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", isoCollections);
1484  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1485 
1486  return retPSet;
1487  }
1488 
1489  if (verbosity_ >= OUTPUT_ERRORS)
1490  edm::LogError("EmDQM") << "Can't determine what the HLTEgammaGenericQuadraticFilter '" << moduleName << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1491  return edm::ParameterSet();
1492 }
T getParameter(std::string const &) const
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
const std::string moduleType(const std::string &module) const
C++ class name of module.
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:244
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:99
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
unsigned int verbosity_
Definition: EmDQM.h:100
edm::ParameterSet EmDQM::makePSetForElectronGenericFilter ( const std::string &  moduleName)
private

Definition at line 1497 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::getParameter(), hltConfig_, edm::InputTag::label(), HLTConfigProvider::modulePSet(), HLTConfigProvider::moduleType(), OUTPUT_ERRORS, edm::InputTag::process(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerElectron, triggerObject_, and verbosity_.

Referenced by dqmBeginRun().

1498 {
1499  edm::ParameterSet retPSet;
1500 
1501  // example usages of HLTElectronGenericFilter are:
1502  //
1503  // deta filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolDetaFilter
1504  // dphi filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolDphiFilter
1505  // track isolation hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolTrackIsolFilter
1506 
1507  // infer the type of filter by the type of the producer which
1508  // generates the collection used to cut on this
1510  //edm::InputTag nonIsoTag = hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("nonIsoTag");
1511  //std::cout << "varTag.label " << varTag.label() << " nonIsoTag.label " << nonIsoTag.label() << std::endl;
1512 
1513  std::string inputType = hltConfig_.moduleType(varTag.label());
1514  //std::cout << "inputType iso " << inputType << " inputType noniso " << hltConfig_.moduleType(nonIsoTag.label()) << " moduleName " << moduleName << std::endl;
1515 
1516  //--------------------
1517  // sanity check: non-isolated path should be produced by the
1518  // same type of module
1519  //if (nonIsoTag.label().empty()) {
1520  // edm::LogError("EmDQM") << "nonIsoTag of HLTElectronGenericFilter '" << moduleName << "' is empty.";
1521  // return retPSet;
1522  //}
1523  //if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1524  // edm::LogError("EmDQM") << "C++ Type of varTag '" << inputType << "' and nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the same for HLTElectronGenericFilter '" << moduleName << "'.";
1525  // return retPSet;
1526  //}
1527  //--------------------
1528 
1529  // the type of object to look for seems to be the
1530  // same for all uses of HLTEgammaGenericFilter
1531  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
1532 
1533  std::vector<edm::InputTag> isoCollections;
1534  isoCollections.push_back(varTag);
1535  //if (!nonIsoTag.label().empty())
1536  // isoCollections.push_back(nonIsoTag);
1537 
1538  //--------------------
1539  // the following cases seem to have identical PSets ?
1540  //--------------------
1541 
1542  // note that whether deta or dphi is used is determined from
1543  // the product instance (not the module label)
1544  if (inputType == "EgammaHLTElectronDetaDphiProducer" || // deta and dphi filter
1545  inputType == "EgammaHLTElectronTrackIsolationProducers" // track isolation
1546  ) {
1547  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1548  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1549  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1550  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", isoCollections);
1551  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1552 
1553  return retPSet;
1554  }
1555 
1556  if (verbosity_ >= OUTPUT_ERRORS)
1557  edm::LogError("EmDQM") << "Can't determine what the HLTElectronGenericFilter '" << moduleName << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1558  return edm::ParameterSet();
1559 }
T getParameter(std::string const &) const
const std::string moduleType(const std::string &module) const
C++ class name of module.
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:244
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:99
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
unsigned int verbosity_
Definition: EmDQM.h:100
edm::ParameterSet EmDQM::makePSetForEtFilter ( const std::string &  moduleName)
private

Definition at line 1274 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::getParameter(), hltConfig_, HLTConfigProvider::modulePSet(), edm::InputTag::process(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerCluster, and triggerObject_.

Referenced by dqmBeginRun().

1275 {
1276  edm::ParameterSet retPSet;
1277 
1278  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1279  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1280  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1281  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1282  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1283  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1284 
1285  return retPSet;
1286 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:99
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & process() const
Definition: InputTag.h:40
edm::ParameterSet EmDQM::makePSetForL1SeedFilter ( const std::string &  moduleName)
private

Definition at line 1198 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), countSubstring(), edm::InputTag::process(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerL1NoIsoEG, and triggerObject_.

Referenced by dqmBeginRun().

1199 {
1200  // generates a PSet to analyze the behaviour of an L1 seed.
1201  //
1202  // moduleName is the name of the HLT module which filters
1203  // on the L1 seed.
1204  edm::ParameterSet retPSet;
1205 
1206  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1207  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1208  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1209  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1210  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerL1NoIsoEG);
1211 
1212  // as HLTLevel1GTSeed has no parameter ncandcut we determine the value from the name of the filter
1213 
1214  int orCount = countSubstring(moduleName, "OR") + countSubstring(moduleName, "Or");
1215  int egCount = countSubstring(moduleName, "EG");
1216  int dEgCount = countSubstring(moduleName, "DoubleEG");
1217  int tEgCount = countSubstring(moduleName, "TripleEG");
1218 
1219  int candCount = 2*tEgCount + dEgCount + egCount;
1220  // if L1 is and OR of triggers try the assumption that all of them are similar first and if not take the lowest number. If this is not successful, let the path name decide
1221  if (orCount > 0 && candCount > 0) {
1222  if (egCount % (orCount+1) == 0 && dEgCount % (orCount+1) == 0 && tEgCount % (orCount+1) == 0) candCount /= (orCount+1);
1223  else if (egCount-dEgCount-tEgCount > 0) candCount = 1; // at least one singleEG present
1224  else if (dEgCount > 0) candCount = 2; // at least one doubleEG and no singleEG present
1225  else if (tEgCount > 0) candCount = 3; // only tripleEG present
1226  else candCount = -1;
1227  }
1228 
1229  switch (candCount) {
1230  case 0:
1231  retPSet.addParameter<int>("ncandcut", 0);
1232  break;
1233  case 1:
1234  retPSet.addParameter<int>("ncandcut", 1);
1235  break;
1236  case 2:
1237  retPSet.addParameter<int>("ncandcut", 2);
1238  break;
1239  case 3:
1240  retPSet.addParameter<int>("ncandcut", 3);
1241  break;
1242  default:
1243  retPSet.addParameter<int>("ncandcut", -1);
1244  }
1245 
1246  return retPSet;
1247 }
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:99
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
int countSubstring(const std::string &, const std::string &)
Definition: EmDQM.cc:1083
std::string const & process() const
Definition: InputTag.h:40
edm::ParameterSet EmDQM::makePSetForL1SeedToSuperClusterMatchFilter ( const std::string &  moduleName)
private

Definition at line 1252 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::getParameter(), hltConfig_, HLTConfigProvider::modulePSet(), edm::InputTag::process(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerCluster, and triggerObject_.

Referenced by dqmBeginRun().

1253 {
1254  // generates a PSet to analyze the behaviour of L1 to supercluster match filter.
1255  //
1256  // moduleName is the name of the HLT module which requires the match
1257  // between supercluster and L1 seed.
1258  //
1259  edm::ParameterSet retPSet;
1260 
1261  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1262  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1263  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1264  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1265  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1266  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1267 
1268  return retPSet;
1269 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:99
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & process() const
Definition: InputTag.h:40
edm::ParameterSet EmDQM::makePSetForOneOEMinusOneOPFilter ( const std::string &  moduleName)
private

Definition at line 1291 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::getParameter(), hltConfig_, HLTConfigProvider::modulePSet(), edm::InputTag::process(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerElectron, and triggerObject_.

Referenced by dqmBeginRun().

1292 {
1293  edm::ParameterSet retPSet;
1294 
1295  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1296  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1297  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1298  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1299  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
1300  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1301 
1302  return retPSet;
1303 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:99
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & process() const
Definition: InputTag.h:40
edm::ParameterSet EmDQM::makePSetForPixelMatchFilter ( const std::string &  moduleName)
private

Definition at line 1308 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::getParameter(), hltConfig_, HLTConfigProvider::modulePSet(), edm::InputTag::process(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerCluster, and triggerObject_.

Referenced by dqmBeginRun().

1309 {
1310  edm::ParameterSet retPSet;
1311 
1312  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1313  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1314  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1315  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1316  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1317  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1318 
1319  return retPSet;
1320 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:133
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:99
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & process() const
Definition: InputTag.h:40
void EmDQM::SetVarsFromPSet ( std::vector< edm::ParameterSet >::iterator  psetIt)
private

Definition at line 1563 of file EmDQM.cc.

References DEFINE_FWK_MODULE, dirname_, filters, gencut_, gencutCollection_, mps_fire::i, isoNames, nCandCuts, noIsolationPlots_, numOfHLTCollectionLabels, pathIndex, pdgGen, plotBounds, plotEtMin, plotiso, plotPtMax, plotPtMin, reqNum, AlCaHLTBitMon_QueryRunRegistry::string, theHLTCollectionHumanNames, theHLTCollectionLabels, and theHLTOutputTypes.

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

1564 {
1565  dirname_="HLT/HLTEgammaValidation/"+psetIt->getParameter<std::string>("@module_label");
1566 
1567  pathIndex = psetIt->getUntrackedParameter<unsigned int>("pathIndex", 0);
1568  // parameters for generator study
1569  reqNum = psetIt->getParameter<unsigned int>("reqNum");
1570  pdgGen = psetIt->getParameter<int>("pdgGen");
1571  // plotting parameters (untracked because they don't affect the physics)
1572  plotEtMin = psetIt->getUntrackedParameter<double>("genEtMin",0.);
1573  plotPtMin = psetIt->getUntrackedParameter<double>("PtMin",0.);
1574  plotPtMax = psetIt->getUntrackedParameter<double>("PtMax",1000.);
1575 
1576  //preselction cuts
1577  gencutCollection_= psetIt->getParameter<edm::InputTag>("cutcollection");
1578  gencut_ = psetIt->getParameter<int>("cutnum");
1579 
1581  // Read in the Vector of Parameter Sets. //
1582  // Information for each filter-step //
1584  std::vector<edm::ParameterSet> filters =
1585  psetIt->getParameter<std::vector<edm::ParameterSet> >("filters");
1586 
1587  // empty vectors of parameters from previous paths
1588  theHLTCollectionLabels.clear();
1589  theHLTOutputTypes.clear();
1591  plotBounds.clear();
1592  isoNames.clear();
1593  plotiso.clear();
1594  nCandCuts.clear();
1595 
1596  int i = 0;
1597  for(std::vector<edm::ParameterSet>::iterator filterconf = filters.begin() ; filterconf != filters.end() ; filterconf++)
1598  {
1599 
1600  theHLTCollectionLabels.push_back(filterconf->getParameter<edm::InputTag>("HLTCollectionLabels"));
1601  theHLTOutputTypes.push_back(filterconf->getParameter<int>("theHLTOutputTypes"));
1602  // Grab the human-readable name, if it is not specified, use the Collection Label
1603  theHLTCollectionHumanNames.push_back(filterconf->getUntrackedParameter<std::string>("HLTCollectionHumanName",theHLTCollectionLabels[i].label()));
1604 
1605  std::vector<double> bounds = filterconf->getParameter<std::vector<double> >("PlotBounds");
1606  // If the size of plot "bounds" vector != 2, abort
1607  assert(bounds.size() == 2);
1608  plotBounds.push_back(std::pair<double,double>(bounds[0],bounds[1]));
1609  isoNames.push_back(filterconf->getParameter<std::vector<edm::InputTag> >("IsoCollections"));
1610 
1611  //for (unsigned int i=0; i<isoNames.back().size(); i++) {
1612  // switch(theHLTOutputTypes.back()) {
1613  // case trigger::TriggerL1NoIsoEG:
1614  // histoFillerL1NonIso->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<l1extra::L1EmParticleCollection , float>>>(isoNames.back()[i]));
1615  // break;
1616  // case trigger::TriggerL1IsoEG: // Isolated Level 1
1617  // histoFillerL1Iso->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<l1extra::L1EmParticleCollection , float>>>(isoNames.back()[i]));
1618  // break;
1619  // case trigger::TriggerPhoton: // Photon
1620  // histoFillerPho->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::RecoEcalCandidateCollection , float>>>(isoNames.back()[i]));
1621  // break;
1622  // case trigger::TriggerElectron: // Electron
1623  // histoFillerEle->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::ElectronCollection , float>>>(isoNames.back()[i]));
1624  // break;
1625  // case trigger::TriggerCluster: // TriggerCluster
1626  // histoFillerClu->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::RecoEcalCandidateCollection , float>>>(isoNames.back()[i]));
1627  // break;
1628  // default:
1629  // throw(cms::Exception("Release Validation Error") << "HLT output type not implemented: theHLTOutputTypes[n]" );
1630  // }
1631  //}
1632 
1633  // If the size of the isoNames vector is not greater than zero, abort
1634  assert(!isoNames.back().empty());
1635  if (isoNames.back().at(0).label()=="none") {
1636  plotiso.push_back(false);
1637  } else {
1638  if (!noIsolationPlots_) plotiso.push_back(true);
1639  else plotiso.push_back(false);
1640  }
1641  nCandCuts.push_back(filterconf->getParameter<int>("ncandcut"));
1642  i++;
1643  } // END of loop over parameter sets
1644 
1645  // Record number of HLTCollectionLabels
1647 }
unsigned int numOfHLTCollectionLabels
Definition: EmDQM.h:158
std::string dirname_
Definition: EmDQM.h:86
int pdgGen
Definition: EmDQM.h:168
double plotEtMin
Definition: EmDQM.h:170
std::vector< TPRegexp > filters
Definition: eve_filter.cc:22
std::vector< std::vector< edm::InputTag > > isoNames
Definition: EmDQM.h:163
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQM.h:157
unsigned int gencut_
Definition: EmDQM.h:183
std::vector< unsigned int > nCandCuts
Definition: EmDQM.h:165
double plotPtMax
Definition: EmDQM.h:172
bool noIsolationPlots_
Definition: EmDQM.h:116
double plotPtMin
Definition: EmDQM.h:171
edm::InputTag gencutCollection_
Definition: EmDQM.h:180
unsigned int pathIndex
Definition: EmDQM.h:156
std::vector< std::string > theHLTCollectionHumanNames
Definition: EmDQM.h:159
std::vector< int > theHLTOutputTypes
Definition: EmDQM.h:161
unsigned int reqNum
Definition: EmDQM.h:167
std::vector< std::pair< double, double > > plotBounds
Definition: EmDQM.h:164
std::vector< bool > plotiso
Definition: EmDQM.h:162

Friends And Related Function Documentation

Definition at line 68 of file EmDQM.h.

friend class HistoFiller< reco::ElectronCollection >
friend

Definition at line 66 of file EmDQM.h.

Definition at line 67 of file EmDQM.h.

Member Data Documentation

bool EmDQM::autoConfMode_
private

Definition at line 95 of file EmDQM.h.

Referenced by analyze(), checkRecoParticlesRequirement(), dqmBeginRun(), and EmDQM().

std::string EmDQM::dirname_
private

Definition at line 86 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

double EmDQM::eta2DMax_
private

Definition at line 109 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

std::vector<MonitorElement*> EmDQM::etagens
private

Definition at line 215 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::etahistmatchs
private

Definition at line 201 of file EmDQM.h.

Referenced by bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::etahists
private

Definition at line 198 of file EmDQM.h.

Referenced by bookHistograms().

double EmDQM::etaMax_
private

Definition at line 106 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

std::vector<MonitorElement*> EmDQM::etaphigens
private

Definition at line 217 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::etaphihistmatchs
private

Definition at line 208 of file EmDQM.h.

Referenced by bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::etaphihists
private

Definition at line 207 of file EmDQM.h.

Referenced by bookHistograms().

std::vector<MonitorElement*> EmDQM::etgens
private

Definition at line 214 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::ethistmatchs
private

Definition at line 203 of file EmDQM.h.

Referenced by bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::ethists
private

Definition at line 200 of file EmDQM.h.

Referenced by bookHistograms().

unsigned int EmDQM::gencut_
private

number of generator level particles (electrons/photons) required (for MC)

Definition at line 183 of file EmDQM.h.

Referenced by analyze(), checkGeneratedParticlesRequirement(), checkRecoParticlesRequirement(), and SetVarsFromPSet().

edm::EDGetTokenT<edm::View<reco::Candidate> > EmDQM::gencutColl_fidDiGamma_token
private

Definition at line 230 of file EmDQM.h.

Referenced by analyze(), checkRecoParticlesRequirement(), and EmDQM().

edm::EDGetTokenT<edm::View<reco::Candidate> > EmDQM::gencutColl_fidGammaJet_token
private

Definition at line 229 of file EmDQM.h.

Referenced by analyze(), checkRecoParticlesRequirement(), and EmDQM().

edm::EDGetTokenT<edm::View<reco::Candidate> > EmDQM::gencutColl_fidTripleEle_token
private

Definition at line 228 of file EmDQM.h.

Referenced by analyze(), checkRecoParticlesRequirement(), and EmDQM().

edm::EDGetTokenT<edm::View<reco::Candidate> > EmDQM::gencutColl_fidWenu_token
private

Definition at line 226 of file EmDQM.h.

Referenced by analyze(), checkRecoParticlesRequirement(), and EmDQM().

edm::EDGetTokenT<edm::View<reco::Candidate> > EmDQM::gencutColl_fidZee_token
private

Definition at line 227 of file EmDQM.h.

Referenced by analyze(), checkRecoParticlesRequirement(), and EmDQM().

edm::EDGetTokenT<edm::View<reco::Candidate> > EmDQM::gencutColl_manualConf_token
private

Definition at line 231 of file EmDQM.h.

Referenced by analyze(), checkRecoParticlesRequirement(), and EmDQM().

edm::InputTag EmDQM::gencutCollection_
private

collection which should be used for generator particles (MC) or reconstructed particles (data).

This collection is used for matching the HLT objects against (e.g. match the HLT object to generated particles or reconstructed electrons/photons).

Definition at line 180 of file EmDQM.h.

Referenced by SetVarsFromPSet().

double EmDQM::genEtaAcc_
private

Definition at line 101 of file EmDQM.h.

Referenced by checkGeneratedParticlesRequirement(), and EmDQM().

double EmDQM::genEtAcc_
private

Definition at line 102 of file EmDQM.h.

Referenced by EmDQM().

edm::EDGetTokenT<edm::View<reco::Candidate> > EmDQM::genParticles_token
private

Definition at line 223 of file EmDQM.h.

Referenced by checkGeneratedParticlesRequirement(), and EmDQM().

std::vector<std::vector<MonitorElement*> > EmDQM::histEtaOfHltObjMatchToGens
private

Definition at line 205 of file EmDQM.h.

Referenced by bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::histEtaPhiOfHltObjMatchToGens
private

Definition at line 209 of file EmDQM.h.

Referenced by bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::histEtOfHltObjMatchToGens
private

Definition at line 204 of file EmDQM.h.

Referenced by bookHistograms().

HistoFiller<reco::RecoEcalCandidateCollection>* EmDQM::histoFillerClu
private

Definition at line 89 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

HistoFiller<reco::ElectronCollection>* EmDQM::histoFillerEle
private

Definition at line 88 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

HistoFiller<l1extra::L1EmParticleCollection>* EmDQM::histoFillerL1Iso
private

Definition at line 92 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

HistoFiller<l1extra::L1EmParticleCollection>* EmDQM::histoFillerL1NonIso
private

Definition at line 90 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

HistoFiller<reco::RecoEcalCandidateCollection>* EmDQM::histoFillerPho
private

Definition at line 91 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

std::vector<std::vector<MonitorElement*> > EmDQM::histPhiOfHltObjMatchToGens
private

Definition at line 206 of file EmDQM.h.

Referenced by bookHistograms().

std::set<std::string> EmDQM::hltCollectionLabelsFound
private

Definition at line 187 of file EmDQM.h.

Referenced by analyze(), and dqmBeginRun().

std::vector<std::set<std::string> > EmDQM::hltCollectionLabelsFoundPerPath
private

which hltCollectionLabels were SEEN at least once

Definition at line 186 of file EmDQM.h.

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

std::set<std::string> EmDQM::hltCollectionLabelsMissed
private

Definition at line 191 of file EmDQM.h.

Referenced by analyze(), and dqmBeginRun().

std::vector<std::set<std::string> > EmDQM::hltCollectionLabelsMissedPerPath
private

which hltCollectionLabels were MISSED at least once

Definition at line 190 of file EmDQM.h.

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

HLTConfigProvider EmDQM::hltConfig_
private
edm::EDGetTokenT<edm::TriggerResults> EmDQM::hltResults_token
private

Definition at line 225 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

bool EmDQM::isData_
private

Definition at line 103 of file EmDQM.h.

Referenced by dqmBeginRun(), and EmDQM().

std::vector<std::vector<edm::InputTag> > EmDQM::isoNames
private

Definition at line 163 of file EmDQM.h.

Referenced by SetVarsFromPSet().

bool EmDQM::mcMatchedOnly_
private

Definition at line 114 of file EmDQM.h.

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

unsigned int EmDQM::minEtForEtaEffPlot_
private

Definition at line 112 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

unsigned int EmDQM::nbins2D_
private

Definition at line 111 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

unsigned int EmDQM::nbins_
private

Definition at line 108 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

std::vector<unsigned int> EmDQM::nCandCuts
private

Definition at line 165 of file EmDQM.h.

Referenced by analyze(), and SetVarsFromPSet().

bool EmDQM::noIsolationPlots_
private

Definition at line 116 of file EmDQM.h.

Referenced by EmDQM(), and SetVarsFromPSet().

bool EmDQM::noPhiPlots_
private

Definition at line 115 of file EmDQM.h.

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

unsigned int EmDQM::numOfHLTCollectionLabels
private

Definition at line 158 of file EmDQM.h.

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

const unsigned EmDQM::OUTPUT_ALL = 3
staticprivate

Definition at line 246 of file EmDQM.h.

Referenced by dqmBeginRun(), and endRun().

const unsigned EmDQM::OUTPUT_ERRORS = 1
staticprivate
const unsigned EmDQM::OUTPUT_SILENT = 0
staticprivate

Definition at line 243 of file EmDQM.h.

const unsigned EmDQM::OUTPUT_WARNINGS = 2
staticprivate
std::vector<edm::ParameterSet> EmDQM::paramSets
private

Definition at line 154 of file EmDQM.h.

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

unsigned int EmDQM::pathIndex
private

Definition at line 156 of file EmDQM.h.

Referenced by analyze(), and SetVarsFromPSet().

int EmDQM::pdgGen
private
double EmDQM::phi2DMax_
private

Definition at line 110 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

std::vector<MonitorElement*> EmDQM::phigens
private

Definition at line 216 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::phihistmatchs
private

Definition at line 202 of file EmDQM.h.

Referenced by bookHistograms().

std::vector<std::vector<MonitorElement*> > EmDQM::phihists
private

Definition at line 199 of file EmDQM.h.

Referenced by bookHistograms().

double EmDQM::phiMax_
private

Definition at line 107 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

std::vector<std::pair<double,double> > EmDQM::plotBounds
private

Definition at line 164 of file EmDQM.h.

Referenced by SetVarsFromPSet().

double EmDQM::plotEtMin
private
std::vector<bool> EmDQM::plotiso
private

Definition at line 162 of file EmDQM.h.

Referenced by SetVarsFromPSet().

double EmDQM::plotPtMax
private

Definition at line 172 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

double EmDQM::plotPtMin
private

Definition at line 171 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

const edm::ParameterSet& EmDQM::pset
private

Definition at line 97 of file EmDQM.h.

Referenced by EmDQM().

GreaterByPt<reco::Particle> EmDQM::pTComparator_
private

Definition at line 219 of file EmDQM.h.

Referenced by analyze().

GreaterByPt<reco::GenParticle> EmDQM::pTGenComparator_
private

Definition at line 220 of file EmDQM.h.

Referenced by checkGeneratedParticlesRequirement().

double EmDQM::ptMax_
private

Definition at line 104 of file EmDQM.h.

Referenced by dqmBeginRun(), and EmDQM().

double EmDQM::ptMin_
private

Definition at line 105 of file EmDQM.h.

Referenced by dqmBeginRun(), and EmDQM().

unsigned int EmDQM::reqNum
private

Definition at line 167 of file EmDQM.h.

Referenced by analyze(), checkRecoParticlesRequirement(), and SetVarsFromPSet().

std::vector<std::string> EmDQM::theHLTCollectionHumanNames
private

Definition at line 159 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

std::vector<edm::InputTag> EmDQM::theHLTCollectionLabels
private

Definition at line 157 of file EmDQM.h.

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

std::vector<int> EmDQM::theHLTOutputTypes
private

Definition at line 161 of file EmDQM.h.

Referenced by analyze(), and SetVarsFromPSet().

edm::InputTag EmDQM::theL1Seed
private

Definition at line 160 of file EmDQM.h.

std::vector<MonitorElement*> EmDQM::totalmatchs
private

Definition at line 212 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

std::vector<MonitorElement*> EmDQM::totals
private

Definition at line 211 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag EmDQM::triggerObject_
private
edm::EDGetTokenT<trigger::TriggerEventWithRefs> EmDQM::triggerObject_token
private

Definition at line 224 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

const unsigned EmDQM::TYPE_DOUBLE_ELE = 1
staticprivate

Definition at line 237 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_DOUBLE_PHOTON = 3
staticprivate

Definition at line 239 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_SINGLE_ELE = 0
staticprivate

Definition at line 236 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_SINGLE_PHOTON = 2
staticprivate

Definition at line 238 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_TRIPLE_ELE = 4
staticprivate

Definition at line 240 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

bool EmDQM::useHumanReadableHistTitles_
private

Definition at line 113 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

unsigned int EmDQM::verbosity_
private