CMS 3D CMS Logo

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

◆ TrackTools()

tauImpactParameter::TrackTools::TrackTools ( )
inline

Definition at line 20 of file TrackTools.h.

20 {};

◆ ~TrackTools()

virtual tauImpactParameter::TrackTools::~TrackTools ( )
inlinevirtual

Definition at line 21 of file TrackTools.h.

21 {};

Member Function Documentation

◆ lorentzParticleAtPosition()

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

Definition at line 52 of file TrackTools.cc.

References tauImpactParameter::TrackHelixVertexFitter::BField0, tauImpactParameter::TrackHelixVertexFitter::computeLorentzVectorPar(), tauImpactParameter::TrackParticle::kappa, tauImpactParameter::TrackHelixVertexFitter::kappa0, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::TrackHelixVertexFitter::lambda0, tauImpactParameter::TrackHelixVertexFitter::MassOffSet, tauImpactParameter::TrackHelixVertexFitter::NExtraPar, tauImpactParameter::TrackHelixVertexFitter::NFreeTrackPar, AlCaHLTBitMon_ParallelJobs::p, tauImpactParameter::TrackParticle::phi, tauImpactParameter::TrackHelixVertexFitter::phi0, tauImpactParameter::ErrorMatrixPropagator::propagateError(), findQualityFiles::v, tauImpactParameter::TrackHelixVertexFitter::x0, tauImpactParameter::TrackHelixVertexFitter::y0, and tauImpactParameter::TrackHelixVertexFitter::z0.

52  {
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);
66  TMatrixTSym<double> LVCov =
68  return LorentzVectorParticle(LVPar, LVCov, p.pdgId(), p.charge(), p.bField());
69 }
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
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)

◆ propagateToXPosition()

TVector3 TrackTools::propagateToXPosition ( const TrackParticle p,
double  x 
)
static

Definition at line 13 of file TrackTools.cc.

References funct::cos(), tauImpactParameter::TrackParticle::dxy, PVValHelper::dxy, tauImpactParameter::TrackParticle::dz, PVValHelper::dz, tauImpactParameter::TrackParticle::kappa, hgcalLayerClusters_cfi::kappa, tauImpactParameter::TrackParticle::lambda, AlCaHLTBitMon_ParallelJobs::p, tauImpactParameter::TrackParticle::phi, alignCSCRings::r, alignCSCRings::s, funct::sin(), funct::tan(), and x.

13  {
14  double kappa = p.parameter(TrackParticle::kappa);
15  double lam = p.parameter(TrackParticle::lambda);
16  double phi = p.parameter(TrackParticle::phi);
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

◆ propagateToYPosition()

TVector3 TrackTools::propagateToYPosition ( const TrackParticle p,
double  y 
)
static

Definition at line 26 of file TrackTools.cc.

References funct::cos(), tauImpactParameter::TrackParticle::dxy, PVValHelper::dxy, tauImpactParameter::TrackParticle::dz, PVValHelper::dz, tauImpactParameter::TrackParticle::kappa, hgcalLayerClusters_cfi::kappa, tauImpactParameter::TrackParticle::lambda, AlCaHLTBitMon_ParallelJobs::p, tauImpactParameter::TrackParticle::phi, alignCSCRings::r, alignCSCRings::s, funct::sin(), funct::tan(), and x.

26  {
27  double kappa = p.parameter(TrackParticle::kappa);
28  double lam = p.parameter(TrackParticle::lambda);
29  double phi = p.parameter(TrackParticle::phi);
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

◆ propagateToZPosition()

TVector3 TrackTools::propagateToZPosition ( const TrackParticle p,
double  z 
)
static

Definition at line 39 of file TrackTools.cc.

References funct::cos(), tauImpactParameter::TrackParticle::dxy, PVValHelper::dxy, tauImpactParameter::TrackParticle::dz, PVValHelper::dz, tauImpactParameter::TrackParticle::kappa, hgcalLayerClusters_cfi::kappa, tauImpactParameter::TrackParticle::lambda, AlCaHLTBitMon_ParallelJobs::p, tauImpactParameter::TrackParticle::phi, alignCSCRings::r, alignCSCRings::s, funct::sin(), funct::tan(), and x.

39  {
40  double kappa = p.parameter(TrackParticle::kappa);
41  double lam = p.parameter(TrackParticle::lambda);
42  double phi = p.parameter(TrackParticle::phi);
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