CbmRoot
CbmKFParticleFinderPID.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //-----------------------------------------------------------
3 
4 #ifndef CbmKFParticleFinderPID_HH
5 #define CbmKFParticleFinderPID_HH
6 
7 #include "FairTask.h"
8 
9 #include "TString.h"
10 
11 
12 #include "CbmMCDataArray.h"
13 #include "CbmMCEventList.h"
14 
15 #include <vector>
16 
17 class TClonesArray;
18 class TFile;
19 class TObject;
20 class CbmDigiManager;
21 
22 class CbmKFParticleFinderPID : public FairTask {
23 public:
24  // Constructors/Destructors ---------
25  CbmKFParticleFinderPID(const char* name = "CbmKFParticleFinderPID",
26  Int_t iVerbose = 0);
28 
29  void SetStsTrackBranchName(const TString& name) {
30  fStsTrackBranchName = name;
31  }
32  void SetGlobalTrackBranchName(const TString& name) {
34  }
35  void SetTofBranchName(const TString& name) { fTofBranchName = name; }
36  void SetMCTrackBranchName(const TString& name) { fMCTracksBranchName = name; }
37  void SetTrackMatchBranchName(const TString& name) {
38  fTrackMatchBranchName = name;
39  }
40  void SetTrdBranchName(const TString& name) { fTrdBranchName = name; }
41  void SetRichBranchName(const TString& name) { fRichBranchName = name; }
42  void SetMuchTrackBranchName(const TString& name) {
43  fMuchTrackBranchName = name;
44  }
45 
46  virtual InitStatus Init();
47  virtual void Exec(Option_t* opt);
48  virtual void Finish();
49 
50  void SetPIDMode(int mode) { fPIDMode = mode; }
51  void UseNoPID() { fPIDMode = 0; }
52  void UseMCPID() { fPIDMode = 1; }
53  void UseDetectorPID() { fPIDMode = 2; }
54  void SetSIS100() { fSisMode = 0; }
55  void SetSIS300() { fSisMode = 1; }
56 
57  void DoNotUseTRD() { fTrdPIDMode = 0; }
58  void UseTRDWknPID() { fTrdPIDMode = 1; }
59  void UseTRDANNPID() { fTrdPIDMode = 2; }
60 
61  void DoNotUseRICH() { fRichPIDMode = 0; }
62  void UseRICHRvspPID() { fRichPIDMode = 1; }
63  void UseRICHANNPID() { fRichPIDMode = 2; }
64 
65  void DoNotUseMuch() { fMuchMode = 0; }
66  void UseMuch() { fMuchMode = 1; }
67 
68  void UseSTSdEdX() { fUseSTSdEdX = kTRUE; }
69  void DoNotUseSTSdEdX() { fUseSTSdEdX = kFALSE; }
70  void UseTRDdEdX() { fUseTRDdEdX = kTRUE; }
71  void DoNotUseTRDdEdX() { fUseTRDdEdX = kFALSE; }
72 
73  //setters for MuCh cuts
74  void SetNMinStsHitsForMuon(int cut) { fMuchCutsInt[0] = cut; }
75  void SetNMinMuchHitsForLMVM(int cut) { fMuchCutsInt[1] = cut; }
76  void SetNMinMuchHitsForJPsi(int cut) { fMuchCutsInt[2] = cut; }
77  void SetMaxChi2ForStsMuonTrack(float cut) { fMuchCutsFloat[0] = cut; }
78  void SetMaxChi2ForMuchMuonTrack(float cut) { fMuchCutsFloat[1] = cut; }
79 
80  const std::vector<int>& GetPID() const { return fPID; }
81 
82 private:
85 
86  void SetMCPID();
87  void SetRecoPID();
88 
89  //names of input branches
95  TString fTofBranchName;
98  TString fTrdBranchName;
102 
103  //input branches
104  TClonesArray* fTrackArray; //input reco tracks
105  TClonesArray* fGlobalTrackArray; //input reco tracks
106  TClonesArray* fStsHitArray;
107  TClonesArray* fStsClusterArray;
109  TClonesArray* fTofHitArray; //input reco tracks
110  TClonesArray* fMCTrackArray; //mc tracks
111  TClonesArray* fTrackMatchArray; //track match
112  TClonesArray* fTrdTrackArray;
113  TClonesArray* fTrdHitArray;
114  TClonesArray* fRichRingArray;
115  TClonesArray* fMuchTrackArray; //input much tracks
117 
118  //PID variables
119  Int_t fPIDMode;
120  Int_t fSisMode;
121  Int_t fTrdPIDMode;
123  Int_t fMuchMode;
124  Bool_t fUseSTSdEdX;
125  Bool_t fUseTRDdEdX;
126 
128 
129  //MuCh cuts
130  float fMuchCutsFloat[2];
131  int fMuchCutsInt[3];
132 
133  std::vector<int> fPID;
134 
136 };
137 
138 #endif
CbmKFParticleFinderPID::SetSIS100
void SetSIS100()
Definition: CbmKFParticleFinderPID.h:54
CbmKFParticleFinderPID
Definition: CbmKFParticleFinderPID.h:22
CbmKFParticleFinderPID::SetMaxChi2ForMuchMuonTrack
void SetMaxChi2ForMuchMuonTrack(float cut)
Definition: CbmKFParticleFinderPID.h:78
CbmKFParticleFinderPID::fMuchMode
Int_t fMuchMode
Definition: CbmKFParticleFinderPID.h:123
CbmKFParticleFinderPID::fStsHitArray
TClonesArray * fStsHitArray
Definition: CbmKFParticleFinderPID.h:106
CbmKFParticleFinderPID::Finish
virtual void Finish()
Definition: CbmKFParticleFinderPID.cxx:241
CbmKFParticleFinderPID::fTofBranchName
TString fTofBranchName
Definition: CbmKFParticleFinderPID.h:95
CbmKFParticleFinderPID::SetRecoPID
void SetRecoPID()
Definition: CbmKFParticleFinderPID.cxx:308
CbmKFParticleFinderPID::UseSTSdEdX
void UseSTSdEdX()
Definition: CbmKFParticleFinderPID.h:68
CbmKFParticleFinderPID::GetPID
const std::vector< int > & GetPID() const
Definition: CbmKFParticleFinderPID.h:80
CbmKFParticleFinderPID::fUseSTSdEdX
Bool_t fUseSTSdEdX
Definition: CbmKFParticleFinderPID.h:124
CbmKFParticleFinderPID::fPIDMode
Int_t fPIDMode
Definition: CbmKFParticleFinderPID.h:119
CbmKFParticleFinderPID::fUseTRDdEdX
Bool_t fUseTRDdEdX
Definition: CbmKFParticleFinderPID.h:125
CbmKFParticleFinderPID::Exec
virtual void Exec(Option_t *opt)
Definition: CbmKFParticleFinderPID.cxx:231
CbmKFParticleFinderPID::fMuchTrackArray
TClonesArray * fMuchTrackArray
Definition: CbmKFParticleFinderPID.h:115
CbmKFParticleFinderPID::fDigiManager
CbmDigiManager * fDigiManager
Definition: CbmKFParticleFinderPID.h:108
CbmKFParticleFinderPID::SetNMinStsHitsForMuon
void SetNMinStsHitsForMuon(int cut)
Definition: CbmKFParticleFinderPID.h:74
CbmMCDataArray.h
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmKFParticleFinderPID::SetGlobalTrackBranchName
void SetGlobalTrackBranchName(const TString &name)
Definition: CbmKFParticleFinderPID.h:32
CbmKFParticleFinderPID::~CbmKFParticleFinderPID
~CbmKFParticleFinderPID()
Definition: CbmKFParticleFinderPID.cxx:89
CbmKFParticleFinderPID::fRichBranchName
TString fRichBranchName
Definition: CbmKFParticleFinderPID.h:100
CbmKFParticleFinderPID::fTrackMatchBranchName
TString fTrackMatchBranchName
Definition: CbmKFParticleFinderPID.h:97
CbmKFParticleFinderPID::fStsHitBranchName
TString fStsHitBranchName
Definition: CbmKFParticleFinderPID.h:92
CbmKFParticleFinderPID::operator=
const CbmKFParticleFinderPID & operator=(const CbmKFParticleFinderPID &)
CbmKFParticleFinderPID::UseTRDWknPID
void UseTRDWknPID()
Definition: CbmKFParticleFinderPID.h:58
CbmKFParticleFinderPID::DoNotUseTRDdEdX
void DoNotUseTRDdEdX()
Definition: CbmKFParticleFinderPID.h:71
CbmKFParticleFinderPID::UseNoPID
void UseNoPID()
Definition: CbmKFParticleFinderPID.h:51
CbmKFParticleFinderPID::SetTrdBranchName
void SetTrdBranchName(const TString &name)
Definition: CbmKFParticleFinderPID.h:40
CbmKFParticleFinderPID::fGlobalTrackArray
TClonesArray * fGlobalTrackArray
Definition: CbmKFParticleFinderPID.h:105
CbmKFParticleFinderPID::UseRICHRvspPID
void UseRICHRvspPID()
Definition: CbmKFParticleFinderPID.h:62
CbmKFParticleFinderPID::fMCTracksBranchName
TString fMCTracksBranchName
Definition: CbmKFParticleFinderPID.h:96
CbmKFParticleFinderPID::UseTRDdEdX
void UseTRDdEdX()
Definition: CbmKFParticleFinderPID.h:70
CbmKFParticleFinderPID::SetSIS300
void SetSIS300()
Definition: CbmKFParticleFinderPID.h:55
CbmKFParticleFinderPID::fTrdTrackArray
TClonesArray * fTrdTrackArray
Definition: CbmKFParticleFinderPID.h:112
CbmKFParticleFinderPID::fStsClusterArray
TClonesArray * fStsClusterArray
Definition: CbmKFParticleFinderPID.h:107
CbmKFParticleFinderPID::UseDetectorPID
void UseDetectorPID()
Definition: CbmKFParticleFinderPID.h:53
CbmKFParticleFinderPID::SetTofBranchName
void SetTofBranchName(const TString &name)
Definition: CbmKFParticleFinderPID.h:35
CbmKFParticleFinderPID::fTrdHitBranchName
TString fTrdHitBranchName
Definition: CbmKFParticleFinderPID.h:99
CbmKFParticleFinderPID::fTrackMatchArray
TClonesArray * fTrackMatchArray
Definition: CbmKFParticleFinderPID.h:111
CbmKFParticleFinderPID::DoNotUseTRD
void DoNotUseTRD()
Definition: CbmKFParticleFinderPID.h:57
CbmKFParticleFinderPID::fMuchCutsInt
int fMuchCutsInt[3]
Definition: CbmKFParticleFinderPID.h:131
CbmKFParticleFinderPID::SetMCPID
void SetMCPID()
Definition: CbmKFParticleFinderPID.cxx:243
CbmKFParticleFinderPID::fPID
std::vector< int > fPID
Definition: CbmKFParticleFinderPID.h:133
CbmKFParticleFinderPID::fMCTracks
CbmMCDataArray * fMCTracks
Definition: CbmKFParticleFinderPID.h:116
CbmKFParticleFinderPID::fMuchCutsFloat
float fMuchCutsFloat[2]
Definition: CbmKFParticleFinderPID.h:130
CbmKFParticleFinderPID::fTofHitArray
TClonesArray * fTofHitArray
Interface to digi branch.
Definition: CbmKFParticleFinderPID.h:109
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmKFParticleFinderPID::SetPIDMode
void SetPIDMode(int mode)
Definition: CbmKFParticleFinderPID.h:50
CbmKFParticleFinderPID::UseRICHANNPID
void UseRICHANNPID()
Definition: CbmKFParticleFinderPID.h:63
CbmKFParticleFinderPID::fStsTrackBranchName
TString fStsTrackBranchName
Definition: CbmKFParticleFinderPID.h:90
CbmKFParticleFinderPID::SetMCTrackBranchName
void SetMCTrackBranchName(const TString &name)
Definition: CbmKFParticleFinderPID.h:36
CbmKFParticleFinderPID::fGlobalTrackBranchName
TString fGlobalTrackBranchName
Definition: CbmKFParticleFinderPID.h:91
CbmKFParticleFinderPID::fMCTrackArray
TClonesArray * fMCTrackArray
Definition: CbmKFParticleFinderPID.h:110
CbmKFParticleFinderPID::fStsClusterBranchName
TString fStsClusterBranchName
Definition: CbmKFParticleFinderPID.h:93
CbmKFParticleFinderPID::fMuchTrackBranchName
TString fMuchTrackBranchName
Definition: CbmKFParticleFinderPID.h:101
CbmKFParticleFinderPID::fTrdHitArray
TClonesArray * fTrdHitArray
Definition: CbmKFParticleFinderPID.h:113
CbmKFParticleFinderPID::SetStsTrackBranchName
void SetStsTrackBranchName(const TString &name)
Definition: CbmKFParticleFinderPID.h:29
CbmKFParticleFinderPID::fRichPIDMode
Int_t fRichPIDMode
Definition: CbmKFParticleFinderPID.h:122
CbmMCEventList.h
CbmKFParticleFinderPID::SetMaxChi2ForStsMuonTrack
void SetMaxChi2ForStsMuonTrack(float cut)
Definition: CbmKFParticleFinderPID.h:77
CbmKFParticleFinderPID::fTimeSliceMode
bool fTimeSliceMode
Definition: CbmKFParticleFinderPID.h:127
CbmKFParticleFinderPID::UseMCPID
void UseMCPID()
Definition: CbmKFParticleFinderPID.h:52
CbmKFParticleFinderPID::DoNotUseRICH
void DoNotUseRICH()
Definition: CbmKFParticleFinderPID.h:61
CbmKFParticleFinderPID::ClassDef
ClassDef(CbmKFParticleFinderPID, 1)
CbmKFParticleFinderPID::CbmKFParticleFinderPID
CbmKFParticleFinderPID(const char *name="CbmKFParticleFinderPID", Int_t iVerbose=0)
Definition: CbmKFParticleFinderPID.cxx:45
CbmKFParticleFinderPID::SetTrackMatchBranchName
void SetTrackMatchBranchName(const TString &name)
Definition: CbmKFParticleFinderPID.h:37
CbmKFParticleFinderPID::fStsDigiBranchName
TString fStsDigiBranchName
Definition: CbmKFParticleFinderPID.h:94
CbmKFParticleFinderPID::SetNMinMuchHitsForJPsi
void SetNMinMuchHitsForJPsi(int cut)
Definition: CbmKFParticleFinderPID.h:76
CbmKFParticleFinderPID::DoNotUseMuch
void DoNotUseMuch()
Definition: CbmKFParticleFinderPID.h:65
CbmKFParticleFinderPID::fRichRingArray
TClonesArray * fRichRingArray
Definition: CbmKFParticleFinderPID.h:114
CbmKFParticleFinderPID::CbmKFParticleFinderPID
CbmKFParticleFinderPID(const CbmKFParticleFinderPID &)
CbmKFParticleFinderPID::DoNotUseSTSdEdX
void DoNotUseSTSdEdX()
Definition: CbmKFParticleFinderPID.h:69
CbmKFParticleFinderPID::SetNMinMuchHitsForLMVM
void SetNMinMuchHitsForLMVM(int cut)
Definition: CbmKFParticleFinderPID.h:75
CbmKFParticleFinderPID::SetRichBranchName
void SetRichBranchName(const TString &name)
Definition: CbmKFParticleFinderPID.h:41
CbmKFParticleFinderPID::SetMuchTrackBranchName
void SetMuchTrackBranchName(const TString &name)
Definition: CbmKFParticleFinderPID.h:42
CbmKFParticleFinderPID::Init
virtual InitStatus Init()
Definition: CbmKFParticleFinderPID.cxx:91
CbmKFParticleFinderPID::fTrdBranchName
TString fTrdBranchName
Definition: CbmKFParticleFinderPID.h:98
CbmKFParticleFinderPID::fTrackArray
TClonesArray * fTrackArray
Definition: CbmKFParticleFinderPID.h:104
CbmKFParticleFinderPID::UseMuch
void UseMuch()
Definition: CbmKFParticleFinderPID.h:66
CbmKFParticleFinderPID::fTrdPIDMode
Int_t fTrdPIDMode
Definition: CbmKFParticleFinderPID.h:121
CbmKFParticleFinderPID::fSisMode
Int_t fSisMode
Definition: CbmKFParticleFinderPID.h:120
CbmKFParticleFinderPID::UseTRDANNPID
void UseTRDANNPID()
Definition: CbmKFParticleFinderPID.h:59