CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | 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 &)
 
void beginJob ()
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 EmDQM (const edm::ParameterSet &pset)
 Constructor. More...
 
void endJob ()
 
void endRun (edm::Run const &, edm::EventSetup const &)
 
 ~EmDQM ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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_
 
std::vector< MonitorElement * > etagens
 
std::vector< std::vector
< MonitorElement * > > 
etahistmatchs
 
std::vector< std::vector
< MonitorElement * > > 
etahists
 
double etaMax_
 
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 * > > 
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::TriggerResults
hltResults_token
 
bool isData_
 
std::vector< std::vector
< edm::InputTag > > 
isoNames
 
bool mcMatchedOnly_
 
unsigned int minEtForEtaEffPlot_
 
unsigned int nbins_
 
std::vector< unsigned int > nCandCuts
 
bool noIsolationPlots_
 
bool noPhiPlots_
 
unsigned int numOfHLTCollectionLabels
 
std::vector< edm::ParameterSetparamSets
 
unsigned int pathIndex
 
int pdgGen
 
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::TriggerEventWithRefs
triggerObject_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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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_, 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, HLT_25ns14e33_v1_cff::InputTag, isData_, mcMatchedOnly_, minEtForEtaEffPlot_, nbins_, noIsolationPlots_, noPhiPlots_, paramSets, 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  minEtForEtaEffPlot_ = pset.getUntrackedParameter<unsigned int>("minEtForEtaEffPlot", 15);
29  useHumanReadableHistTitles_ = pset.getUntrackedParameter<bool>("useHumanReadableHistTitles", false);
30  mcMatchedOnly_ = pset.getUntrackedParameter<bool>("mcMatchedOnly", true);
31  noPhiPlots_ = pset.getUntrackedParameter<bool>("noPhiPlots", true);
32  noIsolationPlots_ = pset.getUntrackedParameter<bool>("noIsolationPlots", true);
33 
34  if (!autoConfMode_) {
35  paramSets.push_back(pset);
36  isData_ = false;
37  } else {
38  isData_ = pset.getParameter<bool>("isData");
39  }
40 
46 
47  // consumes
48  genParticles_token = consumes<edm::View<reco::Candidate> >(edm::InputTag("genParticles"));
49  triggerObject_token = consumes<trigger::TriggerEventWithRefs>(triggerObject_);
50  hltResults_token = consumes<edm::TriggerResults>(edm::InputTag("TriggerResults", "", triggerObject_.process()));
51  if (autoConfMode_) {
52  gencutColl_fidWenu_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialWenu"));
53  gencutColl_fidZee_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialZee"));
54  gencutColl_fidTripleEle_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialTripleEle"));
55  gencutColl_fidGammaJet_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialGammaJet"));
56  gencutColl_fidDiGamma_token = mayConsume<edm::View<reco::Candidate> >(edm::InputTag("fiducialDiGamma"));
57  } else {
58  gencutColl_manualConf_token = consumes<edm::View<reco::Candidate> >(pset.getParameter<edm::InputTag>("cutcollection"));
59  }
60 }
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:222
edm::EDGetTokenT< edm::View< reco::Candidate > > genParticles_token
Definition: EmDQM.h:218
bool noPhiPlots_
Definition: EmDQM.h:114
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:221
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:115
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
Definition: EmDQM.h:224
const edm::ParameterSet & pset
Definition: EmDQM.h:99
unsigned int nbins_
Definition: EmDQM.h:110
bool isData_
Definition: EmDQM.h:105
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
Definition: EmDQM.h:225
double ptMin_
Definition: EmDQM.h:107
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:153
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
Definition: EmDQM.h:223
double genEtAcc_
Definition: EmDQM.h:104
bool autoConfMode_
Definition: EmDQM.h:97
std::string const & process() const
Definition: InputTag.h:46
bool useHumanReadableHistTitles_
Definition: EmDQM.h:112
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObject_token
Definition: EmDQM.h:219
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQM.h:91
bool mcMatchedOnly_
Definition: EmDQM.h:113
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
Definition: EmDQM.h:226
unsigned int verbosity_
Definition: EmDQM.h:102
double genEtaAcc_
Definition: EmDQM.h:103
unsigned int minEtForEtaEffPlot_
Definition: EmDQM.h:111
edm::EDGetTokenT< edm::TriggerResults > hltResults_token
Definition: EmDQM.h:220
double etaMax_
Definition: EmDQM.h:108
EmDQM::~EmDQM ( )

Destructor.

Definition at line 583 of file EmDQM.cc.

