CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 dxy
 
def dxy_approx
 
def dz
 
def mvaId
 
def relIso
 
def relIsoR
 
def zImpact
 

Public Attributes

 tau
 

Detailed Description

Definition at line 10 of file Tau.py.

Constructor & Destructor Documentation

def Tau.Tau.__init__ (   self,
  tau 
)

Definition at line 12 of file Tau.py.

12 
13  def __init__(self, tau):
14  self.tau = tau
15  super(Tau, self).__init__(tau)
tau
Definition: Tau.py:13
def __init__
Definition: Tau.py:12

Member Function Documentation

def Tau.Tau.__str__ (   self)

Definition at line 65 of file Tau.py.

References dnn_inputs_2017v1.decayMode, reco::PFTau.decayMode(), pat::Tau.decayMode(), and join().

65 
66  def __str__(self):
67  lep = super(Tau, self).__str__()
68  spec = '\t\tTau: decay = {decMode:<15}'.format(
69  decMode = tauDecayModes.intToName(self.decayMode())
70  )
71  return '\n'.join([lep, spec])
72 
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def __str__
Definition: Tau.py:65
def Tau.Tau.dxy (   self,
  vertex = None 
)
More precise dxy calculation as pre-calculated in the tau object
for the primary vertex it was constructed with.
Returns standard dxy calculation if the passed vertex differs from the
one in the tau object.

Definition at line 37 of file Tau.py.

References funct.abs(), Electron.Electron.associatedVertex, reco::tau::RecoTauVertexAssociator.associatedVertex(), Tau.Tau.dxy_approx(), ParticleFlux::flux.vertex, TrimmedVertexFitter.vertex(), ScoutingParticle.vertex(), KinematicVertexFactory.vertex(), TrackClassFilter::Input.vertex, TrackRefitter.vertex, CosmicParametersDefinerForTP.vertex(), AbstractConfFitter.vertex(), ConfigurableVertexFitter.vertex(), GsfTrackRefitter.vertex, VertexFitter< N >.vertex(), VertexFitter< 5 >.vertex(), VertexFitter< 6 >.vertex(), EcalSimPhotonMCTruth.vertex(), AdaptiveGsfVertexFitter.vertex(), PhotonMCTruth.vertex(), FSimDisplacedVertex.vertex(), GsfVertexFitter.vertex(), Cone.vertex(), KalmanVertexFitter.vertex(), ParametersDefinerForTP.vertex(), pat::VertexAssociation.vertex(), reco::ForwardProton.vertex(), reco::NuclearInteraction.vertex(), reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX >::VertexData.vertex, CTPPSFastTrack.vertex(), tauImpactParameter::LorentzVectorParticle.vertex(), AdaptiveVertexFitter.vertex(), FSimTrack.vertex(), BPHDecayVertex.vertex(), FastHelix.vertex(), Run3ScoutingParticle.vertex(), CaloPoint::DistanceToVertex.vertex, SimpleConeBounds.vertex(), SequentialVertexFitter< 5 >.vertex(), SequentialVertexFitter< N >.vertex(), FBaseSimEvent.vertex(), reco::MuonSimInfo.vertex, reco::Candidate.vertex(), reco::PFCluster.vertex(), VertexFitterResult.vertex, reco::Particle.vertex(), HGCalClusterT< C >.vertex(), CandidateWithRef< Ref >.vertex(), reco::LeafCandidate.vertex(), reco::ParticleState.vertex(), TrackingParticle.vertex(), RawParticle.vertex(), reco::TrackBase.vertex(), pat::PackedGenParticle.vertex(), reco::PFCandidate.vertex(), ntupleDataFormat.Track.vertex(), pat::PackedCandidate.vertex(), and PEcalValidInfo.vertex().

Referenced by ntupleDataFormat.Track.dxyPull().

37 
38  def dxy(self, vertex=None):
39  '''More precise dxy calculation as pre-calculated in the tau object
40  for the primary vertex it was constructed with.
41  Returns standard dxy calculation if the passed vertex differs from the
42  one in the tau object.
43  '''
44  if vertex is None:
45  vertex = self.associatedVertex
46  # x/y/z are directly saved in the tau object instead of a reference to
47  # the PV
48  if abs(vertex.z() == self.vertex().z()) < 0.0001:
49  return self.physObj.dxy()
50  else:
51  return self.dxy_approx(vertex)
def dxy
Definition: Tau.py:37
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def dxy_approx
Definition: Tau.py:28
def Tau.Tau.dxy_approx (   self,
  vertex = None 
)
Returns standard dxy for an arbitrary passed vertex

Definition at line 28 of file Tau.py.

