PandaRoot
PndPidCorrelator Class Reference

The PID Correlator class. More...

#include <PndPidCorrelator.h>

Inheritance diagram for PndPidCorrelator:

Public Member Functions

virtual void Exec (Option_t *option)
 
virtual InitStatus Init ()
 
void Register ()
 
void Reset ()
 
 PndPidCorrelator (const char *name, const char *title="Pnd Task", Bool_t use_default_setup=kTRUE)
 Constrcutor setting name and title. More...
 
 PndPidCorrelator (Bool_t use_default_setup=kTRUE)
 Default constructor. More...
 
virtual ~PndPidCorrelator ()
 Default destructor. More...
 
void SetOption (Option_t *option=" ")
 
void SetDebugMode (Bool_t debug)
 
void SetDebugFilename (TString filename)
 
void SetMdtRefit (Bool_t mdt)
 
void SetTrackBranch (TString branch)
 
void SetOutputBranch (TString branch)
 
void SetIdeal (Bool_t id)
 
void SetFast (Bool_t fast)
 
void SetCorrErrProp (Bool_t err)
 
void SetPidHyp (Int_t pid)
 
void SetIdealHyp (Bool_t opt=kTRUE)
 
void SetFlagCut (Bool_t opt=kTRUE)
 
void SetBackPropagate (Bool_t opt=kTRUE)
 
void SetUsePropagator (Bool_t use_propagator=kTRUE)
 
void SetPropagator (PndPropagator *propagator=nullptr)
 Set propagator for all necessary propagation of tracks. More...
 
void SetCalorimeterInfo (PndPidCalorimeterInfo *detector_info)
 
void SetBarrelDetectors (std::vector< PndPidDetectorInfo *> barrel_detectors)
 
void AddBarrelDetector (PndPidDetectorInfo *detector_info)
 
void SetForwardDetectors (std::vector< PndPidDetectorInfo *> forward_detectors)
 
void AddForwardDetector (PndPidDetectorInfo *detector_info)
 
void SetTrackingSystemInfo (PndPidTrackingSystemInfo *tracking_info)
 
void SetTrackingDetectors (std::vector< PndPidTrackingDetectorInfo *> tracking_detectors)
 
void AddTrackingDetector (PndPidTrackingDetectorInfo *detector_info)
 
virtual void SetParContainers ()
 
virtual void Finish ()
 

Protected Member Functions

void DefaultDetectorSetup ()
 
void SetupDetectorParams ()
 
void ActivateNeutrals ()
 
void ConstructChargedCandidates ()
 Construct PidCandidates by calling GetInfo() on DetectorInfo and TrackInfo classes. More...
 
std::vector< PndPidDetectorInfo * > GetDetectors (const PndTrack::TrackType type)
 
Bool_t CheckTrackProperties (PndTrack *track, const FairTrackParP &par)
 
PndPidCandidateAddChargedCandidate (PndPidCandidate *cand)
 Add charged candidate to charged candidate TCA. More...
 
Int_t FindPidHyp (Int_t pid_hyp)
 Find PID hypothesis. More...
 
Int_t FindIdealPidHyp (const std::vector< FairLink > *mcTrackLinks)
 Find ideal PID hypothesis from MC information. More...
 
 ClassDef (PndPidCorrelator, 4)
 

Protected Attributes

TClonesArray * fPidChargedCand = nullptr
 PndPidCandidate TCA for charged particles. More...
 
TClonesArray * fPidNeutralCand = nullptr
 PndPidCandidate TCA for neutral particles. More...
 
std::map< Int_t, PndPidCandidate * > fCandidateBuffer
 
PndPidCorrParfCorrPar = new PndPidCorrPar()
 Correlation parameters. More...
 
FairRootManager * fManager = FairRootManager::Instance()
 
TString fTrackBranch = ""
 Options to choose PndTrack branches. More...
 
TString fTrackOutBranch = ""
 Options to choose output branch. More...
 
Int_t fPidHyp = 0
 particle hypothesis for propagation More...
 
Bool_t fIdeal = kFALSE
 Ideal Correlation. More...
 
Bool_t fIdealHyp = kFALSE
 Flag to use MC particle hypothesis. More...
 
Bool_t fDoNeutralCand = kFALSE
 Create neutral candidates. More...
 
Bool_t fFast = kFALSE
 kFALSE: normal; kTRUE: no correlation/extrapolation/neutral More...
 
