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 Attributes
PFRecoTauDiscriminationAgainstElectronMVA Class Reference
Inheritance diagram for PFRecoTauDiscriminationAgainstElectronMVA:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

double discriminate (const PFTauRef &thePFTauRef)
 
 PFRecoTauDiscriminationAgainstElectronMVA (const edm::ParameterSet &iConfig)
 
 ~PFRecoTauDiscriminationAgainstElectronMVA ()
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
virtual void beginEvent (const edm::Event &evt, const edm::EventSetup &evtSetup)
 
virtual double discriminate (const TauRef &tau)=0
 
virtual void endEvent (edm::Event &evt)
 
void produce (edm::Event &, const edm::EventSetup &)
 
 TauDiscriminationProducerBase (const edm::ParameterSet &iConfig)
 
 TauDiscriminationProducerBase ()
 
virtual ~TauDiscriminationProducerBase ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::FileInPath inputFileName1prongBL_
 
edm::FileInPath inputFileName1prongEC_
 
edm::FileInPath inputFileName1prongStripsWgsfBL_
 
edm::FileInPath inputFileName1prongStripsWgsfEC_
 
edm::FileInPath inputFileName1prongStripsWOgsfBL_
 
edm::FileInPath inputFileName1prongStripsWOgsfEC_
 
std::string method_
 
double minMVA1prongBL_
 
double minMVA1prongEC_
 
double minMVA1prongStripsWgsfBL_
 
double minMVA1prongStripsWgsfEC_
 
double minMVA1prongStripsWOgsfBL_
 
double minMVA1prongStripsWOgsfEC_
 
AntiElectronIDMVAmva_
 
bool returnMVA_
 

Additional Inherited Members

- Public Types inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
typedef std::vector< TauType > TauCollection
 
typedef edm::Ref< TauCollectionTauRef
 
typedef edm::RefProd
< TauCollection
TauRefProd
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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)
 
- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
std::string moduleLabel_
 
double prediscriminantFailValue_
 
edm::InputTag TauProducer_
 

Detailed Description

Definition at line 15 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Constructor & Destructor Documentation

PFRecoTauDiscriminationAgainstElectronMVA::PFRecoTauDiscriminationAgainstElectronMVA ( const edm::ParameterSet iConfig)
inlineexplicit

Definition at line 17 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

References edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

18 
19  method_ = iConfig.getParameter<std::string>("method");
20  inputFileName1prongBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongBL");
21  inputFileName1prongStripsWgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongStripsWgsfBL");
22  inputFileName1prongStripsWOgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongStripsWOgsfBL");
23  inputFileName1prongEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongEC");
24  inputFileName1prongStripsWgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongStripsWgsfEC");
25  inputFileName1prongStripsWOgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongStripsWOgsfEC");
26 
27  returnMVA_ = iConfig.getParameter<bool>("returnMVA");
28  minMVA1prongBL_ = iConfig.getParameter<double>("minMVA1prongBL");
29  minMVA1prongStripsWgsfBL_ = iConfig.getParameter<double>("minMVA1prongStripsWgsfBL");
30  minMVA1prongStripsWOgsfBL_ = iConfig.getParameter<double>("minMVA1prongStripsWOgsfBL");
31  minMVA1prongEC_ = iConfig.getParameter<double>("minMVA1prongEC");
32  minMVA1prongStripsWgsfEC_ = iConfig.getParameter<double>("minMVA1prongStripsWgsfEC");
33  minMVA1prongStripsWOgsfEC_ = iConfig.getParameter<double>("minMVA1prongStripsWOgsfEC");
34 
35  mva_ = new AntiElectronIDMVA();
36  mva_->Initialize(method_,
37  inputFileName1prongBL_.fullPath().data(),
38  inputFileName1prongStripsWgsfBL_.fullPath().data(),
39  inputFileName1prongStripsWOgsfBL_.fullPath().data(),
40  inputFileName1prongEC_.fullPath().data(),
41  inputFileName1prongStripsWgsfEC_.fullPath().data(),
42  inputFileName1prongStripsWOgsfEC_.fullPath().data()
43  );
44 
45 
46  }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
std::string fullPath() const
Definition: FileInPath.cc:171
PFRecoTauDiscriminationAgainstElectronMVA::~PFRecoTauDiscriminationAgainstElectronMVA ( )
inline

Member Function Documentation

