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:
DQMOneEDAnalyzer<> edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > 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
 
void dqmEndRun (edm::Run const &, edm::EventSetup const &) override
 
 EmDQM (const edm::ParameterSet &pset)
 Constructor. More...
 
 ~EmDQM () override
 Destructor. More...
 
- Public Member Functions inherited from DQMOneEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
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
 
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 DQMOneEDAnalyzer<>
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 
- Protected Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 63 of file EmDQM.h.

Constructor & Destructor Documentation

◆ EmDQM()

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

Constructor.

Definition at line 11 of file EmDQM.cc.

References ProducerED_cfi::InputTag, and muonDTDigis_cfi::pset.

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

◆ ~EmDQM()

EmDQM::~EmDQM ( )
override

Destructor.

Definition at line 603 of file EmDQM.cc.

603 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 733 of file EmDQM.cc.

References EgHLTOffHistBins_cfi::et, PVValHelper::eta, JetHT_cfg::hltResults, mps_fire::i, createfilelist::int, edm::HandleBase::isValid(), dqmiodumpmetadata::n, doubleEle5SWL1RDQM_cfi::pdgGen, phi, electronDQMIsoDist_cfi::reqNum, jetUpdater_cfi::sort, photon_test_cff::theHLTCollectionLabels, electronDQMIsoDist_cfi::theHLTOutputTypes, trigger::TriggerCluster, trigger::TriggerElectron, trigger::TriggerL1IsoEG, trigger::TriggerL1NoIsoEG, and trigger::TriggerPhoton.

733  {
734  // loop over all the trigger path parameter sets
735  unsigned int vPos = 0;
736  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end();
737  ++psetIt, ++vPos) {
738  SetVarsFromPSet(psetIt);
739  // get the set forthe current path
742 
744  // Check if there's enough gen particles //
745  // of interest //
747  // get the right data according to the trigger path currently looked at
749  if (autoConfMode_) {
750  switch (reqNum) {
751  case 1:
752  if (pdgGen == 11)
753  event.getByToken(gencutColl_fidWenu_token, cutCounter);
754  else
755  event.getByToken(gencutColl_fidGammaJet_token, cutCounter);
756  break;
757  case 2:
758  if (pdgGen == 11)
759  event.getByToken(gencutColl_fidZee_token, cutCounter);
760  else
761  event.getByToken(gencutColl_fidDiGamma_token, cutCounter);
762  break;
763  case 3:
764  event.getByToken(gencutColl_fidTripleEle_token, cutCounter);
765  break;
766  }
767  } else {
768  event.getByToken(gencutColl_manualConf_token, cutCounter);
769  }
770  if (cutCounter->size() < (unsigned int)gencut_) {
771  // edm::LogWarning("EmDQM") << "Less than "<< gencut_ <<" gen particles
772  // with pdgId=" << pdgGen;
773  continue;
774  }
775 
776  // fill L1 and HLT info
777  // get objects possed by each filter
779  event.getByToken(triggerObject_token, triggerObj);
780  if (!triggerObj.isValid()) {
782  edm::LogWarning("EmDQM") << "parameter triggerobject (" << triggerObject_
783  << ") does not corresond to a valid TriggerEventWithRefs product. "
784  "Please check especially the process name (e.g. when running "
785  "over reprocessed datasets)";
786  continue;
787  }
788 
789  // Were enough high energy gen particles found?
790  if (event.isRealData()) {
791  // running validation on data.
792  // TODO: we should check that the entire
793  // run is on the same type (all data or
794  // all MC). Otherwise one gets
795  // uninterpretable results...
797  continue;
798  } else { // MC
799  // if no, throw event away
801  continue;
802  }
803 
804  // It was an event worth keeping. Continue.
805 
807  // Fill the bin labeled "Total" //
808  // This will be the number of events looked at. //
810  if (!mcMatchedOnly_)
811  totals.at(vPos)->Fill(numOfHLTCollectionLabels + 0.5);
812  totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels + 0.5);
813 
815  // Fill generator info //
817  // the gencut_ highest Et generator objects of the preselected type are our
818  // matches
819 
820  std::vector<reco::Particle> sortedGen;
821  for (edm::View<reco::Candidate>::const_iterator genpart = cutCounter->begin(); genpart != cutCounter->end();
822  genpart++) {
823  reco::Particle tmpcand(genpart->charge(), genpart->p4(), genpart->vertex(), genpart->pdgId(), genpart->status());
824  if (tmpcand.et() >= plotEtMin) {
825  sortedGen.push_back(tmpcand);
826  }
827  }
828  std::sort(sortedGen.begin(), sortedGen.end(), pTComparator_);
829 
830  // Now the collection of gen particles is sorted by pt.
831  // So, remove all particles from the collection so that we
832  // only have the top "1 thru gencut_" particles in it
833  if (sortedGen.size() < gencut_) {
834  continue;
835  }
836  sortedGen.erase(sortedGen.begin() + gencut_, sortedGen.end());
837 
838  for (unsigned int i = 0; i < gencut_; i++) {
839  etgens.at(vPos)->Fill(sortedGen[i].et()); // validity has been implicitily checked by the
840  // cut on gencut_ above
841  if (sortedGen[i].et() > minEtForEtaEffPlot_) {
842  etagens.at(vPos)->Fill(sortedGen[i].eta());
843  if (!noPhiPlots_)
844  phigens.at(vPos)->Fill(sortedGen[i].phi());
845  etaphigens.at(vPos)->Fill(sortedGen[i].eta(), sortedGen[i].phi());
846  }
847  } // END of loop over Generated particles
848  if (gencut_ >= reqNum && !mcMatchedOnly_)
849  totals.at(vPos)->Fill(numOfHLTCollectionLabels +
850  1.5); // this isn't really needed anymore keep for backward comp.
851  if (gencut_ >= reqNum)
852  totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels +
853  1.5); // this isn't really needed anymore keep for backward comp.
854 
855  bool accepted = true; // flags that the event has been accepted by all filters before
857  event.getByToken(hltResults_token, hltResults);
859  // Loop over filter modules //
861  for (unsigned int n = 0; n < numOfHLTCollectionLabels; n++) {
862  // check that there are not less sortedGen particles than nCandCut
863  // requires for this filter
864  if (sortedGen.size() < nCandCuts.at(n)) {
865  if (verbosity_ >= OUTPUT_ERRORS)
866  edm::LogError("EmDQM") << "There are less generated particles than the module '"
867  << theHLTCollectionLabels[n].label() << "' requires.";
868  continue;
869  }
870  std::vector<reco::Particle> sortedGenForFilter(sortedGen);
871  sortedGenForFilter.erase(sortedGenForFilter.begin() + nCandCuts.at(n), sortedGenForFilter.end());
872 
873  // Fill only if this filter was run.
874  if (pathIndex != 0 &&
876  break;
877  // These numbers are from the Parameter Set, such as:
878  // theHLTOutputTypes = cms.uint32(100)
879  switch (theHLTOutputTypes[n]) {
880  case trigger::TriggerL1NoIsoEG: // Non-isolated Level 1
881  histoFillerL1NonIso->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
882  break;
883  case trigger::TriggerL1IsoEG: // Isolated Level 1
884  histoFillerL1Iso->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
885  break;
886  case trigger::TriggerPhoton: // Photon
887  histoFillerPho->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
888  break;
889  case trigger::TriggerElectron: // Electron
890  histoFillerEle->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
891  break;
892  case trigger::TriggerCluster: // TriggerCluster
893  histoFillerClu->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
894  break;
895  default:
896  throw(cms::Exception("Release Validation Error") << "HLT output type not implemented: theHLTOutputTypes[n]");
897  }
898  } // END of loop over filter modules
899 
900  // earse the dummy and fill with real set
903  }
904 }
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidZee_token
Definition: EmDQM.h:224
std::vector< MonitorElement * > etgens
Definition: EmDQM.h:211
void fillHistos(edm::Handle< trigger::TriggerEventWithRefs > &, const edm::Event &, unsigned int, unsigned int, std::vector< reco::Particle > &, bool &)
Definition: EmDQM.cc:911
std::vector< MonitorElement * > totalmatchs
Definition: EmDQM.h:209
bool checkRecoParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:669
unsigned int numOfHLTCollectionLabels
Definition: EmDQM.h:155
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
Definition: EmDQM.h:188
bool noPhiPlots_
Definition: EmDQM.h:112
int pdgGen
Definition: EmDQM.h:165
std::set< std::string > hltCollectionLabelsFound
Definition: EmDQM.h:185
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
Definition: EmDQM.h:184
std::vector< MonitorElement * > etagens
Definition: EmDQM.h:212
std::vector< MonitorElement * > etaphigens
Definition: EmDQM.h:214
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
Log< level::Error, false > LogError
HistoFiller< reco::ElectronCollection > * histoFillerEle
Definition: EmDQM.h:87
double plotEtMin
Definition: EmDQM.h:167
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:241
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidWenu_token
Definition: EmDQM.h:223
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQM.h:154
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1Iso
Definition: EmDQM.h:91
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1NonIso
Definition: EmDQM.h:89
unsigned int gencut_
Definition: EmDQM.h:181
std::vector< unsigned int > nCandCuts
Definition: EmDQM.h:162
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerPho
Definition: EmDQM.h:90
edm::InputTag triggerObject_
Definition: EmDQM.h:96
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:242
std::vector< MonitorElement * > totals
Definition: EmDQM.h:208
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
Definition: EmDQM.h:226
std::set< std::string > hltCollectionLabelsMissed
Definition: EmDQM.h:189
void SetVarsFromPSet(std::vector< edm::ParameterSet >::iterator)
Definition: EmDQM.cc:1621
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
Definition: EmDQM.h:227
bool checkGeneratedParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:606
std::vector< MonitorElement * > phigens
Definition: EmDQM.h:213
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:151
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
Definition: EmDQM.h:225
bool autoConfMode_
Definition: EmDQM.h:94
bool isValid() const
Definition: HandleBase.h:70
unsigned int pathIndex
Definition: EmDQM.h:153
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:88
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObject_token
Definition: EmDQM.h:221
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQM.h:88
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
bool mcMatchedOnly_
Definition: EmDQM.h:111
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
Definition: EmDQM.h:228
GreaterByPt< reco::Particle > pTComparator_
Definition: EmDQM.h:216
Log< level::Warning, false > LogWarning
unsigned int verbosity_
Definition: EmDQM.h:97
std::vector< int > theHLTOutputTypes
Definition: EmDQM.h:158
unsigned int reqNum
Definition: EmDQM.h:164
unsigned int minEtForEtaEffPlot_
Definition: EmDQM.h:109
edm::EDGetTokenT< edm::TriggerResults > hltResults_token
Definition: EmDQM.h:222
Definition: event.py:1

