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::EDAnalyzer edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer 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::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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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

- 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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

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.

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 
89  db = edm::Service<DQMStore>().operator->();
90 
93  maxDeltaR,
94  minRecoPt,
96  minMCPt,
100  db);
101 }

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

◆ ~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::EDAnalyzer.

Definition at line 113 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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 }

References iEvent.

◆ beginJob()

void PFTauElecRejectionBenchmarkAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 136 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

136 {}

◆ endJob()

void PFTauElecRejectionBenchmarkAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 140 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

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.

PFTauElecRejectionBenchmarkAnalyzer::sGenParticleSource_tok_
edm::EDGetTokenT< edm::HepMCProduct > sGenParticleSource_tok_
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:49
PFTauElecRejectionBenchmarkAnalyzer::sGenMatchObjectLabel
string sGenMatchObjectLabel
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:47
PFTauElecRejectionBenchmarkAnalyzer::pfTauProducer_tok_
edm::EDGetTokenT< reco::PFTauCollection > pfTauProducer_tok_
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:50
PFTauElecRejectionBenchmarkAnalyzer::maxRecoAbsEta
double maxRecoAbsEta
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:45
PFTauElecRejectionBenchmark::setup
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)
Definition: PFTauElecRejectionBenchmark.cc:44
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
PFTauElecRejectionBenchmarkAnalyzer::applyEcalCrackCut
bool applyEcalCrackCut
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:46
PFTauElecRejectionBenchmarkAnalyzer::outputfile
string outputfile
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:38
PFTauElecRejectionBenchmarkAnalyzer::maxMCAbsEta
double maxMCAbsEta
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:43
PFTauElecRejectionBenchmarkAnalyzer::pfTauDiscriminatorByIsolationProducer_tok_
edm::EDGetTokenT< reco::PFTauDiscriminator > pfTauDiscriminatorByIsolationProducer_tok_
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:51
PFTauElecRejectionBenchmarkAnalyzer::PFTauElecRejectionBenchmark_
PFTauElecRejectionBenchmark PFTauElecRejectionBenchmark_
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:54
PFTauElecRejectionBenchmarkAnalyzer::pfTauDiscriminatorAgainstElectronProducer_tok_
edm::EDGetTokenT< reco::PFTauDiscriminator > pfTauDiscriminatorAgainstElectronProducer_tok_
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:52
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
PFTauElecRejectionBenchmarkAnalyzer::maxDeltaR
double maxDeltaR
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:41
PFTauElecRejectionBenchmark::write
void write()
Definition: PFTauElecRejectionBenchmark.cc:29
PFTauElecRejectionBenchmarkAnalyzer::minMCPt
double minMCPt
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:42
PFTauElecRejectionBenchmarkAnalyzer::benchmarkLabel
string benchmarkLabel
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:40
PFTauElecRejectionBenchmark::process
void process(edm::Handle< edm::HepMCProduct > mcevt, edm::Handle< reco::PFTauCollection > pfTaus, edm::Handle< reco::PFTauDiscriminator > pfTauIsoDiscr, edm::Handle< reco::PFTauDiscriminator > pfTauElecDiscr)
Definition: PFTauElecRejectionBenchmark.cc:205
PFTauElecRejectionBenchmarkAnalyzer::db
DQMStore * db
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:39
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::InputTag
Definition: InputTag.h:15
PFTauElecRejectionBenchmarkAnalyzer::minRecoPt
double minRecoPt
Definition: PFTauElecRejectionBenchMarkAnalyzer.cc:44