CbmRoot
CbmTrdSetTracksPidLike.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmTrdSetTracksPidLike header file -----
3 // ----- Created 25/02/2007 by F. Uhlig -----
4 // ----- Updated 31/08/2016 by J. Book -----
5 // -------------------------------------------------------------------------
6 
7 
23 #ifndef CBMTRDSETTRACKSPIDLIKE_H
24 #define CBMTRDSETTRACKSPIDLIKE_H 1
25 
26 #include "FairTask.h"
27 
28 class TClonesArray;
29 
30 class CbmTrdSetTracksPidLike : public FairTask {
31 
32 public:
35 
36 
42  CbmTrdSetTracksPidLike(const char* name, const char* title = "FairTask");
43 
44 
46  virtual ~CbmTrdSetTracksPidLike();
47 
48 
50  virtual InitStatus Init();
51 
53  virtual void Exec(Option_t* opt);
54 
55 
57  virtual void Finish();
58 
59 
61  virtual void SetParContainers();
62 
63 
65  Int_t GetNofTracks() const { return fNofTracks; };
66 
68  void SetInputFileName(const char* file) { fFileName = file; }
69  void SetUseMCInfo(Bool_t use = kTRUE) { fMCinput = use; }
70  void SetUseMomDependence(Bool_t use = kTRUE) { fMomDep = use; }
71 
72 private:
75 
76  TString fFileName = ""; // input file
77  Bool_t fMCinput = kFALSE; // use MC information for input histograms
78  Bool_t fMomDep = kTRUE; // use momentum dependence for input histograms
79  TClonesArray* fTrackArray = NULL;
80  TClonesArray* fTrdHitArray = NULL;
81  TClonesArray* fglobalTrackArray = NULL;
83  TObjArray* fHistdEdx = NULL; // Prob. of dEdx for 5 particle species
84  Int_t fNofTracks = 0; // Number of tracks successfully fitted
85 
86  static const Int_t fgkNParts = 5; // numer of different particle species
88  kElectron = 0,
89  kPion = 1,
90  kKaon = 2,
91  kProton = 3,
92  kMuon = 4,
93  };
94 
96  Bool_t ReadData();
97 
99  Double_t GetProbability(Int_t iType, Double_t mom, Double_t dedx) const;
100 
101 
103 };
104 
105 #endif
CbmTrdSetTracksPidLike::~CbmTrdSetTracksPidLike
virtual ~CbmTrdSetTracksPidLike()
Definition: CbmTrdSetTracksPidLike.cxx:40
CbmTrdSetTracksPidLike::fglobalTrackArray
TClonesArray * fglobalTrackArray
Definition: CbmTrdSetTracksPidLike.h:81
CbmTrdSetTracksPidLike::SetUseMomDependence
void SetUseMomDependence(Bool_t use=kTRUE)
Definition: CbmTrdSetTracksPidLike.h:70
CbmTrdSetTracksPidLike::Exec
virtual void Exec(Option_t *opt)
Definition: CbmTrdSetTracksPidLike.cxx:266
CbmTrdSetTracksPidLike::Finish
virtual void Finish()
Definition: CbmTrdSetTracksPidLike.cxx:428
CbmTrdSetTracksPidLike::kElectron
@ kElectron
Definition: CbmTrdSetTracksPidLike.h:88
CbmTrdSetTracksPidLike::fTrackArray
TClonesArray * fTrackArray
Definition: CbmTrdSetTracksPidLike.h:79
CbmTrdSetTracksPidLike::fMCinput
Bool_t fMCinput
Definition: CbmTrdSetTracksPidLike.h:77
CbmTrdSetTracksPidLike::CbmTrdSetTracksPidLike
CbmTrdSetTracksPidLike(const CbmTrdSetTracksPidLike &)
CbmTrdSetTracksPidLike::EParticleType
EParticleType
Definition: CbmTrdSetTracksPidLike.h:87
CbmTrdSetTracksPidLike::fHistdEdx
TObjArray * fHistdEdx
Definition: CbmTrdSetTracksPidLike.h:83
CbmTrdSetTracksPidLike::SetInputFileName
void SetInputFileName(const char *file)
Definition: CbmTrdSetTracksPidLike.h:68
CbmTrdSetTracksPidLike::operator=
CbmTrdSetTracksPidLike & operator=(const CbmTrdSetTracksPidLike &)
CbmTrdSetTracksPidLike::SetUseMCInfo
void SetUseMCInfo(Bool_t use=kTRUE)
Definition: CbmTrdSetTracksPidLike.h:69
CbmTrdSetTracksPidLike::GetNofTracks
Int_t GetNofTracks() const
Definition: CbmTrdSetTracksPidLike.h:65
CbmTrdSetTracksPidLike::Init
virtual InitStatus Init()
Definition: CbmTrdSetTracksPidLike.cxx:219
CbmTrdSetTracksPidLike::kPion
@ kPion
Definition: CbmTrdSetTracksPidLike.h:89
CbmTrdSetTracksPidLike::fMomDep
Bool_t fMomDep
Definition: CbmTrdSetTracksPidLike.h:78
CbmTrdSetTracksPidLike::fFileName
TString fFileName
Definition: CbmTrdSetTracksPidLike.h:76
CbmTrdSetTracksPidLike::SetParContainers
virtual void SetParContainers()
Definition: CbmTrdSetTracksPidLike.cxx:44
CbmTrdSetTracksPidLike::fgkNParts
static const Int_t fgkNParts
Definition: CbmTrdSetTracksPidLike.h:86
CbmTrdSetTracksPidLike::fTrdHitArray
TClonesArray * fTrdHitArray
Definition: CbmTrdSetTracksPidLike.h:80
CbmTrdSetTracksPidLike::kKaon
@ kKaon
Definition: CbmTrdSetTracksPidLike.h:90
CbmTrdSetTracksPidLike::GetProbability
Double_t GetProbability(Int_t iType, Double_t mom, Double_t dedx) const
Definition: CbmTrdSetTracksPidLike.cxx:364
CbmTrdSetTracksPidLike::ReadData
Bool_t ReadData()
Definition: CbmTrdSetTracksPidLike.cxx:49
CbmTrdSetTracksPidLike::ClassDef
ClassDef(CbmTrdSetTracksPidLike, 1)
CbmTrdSetTracksPidLike::kProton
@ kProton
Definition: CbmTrdSetTracksPidLike.h:91
CbmTrdSetTracksPidLike::kMuon
@ kMuon
Definition: CbmTrdSetTracksPidLike.h:92
CbmTrdSetTracksPidLike::fNofTracks
Int_t fNofTracks
Definition: CbmTrdSetTracksPidLike.h:84
CbmTrdSetTracksPidLike
Definition: CbmTrdSetTracksPidLike.h:30
CbmTrdSetTracksPidLike::CbmTrdSetTracksPidLike
CbmTrdSetTracksPidLike()
Definition: CbmTrdSetTracksPidLike.cxx:28