Bool_t fFlagCut = kFALSE
 kFALSE: all the tracks; kTRUE: store tracks only if flag>0 More...
 
Bool_t fMdtRefit = kFALSE
 Use MDT Kalman refit propagation. More...
 
Bool_t fCorrErrorProp = kTRUE
 Error propagation in correlation. More...
 
Bool_t fDebugMode = kFALSE
 If true fill ntuples for debug. More...
 
TString fDebugDir = ""
 Ntuple output directory. More...
 
TString fDebugFile = ""
 Ntuple output file. More...
 
TFile * fFileDebugNtuples = nullptr
 File for debug ntuples. More...
 
Bool_t fUsePropagator = kTRUE
 Use propagation. More...
 
Bool_t fBackPropagate = kTRUE
 kFALSE -> do not propagate to IP; kTRUE -> propagate to IP More...
 
PndPropagatorfPropagator = nullptr
 Propagator to be used. More...
 
PndPidDetectorParams::DetectorParams fDetectorParams
 
Int_t fEventCounter
 Event number. More...
 
Bool_t fUseDefaultDetectorSetup
 If true DefaultDetectorSetup() is called in constructor. More...
 
PndPidTrackingSystemInfofTrackingSystemInfo = nullptr
 Class to access pid information from tracking system. More...
 
PndPidCalorimeterInfofCalorimeterInfo = nullptr
 Class to access EMC/FSC pid information. More...
 
std::vector< PndPidDetectorInfo * > fBarrelDetectors = {}
 Vector of barrel detectors. More...
 
std::vector< PndPidDetectorInfo * > fForwardDetectors = {}
 Vector of forward detectors. More...
 

Static Protected Attributes

static Bool_t fHasPrimary
 

Friends

class PidCorrelatorHelper
 needed for unit tests More...
 

Detailed Description

The PID Correlator class.

This class creates and fills PidCandidates by calling the DetectorInformation subclasses.

Author
Sarah Gaiser gaise.nosp@m.r@hi.nosp@m.skp.u.nosp@m.ni-b.nosp@m.onn.d.nosp@m.e, HISKP Bonn
Version
1.0
Date
2020/21

Definition at line 41 of file PndPidCorrelator.h.

Constructor & Destructor Documentation

◆ PndPidCorrelator() [1/2]

PndPidCorrelator::PndPidCorrelator ( const char *  name,
const char *  title = "Pnd Task",
Bool_t  use_default_setup = kTRUE 
)

Constrcutor setting name and title.

◆ PndPidCorrelator() [2/2]

PndPidCorrelator::PndPidCorrelator ( Bool_t  use_default_setup = kTRUE)

Default constructor.

◆ ~PndPidCorrelator()

virtual PndPidCorrelator::~PndPidCorrelator ( )
virtual

Default destructor.

Member Function Documentation

◆ ActivateNeutrals()

void PndPidCorrelator::ActivateNeutrals ( )
protected

◆ AddBarrelDetector()

void PndPidCorrelator::AddBarrelDetector ( PndPidDetectorInfo detector_info)

Referenced by SetUsePropagator().

◆ AddChargedCandidate()

PndPidCandidate* PndPidCorrelator::AddChargedCandidate ( PndPidCandidate cand)
protected

Add charged candidate to charged candidate TCA.

Parameters
candPidCandidate to be added to the charged candidate TCA.
Returns
TCA including cand.

◆ AddForwardDetector()

void PndPidCorrelator::AddForwardDetector ( PndPidDetectorInfo detector_info)

Referenced by SetUsePropagator().

◆ AddTrackingDetector()

void PndPidCorrelator::AddTrackingDetector ( PndPidTrackingDetectorInfo detector_info)

Referenced by SetUsePropagator().

◆ CheckTrackProperties()

Bool_t PndPidCorrelator::CheckTrackProperties ( PndTrack track,
const FairTrackParP &  par 
)
protected

◆ ClassDef()

PndPidCorrelator::ClassDef ( PndPidCorrelator  ,
 
)
protected

◆ ConstructChargedCandidates()

void PndPidCorrelator::ConstructChargedCandidates ( )
protected

Construct PidCandidates by calling GetInfo() on DetectorInfo and TrackInfo classes.

◆ DefaultDetectorSetup()

void PndPidCorrelator::DefaultDetectorSetup ( )
protected

◆ Exec()

virtual void PndPidCorrelator::Exec ( Option_t *  option)
virtual

◆ FindIdealPidHyp()

