CbmRoot
CbmKFTrackQA.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //-----------------------------------------------------------
3 
4 #ifndef CbmKFTrackQA_HH
5 #define CbmKFTrackQA_HH
6 
7 #include "FairTask.h"
8 
9 #include "TString.h"
10 
11 #include <map>
12 #include <vector>
13 
14 class KFParticleTopoReconstructor;
15 class KFTopoPerformance;
16 class TClonesArray;
17 class TFile;
18 class TDirectory;
19 class TH1F;
20 class TH2F;
21 class TObject;
22 class CbmMCDataArray;
23 
24 class CbmKFTrackQA : public FairTask {
25 public:
26  // Constructors/Destructors ---------
27  CbmKFTrackQA(const char* name = "CbmKFTrackQA",
28  Int_t iVerbose = 0,
29  TString outFileName = "CbmKFTrackQA.root");
30  ~CbmKFTrackQA();
31 
32  void SetStsTrackBranchName(const TString& name) {
33  fStsTrackBranchName = name;
34  }
35  void SetGlobalTrackBranchName(const TString& name) {
37  }
38  void SetTofBranchName(const TString& name) { fTofBranchName = name; }
39  void SetMCTrackBranchName(const TString& name) { fMCTracksBranchName = name; }
40  void SetTrackMatchBranchName(const TString& name) {
42  }
43  void SetMuchTrackMatchBranchName(const TString& name) {
45  }
46  void SetTrdBranchName(const TString& name) { fTrdBranchName = name; }
47  void SetTrdHitBranchName(const TString& name) { fTrdHitBranchName = name; }
48  void SetRichBranchName(const TString& name) { fRichBranchName = name; }
49  void SetMuchTrackBranchName(const TString& name) {
50  fMuchTrackBranchName = name;
51  }
52  Int_t GetZtoNStation(Double_t getZ);
53 
54  virtual InitStatus Init();
55  virtual void Exec(Option_t* opt);
56  virtual void Finish();
57 
58 private:
61 
62  void WriteHistosCurFile(TObject* obj);
63  int GetHistoIndex(int pdg);
64 
65  //names of input branches
68  TString fRichBranchName;
69  TString fTrdBranchName;
71  TString fTofBranchName;
79 
80  //input branches
81  TClonesArray* fStsTrackArray;
82  TClonesArray* fGlobalTrackArray;
83  TClonesArray* fRichRingArray;
84  TClonesArray* fTrdTrackArray;
85  TClonesArray* fTrdHitArray;
86  TClonesArray* fTofHitArray;
87  TClonesArray* fMuchTrackArray;
88  TClonesArray* fMCTrackArray;
89  TClonesArray* fStsTrackMatchArray;
90  TClonesArray* fRichRingMatchArray;
91  TClonesArray* fTrdTrackMatchArray;
92  TClonesArray* fTofHitMatchArray;
93  TClonesArray* fMuchTrackMatchArray;
94 
95  CbmMCDataArray* fTofPoints; // CbmTofPoint array
96 
97  //output file with histograms
98  TString fOutFileName;
99  TFile* fOutFile;
100  TDirectory* fHistoDir;
101 
102  Int_t fNEvents;
103  std::map<int, int> fPDGtoIndexMap;
104 
105  //histograms
106  //STS
107  static const int NStsHisto = 3;
108  TH1F* hStsHisto
109  [8]
110  [NStsHisto]; //All tracks, electrons, muons, pion, kaon, protons, fragments, ghost
111  TH1F* hStsFitHisto[8][10];
112  //Much
113  static const int NMuchHisto = 5;
114  TH1F* hMuchHisto[3][NMuchHisto]; //Muons, Background, Ghost
115  //RICH
116  static const int NRichRingHisto2D = 3; // r, axis a, axis b
118  [10]
119  [NRichRingHisto2D]; //All tracks, electrons, muons, pions, kaons, protons, fragments, mismatch, ghost track, ghost ring
120  //Trd
121  static const int NTrdHisto = 2;
122  TH1F* hTrdHisto
123  [14]
124  [NTrdHisto]; //All tracks, electrons, muons, pions, kaons, protons, fragments, mismatch, ghost track, ghost trd track, d, t, He3, He4
125  static const int NTrdHisto2D = 1;
127  //Tof
128  static const int NTofHisto2D = 2;
130  [14]
131  [NTofHisto2D]; //All tracks, electrons, muons, pions, kaons, protons, fragments, mismatch, ghost hit, ghost tof hit, d, t, He3, He4
132 
133 
135 };
136 
137 #endif
CbmKFTrackQA::fOutFile
TFile * fOutFile
Definition: CbmKFTrackQA.h:99
CbmKFTrackQA::fPDGtoIndexMap
std::map< int, int > fPDGtoIndexMap
Definition: CbmKFTrackQA.h:103
CbmKFTrackQA::SetTrdBranchName
void SetTrdBranchName(const TString &name)
Definition: CbmKFTrackQA.h:46
CbmKFTrackQA::fMuchTrackMatchBranchName
TString fMuchTrackMatchBranchName
Definition: CbmKFTrackQA.h:78
CbmKFTrackQA::fTrdBranchName
TString fTrdBranchName
Definition: CbmKFTrackQA.h:69
CbmKFTrackQA::CbmKFTrackQA
CbmKFTrackQA(const char *name="CbmKFTrackQA", Int_t iVerbose=0, TString outFileName="CbmKFTrackQA.root")
Definition: CbmKFTrackQA.cxx:51
CbmKFTrackQA::fStsTrackArray
TClonesArray * fStsTrackArray
Definition: CbmKFTrackQA.h:81
CbmKFTrackQA::WriteHistosCurFile
void WriteHistosCurFile(TObject *obj)
Definition: CbmKFTrackQA.cxx:862
CbmKFTrackQA::hStsFitHisto
TH1F * hStsFitHisto[8][10]
Definition: CbmKFTrackQA.h:111
CbmKFTrackQA::hTrdHisto
TH1F * hTrdHisto[14][NTrdHisto]
Definition: CbmKFTrackQA.h:124
CbmKFTrackQA::SetTrdHitBranchName
void SetTrdHitBranchName(const TString &name)
Definition: CbmKFTrackQA.h:47
CbmKFTrackQA::SetTofBranchName
void SetTofBranchName(const TString &name)
Definition: CbmKFTrackQA.h:38
CbmKFTrackQA::hStsHisto
TH1F * hStsHisto[8][NStsHisto]
Definition: CbmKFTrackQA.h:110
CbmKFTrackQA::fTrdHitBranchName
TString fTrdHitBranchName
Definition: CbmKFTrackQA.h:70
CbmKFTrackQA::Exec
virtual void Exec(Option_t *opt)
Definition: CbmKFTrackQA.cxx:423
CbmKFTrackQA::fTofHitMatchBranchName
TString fTofHitMatchBranchName
Definition: CbmKFTrackQA.h:77
CbmKFTrackQA::fRichRingArray
TClonesArray * fRichRingArray
Definition: CbmKFTrackQA.h:83
CbmKFTrackQA::NTrdHisto2D
static const int NTrdHisto2D
Definition: CbmKFTrackQA.h:125
CbmKFTrackQA::fTrdTrackArray
TClonesArray * fTrdTrackArray
Definition: CbmKFTrackQA.h:84
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmKFTrackQA::operator=
const CbmKFTrackQA & operator=(const CbmKFTrackQA &)
CbmKFTrackQA::fTrdTrackMatchBranchName
TString fTrdTrackMatchBranchName
Definition: CbmKFTrackQA.h:76
CbmKFTrackQA::SetTrackMatchBranchName
void SetTrackMatchBranchName(const TString &name)
Definition: CbmKFTrackQA.h:40
CbmKFTrackQA::SetStsTrackBranchName
void SetStsTrackBranchName(const TString &name)
Definition: CbmKFTrackQA.h:32
CbmKFTrackQA::GetZtoNStation
Int_t GetZtoNStation(Double_t getZ)
Definition: CbmKFTrackQA.cxx:892
CbmKFTrackQA::NTofHisto2D
static const int NTofHisto2D
Definition: CbmKFTrackQA.h:128
CbmKFTrackQA::hTrdHisto2D
TH2F * hTrdHisto2D[14][NTrdHisto2D]
Definition: CbmKFTrackQA.h:126
CbmKFTrackQA::hMuchHisto
TH1F * hMuchHisto[3][NMuchHisto]
Definition: CbmKFTrackQA.h:114
CbmKFTrackQA::~CbmKFTrackQA
~CbmKFTrackQA()
Definition: CbmKFTrackQA.cxx:323
CbmKFTrackQA::fNEvents
Int_t fNEvents
Definition: CbmKFTrackQA.h:102
CbmKFTrackQA::SetRichBranchName
void SetRichBranchName(const TString &name)
Definition: CbmKFTrackQA.h:48
CbmKFTrackQA::Finish
virtual void Finish()
Definition: CbmKFTrackQA.cxx:847
CbmKFTrackQA::SetMuchTrackBranchName
void SetMuchTrackBranchName(const TString &name)
Definition: CbmKFTrackQA.h:49
CbmKFTrackQA::ClassDef
ClassDef(CbmKFTrackQA, 1)
CbmKFTrackQA::fMCTrackArray
TClonesArray * fMCTrackArray
Definition: CbmKFTrackQA.h:88
CbmKFTrackQA::fMuchTrackBranchName
TString fMuchTrackBranchName
Definition: CbmKFTrackQA.h:72
CbmKFTrackQA::GetHistoIndex
int GetHistoIndex(int pdg)
Definition: CbmKFTrackQA.cxx:883
CbmKFTrackQA::fGlobalTrackArray
TClonesArray * fGlobalTrackArray
Definition: CbmKFTrackQA.h:82
CbmKFTrackQA::fMCTracksBranchName
TString fMCTracksBranchName
Definition: CbmKFTrackQA.h:73
CbmKFTrackQA::fStsTrackMatchArray
TClonesArray * fStsTrackMatchArray
Definition: CbmKFTrackQA.h:89
CbmKFTrackQA::fTofHitMatchArray
TClonesArray * fTofHitMatchArray
Definition: CbmKFTrackQA.h:92
CbmKFTrackQA::hRichRingHisto2D
TH2F * hRichRingHisto2D[10][NRichRingHisto2D]
Definition: CbmKFTrackQA.h:119
CbmKFTrackQA::fStsTrackMatchBranchName
TString fStsTrackMatchBranchName
Definition: CbmKFTrackQA.h:74
CbmKFTrackQA::hTofHisto2D
TH2F * hTofHisto2D[14][NTofHisto2D]
Definition: CbmKFTrackQA.h:131
CbmKFTrackQA::fStsTrackBranchName
TString fStsTrackBranchName
Definition: CbmKFTrackQA.h:66
CbmKFTrackQA
Definition: CbmKFTrackQA.h:24
CbmKFTrackQA::fTrdTrackMatchArray
TClonesArray * fTrdTrackMatchArray
Definition: CbmKFTrackQA.h:91
CbmKFTrackQA::SetMuchTrackMatchBranchName
void SetMuchTrackMatchBranchName(const TString &name)
Definition: CbmKFTrackQA.h:43
CbmKFTrackQA::fTofBranchName
TString fTofBranchName
Definition: CbmKFTrackQA.h:71
CbmKFTrackQA::NStsHisto
static const int NStsHisto
Definition: CbmKFTrackQA.h:107
CbmKFTrackQA::fMuchTrackMatchArray
TClonesArray * fMuchTrackMatchArray
Definition: CbmKFTrackQA.h:93
CbmKFTrackQA::Init
virtual InitStatus Init()
Definition: CbmKFTrackQA.cxx:325
CbmKFTrackQA::fRichBranchName
TString fRichBranchName
Definition: CbmKFTrackQA.h:68
CbmKFTrackQA::fTofPoints
CbmMCDataArray * fTofPoints
Definition: CbmKFTrackQA.h:95
CbmKFTrackQA::fGlobalTrackBranchName
TString fGlobalTrackBranchName
Definition: CbmKFTrackQA.h:67
CbmKFTrackQA::NRichRingHisto2D
static const int NRichRingHisto2D
Definition: CbmKFTrackQA.h:116
CbmKFTrackQA::NMuchHisto
static const int NMuchHisto
Definition: CbmKFTrackQA.h:113
CbmKFTrackQA::fTrdHitArray
TClonesArray * fTrdHitArray
Definition: CbmKFTrackQA.h:85
CbmKFTrackQA::fRichRingMatchBranchName
TString fRichRingMatchBranchName
Definition: CbmKFTrackQA.h:75
CbmKFTrackQA::SetMCTrackBranchName
void SetMCTrackBranchName(const TString &name)
Definition: CbmKFTrackQA.h:39
CbmKFTrackQA::SetGlobalTrackBranchName
void SetGlobalTrackBranchName(const TString &name)
Definition: CbmKFTrackQA.h:35
CbmKFTrackQA::fTofHitArray
TClonesArray * fTofHitArray
Definition: CbmKFTrackQA.h:86
CbmKFTrackQA::fRichRingMatchArray
TClonesArray * fRichRingMatchArray
Definition: CbmKFTrackQA.h:90
CbmKFTrackQA::fMuchTrackArray
TClonesArray * fMuchTrackArray
Definition: CbmKFTrackQA.h:87
CbmKFTrackQA::NTrdHisto
static const int NTrdHisto
Definition: CbmKFTrackQA.h:121
CbmKFTrackQA::fOutFileName
TString fOutFileName
Definition: CbmKFTrackQA.h:98
CbmKFTrackQA::fHistoDir
TDirectory * fHistoDir
Definition: CbmKFTrackQA.h:100
CbmKFTrackQA::CbmKFTrackQA
CbmKFTrackQA(const CbmKFTrackQA &)