CMS 3D CMS Logo

Public Member Functions | Private Attributes

PFRecoTauDiscriminationAgainstElectronMVA Class Reference

Inheritance diagram for PFRecoTauDiscriminationAgainstElectronMVA:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

double discriminate (const PFTauRef &thePFTauRef)
 PFRecoTauDiscriminationAgainstElectronMVA (const edm::ParameterSet &iConfig)
 ~PFRecoTauDiscriminationAgainstElectronMVA ()

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_

Detailed Description

Definition at line 15 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.


Constructor & Destructor Documentation

PFRecoTauDiscriminationAgainstElectronMVA::PFRecoTauDiscriminationAgainstElectronMVA ( const edm::ParameterSet iConfig) [inline, explicit]

Definition at line 17 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

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

                                                                                        :PFTauDiscriminationProducerBase(iConfig) {

         method_                           = iConfig.getParameter<std::string>("method");
         inputFileName1prongBL_            = iConfig.getParameter<edm::FileInPath>("inputFileName1prongBL");
         inputFileName1prongStripsWgsfBL_  = iConfig.getParameter<edm::FileInPath>("inputFileName1prongStripsWgsfBL");
         inputFileName1prongStripsWOgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongStripsWOgsfBL");
         inputFileName1prongEC_            = iConfig.getParameter<edm::FileInPath>("inputFileName1prongEC");
         inputFileName1prongStripsWgsfEC_  = iConfig.getParameter<edm::FileInPath>("inputFileName1prongStripsWgsfEC");
         inputFileName1prongStripsWOgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongStripsWOgsfEC");

         returnMVA_                 = iConfig.getParameter<bool>("returnMVA");
         minMVA1prongBL_            = iConfig.getParameter<double>("minMVA1prongBL");
         minMVA1prongStripsWgsfBL_  = iConfig.getParameter<double>("minMVA1prongStripsWgsfBL");
         minMVA1prongStripsWOgsfBL_ = iConfig.getParameter<double>("minMVA1prongStripsWOgsfBL");
         minMVA1prongEC_            = iConfig.getParameter<double>("minMVA1prongEC");
         minMVA1prongStripsWgsfEC_  = iConfig.getParameter<double>("minMVA1prongStripsWgsfEC");
         minMVA1prongStripsWOgsfEC_ = iConfig.getParameter<double>("minMVA1prongStripsWOgsfEC");

         mva_ = new AntiElectronIDMVA();
         mva_->Initialize(method_,
                          inputFileName1prongBL_.fullPath().data(),
                          inputFileName1prongStripsWgsfBL_.fullPath().data(),
                          inputFileName1prongStripsWOgsfBL_.fullPath().data(),
                          inputFileName1prongEC_.fullPath().data(),
                          inputFileName1prongStripsWgsfEC_.fullPath().data(),
                          inputFileName1prongStripsWOgsfEC_.fullPath().data()
                          );


      }
PFRecoTauDiscriminationAgainstElectronMVA::~PFRecoTauDiscriminationAgainstElectronMVA ( ) [inline]

Definition at line 50 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

{ delete mva_; }

Member Function Documentation

double PFRecoTauDiscriminationAgainstElectronMVA::discriminate ( const PFTauRef thePFTauRef)

Definition at line 71 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

{
  double mva          = -1.0;
  double workingPoint =  0.0;

  if( (*thePFTauRef).leadPFChargedHadrCand().isNonnull() ) {

    mva = mva_->MVAValue( thePFTauRef );

    workingPoint =
      ((*thePFTauRef).signalPFChargedHadrCands().size()==3 ||
       (fabs((*thePFTauRef).eta())<1.5 && ((*thePFTauRef).signalPFGammaCands().size())<=0 && mva > minMVA1prongBL_) ||
       (fabs((*thePFTauRef).eta())<1.5 && ((*thePFTauRef).signalPFGammaCands().size())>0  && (((*thePFTauRef).leadPFChargedHadrCand())->gsfTrackRef()).isNonnull()>0.5 && mva > minMVA1prongStripsWgsfBL_) ||
       (fabs((*thePFTauRef).eta())<1.5 && ((*thePFTauRef).signalPFGammaCands().size())>0  && (((*thePFTauRef).leadPFChargedHadrCand())->gsfTrackRef()).isNonnull()<0.5 && mva > minMVA1prongStripsWOgsfBL_) ||
       (fabs((*thePFTauRef).eta())>1.5 && ((*thePFTauRef).signalPFGammaCands().size())<=0 && mva > minMVA1prongEC_) ||
       (fabs((*thePFTauRef).eta())>1.5 && ((*thePFTauRef).signalPFGammaCands().size())>0  && (((*thePFTauRef).leadPFChargedHadrCand())->gsfTrackRef()).isNonnull()>0.5 && mva > minMVA1prongStripsWgsfEC_) ||
       (fabs((*thePFTauRef).eta())>1.5 && ((*thePFTauRef).signalPFGammaCands().size())>0  && (((*thePFTauRef).leadPFChargedHadrCand())->gsfTrackRef()).isNonnull()<0.5 && mva > minMVA1prongStripsWOgsfEC_)) ? 1.0 : 0.0;

  }

  return ( returnMVA_ ? mva : workingPoint);
}

Member Data Documentation

Definition at line 55 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 58 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 56 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 59 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 57 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 60 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 54 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 63 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 66 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 64 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 67 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 65 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 68 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 61 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.

Definition at line 62 of file PFRecoTauDiscriminationAgainstElectronMVA.cc.