CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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::PFTauDiscriminator
pfTauDiscriminatorAgainstElectronProducer_tok_
 
edm::EDGetTokenT
< reco::PFTauDiscriminator
pfTauDiscriminatorByIsolationProducer_tok_
 
PFTauElecRejectionBenchmark PFTauElecRejectionBenchmark_
 
edm::EDGetTokenT
< reco::PFTauCollection
pfTauProducer_tok_
 
string sGenMatchObjectLabel
 
edm::EDGetTokenT
< edm::HepMCProduct
sGenParticleSource_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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (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 () noexcept
 
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...
 
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

Definition at line 26 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

Definition at line 27 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 EcalCondDB::db, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLT_FULL_cff::maxDeltaR, Utilities::operator, and makePileupJSON::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 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_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 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

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

Implements edm::EDAnalyzer.

Definition at line 113 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

References edm::Event::getByToken().

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_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
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 136 of file PFTauElecRejectionBenchMarkAnalyzer.cc.

136 {}
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.