Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoTauTag
ImpactParameter
src
TrackTools.cc
Go to the documentation of this file.
1
/* From SimpleFits Package
2
* Designed an written by
3
* author: Ian M. Nugent
4
* Humboldt Foundations
5
*/
6
#include "
RecoTauTag/ImpactParameter/interface/TrackTools.h
"
7
#include "
RecoTauTag/ImpactParameter/interface/TrackHelixVertexFitter.h
"
8
#include "
math.h
"
9
#include <iostream>
10
11
using namespace
tauImpactParameter;
12
13
TVector3
TrackTools::propagateToXPosition
(
const
TrackParticle
&
p
,
double
x
){
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
}
25
26
TVector3
TrackTools::propagateToYPosition
(
const
TrackParticle
&
p
,
double
y
){
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
}
38
39
TVector3
TrackTools::propagateToZPosition
(
const
TrackParticle
&
p
,
double
z
){
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
}
51
52
53
LorentzVectorParticle
TrackTools::lorentzParticleAtPosition
(
const
TrackParticle
&
p
,
const
TVector3&
v
)
54
{
55
TVectorT<double> FreePar(
TrackHelixVertexFitter::NFreeTrackPar
+
TrackHelixVertexFitter::NExtraPar
+
TrackHelixVertexFitter::MassOffSet
);
56
TMatrixTSym<double> FreeParCov(
TrackHelixVertexFitter::NFreeTrackPar
+
TrackHelixVertexFitter::NExtraPar
+
TrackHelixVertexFitter::MassOffSet
);
57
FreePar(
TrackHelixVertexFitter::x0
)=v.X();
58
FreePar(
TrackHelixVertexFitter::y0
)=v.Y();
59
FreePar(
TrackHelixVertexFitter::z0
)=v.Z();
60
FreePar(
TrackHelixVertexFitter::kappa0
)=p.
parameter
(
TrackParticle::kappa
);
61
FreePar(
TrackHelixVertexFitter::lambda0
)=p.
parameter
(
TrackParticle::lambda
);
62
FreePar(
TrackHelixVertexFitter::phi0
)=p.
parameter
(
TrackParticle::phi
);
63
FreePar(
TrackHelixVertexFitter::NFreeTrackPar
+
TrackHelixVertexFitter::MassOffSet
)=p.
mass
();
64
FreePar(
TrackHelixVertexFitter::NFreeTrackPar
+
TrackHelixVertexFitter::BField0
)=p.
bField
();
65
TVectorT<double> LVPar=
TrackHelixVertexFitter::computeLorentzVectorPar
(FreePar);
66
TMatrixTSym<double> LVCov=
ErrorMatrixPropagator::propagateError
(&
TrackHelixVertexFitter::computeLorentzVectorPar
,FreePar,FreeParCov);
67
return
LorentzVectorParticle
(LVPar,LVCov,p.
pdgId
(),p.
charge
(),p.
bField
());
68
}
69
70
math.h
tauImpactParameter::TrackHelixVertexFitter::kappa0
Definition:
TrackHelixVertexFitter.h:27
tauImpactParameter::TrackTools::lorentzParticleAtPosition
static LorentzVectorParticle lorentzParticleAtPosition(const TrackParticle &p, const TVector3 &v)
Definition:
TrackTools.cc:53
tauImpactParameter::TrackParticle::lambda
Definition:
TrackParticle.h:17
tauImpactParameter::TrackParticle::phi
Definition:
TrackParticle.h:17
tauImpactParameter::TrackParticle
Definition:
TrackParticle.h:15
tauImpactParameter::Particle::pdgId
virtual int pdgId() const
Definition:
Particle.h:28
funct::sin
Sin< T >::type sin(const T &t)
Definition:
Sin.h:22
tauImpactParameter::TrackHelixVertexFitter::phi0
Definition:
TrackHelixVertexFitter.h:27
tauImpactParameter::TrackTools::propagateToYPosition
static TVector3 propagateToYPosition(const TrackParticle &p, double y)
Definition:
TrackTools.cc:26
findQualityFiles.v
v
Definition:
findQualityFiles.py:177
tauImpactParameter::TrackHelixVertexFitter::x0
Definition:
TrackHelixVertexFitter.h:26
detailsBasic3DVector::z
float float float z
Definition:
extBasic3DVector.h:15
tauImpactParameter::TrackHelixVertexFitter::BField0
Definition:
TrackHelixVertexFitter.h:28
tauImpactParameter::TrackHelixVertexFitter::NExtraPar
Definition:
TrackHelixVertexFitter.h:28
tauImpactParameter::Particle::charge
virtual double charge() const
Definition:
Particle.h:29
tauImpactParameter::TrackHelixVertexFitter::lambda0
Definition:
TrackHelixVertexFitter.h:27
tauImpactParameter::TrackHelixVertexFitter::computeLorentzVectorPar
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
Definition:
TrackHelixVertexFitter.cc:177
funct::cos
Cos< T >::type cos(const T &t)
Definition:
Cos.h:22
funct::tan
Tan< T >::type tan(const T &t)
Definition:
Tan.h:22
tauImpactParameter::TrackTools::propagateToXPosition
static TVector3 propagateToXPosition(const TrackParticle &p, double x)
Definition:
TrackTools.cc:13
tauImpactParameter::TrackParticle::kappa
Definition:
TrackParticle.h:17
tauImpactParameter::TrackParticle::dxy
Definition:
TrackParticle.h:17
tauImpactParameter::TrackTools::propagateToZPosition
static TVector3 propagateToZPosition(const TrackParticle &p, double z)
Definition:
TrackTools.cc:39
tauImpactParameter::Particle::parameter
virtual double parameter(int i) const
Definition:
Particle.h:24
tauImpactParameter::TrackHelixVertexFitter::MassOffSet
Definition:
TrackHelixVertexFitter.h:28
tauImpactParameter::TrackParticle::mass
virtual double mass() const
Definition:
TrackParticle.h:24
tauImpactParameter::TrackHelixVertexFitter::NFreeTrackPar
Definition:
TrackHelixVertexFitter.h:27
detailsBasic3DVector::y
float float y
Definition:
extBasic3DVector.h:15
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
tauImpactParameter::TrackParticle::dz
Definition:
TrackParticle.h:17
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
tauImpactParameter::TrackHelixVertexFitter::y0
Definition:
TrackHelixVertexFitter.h:26
TrackHelixVertexFitter.h
tauImpactParameter::Particle::bField
virtual double bField() const
Definition:
Particle.h:26
TrackTools.h
tauImpactParameter::TrackHelixVertexFitter::z0
Definition:
TrackHelixVertexFitter.h:26
alignCSCRings.r
list r
Definition:
alignCSCRings.py:92
kappa
static const G4double kappa
Definition:
UrbanMscModel93.cc:72
x
Definition:
DDAxes.h:10
tauImpactParameter::LorentzVectorParticle
Definition:
LorentzVectorParticle.h:17
tauImpactParameter::ErrorMatrixPropagator::propagateError
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)
Definition:
ErrorMatrixPropagator.cc:12
phi
Definition:
DDAxes.h:10
Generated for CMSSW Reference Manual by
1.8.5