◆ bookHistograms()

void EmDQM::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMOneEDAnalyzer<>.

Definition at line 376 of file EmDQM.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), B2GTnPMonitor_cfi::histTitle, mps_fire::i, label, doubleEle5SWL1RDQM_cfi::pdgGen, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, photon_test_cff::theHLTCollectionLabels, and dqmMemoryStats::total.

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

◆ checkGeneratedParticlesRequirement()

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 606 of file EmDQM.cc.

References funct::abs(), reco::LeafCandidate::et(), PVValHelper::eta, AJJGenJetFilter_cfi::genParticles, mps_fire::i, doubleEle5SWL1RDQM_cfi::pdgGen, and jetUpdater_cfi::sort.

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

◆ checkRecoParticlesRequirement()

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 669 of file EmDQM.cc.

References edm::HandleBase::isValid(), doubleEle5SWL1RDQM_cfi::pdgGen, and electronDQMIsoDist_cfi::reqNum.

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

◆ countSubstring()

int EmDQM::countSubstring ( const std::string &  str,
const std::string &  sub 
)
private

Definition at line 1118 of file EmDQM.cc.

References submitPVResolutionJobs::count, hltrates_dqm_sourceclient-live_cfg::offset, and str.

1118  {
1119  if (sub.length() == 0)
1120  return 0;
1121  int count = 0;
1122  for (size_t offset = str.find(sub); offset != std::string::npos; offset = str.find(sub, offset + sub.length())) {
1123  ++count;
1124  }
1125  return count;
1126 }
#define str(s)

◆ dqmBeginRun()

void EmDQM::dqmBeginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 64 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::addUntrackedParameter(), reco::ceil(), edm::ParameterSet::empty(), ALCARECOTkAlBeamHalo_cff::filter, EgammaHLTValidationUtils::findEgammaPaths(), HLT_Ele8_CaloIdT_TrkIdVL_DQM_cfi::genEtMin, edm::ParameterSet::getParameter(), mps_fire::i, ProducerED_cfi::InputTag, dqmiolumiharvest::j, label, EgammaHLTValidationUtils::makePSetForEgammaGenericFilter(), EgammaHLTValidationUtils::makePSetForElectronGenericFilter(), EgammaHLTValidationUtils::makePSetForEtFilter(), EgammaHLTValidationUtils::makePSetForL1SeedFilter(), EgammaHLTValidationUtils::makePSetForL1SeedToSuperClusterMatchFilter(), EgammaHLTValidationUtils::makePSetForOneOEMinusOneOPFilter(), EgammaHLTValidationUtils::makePSetForPixelMatchFilter(), HerwigMaxPtPartonFilter_cfi::moduleLabel, hltMonBTagIPClient_cfi::pathName, AlignmentTrackSelector_cfi::ptMax, ptMin, AlCaHLTBitMon_QueryRunRegistry::string, and trigger::TriggerPhoton.

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

◆ dqmEndRun()

void EmDQM::dqmEndRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 1078 of file EmDQM.cc.

References getBeamSpotDB::atag, submitPVResolutionJobs::count, ProducerED_cfi::InputTag, jetUpdater_cfi::sort, and makeGlobalPositionRcd_cfg::tag.

