BmnRoot
Loading...
Searching...
No Matches
CbmStsReconstructionQa.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- CbmStsReconstructionQa header file -----
3// ----- Created 06/02/07 by R. Karabowicz -----
4// -------------------------------------------------------------------------
5
6
14#ifndef CBMSTSRECONSTRUCTIONQA_H
15#define CBMSTSRECONSTRUCTIONQA_H 1
16
17
18#include "FairTask.h"
19
20#include "TStopwatch.h"
21#include "TVector3.h"
22
23#include <map>
24#include <set>
25class TCanvas;
26class TPad;
27class TClonesArray;
28class TH1;
29class TH1F;
30class TH2F;
31class TH3F;
32class TList;
34class CbmGeoStsPar;
35class CbmMCTrack;
36
37
38class CbmStsReconstructionQa : public FairTask
39{
40 public:
42 CbmStsReconstructionQa(Int_t iVerbose = 1);
43
44
51 CbmStsReconstructionQa(Bool_t visualizeBool, Int_t minHits, Double_t quota, Int_t iVerbose);
52
53
56
57
59 virtual void SetParContainers();
60
61 void SetShowStation1(Int_t stNr) {fShowStation1 = stNr-1; }
62 void SetShowStation2(Int_t stNr) {fShowStation2 = stNr-1; }
63
65 virtual InitStatus Init();
66
67
69 virtual InitStatus ReInit();
70
71
73 virtual void Exec(Option_t* opt);
74
75 private:
77 virtual void Finish();
78
80 InitStatus GetGeometry();
81
82
84 void CreateHistos();
85
86
88 void Reset();
89
90
92 void FillHitMap();
93
94
100 void FillMatchMap(Int_t& nRec, Int_t& nGhosts, Int_t& nClones);
101
102
108 void DivideHistos(TH1* histo1, TH1* histo2, TH1* histo3);
109
110
112 std::map<Int_t, Int_t> fHitMap;
113 std::map<CbmMCTrack*, std::set<Int_t> > fHitTrackMap;
114
116 std::map<Int_t, Int_t> fMatchMap;
117
118
120 std::map<Int_t, Double_t> fQualiMap;
121
122
124 TClonesArray* fMCTracks; // MCtrack
125 TClonesArray* fStsPoints; // StsPoints
126 TClonesArray* fStsHits; // StsHits
127 TClonesArray* fStsTracks; // StsTrack
128 TClonesArray* fMatches; // StsTrackMatch
129 TClonesArray* fStsDigis; // StsDigi
130
132 FairGeoPassivePar* fPassGeo; // Passive geometry parameters
133 CbmGeoStsPar* fStsGeo; // STS geometry parameters
134 TVector3 fTargetPos; // Target centre position
135 Int_t fNStations; // Number of STS stations
136 Int_t fStationNrFromMcId[10000]; // station number from mc id
137 Int_t fNSectors[20]; // number of sectors per station
138 Double_t fWidthSectors[20][500]; // width of the sectors to calculate nof channels
139 Int_t HitSt [100000][10];
141 Int_t fMinHits; // Minimal number of StsHits for considered MCTrack
142 Double_t fQuota; // True/all hits for track to be considered reconstructed
143
144
146 TH1F* fhMomAccAll, *fhMomRecAll, *fhMomEffAll; // eff. vs. p, all
147 TH1F* fhMomAccPrim, *fhMomRecPrim, *fhMomEffPrim; // eff. vs. p, vertex
148 TH1F* fhMomAccSec, *fhMomRecSec, *fhMomEffSec; // eff. vs. p, non-vertex
149 TH1F* fhNpAccAll, *fhNpRecAll, *fhNpEffAll; // eff. vs. np, all
150 TH1F* fhNpAccPrim, *fhNpRecPrim, *fhNpEffPrim; // eff. vs. np, vertex
151 TH1F* fhNpAccSec, *fhNpRecSec, *fhNpEffSec; // eff. vs. np, non-vertex
152 TH1F* fhZAccSec, *fhZRecSec, *fhZEffSec; // eff. vs. z, non-vertex
153 TH1F* fhNhClones, *fhNhGhosts; // # hits of clones and ghosts
154
155 // acc., eff. vs. track direction, vertex
156// TH2F* fhDirEmiPrimM[25], *fhDirAccPrimM[25], *fhDirAcMPrimM[25], *fhDirRecPrimM[25], *fhDirEffPrimM[25];
157// TH2F* fhDirEmiPrimP[25], *fhDirAccPrimP[25], *fhDirAcMPrimP[25], *fhDirRecPrimP[25], *fhDirEffPrimP[25];
158
159 Int_t fPartPdgTable[10];
160 TH1F *fhMomAccPart[10], *fhMomRecPart[10], *fhMomEffPart[10];
161
162 TH1F* fhMomClones, *fhMomGhosts; // # hits of clones and ghosts
163
164 TH2F* fhMomResAll;
165 TH2F* fhMomResPrim;
166 TH2F* fhMomResSec;
167 TH1F* fhLowBand;
168 TH1F* fhHigBand;
169
170 // TH2F* fhHitPointCorrelation[100];
171
172 TH3F* fhPrimaryVertex;
173 TH1F* fhRefTracks;
174 TH1F* fhRecRefTracks;
175
176/* TH1F* fhNofDigisPChip[20][300][2][8]; // per station, sector, side, chip */
177/* TH1F* fhNofFiredDigis[20][300][2]; // per station, sector, side */
178/* TH1F* fhNofHits [20][300]; // per station, sector */
179
180/* TH2F* fhEnergyLoss[20]; */
181
182 // histograms for track reconstruction: chi2, covMatr., etc...
183 TH1F* fhStsTrackFPos[3];
184 TH1F* fhStsTrackLPos[3];
185 TH1F* fhStsTrackFDir[2];
186 TH1F* fhStsTrackLDir[2];
187// TH1F* fhStsTrackFCovEl[15];
188// TH1F* fhStsTrackLCovEl[15];
189 TH1F* fhStsTrackFMom;
190 TH1F* fhStsTrackLMom;
191 TH1F* fhStsTrackChiSq;
192
194 TList* fHistoList;
195
196 TList* fOccupHList;
197
199 Int_t fNAccAll, fNAccPrim, fNAccRef, fNAccSec;
200 Int_t fNRecAll, fNRecPrim, fNRecRef, fNRecSec;
201 Int_t fNGhosts, fNClones;
202 Int_t fNStsTracks;
203 Int_t fNEvents;
204 Int_t fNEventsFailed;
205 Double_t fTime;
207 Bool_t fOnlineAnalysis;
208 TCanvas* fOnlineCanvas;
209 TPad* fOnlinePad[10];
210 Int_t fShowStation1;
211 Int_t fShowStation2;
212
213 Int_t fNofFiredDigis[20][300][2]; // per station, sector, side
214 Int_t fNofDigisPChip[20][300][2][8]; // per station, sector, side, chip
215 Int_t fNofHits[20][300]; // per station, sector
216
218 TStopwatch fTimer;
219
222
223 ClassDef(CbmStsReconstructionQa,1);
224
225};
226
227#endif
virtual void Exec(Option_t *opt)