PandaRoot
PndIdealTrackFinder Class Reference

Ideal track finder for all types of tracking detectors The PndIdealTrackFinder combines all hits in given branches into PndTrackCand and calculates the PndTrack based on MC information. More...

#include <PndIdealTrackFinder.h>

Inheritance diagram for PndIdealTrackFinder:
PndPersistencyTask PndCloneGenerator

Public Member Functions

 PndIdealTrackFinder (TString name="PndIdealTrackFinder")
 
virtual ~PndIdealTrackFinder ()
 
virtual InitStatus Init ()
 
virtual void AddBranchName (TString name)
 
virtual void AddBranchName (TString name, TString mcName)
 
virtual void SetOutputBranchName (TString name)
 
virtual void Exec (Option_t *opt)
 
void SetMomentumSmearing (Double_t sigmax, Double_t sigmay, Double_t sigmaz)
 
void SetRelativeMomentumSmearing (Double_t dpop)
 
void SetRunTimeBased (bool valRunTimeBased=true)
 
void SetVertexSmearing (Double_t sigmax=-1., Double_t sigmay=-1., Double_t sigmaz=-1.)
 
void SetTrackingEfficiency (Double_t eff=1.)
 
void SetTrackSelector (TString selector)
 
void SetPersistence (Bool_t persistence)
 
- Public Member Functions inherited from PndPersistencyTask
 PndPersistencyTask ()
 
 PndPersistencyTask (const char *name, Int_t iVerbose=1)
 
virtual ~PndPersistencyTask ()
 
void SetPersistency (Bool_t val=kTRUE)
 
Bool_t GetPersistency ()
 

Protected Member Functions

virtual void CreateTrackCands ()
 
virtual void CreateTracks ()
 
virtual void FilterTrackCands ()
 
virtual FairMCPoint * GetFairMCPoint (TString hitBranch, FairMultiLinkedData_Interface *links, FairMultiLinkedData &array)
 
virtual void SmearVector (TVector3 &vec, const TVector3 &sigma)
 
 ClassDef (PndIdealTrackFinder, 2)
 

Protected Attributes

Bool_t fRunTimeBased
 
BinaryFunctor * fFunctor
 
double fStopTimeValue
 
TString fOutBranchName
 
TClonesArray * fTrackCand
 
TClonesArray * fTrack
 
TClonesArray * fMCTrack
 
PndTrackFunctorfTrackSelector
 
std::map< TString, TClonesArray * > fBranchMap
 
std::vector< TString > fBranchNames
 
std::map< FairLink, PndTrackCandfTrackCandMap
 
std::map< FairLink, FairMCPoint > fFirstPointMap
 
std::map< FairLink, FairMCPoint > fLastPointMap
 
std::map< TString, TString > fPointBranchMap
 
TDatabasePDG * fPdg
 ! Particle DB More...
 
Int_t fHitCount
 
TVector3 fMomSigma
 Momentum smearing sigma [GeV]. More...
 
Double_t fDPoP
 Relative momentum Smearing. More...
 
Bool_t fRelative
 flag More...
 
TVector3 fVtxSigma
 Vertex smearing sigma [cm]. More...
 
Double_t fEfficiency
 Tracking efficiency - if (0 <= e < 1), some tracks will be discarded. More...
 

Detailed Description

Ideal track finder for all types of tracking detectors The PndIdealTrackFinder combines all hits in given branches into PndTrackCand and calculates the PndTrack based on MC information.

Author
Tobias Stockmanns t.sto.nosp@m.ckma.nosp@m.nns@f.nosp@m.z-ju.nosp@m.elich.nosp@m..de
Date
Apr 12, 2010

Definition at line 25 of file PndIdealTrackFinder.h.

Constructor & Destructor Documentation

◆ PndIdealTrackFinder()

PndIdealTrackFinder::PndIdealTrackFinder ( TString  name = "PndIdealTrackFinder")