Int_t PndPidCorrelator::FindIdealPidHyp ( const std::vector< FairLink > *  mcTrackLinks)
protected

Find ideal PID hypothesis from MC information.

Parameters
mcTrackLinksLink to MC track containing PID information.
Returns
Ideal PID hypothesis.

◆ FindPidHyp()

Int_t PndPidCorrelator::FindPidHyp ( Int_t  pid_hyp)
protected

Find PID hypothesis.

Parameters
pid_hypPreliminary PID hypothesis.
Returns
PID hypothesis.

◆ Finish()

virtual void PndPidCorrelator::Finish ( )
virtual

Referenced by SetUsePropagator().

◆ GetDetectors()

std::vector<PndPidDetectorInfo *> PndPidCorrelator::GetDetectors ( const PndTrack::TrackType  type)
protected

◆ Init()

virtual InitStatus PndPidCorrelator::Init ( )
virtual

◆ Register()

void PndPidCorrelator::Register ( )

◆ Reset()

void PndPidCorrelator::Reset ( )

◆ SetBackPropagate()

void PndPidCorrelator::SetBackPropagate ( Bool_t  opt = kTRUE)
inline

Definition at line 71 of file PndPidCorrelator.h.

References fBackPropagate.

71 { fBackPropagate = opt; };
Bool_t fBackPropagate
kFALSE -> do not propagate to IP; kTRUE -> propagate to IP

◆ SetBarrelDetectors()

void PndPidCorrelator::SetBarrelDetectors ( std::vector< PndPidDetectorInfo *>  barrel_detectors)

Referenced by SetUsePropagator().

◆ SetCalorimeterInfo()

void PndPidCorrelator::SetCalorimeterInfo ( PndPidCalorimeterInfo detector_info)

Referenced by SetUsePropagator().

◆ SetCorrErrProp()

void PndPidCorrelator::SetCorrErrProp ( Bool_t  err)
inline

Definition at line 67 of file PndPidCorrelator.h.

References fCorrErrorProp.

67 { fCorrErrorProp = err; };
Bool_t fCorrErrorProp
Error propagation in correlation.

◆ SetDebugFilename()

void PndPidCorrelator::SetDebugFilename ( TString  filename)
inline

Definition at line 60 of file PndPidCorrelator.h.

References fDebugFile.

60 { fDebugFile = filename; };
TString fDebugFile
Ntuple output file.

◆ SetDebugMode()

void PndPidCorrelator::SetDebugMode ( Bool_t  debug)
inline

Definition at line 59 of file PndPidCorrelator.h.

References fDebugMode.

59 { fDebugMode = debug; };
Bool_t fDebugMode
If true fill ntuples for debug.

◆ SetFast()

void PndPidCorrelator::SetFast ( Bool_t  fast)
inline

Definition at line 66 of file PndPidCorrelator.h.

References fFast.

66 { fFast = fast; };
Bool_t fFast
kFALSE: normal; kTRUE: no correlation/extrapolation/neutral

◆ SetFlagCut()

void PndPidCorrelator::SetFlagCut ( Bool_t  opt = kTRUE)
inline

Definition at line 70 of file PndPidCorrelator.h.

References fFlagCut.

70 { fFlagCut = opt; };
Bool_t fFlagCut
kFALSE: all the tracks; kTRUE: store tracks only if flag>0

◆ SetForwardDetectors()

void PndPidCorrelator::SetForwardDetectors ( std::vector< PndPidDetectorInfo *>  forward_detectors)

Referenced by SetUsePropagator().

◆ SetIdeal()

void PndPidCorrelator::SetIdeal ( Bool_t  id)
inline

Definition at line 65 of file PndPidCorrelator.h.

References fIdeal.

65 { fIdeal = id; };
Bool_t fIdeal
Ideal Correlation.

◆ SetIdealHyp()

void PndPidCorrelator::SetIdealHyp ( Bool_t  opt = kTRUE)
inline

Definition at line 69 of file PndPidCorrelator.h.

References fIdealHyp.

69 { fIdealHyp = opt; }
Bool_t fIdealHyp
Flag to use MC particle hypothesis.

◆ SetMdtRefit()

void PndPidCorrelator::SetMdtRefit ( Bool_t  mdt)
inline

Definition at line 61 of file PndPidCorrelator.h.

References fMdtRefit.

61 { fMdtRefit = mdt; };
Bool_t fMdtRefit
Use MDT Kalman refit propagation.

◆ SetOption()

