CMS 3D CMS Logo

Public Member Functions | Private Attributes

CaloRecoTauDiscriminationAgainstElectron Class Reference

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

List of all members.

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &eventSetup)
 CaloRecoTauDiscriminationAgainstElectron (const edm::ParameterSet &iConfig)
double discriminate (const CaloTauRef &theCaloTauRef)
 ~CaloRecoTauDiscriminationAgainstElectron ()

Private Attributes

bool ApplyCut_leadTrackavoidsECALcrack_
bool ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_
edm::InputTag CaloTauProducer_
double leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_
double maxleadTrackHCAL3x3hottesthitDEta_
edm::ESHandle< MagneticFieldtheMagneticField

Detailed Description

Definition at line 17 of file CaloRecoTauDiscriminationAgainstElectron.cc.


Constructor & Destructor Documentation

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

Definition at line 19 of file CaloRecoTauDiscriminationAgainstElectron.cc.

References edm::ParameterSet::getParameter().

                                                                                       :CaloTauDiscriminationProducerBase(iConfig){   
         CaloTauProducer_                            = iConfig.getParameter<edm::InputTag>("CaloTauProducer");
         leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_  = iConfig.getParameter<double>("leadTrack_HCAL3x3hitsEtSumOverPt_minvalue");  
         ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_ = iConfig.getParameter<bool>("ApplyCut_maxleadTrackHCAL3x3hottesthitDEta");
         maxleadTrackHCAL3x3hottesthitDEta_          = iConfig.getParameter<double>("maxleadTrackHCAL3x3hottesthitDEta");
         ApplyCut_leadTrackavoidsECALcrack_          = iConfig.getParameter<bool>("ApplyCut_leadTrackavoidsECALcrack");
      }
CaloRecoTauDiscriminationAgainstElectron::~CaloRecoTauDiscriminationAgainstElectron ( ) [inline]

Definition at line 26 of file CaloRecoTauDiscriminationAgainstElectron.cc.

{} 

Member Function Documentation

void CaloRecoTauDiscriminationAgainstElectron::beginEvent ( const edm::Event event,
const edm::EventSetup eventSetup 
) [virtual]

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 38 of file CaloRecoTauDiscriminationAgainstElectron.cc.

References edm::EventSetup::get().

{
   if (ApplyCut_leadTrackavoidsECALcrack_)
   {
      // get the magnetic field, if we need it
      eventSetup.get<IdealMagneticFieldRecord>().get(theMagneticField);
   }
}
double CaloRecoTauDiscriminationAgainstElectron::discriminate ( const CaloTauRef theCaloTauRef) [virtual]

Implements TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 48 of file CaloRecoTauDiscriminationAgainstElectron.cc.

References ECALBounds::crack_absEtaIntervalA(), ECALBounds::crack_absEtaIntervalB(), ECALBounds::crack_absEtaIntervalC(), ECALBounds::crack_absEtaIntervalD(), ECALBounds::crack_absEtaIntervalE(), edm::isNotFinite(), and TauTagTools::propagTrackECALSurfContactPoint().

{
   if (ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_){
      // optional selection : ask for small |deta| between direction of propag. leading Track - ECAL inner surf. contact point and direction of highest Et hit among HCAL hits inside a 3x3 calo. tower matrix centered on direction of propag. leading Track - ECAL inner surf. contact point
      if (edm::isNotFinite((*theCaloTauRef).leadTrackHCAL3x3hottesthitDEta()) || (*theCaloTauRef).leadTrackHCAL3x3hottesthitDEta()>maxleadTrackHCAL3x3hottesthitDEta_) return 0.;
   }
   if (ApplyCut_leadTrackavoidsECALcrack_){
      // optional selection : ask that leading track - ECAL inner surface contact point does not fall inside any ECAL eta crack 
      math::XYZPoint thepropagleadTrackECALSurfContactPoint = TauTagTools::propagTrackECALSurfContactPoint(theMagneticField.product(),(*theCaloTauRef).leadTrack());
      if(thepropagleadTrackECALSurfContactPoint.R()==0. ||
            fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalA().second || 
            (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalB().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalB().second) ||
            (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalC().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalC().second) ||
            (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalD().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalD().second) ||
            (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalE().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalE().second))
      {
         return 0.;
      }     
   }
   if (edm::isNotFinite((*theCaloTauRef).leadTrackHCAL3x3hitsEtSum()))
   {
      return 0.;
   } else
   {
      if ((*theCaloTauRef).leadTrackHCAL3x3hitsEtSum()/(*theCaloTauRef).leadTrack()->pt()<=leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_) return 0.;
      else return 1.;
   }
}

Member Data Documentation

Definition at line 35 of file CaloRecoTauDiscriminationAgainstElectron.cc.

Definition at line 33 of file CaloRecoTauDiscriminationAgainstElectron.cc.

Definition at line 31 of file CaloRecoTauDiscriminationAgainstElectron.cc.

Definition at line 32 of file CaloRecoTauDiscriminationAgainstElectron.cc.

Definition at line 34 of file CaloRecoTauDiscriminationAgainstElectron.cc.

Definition at line 30 of file CaloRecoTauDiscriminationAgainstElectron.cc.