CMS 3D CMS Logo

CaloRecoTauDiscriminationAgainstElectron Class Reference

#include <RecoTauTag/RecoTau/interface/CaloRecoTauDiscriminationAgainstElectron.h>

Inheritance diagram for CaloRecoTauDiscriminationAgainstElectron:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 CaloRecoTauDiscriminationAgainstElectron (const ParameterSet &iConfig)
virtual void produce (Event &, const EventSetup &)
 ~CaloRecoTauDiscriminationAgainstElectron ()

Private Attributes

bool ApplyCut_leadTrackavoidsECALcrack_
bool ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_
string CaloTauProducer_
double leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_
double maxleadTrackHCAL3x3hottesthitDEta_


Detailed Description

Definition at line 29 of file CaloRecoTauDiscriminationAgainstElectron.h.


Constructor & Destructor Documentation

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

Definition at line 31 of file CaloRecoTauDiscriminationAgainstElectron.h.

References ApplyCut_leadTrackavoidsECALcrack_, ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_, CaloTauProducer_, edm::ParameterSet::getParameter(), leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_, and maxleadTrackHCAL3x3hottesthitDEta_.

00031                                                                                 {   
00032     CaloTauProducer_                            = iConfig.getParameter<string>("CaloTauProducer");
00033     leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_  = iConfig.getParameter<double>("leadTrack_HCAL3x3hitsEtSumOverPt_minvalue");  
00034     ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_ = iConfig.getParameter<bool>("ApplyCut_maxleadTrackHCAL3x3hottesthitDEta");
00035     maxleadTrackHCAL3x3hottesthitDEta_          = iConfig.getParameter<double>("maxleadTrackHCAL3x3hottesthitDEta");
00036     ApplyCut_leadTrackavoidsECALcrack_          = iConfig.getParameter<bool>("ApplyCut_leadTrackavoidsECALcrack");
00037     
00038     produces<CaloTauDiscriminator>();
00039   }

CaloRecoTauDiscriminationAgainstElectron::~CaloRecoTauDiscriminationAgainstElectron (  )  [inline]

Definition at line 40 of file CaloRecoTauDiscriminationAgainstElectron.h.

00040 {} 


Member Function Documentation

void CaloRecoTauDiscriminationAgainstElectron::produce ( Event iEvent,
const EventSetup iEventSetup 
) [virtual]

Implements edm::EDProducer.

Definition at line 3 of file CaloRecoTauDiscriminationAgainstElectron.cc.

References ApplyCut_leadTrackavoidsECALcrack_, ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_, CaloTauProducer_, ECALBounds::crack_absEtaIntervalA(), ECALBounds::crack_absEtaIntervalB(), ECALBounds::crack_absEtaIntervalC(), ECALBounds::crack_absEtaIntervalD(), ECALBounds::crack_absEtaIntervalE(), edm::EventSetup::get(), edm::Event::getByLabel(), edm::isnan(), leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_, maxleadTrackHCAL3x3hottesthitDEta_, edm::ESHandle< T >::product(), TauTagTools::propagTrackECALSurfContactPoint(), and edm::Event::put().

00003                                                                                                  {
00004   Handle<CaloTauCollection> theCaloTauCollection;
00005   iEvent.getByLabel(CaloTauProducer_,theCaloTauCollection);
00006 
00007   // fill the AssociationVector object
00008   auto_ptr<CaloTauDiscriminator> theCaloTauDiscriminatorAgainstElectron(new CaloTauDiscriminator(CaloTauRefProd(theCaloTauCollection)));
00009 
00010   for(size_t iCaloTau=0;iCaloTau<theCaloTauCollection->size();++iCaloTau) {
00011     CaloTauRef theCaloTauRef(theCaloTauCollection,iCaloTau);
00012     if (!(*theCaloTauRef).leadTrack()){
00013       theCaloTauDiscriminatorAgainstElectron->setValue(iCaloTau,0);
00014       continue;
00015     }
00016     if (ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_){
00017       // 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
00018       if (isnan((*theCaloTauRef).leadTrackHCAL3x3hottesthitDEta()) || (*theCaloTauRef).leadTrackHCAL3x3hottesthitDEta()>maxleadTrackHCAL3x3hottesthitDEta_){
00019         theCaloTauDiscriminatorAgainstElectron->setValue(iCaloTau,0);
00020         continue;
00021       }
00022     }
00023     if (ApplyCut_leadTrackavoidsECALcrack_){
00024       // optional selection : ask that leading track - ECAL inner surface contact point does not fall inside any ECAL eta crack 
00025       ESHandle<MagneticField> theMagneticField;
00026       iEventSetup.get<IdealMagneticFieldRecord>().get(theMagneticField);
00027       math::XYZPoint thepropagleadTrackECALSurfContactPoint=TauTagTools::propagTrackECALSurfContactPoint(theMagneticField.product(),(*theCaloTauRef).leadTrack());
00028       if(thepropagleadTrackECALSurfContactPoint.R()==0. ||
00029          fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalA().second || 
00030          (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalB().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalB().second) ||
00031          (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalC().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalC().second) ||
00032          (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalD().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalD().second) ||
00033          (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalE().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalE().second)
00034          ){
00035         theCaloTauDiscriminatorAgainstElectron->setValue(iCaloTau,0);
00036         continue;
00037       }     
00038     }
00039     if (isnan((*theCaloTauRef).leadTrackHCAL3x3hitsEtSum())){
00040       theCaloTauDiscriminatorAgainstElectron->setValue(iCaloTau,0);
00041     }else{
00042       if ((*theCaloTauRef).leadTrackHCAL3x3hitsEtSum()/(*theCaloTauRef).leadTrack()->pt()<=leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_) theCaloTauDiscriminatorAgainstElectron->setValue(iCaloTau,0);
00043       else theCaloTauDiscriminatorAgainstElectron->setValue(iCaloTau,1);
00044     }
00045   }
00046    
00047   iEvent.put(theCaloTauDiscriminatorAgainstElectron);
00048 }


Member Data Documentation

bool CaloRecoTauDiscriminationAgainstElectron::ApplyCut_leadTrackavoidsECALcrack_ [private]

Definition at line 47 of file CaloRecoTauDiscriminationAgainstElectron.h.

Referenced by CaloRecoTauDiscriminationAgainstElectron(), and produce().

bool CaloRecoTauDiscriminationAgainstElectron::ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_ [private]

Definition at line 45 of file CaloRecoTauDiscriminationAgainstElectron.h.

Referenced by CaloRecoTauDiscriminationAgainstElectron(), and produce().

string CaloRecoTauDiscriminationAgainstElectron::CaloTauProducer_ [private]

Definition at line 43 of file CaloRecoTauDiscriminationAgainstElectron.h.

Referenced by CaloRecoTauDiscriminationAgainstElectron(), and produce().

double CaloRecoTauDiscriminationAgainstElectron::leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_ [private]

Definition at line 44 of file CaloRecoTauDiscriminationAgainstElectron.h.

Referenced by CaloRecoTauDiscriminationAgainstElectron(), and produce().

double CaloRecoTauDiscriminationAgainstElectron::maxleadTrackHCAL3x3hottesthitDEta_ [private]

Definition at line 46 of file CaloRecoTauDiscriminationAgainstElectron.h.

Referenced by CaloRecoTauDiscriminationAgainstElectron(), and produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:15:51 2009 for CMSSW by  doxygen 1.5.4