1078  {
1079  // loop over all the trigger path parameter sets
1080  unsigned int vPos = 0;
1081  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end();
1082  ++psetIt, ++vPos) {
1083  SetVarsFromPSet(psetIt);
1084 
1085  // print information about hltCollectionLabels which were not found
1086  // (but only those which were never found)
1087 
1088  // check which ones were never found
1089  std::vector<std::string> labelsNeverFound;
1090 
1091  for (const auto &tag : hltCollectionLabelsMissedPerPath.at(vPos)) {
1092  auto atag = edm::InputTag(tag);
1093  if ((hltCollectionLabelsFoundPerPath.at(vPos)).count(atag.encode()) == 0)
1094  // never found
1095  labelsNeverFound.push_back(atag.encode());
1096 
1097  } // loop over all tags which were missed at least once
1098 
1099  if (labelsNeverFound.empty())
1100  continue;
1101 
1102  std::sort(labelsNeverFound.begin(), labelsNeverFound.end());
1103 
1104  // there was at least one label which was never found
1105  // (note that this could also be because the corresponding
1106  // trigger path slowly fades out to zero efficiency)
1107  if (verbosity_ >= OUTPUT_WARNINGS)
1108  edm::LogWarning("EmDQM") << "There were some HLTCollectionLabels which were never found:";
1109 
1110  for (auto const &tag : labelsNeverFound) {
1111  if (verbosity_ >= OUTPUT_ALL)
1112  edm::LogPrint("EmDQM") << " " << tag;
1113  }
1114  }
1115 }
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
Definition: EmDQM.h:188
static const unsigned OUTPUT_ALL
Definition: EmDQM.h:243
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
Definition: EmDQM.h:184
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:242
void SetVarsFromPSet(std::vector< edm::ParameterSet >::iterator)
Definition: EmDQM.cc:1621
Log< level::Warning, true > LogPrint
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:151
Log< level::Warning, false > LogWarning
unsigned int verbosity_
Definition: EmDQM.h:97

◆ findEgammaPaths()

std::vector< std::vector< std::string > > EmDQM::findEgammaPaths ( )
private

Definition at line 1130 of file EmDQM.cc.

References mps_fire::i, castor_dqm_sourceclient_file_cfg::path, HLTTauDQMOffline_cfi::Paths, and AlCaHLTBitMon_QueryRunRegistry::string.

1130  {
1131  std::vector<std::vector<std::string>> Paths(5);
1132  // Loop over all paths in the menu
1133  for (unsigned int i = 0; i < hltConfig_.size(); i++) {
1135 
1136  // Find electron and photon paths and classify them
1137  if (int(path.find("HLT_")) == 0) { // Path should start with 'HLT_'
1138 
1139  int scCount = countSubstring(path, "_SC");
1140  int eleCount = countSubstring(path, "Ele");
1141  int doubleEleCount = countSubstring(path, "DoubleEle");
1142  int doubleSCCount = countSubstring(path, "DiSC");
1143  int tripleEleCount = countSubstring(path, "TripleEle");
1144  int photonCount = countSubstring(path, "hoton");
1145  int doublePhotonCount = countSubstring(path, "DoublePhoton") + countSubstring(path, "Diphoton");
1146 
1147  int totEleCount = 2 * tripleEleCount + doubleEleCount + eleCount + scCount + 2 * doubleSCCount;
1148  int totPhotonCount = doublePhotonCount + photonCount;
1149 
1150  if (totEleCount + totPhotonCount < 1)
1151  continue;
1152  switch (totEleCount) {
1153  case 1:
1154  Paths[TYPE_SINGLE_ELE].push_back(path);
1155  // std::cout << "Electron \t" << path << std::endl;
1156  break;
1157  case 2:
1158  Paths[TYPE_DOUBLE_ELE].push_back(path);
1159  // std::cout << "DoubleElectron \t" << path << std::endl;
1160  break;
1161  case 3:
1162  Paths[TYPE_TRIPLE_ELE].push_back(path);
1163  // std::cout << "TripleElectron \t" << path << std::endl;
1164  break;
1165  }
1166 
1167  switch (totPhotonCount) {
1168  case 1:
1169  Paths[TYPE_SINGLE_PHOTON].push_back(path);
1170  // std::cout << "Photon \t\t" << path << std::endl;
1171  break;
1172  case 2:
1173  Paths[TYPE_DOUBLE_PHOTON].push_back(path);
1174  // std::cout << "DoublePhoton \t" << path << std::endl;
1175  break;
1176  }
1177  }
1178  // std::cout << i << " triggerName: " << path << " containing " <<
1179  // hltConfig_.size(i) << " modules."<< std::endl;
1180  }
1181  return Paths;
1182 }
const std::string & triggerName(unsigned int triggerIndex) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
static const unsigned TYPE_DOUBLE_PHOTON
Definition: EmDQM.h:236
unsigned int size() const
number of trigger paths in trigger table
static const unsigned TYPE_SINGLE_PHOTON
Definition: EmDQM.h:235
int countSubstring(const std::string &, const std::string &)
Definition: EmDQM.cc:1118
static const unsigned TYPE_SINGLE_ELE
Definition: EmDQM.h:233
static const unsigned TYPE_DOUBLE_ELE
Definition: EmDQM.h:234
static const unsigned TYPE_TRIPLE_ELE
Definition: EmDQM.h:237

◆ getFilterModules()

std::vector< std::string > EmDQM::getFilterModules ( const std::string &  path)
private

Definition at line 1186 of file EmDQM.cc.

References filters, mps_fire::i, castor_dqm_sourceclient_file_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.

1186  {
1187  std::vector<std::string> filters;
1188 
1189  // std::cout << "Pathname: " << path << std::endl;
1190 
1191  // Loop over all modules in the path
1192  for (unsigned int i = 0; i < hltConfig_.size(path); i++) {
1194  std::string moduleType = hltConfig_.moduleType(module);
1195  std::string moduleEDMType = hltConfig_.moduleEDMType(module);
1196 
1197  // Find filters
1198  if (moduleEDMType == "EDFilter" ||
1199  moduleType.find("Filter") != std::string::npos) { // older samples may not have EDMType data
1200  // included
1201  filters.push_back(module);
1202  // std::cout << i << " moduleLabel: " << module << " moduleType: "
1203  // << moduleType << " moduleEDMType: " << moduleEDMType << std::endl;
1204  }
1205  }
1206  return filters;
1207 }
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
const std::string moduleType(const std::string &module) const
C++ class name of module.
std::vector< TPRegexp > filters
Definition: eve_filter.cc:22
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
unsigned int size() const
number of trigger paths in trigger table
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.

◆ getPrimaryEtCut()

double EmDQM::getPrimaryEtCut ( const std::string &  path)
private

Definition at line 1211 of file EmDQM.cc.

References EgHLTOffEleSelection_cfi::minEt, and castor_dqm_sourceclient_file_cfg::path.

