PandaRoot
PndSTETools Class Reference

#include <PndSTETools.h>

Inheritance diagram for PndSTETools:
PndSTETrackBase PndSTESettings

Public Member Functions

 PndSTETools ()
 
virtual ~PndSTETools ()
 
double GetDistanceToTrack (PndRiemannTrack mvdRiemannTrack, PndSdsHit *mvdHit)
 A function that returns the distance between a MVD hit and the Riemann track. More...
 
double GetDistanceToTrackRiemannHit (PndRiemannTrack mvdRiemannTrack, PndRiemannHit hit)
 A function that returns the distance between a Riemann hit and the Riemann track. More...
 
PndRiemannTrack CompareError (PndRiemannTrack oldRiemannTrack, PndRiemannTrack newRiemannTrack)
 Function to compare the error between two Riemann tracks between two steps of the iterations. More...
 
bool NewTrackHasSmallestError ()
 Funtion returning the value of fNewTrack. Can be used in other classes to determine which Riemann track to use in the continued tracking. More...
 
bool IsHitInTrack (PndSdsHit *mvdHit, PndTrackCand trackCand)
 Function to examine if a specific hit has already been included in a track. More...
 
void CalcSlope (PndTrack *track)
 Function to calculate the slope of the line defining the hemisphere surface. More...
 
double GetLineSlope ()
 Function returning the value of the line slope for a track. More...
 
std::vector< PndSdsHit * > RefitRiemannTrack (PndRiemannTrack riemannTrack, std::vector< PndSdsHit *> mvdHits)
 Function that refits the Riemann track with a set of MVD hits. More...
 
void DrawTracks (bool val)
 Function for choosing to draw the tracks with hits. More...
 
void CalcChi2 (PndRiemannTrack riemannTrack, std::vector< PndSdsHit *> mvdHitVector)
 Function to calculate the chi2 of a Riemann track with MVD hits. More...
 
void CalcChi2SZ (PndRiemannTrack riemannTrack, std::vector< PndSdsHit *> mvdHitVector)
 Function to calculate the chi2 of a Riemann track with MVD hits in SZ plane. More...
 
void CalcResidual (PndRiemannTrack track, std::vector< PndSdsHit *> mvdHitVec)
 Function that calculates the residuals (distances) between the track and the hits in SZ space. More...
 
bool IsHitInCorrectHemisphere (PndSdsHit *myHit, double xc, double lineSlope)
 Function to test if the MVD hit is in the same hemisphere as the Center-of-Gravity of the STT hits in the track. More...
 
- Public Member Functions inherited from PndSTETrackBase
 PndSTETrackBase ()
 
virtual ~PndSTETrackBase ()
 
PndTrack GetTrack (int i)
 Function to get a track after the refit. More...
 
PndTrackCand GetTrackCand (int i)
 Function to get a track candidate after the refit. More...
 
PndRiemannTrack GetRiemannTrack (int i)
 Function to get a Riemann track after the refit. More...
 
int NumTrackCands ()
 Function to get the number of track candidates after the refit. More...
 
int NumRiemannTracks ()
 Function to get the number of Riemann tracks after the refit. More...
 
- Public Member Functions inherited from PndSTESettings
 PndSTESettings ()
 
virtual ~PndSTESettings ()
 
void SetMagneticField ()
 Function to set the magnetic field strength. More...
 
double GetMagneticField ()
 
void IncludeDetector (bool includeMvd, bool includeGem, bool includeBtof)
 Function to choose which detectors to include. More...
 
void SetMvdHitDist (Double_t val)
 Function to set the maximum allowed distance of closest approach between the MVD hit and the track. More...
 
void SetGemHitDist (Double_t val)
 Function to set the maximum allowed distance of closest approach between the GEM hit and the track. More...
 
void SetBtofHitDist (Double_t val)
 Function to set the maximum allowed distance of closest approach between the BTOF hit and the track. More...
 
void SetUseHelix (Bool_t val)
 Function to set ia a helix extrapolation should be used in the procedure. More...
 
void SetUseRiemannTrack (Bool_t val)
 Function to set ia a Riemann track should be used in the procedure. More...
 
void SetUseIdealTrack (bool val)
 Function to choose to give an ideal track as input to the MVD hit fiinding. More...
 
