Belle II Software development
CDCTrajectorySZ Class Reference

Linear trajectory in sz space. More...

#include <CDCTrajectorySZ.h>

Public Member Functions

 CDCTrajectorySZ ()
 Default constructor for ROOT compatibility.
 
 CDCTrajectorySZ (const UncertainSZLine &szLine)
 Constructs the trajectory from the given two dimensional sz line.
 
 CDCTrajectorySZ (const double tanLambda, const double z0)
 Constructs the trajectory with the given slope and start z.
 
double mapSToZ (const double s=0) const
 Translates the travel distance to the z coordinate.
 
double mapPtToPz (const double pt) const
 Translates the absolute value of the transverse momentum to the momentum in z direction.
 
double getZDist (const double s, const double z) const
 Calculates the distance along between the given point at the sz trajectory.
 
double getSZDist (const double s, const double z) const
 Gets the signed distance of the sz point to the line in the sz plane This gives the signed distance of a given point in the sy plane
Errors in s and z are equally weighted in this distance
( which might be an incorrect choice to fit to ).
 
void passiveMoveS (const double deltaS)
 Passively Shift the s coordinate by the amount given.
 
bool isFitted () const
 Indicates if the line has been fitted.
 
void clear ()
 Clears all information from this trajectory line.
 
double getTanLambda () const
 Getter for the slope over the travel distance coordinate.
 
double getZ0 () const
 Getter for the z coordinate at zero travel distance.
 
double getPValue () const
 Getter for p-value.
 
double getChi2 () const
 Getter for the chi square value of the line fit.
 
void setChi2 (const double chi2)
 Setter for the chi square value of the line fit.
 
size_t getNDF () const
 Getter for the number of degrees of freedom of the line fit.
 
void setNDF (std::size_t ndf)
 Setter for the number of degrees of freedom of the line fit.
 
const UncertainSZLinegetSZLine () const
 Getter for the line in sz space.
 
void setSZLine (const UncertainSZLine &szLine)
 Setter for the line in sz space.
 

Static Public Member Functions

static SZCovariance getBasicSZCovariance ()
 Getter for a default assumption about the parameter covariances.
 
static CDCTrajectorySZ basicAssumption ()
 Constructs a basic assumption, what the z0 start position and the sz slope are, including some broad values for the covariance matrix.
 

Private Attributes

UncertainSZLine m_szLine
 Memory for the line representation.
 

Detailed Description

Linear trajectory in sz space.

Particle trajectories have a linear dependence between the travel distance s and
the z coordinate as the magnetic fields along z does not disturb the free z movement.
This class presents this trajectory projection by a line representation in sz space. The s coordinate is interpreted as the transvers travel distance, hence
the part of the travel distance see in the xy projection.

Definition at line 31 of file CDCTrajectorySZ.h.

Constructor & Destructor Documentation

◆ CDCTrajectorySZ() [1/3]

CDCTrajectorySZ ( )
inline

Default constructor for ROOT compatibility.

Definition at line 39 of file CDCTrajectorySZ.h.

39{}

◆ CDCTrajectorySZ() [2/3]

CDCTrajectorySZ ( const UncertainSZLine szLine)
inlineexplicit

Constructs the trajectory from the given two dimensional sz line.

Definition at line 42 of file CDCTrajectorySZ.h.

43 : m_szLine(szLine)
44 {}
UncertainSZLine m_szLine
Memory for the line representation.

◆ CDCTrajectorySZ() [3/3]

CDCTrajectorySZ ( const double  tanLambda,
const double  z0 
)
inline

Constructs the trajectory with the given slope and start z.

Definition at line 47 of file CDCTrajectorySZ.h.

48 : m_szLine(tanLambda, z0, getBasicSZCovariance())
49 {}
static SZCovariance getBasicSZCovariance()
Getter for a default assumption about the parameter covariances.

Member Function Documentation

◆ basicAssumption()

CDCTrajectorySZ basicAssumption ( )
static

Constructs a basic assumption, what the z0 start position and the sz slope are, including some broad values for the covariance matrix.

Definition at line 27 of file CDCTrajectorySZ.cc.

28{
29 // A dummy line with no increasing z coordinate
30 double tanLambda = 0.0;
31 double z0 = 0.0;
32 SZCovariance szCovariance = getBasicSZCovariance();
33 UncertainSZLine uncertainSZLine(tanLambda, z0, szCovariance);
34 CDCTrajectorySZ trajectorySZ(uncertainSZLine);
35 return trajectorySZ;
36}
Linear trajectory in sz space.
A matrix implementation to be used as an interface typ through out the track finder.
Definition: PlainMatrix.h:40
A line in sz where s is the transverse travel distance as seen in the xy projection with uncertaintie...

◆ clear()

void clear ( )
inline

Clears all information from this trajectory line.

Definition at line 100 of file CDCTrajectorySZ.h.

101 { m_szLine.invalidate(); }
void invalidate()
Sets all line parameters to zero including the covariance matrix.

◆ getBasicSZCovariance()

SZCovariance getBasicSZCovariance ( )
static

Getter for a default assumption about the parameter covariances.

Definition at line 15 of file CDCTrajectorySZ.cc.

16{
17 // Dummy error estimates
18 SZCovariance szCovariance;
19 using namespace NSZParameterIndices;
20 szCovariance(c_TanL, c_TanL) = 2.0; // Error in pz double the error in pt, good estimate?
21 szCovariance(c_Z0, c_TanL) = 0.0;
22 szCovariance(c_TanL, c_Z0) = 0.0;
23 szCovariance(c_Z0, c_Z0) = 2.0;
24 return szCovariance;
25}

◆ getChi2()

double getChi2 ( ) const
inline