1211  {
1212  double minEt = -1;
1213 
1214  boost::regex reg("^HLT_.*?(Ele|hoton|EG|SC)([[:digit:]]+).*");
1215 
1216  boost::smatch what;
1217  if (boost::regex_match(path, what, reg, boost::match_extra)) {
1218  minEt = std::stod(what[2]);
1219  }
1220 
1221  return minEt;
1222 }

◆ makePSetForEgammaDoubleEtDeltaPhiFilter()

edm::ParameterSet EmDQM::makePSetForEgammaDoubleEtDeltaPhiFilter ( const std::string &  moduleName)
private

Definition at line 1362 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), ProducerED_cfi::InputTag, EcalCalibMonitorClient_cfi::moduleName, AlCaHLTBitMon_QueryRunRegistry::string, and trigger::TriggerCluster.

1362  {
1363  edm::ParameterSet retPSet;
1364 
1365  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1366  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1367  // edm::InputTag(moduleName, "", processName_));
1368  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1369  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1370  std::vector<edm::InputTag>(1, std::string("none")));
1371  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1372  retPSet.addParameter<int>("ncandcut", 2);
1373 
1374  return retPSet;
1375 }
edm::InputTag triggerObject_
Definition: EmDQM.h:96
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
std::string const & process() const
Definition: InputTag.h:40

◆ makePSetForEgammaGenericFilter()

edm::ParameterSet EmDQM::makePSetForEgammaGenericFilter ( const std::string &  moduleName)
private

Definition at line 1379 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), ProducerED_cfi::InputTag, EcalCalibMonitorClient_cfi::moduleName, AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerCluster, trigger::TriggerPhoton, and HLT_2024v10_cff::varTag.

1379  {
1380  edm::ParameterSet retPSet;
1381 
1382  // example usages of HLTEgammaGenericFilter are:
1383  // R9 shape filter
1384  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolR9ShapeFilter
1385  // cluster shape filter
1386  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolClusterShapeFilter
1387  // Ecal isolation filter
1388  // hltL1NonIsoHLTNonIsoSingleElectronEt17TIghterEleIdIsolEcalIsolFilter H/E
1389  // filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHEFilter
1390  // HCAL isolation filter
1391  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHcalIsolFilter
1392 
1393  // infer the type of filter by the type of the producer which
1394  // generates the collection used to cut on this
1396  // edm::InputTag nonIsoTag =
1397  // hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("");
1398  // std::cout
1399  // << "varTag.label " << varTag.label() << " nonIsoTag.label " <<
1400  // nonIsoTag.label() << std::endl;
1401 
1402  std::string inputType = hltConfig_.moduleType(varTag.label());
1403  // std::cout << "inputType " << inputType << " moduleName " << moduleName <<
1404  // std::endl;
1405 
1406  //--------------------
1407  // sanity check: non-isolated path should be produced by the
1408  // same type of module
1409 
1410  // first check that the non-iso tag is non-empty
1411  // if (nonIsoTag.label().empty()) {
1412  // edm::LogError("EmDQM") << "nonIsoTag of HLTEgammaGenericFilter '" <<
1413  // moduleName << "' is empty."; return retPSet;
1414  //}
1415  // if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1416  // edm::LogError("EmDQM") << "C++ Type of varTag '" << inputType << "' and
1417  // nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the
1418  // same for HLTEgammaGenericFilter '" << moduleName << "'."; return retPSet;
1419  //}
1420  //--------------------
1421 
1422  // parameter saveTag determines the output type
1424  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
1425  else
1426  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1427 
1428  std::vector<edm::InputTag> isoCollections;
1429  isoCollections.push_back(varTag);
1430  // if (!nonIsoTag.label().empty())
1431  // isoCollections.push_back(nonIsoTag);
1432 
1433  //--------------------
1434  // the following cases seem to have identical PSets ?
1435  //--------------------
1436 
1437  if (inputType == "EgammaHLTR9IDProducer" || // R9 ID
1438  inputType == "EgammaHLTClusterShapeProducer" || // cluster shape
1439  inputType == "EgammaHLTGsfTrackVarProducer" || // GSF track deta and dphi filter
1440  inputType == "EgammaHLTBcHcalIsolationProducersRegional" || // HCAL isolation, or H for H/E (based on CaloTowers)
1441  inputType == "EgammaHLTHcalVarProducerFromRecHit" || // HCAL isolation, or H for H/E (based on RecHits)
1442  inputType == "EgammaHLTEcalPFClusterIsolationProducer" || // ECAL PF isolation filter
1443  inputType == "EgammaHLTHcalPFClusterIsolationProducer" || // HCAL PF isolation filter
1444  inputType == "EgammaHLTElectronTrackIsolationProducers" // Track isolation filter
1445  ) {
1446  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1447  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1448  // edm::InputTag(moduleName, "", processName_));
1449  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1450  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections", isoCollections);
1451  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1452 
1453  return retPSet;
1454  }
1455 
1456  if (verbosity_ >= OUTPUT_ERRORS)
1457  edm::LogError("EmDQM") << "Can't determine what the HLTEgammaGenericFilter '" << moduleName
1458  << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1459  return edm::ParameterSet();
1460 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
const std::string moduleType(const std::string &module) const
C++ class name of module.
Log< level::Error, false > LogError
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:241
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
edm::InputTag triggerObject_
Definition: EmDQM.h:96
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
unsigned int verbosity_
Definition: EmDQM.h:97
std::string const & process() const
Definition: InputTag.h:40

◆ makePSetForEgammaGenericQuadraticFilter()

edm::ParameterSet EmDQM::makePSetForEgammaGenericQuadraticFilter ( const std::string &  moduleName)
private

Definition at line 1464 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), ProducerED_cfi::InputTag, EcalCalibMonitorClient_cfi::moduleName, AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerCluster, trigger::TriggerPhoton, and HLT_2024v10_cff::varTag.