583  {
584 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 705 of file EmDQM.cc.

References autoConfMode_, checkGeneratedParticlesRequirement(), checkRecoParticlesRequirement(), eta(), etagens, 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_, JetPDSkim_cfg::hltResults, hltResults_token, i, 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(), python.multivaluedict::sort(), theHLTCollectionLabels, theHLTOutputTypes, totalmatchs, totals, trigger::TriggerCluster, trigger::TriggerElectron, trigger::TriggerL1IsoEG, trigger::TriggerL1NoIsoEG, triggerObject_, triggerObject_token, trigger::TriggerPhoton, and verbosity_.

706 {
707  // loop over all the trigger path parameter sets
708  unsigned int vPos = 0;
709 
710  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end(); ++psetIt, ++vPos) {
711  SetVarsFromPSet(psetIt);
712  // get the set forthe current path
715 
717  // Check if there's enough gen particles //
718  // of interest //
720  // get the right data according to the trigger path currently looked at
722  if (autoConfMode_) {
723  switch(reqNum) {
724  case 1:
725  if (pdgGen == 11) event.getByToken(gencutColl_fidWenu_token, cutCounter);
726  else event.getByToken(gencutColl_fidGammaJet_token, cutCounter);
727  break;
728  case 2:
729  if (pdgGen == 11) event.getByToken(gencutColl_fidZee_token, cutCounter);
730  else event.getByToken(gencutColl_fidDiGamma_token, cutCounter);
731  break;
732  case 3:
733  event.getByToken(gencutColl_fidTripleEle_token, cutCounter);
734  break;
735  }
736  } else {
737  event.getByToken(gencutColl_manualConf_token, cutCounter);
738  }
739 
740  if (cutCounter->size() < (unsigned int)gencut_) {
741  //edm::LogWarning("EmDQM") << "Less than "<< gencut_ <<" gen particles with pdgId=" << pdgGen;
742  continue;
743  }
744 
745 
746  // fill L1 and HLT info
747  // get objects possed by each filter
749  event.getByToken(triggerObject_token,triggerObj);
750  if(!triggerObj.isValid()) {
752  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)";
753  continue;
754  }
755 
756  // Were enough high energy gen particles found?
757  if (event.isRealData()) {
758  // running validation on data.
759  // TODO: we should check that the entire
760  // run is on the same type (all data or
761  // all MC). Otherwise one gets
762  // uninterpretable results...
763  if (!checkRecoParticlesRequirement(event))
764  continue;
765  }
766  else { // MC
767  // if no, throw event away
769  continue;
770  }
771  // It was an event worth keeping. Continue.
772 
774  // Fill the bin labeled "Total" //
775  // This will be the number of events looked at. //
777  if (!mcMatchedOnly_) totals.at(vPos)->Fill(numOfHLTCollectionLabels+0.5);
778  totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels+0.5);
779 
781  // Fill generator info //
783  // the gencut_ highest Et generator objects of the preselected type are our matches
784  std::vector<reco::Particle> sortedGen;
785  for(edm::View<reco::Candidate>::const_iterator genpart = cutCounter->begin(); genpart != cutCounter->end();genpart++){
786  reco::Particle tmpcand( genpart->charge(), genpart->p4(), genpart->vertex(),genpart->pdgId(),genpart->status() );
787  if (tmpcand.et() >= plotEtMin) {
788  sortedGen.push_back(tmpcand);
789  }
790  }
791  std::sort(sortedGen.begin(),sortedGen.end(),pTComparator_ );
792  // Now the collection of gen particles is sorted by pt.
793  // So, remove all particles from the collection so that we
794  // only have the top "1 thru gencut_" particles in it
795  if (sortedGen.size() < gencut_){
796  continue;
797  }
798  sortedGen.erase(sortedGen.begin()+gencut_,sortedGen.end());
799 
800  for (unsigned int i = 0 ; i < gencut_ ; i++ ) {
801  etgens.at(vPos)->Fill( sortedGen[i].et() ); //validity has been implicitily checked by the cut on gencut_ above
802  if (sortedGen[i].et() > minEtForEtaEffPlot_) {
803  etagens.at(vPos)->Fill( sortedGen[i].eta() );
804  if (!noPhiPlots_) phigens.at(vPos)->Fill( sortedGen[i].phi() );
805  }
806  } // END of loop over Generated particles
807  if (gencut_ >= reqNum && !mcMatchedOnly_) totals.at(vPos)->Fill(numOfHLTCollectionLabels+1.5); // this isn't really needed anymore keep for backward comp.
808  if (gencut_ >= reqNum) totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels+1.5); // this isn't really needed anymore keep for backward comp.
809 
810  bool accepted = true; // flags that the event has been accepted by all filters before
812  event.getByToken(hltResults_token, hltResults);
814  // Loop over filter modules //
816  for(unsigned int n=0; n < numOfHLTCollectionLabels ; n++) {
817  // check that there are not less sortedGen particles than nCandCut requires for this filter
818  if (sortedGen.size() < nCandCuts.at(n)) {
819  if (verbosity_ >= OUTPUT_ERRORS)
820  edm::LogError("EmDQM") << "There are less generated particles than the module '" << theHLTCollectionLabels[n].label() << "' requires.";
821  continue;
822  }
823  std::vector<reco::Particle> sortedGenForFilter(sortedGen);
824  sortedGenForFilter.erase(sortedGenForFilter.begin() + nCandCuts.at(n), sortedGenForFilter.end());
825 
826  // Fill only if this filter was run.
827  if (pathIndex != 0 && hltConfig_.moduleIndex(pathIndex, theHLTCollectionLabels[n].label()) > hltResults->index(pathIndex)) break;
828  // These numbers are from the Parameter Set, such as:
829  // theHLTOutputTypes = cms.uint32(100)
830  switch(theHLTOutputTypes[n])
831  {
832  case trigger::TriggerL1NoIsoEG: // Non-isolated Level 1
833  histoFillerL1NonIso->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
834  break;
835  case trigger::TriggerL1IsoEG: // Isolated Level 1
836  histoFillerL1Iso->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
837  break;
838  case trigger::TriggerPhoton: // Photon
839  histoFillerPho->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
840  break;
841  case trigger::TriggerElectron: // Electron
842  histoFillerEle->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
843  break;
844  case trigger::TriggerCluster: // TriggerCluster
845  histoFillerClu->fillHistos(triggerObj,event,vPos,n,sortedGenForFilter,accepted);
846  break;
847  default:
848  throw(cms::Exception("Release Validation Error") << "HLT output type not implemented: theHLTOutputTypes[n]" );
849  }
850  } // END of loop over filter modules
851 
852  // earse the dummy and fill with real set
855  }
856 }
std::vector< MonitorElement * > totals
Definition: EmDQM.h:207
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidZee_token
Definition: EmDQM.h:222
void fillHistos(edm::Handle< trigger::TriggerEventWithRefs > &, const edm::Event &, unsigned int, unsigned int, std::vector< reco::Particle > &, bool &)
Definition: EmDQM.cc:862
bool checkRecoParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:644
unsigned int numOfHLTCollectionLabels
Definition: EmDQM.h:157
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
Definition: EmDQM.h:189
bool noPhiPlots_
Definition: EmDQM.h:114
int pdgGen
Definition: EmDQM.h:167
std::set< std::string > hltCollectionLabelsFound
Definition: EmDQM.h:186
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
Definition: EmDQM.h:185
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:132
T eta() const
HistoFiller< reco::ElectronCollection > * histoFillerEle
Definition: EmDQM.h:90
double plotEtMin
Definition: EmDQM.h:169
bool isRealData() const
Definition: EventBase.h:64
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:239
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidWenu_token
Definition: EmDQM.h:221
std::vector< MonitorElement * > etagens
Definition: EmDQM.h:211
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQM.h:156
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:182
std::vector< unsigned int > nCandCuts
Definition: EmDQM.h:164
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerPho
Definition: EmDQM.h:93
edm::InputTag triggerObject_
Definition: EmDQM.h:101
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:240
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
Definition: EmDQM.h:224
std::set< std::string > hltCollectionLabelsMissed
Definition: EmDQM.h:190
void SetVarsFromPSet(std::vector< edm::ParameterSet >::iterator)
Definition: EmDQM.cc:1542
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
Definition: EmDQM.h:225
bool checkGeneratedParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:587
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:153
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
Definition: EmDQM.h:223
bool autoConfMode_
Definition: EmDQM.h:97
unsigned int pathIndex
Definition: EmDQM.h:155
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObject_token
Definition: EmDQM.h:219
std::vector< MonitorElement * > totalmatchs
Definition: EmDQM.h:208
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQM.h:91
bool mcMatchedOnly_
Definition: EmDQM.h:113
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
Definition: EmDQM.h:226
GreaterByPt< reco::Particle > pTComparator_
Definition: EmDQM.h:214
std::vector< MonitorElement * > phigens
Definition: EmDQM.h:212
unsigned int verbosity_
Definition: EmDQM.h:102
std::vector< int > theHLTOutputTypes
Definition: EmDQM.h:160
unsigned int reqNum
Definition: EmDQM.h:166
unsigned int minEtForEtaEffPlot_
Definition: EmDQM.h:111
edm::EDGetTokenT< edm::TriggerResults > hltResults_token
Definition: EmDQM.h:220
std::vector< MonitorElement * > etgens
Definition: EmDQM.h:210
Definition: DDAxes.h:10
void EmDQM::beginJob ( void  )

Definition at line 66 of file EmDQM.cc.

67 {
68 
69 }
void EmDQM::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 391 of file EmDQM.cc.

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

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

References funct::abs(), reco::LeafCandidate::et(), eta(), gencut_, genEtaAcc_, genParticleCandidates2GenParticles_cfi::genParticles, genParticles_token, i, edm::HandleBase::isValid(), OUTPUT_WARNINGS, pdgGen, plotEtMin, pTGenComparator_, python.multivaluedict::sort(), and verbosity_.

Referenced by analyze().

588 {
589 
591  // Decide if this was an event of interest. //
592  // Did the highest energy particles happen //
593  // to have |eta| < 2.5 ? Then continue. //
596  event.getByToken(genParticles_token, genParticles);
597  if(!genParticles.isValid()) {
599  edm::LogWarning("EmDQM") << "genParticles invalid.";
600  return false;
601  }
602 
603  std::vector<reco::LeafCandidate> allSortedGenParticles;
604 
605  for(edm::View<reco::Candidate>::const_iterator currentGenParticle = genParticles->begin(); currentGenParticle != genParticles->end(); currentGenParticle++){
606 
607  // TODO: do we need to check the states here again ?
608  // in principle, there should collections produced with the python configuration
609  // (other than 'genParticles') which fulfill these criteria
610  if ( !( abs((*currentGenParticle).pdgId())==pdgGen && (*currentGenParticle).status()==1 && (*currentGenParticle).et() > 2.0) ) continue;
611 
612  reco::LeafCandidate tmpcand( *(currentGenParticle) );
613 
614  if (tmpcand.et() < plotEtMin) continue;
615 
616  allSortedGenParticles.push_back(tmpcand);
617  }
618 
619  std::sort(allSortedGenParticles.begin(), allSortedGenParticles.end(),pTGenComparator_);
620 
621  // return false if not enough particles found
622  if (allSortedGenParticles.size() < gencut_)
623  return false;
624  // additional check (this might be legacy code and we need to check
625  // whether this should not be removed ?)
626 
627  // We now have a sorted collection of all generated particles
628  // with pdgId = pdgGen.
629  // Loop over them to see if the top gen particles have eta within acceptance
630  // bool keepEvent = true;
631  for (unsigned int i = 0 ; i < gencut_ ; i++ ) {
632  bool inECALgap = fabs(allSortedGenParticles[i].eta()) > 1.4442 && fabs(allSortedGenParticles[i].eta()) < 1.556;
633  if ( (fabs(allSortedGenParticles[i].eta()) > genEtaAcc_) || inECALgap ) {
634  //edm::LogWarning("EmDQM") << "Throwing event away. Gen particle with pdgId="<< allSortedGenParticles[i].pdgId() <<"; et="<< allSortedGenParticles[i].et() <<"; and eta="<< allSortedGenParticles[i].eta() <<" beyond acceptance.";
635  return false;
636  }
637  }
638 
639  // all tests passed
640  return true;
641 }
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< edm::View< reco::Candidate > > genParticles_token
Definition: EmDQM.h:218
int pdgGen
Definition: EmDQM.h:167
T eta() const
double plotEtMin
Definition: EmDQM.h:169
GreaterByPt< reco::GenParticle > pTGenComparator_
Definition: EmDQM.h:215
unsigned int gencut_
Definition: EmDQM.h:182
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:240
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:75
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
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 644 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().

645 {
646  // note that this code is very similar to the one in checkGeneratedParticlesRequirement(..)
647  // and hopefully can be merged with it at some point in the future
648 
649  edm::Handle< edm::View<reco::Candidate> > referenceParticles;
650  // get the right data according to the trigger path currently looked at
651  if (autoConfMode_) {
652  switch(reqNum) {
653  case 1:
654  if (pdgGen == 11) event.getByToken(gencutColl_fidWenu_token, referenceParticles);
655  else event.getByToken(gencutColl_fidGammaJet_token, referenceParticles);
656  break;
657  case 2:
658  if (pdgGen == 11) event.getByToken(gencutColl_fidZee_token, referenceParticles);
659  else event.getByToken(gencutColl_fidDiGamma_token, referenceParticles);
660  break;
661  case 3:
662  event.getByToken(gencutColl_fidTripleEle_token, referenceParticles);
663  break;
664  }
665  } else {
666  event.getByToken(gencutColl_manualConf_token, referenceParticles);
667  }
668  if(!referenceParticles.isValid()) {
670  edm::LogWarning("EmDQM") << "referenceParticles invalid.";
671  return false;
672  }
673 
674  std::vector<const reco::Candidate *> allSortedReferenceParticles;
675 
676  for(edm::View<reco::Candidate>::const_iterator currentReferenceParticle = referenceParticles->begin();
677  currentReferenceParticle != referenceParticles->end();
678  currentReferenceParticle++)
679  {
680  if ( currentReferenceParticle->et() <= 2.0)
681  continue;
682 
683  // Note that for determining the overall efficiency,
684  // we should only allow
685  //
686  // HOWEVER: for turn-on curves, we need to let
687  // more electrons pass
688  if (currentReferenceParticle->et() < plotEtMin)
689  continue;
690 
691  // TODO: instead of filling a new vector we could simply count here...
692  allSortedReferenceParticles.push_back(&(*currentReferenceParticle));
693  }
694 
695  // std::sort(allSortedReferenceParticles.begin(), allSortedReferenceParticles.end(),pTComparator_);
696 
697  // return false if not enough particles found
698  return allSortedReferenceParticles.size() >= gencut_;
699 }
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidZee_token
Definition: EmDQM.h:222
int pdgGen
Definition: EmDQM.h:167
double plotEtMin
Definition: EmDQM.h:169
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidWenu_token
Definition: EmDQM.h:221
unsigned int gencut_
Definition: EmDQM.h:182
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:240
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
Definition: EmDQM.h:224
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
Definition: EmDQM.h:225
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
Definition: EmDQM.h:223
bool autoConfMode_
Definition: EmDQM.h:97
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
Definition: EmDQM.h:226
unsigned int verbosity_
Definition: EmDQM.h:102
unsigned int reqNum
Definition: EmDQM.h:166
int EmDQM::countSubstring ( const std::string &  str,
const std::string &  sub 
)
private

