BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmStsFindTracksQa.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- CbmStsFindTracksQa header file -----
3// ----- Created 11/01/06 by V. Friese -----
4// -------------------------------------------------------------------------
5
6/** CbmStsFindTracksQa.h
7 *@author V.Friese <v.friese@gsi.de>
8 **
9 ** Quality check task for CbmStsFindTracks
10 **/
11
12#ifndef CBMSTSTRACKFINDERQA_H
13#define CBMSTSTRACKFINDERQA_H 1
14
15#include "FairTask.h"
16#include "TStopwatch.h"
17#include "TVector3.h"
18
19#include <map>
20
21class TCanvas;
22class TClonesArray;
23class TH1;
24class TH1F;
25class TList;
27class CbmGeoStsPar;
28
29class CbmStsFindTracksQa : public FairTask
30{
31
32 public:
33 /** Default constructor **/
35
36 /** Standard constructor
37 *@param minHits Minimal number of StsHits for considered MCTracks
38 *@param quota True/all hits for track to be considered reconstructed
39 *@param iVerbose Verbosity level
40 **/
41 CbmStsFindTracksQa(Int_t minHits, Double_t quota, Int_t iVerbose);
42
43 /** Destructor **/
45
46 /** Set parameter containers **/
47 virtual void SetParContainers();
48
49 /** Initialisation **/
50 virtual InitStatus Init();
51
52 /** Reinitialisation **/
53 virtual InitStatus ReInit();
54
55 /** Execution **/
56 virtual void Exec(Option_t* opt);
57
58 private:
59 /** Finish **/
60 virtual void Finish();
61
62 /** Read the geometry parameters **/
63 InitStatus GetGeometry();
64
65 /** Create histograms **/
67
68 /** Reset histograms and counters **/
69 void Reset();
70
71 /** Fill a map from MCTrack index to number of corresponding StsHits **/
72 void FillHitMap();
73
74 /** Fill a map from MCTrack index to matched StsTrack index
75 *@param nRec Number of reconstructed tracks (return)
76 *@param nGhosts Number of ghost tracks (return)
77 *@param nClones Number of clone tracks (return)
78 **/
79 void FillMatchMap(Int_t& nRec, Int_t& nGhosts, Int_t& nClones);
80
81 /** Divide histograms (reco/all) with correct error for the efficiency
82 *@param histo1 reconstructed tracks
83 *@param histo2 all tracks (normalisation)
84 *@param histo3 efficiency
85 **/
86 void DivideHistos(TH1* histo1, TH1* histo2, TH1* histo3);
87
88 /** Map from MCTrack index to number of attached StsHits **/
89 std::map<Int_t, Int_t> fHitMap;
90
91 /** Map from MCTrack index to matched StsTrack index **/
92 std::map<Int_t, Int_t> fMatchMap;
93
94 /** Map from MCTrack index to percentage of matched hits **/
95 std::map<Int_t, Double_t> fQualiMap;
96
97 /** Pointers to data arrays **/
98 TClonesArray* fMCTracks; // MCtrack
99 TClonesArray* fStsPoints; // StsPoints
100 TClonesArray* fStsHits; // StsHits
101 TClonesArray* fStsTracks; // StsTrack
102 TClonesArray* fMatches; // StsTrackMatch
103
104 /** Geometry parameters **/
105 FairGeoPassivePar* fPassGeo; // Passive geometry parameters
106 CbmGeoStsPar* fStsGeo; // STS geometry parameters
107 TVector3 fTargetPos; // Target centre position
108 Int_t fNStations; // Number of STS stations
109
110 /** Task parameters **/
111 Int_t fMinHits; // Minimal number of StsHits for considered MCTrack
112 Double_t fQuota; // True/all hits for track to be considered reconstructed
113
114 /** Histograms **/
115 TH1F *fhMomAccAll, *fhMomRecAll, *fhMomEffAll; // eff. vs. p, all
116 TH1F *fhMomAccPrim, *fhMomRecPrim, *fhMomEffPrim; // eff. vs. p, vertex
117 TH1F *fhMomAccSec, *fhMomRecSec, *fhMomEffSec; // eff. vs. p, non-vertex
118 TH1F *fhNpAccAll, *fhNpRecAll, *fhNpEffAll; // eff. vs. np, all
119 TH1F *fhNpAccPrim, *fhNpRecPrim, *fhNpEffPrim; // eff. vs. np, vertex
120 TH1F *fhNpAccSec, *fhNpRecSec, *fhNpEffSec; // eff. vs. np, non-vertex
121 TH1F *fhZAccSec, *fhZRecSec, *fhZEffSec; // eff. vs. z, non-vertex
122 TH1F *fhNhClones, *fhNhGhosts; // # hits of clones and ghosts
123
124 /** List of histograms **/
126
127 /** Counters **/
131 Int_t fNEvents; /** Number of events with success **/
132 Int_t fNEventsFailed; /** Number of events with failure **/
133 Double_t fTime; /** Total real time used for good events **/
134
135 /** Timer **/
137
140
142};
143
144#endif
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
TStopwatch fTimer
Total real time used for good events.
virtual void Finish()
Finish.
CbmStsFindTracksQa(Int_t iVerbose=1)
Default constructor.
TClonesArray * fStsPoints
CbmStsFindTracksQa(const CbmStsFindTracksQa &)
void FillHitMap()
Fill a map from MCTrack index to number of corresponding StsHits.
void CreateHistos()
Create histograms.
CbmStsFindTracksQa operator=(const CbmStsFindTracksQa &)
TClonesArray * fMCTracks
Pointers to data arrays.
TClonesArray * fStsTracks
virtual InitStatus Init()
Initialisation.
TList * fHistoList
List of histograms.
virtual ~CbmStsFindTracksQa()
Destructor.
Int_t fNEventsFailed
Number of events with success.
virtual void SetParContainers()
Set parameter containers.
void FillMatchMap(Int_t &nRec, Int_t &nGhosts, Int_t &nClones)
Fill a map from MCTrack index to matched StsTrack index.
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.
InitStatus GetGeometry()
Read the geometry parameters.
TH1F * fhMomAccAll
Histograms.
Int_t fMinHits
Task parameters.
FairGeoPassivePar * fPassGeo
Geometry parameters.
std::map< Int_t, Double_t > fQualiMap
Map from MCTrack index to percentage of matched hits.
CbmStsFindTracksQa(Int_t minHits, Double_t quota, Int_t iVerbose)
Standard constructor.
virtual void Exec(Option_t *opt)
Execution.
Double_t fTime
Number of events with failure.
void Reset()
Reset histograms and counters.
void DivideHistos(TH1 *histo1, TH1 *histo2, TH1 *histo3)
Divide histograms (reco/all) with correct error for the efficiency.
virtual InitStatus ReInit()
Reinitialisation.