◆ ~PndIdealTrackFinder()

virtual PndIdealTrackFinder::~PndIdealTrackFinder ( )
virtual

Member Function Documentation

◆ AddBranchName() [1/2]

virtual void PndIdealTrackFinder::AddBranchName ( TString  name)
inlinevirtual

Add a branch name of detector hits which should be added to the PndTrack. If no branch name is given per default all hits of tracking detectors are taken.

Parameters
namename of branch in input root file

Definition at line 37 of file PndIdealTrackFinder.h.

References fBranchNames.

38  {
39  fBranchNames.push_back(name);
40  }
std::vector< TString > fBranchNames

◆ AddBranchName() [2/2]

virtual void PndIdealTrackFinder::AddBranchName ( TString  name,
TString  mcName 
)
inlinevirtual

Add a branch name of detector hits which should be added to the PndTrack. If no branch name is given per default all hits of tracking detectors are taken.

Parameters
namename of branch in input root file
mcNamename of the branch which contains the MC points connected to the hit branch. If no mcName is given a default map is taken.

Definition at line 48 of file PndIdealTrackFinder.h.

References fBranchNames, and fPointBranchMap.

49  {
50  fBranchNames.push_back(name);
51  fPointBranchMap[name] = mcName;
52  }
std::map< TString, TString > fPointBranchMap
std::vector< TString > fBranchNames

◆ ClassDef()

PndIdealTrackFinder::ClassDef ( PndIdealTrackFinder  ,
 
)
protected

◆ CreateTrackCands()

virtual void PndIdealTrackFinder::CreateTrackCands ( )
protectedvirtual

Referenced by SetPersistence().

◆ CreateTracks()

virtual void PndIdealTrackFinder::CreateTracks ( )
protectedvirtual

Referenced by SetPersistence().

◆ Exec()

virtual void PndIdealTrackFinder::Exec ( Option_t *  opt)
virtual

Main method called for each event

Reimplemented in PndCloneGenerator.

Referenced by SetOutputBranchName().

◆ FilterTrackCands()

virtual void PndIdealTrackFinder::FilterTrackCands ( )
protectedvirtual

Referenced by SetPersistence().

◆ GetFairMCPoint()

virtual FairMCPoint* PndIdealTrackFinder::GetFairMCPoint ( TString  hitBranch,
FairMultiLinkedData_Interface *  links,
FairMultiLinkedData &  array 
)
protectedvirtual

Referenced by SetPersistence().

◆ Init()

virtual InitStatus PndIdealTrackFinder::Init ( )
virtual

◆ SetMomentumSmearing()

void PndIdealTrackFinder::SetMomentumSmearing ( Double_t  sigmax,
Double_t  sigmay,
Double_t  sigmaz 
)
inline

Sets how much the mc truth momentum values are smeared by absolute values

Parameters
sigmaxabsolute smearing in px in [GeV/c]
sigmayabsolute smearing in py in [GeV/c]
sigmazabsoulte smearing in pz in [GeV/c]

Definition at line 76 of file PndIdealTrackFinder.h.

References fabs(), fMomSigma, and fRelative.

77  {
78  fMomSigma.SetXYZ(fabs(sigmax), fabs(sigmay), fabs(sigmaz));
79  fRelative = kFALSE;
80  };
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:46
TVector3 fMomSigma
Momentum smearing sigma [GeV].

◆ SetOutputBranchName()

virtual void PndIdealTrackFinder::SetOutputBranchName ( TString  name)
inlinevirtual

Sets the output branch name of the generated PndTracks. If this method is not called "IdealTrack" is taken.

Parameters
namename of branch in output root file

Definition at line 59 of file PndIdealTrackFinder.h.

References Exec(), and fOutBranchName.

59 { fOutBranchName = name; };

◆ SetPersistence()

void PndIdealTrackFinder::SetPersistence ( Bool_t  persistence)
inline