Definition at line 1065 of file EmDQM.cc.

References prof2calltree::count, and hltrates_dqm_sourceclient-live_cfg::offset.

Referenced by findEgammaPaths(), and makePSetForL1SeedFilter().

1066 {
1067  if (sub.length() == 0) return 0;
1068  int count = 0;
1069  for (size_t offset = str.find(sub); offset != std::string::npos;
1070  offset = str.find(sub, offset + sub.length()))
1071  {
1072  ++count;
1073  }
1074  return count;
1075 }
void EmDQM::dqmBeginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
virtual

Reimplemented from DQMEDAnalyzer.

Definition at line 72 of file EmDQM.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::addUntrackedParameter(), autoConfMode_, HLTConfigProvider::changed(), edm::ParameterSet::empty(), edm::ParameterSet::exists(), alcazmumu_cfi::filter, findEgammaPaths(), getFilterModules(), edm::ParameterSet::getParameter(), getPrimaryEtCut(), hltCollectionLabelsFound, hltCollectionLabelsFoundPerPath, hltCollectionLabelsMissed, hltCollectionLabelsMissedPerPath, hltConfig_, i, HLTConfigProvider::init(), HLTConfigProvider::inited(), HLT_25ns14e33_v1_cff::InputTag, isData_, j, diffTwoXMLs::label, makePSetForEgammaDoubleEtDeltaPhiFilter(), makePSetForEgammaGenericFilter(), makePSetForEgammaGenericQuadraticFilter(), makePSetForElectronGenericFilter(), makePSetForEtFilter(), makePSetForL1SeedFilter(), makePSetForL1SeedToSuperClusterMatchFilter(), makePSetForOneOEMinusOneOPFilter(), makePSetForPixelMatchFilter(), HLTConfigProvider::modulePSet(), OUTPUT_ALL, OUTPUT_ERRORS, OUTPUT_WARNINGS, paramSets, EgammaValidation_cff::pathName, edm::InputTag::process(), HLTConfigProvider::processName(), ptMax_, PtMinSelector_cfg::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_.

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

Definition at line 1058 of file EmDQM.cc.

1059 {
1060 
1061 }
void EmDQM::endRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
virtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 1015 of file EmDQM.cc.

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

1016 {
1017  // loop over all the trigger path parameter sets
1018  unsigned int vPos = 0;
1019  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end(); ++psetIt, ++vPos) {
1020  SetVarsFromPSet(psetIt);
1021 
1022  // print information about hltCollectionLabels which were not found
1023  // (but only those which were never found)
1024 
1025  // check which ones were never found
1026  std::vector<std::string> labelsNeverFound;
1027 
1028  BOOST_FOREACH(const edm::InputTag &tag, hltCollectionLabelsMissedPerPath.at(vPos))
1029  {
1030  if ((hltCollectionLabelsFoundPerPath.at(vPos)).count(tag.encode()) == 0)
1031  // never found
1032  labelsNeverFound.push_back(tag.encode());
1033 
1034  } // loop over all tags which were missed at least once
1035 
1036  if (labelsNeverFound.empty())
1037  continue;
1038 
1039  std::sort(labelsNeverFound.begin(), labelsNeverFound.end());
1040 
1041  // there was at least one label which was never found
1042  // (note that this could also be because the corresponding
1043  // trigger path slowly fades out to zero efficiency)
1044  if (verbosity_ >= OUTPUT_WARNINGS)
1045  edm::LogWarning("EmDQM") << "There were some HLTCollectionLabels which were never found:";
1046 
1047  BOOST_FOREACH(const edm::InputTag &tag, labelsNeverFound)
1048  {
1049  if (verbosity_ >= OUTPUT_ALL)
1050  edm::LogPrint("EmDQM") << " " << tag;
1051  }
1052  }
1053 }
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
Definition: EmDQM.h:189
static const unsigned OUTPUT_ALL
Definition: EmDQM.h:241
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
Definition: EmDQM.h:185
std::string encode() const
Definition: InputTag.cc:164
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:240
void SetVarsFromPSet(std::vector< edm::ParameterSet >::iterator)
Definition: EmDQM.cc:1542
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:153
unsigned int verbosity_
Definition: EmDQM.h:102
std::vector< std::vector< std::string > > EmDQM::findEgammaPaths ( )
private

Definition at line 1080 of file EmDQM.cc.

References countSubstring(), hltConfig_, i, cmsHarvester::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().

1081 {
1082  std::vector<std::vector<std::string> > Paths(5);
1083  // Loop over all paths in the menu
1084  for (unsigned int i=0; i<hltConfig_.size(); i++) {
1085 
1087 
1088  // Find electron and photon paths and classify them
1089  if (int(path.find("HLT_")) == 0) { // Path should start with 'HLT_'
1090 
1091  int scCount = countSubstring(path, "_SC");
1092  int eleCount = countSubstring(path, "Ele");
1093  int doubleEleCount = countSubstring(path, "DoubleEle");
1094  int doubleSCCount = countSubstring(path, "DiSC");
1095  int tripleEleCount = countSubstring(path, "TripleEle");
1096  int photonCount = countSubstring(path, "Photon");
1097  int doublePhotonCount = countSubstring(path, "DoublePhoton");
1098 
1099  int totEleCount = 2*tripleEleCount + doubleEleCount + eleCount + scCount + 2*doubleSCCount;
1100  int totPhotonCount = doublePhotonCount + photonCount;
1101 
1102  if (totEleCount + totPhotonCount < 1) continue;
1103  switch (totEleCount) {
1104  case 1:
1105  Paths[TYPE_SINGLE_ELE].push_back(path);
1106  //std::cout << "Electron \t" << path << std::endl;
1107  break;
1108  case 2:
1109  Paths[TYPE_DOUBLE_ELE].push_back(path);
1110  //std::cout << "DoubleElectron \t" << path << std::endl;
1111  break;
1112  case 3:
1113  Paths[TYPE_TRIPLE_ELE].push_back(path);
1114  //std::cout << "TripleElectron \t" << path << std::endl;
1115  break;
1116  }
1117 
1118  switch (totPhotonCount) {
1119  case 1:
1120  Paths[TYPE_SINGLE_PHOTON].push_back(path);
1121  //std::cout << "Photon \t\t" << path << std::endl;
1122  break;
1123  case 2:
1124  Paths[TYPE_DOUBLE_PHOTON].push_back(path);
1125  //std::cout << "DoublePhoton \t" << path << std::endl;
1126  break;
1127  }
1128  }
1129  //std::cout << i << " triggerName: " << path << " containing " << hltConfig_.size(i) << " modules."<< std::endl;
1130  }
1131  return Paths;
1132 }
unsigned int size() const
number of trigger paths in trigger table
int i
Definition: DBlmapReader.cc:9
const std::string & triggerName(unsigned int triggerIndex) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:132
static const unsigned TYPE_DOUBLE_PHOTON
Definition: EmDQM.h:234
tuple path
else: Piece not in the list, fine.
static const unsigned TYPE_SINGLE_PHOTON
Definition: EmDQM.h:233
int countSubstring(const std::string &, const std::string &)
Definition: EmDQM.cc:1065
static const unsigned TYPE_SINGLE_ELE
Definition: EmDQM.h:231
static const unsigned TYPE_DOUBLE_ELE
Definition: EmDQM.h:232
static const unsigned TYPE_TRIPLE_ELE
Definition: EmDQM.h:235
std::vector< std::string > EmDQM::getFilterModules ( const std::string &  path)
private

