CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

PFRecoTauDiscriminationByDeltaE Class Reference

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

List of all members.

Public Member Functions

void beginEvent (const edm::Event &, const edm::EventSetup &)
double discriminate (const reco::PFTauRef &)
 PFRecoTauDiscriminationByDeltaE (const ParameterSet &iConfig)
 ~PFRecoTauDiscriminationByDeltaE ()

Private Member Functions

double DeltaE (const PFTauRef &)

Private Attributes

bool booleanOutput
double chargedPionMass
double deltaEmax
double deltaEmin

Detailed Description

Definition at line 16 of file PFRecoTauDiscriminationByDeltaE.cc.


Constructor & Destructor Documentation

PFRecoTauDiscriminationByDeltaE::PFRecoTauDiscriminationByDeltaE ( const ParameterSet iConfig) [inline, explicit]

Definition at line 18 of file PFRecoTauDiscriminationByDeltaE.cc.

References edm::ParameterSet::getParameter().

                                                                             :PFTauDiscriminationProducerBase(iConfig){
                deltaEmin               = iConfig.getParameter<double>("deltaEmin");
                deltaEmax               = iConfig.getParameter<double>("deltaEmax");
                chargedPionMass         = 0.139;
                booleanOutput           = iConfig.getParameter<bool>("BooleanOutput");
        }
PFRecoTauDiscriminationByDeltaE::~PFRecoTauDiscriminationByDeltaE ( ) [inline]

Definition at line 25 of file PFRecoTauDiscriminationByDeltaE.cc.

{}

Member Function Documentation

void PFRecoTauDiscriminationByDeltaE::beginEvent ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]
double PFRecoTauDiscriminationByDeltaE::DeltaE ( const PFTauRef tau) [private]

Definition at line 49 of file PFRecoTauDiscriminationByDeltaE.cc.

References i, p4, and edm::RefVector< C, T, F >::size().

                                                                 {
        double tracksE = 0;
        PFCandidateRefVector signalTracks = tau->signalPFChargedHadrCands();
        for(size_t i = 0; i < signalTracks.size(); ++i){
                TLorentzVector p4;
                p4.SetXYZM(signalTracks[i]->px(),
                           signalTracks[i]->py(),
                           signalTracks[i]->pz(),
                           chargedPionMass);
                tracksE += p4.E();
        }

        double hadrTauP = tau->momentum().r() * (1.0 - tau->emFraction());
        if (tau->emFraction() >= 1.0) {
                return -1.0; // electron
        } else {
                return tracksE / hadrTauP - 1.0;
        }
}
double PFRecoTauDiscriminationByDeltaE::discriminate ( const reco::PFTauRef tau)

Definition at line 42 of file PFRecoTauDiscriminationByDeltaE.cc.

                                                                       {

        double dE = DeltaE(tau);
        if(booleanOutput) return ( dE > deltaEmin && dE < deltaEmax ? 1. : 0. );
        return dE;
}

Member Data Documentation

Definition at line 36 of file PFRecoTauDiscriminationByDeltaE.cc.

Definition at line 33 of file PFRecoTauDiscriminationByDeltaE.cc.

Definition at line 35 of file PFRecoTauDiscriminationByDeltaE.cc.

Definition at line 35 of file PFRecoTauDiscriminationByDeltaE.cc.