Defines if the output track candidates are stored to a file or are just transient.

Definition at line 125 of file PndIdealTrackFinder.h.

References CreateTrackCands(), CreateTracks(), FilterTrackCands(), GetFairMCPoint(), PndPersistencyTask::SetPersistency(), and SmearVector().

125 { SetPersistency(persistence); }
void SetPersistency(Bool_t val=kTRUE)

◆ SetRelativeMomentumSmearing()

void PndIdealTrackFinder::SetRelativeMomentumSmearing ( Double_t  dpop)
inline

Sets how much the mc truth momentum values are smeared by a relative value. The relative smearing is applied to pt and pz individually. => The error applied to px and py is 1/Sqrt(2) * dpop while for pz it is dpop

Parameters
dpoprelative momentum smearing

Definition at line 87 of file PndIdealTrackFinder.h.

References fabs(), fDPoP, and fRelative.

88  {
89  fDPoP = fabs(dpop);
90  fRelative = kTRUE;
91  };
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:46
Double_t fDPoP
Relative momentum Smearing.

◆ SetRunTimeBased()

void PndIdealTrackFinder::SetRunTimeBased ( bool  valRunTimeBased = true)
inline

(De-)Activates time based reconstruction

Definition at line 96 of file PndIdealTrackFinder.h.

References fRunTimeBased.

96 { fRunTimeBased = valRunTimeBased; };

◆ SetTrackingEfficiency()

void PndIdealTrackFinder::SetTrackingEfficiency ( Double_t  eff = 1.)
inline

Sets an artificial efficiency of the ideal track finder

Parameters
effFraction of tracks which are generated. A value of 1 means all ideal tracks, 0 no tracks are generated.

Definition at line 110 of file PndIdealTrackFinder.h.

References fEfficiency.

110 { fEfficiency = eff; };
Double_t fEfficiency
Tracking efficiency - if (0 <= e < 1), some tracks will be discarded.

◆ SetTrackSelector()

void PndIdealTrackFinder::SetTrackSelector ( TString  selector)
inline

The track selector decides which kind of ideal tracks are generated from the features of MC tracks. E.g. the "StandardTrackFunctor" creates a track if more than 3 MVD hits or more than 5 (MVD+STT+GEM) hits are from the same track.

Parameters
selectorstring which defines a track selector. Valid strings can be found in PndTrackFunctor

Definition at line 117 of file PndIdealTrackFinder.h.

References fTrackSelector, and PndTrackFunctor::make_PndTrackFunctor().

118  {
120  }
PndTrackFunctor * fTrackSelector
static PndTrackFunctor * make_PndTrackFunctor(std::string functorName)

◆ SetVertexSmearing()

void PndIdealTrackFinder::SetVertexSmearing ( Double_t  sigmax = -1.,
Double_t  sigmay = -1.,
Double_t  sigmaz = -1. 
)
inline

Sets how much the mc truth vertex position is smeared by absolute values

Parameters
sigmaxabsolute smearing in x in [cm]
sigmayabsolute smearing in y in [cm]
sigmazabsoulte smearing in z in [cm]

Definition at line 104 of file PndIdealTrackFinder.h.

References fabs(), and fVtxSigma.

104 { fVtxSigma.SetXYZ(fabs(sigmax), fabs(sigmay), fabs(sigmaz)); }; // in cm
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:46
TVector3 fVtxSigma
Vertex smearing sigma [cm].

◆ SmearVector()

virtual void PndIdealTrackFinder::SmearVector ( TVector3 &  vec,
const TVector3 &  sigma 
)
protectedvirtual

Referenced by SetPersistence().

Member Data Documentation

◆ fBranchMap

std::map<TString, TClonesArray *> PndIdealTrackFinder::fBranchMap
protected

Definition at line 149 of file PndIdealTrackFinder.h.

◆ fBranchNames

std::vector<TString> PndIdealTrackFinder::fBranchNames
protected