References Electron.Electron.associatedVertex, reco::tau::RecoTauVertexAssociator.associatedVertex(), reco::PFTau.leadChargedHadrCand(), pat::Tau.leadChargedHadrCand(), CondFormats_CTPPSPixelObjects::dictionary.p4, reco::V0Candidate.p4, reco::RecoCaloTowerCandidate.p4, reco::Electron.p4, reco::CaloRecHitCandidate.p4, reco::CandidateWithRef< Ref >.p4, CandidateWithRef< Ref >.p4, reco::RecoCandidate.p4, reco::PUSubMETCandInfo.p4(), InvariantMassFromVertex.p4(), ResonanceBuilder.Resonance.p4(), ParticleLevelProducer.p4(), CondFormats_SiPixelObjects::dictionary.p4, MuScleFitMuon.p4(), tauImpactParameter::LorentzVectorParticle.p4(), SiPixelLAHarvest::fitResults.p4, reco::Candidate.p4(), Primary4DVertexValidation::simPrimaryVertex.p4, TopDecaySubset.p4(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.p4, CaloParticle.p4(), reco::Particle.p4(), SimCluster.p4(), BPHKinematicFit.p4(), reco::MuonSimInfo.p4, TrackingParticle.p4(), reco::ParticleState.p4(), HGCalClusterT< C >.p4(), reco::LeafCandidate.p4(), egHLT::OffPho.p4(), reco::tau::RecoTauConstructor.p4(), egHLT::OffEle.p4(), CaloTower.p4(), pat::PackedGenParticle.p4(), reco::Vertex.p4(), L1CaloJetProducer::simpleL1obj.p4, reco::Photon.p4(), Electron.Electron.p4(), pat::PackedCandidate.p4(), and reco::GsfElectron.p4().

Referenced by Tau.Tau.dxy().

28 
29  def dxy_approx(self, vertex=None):
30  '''Returns standard dxy for an arbitrary passed vertex'''
31  if vertex is None:
32  vertex = self.associatedVertex
33  vtx = self.leadChargedHadrCand().vertex()
34  p4 = self.p4()
35  return ( - (vtx.x()-vertex.position().x()) * p4.y()
36  + (vtx.y()-vertex.position().y()) * p4.x() ) / p4.pt()
def dxy_approx
Definition: Tau.py:28
def Tau.Tau.dz (   self,
  vertex = None 
)

Definition at line 52 of file Tau.py.

References Electron.Electron.associatedVertex, reco::tau::RecoTauVertexAssociator.associatedVertex(), reco::PFTau.leadChargedHadrCand(), pat::Tau.leadChargedHadrCand(), CondFormats_CTPPSPixelObjects::dictionary.p4, reco::V0Candidate.p4, reco::RecoCaloTowerCandidate.p4, reco::Electron.p4, reco::CaloRecHitCandidate.p4, reco::CandidateWithRef< Ref >.p4, CandidateWithRef< Ref >.p4, reco::RecoCandidate.p4, reco::PUSubMETCandInfo.p4(), InvariantMassFromVertex.p4(), ResonanceBuilder.Resonance.p4(), ParticleLevelProducer.p4(), CondFormats_SiPixelObjects::dictionary.p4, MuScleFitMuon.p4(), tauImpactParameter::LorentzVectorParticle.p4(), SiPixelLAHarvest::fitResults.p4, reco::Candidate.p4(), Primary4DVertexValidation::simPrimaryVertex.p4, TopDecaySubset.p4(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.p4, CaloParticle.p4(), reco::Particle.p4(), SimCluster.p4(), BPHKinematicFit.p4(), reco::MuonSimInfo.p4, TrackingParticle.p4(), reco::ParticleState.p4(), HGCalClusterT< C >.p4(), reco::LeafCandidate.p4(), egHLT::OffPho.p4(), reco::tau::RecoTauConstructor.p4(), egHLT::OffEle.p4(), CaloTower.p4(), pat::PackedGenParticle.p4(), reco::Vertex.p4(), L1CaloJetProducer::simpleL1obj.p4, reco::Photon.p4(), Electron.Electron.p4(), pat::PackedCandidate.p4(), and reco::GsfElectron.p4().

Referenced by ntupleDataFormat.Track.dzPull().

52 
53  def dz(self, vertex=None):
54  if vertex is None:
55  vertex = self.associatedVertex
56  vtx = self.leadChargedHadrCand().vertex()
57  p4 = self.p4()
58  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()
def dz
Definition: Tau.py:52
def Tau.Tau.mvaId (   self)
For a transparent treatment of electrons, muons and taus. Returns -99

Definition at line 24 of file Tau.py.

24 
25  def mvaId(self):
26  '''For a transparent treatment of electrons, muons and taus. Returns -99'''
27  return -99
def mvaId
Definition: Tau.py:24
def Tau.Tau.relIso (   self,
  dBetaFactor = 0,
  allCharged = 0 
)
Just making the tau behave as a lepton, with dummy parameters.

Definition at line 16 of file Tau.py.

16 
17  def relIso(self, dBetaFactor=0, allCharged=0):
18  '''Just making the tau behave as a lepton, with dummy parameters.'''
19  return -1
def relIso
Definition: Tau.py:16
def Tau.Tau.relIsoR (   self,
  R = 0.3,
  dBetaFactor = 0,
  allCharged = 0 
)
Just making the tau behave as a lepton, with dummy parameters.

Definition at line 20 of file Tau.py.

20 
21  def relIsoR(self, R=0.3, dBetaFactor=0, allCharged=0):
22  '''Just making the tau behave as a lepton, with dummy parameters.'''
23  return -1
def relIsoR
Definition: Tau.py:20
def Tau.Tau.zImpact (   self,
  vertex = None 
)
z impact at ECAL surface

Definition at line 59 of file Tau.py.

References Electron.Electron.associatedVertex, reco::tau::RecoTauVertexAssociator.associatedVertex(), L1TkMuMantraDF::track_df.theta, TwoBodyDecayParameters.theta, res::HelperMET.theta(), TwoBodyDecayDerivatives.theta, res::HelperElectron.theta(), res::HelperMuon.theta(), res::HelperJet.theta(), l1t::EMTFPtLUT.theta, L1TkMuMantraDF::muon_df.theta, reco::isodeposit::Direction.theta(), DDHCalEndcapModuleAlgo::HcalEndcapPar.theta, DDHCalTestBeamAlgo.theta, DDTrackerLinear.theta, DDHCalTBZposAlgo.theta, HcalBarrelAlgo.theta, DDHCalTBCableAlgo.theta, reco::CaloMuon.theta(), tmtt::TP.theta(), l1t::emtf::RPC.theta, reco::GhostTrackPrediction.theta(), PerigeeTrajectoryParameters.theta(), HCalEndcapModuleAlgo::HcalEndcapPar.theta, tmtt::TrackerModule.theta(), TtFullHadSignalSel.theta(), Geom::Spherical2Cartesian< T >.theta(), Thrust::ThetaPhi.theta, ValidationMisalignedTracker.theta, Vector3DBase< U, Frame >.theta(), PV3DBase< float, VectorTag, LocalTag >.theta(), PV3DBase< float, PointTag, LocalTag >.theta(), PV3DBase< Scalar, VectorTag, GlobalTag >.theta(), PV3DBase< T, PointTag, GlobalTag >.theta(), PV3DBase< T, VectorTag, FrameTag >.theta(), PV3DBase< Scalar, PointTag, GlobalTag >.theta(), PV3DBase< T, PointTag, FrameTag >.theta(), PV3DBase< align::Scalar, PointTag, GlobalTag >.theta(), PV3DBase< long double, PointTag, GlobalTag >.theta(), Point3DBase< U, LocalTag >.theta(), Vector3DBase< U, LocalTag >.theta(), Point3DBase< U, GlobalTag >.theta(), Vector3DBase< U, GlobalTag >.theta(), Point3DBase< U, FrameTag >.theta(), Vector3DBase< U, FrameTag >.theta(), Point3DBase< T, Frame >.theta(), Vector3DBase< T, Frame >.theta(), Point3DBase< U, Frame >.theta(), Vector3DBase< T, FrameTag >.theta(), Vector3DBase< float, GlobalTag >.theta(), PV3DBase< float, PointTag, GlobalTag >.theta(), Vector3DBase< double, LocalTag >.theta(), PV3DBase< T, PVType, FrameType >.theta(), EcalTrapezoidParameters.theta(), DDTrap.theta(), mkfit::TrackState.theta(), reco::Candidate.theta(), tmtt::Stub.theta(), VectorHit.theta(), reco::PFCluster.theta(), Basic3DVector< long double >.theta(), tmtt::KFTrackletTrack.theta(), reco::Particle.theta(), SingleParticleEvent.theta(), TrackStruct::TrackParameterStruct.theta, CaloParticle.theta(), Basic3DVector< float >.theta(), Basic3DVector< Scalar >.theta(), Basic3DVector< align::Scalar >.theta(), Basic3DVector< float > seedCentre float.theta(), Basic3DVector< U >.theta(), Basic3DVector< double >.theta(), Basic3DVector< float > mom GlobalVector.theta(), Basic3DVector< float > constituentCentre Basic3DVector< float >.theta(), Basic3DVector< float > tcCentre float.theta(), Basic3DVector< float > pos GlobalPoint.theta(), Basic3DVector< float > seedCentre.theta(), Basic3DVector< T >.theta(), reco::ParticleState.theta(), SimCluster.theta(), CandidateWithRef< Ref >.theta(), reco::LeafCandidate.theta(), HGCalClusterT< C >.theta(), DDHCalBarrelAlgo.theta, TrackingParticle.theta(), tmtt::L1track3D.theta(), mkfit::TrackBase.theta(), CosmicRateAnalyzer.theta, reco::TrackBase.theta(), RawParticle.theta(), l1t::EMTFTrack.theta, tmtt::L1fittedTrack.theta(), pat::PackedGenParticle.theta(), l1t::EMTFHit.theta, DDParallelepiped.theta(), and pat::PackedCandidate.theta().

59 
60  def zImpact(self, vertex=None):
61  '''z impact at ECAL surface'''
62  if vertex is None:
63  vertex = self.associatedVertex
64  return vertex.z() + 130./math.tan(self.theta())
def zImpact
Definition: Tau.py:59

Member Data Documentation

Tau.Tau.tau

Definition at line 13 of file Tau.py.

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