void PndPidCorrelator::SetOption ( Option_t *  option = " ")
inline

Definition at line 54 of file PndPidCorrelator.h.

55  {
56  fOption = option;
57  fOption.ToLower();
58  }

◆ SetOutputBranch()

void PndPidCorrelator::SetOutputBranch ( TString  branch)
inline

Definition at line 63 of file PndPidCorrelator.h.

References fTrackOutBranch.

63 { fTrackOutBranch = branch; };
TString fTrackOutBranch
Options to choose output branch.

◆ SetParContainers()

virtual void PndPidCorrelator::SetParContainers ( )
virtual

Referenced by SetUsePropagator().

◆ SetPidHyp()

void PndPidCorrelator::SetPidHyp ( Int_t  pid)
inline

Definition at line 68 of file PndPidCorrelator.h.

References fPidHyp.

68 { fPidHyp = pid; };
Int_t fPidHyp
particle hypothesis for propagation

◆ SetPropagator()

void PndPidCorrelator::SetPropagator ( PndPropagator propagator = nullptr)

Set propagator for all necessary propagation of tracks.

Parameters
propagatorPropagator to be used.

Referenced by SetUsePropagator().

◆ SetTrackBranch()

void PndPidCorrelator::SetTrackBranch ( TString  branch)
inline

Definition at line 62 of file PndPidCorrelator.h.

References fTrackBranch.

62 { fTrackBranch = branch; };
TString fTrackBranch
Options to choose PndTrack branches.

◆ SetTrackingDetectors()

void PndPidCorrelator::SetTrackingDetectors ( std::vector< PndPidTrackingDetectorInfo *>  tracking_detectors)

Referenced by SetUsePropagator().

◆ SetTrackingSystemInfo()

void PndPidCorrelator::SetTrackingSystemInfo ( PndPidTrackingSystemInfo tracking_info)

Referenced by SetUsePropagator().

◆ SetupDetectorParams()

void PndPidCorrelator::SetupDetectorParams ( )
protected

◆ SetUsePropagator()

void PndPidCorrelator::SetUsePropagator ( Bool_t  use_propagator = kTRUE)
inline

Friends And Related Function Documentation

◆ PidCorrelatorHelper

friend class PidCorrelatorHelper
friend

needed for unit tests

Definition at line 169 of file PndPidCorrelator.h.

Member Data Documentation

◆ fBackPropagate

Bool_t PndPidCorrelator::fBackPropagate = kTRUE
protected

kFALSE -> do not propagate to IP; kTRUE -> propagate to IP

Definition at line 120 of file PndPidCorrelator.h.

Referenced by SetBackPropagate().

◆ fBarrelDetectors

std::vector<PndPidDetectorInfo *> PndPidCorrelator::fBarrelDetectors = {}
protected

Vector of barrel detectors.

Definition at line 131 of file PndPidCorrelator.h.

◆ fCalorimeterInfo

PndPidCalorimeterInfo* PndPidCorrelator::fCalorimeterInfo = nullptr
protected

Class to access EMC/FSC pid information.

Definition at line 129 of file PndPidCorrelator.h.

◆ fCandidateBuffer

std::map<Int_t, PndPidCandidate *> PndPidCorrelator::fCandidateBuffer
protected

Definition at line 97 of file PndPidCorrelator.h.

◆ fCorrErrorProp

Bool_t PndPidCorrelator::fCorrErrorProp = kTRUE
protected

Error propagation in correlation.

Definition at line 112 of file PndPidCorrelator.h.

Referenced by SetCorrErrProp().

◆ fCorrPar

PndPidCorrPar* PndPidCorrelator::fCorrPar = new PndPidCorrPar()
protected

Correlation parameters.

Definition at line 99 of file PndPidCorrelator.h.

◆ fDebugDir

TString PndPidCorrelator::fDebugDir = ""
protected

Ntuple output directory.

Definition at line 115 of file PndPidCorrelator.h.

◆ fDebugFile

TString PndPidCorrelator::fDebugFile = ""
protected

Ntuple output file.

Definition at line 116 of file PndPidCorrelator.h.

Referenced by SetDebugFilename().

◆ fDebugMode

Bool_t PndPidCorrelator::fDebugMode = kFALSE
protected

If true fill ntuples for debug.

Definition at line 114 of file PndPidCorrelator.h.

Referenced by SetDebugMode().

◆ fDetectorParams