Definition at line 150 of file PndIdealTrackFinder.h.

Referenced by AddBranchName().

◆ fDPoP

Double_t PndIdealTrackFinder::fDPoP
protected

Relative momentum Smearing.

Definition at line 162 of file PndIdealTrackFinder.h.

Referenced by SetRelativeMomentumSmearing().

◆ fEfficiency

Double_t PndIdealTrackFinder::fEfficiency
protected

Tracking efficiency - if (0 <= e < 1), some tracks will be discarded.

Definition at line 165 of file PndIdealTrackFinder.h.

Referenced by SetTrackingEfficiency().

◆ fFirstPointMap

std::map<FairLink, FairMCPoint> PndIdealTrackFinder::fFirstPointMap
protected

Definition at line 152 of file PndIdealTrackFinder.h.

◆ fFunctor

BinaryFunctor* PndIdealTrackFinder::fFunctor
protected

Definition at line 141 of file PndIdealTrackFinder.h.

◆ fHitCount

Int_t PndIdealTrackFinder::fHitCount
protected

Definition at line 158 of file PndIdealTrackFinder.h.

◆ fLastPointMap

std::map<FairLink, FairMCPoint> PndIdealTrackFinder::fLastPointMap
protected

Definition at line 153 of file PndIdealTrackFinder.h.

◆ fMCTrack

TClonesArray* PndIdealTrackFinder::fMCTrack
protected

Definition at line 147 of file PndIdealTrackFinder.h.

◆ fMomSigma

TVector3 PndIdealTrackFinder::fMomSigma
protected

Momentum smearing sigma [GeV].

Definition at line 161 of file PndIdealTrackFinder.h.

Referenced by SetMomentumSmearing().

◆ fOutBranchName

TString PndIdealTrackFinder::fOutBranchName
protected

Definition at line 144 of file PndIdealTrackFinder.h.

Referenced by SetOutputBranchName().

◆ fPdg

TDatabasePDG* PndIdealTrackFinder::fPdg
protected

! Particle DB

Definition at line 156 of file PndIdealTrackFinder.h.

◆ fPointBranchMap

std::map<TString, TString> PndIdealTrackFinder::fPointBranchMap
protected

Definition at line 154 of file PndIdealTrackFinder.h.

Referenced by AddBranchName().

◆ fRelative

Bool_t PndIdealTrackFinder::fRelative
protected

flag

Definition at line 163 of file PndIdealTrackFinder.h.

Referenced by SetMomentumSmearing(), and SetRelativeMomentumSmearing().

◆ fRunTimeBased

Bool_t PndIdealTrackFinder::fRunTimeBased
protected

Definition at line 139 of file PndIdealTrackFinder.h.

Referenced by SetRunTimeBased().

◆ fStopTimeValue

double PndIdealTrackFinder::fStopTimeValue
protected

Definition at line 142 of file PndIdealTrackFinder.h.

◆ fTrack

TClonesArray* PndIdealTrackFinder::fTrack
protected

Definition at line 146 of file PndIdealTrackFinder.h.

◆ fTrackCand

TClonesArray* PndIdealTrackFinder::fTrackCand
protected

Definition at line 145 of file PndIdealTrackFinder.h.

◆ fTrackCandMap

std::map<FairLink, PndTrackCand> PndIdealTrackFinder::fTrackCandMap
protected

Definition at line 151 of file PndIdealTrackFinder.h.

◆ fTrackSelector

PndTrackFunctor* PndIdealTrackFinder::fTrackSelector
protected

Definition at line 148 of file PndIdealTrackFinder.h.

Referenced by SetTrackSelector().

◆ fVtxSigma

TVector3 PndIdealTrackFinder::fVtxSigma
protected

Vertex smearing sigma [cm].

Definition at line 164 of file PndIdealTrackFinder.h.

Referenced by SetVertexSmearing().


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