1464  {
1465  edm::ParameterSet retPSet;
1466 
1467  // example usages of HLTEgammaGenericFilter are:
1468  // R9 shape filter
1469  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolR9ShapeFilter
1470  // cluster shape filter
1471  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolClusterShapeFilter
1472  // Ecal isolation filter
1473  // hltL1NonIsoHLTNonIsoSingleElectronEt17TIghterEleIdIsolEcalIsolFilter H/E
1474  // filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHEFilter
1475  // HCAL isolation filter
1476  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHcalIsolFilter
1477 
1478  // infer the type of filter by the type of the producer which
1479  // generates the collection used to cut on this
1481  // edm::InputTag nonIsoTag =
1482  // hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("nonIsoTag");
1483  // std::cout << "varTag.label " << varTag.label() << " nonIsoTag.label " <<
1484  // nonIsoTag.label() << std::endl;
1485 
1486  std::string inputType = hltConfig_.moduleType(varTag.label());
1487  // std::cout << "inputType " << inputType << " moduleName " << moduleName <<
1488  // std::endl;
1489 
1490  //--------------------
1491  // sanity check: non-isolated path should be produced by the
1492  // same type of module
1493 
1494  // first check that the non-iso tag is non-empty
1495  // if (nonIsoTag.label().empty()) {
1496  // edm::LogError("EmDQM") << "nonIsoTag of HLTEgammaGenericFilter '" <<
1497  // moduleName << "' is empty."; return retPSet;
1498  //}
1499  // if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1500  // edm::LogError("EmDQM") << "C++ Type of varTag '" << inputType << "' and
1501  // nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the
1502  // same for HLTEgammaGenericFilter '" << moduleName << "'."; return retPSet;
1503  //}
1504  //--------------------
1505 
1506  // parameter saveTag determines the output type
1508  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
1509  else
1510  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1511 
1512  std::vector<edm::InputTag> isoCollections;
1513  isoCollections.push_back(varTag);
1514  // if (!nonIsoTag.label().empty())
1515  // isoCollections.push_back(nonIsoTag);
1516 
1517  //--------------------
1518  // the following cases seem to have identical PSets ?
1519  //--------------------
1520 
1521  if (inputType == "EgammaHLTR9IDProducer" || // R9 ID
1522  inputType == "EgammaHLTClusterShapeProducer" || // cluster shape
1523  inputType == "EgammaHLTBcHcalIsolationProducersRegional" || // HCAL isolation, or H for H/E (based on CaloTowers)
1524  inputType == "EgammaHLTHcalVarProducerFromRecHit" || // HCAL isolation, or H for H/E (based on RecHits)
1525  inputType == "EgammaHLTEcalPFClusterIsolationProducer" || // ECAL PF isolation filter
1526  inputType == "EgammaHLTHcalPFClusterIsolationProducer" || // HCAL PF isolation filter
1527  inputType == "EgammaHLTPhotonTrackIsolationProducersRegional" // Photon track isolation
1528  ) {
1529  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1530  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1531  // edm::InputTag(moduleName, "", processName_));
1532  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1533  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections", isoCollections);
1534  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1535 
1536  return retPSet;
1537  }
1538 
1539  if (verbosity_ >= OUTPUT_ERRORS)
1540  edm::LogError("EmDQM") << "Can't determine what the HLTEgammaGenericQuadraticFilter '" << moduleName
1541  << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1542  return edm::ParameterSet();
1543 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
const std::string moduleType(const std::string &module) const
C++ class name of module.
Log< level::Error, false > LogError
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:241
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
edm::InputTag triggerObject_
Definition: EmDQM.h:96
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
unsigned int verbosity_
Definition: EmDQM.h:97
std::string const & process() const
Definition: InputTag.h:40

◆ makePSetForElectronGenericFilter()

edm::ParameterSet EmDQM::makePSetForElectronGenericFilter ( const std::string &  moduleName)
private

Definition at line 1547 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), ProducerED_cfi::InputTag, EcalCalibMonitorClient_cfi::moduleName, AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerElectron, and HLT_2024v10_cff::varTag.

1547  {
1548  edm::ParameterSet retPSet;
1549 
1550  // example usages of HLTElectronGenericFilter are:
1551  //
1552  // deta filter
1553  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolDetaFilter dphi
1554  // filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolDphiFilter
1555  // track isolation
1556  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolTrackIsolFilter
1557 
1558  // infer the type of filter by the type of the producer which
1559  // generates the collection used to cut on this
1561  // edm::InputTag nonIsoTag =
1562  // hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("nonIsoTag");
1563  // std::cout << "varTag.label " << varTag.label() << " nonIsoTag.label " <<
1564  // nonIsoTag.label() << std::endl;
1565 
1566  std::string inputType = hltConfig_.moduleType(varTag.label());
1567  // std::cout << "inputType iso " << inputType << " inputType noniso " <<
1568  // hltConfig_.moduleType(nonIsoTag.label()) << " moduleName " << moduleName <<
1569  // std::endl;
1570 
1571  //--------------------
1572  // sanity check: non-isolated path should be produced by the
1573  // same type of module
1574  // if (nonIsoTag.label().empty()) {
1575  // edm::LogError("EmDQM") << "nonIsoTag of HLTElectronGenericFilter '" <<
1576  // moduleName << "' is empty."; return retPSet;
1577  //}
1578  // if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1579  // edm::LogError("EmDQM") << "C++ Type of varTag '" << inputType << "' and
1580  // nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the
1581  // same for HLTElectronGenericFilter '" << moduleName << "'."; return
1582  // retPSet;
1583  //}
1584  //--------------------
1585 
1586  // the type of object to look for seems to be the
1587  // same for all uses of HLTEgammaGenericFilter
1588  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
1589 
1590  std::vector<edm::InputTag> isoCollections;
1591  isoCollections.push_back(varTag);
1592  // if (!nonIsoTag.label().empty())
1593  // isoCollections.push_back(nonIsoTag);
1594 
1595  //--------------------
1596  // the following cases seem to have identical PSets ?
1597  //--------------------
1598 
1599  // note that whether deta or dphi is used is determined from
1600  // the product instance (not the module label)
1601  if (inputType == "EgammaHLTElectronTrackIsolationProducers" // track isolation
1602  ) {
1603  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1604  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1605  // edm::InputTag(moduleName, "", processName_));
1606  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1607  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections", isoCollections);
1608  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1609 
1610  return retPSet;
1611  }
1612 
1613  if (verbosity_ >= OUTPUT_ERRORS)
1614  edm::LogError("EmDQM") << "Can't determine what the HLTElectronGenericFilter '" << moduleName
1615  << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1616  return edm::ParameterSet();
1617 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
const std::string moduleType(const std::string &module) const
C++ class name of module.
Log< level::Error, false > LogError
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:241
edm::InputTag triggerObject_
Definition: EmDQM.h:96
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
unsigned int verbosity_
Definition: EmDQM.h:97
std::string const & process() const
Definition: InputTag.h:40

◆ makePSetForEtFilter()

edm::ParameterSet EmDQM::makePSetForEtFilter ( const std::string &  moduleName)
private

Definition at line 1311 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), ProducerED_cfi::InputTag, EcalCalibMonitorClient_cfi::moduleName, AlCaHLTBitMon_QueryRunRegistry::string, and trigger::TriggerCluster.

1311  {
1312  edm::ParameterSet retPSet;
1313 
1314  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1315  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1316  // edm::InputTag(moduleName, "", processName_));
1317  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1318  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1319  std::vector<edm::InputTag>(1, std::string("none")));
1320  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1321  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1322 
1323  return retPSet;
1324 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
edm::InputTag triggerObject_
Definition: EmDQM.h:96
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
std::string const & process() const
Definition: InputTag.h:40

◆ makePSetForL1SeedFilter()

edm::ParameterSet EmDQM::makePSetForL1SeedFilter ( const std::string &  moduleName)
private

Definition at line 1226 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), ProducerED_cfi::InputTag, EcalCalibMonitorClient_cfi::moduleName, AlCaHLTBitMon_QueryRunRegistry::string, and trigger::TriggerL1NoIsoEG.

