CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions
tauImpactParameter::TrackTools Class Reference

#include <TrackTools.h>

Public Member Functions

 TrackTools ()
 
virtual ~TrackTools ()
 

Static Public Member Functions

static LorentzVectorParticle lorentzParticleAtPosition (const TrackParticle &p, const TVector3 &v)
 
static TVector3 propagateToXPosition (const TrackParticle &p, double x)
 
static TVector3 propagateToYPosition (const TrackParticle &p, double y)
 
static TVector3 propagateToZPosition (const TrackParticle &p, double z)
 

Detailed Description

Definition at line 18 of file TrackTools.h.

Constructor & Destructor Documentation

tauImpactParameter::TrackTools::TrackTools ( )
inline

Definition at line 20 of file TrackTools.h.

20 {};
virtual tauImpactParameter::TrackTools::~TrackTools ( )
inlinevirtual

Definition at line 21 of file TrackTools.h.

21 {};

Member Function Documentation

LorentzVectorParticle TrackTools::lorentzParticleAtPosition ( const TrackParticle p,
const TVector3 &  v 
)
static

Definition at line 53 of file TrackTools.cc.

References tauImpactParameter::Particle::bField(), tauImpactParameter::TrackHelixVertexFitter::BField0, tauImpactParameter::Particle::charge(), tauImpactParameter::TrackHelixVertexFitter::computeLorentzVectorPar(), tauImpactParameter::TrackParticle::kappa, tauImpactParameter::TrackHelixVertexFitter::kappa0, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::TrackHelixVertexFitter::lambda0, tauImpactParameter::TrackParticle::mass(), tauImpactParameter::TrackHelixVertexFitter::MassOffSet, tauImpactParameter::TrackHelixVertexFitter::NExtraPar, tauImpactParameter::TrackHelixVertexFitter::NFreeTrackPar, tauImpactParameter::Particle::parameter(), tauImpactParameter::Particle::pdgId(), tauImpactParameter::TrackParticle::phi, tauImpactParameter::TrackHelixVertexFitter::phi0, tauImpactParameter::ErrorMatrixPropagator::propagateError(), tauImpactParameter::TrackHelixVertexFitter::x0, tauImpactParameter::TrackHelixVertexFitter::y0, and tauImpactParameter::TrackHelixVertexFitter::z0.

54 {
57  FreePar(TrackHelixVertexFitter::x0)=v.X();
58  FreePar(TrackHelixVertexFitter::y0)=v.Y();
59  FreePar(TrackHelixVertexFitter::z0)=v.Z();
65  TVectorT<double> LVPar=TrackHelixVertexFitter::computeLorentzVectorPar(FreePar);
67  return LorentzVectorParticle(LVPar,LVCov,p.pdgId(),p.charge(),p.bField());
68 }
virtual int pdgId() const
Definition: Particle.h:28
virtual double charge() const
Definition: Particle.h:29
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
virtual double parameter(int i) const
Definition: Particle.h:24
virtual double mass() const
Definition: TrackParticle.h:24
virtual double bField() const
Definition: Particle.h:26
static TMatrixTSym< double > propagateError(std::function< TVectorT< double >(const TVectorT< double > &)> f, const TVectorT< double > &inPar, TMatrixTSym< double > &inCov, double epsilon=0.001, double errorEpsilonRatio=1000)
TVector3 TrackTools::propagateToXPosition ( const TrackParticle p,
double  x 
)
static

Definition at line 13 of file TrackTools.cc.

References funct::cos(), tauImpactParameter::TrackParticle::dxy, tauImpactParameter::TrackParticle::dz, tauImpactParameter::TrackParticle::kappa, kappa, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::Particle::parameter(), tauImpactParameter::TrackParticle::phi, phi(), alignCSCRings::r, alignCSCRings::s, funct::sin(), and funct::tan().

13  {
15  double lam=p.parameter(TrackParticle::lambda);
17  double dxy=p.parameter(TrackParticle::dxy);
18  double dz=p.parameter(TrackParticle::dz);
19  double r=kappa/2.0;
20  double s=(asin((x+(r+dxy)*sin(phi))/r)-phi)/(2*kappa);
21  double y=-r*cos(2.0*s*kappa+phi)+(r+dxy)*cos(phi);
22  double z=dz+s*tan(lam);
23  return TVector3(x,y,z);
24 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
virtual double parameter(int i) const
Definition: Particle.h:24
static const G4double kappa
TVector3 TrackTools::propagateToYPosition ( const TrackParticle p,
double  y 
)
static

Definition at line 26 of file TrackTools.cc.

References funct::cos(), tauImpactParameter::TrackParticle::dxy, tauImpactParameter::TrackParticle::dz, tauImpactParameter::TrackParticle::kappa, kappa, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::Particle::parameter(), tauImpactParameter::TrackParticle::phi, phi(), alignCSCRings::r, alignCSCRings::s, funct::sin(), funct::tan(), and x().

26  {
28  double lam=p.parameter(TrackParticle::lambda);
30  double dxy=p.parameter(TrackParticle::dxy);
31  double dz=p.parameter(TrackParticle::dz);
32  double r=kappa/2.0;
33  double s=(acos(((r+dxy)*cos(phi)-y)/r)-phi)/(2*kappa);
34  double x=r*sin(2.0*s*kappa+phi)-(r+dxy)*sin(phi);
35  double z=dz+s*tan(lam);
36  return TVector3(x,y,z);
37 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
virtual double parameter(int i) const
Definition: Particle.h:24
static const G4double kappa
TVector3 TrackTools::propagateToZPosition ( const TrackParticle p,
double  z 
)
static

Definition at line 39 of file TrackTools.cc.

References funct::cos(), tauImpactParameter::TrackParticle::dxy, tauImpactParameter::TrackParticle::dz, tauImpactParameter::TrackParticle::kappa, kappa, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::Particle::parameter(), tauImpactParameter::TrackParticle::phi, phi(), alignCSCRings::r, alignCSCRings::s, funct::sin(), funct::tan(), and x().

39  {
41  double lam=p.parameter(TrackParticle::lambda);
43  double dxy=p.parameter(TrackParticle::dxy);
44  double dz=p.parameter(TrackParticle::dz);
45  double s=(z-dz)/tan(lam);
46  double r=kappa/2.0;
47  double x=r*sin(2.0*s*kappa+phi)-(r+dxy)*sin(phi);
48  double y=-r*cos(2.0*s*kappa+phi)+(r+dxy)*cos(phi);
49  return TVector3(x,y,z);
50 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
virtual double parameter(int i) const
Definition: Particle.h:24
static const G4double kappa