void SetRunIn3D (bool val)
 Function to choose if the 2D or 3D function should be used. More...
 
void SetNoAreaExclusion (bool val)
 Function to choose if there is an area exclusion in the Mvd hit inclusion. More...
 
void SetUseHemisphere (bool useHemisphere)
 Function to choose to use the hemispehere method for excluding a certain area of the detector. More...
 
void SetWeightsMvdHit (double weight)
 Function to set the proper weights for the MVD hits for the Riemann fitting procedure. More...
 
void SetDrawTracks (bool val)
 

Additional Inherited Members

- Protected Member Functions inherited from PndSTETrackBase
 ClassDef (PndSTETrackBase, 1)
 
- Protected Member Functions inherited from PndSTESettings
 ClassDef (PndSTESettings, 1)
 
- Protected Attributes inherited from PndSTETrackBase
std::map< PndSdsHit *, int > fMapMvdHitBranchId
 
std::vector< PndTrackCandfTrackCands
 
std::vector< PndTrackfTracks
 
std::vector< PndRiemannTrackfRiemannTracks
 
double fxc
 x-coordinate of the center of gravity of the hits in one track, used for computing hemispheres The x-coordinate but not y-coordinate is not used to test which hemisphere the hit is in More...
 
double fLineSlope = 0
 
std::vector< double > fChi2OneHit
 
double fSumChi2 = 0
 
double fReducedChi2 = 0
 
std::map< double, PndSdsHit * > fMapChi2OneHitMvdHit
 
std::vector< double > fChi2OneHitSZ
 
double fSumChi2SZ = 0
 
double fReducedChi2SZ = 0
 
std::map< double, PndSdsHit * > fMapChi2OneHitMvdHitSZ
 
- Protected Attributes inherited from PndSTESettings
bool fIncludeMvd = false
 
bool fIncludeGem = false
 
bool fIncludeBtof = false
 
double fBz
 
bool fUseHelix = false
 
bool fIdealTrack = false
 
bool fUseRiemann = false
 
bool fRunIn3D = false
 
bool fUseHemisphere = false
 
bool fNoMVDAreaExclusion = false
 
bool fAdjustWeightsMvd = false
 
double fWeightMVD = -1.0
 
double fMvdHitDist = 9999999.0
 
double fGemHitDist = 9999999.0
 
double fBtofHitDist = 9999999.0
 
bool fDrawTrack = false
 

Detailed Description

Definition at line 24 of file PndSTETools.h.

Constructor & Destructor Documentation

◆ PndSTETools()

PndSTETools::PndSTETools ( )
inline

Default Constructor

Definition at line 28 of file PndSTETools.h.

28 {};

◆ ~PndSTETools()

virtual PndSTETools::~PndSTETools ( )
inlinevirtual

Default Destructor

Definition at line 31 of file PndSTETools.h.

References CompareError(), GetDistanceToTrack(), and GetDistanceToTrackRiemannHit().

31 {};

Member Function Documentation

◆ CalcChi2()

void PndSTETools::CalcChi2 ( PndRiemannTrack  riemannTrack,
std::vector< PndSdsHit *>  mvdHitVector 
)

Function to calculate the chi2 of a Riemann track with MVD hits.

Parameters
riemannTrackInput Riemann track for the calculation
mvdHitVectorhits to be added to the track for the calculation

Referenced by DrawTracks().

◆ CalcChi2SZ()

void PndSTETools::CalcChi2SZ ( PndRiemannTrack  riemannTrack,
std::vector< PndSdsHit *>  mvdHitVector 
)

Function to calculate the chi2 of a Riemann track with MVD hits in SZ plane.

Parameters
riemannTrackInput Riemann track for the calculation
mvdHitVectorhits to be added to the track for the calculation

Referenced by DrawTracks().

◆ CalcResidual()

void PndSTETools::CalcResidual ( PndRiemannTrack  track,
std::vector< PndSdsHit *>  mvdHitVec 
)

Function that calculates the residuals (distances) between the track and the hits in SZ space.

Parameters
trackInput Riemann track for the calculation
mvdHitVechits to be added to the track for the calculation

Referenced by DrawTracks().

◆ CalcSlope()

void PndSTETools::CalcSlope ( PndTrack track)