1226  {
1227  // generates a PSet to analyze the behaviour of an L1 seed.
1228  //
1229  // moduleName is the name of the HLT module which filters
1230  // on the L1 seed.
1231  edm::ParameterSet retPSet;
1232 
1233  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1234  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1235  // edm::InputTag(moduleName, "", processName_));
1236  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1237  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1238  std::vector<edm::InputTag>(1, std::string("none")));
1239  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerL1NoIsoEG);
1240 
1241  // as HLTLevel1GTSeed has no parameter ncandcut we determine the value from
1242  // the name of the filter
1243 
1244  int orCount = countSubstring(moduleName, "OR") + countSubstring(moduleName, "Or");
1245  int egCount = countSubstring(moduleName, "EG");
1246  int dEgCount = countSubstring(moduleName, "DoubleEG");
1247  int tEgCount = countSubstring(moduleName, "TripleEG");
1248 
1249  int candCount = 2 * tEgCount + dEgCount + egCount;
1250  // if L1 is and OR of triggers try the assumption that all of them are similar
1251  // first and if not take the lowest number. If this is not successful, let the
1252  // path name decide
1253  if (orCount > 0 && candCount > 0) {
1254  if (egCount % (orCount + 1) == 0 && dEgCount % (orCount + 1) == 0 && tEgCount % (orCount + 1) == 0)
1255  candCount /= (orCount + 1);
1256  else if (egCount - dEgCount - tEgCount > 0)
1257  candCount = 1; // at least one singleEG present
1258  else if (dEgCount > 0)
1259  candCount = 2; // at least one doubleEG and no singleEG present
1260  else if (tEgCount > 0)
1261  candCount = 3; // only tripleEG present
1262  else
1263  candCount = -1;
1264  }
1265 
1266  switch (candCount) {
1267  case 0:
1268  retPSet.addParameter<int>("ncandcut", 0);
1269  break;
1270  case 1:
1271  retPSet.addParameter<int>("ncandcut", 1);
1272  break;
1273  case 2:
1274  retPSet.addParameter<int>("ncandcut", 2);
1275  break;
1276  case 3:
1277  retPSet.addParameter<int>("ncandcut", 3);
1278  break;
1279  default:
1280  retPSet.addParameter<int>("ncandcut", -1);
1281  }
1282 
1283  return retPSet;
1284 }
edm::InputTag triggerObject_
Definition: EmDQM.h:96
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
int countSubstring(const std::string &, const std::string &)
Definition: EmDQM.cc:1118
std::string const & process() const
Definition: InputTag.h:40

◆ makePSetForL1SeedToSuperClusterMatchFilter()

edm::ParameterSet EmDQM::makePSetForL1SeedToSuperClusterMatchFilter ( const std::string &  moduleName)
private

Definition at line 1288 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), ProducerED_cfi::InputTag, EcalCalibMonitorClient_cfi::moduleName, AlCaHLTBitMon_QueryRunRegistry::string, and trigger::TriggerCluster.

1288  {
1289  // generates a PSet to analyze the behaviour of L1 to supercluster match
1290  // filter.
1291  //
1292  // moduleName is the name of the HLT module which requires the match
1293  // between supercluster and L1 seed.
1294  //
1295  edm::ParameterSet retPSet;
1296 
1297  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1298  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1299  // edm::InputTag(moduleName, "", processName_));
1300  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1301  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1302  std::vector<edm::InputTag>(1, std::string("none")));
1303  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1304  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1305 
1306  return retPSet;
1307 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
edm::InputTag triggerObject_
Definition: EmDQM.h:96
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
std::string const & process() const
Definition: InputTag.h:40

◆ makePSetForOneOEMinusOneOPFilter()

edm::ParameterSet EmDQM::makePSetForOneOEMinusOneOPFilter ( const std::string &  moduleName)
private

Definition at line 1328 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), ProducerED_cfi::InputTag, EcalCalibMonitorClient_cfi::moduleName, AlCaHLTBitMon_QueryRunRegistry::string, and trigger::TriggerElectron.

1328  {
1329  edm::ParameterSet retPSet;
1330 
1331  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1332  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1333  // edm::InputTag(moduleName, "", processName_));
1334  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1335  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1336  std::vector<edm::InputTag>(1, std::string("none")));
1337  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
1338  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1339 
1340  return retPSet;
1341 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
edm::InputTag triggerObject_
Definition: EmDQM.h:96
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
std::string const & process() const
Definition: InputTag.h:40

◆ makePSetForPixelMatchFilter()

edm::ParameterSet EmDQM::makePSetForPixelMatchFilter ( const std::string &  moduleName)
private

Definition at line 1345 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), ProducerED_cfi::InputTag, EcalCalibMonitorClient_cfi::moduleName, AlCaHLTBitMon_QueryRunRegistry::string, and trigger::TriggerCluster.

1345  {
1346  edm::ParameterSet retPSet;
1347 
1348  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1349  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1350  // edm::InputTag(moduleName, "", processName_));
1351  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1352  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1353  std::vector<edm::InputTag>(1, std::string("none")));
1354  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1355  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1356 
1357  return retPSet;
1358 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:130
edm::InputTag triggerObject_
Definition: EmDQM.h:96
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
std::string const & process() const
Definition: InputTag.h:40

◆ SetVarsFromPSet()

void EmDQM::SetVarsFromPSet ( std::vector< edm::ParameterSet >::iterator  psetIt)
private

Definition at line 1621 of file EmDQM.cc.

References cms::cuda::assert(), filters, mps_fire::i, doubleEle5SWL1RDQM_cfi::pdgGen, electronDQMIsoDist_cfi::reqNum, AlCaHLTBitMon_QueryRunRegistry::string, photon_test_cff::theHLTCollectionLabels, and electronDQMIsoDist_cfi::theHLTOutputTypes.