Definition at line 1137 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1138 {
1139  std::vector<std::string> filters;
1140 
1141  //std::cout << "Pathname: " << path << std::endl;
1142 
1143  // Loop over all modules in the path
1144  for (unsigned int i=0; i<hltConfig_.size(path); i++) {
1145 
1147  std::string moduleType = hltConfig_.moduleType(module);
1148  std::string moduleEDMType = hltConfig_.moduleEDMType(module);
1149 
1150  // Find filters
1151  if (moduleEDMType == "EDFilter" || moduleType.find("Filter") != std::string::npos) { // older samples may not have EDMType data included
1152  filters.push_back(module);
1153  //std::cout << i << " moduleLabel: " << module << " moduleType: " << moduleType << " moduleEDMType: " << moduleEDMType << std::endl;
1154  }
1155  }
1156  return filters;
1157 }
unsigned int size() const
number of trigger paths in trigger table
int i
Definition: DBlmapReader.cc:9
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:132
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
std::vector< TPRegexp > filters
Definition: eve_filter.cc:25
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
tuple path
else: Piece not in the list, fine.
Definition: vlib.h:208
double EmDQM::getPrimaryEtCut ( const std::string &  path)
private

Definition at line 1162 of file EmDQM.cc.

Referenced by dqmBeginRun().

1163 {
1164  double minEt = -1;
1165 
1166  boost::regex reg("^HLT_.*?(Ele|Photon|EG|SC)([[:digit:]]+).*");
1167 
1168  boost::smatch what;
1169  if (boost::regex_match(path, what, reg, boost::match_extra))
1170  {
1171  minEt = boost::lexical_cast<double>(what[2]);
1172  }
1173 
1174  return minEt;
1175 }
tuple path
else: Piece not in the list, fine.
edm::ParameterSet EmDQM::makePSetForEgammaDoubleEtDeltaPhiFilter ( const std::string &  moduleName)
private

Definition at line 1304 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1305 {
1306  edm::ParameterSet retPSet;
1307 
1308  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1309  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1310  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1311  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1312  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1313  retPSet.addParameter<int>("ncandcut", 2);
1314 
1315  return retPSet;
1316 }
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:143
std::string const & process() const
Definition: InputTag.h:46
edm::ParameterSet EmDQM::makePSetForEgammaGenericFilter ( const std::string &  moduleName)
private

Definition at line 1321 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1322 {
1323  edm::ParameterSet retPSet;
1324 
1325  // example usages of HLTEgammaGenericFilter are:
1326  // R9 shape filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolR9ShapeFilter
1327  // cluster shape filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolClusterShapeFilter
1328  // Ecal isolation filter hltL1NonIsoHLTNonIsoSingleElectronEt17TIghterEleIdIsolEcalIsolFilter
1329  // H/E filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHEFilter
1330  // HCAL isolation filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHcalIsolFilter
1331 
1332  // infer the type of filter by the type of the producer which
1333  // generates the collection used to cut on this
1336  //std::cout << "isoTag.label " << isoTag.label() << " nonIsoTag.label " << nonIsoTag.label() << std::endl;
1337 
1338  std::string inputType = hltConfig_.moduleType(isoTag.label());
1339  //std::cout << "inputType " << inputType << " moduleName " << moduleName << std::endl;
1340 
1341  //--------------------
1342  // sanity check: non-isolated path should be produced by the
1343  // same type of module
1344 
1345  // first check that the non-iso tag is non-empty
1346  //if (nonIsoTag.label().empty()) {
1347  // edm::LogError("EmDQM") << "nonIsoTag of HLTEgammaGenericFilter '" << moduleName << "' is empty.";
1348  // return retPSet;
1349  //}
1350  //if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1351  // edm::LogError("EmDQM") << "C++ Type of isoTag '" << inputType << "' and nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the same for HLTEgammaGenericFilter '" << moduleName << "'.";
1352  // return retPSet;
1353  //}
1354  //--------------------
1355 
1356  // parameter saveTag determines the output type
1358  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
1359  else
1360  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1361 
1362  std::vector<edm::InputTag> isoCollections;
1363  isoCollections.push_back(isoTag);
1364  if (!nonIsoTag.label().empty())
1365  isoCollections.push_back(nonIsoTag);
1366 
1367  //--------------------
1368  // the following cases seem to have identical PSets ?
1369  //--------------------
1370 
1371  if (inputType == "EgammaHLTR9Producer" || // R9 shape
1372  inputType == "EgammaHLTR9IDProducer" || // R9 ID
1373  inputType == "EgammaHLTClusterShapeProducer" || // cluster shape
1374  inputType == "EgammaHLTEcalRecIsolationProducer" || // ecal isolation
1375  inputType == "EgammaHLTHcalIsolationProducersRegional" || // HCAL isolation and HE
1376  inputType == "EgammaHLTGsfTrackVarProducer" || // GSF track deta and dphi filter
1377  inputType == "EgammaHLTBcHcalIsolationProducersRegional" || // HCAL isolation and HE
1378  inputType == "EgammaHLTEcalPFClusterIsolationProducer" || // ECAL PF isolation filter
1379  inputType == "EgammaHLTHcalPFClusterIsolationProducer" || // HCAL PF isolation filter
1380  inputType == "EgammaHLTElectronTrackIsolationProducers" // Track isolation filter
1381  ) {
1382  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1383  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1384  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1385  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", isoCollections);
1386  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1387 
1388  return retPSet;
1389  }
1390 
1391  if (verbosity_ >= OUTPUT_ERRORS)
1392  edm::LogError("EmDQM") << "Can't determine what the HLTEgammaGenericFilter '" << moduleName << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1393  return edm::ParameterSet();
1394 }
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:132
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:239
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:143
std::string const & label() const
Definition: InputTag.h:42
std::string const & process() const
Definition: InputTag.h:46
unsigned int verbosity_
Definition: EmDQM.h:102
edm::ParameterSet EmDQM::makePSetForEgammaGenericQuadraticFilter ( const std::string &  moduleName)
private