Getter for the chi square value of the line fit.

Definition at line 116 of file CDCTrajectorySZ.h.

117 { return getSZLine().chi2(); }
const UncertainSZLine & getSZLine() const
Getter for the line in sz space.
double chi2() const
Getter for the chi square value of the line fit.

◆ getNDF()

size_t getNDF ( ) const
inline

Getter for the number of degrees of freedom of the line fit.

Definition at line 124 of file CDCTrajectorySZ.h.

125 { return getSZLine().ndf(); }
std::size_t ndf() const
Getter for the number of degrees of freediom used in the line fit.

◆ getPValue()

double getPValue ( ) const
inline

Getter for p-value.

Definition at line 112 of file CDCTrajectorySZ.h.

113 { return TMath::Prob(getChi2(), getNDF()); }
double getChi2() const
Getter for the chi square value of the line fit.
size_t getNDF() const
Getter for the number of degrees of freedom of the line fit.

◆ getSZDist()

double getSZDist ( const double  s,
const double  z 
) const
inline

Gets the signed distance of the sz point to the line in the sz plane This gives the signed distance of a given point in the sy plane
Errors in s and z are equally weighted in this distance
( which might be an incorrect choice to fit to ).

The plus sign mean the point is below the line. For minus it is above. The later is naturally chosen as the direction of positive advance is
coalined with the s axes

Definition at line 80 of file CDCTrajectorySZ.h.

81 { return getSZLine()->distance(Vector2D(s, z)) ; }
double distance(const Vector2D &szPoint) const
Calculates the signed distance of the point to the line.
Definition: SZLine.h:165

◆ getSZLine()

const UncertainSZLine & getSZLine ( ) const
inline

Getter for the line in sz space.

Definition at line 132 of file CDCTrajectorySZ.h.

133 { return m_szLine; }

◆ getTanLambda()

double getTanLambda ( ) const
inline

Getter for the slope over the travel distance coordinate.

Definition at line 104 of file CDCTrajectorySZ.h.

105 { return getSZLine()->slope(); }
double slope() const
Getter for the slope in the sz space which is equivalent to tan lambda.
Definition: SZLine.h:58

◆ getZ0()

double getZ0 ( ) const
inline

Getter for the z coordinate at zero travel distance.

Definition at line 108 of file CDCTrajectorySZ.h.

109 { return getSZLine()->intercept(); }
double intercept() const
Getter for the intercept in the sz space which is equivalent to z0.
Definition: SZLine.h:88

◆ getZDist()

double getZDist ( const double  s,
const double  z 
) const
inline

Calculates the distance along between the given point at the sz trajectory.

Definition at line 68 of file CDCTrajectorySZ.h.

69 { return mapSToZ(s) - z; }
double mapSToZ(const double s=0) const
Translates the travel distance to the z coordinate.

◆ isFitted()

bool isFitted ( ) const
inline

Indicates if the line has been fitted.

Definition at line 96 of file CDCTrajectorySZ.h.

97 { return not m_szLine->isInvalid(); }
bool isInvalid() const
Indicates if the line parameters do not represent a valid line.
Definition: SZLine.h:142

◆ mapPtToPz()

double mapPtToPz ( const double  pt) const
inline

Translates the absolute value of the transverse momentum to the momentum in z direction.

Scales the absolute value of the transverse momentum to the z component of the momentum vector. The z component comes with the correct sign as reflected by increasing or decreasing z component. Note : This assumes s to be the transverse travel distance.

Definition at line 64 of file CDCTrajectorySZ.h.

65 { return getSZLine()->slope() * pt; }

◆ mapSToZ()

double mapSToZ ( const double  s = 0) const
inline

Translates the travel distance to the z coordinate.

Definition at line 55 of file CDCTrajectorySZ.h.

56 { return getSZLine()->map(s); }
double map(double s) const
Maps the two dimensional arc length s to z.
Definition: SZLine.h:116

◆ passiveMoveS()

void passiveMoveS ( const double  deltaS)
inline

Passively Shift the s coordinate by the amount given.

Adjust all transverse travel distance measurements by deltaS.
The old values of s before the shift corresponds the new scale
like old_s - deltaS = new_s. This corresponds to an passive transformation
of s by deltaS. This can be used in conjunction with the return value of
CDCTrajectory2D::setStartPos2D() in order to move the transverse travel distance
by the same amount in both trajectories.

Definition at line 92 of file CDCTrajectorySZ.h.

93 { m_szLine.passiveMoveBy(Vector2D(deltaS, 0)); }
void passiveMoveBy(const Vector2D &bySZ)
Moves the coordinate system by the vector by and calculates the new sz line and its covariance matrix...

◆ setChi2()

void setChi2 ( const double  chi2)
inline

Setter for the chi square value of the line fit.

Definition at line 120 of file CDCTrajectorySZ.h.

121 { return m_szLine.setChi2(chi2); }
void setChi2(const double chi2)
Setter for the chi square value of the line fit.

◆ setNDF()

void setNDF ( std::size_t  ndf)
inline

Setter for the number of degrees of freedom of the line fit.

Definition at line 128 of file CDCTrajectorySZ.h.

129 { return m_szLine.setNDF(ndf); }
void setNDF(std::size_t ndf)
Setter for the number of degrees of freediom used in the line fit.

◆ setSZLine()

void setSZLine ( const UncertainSZLine szLine)
inline

Setter for the line in sz space.

Definition at line 136 of file CDCTrajectorySZ.h.

137 { m_szLine = szLine; }

Member Data Documentation

◆ m_szLine

UncertainSZLine m_szLine
private

Memory for the line representation.

Definition at line 141 of file CDCTrajectorySZ.h.


The documentation for this class was generated from the following files: