PandaRoot
PndHelixPropagator Class Reference

Helix propagator for PandaRoot. More...

#include <PndHelixPropagator.h>

Inheritance diagram for PndHelixPropagator:
PndPropagator

Public Member Functions

 PndHelixPropagator ()
 default constructor More...
 
 PndHelixPropagator (const TString &name, const TString &title)
 
 PndHelixPropagator (Double_t fieldStrength, TVector3 origin, TVector3 momentum, Double_t charge)
 
virtual ~PndHelixPropagator ()
 
Bool_t FindPCA (FairTrackPar *TStart)
 default destructor More...
 
Bool_t FindPCAOnHelix ()
 Find point of closest approach on helix track. More...
 
Bool_t FindPCAOnStraightLine ()
 Find point of closest approach on straight track. More...
 
Bool_t Propagate (FairTrackPar *TStart, FairTrackPar *TEnd, Int_t charge)
 Function to propagate track to point of closest approach. More...
 
FairTrackPar PropagateToZ (Double_t zpos)
 Calculate position and momentum at requested z-Value. More...
 
FairTrackPar PropagateToXYPos (TVector2 xypos)
 Propagate to closest distance to given xy position. More...
 
FairTrackPar PropagateToS (Double_t arclength)
 Calculate position and momentum at requested arc length. More...
 
FairTrackPar PropagateByAngle (Double_t step)
 Calculate position and momentum at requested. More...
 
Bool_t SetPCAPropagation (Int_t pca_mode=1, Int_t dir=1, [[gnu::unused]] FairTrackPar *par=nullptr)
 Set PCA propagation. More...
 
Bool_t SetDestinationPlane ([[gnu::unused]] const TVector3 &v0, [[gnu::unused]] const TVector3 &v1, [[gnu::unused]] const TVector3 &v2)
 Method to set the plane to propagate particles to. More...
 
Bool_t SetOriginPlane ([[gnu::unused]] const TVector3 &v0, [[gnu::unused]] const TVector3 &v1)
 Method to set the plane to propagate particles from. More...
 
Bool_t SetDestinationVolume ([[gnu::unused]] std::string volName, [[gnu::unused]] Int_t copyNo, [[gnu::unused]] Int_t option)
 Method to set the volume to propagate particles to. More...
 
Bool_t SetDestinationLength ([[gnu::unused]] Float_t length)
 Method to set the length to propagate particles to. More...
 
void Init (FairTrackPar *TStart)
 Set initial position and momentum from track parameters. More...
 
void SetFieldStrength (Double_t field_strength)
 Set field strength in z-Direction. More...
 
void SetMagneticField (FairField *field)
 Set magnetic field in detector. More...
 
Double_t GetDeltaPhi ()
 Get difference in phi between initial and final vector. More...
 
TVector3 GetPoint ()
 Get point to which to propagate. More...
 
Int_t GetPcaMode ()
 Get propagation mode. More...
 
- Public Member Functions inherited from PndPropagator
 PndPropagator ()
 default constructor More...
 
 PndPropagator (const TString &name, const TString &title)
 
virtual ~PndPropagator ()
 
virtual Bool_t Propagate ([[gnu::unused]] FairTrackPar *TStart, [[gnu::unused]] FairTrackPar *TEnd, [[gnu::unused]] Int_t PDG)
 Propagate track to point, wire, plane or volume. More...
 
virtual Bool_t Propagate ([[gnu::unused]] Float_t *x1, [[gnu::unused]] Float_t *p1, [[gnu::unused]] Float_t *x2, [[gnu::unused]] Float_t *p2, [[gnu::unused]] Int_t PDG)
 Propagate track to point, wire, plane or volume. More...
 
virtual PndProp::PCAOutputStruct FindPCA ([[gnu::unused]] Int_t PCA, [[gnu::unused]] Int_t PDGCode, [[gnu::unused]] TVector3 Point, [[gnu::unused]] TVector3 Wire1, [[gnu::unused]] TVector3 Wire2, [[gnu::unused]] Double_t MaxDistance)
 Find point of closest approach to point or wire. More...
 
virtual Bool_t SetPropagateOnlyParameters ()
 Method to set to propagate only parameters. More...
 
virtual Bool_t SetPCAPropagation ([[gnu::unused]] Int_t pca, [[gnu::unused]] Int_t dir=1, [[gnu::unused]] FairTrackPar *par=nullptr)
 Set PCA propagation. More...
 
virtual Bool_t SetDestinationVolume (std::string volName, Int_t copyNo, Int_t option)
 Method to set the volume to propagate particles to. More...
 
virtual Bool_t SetDestinationLength (Float_t length)
 Method to set the length to propagate particles to. More...
 
virtual Bool_t SetDestinationPoint (const TVector3 point)
 Method to set the point to propagate particles to. More...
 
virtual Bool_t SetDestinationWire (const TVector3 wire1, const TVector3 wire2)
 Method to set wire to propagate to. More...
 
virtual PndProp::PCAOutputStruct GetPcaOutput ()
 get PCAOutputStruct containing all relevant pca informations. More...
 
virtual Float_t GetLengthAtPCA ()
 
virtual Float_t GetDistAtPCA ()
 Get distance between point of closest approach and vertex. More...
 
virtual TVector3 GetPCA ()
 Get position of pca on track. More...
 
 ClassDef (PndPropagator, 1)
 

Protected Member Functions

Double_t Radius ()
 Calculate radius of track circle of charged particle. More...
 
TVector3 FindCircleCenter ()
 Find position of track circle center. More...
 

Protected Attributes

Double_t fFieldStrength
 magentic field strength in z-Direction in Tesla More...
 
Double_t fCharge
 sign of charge More...
 
Bool_t fBackPropagate
 kTRUE if backward propagation More...
 
Double_t fDeltaPhi
 propagated angle More...
 
FairField * fMagneticField
 magnetic field in detector More...
 
Double_t fA
 
Double_t fB
 
Double_t fC
 
Double_t fD
 
- Protected Attributes inherited from PndPropagator
Int_t fPcaMode
 if 1: propagate to point, if 2: propagate to line, if 0: no pca More...
 
TVector3 fPoint
 point to which to calculate pca More...
 
TVector3 fWire1
 first anchor point of line to which to calculate pca More...
 
TVector3 fWire2
 second anchor point of line to which to calculate pca More...
 
Float_t fDestinationLength
 track length when PropagateToTrack is chosen More...
 
TString fVolumeName
 volume name More...
 
Int_t fVolumeCopyNo
 volume copy number More...
 
Bool_t fVolumeEnter
 true if enter volume More...
 
TVector3 fInitialPosition
 initial position in cm More...
 
TVector3 fInitialMomentum
 initial momentum in GeV More...
 
TVector3 fFinalPosition
 final position More...
 
TVector3 fFinalMomentum
 final momentum More...
 
PndProp::PCAOutputStruct fPcaOutput
 

Detailed Description

Helix propagator for PandaRoot.

Definition at line 24 of file PndHelixPropagator.h.

Constructor & Destructor Documentation

◆ PndHelixPropagator() [1/3]

PndHelixPropagator::PndHelixPropagator ( )

default constructor

Referenced by Radius().

◆ PndHelixPropagator() [2/3]

PndHelixPropagator::PndHelixPropagator ( const TString &  name,
const TString &  title 
)

◆ PndHelixPropagator() [3/3]

PndHelixPropagator::PndHelixPropagator ( Double_t  fieldStrength,
TVector3  origin,
TVector3  momentum,
Double_t  charge 
)

◆ ~PndHelixPropagator()

virtual PndHelixPropagator::~PndHelixPropagator ( )
inlinevirtual

Member Function Documentation

◆ FindCircleCenter()

TVector3 PndHelixPropagator::FindCircleCenter ( )
protected

Find position of track circle center.

Returns
position of circle center

Referenced by Radius().

◆ FindPCA()

Bool_t PndHelixPropagator::FindPCA ( FairTrackPar *  TStart)

default destructor

Find point of closest approach on track.

If the magnetic field does not vanish and the particle has transverse momentum, FindPCAOnHelix is called. Else FindPCAOnStraightLine is called.

Parameters
TStartstart point of propagated track
Returns
kTRUE is successful

Referenced by ~PndHelixPropagator().

◆ FindPCAOnHelix()

Bool_t PndHelixPropagator::FindPCAOnHelix ( )

Find point of closest approach on helix track.

Parameters
TStartstart point of propagated track
Returns
kTRUE is successful

Referenced by ~PndHelixPropagator().

◆ FindPCAOnStraightLine()

Bool_t PndHelixPropagator::FindPCAOnStraightLine ( )

Find point of closest approach on straight track.

Parameters
TStartstart point of propagated track
Returns
kTRUE is successful

Referenced by ~PndHelixPropagator().

◆ GetDeltaPhi()

Double_t PndHelixPropagator::GetDeltaPhi ( )
inline

Get difference in phi between initial and final vector.

Definition at line 216 of file PndHelixPropagator.h.

References fDeltaPhi.

216 { return fDeltaPhi; };
Double_t fDeltaPhi
propagated angle

◆ GetPcaMode()

Int_t PndHelixPropagator::GetPcaMode ( )
inline

Get propagation mode.

Definition at line 226 of file PndHelixPropagator.h.

References PndPropagator::ClassDef(), and PndPropagator::fPcaMode.

226 { return fPcaMode; };
Int_t fPcaMode
if 1: propagate to point, if 2: propagate to line, if 0: no pca
Definition: PndPropagator.h:55

◆ GetPoint()

TVector3 PndHelixPropagator::GetPoint ( )
inline

Get point to which to propagate.

Definition at line 221 of file PndHelixPropagator.h.

References PndPropagator::fPoint.

221 { return fPoint; };
TVector3 fPoint
point to which to calculate pca
Definition: PndPropagator.h:56

◆ Init()

void PndHelixPropagator::Init ( FairTrackPar *  TStart)
virtual

Set initial position and momentum from track parameters.

Parameters
TStartinitial track parameters

Reimplemented from PndPropagator.

Referenced by SetDestinationLength().

◆ Propagate()

Bool_t PndHelixPropagator::Propagate ( FairTrackPar *  TStart,
FairTrackPar *  TEnd,
Int_t  charge 
)

Function to propagate track to point of closest approach.

This function first calls FindPCA, then propagates the initial momentum to the point of closest approach.

Parameters
TStarttrack parameters at point from which to propagate
TEndtrack parameters at end point of propagation
chargecharge of particle
Returns
kTRUE if successful

Referenced by ~PndHelixPropagator().

◆ PropagateByAngle()

FairTrackPar PndHelixPropagator::PropagateByAngle ( Double_t  step)

Calculate position and momentum at requested.

Parameters
stepangle in deg from start position
Returns
track parameters at end point of propagation

Referenced by ~PndHelixPropagator().

◆ PropagateToS()

FairTrackPar PndHelixPropagator::PropagateToS ( Double_t  arclength)

Calculate position and momentum at requested arc length.

Parameters
arclengtharc length to which to propagate
Returns
track parameters at end point of propagation

Referenced by ~PndHelixPropagator().

◆ PropagateToXYPos()

FairTrackPar PndHelixPropagator::PropagateToXYPos ( TVector2  xypos)

Propagate to closest distance to given xy position.

Parameters
xyposxy-position to which to propagate
Returns
track parameters at end point of propagation

Referenced by ~PndHelixPropagator().

◆ PropagateToZ()

FairTrackPar PndHelixPropagator::PropagateToZ ( Double_t  zpos)

Calculate position and momentum at requested z-Value.

Parameters
zposz-position [cm] to which to propagate
Returns
track parameters at end point of propagation

Referenced by ~PndHelixPropagator().

◆ Radius()

Double_t PndHelixPropagator::Radius ( )
inlineprotected

Calculate radius of track circle of charged particle.

Returns
radius in cm

Definition at line 39 of file PndHelixPropagator.h.

References FindCircleCenter(), PndPropagator::fInitialMomentum, and PndHelixPropagator().

40  {
41  return fInitialMomentum.Perp() / (fFieldStrength * 0.3) * 100;
42  }
Double_t fFieldStrength
magentic field strength in z-Direction in Tesla
TVector3 fInitialMomentum
initial momentum in GeV
Definition: PndPropagator.h:65

◆ SetDestinationLength()

Bool_t PndHelixPropagator::SetDestinationLength ( [[gnu::unused] ] Float_t  length)
inline

Method to set the length to propagate particles to.

Parameters
lengthtrack length
Returns
kTRUE if successful

Definition at line 189 of file PndHelixPropagator.h.

References Init().

190  {
191  LOG(info) << "PndHelixPropagator: Propagation to given track length not implemented yet";
192  return kFALSE;
193  };

◆ SetDestinationPlane()

Bool_t PndHelixPropagator::SetDestinationPlane ( [[gnu::unused] ] const TVector3 &  v0,
[[gnu::unused] ] const TVector3 &  v1,
[[gnu::unused] ] const TVector3 &  v2 
)
inlinevirtual

Method to set the plane to propagate particles to.

Parameters
v0first plane defining vector
v1second plane defining vector
v2third plane defining vector
Returns
kTRUE if successful

Reimplemented from PndPropagator.

Definition at line 149 of file PndHelixPropagator.h.

152  {
153  LOG(info) << "PndHelixPropagator: Propagation to plane not implemented yet";
154  return kFALSE;
155  }

◆ SetDestinationVolume()

Bool_t PndHelixPropagator::SetDestinationVolume ( [[gnu::unused] ] std::string  volName,
[[gnu::unused] ] Int_t  copyNo,
[[gnu::unused] ] Int_t  option 
)
inline

Method to set the volume to propagate particles to.

Parameters
volNamevolume name
copyNocopy number
optionother options
Returns
kTRUE if successful

Definition at line 176 of file PndHelixPropagator.h.

179  {
180  LOG(info) << "PndHelixPropagator: Propagation to volume not implemented yet";
181  return kFALSE;
182  }

◆ SetFieldStrength()

void PndHelixPropagator::SetFieldStrength ( Double_t  field_strength)
inline

Set field strength in z-Direction.

Parameters
field_strengthmagnetic field strength in Tesla

Definition at line 205 of file PndHelixPropagator.h.

205 { fFieldStrength = field_strength; };
Double_t fFieldStrength
magentic field strength in z-Direction in Tesla

◆ SetMagneticField()

void PndHelixPropagator::SetMagneticField ( FairField *  field)
inline

Set magnetic field in detector.

Parameters
fieldmagnetic field

Definition at line 211 of file PndHelixPropagator.h.

211 { fMagneticField = field; };
FairField * fMagneticField
magnetic field in detector

◆ SetOriginPlane()

Bool_t PndHelixPropagator::SetOriginPlane ( [[gnu::unused] ] const TVector3 &  v0,
[[gnu::unused] ] const TVector3 &  v1 
)
inlinevirtual

Method to set the plane to propagate particles from.

Parameters
v0first plane defining vector
v1second plane defining vector
Returns
kTRUE if successful

Reimplemented from PndPropagator.

Definition at line 163 of file PndHelixPropagator.h.

164  {
165  LOG(info) << "PndHelixPropagator: Propagation from plane not implemented yet";
166  return kFALSE;
167  }

◆ SetPCAPropagation()

Bool_t PndHelixPropagator::SetPCAPropagation ( Int_t  pca_mode = 1,
Int_t  dir = 1,
[[gnu::unused] ] FairTrackPar *  par = nullptr 
)
inline

Set PCA propagation.

Parameters
pca_modeif = 1: closest approach to point if = 2: closest approach to wire if = 0: no closest approach
dirif = +1: move forward if = -1: move backward
parinitial track parameters
Returns
kTRUE if successful

Definition at line 128 of file PndHelixPropagator.h.

References PndPropagator::fPcaMode.

131  {
132  if (dir >= 0) fBackPropagate = kFALSE;
133  else fBackPropagate = kTRUE;
134  if (pca_mode != 1) { // TODO: add other propagation modes -> propagation to wire, volume, and plane
135  LOG(info) << "PndHelixPropagator::SetPCAPropagation: only propagation to point implemented at the moment";
136  return kFALSE;
137  }
138  fPcaMode = pca_mode;
139  return kTRUE;
140  }
Int_t fPcaMode
if 1: propagate to point, if 2: propagate to line, if 0: no pca
Definition: PndPropagator.h:55
Bool_t fBackPropagate
kTRUE if backward propagation

Member Data Documentation

◆ fA

Double_t PndHelixPropagator::fA
protected

Definition at line 33 of file PndHelixPropagator.h.

◆ fB

Double_t PndHelixPropagator::fB
protected

Definition at line 33 of file PndHelixPropagator.h.

◆ fBackPropagate

Bool_t PndHelixPropagator::fBackPropagate
protected

kTRUE if backward propagation

Definition at line 28 of file PndHelixPropagator.h.

◆ fC

Double_t PndHelixPropagator::fC
protected

Definition at line 33 of file PndHelixPropagator.h.

◆ fCharge

Double_t PndHelixPropagator::fCharge
protected

sign of charge

Definition at line 27 of file PndHelixPropagator.h.

◆ fD

Double_t PndHelixPropagator::fD
protected

Definition at line 33 of file PndHelixPropagator.h.

◆ fDeltaPhi

Double_t PndHelixPropagator::fDeltaPhi
protected

propagated angle

Definition at line 30 of file PndHelixPropagator.h.

Referenced by GetDeltaPhi().

◆ fFieldStrength

Double_t PndHelixPropagator::fFieldStrength
protected

magentic field strength in z-Direction in Tesla

Definition at line 26 of file PndHelixPropagator.h.

◆ fMagneticField

FairField* PndHelixPropagator::fMagneticField
protected

magnetic field in detector

Definition at line 31 of file PndHelixPropagator.h.


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