double PFRecoTauDiscriminationAgainstElectronMVA::discriminate ( const PFTauRef thePFTauRef)

Definition at line 71 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

72 {
73  double mva = -1.0;
74  double workingPoint = 0.0;
75 
76  if( (*thePFTauRef).leadPFChargedHadrCand().isNonnull() ) {
77 
78  mva = mva_->MVAValue( thePFTauRef );
79 
80  workingPoint =
81  ((*thePFTauRef).signalPFChargedHadrCands().size()==3 ||
82  (fabs((*thePFTauRef).eta())<1.5 && ((*thePFTauRef).signalPFGammaCands().size())<=0 && mva > minMVA1prongBL_) ||
83  (fabs((*thePFTauRef).eta())<1.5 && ((*thePFTauRef).signalPFGammaCands().size())>0 && (((*thePFTauRef).leadPFChargedHadrCand())->gsfTrackRef()).isNonnull()>0.5 && mva > minMVA1prongStripsWgsfBL_) ||
84  (fabs((*thePFTauRef).eta())<1.5 && ((*thePFTauRef).signalPFGammaCands().size())>0 && (((*thePFTauRef).leadPFChargedHadrCand())->gsfTrackRef()).isNonnull()<0.5 && mva > minMVA1prongStripsWOgsfBL_) ||
85  (fabs((*thePFTauRef).eta())>1.5 && ((*thePFTauRef).signalPFGammaCands().size())<=0 && mva > minMVA1prongEC_) ||
86  (fabs((*thePFTauRef).eta())>1.5 && ((*thePFTauRef).signalPFGammaCands().size())>0 && (((*thePFTauRef).leadPFChargedHadrCand())->gsfTrackRef()).isNonnull()>0.5 && mva > minMVA1prongStripsWgsfEC_) ||
87  (fabs((*thePFTauRef).eta())>1.5 && ((*thePFTauRef).signalPFGammaCands().size())>0 && (((*thePFTauRef).leadPFChargedHadrCand())->gsfTrackRef()).isNonnull()<0.5 && mva > minMVA1prongStripsWOgsfEC_)) ? 1.0 : 0.0;
88 
89  }
90 
91  return ( returnMVA_ ? mva : workingPoint);
92 }
double MVAValue(Float_t TauEta, Float_t TauPt, Float_t TauSignalPFChargedCands, Float_t TauSignalPFGammaCands, Float_t TauLeadPFChargedHadrMva, Float_t TauLeadPFChargedHadrHoP, Float_t TauLeadPFChargedHadrEoP, Float_t TauHasGsf, Float_t TauVisMass, Float_t TauEmFraction, std::vector< Float_t > *GammasdEta, std::vector< Float_t > *GammasdPhi, std::vector< Float_t > *GammasPt)

Member Data Documentation

edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA::inputFileName1prongBL_
private

Definition at line 55 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA::inputFileName1prongEC_
private

Definition at line 58 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA::inputFileName1prongStripsWgsfBL_
private

Definition at line 56 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA::inputFileName1prongStripsWgsfEC_
private

Definition at line 59 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA::inputFileName1prongStripsWOgsfBL_
private

Definition at line 57 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA::inputFileName1prongStripsWOgsfEC_
private

Definition at line 60 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

std::string PFRecoTauDiscriminationAgainstElectronMVA::method_
private

Definition at line 54 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

double PFRecoTauDiscriminationAgainstElectronMVA::minMVA1prongBL_
private

Definition at line 63 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

double PFRecoTauDiscriminationAgainstElectronMVA::minMVA1prongEC_
private

Definition at line 66 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

double PFRecoTauDiscriminationAgainstElectronMVA::minMVA1prongStripsWgsfBL_
private

Definition at line 64 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

double PFRecoTauDiscriminationAgainstElectronMVA::minMVA1prongStripsWgsfEC_
private

Definition at line 67 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

double PFRecoTauDiscriminationAgainstElectronMVA::minMVA1prongStripsWOgsfBL_
private

Definition at line 65 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

double PFRecoTauDiscriminationAgainstElectronMVA::minMVA1prongStripsWOgsfEC_
private

Definition at line 68 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

AntiElectronIDMVA* PFRecoTauDiscriminationAgainstElectronMVA::mva_
private

Definition at line 61 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

bool PFRecoTauDiscriminationAgainstElectronMVA::returnMVA_
private

Definition at line 62 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.