Definition at line 1399 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1400 {
1401  edm::ParameterSet retPSet;
1402 
1403  // example usages of HLTEgammaGenericFilter are:
1404  // R9 shape filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolR9ShapeFilter
1405  // cluster shape filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolClusterShapeFilter
1406  // Ecal isolation filter hltL1NonIsoHLTNonIsoSingleElectronEt17TIghterEleIdIsolEcalIsolFilter
1407  // H/E filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHEFilter
1408  // HCAL isolation filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHcalIsolFilter
1409 
1410  // infer the type of filter by the type of the producer which
1411  // generates the collection used to cut on this
1414  //std::cout << "isoTag.label " << isoTag.label() << " nonIsoTag.label " << nonIsoTag.label() << std::endl;
1415 
1416  std::string inputType = hltConfig_.moduleType(isoTag.label());
1417  //std::cout << "inputType " << inputType << " moduleName " << moduleName << std::endl;
1418 
1419  //--------------------
1420  // sanity check: non-isolated path should be produced by the
1421  // same type of module
1422 
1423  // first check that the non-iso tag is non-empty
1424  //if (nonIsoTag.label().empty()) {
1425  // edm::LogError("EmDQM") << "nonIsoTag of HLTEgammaGenericFilter '" << moduleName << "' is empty.";
1426  // return retPSet;
1427  //}
1428  //if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1429  // edm::LogError("EmDQM") << "C++ Type of isoTag '" << inputType << "' and nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the same for HLTEgammaGenericFilter '" << moduleName << "'.";
1430  // return retPSet;
1431  //}
1432  //--------------------
1433 
1434  // parameter saveTag determines the output type
1436  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
1437  else
1438  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1439 
1440  std::vector<edm::InputTag> isoCollections;
1441  isoCollections.push_back(isoTag);
1442  if (!nonIsoTag.label().empty())
1443  isoCollections.push_back(nonIsoTag);
1444 
1445  //--------------------
1446  // the following cases seem to have identical PSets ?
1447  //--------------------
1448 
1449  if (inputType == "EgammaHLTR9Producer" || // R9 shape
1450  inputType == "EgammaHLTR9IDProducer" || // R9 ID
1451  inputType == "EgammaHLTClusterShapeProducer" || // cluster shape
1452  inputType == "EgammaHLTEcalRecIsolationProducer" || // ecal isolation
1453  inputType == "EgammaHLTHcalIsolationProducersRegional" || // HCAL isolation and HE
1454  inputType == "EgammaHLTBcHcalIsolationProducersRegional" || // HCAL isolation and HE
1455  inputType == "EgammaHLTEcalPFClusterIsolationProducer" || // ECAL PF isolation filter
1456  inputType == "EgammaHLTHcalPFClusterIsolationProducer" || // HCAL PF isolation filter
1457  inputType == "EgammaHLTPhotonTrackIsolationProducersRegional" // Photon track isolation
1458  ) {
1459  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1460  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1461  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1462  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", isoCollections);
1463  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1464 
1465  return retPSet;
1466  }
1467 
1468  if (verbosity_ >= OUTPUT_ERRORS)
1469  edm::LogError("EmDQM") << "Can't determine what the HLTEgammaGenericQuadraticFilter '" << moduleName << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1470  return edm::ParameterSet();
1471 }
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:132
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:239
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:143
std::string const & label() const
Definition: InputTag.h:42
std::string const & process() const
Definition: InputTag.h:46
unsigned int verbosity_
Definition: EmDQM.h:102
edm::ParameterSet EmDQM::makePSetForElectronGenericFilter ( const std::string &  moduleName)
private

Definition at line 1476 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1477 {
1478  edm::ParameterSet retPSet;
1479 
1480  // example usages of HLTElectronGenericFilter are:
1481  //
1482  // deta filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolDetaFilter
1483  // dphi filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolDphiFilter
1484  // track isolation hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolTrackIsolFilter
1485 
1486  // infer the type of filter by the type of the producer which
1487  // generates the collection used to cut on this
1490  //std::cout << "isoTag.label " << isoTag.label() << " nonIsoTag.label " << nonIsoTag.label() << std::endl;
1491 
1492  std::string inputType = hltConfig_.moduleType(isoTag.label());
1493  //std::cout << "inputType iso " << inputType << " inputType noniso " << hltConfig_.moduleType(nonIsoTag.label()) << " moduleName " << moduleName << std::endl;
1494 
1495  //--------------------
1496  // sanity check: non-isolated path should be produced by the
1497  // same type of module
1498  //if (nonIsoTag.label().empty()) {
1499  // edm::LogError("EmDQM") << "nonIsoTag of HLTElectronGenericFilter '" << moduleName << "' is empty.";
1500  // return retPSet;
1501  //}
1502  //if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1503  // edm::LogError("EmDQM") << "C++ Type of isoTag '" << inputType << "' and nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the same for HLTElectronGenericFilter '" << moduleName << "'.";
1504  // return retPSet;
1505  //}
1506  //--------------------
1507 
1508  // the type of object to look for seems to be the
1509  // same for all uses of HLTEgammaGenericFilter
1510  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
1511 
1512  std::vector<edm::InputTag> isoCollections;
1513  isoCollections.push_back(isoTag);
1514  if (!nonIsoTag.label().empty())
1515  isoCollections.push_back(nonIsoTag);
1516 
1517  //--------------------
1518  // the following cases seem to have identical PSets ?
1519  //--------------------
1520 
1521  // note that whether deta or dphi is used is determined from
1522  // the product instance (not the module label)
1523  if (inputType == "EgammaHLTElectronDetaDphiProducer" || // deta and dphi filter
1524  inputType == "EgammaHLTElectronTrackIsolationProducers" // track isolation
1525  ) {
1526  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1527  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1528  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1529  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", isoCollections);
1530  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1531 
1532  return retPSet;
1533  }
1534 
1535  if (verbosity_ >= OUTPUT_ERRORS)
1536  edm::LogError("EmDQM") << "Can't determine what the HLTElectronGenericFilter '" << moduleName << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1537  return edm::ParameterSet();
1538 }
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:132
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:239
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:143
std::string const & label() const
Definition: InputTag.h:42
std::string const & process() const
Definition: InputTag.h:46
unsigned int verbosity_
Definition: EmDQM.h:102
edm::ParameterSet EmDQM::makePSetForEtFilter ( const std::string &  moduleName)
private