PndPidDetectorParams::DetectorParams PndPidCorrelator::fDetectorParams
protected

Definition at line 123 of file PndPidCorrelator.h.

◆ fDoNeutralCand

Bool_t PndPidCorrelator::fDoNeutralCand = kFALSE
protected

Create neutral candidates.

Definition at line 108 of file PndPidCorrelator.h.

◆ fEventCounter

Int_t PndPidCorrelator::fEventCounter
protected

Event number.

Definition at line 124 of file PndPidCorrelator.h.

◆ fFast

Bool_t PndPidCorrelator::fFast = kFALSE
protected

kFALSE: normal; kTRUE: no correlation/extrapolation/neutral

Definition at line 109 of file PndPidCorrelator.h.

Referenced by SetFast().

◆ fFileDebugNtuples

TFile* PndPidCorrelator::fFileDebugNtuples = nullptr
protected

File for debug ntuples.

Definition at line 117 of file PndPidCorrelator.h.

◆ fFlagCut

Bool_t PndPidCorrelator::fFlagCut = kFALSE
protected

kFALSE: all the tracks; kTRUE: store tracks only if flag>0

Definition at line 110 of file PndPidCorrelator.h.

Referenced by SetFlagCut().

◆ fForwardDetectors

std::vector<PndPidDetectorInfo *> PndPidCorrelator::fForwardDetectors = {}
protected

Vector of forward detectors.

Definition at line 132 of file PndPidCorrelator.h.

◆ fHasPrimary

Bool_t PndPidCorrelator::fHasPrimary
staticprotected

Definition at line 125 of file PndPidCorrelator.h.

◆ fIdeal

Bool_t PndPidCorrelator::fIdeal = kFALSE
protected

Ideal Correlation.

Definition at line 106 of file PndPidCorrelator.h.

Referenced by SetIdeal().

◆ fIdealHyp

Bool_t PndPidCorrelator::fIdealHyp = kFALSE
protected

Flag to use MC particle hypothesis.

Definition at line 107 of file PndPidCorrelator.h.

Referenced by SetIdealHyp().

◆ fManager

FairRootManager* PndPidCorrelator::fManager = FairRootManager::Instance()
protected

Definition at line 100 of file PndPidCorrelator.h.

◆ fMdtRefit

Bool_t PndPidCorrelator::fMdtRefit = kFALSE
protected

Use MDT Kalman refit propagation.

Definition at line 111 of file PndPidCorrelator.h.

Referenced by SetMdtRefit().

◆ fPidChargedCand

TClonesArray* PndPidCorrelator::fPidChargedCand = nullptr
protected

PndPidCandidate TCA for charged particles.

Definition at line 94 of file PndPidCorrelator.h.

◆ fPidHyp

Int_t PndPidCorrelator::fPidHyp = 0
protected

particle hypothesis for propagation

Definition at line 105 of file PndPidCorrelator.h.

Referenced by SetPidHyp().

◆ fPidNeutralCand

TClonesArray* PndPidCorrelator::fPidNeutralCand = nullptr
protected

PndPidCandidate TCA for neutral particles.

Definition at line 95 of file PndPidCorrelator.h.

◆ fPropagator

PndPropagator* PndPidCorrelator::fPropagator = nullptr
protected

Propagator to be used.

Definition at line 121 of file PndPidCorrelator.h.

◆ fTrackBranch

TString PndPidCorrelator::fTrackBranch = ""
protected

Options to choose PndTrack branches.

Definition at line 102 of file PndPidCorrelator.h.

Referenced by SetTrackBranch().

◆ fTrackingSystemInfo

PndPidTrackingSystemInfo* PndPidCorrelator::fTrackingSystemInfo = nullptr
protected

Class to access pid information from tracking system.

Definition at line 128 of file PndPidCorrelator.h.

◆ fTrackOutBranch

TString PndPidCorrelator::fTrackOutBranch = ""
protected

Options to choose output branch.

Definition at line 103 of file PndPidCorrelator.h.

Referenced by SetOutputBranch().

◆ fUseDefaultDetectorSetup

Bool_t PndPidCorrelator::fUseDefaultDetectorSetup
protected

If true DefaultDetectorSetup() is called in constructor.

Definition at line 127 of file PndPidCorrelator.h.

◆ fUsePropagator

Bool_t PndPidCorrelator::fUsePropagator = kTRUE
protected

Use propagation.

Definition at line 119 of file PndPidCorrelator.h.

Referenced by SetUsePropagator().


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