1621  {
1622  dirname_ = "HLT/HLTEgammaValidation/" + psetIt->getParameter<std::string>("@module_label");
1623 
1624  pathIndex = psetIt->getUntrackedParameter<unsigned int>("pathIndex", 0);
1625  // parameters for generator study
1626  reqNum = psetIt->getParameter<unsigned int>("reqNum");
1627  pdgGen = psetIt->getParameter<int>("pdgGen");
1628  // plotting parameters (untracked because they don't affect the physics)
1629  plotEtMin = psetIt->getUntrackedParameter<double>("genEtMin", 0.);
1630  plotPtMin = psetIt->getUntrackedParameter<double>("PtMin", 0.);
1631  plotPtMax = psetIt->getUntrackedParameter<double>("PtMax", 1000.);
1632 
1633  // preselction cuts
1634  gencutCollection_ = psetIt->getParameter<edm::InputTag>("cutcollection");
1635  gencut_ = psetIt->getParameter<int>("cutnum");
1636 
1638  // Read in the Vector of Parameter Sets. //
1639  // Information for each filter-step //
1641  std::vector<edm::ParameterSet> filters = psetIt->getParameter<std::vector<edm::ParameterSet>>("filters");
1642 
1643  // empty vectors of parameters from previous paths
1644  theHLTCollectionLabels.clear();
1645  theHLTOutputTypes.clear();
1647  plotBounds.clear();
1648  isoNames.clear();
1649  plotiso.clear();
1650  nCandCuts.clear();
1651 
1652  int i = 0;
1653  for (std::vector<edm::ParameterSet>::iterator filterconf = filters.begin(); filterconf != filters.end();
1654  filterconf++) {
1655  theHLTCollectionLabels.push_back(filterconf->getParameter<edm::InputTag>("HLTCollectionLabels"));
1656  theHLTOutputTypes.push_back(filterconf->getParameter<int>("theHLTOutputTypes"));
1657  // Grab the human-readable name, if it is not specified, use the Collection
1658  // Label
1659  theHLTCollectionHumanNames.push_back(
1660  filterconf->getUntrackedParameter<std::string>("HLTCollectionHumanName", theHLTCollectionLabels[i].label()));
1661 
1662  std::vector<double> bounds = filterconf->getParameter<std::vector<double>>("PlotBounds");
1663  // If the size of plot "bounds" vector != 2, abort
1664  assert(bounds.size() == 2);
1665  plotBounds.push_back(std::pair<double, double>(bounds[0], bounds[1]));
1666  isoNames.push_back(filterconf->getParameter<std::vector<edm::InputTag>>("IsoCollections"));
1667 
1668  // for (unsigned int i=0; i<isoNames.back().size(); i++) {
1669  // switch(theHLTOutputTypes.back()) {
1670  // case trigger::TriggerL1NoIsoEG:
1671  // histoFillerL1NonIso->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<l1extra::L1EmParticleCollection
1672  // , float>>>(isoNames.back()[i])); break;
1673  // case trigger::TriggerL1IsoEG: // Isolated Level 1
1674  // histoFillerL1Iso->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<l1extra::L1EmParticleCollection
1675  // , float>>>(isoNames.back()[i])); break;
1676  // case trigger::TriggerPhoton: // Photon
1677  // histoFillerPho->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::RecoEcalCandidateCollection
1678  // , float>>>(isoNames.back()[i])); break;
1679  // case trigger::TriggerElectron: // Electron
1680  // histoFillerEle->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::ElectronCollection
1681  // , float>>>(isoNames.back()[i])); break;
1682  // case trigger::TriggerCluster: // TriggerCluster
1683  // histoFillerClu->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::RecoEcalCandidateCollection
1684  // , float>>>(isoNames.back()[i])); break;
1685  // default:
1686  // throw(cms::Exception("Release Validation Error") << "HLT output type
1687  // not implemented: theHLTOutputTypes[n]" );
1688  // }
1689  //}
1690 
1691  // If the size of the isoNames vector is not greater than zero, abort
1692  assert(!isoNames.back().empty());
1693  if (isoNames.back().at(0).label() == "none") {
1694  plotiso.push_back(false);
1695  } else {
1696  if (!noIsolationPlots_)
1697  plotiso.push_back(true);
1698  else
1699  plotiso.push_back(false);
1700  }
1701  nCandCuts.push_back(filterconf->getParameter<int>("ncandcut"));
1702  i++;
1703  } // END of loop over parameter sets
1704 
1705  // Record number of HLTCollectionLabels
1707 }
unsigned int numOfHLTCollectionLabels
Definition: EmDQM.h:155
std::string dirname_
Definition: EmDQM.h:85
std::vector< std::pair< double, double > > plotBounds
Definition: EmDQM.h:161
int pdgGen
Definition: EmDQM.h:165
assert(be >=bs)
double plotEtMin
Definition: EmDQM.h:167
std::vector< TPRegexp > filters
Definition: eve_filter.cc:22
std::vector< std::vector< edm::InputTag > > isoNames
Definition: EmDQM.h:160
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQM.h:154
unsigned int gencut_
Definition: EmDQM.h:181
std::vector< unsigned int > nCandCuts
Definition: EmDQM.h:162
double plotPtMax
Definition: EmDQM.h:169
bool noIsolationPlots_
Definition: EmDQM.h:113
double plotPtMin
Definition: EmDQM.h:168
edm::InputTag gencutCollection_
Definition: EmDQM.h:177
unsigned int pathIndex
Definition: EmDQM.h:153
std::vector< std::string > theHLTCollectionHumanNames
Definition: EmDQM.h:156
std::vector< int > theHLTOutputTypes
Definition: EmDQM.h:158
unsigned int reqNum
Definition: EmDQM.h:164
std::vector< bool > plotiso
Definition: EmDQM.h:159

Friends And Related Function Documentation

◆ HistoFiller< l1extra::L1EmParticleCollection >

Definition at line 67 of file EmDQM.h.

◆ HistoFiller< reco::ElectronCollection >

friend class HistoFiller< reco::ElectronCollection >
friend

Definition at line 65 of file EmDQM.h.

◆ HistoFiller< reco::RecoEcalCandidateCollection >

Definition at line 66 of file EmDQM.h.

Member Data Documentation

◆ autoConfMode_

bool EmDQM::autoConfMode_
private

Definition at line 94 of file EmDQM.h.

◆ dirname_

std::string EmDQM::dirname_
private

Definition at line 85 of file EmDQM.h.

◆ eta2DMax_

double EmDQM::eta2DMax_
private

Definition at line 106 of file EmDQM.h.

◆ etagens

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

Definition at line 212 of file EmDQM.h.

◆ etahistmatchs

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

Definition at line 198 of file EmDQM.h.

◆ etahists

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

Definition at line 195 of file EmDQM.h.

◆ etaMax_

double EmDQM::etaMax_
private

Definition at line 103 of file EmDQM.h.

◆ etaphigens

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

Definition at line 214 of file EmDQM.h.

◆ etaphihistmatchs

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

Definition at line 205 of file EmDQM.h.

◆ etaphihists

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

Definition at line 204 of file EmDQM.h.

◆ etgens

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

Definition at line 211 of file EmDQM.h.

◆ ethistmatchs

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

Definition at line 200 of file EmDQM.h.

◆ ethists

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

Definition at line 197 of file EmDQM.h.

◆ gencut_

unsigned int EmDQM::gencut_
private

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

Definition at line 181 of file EmDQM.h.

◆ gencutColl_fidDiGamma_token

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

Definition at line 227 of file EmDQM.h.

◆ gencutColl_fidGammaJet_token

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

Definition at line 226 of file EmDQM.h.

◆ gencutColl_fidTripleEle_token

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

Definition at line 225 of file EmDQM.h.

◆ gencutColl_fidWenu_token

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

Definition at line 223 of file EmDQM.h.

◆ gencutColl_fidZee_token

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

Definition at line 224 of file EmDQM.h.

◆ gencutColl_manualConf_token

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

Definition at line 228 of file EmDQM.h.

◆ gencutCollection_

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 177 of file EmDQM.h.

◆ genEtaAcc_

double EmDQM::genEtaAcc_
private

Definition at line 98 of file EmDQM.h.

◆ genEtAcc_

double EmDQM::genEtAcc_
private

Definition at line 99 of file EmDQM.h.

◆ genParticles_token

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

Definition at line 220 of file EmDQM.h.

◆ histEtaOfHltObjMatchToGens

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

Definition at line 202 of file EmDQM.h.