Definition at line 1253 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1254 {
1255  edm::ParameterSet retPSet;
1256 
1257  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1258  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1259  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1260  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1261  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1262  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1263 
1264  return retPSet;
1265 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:132
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:143
std::string const & process() const
Definition: InputTag.h:46
edm::ParameterSet EmDQM::makePSetForL1SeedFilter ( const std::string &  moduleName)
private

Definition at line 1180 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1181 {
1182  // generates a PSet to analyze the behaviour of an L1 seed.
1183  //
1184  // moduleName is the name of the HLT module which filters
1185  // on the L1 seed.
1186  edm::ParameterSet retPSet;
1187 
1188  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1189  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1190  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1191  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1192  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerL1NoIsoEG);
1193 
1194  // as HLTLevel1GTSeed has no parameter ncandcut we determine the value from the name of the filter
1195 
1196  int orCount = countSubstring(moduleName, "OR");
1197  int egCount = countSubstring(moduleName, "EG");
1198  int dEgCount = countSubstring(moduleName, "DoubleEG");
1199  int tEgCount = countSubstring(moduleName, "TripleEG");
1200 
1201  int candCount = 2*tEgCount + dEgCount + egCount;
1202  // if L1 is and OR of triggers try the assumption that all of them are similar first and, if not successful, let the path name decide
1203  if (orCount > 0 && candCount > 0) {
1204  if (egCount % (orCount+1) == 0 && dEgCount % (orCount+1) == 0 && tEgCount % (orCount+1) == 0) candCount /= (orCount+1);
1205  else candCount = -1;
1206  }
1207 
1208  switch (candCount) {
1209  case 0:
1210  retPSet.addParameter<int>("ncandcut", 0);
1211  break;
1212  case 1:
1213  retPSet.addParameter<int>("ncandcut", 1);
1214  break;
1215  case 2:
1216  retPSet.addParameter<int>("ncandcut", 2);
1217  break;
1218  case 3:
1219  retPSet.addParameter<int>("ncandcut", 3);
1220  break;
1221  default:
1222  retPSet.addParameter<int>("ncandcut", -1);
1223  }
1224 
1225  return retPSet;
1226 }
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:143
int countSubstring(const std::string &, const std::string &)
Definition: EmDQM.cc:1065
std::string const & process() const
Definition: InputTag.h:46
edm::ParameterSet EmDQM::makePSetForL1SeedToSuperClusterMatchFilter ( const std::string &  moduleName)
private

