CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
Tau.Tau Class Reference
Inheritance diagram for Tau.Tau:

Public Member Functions

def __init__
 
def __str__
 
def calcEOverP
 
def dxy
 
def dz
 
def electronMVA3Medium
 
def mvaId
 
def relIso
 
def zImpact
 

Public Attributes

 eOverP
 
 leadChargedEnergy
 
 leadChargedMomentum
 
 tau
 

Detailed Description

Definition at line 7 of file Tau.py.

Constructor & Destructor Documentation

def Tau.Tau.__init__ (   self,
  tau 
)

Definition at line 9 of file Tau.py.

9 
10  def __init__(self, tau):
11  self.tau = tau
12  super(Tau, self).__init__(tau)
13  self.eOverP = None
tau
Definition: Tau.py:10
eOverP
Definition: Tau.py:12
def __init__
Definition: Tau.py:9

Member Function Documentation

def Tau.Tau.__str__ (   self)

Definition at line 54 of file Tau.py.

54 
55  def __str__(self):
56  lep = super(Tau, self).__str__()
57  return lep
58  #spec = '\t\tTau: decay = {decMode:<15}, eOverP = {eOverP:4.2f}, isoMVALoose = {isoMVALoose}'.format(
59  # decMode = tauDecayModes.intToName( self.decayMode() ),
60  # eOverP = self.calcEOverP(),
61  # isoMVALoose = self.tauID('byLooseIsoMVA')
62  # )
63  #return '\n'.join([lep, spec])
def __str__
Definition: Tau.py:54
def Tau.Tau.calcEOverP (   self)

Definition at line 15 of file Tau.py.

References Tau.Tau.eOverP, and egHLT::BinData.eOverP.

15 
16  def calcEOverP(self):
17  if self.eOverP is not None:
18  return self.eOverP
19  self.leadChargedEnergy = self.tau.leadChargedHadrEcalEnergy() \
20  + self.tau.leadChargedHadrHcalEnergy()
21  # self.leadChargedMomentum = self.tau.leadChargedHadrPt() / math.sin(self.tau.theta())
22  self.leadChargedMomentum = self.tau.leadPFChargedHadrCand().energy()
24  return self.eOverP
def calcEOverP
Definition: Tau.py:15
eOverP
Definition: Tau.py:12
leadChargedMomentum
Definition: Tau.py:21
leadChargedEnergy
Definition: Tau.py:18
def Tau.Tau.dxy (   self,
  vertex = None 
)

Definition at line 33 of file Tau.py.

