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
PFTauElecRejectionBenchmarkAnalyzer Class Reference
Inheritance diagram for PFTauElecRejectionBenchmarkAnalyzer:
edm::EDAnalyzer

Public Member Functions

 PFTauElecRejectionBenchmarkAnalyzer (const edm::ParameterSet &)
 PFTauElecRejection Benchmark. More...
 
 ~PFTauElecRejectionBenchmarkAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

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

Private Attributes

bool applyEcalCrackCut
 
string benchmarkLabel
 
DQMStoredb
 
double maxDeltaR
 
double maxMCAbsEta
 
double maxRecoAbsEta
 
double minMCPt
 
double minRecoPt
 
string outputfile
 
InputTag pfTauDiscriminatorAgainstElectronProducer
 
InputTag pfTauDiscriminatorByIsolationProducer
 
PFTauElecRejectionBenchmark PFTauElecRejectionBenchmark_
 
InputTag pfTauProducer
 
string sGenMatchObjectLabel
 
InputTag sGenParticleSource
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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 68 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

References EcalCondDB::db, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), cppFunctionSkipper::operator, and estimatePileup_makeJSON::outputfile.

70 {
71  //now do what ever initialization is needed
72  outputfile =
73  iConfig.getUntrackedParameter<string>("OutputFile");
75  iConfig.getParameter<string>("BenchmarkLabel");
77  iConfig.getParameter<InputTag>("InputTruthLabel");
78  maxDeltaR =
79  iConfig.getParameter<double>("maxDeltaR");
80  minMCPt =
81  iConfig.getParameter<double>("minMCPt");
82  maxMCAbsEta =
83  iConfig.getParameter<double>("maxMCAbsEta");
84  minRecoPt =
85  iConfig.getParameter<double>("minRecoPt");
86  maxRecoAbsEta =
87  iConfig.getParameter<double>("maxRecoAbsEta");
88  pfTauProducer =
89  iConfig.getParameter<InputTag>("PFTauProducer");
91  iConfig.getParameter<InputTag>("PFTauDiscriminatorByIsolationProducer");
93  iConfig.getParameter<InputTag>("PFTauDiscriminatorAgainstElectronProducer");
95  iConfig.getParameter<string>("GenMatchObjectLabel");
97  iConfig.getParameter<bool>("ApplyEcalCrackCut");
98 
99 
101 
102 
104  outputfile,
106  maxDeltaR,
107  minRecoPt,
109  minMCPt,
110  maxMCAbsEta,
113  db);
114 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
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)
PFTauElecRejectionBenchmarkAnalyzer::~PFTauElecRejectionBenchmarkAnalyzer ( )

Definition at line 117 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

118 {
119  // do anything here that needs to be done at desctruction time
120  // (e.g. close files, deallocate resources etc.)
121 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 130 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

References edm::Event::getByLabel().

131 {
132 
133  // get gen products
134  Handle<HepMCProduct> mcevt;
135  iEvent.getByLabel(sGenParticleSource, mcevt);
136 
137  // get pftau collection
138  Handle<PFTauCollection> thePFTau;
139  iEvent.getByLabel(pfTauProducer,thePFTau);
140 
141  // get iso discriminator association vector
142  Handle<PFTauDiscriminator> thePFTauDiscriminatorByIsolation;
143  iEvent.getByLabel(pfTauDiscriminatorByIsolationProducer,thePFTauDiscriminatorByIsolation);
144 
145  // get anti-elec discriminator association vector
146  Handle<PFTauDiscriminator> thePFTauDiscriminatorAgainstElectron;
147  iEvent.getByLabel(pfTauDiscriminatorAgainstElectronProducer,thePFTauDiscriminatorAgainstElectron);
148 
149  PFTauElecRejectionBenchmark_.process(mcevt, thePFTau, thePFTauDiscriminatorByIsolation,
150  thePFTauDiscriminatorAgainstElectron);
151 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void process(edm::Handle< edm::HepMCProduct > mcevt, edm::Handle< reco::PFTauCollection > pfTaus, edm::Handle< reco::PFTauDiscriminator > pfTauIsoDiscr, edm::Handle< reco::PFTauDiscriminator > pfTauElecDiscr)
void PFTauElecRejectionBenchmarkAnalyzer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 156 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

157 {
158 }
void PFTauElecRejectionBenchmarkAnalyzer::endJob ( void  )
privatevirtual

Member Data Documentation

bool PFTauElecRejectionBenchmarkAnalyzer::applyEcalCrackCut
private

Definition at line 50 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 42 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::maxMCAbsEta
private

Definition at line 44 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::maxRecoAbsEta
private

Definition at line 46 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::minMCPt
private

Definition at line 43 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::minRecoPt
private

Definition at line 45 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

string PFTauElecRejectionBenchmarkAnalyzer::outputfile
private

Definition at line 38 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

InputTag PFTauElecRejectionBenchmarkAnalyzer::pfTauDiscriminatorAgainstElectronProducer
private

Definition at line 49 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

InputTag PFTauElecRejectionBenchmarkAnalyzer::pfTauDiscriminatorByIsolationProducer
private

Definition at line 48 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

PFTauElecRejectionBenchmark PFTauElecRejectionBenchmarkAnalyzer::PFTauElecRejectionBenchmark_
private

Definition at line 53 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

InputTag PFTauElecRejectionBenchmarkAnalyzer::pfTauProducer
private

Definition at line 47 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

string PFTauElecRejectionBenchmarkAnalyzer::sGenMatchObjectLabel
private

Definition at line 51 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

InputTag PFTauElecRejectionBenchmarkAnalyzer::sGenParticleSource
private

Definition at line 41 of file PFTauElecRejectionBenchMarkAnalyzer.cc.