CMS 3D CMS Logo

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

Public Member Functions

 PFTauElecRejectionBenchmarkAnalyzer (const edm::ParameterSet &)
 PFTauElecRejection Benchmark. More...
 
 ~PFTauElecRejectionBenchmarkAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void beginJob () override
 
virtual 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

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 26 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

Constructor & Destructor Documentation

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

PFTauElecRejection Benchmark.

Definition at line 69 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), electronMatch_cfi::maxDeltaR, pfTauBenchmarkElecRejection_cfi::maxMCAbsEta, pfTauBenchmarkElecRejection_cfi::maxRecoAbsEta, pfTauBenchmarkElecRejection_cfi::minMCPt, pfTauBenchmarkElecRejection_cfi::minRecoPt, Utilities::operator, and estimatePileup_makeJSON::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"));
82  pfTauDiscriminatorByIsolationProducer_tok_ = consumes<reco::PFTauDiscriminator>
83  (iConfig.getParameter<InputTag>("PFTauDiscriminatorByIsolationProducer"));
84  pfTauDiscriminatorAgainstElectronProducer_tok_ = consumes<reco::PFTauDiscriminator>
85  (iConfig.getParameter<InputTag>("PFTauDiscriminatorAgainstElectronProducer") );
86  sGenMatchObjectLabel = iConfig.getParameter<string>("GenMatchObjectLabel");
87  applyEcalCrackCut = iConfig.getParameter<bool>("ApplyEcalCrackCut");
88 
89 
91 
92 
94  outputfile,
96  maxDeltaR,
97  minRecoPt,
99  minMCPt,
100  maxMCAbsEta,
103  db);
104 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::PFTauCollection > pfTauProducer_tok_
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 ( )

Definition at line 107 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

108 {
109  // do anything here that needs to be done at desctruction time
110  // (e.g. close files, deallocate resources etc.)
111 }

Member Function Documentation

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

Definition at line 120 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

References edm::Event::getByToken().

121 {
122 
123  // get gen products
124  Handle<HepMCProduct> mcevt;
125  iEvent.getByToken(sGenParticleSource_tok_, mcevt);
126 
127  // get pftau collection
128  Handle<PFTauCollection> thePFTau;
129  iEvent.getByToken(pfTauProducer_tok_,thePFTau);
130 
131  // get iso discriminator association vector
132  Handle<PFTauDiscriminator> thePFTauDiscriminatorByIsolation;
133  iEvent.getByToken(pfTauDiscriminatorByIsolationProducer_tok_,thePFTauDiscriminatorByIsolation);
134 
135  // get anti-elec discriminator association vector
136  Handle<PFTauDiscriminator> thePFTauDiscriminatorAgainstElectron;
137  iEvent.getByToken(pfTauDiscriminatorAgainstElectronProducer_tok_,thePFTauDiscriminatorAgainstElectron);
138 
139  PFTauElecRejectionBenchmark_.process(mcevt, thePFTau, thePFTauDiscriminatorByIsolation,
140  thePFTauDiscriminatorAgainstElectron);
141 }
edm::EDGetTokenT< reco::PFTauCollection > pfTauProducer_tok_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
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_
void PFTauElecRejectionBenchmarkAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 146 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

147 {
148 }
void PFTauElecRejectionBenchmarkAnalyzer::endJob ( void  )
overrideprivatevirtual

Member Data Documentation

bool PFTauElecRejectionBenchmarkAnalyzer::applyEcalCrackCut
private

Definition at line 46 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

string PFTauElecRejectionBenchmarkAnalyzer::benchmarkLabel
private

Definition at line 40 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

DQMStore* PFTauElecRejectionBenchmarkAnalyzer::db
private

Definition at line 39 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::maxDeltaR
private

Definition at line 41 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::maxMCAbsEta
private

Definition at line 43 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::maxRecoAbsEta
private

Definition at line 45 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::minMCPt
private

Definition at line 42 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::minRecoPt
private

Definition at line 44 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

string PFTauElecRejectionBenchmarkAnalyzer::outputfile
private

Definition at line 38 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

Definition at line 52 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

Definition at line 51 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

PFTauElecRejectionBenchmark PFTauElecRejectionBenchmarkAnalyzer::PFTauElecRejectionBenchmark_
private

Definition at line 54 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

Definition at line 50 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

string PFTauElecRejectionBenchmarkAnalyzer::sGenMatchObjectLabel
private

Definition at line 47 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

Definition at line 49 of file PFTauElecRejectionBenchMarkAnalyzer.cc.