CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
Tau.Tau Class Reference
Inheritance diagram for Tau.Tau:

Public Member Functions

def __init__ (self, tau)
 
def __str__ (self)
 
def dxy (self, vertex=None)
 
def dxy_approx (self, vertex=None)
 
def dz (self, vertex=None)
 
def mvaId (self)
 
def relIso (self, dBetaFactor=0, allCharged=0)
 
def relIsoR (self, R=0.3, dBetaFactor=0, allCharged=0)
 
def zImpact (self, vertex=None)
 

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  def __init__(self, tau):
13  self.tau = tau
14  super(Tau, self).__init__(tau)
15 
def __init__(self, tau)
Definition: Tau.py:12
tau
Definition: Tau.py:13

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  def __str__(self):
66  lep = super(Tau, self).__str__()
67  spec = '\t\tTau: decay = {decMode:<15}'.format(
68  decMode = tauDecayModes.intToName(self.decayMode())
69  )
70  return '\n'.join([lep, spec])
71 
72 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def __str__(self)
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(), CosmicParametersDefinerForTP.vertex(), ParticleFlux::flux.vertex, TrimmedVertexFitter.vertex(), ScoutingParticle.vertex(), TrackRefitter.vertex, TrackClassFilter::Input.vertex, GsfTrackRefitter.vertex, KinematicVertexFactory.vertex(), AbstractConfFitter.vertex(), ConfigurableVertexFitter.vertex(), VertexFitter< N >.vertex(), EcalSimPhotonMCTruth.vertex(), VertexFitter< 5 >.vertex(), VertexFitter< 6 >.vertex(), CTPPSFastTrack.vertex(), tauImpactParameter::LorentzVectorParticle.vertex(), ParametersDefinerForTP.vertex(), PhotonMCTruth.vertex(), AdaptiveGsfVertexFitter.vertex(), FSimDisplacedVertex.vertex(), pat::VertexAssociation.vertex(), GsfVertexFitter.vertex(), reco::NuclearInteraction.vertex(), SoftPFElectronTagInfoProducer.vertex, Cone.vertex(), FSimTrack.vertex(), reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX >::VertexData.vertex, KalmanVertexFitter.vertex(), AdaptiveVertexFitter.vertex(), BPHDecayVertex.vertex(), FastHelix.vertex(), SimpleConeBounds.vertex(), CaloPoint::DistanceToVertex.vertex, reco::MuonSimInfo.vertex, SequentialVertexFitter< 5 >.vertex(), SequentialVertexFitter< N >.vertex(), FBaseSimEvent.vertex(), reco::Candidate.vertex(), VertexFitterResult.vertex, reco::Particle.vertex(), reco::ParticleState.vertex(), reco::PFCluster.vertex(), reco::LeafCandidate.vertex(), CandidateWithRef< Ref >.vertex(), CompositeRefCandidateT< reco::GenParticleRefVector >.vertex(), HGCalClusterT< C >.vertex(), TrackingParticle.vertex(), RawParticle.vertex(), pat::PackedGenParticle.vertex(), reco::TrackBase.vertex(), reco::PFCandidate.vertex(), pat::PackedCandidate.vertex(), ntupleDataFormat.Track.vertex(), and PEcalValidInfo.vertex().

Referenced by ntupleDataFormat.Track.dxyPull().

