CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CaloRecoTauDiscriminationByDeltaE Class Reference

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

List of all members.

Public Member Functions

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

Private Member Functions

double DeltaE (const CaloTauRef &)

Private Attributes

bool booleanOutput
double chargedPionMass
double deltaEmax
double deltaEmin

Detailed Description

Definition at line 19 of file CaloRecoTauDiscriminationByDeltaE.cc.


Constructor & Destructor Documentation

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

Definition at line 21 of file CaloRecoTauDiscriminationByDeltaE.cc.

References edm::ParameterSet::getParameter().

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

Definition at line 28 of file CaloRecoTauDiscriminationByDeltaE.cc.

{}

Member Function Documentation

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

Definition at line 52 of file CaloRecoTauDiscriminationByDeltaE.cc.

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

                                                                     {
        double tracksE = 0;
        reco::TrackRefVector signalTracks = tau->signalTracks();
        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();
        }
        if(tau->leadTrackHCAL3x3hitsEtSum() == 0) return -1; // electron
        return tracksE/tau->leadTrackHCAL3x3hitsEtSum() - 1.0;
}
double CaloRecoTauDiscriminationByDeltaE::discriminate ( const reco::CaloTauRef tau) [virtual]

Implements TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 45 of file CaloRecoTauDiscriminationByDeltaE.cc.

                                                                           {

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

Member Data Documentation

Definition at line 39 of file CaloRecoTauDiscriminationByDeltaE.cc.

Definition at line 36 of file CaloRecoTauDiscriminationByDeltaE.cc.

Definition at line 38 of file CaloRecoTauDiscriminationByDeltaE.cc.

Definition at line 38 of file CaloRecoTauDiscriminationByDeltaE.cc.