Function to calculate the slope of the line defining the hemisphere surface.

The slope is set within the function and is accessible from other classes

Parameters
trackThe track for which the slope should be calculated

Referenced by NewTrackHasSmallestError().

◆ CompareError()

PndRiemannTrack PndSTETools::CompareError ( PndRiemannTrack  oldRiemannTrack,
PndRiemannTrack  newRiemannTrack 
)

Function to compare the error between two Riemann tracks between two steps of the iterations.

Parameters
oldRiemannTrackRiemann track from iteration i-1 in 3D method for including Mvd hits
newRiemannTrackRiemann track from iteration i in 3D method for including Mvd hits
Returns
Riemann track with smallest error in the radius

Referenced by ~PndSTETools().

◆ DrawTracks()

void PndSTETools::DrawTracks ( bool  val)
inline

Function for choosing to draw the tracks with hits.

Definition at line 88 of file PndSTETools.h.

References CalcChi2(), CalcChi2SZ(), CalcResidual(), and IsHitInCorrectHemisphere().

88 { fDrawTrack = val; };

◆ GetDistanceToTrack()

double PndSTETools::GetDistanceToTrack ( PndRiemannTrack  mvdRiemannTrack,
PndSdsHit mvdHit 
)

A function that returns the distance between a MVD hit and the Riemann track.

Parameters
mvdRiemannTrackInput Riemann track
mvdHitInput Mvd hit
Returns
The distance between the hit and track

Referenced by ~PndSTETools().

◆ GetDistanceToTrackRiemannHit()

double PndSTETools::GetDistanceToTrackRiemannHit ( PndRiemannTrack  mvdRiemannTrack,
PndRiemannHit  hit 
)

A function that returns the distance between a Riemann hit and the Riemann track.

Parameters
mvdRiemannTrackInput Riemann track
hitInput Riemann hit
Returns
The distance between the hit and track

Referenced by ~PndSTETools().

◆ GetLineSlope()

double PndSTETools::GetLineSlope ( )
inline

Function returning the value of the line slope for a track.

Returns
The line slope

Definition at line 76 of file PndSTETools.h.

References PndSTETrackBase::fLineSlope, and RefitRiemannTrack().

76 { return fLineSlope; }

◆ IsHitInCorrectHemisphere()

bool PndSTETools::IsHitInCorrectHemisphere ( PndSdsHit myHit,
double  xc,
double  lineSlope 
)

Function to test if the MVD hit is in the same hemisphere as the Center-of-Gravity of the STT hits in the track.

Parameters
myHitMvd hit to be tested
xcX position of the center of the Center-of-Gravity of the track
lineSlopeAlready calculated line slope of the track
Returns
true if hit is on opposite hemisphere, false if it is in the same hemiphere

Referenced by DrawTracks().

◆ IsHitInTrack()

bool PndSTETools::IsHitInTrack ( PndSdsHit mvdHit,
PndTrackCand  trackCand 
)

Function to examine if a specific hit has already been included in a track.

Parameters
mvdHitHit to be tested if it is in a certain track
trackCandTrack cand corresponding to the track the hit is tested for
Returns
true if hit is in track, false if hit is not in track

Referenced by NewTrackHasSmallestError().

◆ NewTrackHasSmallestError()

bool PndSTETools::NewTrackHasSmallestError ( )
inline

Funtion returning the value of fNewTrack. Can be used in other classes to determine which Riemann track to use in the continued tracking.

Returns
true if the track in iteration i-1 has smaller error than the track from iteration i

Definition at line 58 of file PndSTETools.h.

References CalcSlope(), and IsHitInTrack().

58 { return fNewTrack; };

◆ RefitRiemannTrack()

std::vector<PndSdsHit *> PndSTETools::RefitRiemannTrack ( PndRiemannTrack  riemannTrack,
std::vector< PndSdsHit *>  mvdHits 
)

Function that refits the Riemann track with a set of MVD hits.

The function returns all MVD hits except the worst ftted one, i.e. the one with the largest contribution to the chi2

Parameters
riemannTrackRiemann track to be refitted
mvdHitsVector of Mvd hits to add to the track
Returns
All Mvd hits except the one with the largest contribution to the chi2

Referenced by GetLineSlope().


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