BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
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/** CbmStsReconstructionQa.h
7 *@author R.Karabowicz <r.karabowicz@gsi.de>
8 **
9 ** Quality check task for CbmStsReconstruction
10 **/
11
12#ifndef CBMSTSRECONSTRUCTIONQA_H
13#define CBMSTSRECONSTRUCTIONQA_H 1
14
15#include "FairTask.h"
16#include "TStopwatch.h"
17#include "TVector3.h"
18
19#include <map>
20#include <set>
21class TCanvas;
22class TPad;
23class TClonesArray;
24class TH1;
25class TH1F;
26class TH2F;
27class TH3F;
28class TList;
30class CbmGeoStsPar;
31class CbmMCTrack;
32
34{
35 public:
36 /** Default constructor **/
37 CbmStsReconstructionQa(Int_t iVerbose = 1);
38
39 /** Standard constructor
40 *@param visualizeBool Bool to turn visualization on/off
41 *@param minHits Minimal number of StsHits for considered MCTracks
42 *@param quota True/all hits for track to be considered reconstructed
43 *@param iVerbose Verbosity level
44 **/
45 CbmStsReconstructionQa(Bool_t visualizeBool, Int_t minHits, Double_t quota, Int_t iVerbose);
46
47 /** Destructor **/
49
50 /** Set parameter containers **/
51 virtual void SetParContainers();
52
53 void SetShowStation1(Int_t stNr) { fShowStation1 = stNr - 1; }
54 void SetShowStation2(Int_t stNr) { fShowStation2 = stNr - 1; }
55
56 /** Initialisation **/
57 virtual InitStatus Init();
58
59 /** Reinitialisation **/
60 virtual InitStatus ReInit();
61
62 /** Execution **/
63 virtual void Exec(Option_t* opt);
64
65 private:
66 /** Finish **/
67 virtual void Finish();
68
69 /** Read the geometry parameters **/
70 InitStatus GetGeometry();
71
72 /** Create histograms **/
73 void CreateHistos();
74
75 /** Reset histograms and counters **/
76 void Reset();
77
78 /** Fill a map from MCTrack index to number of corresponding StsHits **/
79 void FillHitMap();
80
81 /** Fill a map from MCTrack index to matched StsTrack index
82 *@param nRec Number of reconstructed tracks (return)
83 *@param nGhosts Number of ghost tracks (return)
84 *@param nClones Number of clone tracks (return)
85 **/
86 void FillMatchMap(Int_t& nRec, Int_t& nGhosts, Int_t& nClones);
87
88 /** Divide histograms (reco/all) with correct error for the efficiency
89 *@param histo1 reconstructed tracks
90 *@param histo2 all tracks (normalisation)
91 *@param histo3 efficiency
92 **/
93 void DivideHistos(TH1* histo1, TH1* histo2, TH1* histo3);
94
95 /** Map from MCTrack index to number of attached StsHits **/
96 std::map<Int_t, Int_t> fHitMap;
97 std::map<CbmMCTrack*, std::set<Int_t>> fHitTrackMap;
98
99 /** Map from MCTrack index to matched StsTrack index **/
100 std::map<Int_t, Int_t> fMatchMap;
101
102 /** Map from MCTrack index to percentage of matched hits **/
103 std::map<Int_t, Double_t> fQualiMap;
104
105 /** Pointers to data arrays **/
110 TClonesArray* fMatches; // StsTrackMatch
112
113 /** Geometry parameters **/
114 FairGeoPassivePar* fPassGeo; // Passive geometry parameters
115 CbmGeoStsPar* fStsGeo; // STS geometry parameters
116 TVector3 fTargetPos; // Target centre position
117 Int_t fNStations; // Number of STS stations
118 Int_t fStationNrFromMcId[10000]; // station number from mc id
119 Int_t fNSectors[20]; // number of sectors per station
120 Double_t fWidthSectors[20][500]; // width of the sectors to calculate nof channels
121 Int_t HitSt[100000][10];
122 /** Task parameters **/
123 Int_t fMinHits; // Minimal number of StsHits for considered MCTrack
124 Double_t fQuota; // True/all hits for track to be considered reconstructed
125
126 /** Histograms **/
127 TH1F *fhMomAccAll, *fhMomRecAll, *fhMomEffAll; // eff. vs. p, all
128 TH1F *fhMomAccPrim, *fhMomRecPrim, *fhMomEffPrim; // eff. vs. p, vertex
129 TH1F *fhMomAccSec, *fhMomRecSec, *fhMomEffSec; // eff. vs. p, non-vertex
130 TH1F *fhNpAccAll, *fhNpRecAll, *fhNpEffAll; // eff. vs. np, all
131 TH1F *fhNpAccPrim, *fhNpRecPrim, *fhNpEffPrim; // eff. vs. np, vertex
132 TH1F *fhNpAccSec, *fhNpRecSec, *fhNpEffSec; // eff. vs. np, non-vertex
133 TH1F *fhZAccSec, *fhZRecSec, *fhZEffSec; // eff. vs. z, non-vertex
134 TH1F *fhNhClones, *fhNhGhosts; // # hits of clones and ghosts
135
136 // acc., eff. vs. track direction, vertex
137 // TH2F* fhDirEmiPrimM[25], *fhDirAccPrimM[25], *fhDirAcMPrimM[25], *fhDirRecPrimM[25], *fhDirEffPrimM[25];
138 // TH2F* fhDirEmiPrimP[25], *fhDirAccPrimP[25], *fhDirAcMPrimP[25], *fhDirRecPrimP[25], *fhDirEffPrimP[25];
139
142
143 TH1F *fhMomClones, *fhMomGhosts; // # hits of clones and ghosts
144
150
151 // TH2F* fhHitPointCorrelation[100];
152
156
157 /* TH1F* fhNofDigisPChip[20][300][2][8]; // per station, sector, side, chip */
158 /* TH1F* fhNofFiredDigis[20][300][2]; // per station, sector, side */
159 /* TH1F* fhNofHits [20][300]; // per station, sector */
160
161 /* TH2F* fhEnergyLoss[20]; */
162
163 // histograms for track reconstruction: chi2, covMatr., etc...
168 // TH1F* fhStsTrackFCovEl[15];
169 // TH1F* fhStsTrackLCovEl[15];
173
174 /** List of histograms **/
176
178
179 /** Counters **/
184 Int_t fNEvents; /** Number of events with success **/
185 Int_t fNEventsFailed; /** Number of events with failure **/
186 Double_t fTime; /** Total real time used for good events **/
187
193
194 Int_t fNofFiredDigis[20][300][2]; // per station, sector, side
195 Int_t fNofDigisPChip[20][300][2][8]; // per station, sector, side, chip
196 Int_t fNofHits[20][300]; // per station, sector
197
198 /** Timer **/
200
203
205};
206
207#endif
bool Bool_t
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
CbmMCTrack.h.
Definition CbmMCTrack.h:26
Int_t fNEventsFailed
Number of events with success.
std::map< Int_t, Int_t > fHitMap
Map from MCTrack index to number of attached StsHits.
std::map< Int_t, Int_t > fMatchMap
Map from MCTrack index to matched StsTrack index.
std::map< CbmMCTrack *, std::set< Int_t > > fHitTrackMap
virtual void Exec(Option_t *opt)
Execution.
TClonesArray * fMCTracks
Pointers to data arrays.
virtual void SetParContainers()
Set parameter containers.
TList * fHistoList
List of histograms.
virtual InitStatus ReInit()
Reinitialisation.
CbmStsReconstructionQa operator=(const CbmStsReconstructionQa &)
void CreateHistos()
Create histograms.
Double_t fTime
Number of events with failure.
virtual InitStatus Init()
Initialisation.
void Reset()
Reset histograms and counters.
InitStatus GetGeometry()
Read the geometry parameters.
CbmStsReconstructionQa(Int_t iVerbose=1)
Default constructor.
Int_t fMinHits
Task parameters.
std::map< Int_t, Double_t > fQualiMap
Map from MCTrack index to percentage of matched hits.
Bool_t fOnlineAnalysis
Total real time used for good events.
virtual ~CbmStsReconstructionQa()
Destructor.
void FillMatchMap(Int_t &nRec, Int_t &nGhosts, Int_t &nClones)
Fill a map from MCTrack index to matched StsTrack index.
Int_t fNofDigisPChip[20][300][2][8]
FairGeoPassivePar * fPassGeo
Geometry parameters.
void FillHitMap()
Fill a map from MCTrack index to number of corresponding StsHits.
CbmStsReconstructionQa(const CbmStsReconstructionQa &)
void DivideHistos(TH1 *histo1, TH1 *histo2, TH1 *histo3)
Divide histograms (reco/all) with correct error for the efficiency.