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 () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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
 
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
 
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

- 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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 24 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

Constructor & Destructor Documentation

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

PFTauElecRejection Benchmark.

Definition at line 66 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

68 {
69  // now do what ever initialization is needed
70  outputfile = iConfig.getUntrackedParameter<string>("OutputFile");
71  benchmarkLabel = iConfig.getParameter<string>("BenchmarkLabel");
72  sGenParticleSource_tok_ = consumes<edm::HepMCProduct>(iConfig.getParameter<InputTag>("InputTruthLabel"));
73  maxDeltaR = iConfig.getParameter<double>("maxDeltaR");
74  minMCPt = iConfig.getParameter<double>("minMCPt");
75  maxMCAbsEta = iConfig.getParameter<double>("maxMCAbsEta");
76  minRecoPt = iConfig.getParameter<double>("minRecoPt");
77  maxRecoAbsEta = iConfig.getParameter<double>("maxRecoAbsEta");
78  pfTauProducer_tok_ = consumes<reco::PFTauCollection>(iConfig.getParameter<InputTag>("PFTauProducer"));
80  consumes<reco::PFTauDiscriminator>(iConfig.getParameter<InputTag>("PFTauDiscriminatorByIsolationProducer"));
82  consumes<reco::PFTauDiscriminator>(iConfig.getParameter<InputTag>("PFTauDiscriminatorAgainstElectronProducer"));
83  sGenMatchObjectLabel = iConfig.getParameter<string>("GenMatchObjectLabel");
84  applyEcalCrackCut = iConfig.getParameter<bool>("ApplyEcalCrackCut");
85 
87 
90  maxDeltaR,
91  minRecoPt,
93  minMCPt,
97  db);
98 }
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 ( )
override

Definition at line 100 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

Member Function Documentation

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

Definition at line 110 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

References edm::Event::getByToken().

110  {
111  // get gen products
112  Handle<HepMCProduct> mcevt;
113  iEvent.getByToken(sGenParticleSource_tok_, mcevt);
114 
115  // get pftau collection
116  Handle<PFTauCollection> thePFTau;
117  iEvent.getByToken(pfTauProducer_tok_, thePFTau);
118 
119  // get iso discriminator association vector
120  Handle<PFTauDiscriminator> thePFTauDiscriminatorByIsolation;
121  iEvent.getByToken(pfTauDiscriminatorByIsolationProducer_tok_, thePFTauDiscriminatorByIsolation);
122 
123  // get anti-elec discriminator association vector
124  Handle<PFTauDiscriminator> thePFTauDiscriminatorAgainstElectron;
125  iEvent.getByToken(pfTauDiscriminatorAgainstElectronProducer_tok_, thePFTauDiscriminatorAgainstElectron);
126 
128  mcevt, thePFTau, thePFTauDiscriminatorByIsolation, thePFTauDiscriminatorAgainstElectron);
129 }
edm::EDGetTokenT< reco::PFTauCollection > pfTauProducer_tok_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
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 133 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

133 {}
void PFTauElecRejectionBenchmarkAnalyzer::endJob ( void  )
overrideprivatevirtual

Member Data Documentation

bool PFTauElecRejectionBenchmarkAnalyzer::applyEcalCrackCut
private

Definition at line 43 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

string PFTauElecRejectionBenchmarkAnalyzer::benchmarkLabel
private

Definition at line 37 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

DQMStore* PFTauElecRejectionBenchmarkAnalyzer::db
private

Definition at line 36 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::maxDeltaR
private

Definition at line 38 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::maxMCAbsEta
private

Definition at line 40 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::maxRecoAbsEta
private

Definition at line 42 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::minMCPt
private

Definition at line 39 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

double PFTauElecRejectionBenchmarkAnalyzer::minRecoPt
private

Definition at line 41 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

string PFTauElecRejectionBenchmarkAnalyzer::outputfile
private

Definition at line 35 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

Definition at line 49 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

Definition at line 48 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

PFTauElecRejectionBenchmark PFTauElecRejectionBenchmarkAnalyzer::PFTauElecRejectionBenchmark_
private

Definition at line 51 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

Definition at line 47 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

string PFTauElecRejectionBenchmarkAnalyzer::sGenMatchObjectLabel
private

Definition at line 44 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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

Definition at line 46 of file PFTauElecRejectionBenchMarkAnalyzer.cc.