37  def dxy(self, vertex=None):
38  '''More precise dxy calculation as pre-calculated in the tau object
39  for the primary vertex it was constructed with.
40  Returns standard dxy calculation if the passed vertex differs from the
41  one in the tau object.
42  '''
43  if vertex is None:
44  vertex = self.associatedVertex
45  # x/y/z are directly saved in the tau object instead of a reference to
46  # the PV
47  if abs(vertex.z() == self.vertex().z()) < 0.0001:
48  return self.physObj.dxy()
49  else:
50  return self.dxy_approx(vertex)
51 
def dxy(self, vertex=None)
Definition: Tau.py:37
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def dxy_approx(self, vertex=None)
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(), pat::Tau.leadChargedHadrCand(), CondFormats_CTPPSPixelObjects::dictionary.p4, ParticleLevelProducer.p4(), ResonanceBuilder.Resonance.p4(), reco::PUSubMETCandInfo.p4(), InvariantMassFromVertex.p4(), CondFormats_SiPixelObjects::dictionary.p4, tauImpactParameter::LorentzVectorParticle.p4(), MuScleFitMuon.p4(), reco::Candidate.p4(), reco::Particle.p4(), reco::ParticleState.p4(), BPHKinematicFit.p4(), TopDecaySubset.p4(), CaloParticle.p4(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.p4, SimCluster.p4(), p4, reco::MuonSimInfo.p4, CompositeRefCandidateT< reco::GenParticleRefVector >.p4(), HGCalClusterT< C >.p4(), reco::LeafCandidate.p4(), CandidateWithRef< Ref >.p4(), TrackingParticle.p4(), egHLT::OffPho.p4(), egHLT::OffEle.p4(), CaloTower.p4(), reco::tau::RecoTauConstructor.p4(), pat::PackedGenParticle.p4(), reco::Vertex.p4(), reco::Photon.p4(), pat::PackedCandidate.p4(), Electron.Electron.p4(), and reco::GsfElectron.p4().

Referenced by Tau.Tau.dxy().

28  def dxy_approx(self, vertex=None):
29  '''Returns standard dxy for an arbitrary passed vertex'''
30  if vertex is None:
31  vertex = self.associatedVertex
32  vtx = self.leadChargedHadrCand().vertex()
33  p4 = self.p4()
34  return ( - (vtx.x()-vertex.position().x()) * p4.y()
35  + (vtx.y()-vertex.position().y()) * p4.x() ) / p4.pt()
36 
def dxy_approx(self, vertex=None)
Definition: Tau.py:28
def Tau.Tau.dz (   self,
  vertex = None 
)
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  def mvaId(self):
25  '''For a transparent treatment of electrons, muons and taus. Returns -99'''
26  return -99
27 
def mvaId(self)
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  def relIso(self, dBetaFactor=0, allCharged=0):
17  '''Just making the tau behave as a lepton, with dummy parameters.'''
18  return -1
19 
def relIso(self, dBetaFactor=0, allCharged=0)
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  def relIsoR(self, R=0.3, dBetaFactor=0, allCharged=0):
21  '''Just making the tau behave as a lepton, with dummy parameters.'''
22  return -1
23 
def relIsoR(self, R=0.3, dBetaFactor=0, allCharged=0)
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(), res::HelperMET.theta(), DDHCalEndcapModuleAlgo::HcalEndcapPar.theta, l1t::EMTFPtLUT.theta, res::HelperElectron.theta(), res::HelperMuon.theta(), TwoBodyDecayDerivatives.theta, TwoBodyDecayParameters.theta, res::HelperJet.theta(), DDHCalTBZposAlgo.theta, DDHCalTestBeamAlgo.theta, DDTrackerLinear.theta, DDHCalTBCableAlgo.theta, reco::isodeposit::Direction.theta(), TtFullHadSignalSel.theta(), reco::CaloMuon.theta(), l1t::emtf::RPC.theta, reco::GhostTrackPrediction.theta(), PerigeeTrajectoryParameters.theta(), ValidationMisalignedTracker.theta, Thrust::ThetaPhi.theta, Geom::Spherical2Cartesian< T >.theta(), Point3DBase< U, GlobalTag >.theta(), Vector3DBase< T, Frame >.theta(), PV3DBase< T, PointTag, FrameTag >.theta(), PV3DBase< float, VectorTag, GlobalTag >.theta(), Vector3DBase< U, GlobalTag >.theta(), Vector3DBase< U, FrameTag >.theta(), Vector3DBase< T, FrameTag >.theta(), Vector3DBase< U, Frame >.theta(), Point3DBase< U, Frame >.theta(), Point3DBase< U, FrameTag >.theta(), Vector3DBase< double, LocalTag >.theta(), PV3DBase< float, VectorTag, LocalTag >.theta(), PV3DBase< float, VectorTag, MeasurementTag >.theta(), PV3DBase< Scalar, VectorTag, GlobalTag >.theta(), PV3DBase< T, VectorTag, FrameTag >.theta(), PV3DBase< T, PVType, FrameType >.theta(), Point3DBase< T, Frame >.theta(), Point3DBase< Scalar, LocalTag >.theta(), Point3DBase< U, LocalTag >.theta(), Vector3DBase< U, LocalTag >.theta(), EcalTrapezoidParameters.theta(), DDTrap.theta(), SingleParticleEvent.theta(), TrackStruct::TrackParameterStruct.theta, reco::Candidate.theta(), reco::Particle.theta(), reco::ParticleState.theta(), DDHCalBarrelAlgo.theta, Basic3DVector< long double >.theta(), HGCalClusterT< C >.theta(), reco::LeafCandidate.theta(), CompositeRefCandidateT< reco::GenParticleRefVector >.theta(), CandidateWithRef< Ref >.theta(), Basic3DVector< float >.theta(), Basic3DVector< Scalar >.theta(), Basic3DVector< align::Scalar >.theta(), reco::PFCluster.theta(), Basic3DVector< U >.theta(), Basic3DVector< double >.theta(), Basic3DVector< float > pos GlobalPoint.theta(), Basic3DVector< float > constituentCentre Basic3DVector< float >.theta(), Basic3DVector< float > tcCentre float.theta(), Basic3DVector< T >.theta(), Basic3DVector< float > seedCentre float.theta(), Basic3DVector< float > seedCentre.theta(), Basic3DVector< float > mom GlobalVector.theta(), CosmicRateAnalyzer.theta, CaloParticle.theta(), SimCluster.theta(), TrackingParticle.theta(), l1t::EMTFTrack.theta, pat::PackedGenParticle.theta(), reco::TrackBase.theta(), l1t::EMTFHit.theta, pat::PackedCandidate.theta(), and DDParallelepiped.theta().

59  def zImpact(self, vertex=None):
60  '''z impact at ECAL surface'''
61  if vertex is None:
62  vertex = self.associatedVertex
63  return vertex.z() + 130./math.tan(self.theta())
64 
def zImpact(self, vertex=None)
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().