PandaRoot
PndPidTrackInfo.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PID_TRACK_INFO__H
14 #define PID_TRACK_INFO__H
15 
16 #include "TString.h"
17 #include "TClonesArray.h"
18 
19 #include "FairPropagator.h"
20 #include "PndPropagator.h"
21 #include "FairGeane.h"
22 #include "FairRootManager.h"
23 
24 #include "PndTrack.h"
25 #include "PndMCTrack.h"
26 #include "PndPidCandidate.h"
27 
28 class TGeant3;
29 
39  public:
44  virtual ~PndPidTrackInfo();
45 
46  void SetUsePropagator(Bool_t use_propagator) { fUsePropagator = use_propagator; };
47  void SetPropagator(PndPropagator *propagator) { fPropagator = propagator; };
48  void SetPidHypo(Int_t pid_hyp) { fPidHyp = pid_hyp; };
49  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
50  void SetBackPropagate(Bool_t back_propagate) { fBackPropagate = back_propagate; };
51  void SetTrackBranch(TString track_branch) { fTrackBranch = track_branch; };
52 
53  Int_t GetNTracksTotal() { return ((fTrack != nullptr) ? fTrack->GetEntriesFast() : 0);};
54 
55  virtual void Register() {};
56 
62  Bool_t SetMcTrack(FairRootManager *manager);
63 
70  Bool_t GetInfo(Int_t track_index, PndPidCandidate *pidCand);
71 
78  Int_t GetNTracks();
79 
87  PndTrack *GetTrack(Int_t index);
88 
94  PndMCTrack *GetMcTrack(Int_t index);
95 
96  Bool_t SetTrackArrays(FairRootManager *manager);
97 
98  protected:
99  Bool_t fUsePropagator = kFALSE;
101  Int_t fPidHyp = 0;
102  Int_t fVerbose = 0;
103 
104  TString fTrackBranch = "";
105  TClonesArray *fTrack = nullptr;
106  TClonesArray *fMcTrack = nullptr;
107  Bool_t fBackPropagate = kFALSE;
108  Bool_t fIsBarrel = kTRUE;
109 
111 };
112 
113 #endif // PID_TRACK_INFO__H
virtual void Register()
Bool_t SetTrackArrays(FairRootManager *manager)
Int_t fVerbose
Verbosity level.
TClonesArray * fTrack
void SetBackPropagate(Bool_t back_propagate)
virtual ~PndPidTrackInfo()
Default destructor.
Base class for accessing PID track information.
void SetPropagator(PndPropagator *propagator)
Bool_t GetInfo(Int_t track_index, PndPidCandidate *pidCand)
Include track information in PidCandidate.
void SetUsePropagator(Bool_t use_propagator)
Int_t fPidHyp
Particle Id hypothesis (pdg particle code)
void SetTrackBranch(TString track_branch)
PndMCTrack * GetMcTrack(Int_t index)
Get track from MC track TClonesArrays.
Bool_t SetMcTrack(FairRootManager *manager)
Set McTrack TClonesArray.
void SetPidHypo(Int_t pid_hyp)
void SetVerbose(Int_t verbose)
Bool_t fUsePropagator
kTRUE to use propagator like PndGeanePro.
TClonesArray * fMcTrack
PndPidTrackInfo()
Default constructor.
Propagator interface class for PandaRoot.
Definition: PndPropagator.h:64
ClassDef(PndPidTrackInfo, 1)
PndTrack * GetTrack(Int_t index)
Get track from barrel or foward track TClonesArrays.
PndPropagator * fPropagator
The propagator.
Int_t GetNTracks()
Get number of tracks in barrel or forward detector.
Int_t GetNTracksTotal()