CMS 3D CMS Logo

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

#include <EmDQM.h>

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

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &) override
 
void beginJob ()
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
 EmDQM (const edm::ParameterSet &pset)
 Constructor. More...
 
void endJob ()
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
 ~EmDQM () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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

Private Attributes

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

Static Private Attributes

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

Friends

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

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 63 of file EmDQM.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 12 of file EmDQM.cc.

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

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

Destructor.

Definition at line 615 of file EmDQM.cc.

615  {
616 }

Member Function Documentation

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

Definition at line 737 of file EmDQM.cc.

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

738 {
739  // loop over all the trigger path parameter sets
740  unsigned int vPos = 0;
741  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end(); ++psetIt, ++vPos) {
742  SetVarsFromPSet(psetIt);
743  // get the set forthe current path
746 
748  // Check if there's enough gen particles //
749  // of interest //
751  // get the right data according to the trigger path currently looked at
753  if (autoConfMode_) {
754  switch(reqNum) {
755  case 1:
756  if (pdgGen == 11) event.getByToken(gencutColl_fidWenu_token, cutCounter);
757  else event.getByToken(gencutColl_fidGammaJet_token, cutCounter);
758  break;
759  case 2:
760  if (pdgGen == 11) event.getByToken(gencutColl_fidZee_token, cutCounter);
761  else 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 with pdgId=" << pdgGen;
772  continue;
773  }
774 
775  // fill L1 and HLT info
776  // get objects possed by each filter
778  event.getByToken(triggerObject_token,triggerObj);
779  if(!triggerObj.isValid()) {
781  edm::LogWarning("EmDQM") << "parameter triggerobject (" << triggerObject_ << ") does not corresond to a valid TriggerEventWithRefs product. Please check especially the process name (e.g. when running over reprocessed datasets)";
782  continue;
783  }
784 
785  // Were enough high energy gen particles found?
786  if (event.isRealData()) {
787  // running validation on data.
788  // TODO: we should check that the entire
789  // run is on the same type (all data or
790  // all MC). Otherwise one gets
791  // uninterpretable results...
792  if (!checkRecoParticlesRequirement(event))
793  continue;
794  }
795  else { // MC
796  // if no, throw event away
798  continue;
799  }
800 
801  // It was an event worth keeping. Continue.
802 
804  // Fill the bin labeled "Total" //
805  // This will be the number of events looked at. //
807  if (!mcMatchedOnly_) totals.at(vPos)->Fill(numOfHLTCollectionLabels+0.5);
808  totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels+0.5);
809 
811  // Fill generator info //
813  // the gencut_ highest Et generator objects of the preselected type are our matches
814 
815  std::vector<reco::Particle> sortedGen;
816  for(edm::View<reco::Candidate>::const_iterator genpart = cutCounter->begin(); genpart != cutCounter->end();genpart++){
817  reco::Particle tmpcand( genpart->charge(), genpart->p4(), genpart->vertex(),genpart->pdgId(),genpart->status() );
818  if (tmpcand.et() >= plotEtMin) {
819  sortedGen.push_back(tmpcand);
820  }
821  }
822  std::sort(sortedGen.begin(),sortedGen.end(),pTComparator_ );
823 
824  // Now the collection of gen particles is sorted by pt.
825  // So, remove all particles from the collection so that we
826  // only have the top "1 thru gencut_" particles in it
827  if (sortedGen.size() < gencut_){
828  continue;
829  }
830  sortedGen.erase(sortedGen.begin()+gencut_,sortedGen.end());
831 
832  for (unsigned int i = 0 ; i < gencut_ ; i++ ) {
833  etgens.at(vPos)->Fill( sortedGen[i].et() ); //validity has been implicitily checked by the cut on gencut_ above
834  if (sortedGen[i].et() > minEtForEtaEffPlot_) {
835  etagens.at(vPos)->Fill( sortedGen[i].eta() );
836  if (!noPhiPlots_) phigens.at(vPos)->Fill( sortedGen[i].phi() );
837  etaphigens.at(vPos)->Fill( sortedGen[i].eta(),sortedGen[i].phi() );
838  }
839  } // END of loop over Generated particles
840  if (gencut_ >= reqNum && !mcMatchedOnly_) totals.at(vPos)->Fill(numOfHLTCollectionLabels+1.5); // this isn't really needed anymore keep for backward comp.
841  if (gencut_ >= reqNum) totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels+1.5); // this isn't really needed anymore keep for backward comp.
842 
843  bool accepted = true; // flags that the event has been accepted by all filters before
845  event.getByToken(hltResults_token, hltResults);
847  // Loop over filter modules //
849  for(unsigned int n=0; n < numOfHLTCollectionLabels ; n++) {
850  // check that there are not less sortedGen particles than nCandCut requires for this filter
851  if (sortedGen.size() < nCandCuts.at(n)) {
852  if (verbosity_ >= OUTPUT_ERRORS)
853  edm::LogError("EmDQM") << "There are less generated particles than the module '" << theHLTCollectionLabels[n].label() << "' requires.";
854  continue;
855  }
856  std::vector<reco::Particle> sortedGenForFilter(sortedGen);
857  sortedGenForFilter.erase(sortedGenForFilter.begin() + nCandCuts.at(n), sortedGenForFilter.end());
858 
859  // Fill only if this filter was run.
860  if (pathIndex != 0 && hltConfig_.moduleIndex(pathIndex, theHLTCollectionLabels[n].label()) > hltResults->index(pathIndex)) break;
861  // These numbers are from the Parameter Set, such as:
862  // theHLTOutputTypes = cms.uint32(100)
863  switch(theHLTOutputTypes[n])
864  {
865  case trigger::TriggerL1NoIsoEG: // Non-isolated Level 1
866  histoFillerL1NonIso->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
867  break;
868  case trigger::TriggerL1IsoEG: // Isolated Level 1
869  histoFillerL1Iso->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
870  break;
871  case trigger::TriggerPhoton: // Photon
872  histoFillerPho->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
873  break;
874  case trigger::TriggerElectron: // Electron
875  histoFillerEle->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
876  break;
877  case trigger::TriggerCluster: // TriggerCluster
878  histoFillerClu->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
879  break;
880  default:
881  throw(cms::Exception("Release Validation Error") << "HLT output type not implemented: theHLTOutputTypes[n]" );
882  }
883  } // END of loop over filter modules
884 
885  // earse the dummy and fill with real set
888  }
889 }
std::vector< MonitorElement * > totals
Definition: EmDQM.h:213
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidZee_token
Definition: EmDQM.h:229
void fillHistos(edm::Handle< trigger::TriggerEventWithRefs > &, const edm::Event &, unsigned int, unsigned int, std::vector< reco::Particle > &, bool &)
Definition: EmDQM.cc:895
bool checkRecoParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:676
unsigned int numOfHLTCollectionLabels
Definition: EmDQM.h:160
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
Definition: EmDQM.h:192
bool noPhiPlots_
Definition: EmDQM.h:117
int pdgGen
Definition: EmDQM.h:170
std::set< std::string > hltCollectionLabelsFound
Definition: EmDQM.h:189
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
Definition: EmDQM.h:188
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:135
HistoFiller< reco::ElectronCollection > * histoFillerEle
Definition: EmDQM.h:90
double plotEtMin
Definition: EmDQM.h:172
bool isRealData() const
Definition: EventBase.h:64
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:246
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidWenu_token
Definition: EmDQM.h:228
std::vector< MonitorElement * > etagens
Definition: EmDQM.h:217
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQM.h:159
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1Iso
Definition: EmDQM.h:94
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1NonIso
Definition: EmDQM.h:92
unsigned int gencut_
Definition: EmDQM.h:185
std::vector< unsigned int > nCandCuts
Definition: EmDQM.h:167
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerPho
Definition: EmDQM.h:93
edm::InputTag triggerObject_
Definition: EmDQM.h:101
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:247
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
Definition: EmDQM.h:231
std::set< std::string > hltCollectionLabelsMissed
Definition: EmDQM.h:193
void SetVarsFromPSet(std::vector< edm::ParameterSet >::iterator)
Definition: EmDQM.cc:1579
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
Definition: EmDQM.h:232
bool checkGeneratedParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:619
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:156
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
Definition: EmDQM.h:230
bool autoConfMode_
Definition: EmDQM.h:97
et
define resolution functions of each parameter
unsigned int pathIndex
Definition: EmDQM.h:158
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObject_token
Definition: EmDQM.h:226
std::vector< MonitorElement * > totalmatchs
Definition: EmDQM.h:214
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQM.h:91
bool mcMatchedOnly_
Definition: EmDQM.h:116
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
Definition: EmDQM.h:233
GreaterByPt< reco::Particle > pTComparator_
Definition: EmDQM.h:221
std::vector< MonitorElement * > phigens
Definition: EmDQM.h:218
unsigned int verbosity_
Definition: EmDQM.h:102
std::vector< int > theHLTOutputTypes
Definition: EmDQM.h:163
unsigned int reqNum
Definition: EmDQM.h:169
std::vector< MonitorElement * > etaphigens
Definition: EmDQM.h:219
unsigned int minEtForEtaEffPlot_
Definition: EmDQM.h:114
edm::EDGetTokenT< edm::TriggerResults > hltResults_token
Definition: EmDQM.h:227
std::vector< MonitorElement * > etgens
Definition: EmDQM.h:216
void EmDQM::beginJob ( void  )