◆ histEtaPhiOfHltObjMatchToGens

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

Definition at line 206 of file EmDQM.h.

◆ histEtOfHltObjMatchToGens

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

Definition at line 201 of file EmDQM.h.

◆ histoFillerClu

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

Definition at line 88 of file EmDQM.h.

◆ histoFillerEle

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

Definition at line 87 of file EmDQM.h.

◆ histoFillerL1Iso

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

Definition at line 91 of file EmDQM.h.

◆ histoFillerL1NonIso

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

Definition at line 89 of file EmDQM.h.

◆ histoFillerPho

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

Definition at line 90 of file EmDQM.h.

◆ histPhiOfHltObjMatchToGens

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

Definition at line 203 of file EmDQM.h.

◆ hltCollectionLabelsFound

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

Definition at line 185 of file EmDQM.h.

◆ hltCollectionLabelsFoundPerPath

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

which hltCollectionLabels were SEEN at least once

Definition at line 184 of file EmDQM.h.

◆ hltCollectionLabelsMissed

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

Definition at line 189 of file EmDQM.h.

◆ hltCollectionLabelsMissedPerPath

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

which hltCollectionLabels were MISSED at least once

Definition at line 188 of file EmDQM.h.

◆ hltConfig_

HLTConfigProvider EmDQM::hltConfig_
private

The instance of the HLTConfigProvider as a data member.

Definition at line 130 of file EmDQM.h.

◆ hltResults_token

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

Definition at line 222 of file EmDQM.h.

◆ isData_

bool EmDQM::isData_
private

Definition at line 100 of file EmDQM.h.

◆ isoNames

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

Definition at line 160 of file EmDQM.h.

◆ mcMatchedOnly_

bool EmDQM::mcMatchedOnly_
private

Definition at line 111 of file EmDQM.h.

◆ minEtForEtaEffPlot_

unsigned int EmDQM::minEtForEtaEffPlot_
private

Definition at line 109 of file EmDQM.h.

◆ nbins2D_

unsigned int EmDQM::nbins2D_
private

Definition at line 108 of file EmDQM.h.

◆ nbins_

unsigned int EmDQM::nbins_
private

Definition at line 105 of file EmDQM.h.

◆ nCandCuts

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

Definition at line 162 of file EmDQM.h.

◆ noIsolationPlots_

bool EmDQM::noIsolationPlots_
private

Definition at line 113 of file EmDQM.h.

◆ noPhiPlots_

bool EmDQM::noPhiPlots_
private

Definition at line 112 of file EmDQM.h.

◆ numOfHLTCollectionLabels

unsigned int EmDQM::numOfHLTCollectionLabels
private

Definition at line 155 of file EmDQM.h.

◆ OUTPUT_ALL

const unsigned EmDQM::OUTPUT_ALL = 3
staticprivate

Definition at line 243 of file EmDQM.h.

◆ OUTPUT_ERRORS

const unsigned EmDQM::OUTPUT_ERRORS = 1
staticprivate

Definition at line 241 of file EmDQM.h.

◆ OUTPUT_SILENT

const unsigned EmDQM::OUTPUT_SILENT = 0
staticprivate

Definition at line 240 of file EmDQM.h.

◆ OUTPUT_WARNINGS

const unsigned EmDQM::OUTPUT_WARNINGS = 2
staticprivate

Definition at line 242 of file EmDQM.h.

◆ paramSets

std::vector<edm::ParameterSet> EmDQM::paramSets
private

Definition at line 151 of file EmDQM.h.

◆ pathIndex

unsigned int EmDQM::pathIndex
private

Definition at line 153 of file EmDQM.h.

◆ pdgGen

int EmDQM::pdgGen
private

Definition at line 165 of file EmDQM.h.

◆ phi2DMax_

double EmDQM::phi2DMax_
private

Definition at line 107 of file EmDQM.h.

◆ phigens

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

Definition at line 213 of file EmDQM.h.

◆ phihistmatchs

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

Definition at line 199 of file EmDQM.h.

◆ phihists

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

Definition at line 196 of file EmDQM.h.

◆ phiMax_

double EmDQM::phiMax_
private

Definition at line 104 of file EmDQM.h.

◆ plotBounds

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

Definition at line 161 of file EmDQM.h.

◆ plotEtMin

double EmDQM::plotEtMin
private

Definition at line 167 of file EmDQM.h.

◆ plotiso

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

Definition at line 159 of file EmDQM.h.

◆ plotPtMax

double EmDQM::plotPtMax
private

Definition at line 169 of file EmDQM.h.

◆ plotPtMin

double EmDQM::plotPtMin
private

Definition at line 168 of file EmDQM.h.

◆ pTComparator_

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

Definition at line 216 of file EmDQM.h.

◆ pTGenComparator_

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

Definition at line 217 of file EmDQM.h.

◆ ptMax_

double EmDQM::ptMax_
private

Definition at line 101 of file EmDQM.h.

◆ ptMin_

double EmDQM::ptMin_
private

Definition at line 102 of file EmDQM.h.

◆ reqNum

unsigned int EmDQM::reqNum
private

Definition at line 164 of file EmDQM.h.

◆ theHLTCollectionHumanNames

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

Definition at line 156 of file EmDQM.h.

◆ theHLTCollectionLabels

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

Definition at line 154 of file EmDQM.h.

◆ theHLTOutputTypes

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

Definition at line 158 of file EmDQM.h.

◆ theL1Seed

edm::InputTag EmDQM::theL1Seed
private

Definition at line 157 of file EmDQM.h.

◆ totalmatchs

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

Definition at line 209 of file EmDQM.h.

◆ totals

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

Definition at line 208 of file EmDQM.h.

◆ triggerObject_

edm::InputTag EmDQM::triggerObject_
private

Definition at line 96 of file EmDQM.h.

◆ triggerObject_token

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

Definition at line 221 of file EmDQM.h.

◆ TYPE_DOUBLE_ELE

const unsigned EmDQM::TYPE_DOUBLE_ELE = 1
staticprivate

Definition at line 234 of file EmDQM.h.

◆ TYPE_DOUBLE_PHOTON

const unsigned EmDQM::TYPE_DOUBLE_PHOTON = 3
staticprivate

Definition at line 236 of file EmDQM.h.

◆ TYPE_SINGLE_ELE

const unsigned EmDQM::TYPE_SINGLE_ELE = 0
staticprivate

Definition at line 233 of file EmDQM.h.

◆ TYPE_SINGLE_PHOTON

const unsigned EmDQM::TYPE_SINGLE_PHOTON = 2
staticprivate

Definition at line 235 of file EmDQM.h.

◆ TYPE_TRIPLE_ELE

const unsigned EmDQM::TYPE_TRIPLE_ELE = 4
staticprivate

Definition at line 237 of file EmDQM.h.

◆ useHumanReadableHistTitles_

bool EmDQM::useHumanReadableHistTitles_
private

Definition at line 110 of file EmDQM.h.

◆ verbosity_

unsigned int EmDQM::verbosity_
private

Definition at line 97 of file EmDQM.h.