References Electron.Electron.associatedVertex, reco::tau::RecoTauVertexAssociator.associatedVertex(), CondFormats_SiPixelObjects::dictionary.p4, InvariantMassFromVertex.p4(), lhef::JetClustering::Jet.p4(), tauImpactParameter::LorentzVectorParticle.p4(), MuScleFitMuon.p4(), TopDecaySubset.p4(), reco::Particle.p4(), reco::Candidate.p4(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.p4, pat::PackedGenParticle.p4(), LeafRefCandidateT< T >.p4(), reco::LeafRefCandidateT< T >.p4(), @583.p4, pat::PackedCandidate.p4(), TrackingParticle.p4(), PrimaryVertexAnalyzer4PU::simPrimaryVertex.p4, egHLT::OffPho.p4(), CaloTower.p4(), reco::tau::RecoTauConstructor.p4(), egHLT::OffEle.p4(), CandidateWithRef< Ref >.p4(), reco::LeafCandidate.p4(), reco::Vertex.p4(), Electron.Electron.p4(), reco::Photon.p4(), reco::GsfElectron.p4(), CosmicParametersDefinerForTP.vertex(), TrimmedVertexFitter.vertex(), TrackRefitter.vertex, TrackClassFilter::Input.vertex, GsfTrackRefitter.vertex, KineParticleFilter.vertex(), KinematicVertexFactory.vertex(), AbstractConfFitter.vertex(), ConfigurableVertexFitter.vertex(), VertexFitter< N >.vertex(), VertexFitter< 5 >.vertex(), VertexFitter< 6 >.vertex(), EcalSimPhotonMCTruth.vertex(), reco::VZero.vertex(), tauImpactParameter::LorentzVectorParticle.vertex(), ParametersDefinerForTP.vertex(), PhotonMCTruth.vertex(), FSimDisplacedVertex.vertex(), AdaptiveGsfVertexFitter.vertex(), pat::VertexAssociation.vertex(), GsfVertexFitter.vertex(), SoftPFElectronTagInfoProducer.vertex, FSimTrack.vertex(), reco::NuclearInteraction.vertex(), Cone.vertex(), SoftPFMuonTagInfoProducer.vertex, KalmanVertexFitter.vertex(), reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX >::VertexData.vertex, AdaptiveVertexFitter.vertex(), FastHelix.vertex(), SimpleConeBounds.vertex(), CaloPoint::DistanceToVertex.vertex, SequentialVertexFitter< 5 >.vertex(), SequentialVertexFitter< N >.vertex(), reco::Particle.vertex(), FBaseSimEvent.vertex(), reco::Candidate.vertex(), TrackingParticle.vertex(), VertexFitterResult.vertex, FastPixelHitMatcher.vertex, LeafRefCandidateT< T >.vertex(), reco::LeafRefCandidateT< T >.vertex(), reco::PFCluster.vertex(), pat::PackedGenParticle.vertex(), pat::PackedCandidate.vertex(), RawParticle.vertex(), reco::LeafCandidate.vertex(), CandidateWithRef< Ref >.vertex(), reco::TrackBase.vertex(), reco::PFCandidate.vertex(), PEcalValidInfo.vertex(), x, and detailsBasic3DVector.y.

Referenced by HTauTauElectron.HTauTauElectron.__str__().

33 
34  def dxy(self, vertex=None):
35  if vertex is None:
36  vertex = self.associatedVertex
37  vtx = self.vertex() # FIXME
38  p4 = self.p4()
39  return ( - (vtx.x()-vertex.position().x()) * p4.y()
40  + (vtx.y()-vertex.position().y()) * p4.x() ) / p4.pt()
def dxy
Definition: Tau.py:33
Definition: DDAxes.h:10
def Tau.Tau.dz (   self,
  vertex = None 
)

Definition at line 41 of file Tau.py.

References Electron.Electron.associatedVertex, reco::tau::RecoTauVertexAssociator.associatedVertex(), CondFormats_SiPixelObjects::dictionary.p4, InvariantMassFromVertex.p4(), lhef::JetClustering::Jet.p4(), tauImpactParameter::LorentzVectorParticle.p4(), MuScleFitMuon.p4(), TopDecaySubset.p4(), reco::Particle.p4(), reco::Candidate.p4(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.p4, pat::PackedGenParticle.p4(), LeafRefCandidateT< T >.p4(), reco::LeafRefCandidateT< T >.p4(), @583.p4, pat::PackedCandidate.p4(), TrackingParticle.p4(), PrimaryVertexAnalyzer4PU::simPrimaryVertex.p4, egHLT::OffPho.p4(), CaloTower.p4(), reco::tau::RecoTauConstructor.p4(), egHLT::OffEle.p4(), CandidateWithRef< Ref >.p4(), reco::LeafCandidate.p4(), reco::Vertex.p4(), Electron.Electron.p4(), reco::Photon.p4(), reco::GsfElectron.p4(), CosmicParametersDefinerForTP.vertex(), TrimmedVertexFitter.vertex(), TrackRefitter.vertex, GsfTrackRefitter.vertex, TrackClassFilter::Input.vertex, KineParticleFilter.vertex(), KinematicVertexFactory.vertex(), AbstractConfFitter.vertex(), ConfigurableVertexFitter.vertex(), VertexFitter< N >.vertex(), VertexFitter< 5 >.vertex(), VertexFitter< 6 >.vertex(), EcalSimPhotonMCTruth.vertex(), reco::VZero.vertex(), tauImpactParameter::LorentzVectorParticle.vertex(), ParametersDefinerForTP.vertex(), PhotonMCTruth.vertex(), FSimDisplacedVertex.vertex(), AdaptiveGsfVertexFitter.vertex(), pat::VertexAssociation.vertex(), GsfVertexFitter.vertex(), SoftPFElectronTagInfoProducer.vertex, reco::NuclearInteraction.vertex(), FSimTrack.vertex(), Cone.vertex(), KalmanVertexFitter.vertex(), SoftPFMuonTagInfoProducer.vertex, reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX >::VertexData.vertex, AdaptiveVertexFitter.vertex(), FastHelix.vertex(), SimpleConeBounds.vertex(), CaloPoint::DistanceToVertex.vertex, SequentialVertexFitter< 5 >.vertex(), SequentialVertexFitter< N >.vertex(), reco::Particle.vertex(), FBaseSimEvent.vertex(), reco::Candidate.vertex(), TrackingParticle.vertex(), VertexFitterResult.vertex, FastPixelHitMatcher.vertex, LeafRefCandidateT< T >.vertex(), reco::LeafRefCandidateT< T >.vertex(), reco::PFCluster.vertex(), pat::PackedGenParticle.vertex(), pat::PackedCandidate.vertex(), RawParticle.vertex(), reco::LeafCandidate.vertex(), CandidateWithRef< Ref >.vertex(), reco::TrackBase.vertex(), reco::PFCandidate.vertex(), PEcalValidInfo.vertex(), x, detailsBasic3DVector.y, and detailsBasic3DVector.z.

Referenced by HTauTauElectron.HTauTauElectron.__str__(), and HTauTauElectron.HTauTauElectron.looseIdForEleTau().

41 
42  def dz(self, vertex=None):
43  if vertex is None:
44  vertex = self.associatedVertex
45  vtx = self.vertex() # FIXME
46  p4 = self.p4()
47  return (vtx.z()-vertex.position().z()) - ((vtx.x()-vertex.position().x())*p4.x()+(vtx.y()-vertex.position().y())*p4.y())/ p4.pt() * p4.z()/ p4.pt()
float float float z
def dz
Definition: Tau.py:41
Definition: DDAxes.h:10
def Tau.Tau.electronMVA3Medium (   self)
Custom electron MVA 3 medium WP used for H->tau tau

Definition at line 64 of file Tau.py.

References objects.TauAnalyzer.TauAnalyzer.tauID, and pat::Tau.tauID().

64 
65  def electronMVA3Medium(self):
66  '''Custom electron MVA 3 medium WP used for H->tau tau'''
67  icat = int(round(self.tauID('againstElectronMVA3category')))
68  if icat < 0:
69  return False
70  elif icat > 15:
71  return True
72 
73  rawMVA = self.tauID('againstElectronMVA3raw')
74  return rawMVA > cutsElectronMVA3Medium[icat]
75 
def electronMVA3Medium
Definition: Tau.py:64
def Tau.Tau.mvaId (   self)
For a transparent treatment of electrons, muons and taus. Returns -99

Definition at line 29 of file Tau.py.

29 
30  def mvaId(self):
31  '''For a transparent treatment of electrons, muons and taus. Returns -99'''
32  return -99
def mvaId
Definition: Tau.py:29
def Tau.Tau.relIso (   self,
  dummy1,
  dummy2 
)
Just making the tau behave as a lepton.

Definition at line 25 of file Tau.py.

25 
26  def relIso(self, dummy1, dummy2):
27  '''Just making the tau behave as a lepton.'''
28  return -1
def relIso
Definition: Tau.py:25
def Tau.Tau.zImpact (   self,
  vertex = None 
)
z impact at ECAL surface

Definition at line 48 of file Tau.py.

References Electron.Electron.associatedVertex, reco::tau::RecoTauVertexAssociator.associatedVertex(), res::HelperMET.theta(), res::HelperElectron.theta(), res::HelperMuon.theta(), res::HelperJet.theta(), TwoBodyDecayDerivatives.theta, TwoBodyDecayParameters.theta, DDHCalTBZposAlgo.theta, DDHCalTestBeamAlgo.theta, DDPixBarStackLinear.theta, DDPixBarStackLinearGap.theta, DDTrackerLinear.theta, DDHCalTBCableAlgo.theta, reco::isodeposit::Direction.theta(), TtFullHadSignalSel.theta(), lhef::JetClustering::Jet.theta(), reco::CaloMuon.theta(), reco::GhostTrackPrediction.theta(), PerigeeTrajectoryParameters.theta(), Thrust::ThetaPhi.theta, Geom::Spherical2Cartesian< T >.theta(), ValidationMisalignedTracker.theta, PV3DBase< float, PointTag, GlobalTag >.theta(), PV3DBase< T, VectorTag, FrameTag >.theta(), Point3DBase< U, GlobalTag >.theta(), Point3DBase< T, Frame >.theta(), Vector3DBase< U, GlobalTag >.theta(), PV3DBase< float, VectorTag, MeasurementTag >.theta(), Vector3DBase< U, FrameTag >.theta(), Vector3DBase< U, Frame >.theta(), Vector3DBase< T, Frame >.theta(), Point3DBase< U, Frame >.theta(), Vector3DBase< T, FrameTag >.theta(), Vector3DBase< double, LocalTag >.theta(), PV3DBase< T, PVType, FrameType >.theta(), PV3DBase< float, VectorTag, LocalTag >.theta(), PV3DBase< float, PointTag, LocalTag >.theta(), PV3DBase< Scalar, PointTag, GlobalTag >.theta(), PV3DBase< float, PointTag, MeasurementTag >.theta(), PV3DBase< Scalar, VectorTag, GlobalTag >.theta(), PV3DBase< T, PointTag, GlobalTag >.theta(), Point3DBase< U, FrameTag >.theta(), PV3DBase< float, VectorTag, GlobalTag >.theta(), Vector3DBase< U, LocalTag >.theta(), PV3DBase< T, PointTag, FrameTag >.theta(), PV3DBase< align::Scalar, PointTag, GlobalTag >.theta(), PV3DBase< long double, PointTag, GlobalTag >.theta(), Point3DBase< U, LocalTag >.theta(), DDTrap.theta(), reco::Particle.theta(), SingleParticleEvent.theta(), EcalTrapezoidParameters.theta(), reco::Candidate.theta(), TrackingParticle.theta(), DDHCalBarrelAlgo.theta, reco::LeafRefCandidateT< T >.theta(), LeafRefCandidateT< T >.theta(), pat::PackedGenParticle.theta(), Basic3DVector< long double >.theta(), pat::PackedCandidate.theta(), reco::PFCluster.theta(), Basic3DVector< T >.theta(), Basic3DVector< float >.theta(), Basic3DVector< float > pos GlobalPoint.theta(), Basic3DVector< align::Scalar >.theta(), Basic3DVector< float > mom GlobalVector.theta(), Basic3DVector< Scalar >.theta(), Basic3DVector< double >.theta(), Basic3DVector< U >.theta(), reco::TrackBase.theta(), reco::LeafCandidate.theta(), CandidateWithRef< Ref >.theta(), and DDParallelepiped.theta().

48 
49  def zImpact(self, vertex=None):
50  '''z impact at ECAL surface'''
51  if vertex is None:
52  vertex = self.associatedVertex
53  return vertex.z() + 130./math.tan(self.theta())
def zImpact
Definition: Tau.py:48

Member Data Documentation

Tau.Tau.eOverP

Definition at line 12 of file Tau.py.

Referenced by Tau.Tau.calcEOverP().

Tau.Tau.leadChargedEnergy

Definition at line 18 of file Tau.py.

Tau.Tau.leadChargedMomentum

Definition at line 21 of file Tau.py.

Tau.Tau.tau

Definition at line 10 of file Tau.py.

Referenced by DiObject.TauMuon.leg1(), DiObject.TauElectron.leg1(), and DiObject.TauTau.leg1().