Definition at line 69 of file EmDQM.cc.

70 {
71 
72 }
void EmDQM::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 398 of file EmDQM.cc.

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

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

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

Referenced by analyze().

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

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

Referenced by analyze().

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

Definition at line 1099 of file EmDQM.cc.

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

Referenced by findEgammaPaths(), and makePSetForL1SeedFilter().

1100 {
1101  if (sub.length() == 0) return 0;
1102  int count = 0;
1103  for (size_t offset = str.find(sub); offset != std::string::npos;
1104  offset = str.find(sub, offset + sub.length()))
1105  {
1106  ++count;
1107  }
1108  return count;
1109 }
void EmDQM::dqmBeginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 75 of file EmDQM.cc.

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

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

Definition at line 1092 of file EmDQM.cc.

1093 {
1094 
1095 }
void EmDQM::endRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 1049 of file EmDQM.cc.

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

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

Definition at line 1114 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

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

Definition at line 1171 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1172 {
1173  std::vector<std::string> filters;
1174 
1175  //std::cout << "Pathname: " << path << std::endl;
1176 
1177  // Loop over all modules in the path
1178  for (unsigned int i=0; i<hltConfig_.size(path); i++) {
1179 
1181  std::string moduleType = hltConfig_.moduleType(module);
1182  std::string moduleEDMType = hltConfig_.moduleEDMType(module);
1183 
1184  // Find filters
1185  if (moduleEDMType == "EDFilter" || moduleType.find("Filter") != std::string::npos) { // older samples may not have EDMType data included
1186  filters.push_back(module);
1187  //std::cout << i << " moduleLabel: " << module << " moduleType: " << moduleType << " moduleEDMType: " << moduleEDMType << std::endl;
1188  }
1189  }
1190  return filters;
1191 }
unsigned int size() const
number of trigger paths in trigger table
const std::string moduleType(const std::string &module) const
C++ class name of module.
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:135
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
std::vector< TPRegexp > filters
Definition: eve_filter.cc:22
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
Definition: vlib.h:208
double EmDQM::getPrimaryEtCut ( const std::string &  path)
private

