CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CaloRecoTauDiscriminationAgainstElectron Class Reference
Inheritance diagram for CaloRecoTauDiscriminationAgainstElectron:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
 CaloRecoTauDiscriminationAgainstElectron (const edm::ParameterSet &iConfig)
 
double discriminate (const CaloTauRef &theCaloTauRef) override
 
 ~CaloRecoTauDiscriminationAgainstElectron ()
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
virtual double discriminate (const TauRef &tau)=0
 
virtual void endEvent (edm::Event &evt)
 
void produce (edm::Event &, const edm::EventSetup &)
 
 TauDiscriminationProducerBase (const edm::ParameterSet &iConfig)
 
 TauDiscriminationProducerBase ()
 
virtual ~TauDiscriminationProducerBase ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
typedef std::vector< TauType > TauCollection
 
typedef edm::Ref< TauCollectionTauRef
 
typedef edm::RefProd
< TauCollection
TauRefProd
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
std::string moduleLabel_
 
double prediscriminantFailValue_
 
edm::EDGetTokenT< TauCollectionTau_token
 
edm::InputTag TauProducer_
 

Detailed Description

Definition at line 17 of file CaloRecoTauDiscriminationAgainstElectron.cc.

Constructor & Destructor Documentation

CaloRecoTauDiscriminationAgainstElectron::CaloRecoTauDiscriminationAgainstElectron ( const edm::ParameterSet iConfig)
inlineexplicit

Definition at line 19 of file CaloRecoTauDiscriminationAgainstElectron.cc.

References edm::ParameterSet::getParameter().

20  CaloTauProducer_ = iConfig.getParameter<edm::InputTag>("CaloTauProducer");
21  leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_ = iConfig.getParameter<double>("leadTrack_HCAL3x3hitsEtSumOverPt_minvalue");
22  ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_ = iConfig.getParameter<bool>("ApplyCut_maxleadTrackHCAL3x3hottesthitDEta");
23  maxleadTrackHCAL3x3hottesthitDEta_ = iConfig.getParameter<double>("maxleadTrackHCAL3x3hottesthitDEta");
24  ApplyCut_leadTrackavoidsECALcrack_ = iConfig.getParameter<bool>("ApplyCut_leadTrackavoidsECALcrack");
25  }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::CaloTau, reco::CaloTauDiscriminator > CaloTauDiscriminationProducerBase
CaloRecoTauDiscriminationAgainstElectron::~CaloRecoTauDiscriminationAgainstElectron ( )
inline

Definition at line 26 of file CaloRecoTauDiscriminationAgainstElectron.cc.

26 {}

Member Function Documentation

void CaloRecoTauDiscriminationAgainstElectron::beginEvent ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual
double CaloRecoTauDiscriminationAgainstElectron::discriminate ( const CaloTauRef theCaloTauRef)
override

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().

49 {
51  // 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
52  if (edm::isNotFinite((*theCaloTauRef).leadTrackHCAL3x3hottesthitDEta()) || (*theCaloTauRef).leadTrackHCAL3x3hottesthitDEta()>maxleadTrackHCAL3x3hottesthitDEta_) return 0.;
53  }
55  // optional selection : ask that leading track - ECAL inner surface contact point does not fall inside any ECAL eta crack
56  math::XYZPoint thepropagleadTrackECALSurfContactPoint = TauTagTools::propagTrackECALSurfContactPoint(theMagneticField.product(),(*theCaloTauRef).leadTrack());
57  if(thepropagleadTrackECALSurfContactPoint.R()==0. ||
58  fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalA().second ||
59  (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalB().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalB().second) ||
60  (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalC().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalC().second) ||
61  (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalD().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalD().second) ||
62  (fabs(thepropagleadTrackECALSurfContactPoint.eta())>ECALBounds::crack_absEtaIntervalE().first && fabs(thepropagleadTrackECALSurfContactPoint.eta())<ECALBounds::crack_absEtaIntervalE().second))
63  {
64  return 0.;
65  }
66  }
67  if (edm::isNotFinite((*theCaloTauRef).leadTrackHCAL3x3hitsEtSum()))
68  {
69  return 0.;
70  } else
71  {
72  if ((*theCaloTauRef).leadTrackHCAL3x3hitsEtSum()/(*theCaloTauRef).leadTrack()->pt()<=leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_) return 0.;
73  else return 1.;
74  }
75 }
math::XYZPoint propagTrackECALSurfContactPoint(const MagneticField *, reco::TrackRef)
Definition: TauTagTools.cc:184
static std::pair< float, float > crack_absEtaIntervalA()
Definition: ECALBounds.h:30
static std::pair< float, float > crack_absEtaIntervalB()
Definition: ECALBounds.h:31
static std::pair< float, float > crack_absEtaIntervalE()
Definition: ECALBounds.h:34
bool isNotFinite(T x)
Definition: isFinite.h:10
static std::pair< float, float > crack_absEtaIntervalC()
Definition: ECALBounds.h:32
static std::pair< float, float > crack_absEtaIntervalD()
Definition: ECALBounds.h:33
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
T const * product() const
Definition: ESHandle.h:62

Member Data Documentation

bool CaloRecoTauDiscriminationAgainstElectron::ApplyCut_leadTrackavoidsECALcrack_
private

Definition at line 35 of file CaloRecoTauDiscriminationAgainstElectron.cc.

bool CaloRecoTauDiscriminationAgainstElectron::ApplyCut_maxleadTrackHCAL3x3hottesthitDEta_
private

Definition at line 33 of file CaloRecoTauDiscriminationAgainstElectron.cc.

edm::InputTag CaloRecoTauDiscriminationAgainstElectron::CaloTauProducer_
private

Definition at line 31 of file CaloRecoTauDiscriminationAgainstElectron.cc.

double CaloRecoTauDiscriminationAgainstElectron::leadTrack_HCAL3x3hitsEtSumOverPt_minvalue_
private

Definition at line 32 of file CaloRecoTauDiscriminationAgainstElectron.cc.

double CaloRecoTauDiscriminationAgainstElectron::maxleadTrackHCAL3x3hottesthitDEta_
private

Definition at line 34 of file CaloRecoTauDiscriminationAgainstElectron.cc.

edm::ESHandle<MagneticField> CaloRecoTauDiscriminationAgainstElectron::theMagneticField
private

Definition at line 30 of file CaloRecoTauDiscriminationAgainstElectron.cc.