CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PFTauElecRejectionBenchmarkAnalyzer Class Reference
Inheritance diagram for PFTauElecRejectionBenchmarkAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 PFTauElecRejectionBenchmarkAnalyzer (const edm::ParameterSet &)
 PFTauElecRejection Benchmark. More...
 
 ~PFTauElecRejectionBenchmarkAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 

Private Attributes

bool applyEcalCrackCut
 
string benchmarkLabel
 
DQMStoredb
 
double maxDeltaR
 
double maxMCAbsEta
 
double maxRecoAbsEta
 
double minMCPt
 
double minRecoPt
 
string outputfile
 
edm::EDGetTokenT< reco::PFTauDiscriminatorpfTauDiscriminatorAgainstElectronProducer_tok_
 
edm::EDGetTokenT< reco::PFTauDiscriminatorpfTauDiscriminatorByIsolationProducer_tok_
 
PFTauElecRejectionBenchmark PFTauElecRejectionBenchmark_
 
edm::EDGetTokenT< reco::PFTauCollectionpfTauProducer_tok_
 
string sGenMatchObjectLabel
 
edm::EDGetTokenT< edm::HepMCProductsGenParticleSource_tok_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 24 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 26 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ MonitorElement

Definition at line 27 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

Constructor & Destructor Documentation

◆ PFTauElecRejectionBenchmarkAnalyzer()

PFTauElecRejectionBenchmarkAnalyzer::PFTauElecRejectionBenchmarkAnalyzer ( const edm::ParameterSet iConfig)
explicit

PFTauElecRejection Benchmark.

Definition at line 69 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

References dqmiodatasetharvest::db, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), ewkMuLumiMonitorDQM_cfi::maxDeltaR, pfTauBenchmarkElecRejection_cfi::maxMCAbsEta, pfTauBenchmarkElecRejection_cfi::maxRecoAbsEta, pfTauBenchmarkElecRejection_cfi::minMCPt, pfTauBenchmarkElecRejection_cfi::minRecoPt, Utilities::operator, and writedatasetfile::outputfile.

71 {
72  // now do what ever initialization is needed
73  outputfile = iConfig.getUntrackedParameter<string>("OutputFile");
74  benchmarkLabel = iConfig.getParameter<string>("BenchmarkLabel");
75  sGenParticleSource_tok_ = consumes<edm::HepMCProduct>(iConfig.getParameter<InputTag>("InputTruthLabel"));
76  maxDeltaR = iConfig.getParameter<double>("maxDeltaR");
77  minMCPt = iConfig.getParameter<double>("minMCPt");
78  maxMCAbsEta = iConfig.getParameter<double>("maxMCAbsEta");
79  minRecoPt = iConfig.getParameter<double>("minRecoPt");
80  maxRecoAbsEta = iConfig.getParameter<double>("maxRecoAbsEta");
81  pfTauProducer_tok_ = consumes<reco::PFTauCollection>(iConfig.getParameter<InputTag>("PFTauProducer"));
83  consumes<reco::PFTauDiscriminator>(iConfig.getParameter<InputTag>("PFTauDiscriminatorByIsolationProducer"));
85  consumes<reco::PFTauDiscriminator>(iConfig.getParameter<InputTag>("PFTauDiscriminatorAgainstElectronProducer"));
86  sGenMatchObjectLabel = iConfig.getParameter<string>("GenMatchObjectLabel");
87  applyEcalCrackCut = iConfig.getParameter<bool>("ApplyEcalCrackCut");
88 
90 
93  maxDeltaR,
94  minRecoPt,
96  minMCPt,
100  db);
101 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< reco::PFTauCollection > pfTauProducer_tok_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::PFTauDiscriminator > pfTauDiscriminatorByIsolationProducer_tok_
edm::EDGetTokenT< reco::PFTauDiscriminator > pfTauDiscriminatorAgainstElectronProducer_tok_
void setup(std::string Filename, std::string benchmarkLabel, double maxDeltaR, double minRecoPt, double maxRecoAbsEta, double minMCPt, double maxMCAbsEta, std::string sGenMatchObjectLabel, bool applyEcalCrackCut, DQMStore *db_store)
edm::EDGetTokenT< edm::HepMCProduct > sGenParticleSource_tok_

◆ ~PFTauElecRejectionBenchmarkAnalyzer()

PFTauElecRejectionBenchmarkAnalyzer::~PFTauElecRejectionBenchmarkAnalyzer ( )
override

Definition at line 103 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

103  {
104  // do anything here that needs to be done at desctruction time
105  // (e.g. close files, deallocate resources etc.)
106 }

Member Function Documentation

◆ analyze()

void PFTauElecRejectionBenchmarkAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 113 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

References iEvent.

113  {
114  // get gen products
115  Handle<HepMCProduct> mcevt;
116  iEvent.getByToken(sGenParticleSource_tok_, mcevt);
117 
118  // get pftau collection
119  Handle<PFTauCollection> thePFTau;
120  iEvent.getByToken(pfTauProducer_tok_, thePFTau);
121 
122  // get iso discriminator association vector
123  Handle<PFTauDiscriminator> thePFTauDiscriminatorByIsolation;
124  iEvent.getByToken(pfTauDiscriminatorByIsolationProducer_tok_, thePFTauDiscriminatorByIsolation);
125 
126  // get anti-elec discriminator association vector
127  Handle<PFTauDiscriminator> thePFTauDiscriminatorAgainstElectron;
128  iEvent.getByToken(pfTauDiscriminatorAgainstElectronProducer_tok_, thePFTauDiscriminatorAgainstElectron);
129 
131  mcevt, thePFTau, thePFTauDiscriminatorByIsolation, thePFTauDiscriminatorAgainstElectron);
132 }
edm::EDGetTokenT< reco::PFTauCollection > pfTauProducer_tok_
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< reco::PFTauDiscriminator > pfTauDiscriminatorByIsolationProducer_tok_
edm::EDGetTokenT< reco::PFTauDiscriminator > pfTauDiscriminatorAgainstElectronProducer_tok_
void process(edm::Handle< edm::HepMCProduct > mcevt, edm::Handle< reco::PFTauCollection > pfTaus, edm::Handle< reco::PFTauDiscriminator > pfTauIsoDiscr, edm::Handle< reco::PFTauDiscriminator > pfTauElecDiscr)
edm::EDGetTokenT< edm::HepMCProduct > sGenParticleSource_tok_

◆ beginJob()

void PFTauElecRejectionBenchmarkAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 136 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

136 {}

◆ endJob()

void PFTauElecRejectionBenchmarkAnalyzer::endJob ( void  )
overrideprivatevirtual

Member Data Documentation

◆ applyEcalCrackCut

bool PFTauElecRejectionBenchmarkAnalyzer::applyEcalCrackCut
private

Definition at line 46 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ benchmarkLabel

string PFTauElecRejectionBenchmarkAnalyzer::benchmarkLabel
private

Definition at line 40 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ db

DQMStore* PFTauElecRejectionBenchmarkAnalyzer::db
private

Definition at line 39 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ maxDeltaR

double PFTauElecRejectionBenchmarkAnalyzer::maxDeltaR
private

Definition at line 41 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ maxMCAbsEta

double PFTauElecRejectionBenchmarkAnalyzer::maxMCAbsEta
private

Definition at line 43 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ maxRecoAbsEta

double PFTauElecRejectionBenchmarkAnalyzer::maxRecoAbsEta
private

Definition at line 45 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ minMCPt

double PFTauElecRejectionBenchmarkAnalyzer::minMCPt
private

Definition at line 42 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ minRecoPt

double PFTauElecRejectionBenchmarkAnalyzer::minRecoPt
private

Definition at line 44 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ outputfile

string PFTauElecRejectionBenchmarkAnalyzer::outputfile
private

Definition at line 38 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ pfTauDiscriminatorAgainstElectronProducer_tok_

edm::EDGetTokenT<reco::PFTauDiscriminator> PFTauElecRejectionBenchmarkAnalyzer::pfTauDiscriminatorAgainstElectronProducer_tok_
private

Definition at line 52 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ pfTauDiscriminatorByIsolationProducer_tok_

edm::EDGetTokenT<reco::PFTauDiscriminator> PFTauElecRejectionBenchmarkAnalyzer::pfTauDiscriminatorByIsolationProducer_tok_
private

Definition at line 51 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ PFTauElecRejectionBenchmark_

PFTauElecRejectionBenchmark PFTauElecRejectionBenchmarkAnalyzer::PFTauElecRejectionBenchmark_
private

Definition at line 54 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ pfTauProducer_tok_

edm::EDGetTokenT<reco::PFTauCollection> PFTauElecRejectionBenchmarkAnalyzer::pfTauProducer_tok_
private

Definition at line 50 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ sGenMatchObjectLabel

string PFTauElecRejectionBenchmarkAnalyzer::sGenMatchObjectLabel
private

Definition at line 47 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

◆ sGenParticleSource_tok_

edm::EDGetTokenT<edm::HepMCProduct> PFTauElecRejectionBenchmarkAnalyzer::sGenParticleSource_tok_
private

Definition at line 49 of file PFTauElecRejectionBenchMarkAnalyzer.cc.