Definition at line 1231 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1232 {
1233  // generates a PSet to analyze the behaviour of L1 to supercluster match filter.
1234  //
1235  // moduleName is the name of the HLT module which requires the match
1236  // between supercluster and L1 seed.
1237  //
1238  edm::ParameterSet retPSet;
1239 
1240  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1241  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1242  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1243  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1244  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1245  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1246 
1247  return retPSet;
1248 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:132
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:143
std::string const & process() const
Definition: InputTag.h:46
edm::ParameterSet EmDQM::makePSetForOneOEMinusOneOPFilter ( const std::string &  moduleName)
private

Definition at line 1270 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1271 {
1272  edm::ParameterSet retPSet;
1273 
1274  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1275  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1276  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1277  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1278  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
1279  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1280 
1281  return retPSet;
1282 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:132
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:143
std::string const & process() const
Definition: InputTag.h:46
edm::ParameterSet EmDQM::makePSetForPixelMatchFilter ( const std::string &  moduleName)
private

Definition at line 1287 of file EmDQM.cc.

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

Referenced by dqmBeginRun().

1288 {
1289  edm::ParameterSet retPSet;
1290 
1291  retPSet.addParameter<std::vector<double> >("PlotBounds", std::vector<double>(2, 0.0));
1292  //retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", processName_));
1293  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1294  retPSet.addParameter<std::vector<edm::InputTag> >("IsoCollections", std::vector<edm::InputTag>(1, std::string("none")));
1295  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1296  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1297 
1298  return retPSet;
1299 }
T getParameter(std::string const &) const
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:132
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:143
std::string const & process() const
Definition: InputTag.h:46
void EmDQM::SetVarsFromPSet ( std::vector< edm::ParameterSet >::iterator  psetIt)
private

Definition at line 1542 of file EmDQM.cc.

References assert(), dirname_, filters, gencut_, gencutCollection_, 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().

1543 {
1544  dirname_="HLT/HLTEgammaValidation/"+psetIt->getParameter<std::string>("@module_label");
1545 
1546  pathIndex = psetIt->getUntrackedParameter<unsigned int>("pathIndex", 0);
1547  // parameters for generator study
1548  reqNum = psetIt->getParameter<unsigned int>("reqNum");
1549  pdgGen = psetIt->getParameter<int>("pdgGen");
1550  // plotting parameters (untracked because they don't affect the physics)
1551  plotEtMin = psetIt->getUntrackedParameter<double>("genEtMin",0.);
1552  plotPtMin = psetIt->getUntrackedParameter<double>("PtMin",0.);
1553  plotPtMax = psetIt->getUntrackedParameter<double>("PtMax",1000.);
1554 
1555  //preselction cuts
1556  gencutCollection_= psetIt->getParameter<edm::InputTag>("cutcollection");
1557  gencut_ = psetIt->getParameter<int>("cutnum");
1558 
1560  // Read in the Vector of Parameter Sets. //
1561  // Information for each filter-step //
1563  std::vector<edm::ParameterSet> filters =
1564  psetIt->getParameter<std::vector<edm::ParameterSet> >("filters");
1565 
1566  // empty vectors of parameters from previous paths
1567  theHLTCollectionLabels.clear();
1568  theHLTOutputTypes.clear();
1570  plotBounds.clear();
1571  isoNames.clear();
1572  plotiso.clear();
1573  nCandCuts.clear();
1574 
1575  int i = 0;
1576  for(std::vector<edm::ParameterSet>::iterator filterconf = filters.begin() ; filterconf != filters.end() ; filterconf++)
1577  {
1578 
1579  theHLTCollectionLabels.push_back(filterconf->getParameter<edm::InputTag>("HLTCollectionLabels"));
1580  theHLTOutputTypes.push_back(filterconf->getParameter<int>("theHLTOutputTypes"));
1581  // Grab the human-readable name, if it is not specified, use the Collection Label
1582  theHLTCollectionHumanNames.push_back(filterconf->getUntrackedParameter<std::string>("HLTCollectionHumanName",theHLTCollectionLabels[i].label()));
1583 
1584  std::vector<double> bounds = filterconf->getParameter<std::vector<double> >("PlotBounds");
1585  // If the size of plot "bounds" vector != 2, abort
1586  assert(bounds.size() == 2);
1587  plotBounds.push_back(std::pair<double,double>(bounds[0],bounds[1]));
1588  isoNames.push_back(filterconf->getParameter<std::vector<edm::InputTag> >("IsoCollections"));
1589 
1590  //for (unsigned int i=0; i<isoNames.back().size(); i++) {
1591  // switch(theHLTOutputTypes.back()) {
1592  // case trigger::TriggerL1NoIsoEG:
1593  // histoFillerL1NonIso->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<l1extra::L1EmParticleCollection , float>>>(isoNames.back()[i]));
1594  // break;
1595  // case trigger::TriggerL1IsoEG: // Isolated Level 1
1596  // histoFillerL1Iso->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<l1extra::L1EmParticleCollection , float>>>(isoNames.back()[i]));
1597  // break;
1598  // case trigger::TriggerPhoton: // Photon
1599  // histoFillerPho->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::RecoEcalCandidateCollection , float>>>(isoNames.back()[i]));
1600  // break;
1601  // case trigger::TriggerElectron: // Electron
1602  // histoFillerEle->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::ElectronCollection , float>>>(isoNames.back()[i]));
1603  // break;
1604  // case trigger::TriggerCluster: // TriggerCluster
1605  // histoFillerClu->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::RecoEcalCandidateCollection , float>>>(isoNames.back()[i]));
1606  // break;
1607  // default:
1608  // throw(cms::Exception("Release Validation Error") << "HLT output type not implemented: theHLTOutputTypes[n]" );
1609  // }
1610  //}
1611 
1612  // If the size of the isoNames vector is not greater than zero, abort
1613  assert(isoNames.back().size()>0);
1614  if (isoNames.back().at(0).label()=="none") {
1615  plotiso.push_back(false);
1616  } else {
1617  if (!noIsolationPlots_) plotiso.push_back(true);
1618  else plotiso.push_back(false);
1619  }
1620  nCandCuts.push_back(filterconf->getParameter<int>("ncandcut"));
1621  i++;
1622  } // END of loop over parameter sets
1623 
1624  // Record number of HLTCollectionLabels
1626 }
int i
Definition: DBlmapReader.cc:9
unsigned int numOfHLTCollectionLabels
Definition: EmDQM.h:157
std::string dirname_
Definition: EmDQM.h:88
int pdgGen
Definition: EmDQM.h:167
assert(m_qm.get())
double plotEtMin
Definition: EmDQM.h:169
std::vector< TPRegexp > filters
Definition: eve_filter.cc:25
std::vector< std::vector< edm::InputTag > > isoNames
Definition: EmDQM.h:162
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQM.h:156
unsigned int gencut_
Definition: EmDQM.h:182
std::vector< unsigned int > nCandCuts
Definition: EmDQM.h:164
double plotPtMax
Definition: EmDQM.h:171
bool noIsolationPlots_
Definition: EmDQM.h:115
double plotPtMin
Definition: EmDQM.h:170
edm::InputTag gencutCollection_
Definition: EmDQM.h:179
unsigned int pathIndex
Definition: EmDQM.h:155
std::vector< std::string > theHLTCollectionHumanNames
Definition: EmDQM.h:158
std::vector< int > theHLTOutputTypes
Definition: EmDQM.h:160
unsigned int reqNum
Definition: EmDQM.h:166
std::vector< std::pair< double, double > > plotBounds
Definition: EmDQM.h:163
std::vector< bool > plotiso
Definition: EmDQM.h:161

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().

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

Definition at line 211 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 200 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 197 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::etgens
private

Definition at line 210 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 202 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 199 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 182 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 225 of file EmDQM.h.

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

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

Definition at line 224 of file EmDQM.h.

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

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

Definition at line 223 of file EmDQM.h.

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

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

Definition at line 221 of file EmDQM.h.

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

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

Definition at line 222 of file EmDQM.h.

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

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

Definition at line 226 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 179 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 218 of file EmDQM.h.

Referenced by checkGeneratedParticlesRequirement(), and EmDQM().

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

Definition at line 204 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 203 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 205 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 186 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 185 of file EmDQM.h.

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

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

Definition at line 190 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 189 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 220 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 162 of file EmDQM.h.

Referenced by SetVarsFromPSet().

bool EmDQM::mcMatchedOnly_
private

Definition at line 113 of file EmDQM.h.

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

unsigned int EmDQM::minEtForEtaEffPlot_
private

Definition at line 111 of file EmDQM.h.

Referenced by analyze(), 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 164 of file EmDQM.h.

Referenced by analyze(), and SetVarsFromPSet().

bool EmDQM::noIsolationPlots_
private

Definition at line 115 of file EmDQM.h.

Referenced by EmDQM(), and SetVarsFromPSet().

bool EmDQM::noPhiPlots_
private

Definition at line 114 of file EmDQM.h.

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

unsigned int EmDQM::numOfHLTCollectionLabels
private

Definition at line 157 of file EmDQM.h.

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

const unsigned EmDQM::OUTPUT_ALL = 3
staticprivate

Definition at line 241 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 238 of file EmDQM.h.

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

Definition at line 153 of file EmDQM.h.

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

unsigned int EmDQM::pathIndex
private

Definition at line 155 of file EmDQM.h.

Referenced by analyze(), and SetVarsFromPSet().

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

Definition at line 212 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 201 of file EmDQM.h.

Referenced by bookHistograms().

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

Definition at line 198 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 163 of file EmDQM.h.

Referenced by SetVarsFromPSet().

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

Definition at line 161 of file EmDQM.h.

Referenced by SetVarsFromPSet().

double EmDQM::plotPtMax
private

Definition at line 171 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

double EmDQM::plotPtMin
private

Definition at line 170 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 214 of file EmDQM.h.

Referenced by analyze().

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

Definition at line 215 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 166 of file EmDQM.h.

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

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

Definition at line 158 of file EmDQM.h.

Referenced by bookHistograms(), and SetVarsFromPSet().

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

Definition at line 156 of file EmDQM.h.

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

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

Definition at line 160 of file EmDQM.h.

Referenced by analyze(), and SetVarsFromPSet().

edm::InputTag EmDQM::theL1Seed
private

Definition at line 159 of file EmDQM.h.

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

Definition at line 208 of file EmDQM.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 207 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 219 of file EmDQM.h.

Referenced by analyze(), and EmDQM().

const unsigned EmDQM::TYPE_DOUBLE_ELE = 1
staticprivate

Definition at line 232 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_DOUBLE_PHOTON = 3
staticprivate

Definition at line 234 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_SINGLE_ELE = 0
staticprivate

Definition at line 231 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_SINGLE_PHOTON = 2
staticprivate

Definition at line 233 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

const unsigned EmDQM::TYPE_TRIPLE_ELE = 4
staticprivate

Definition at line 235 of file EmDQM.h.

Referenced by dqmBeginRun(), and findEgammaPaths().

bool EmDQM::useHumanReadableHistTitles_
private

Definition at line 112 of file EmDQM.h.

Referenced by bookHistograms(), and EmDQM().

unsigned int EmDQM::verbosity_
private