Definition at line 1196 of file EmDQM.cc.

Referenced by dqmBeginRun().

1197 {
1198  double minEt = -1;
1199 
1200  boost::regex reg("^HLT_.*?(Ele|hoton|EG|SC)([[:digit:]]+).*");
1201 
1202  boost::smatch what;
1203  if (boost::regex_match(path, what, reg, boost::match_extra))
1204  {
1205  minEt = boost::lexical_cast<double>(what[2]);
1206  }
1207 
1208  return minEt;
1209 }
edm::ParameterSet EmDQM::makePSetForEgammaDoubleEtDeltaPhiFilter ( const std::string &  moduleName)
private

Definition at line 1341 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1342 {
1343  edm::ParameterSet retPSet;
1344 
1345  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1346  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1347  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1348  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1349  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1350  retPSet.addParameter<int>("ncandcut", 2);
1351 
1352  return retPSet;
1353 }
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:101
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & process() const
Definition: InputTag.h:40
edm::ParameterSet EmDQM::makePSetForEgammaGenericFilter ( const std::string &  moduleName)
private

Definition at line 1358 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

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

Definition at line 1436 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

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

Definition at line 1513 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

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

Definition at line 1290 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

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

Definition at line 1214 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

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

Definition at line 1268 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1269 {
1270  // generates a PSet to analyze the behaviour of L1 to supercluster match filter.
1271  //
1272  // moduleName is the name of the HLT module which requires the match
1273  // between supercluster and L1 seed.
1274  //
1275  edm::ParameterSet retPSet;
1276 
1277  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1278  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1279  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1280  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1281  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1282  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1283 
1284  return retPSet;
1285 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:135
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:101
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & process() const
Definition: InputTag.h:40
edm::ParameterSet EmDQM::makePSetForOneOEMinusOneOPFilter ( const std::string &  moduleName)
private

Definition at line 1307 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

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

Definition at line 1324 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1325 {
1326  edm::ParameterSet retPSet;
1327 
1328  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1329  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1330  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1331  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1332  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1333  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1334 
1335  return retPSet;
1336 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:135
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
edm::InputTag triggerObject_
Definition: EmDQM.h:101
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
std::string const & process() const
Definition: InputTag.h:40
void EmDQM::SetVarsFromPSet ( std::vector< edm::ParameterSet >::iterator  psetIt)
private

Definition at line 1579 of file EmDQM.cc.

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

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

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

Friends And Related Function Documentation

Definition at line 68 of file EmDQM.h.

friend class HistoFiller< reco::ElectronCollection >
friend

Definition at line 66 of file EmDQM.h.

Definition at line 67 of file EmDQM.h.

Member Data Documentation

bool EmDQM::autoConfMode_
private

Definition at line 97 of file EmDQM.h.

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

std::string EmDQM::dirname_
private

Definition at line 88 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

double EmDQM::eta2DMax_
private

Definition at line 111 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

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

Definition at line 217 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 203 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 200 of file EmDQM.h.

Referenced by bookHistograms().

double EmDQM::etaMax_
private

Definition at line 108 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

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

Definition at line 219 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 210 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 209 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 216 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 205 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 202 of file EmDQM.h.

Referenced by bookHistograms().

unsigned int EmDQM::gencut_
private

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

Definition at line 185 of file EmDQM.h.

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

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

Definition at line 232 of file EmDQM.h.

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

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

Definition at line 231 of file EmDQM.h.

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

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

Definition at line 230 of file EmDQM.h.

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

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

Definition at line 228 of file EmDQM.h.

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

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

Definition at line 229 of file EmDQM.h.

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

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

Definition at line 233 of file EmDQM.h.

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

edm::InputTag EmDQM::gencutCollection_
private

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

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

Definition at line 182 of file EmDQM.h.

Referenced by SetVarsFromPSet().

double EmDQM::genEtaAcc_
private

Definition at line 103 of file EmDQM.h.

Referenced by checkGeneratedParticlesRequirement(), and EmDQM().

double EmDQM::genEtAcc_
private

Definition at line 104 of file EmDQM.h.

Referenced by EmDQM().

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

Definition at line 225 of file EmDQM.h.

Referenced by checkGeneratedParticlesRequirement(), and EmDQM().

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

Definition at line 207 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 211 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 206 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 91 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

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

Definition at line 90 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

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

Definition at line 94 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

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

Definition at line 92 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

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

Definition at line 93 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

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

Definition at line 208 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 189 of file EmDQM.h.

Referenced by analyze(), and dqmBeginRun().

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

which hltCollectionLabels were SEEN at least once

Definition at line 188 of file EmDQM.h.

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

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

Definition at line 193 of file EmDQM.h.

Referenced by analyze(), and dqmBeginRun().

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

which hltCollectionLabels were MISSED at least once

Definition at line 192 of file EmDQM.h.

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

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

Definition at line 227 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

bool EmDQM::isData_
private

Definition at line 105 of file EmDQM.h.

Referenced by dqmBeginRun(), and EmDQM().

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

Definition at line 165 of file EmDQM.h.

Referenced by SetVarsFromPSet().

bool EmDQM::mcMatchedOnly_
private

Definition at line 116 of file EmDQM.h.

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

unsigned int EmDQM::minEtForEtaEffPlot_
private

Definition at line 114 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

unsigned int EmDQM::nbins2D_
private

Definition at line 113 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

unsigned int EmDQM::nbins_
private

Definition at line 110 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

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

Definition at line 167 of file EmDQM.h.

Referenced by analyze(), and SetVarsFromPSet().

bool EmDQM::noIsolationPlots_
private

Definition at line 118 of file EmDQM.h.

Referenced by EmDQM(), and SetVarsFromPSet().

bool EmDQM::noPhiPlots_
private

Definition at line 117 of file EmDQM.h.

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

unsigned int EmDQM::numOfHLTCollectionLabels
private

Definition at line 160 of file EmDQM.h.

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

const unsigned EmDQM::OUTPUT_ALL = 3
staticprivate

Definition at line 248 of file EmDQM.h.

Referenced by dqmBeginRun(), and endRun().

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

Definition at line 245 of file EmDQM.h.

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

Definition at line 156 of file EmDQM.h.

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

unsigned int EmDQM::pathIndex
private

Definition at line 158 of file EmDQM.h.

Referenced by analyze(), and SetVarsFromPSet().

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

Definition at line 112 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

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

Definition at line 218 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 204 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 201 of file EmDQM.h.

Referenced by bookHistograms().

double EmDQM::phiMax_
private

Definition at line 109 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

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

Definition at line 166 of file EmDQM.h.

Referenced by SetVarsFromPSet().

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

Definition at line 164 of file EmDQM.h.

Referenced by SetVarsFromPSet().

double EmDQM::plotPtMax
private

Definition at line 174 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

double EmDQM::plotPtMin
private

Definition at line 173 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

const edm::ParameterSet& EmDQM::pset
private

Definition at line 99 of file EmDQM.h.

Referenced by EmDQM().

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

Definition at line 221 of file EmDQM.h.

Referenced by analyze().

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

Definition at line 222 of file EmDQM.h.

Referenced by checkGeneratedParticlesRequirement().

double EmDQM::ptMax_
private

Definition at line 106 of file EmDQM.h.

Referenced by dqmBeginRun(), and EmDQM().

double EmDQM::ptMin_
private

Definition at line 107 of file EmDQM.h.

Referenced by dqmBeginRun(), and EmDQM().

unsigned int EmDQM::reqNum
private

Definition at line 169 of file EmDQM.h.

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

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

Definition at line 161 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

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

Definition at line 159 of file EmDQM.h.

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

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

Definition at line 163 of file EmDQM.h.

Referenced by analyze(), and SetVarsFromPSet().

edm::InputTag EmDQM::theL1Seed
private

Definition at line 162 of file EmDQM.h.

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

Definition at line 214 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 213 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 226 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

const unsigned EmDQM::TYPE_DOUBLE_ELE = 1
staticprivate

Definition at line 239 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_DOUBLE_PHOTON = 3
staticprivate

Definition at line 241 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_SINGLE_ELE = 0
staticprivate

Definition at line 238 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_SINGLE_PHOTON = 2
staticprivate

Definition at line 240 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_TRIPLE_ELE = 4
staticprivate

Definition at line 242 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

bool EmDQM::useHumanReadableHistTitles_
private

Definition at line 115 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

unsigned int EmDQM::verbosity_
private