CbmRoot
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 
14 #ifndef CBMSTSTRACKFINDERQA_H
15 #define CBMSTSTRACKFINDERQA_H 1
16 
17 #include "FairTask.h"
18 #include "TStopwatch.h"
19 #include "TVector3.h"
20 
21 class TH1F;
22 class CbmEvent;
23 class CbmMCDataArray;
24 class CbmStsSetup;
25 
26 
27 class CbmStsFindTracksQa : public FairTask {
28 
29 public:
31  CbmStsFindTracksQa(Int_t iVerbose = 1);
32 
33 
39  CbmStsFindTracksQa(Int_t minHits, Double_t quota, Int_t iVerbose);
40 
41 
43  virtual ~CbmStsFindTracksQa();
44 
45 
47  virtual void SetParContainers();
48 
49 
51  virtual InitStatus Init();
52 
53 
55  virtual InitStatus ReInit();
56 
57 
59  virtual void Exec(Option_t* opt);
60 
61 
62 private:
64  virtual void Finish();
65 
67  InitStatus GetGeometry();
68 
69 
71  void GetTargetPosition();
72 
73 
75  void CreateHistos();
76 
77 
79  void Reset();
80 
81 
83  void FillHitMap(CbmEvent* event);
84 
85 
91  void
92  FillMatchMap(CbmEvent* event, Int_t& nRec, Int_t& nGhosts, Int_t& nClones);
93 
94 
100  void DivideHistos(TH1* histo1, TH1* histo2, TH1* histo3);
101 
102 
109  void ProcessEvent(CbmEvent* event = NULL);
110 
111 
113  std::map<Int_t, std::map<Int_t, Int_t>> fHitMap;
114 
115 
117  std::map<Int_t, Int_t> fMatchMap;
118 
119 
121  std::map<Int_t, Double_t> fQualiMap;
122 
123 
125  TClonesArray* fEvents;
128  TClonesArray* fStsHits;
129  TClonesArray* fStsHitMatch;
130  TClonesArray* fStsTracks;
131  TClonesArray* fMatches;
132 
134  Bool_t fLegacy;
135 
136 
138  TVector3 fTargetPos; // Target centre position
139  CbmStsSetup* fSetup; // STS setup interface
140  Int_t fNStations; // Number of STS stations
141 
142 
144  Int_t
145  fMinStations; // Minimal number of stations with hits for considered MCTrack
146  Double_t fQuota; // True/all hits for track to be considered reconstructed
147 
148 
150  TH1F *fhMomAccAll, *fhMomRecAll, *fhMomEffAll; // eff. vs. p, all
151  TH1F *fhMomAccPrim, *fhMomRecPrim, *fhMomEffPrim; // eff. vs. p, vertex
152  TH1F *fhMomAccSec, *fhMomRecSec, *fhMomEffSec; // eff. vs. p, non-vertex
153  TH1F *fhNpAccAll, *fhNpRecAll, *fhNpEffAll; // eff. vs. np, all
154  TH1F *fhNpAccPrim, *fhNpRecPrim, *fhNpEffPrim; // eff. vs. np, vertex
155  TH1F *fhNpAccSec, *fhNpRecSec, *fhNpEffSec; // eff. vs. np, non-vertex
156  TH1F *fhZAccSec, *fhZRecSec, *fhZEffSec; // eff. vs. z, non-vertex
157  TH1F *fhNhClones, *fhNhGhosts; // # hits of clones and ghosts
158 
159 
161  TList* fHistoList;
162 
163 
168  Int_t fNEvents;
170  Double_t fTime;
173  TStopwatch fTimer;
174 
177 
179 };
180 
181 
182 #endif
CbmStsFindTracksQa::GetTargetPosition
void GetTargetPosition()
Definition: CbmStsFindTracksQa.cxx:547
CbmStsFindTracksQa::fhMomRecSec
TH1F * fhMomRecSec
Definition: CbmStsFindTracksQa.h:152
CbmStsFindTracksQa::GetGeometry
InitStatus GetGeometry()
Definition: CbmStsFindTracksQa.cxx:533
CbmStsFindTracksQa::fNRecAll
Int_t fNRecAll
Definition: CbmStsFindTracksQa.h:166
CbmStsFindTracksQa::fEvents
TClonesArray * fEvents
Definition: CbmStsFindTracksQa.h:125
CbmStsFindTracksQa::CbmStsFindTracksQa
CbmStsFindTracksQa(Int_t iVerbose=1)
Definition: CbmStsFindTracksQa.cxx:42
CbmStsFindTracksQa::fhZAccSec
TH1F * fhZAccSec
Definition: CbmStsFindTracksQa.h:156
CbmStsFindTracksQa::~CbmStsFindTracksQa
virtual ~CbmStsFindTracksQa()
Definition: CbmStsFindTracksQa.cxx:165
CbmStsFindTracksQa::fHistoList
TList * fHistoList
Definition: CbmStsFindTracksQa.h:161
CbmStsFindTracksQa::Exec
virtual void Exec(Option_t *opt)
Definition: CbmStsFindTracksQa.cxx:174
CbmStsFindTracksQa::fMinStations
Int_t fMinStations
Definition: CbmStsFindTracksQa.h:145
CbmStsFindTracksQa::Init
virtual InitStatus Init()
Definition: CbmStsFindTracksQa.cxx:203
CbmStsFindTracksQa::FillMatchMap
void FillMatchMap(CbmEvent *event, Int_t &nRec, Int_t &nGhosts, Int_t &nClones)
Definition: CbmStsFindTracksQa.cxx:746
CbmStsFindTracksQa::fQualiMap
std::map< Int_t, Double_t > fQualiMap
Definition: CbmStsFindTracksQa.h:121
CbmStsFindTracksQa::fTargetPos
TVector3 fTargetPos
Definition: CbmStsFindTracksQa.h:138
CbmStsFindTracksQa::fNAccSec
Int_t fNAccSec
Definition: CbmStsFindTracksQa.h:165
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmStsFindTracksQa::fMCTracks
CbmMCDataArray * fMCTracks
Event.
Definition: CbmStsFindTracksQa.h:126
CbmStsFindTracksQa::fhMomAccAll
TH1F * fhMomAccAll
Definition: CbmStsFindTracksQa.h:150
CbmStsFindTracksQa::fLegacy
Bool_t fLegacy
StsTrackMatch.
Definition: CbmStsFindTracksQa.h:134
CbmStsFindTracksQa::Reset
void Reset()
Definition: CbmStsFindTracksQa.cxx:700
CbmStsFindTracksQa::fSetup
CbmStsSetup * fSetup
Definition: CbmStsFindTracksQa.h:139
CbmStsFindTracksQa::fhMomEffAll
TH1F * fhMomEffAll
Definition: CbmStsFindTracksQa.h:150
CbmStsFindTracksQa::DivideHistos
void DivideHistos(TH1 *histo1, TH1 *histo2, TH1 *histo3)
Definition: CbmStsFindTracksQa.cxx:826
CbmStsFindTracksQa::fhMomEffPrim
TH1F * fhMomEffPrim
Definition: CbmStsFindTracksQa.h:151
CbmStsFindTracksQa::fhNpEffAll
TH1F * fhNpEffAll
Definition: CbmStsFindTracksQa.h:153
CbmStsFindTracksQa::fhMomAccPrim
TH1F * fhMomAccPrim
Definition: CbmStsFindTracksQa.h:151
CbmStsFindTracksQa::fStsTracks
TClonesArray * fStsTracks
StsHitMatch.
Definition: CbmStsFindTracksQa.h:130
CbmStsFindTracksQa::operator=
CbmStsFindTracksQa operator=(const CbmStsFindTracksQa &)
CbmStsFindTracksQa::fhNpEffSec
TH1F * fhNpEffSec
Definition: CbmStsFindTracksQa.h:155
CbmStsFindTracksQa::fMatchMap
std::map< Int_t, Int_t > fMatchMap
Definition: CbmStsFindTracksQa.h:117
CbmStsFindTracksQa::fMatches
TClonesArray * fMatches
StsTrack.
Definition: CbmStsFindTracksQa.h:131
CbmStsFindTracksQa::fhNpRecAll
TH1F * fhNpRecAll
Definition: CbmStsFindTracksQa.h:153
CbmStsFindTracksQa::CbmStsFindTracksQa
CbmStsFindTracksQa(const CbmStsFindTracksQa &)
CbmStsFindTracksQa::fNRecSec
Int_t fNRecSec
Definition: CbmStsFindTracksQa.h:166
CbmStsFindTracksQa::fhNpRecSec
TH1F * fhNpRecSec
Definition: CbmStsFindTracksQa.h:155
CbmStsFindTracksQa::fhMomRecPrim
TH1F * fhMomRecPrim
Definition: CbmStsFindTracksQa.h:151
CbmStsFindTracksQa::fNAccPrim
Int_t fNAccPrim
Definition: CbmStsFindTracksQa.h:165
CbmStsFindTracksQa::fhNpAccPrim
TH1F * fhNpAccPrim
Definition: CbmStsFindTracksQa.h:154
CbmStsFindTracksQa::fNRecPrim
Int_t fNRecPrim
Definition: CbmStsFindTracksQa.h:166
CbmStsFindTracksQa::ProcessEvent
void ProcessEvent(CbmEvent *event=NULL)
Definition: CbmStsFindTracksQa.cxx:299
CbmStsFindTracksQa::ReInit
virtual InitStatus ReInit()
Definition: CbmStsFindTracksQa.cxx:273
CbmStsFindTracksQa::fStsHitMatch
TClonesArray * fStsHitMatch
StsHits.
Definition: CbmStsFindTracksQa.h:129
CbmStsFindTracksQa::SetParContainers
virtual void SetParContainers()
Definition: CbmStsFindTracksQa.cxx:198
CbmStsFindTracksQa::fTimer
TStopwatch fTimer
Definition: CbmStsFindTracksQa.h:173
CbmStsFindTracksQa
Definition: CbmStsFindTracksQa.h:27
CbmStsFindTracksQa::fhZEffSec
TH1F * fhZEffSec
Definition: CbmStsFindTracksQa.h:156
CbmStsFindTracksQa::CreateHistos
void CreateHistos()
Definition: CbmStsFindTracksQa.cxx:602
CbmStsSetup
Class representing the top level of the STS setup.
Definition: CbmStsSetup.h:39
CbmStsFindTracksQa::fhNpAccSec
TH1F * fhNpAccSec
Definition: CbmStsFindTracksQa.h:155
CbmStsFindTracksQa::fhMomAccSec
TH1F * fhMomAccSec
Definition: CbmStsFindTracksQa.h:152
CbmStsFindTracksQa::fStsHits
TClonesArray * fStsHits
StsPoints.
Definition: CbmStsFindTracksQa.h:128
CbmStsFindTracksQa::fhZRecSec
TH1F * fhZRecSec
Definition: CbmStsFindTracksQa.h:156
CbmStsFindTracksQa::fNAccAll
Int_t fNAccAll
Definition: CbmStsFindTracksQa.h:165
CbmStsFindTracksQa::fNRecRef
Int_t fNRecRef
Definition: CbmStsFindTracksQa.h:166
CbmStsFindTracksQa::fhNpRecPrim
TH1F * fhNpRecPrim
Definition: CbmStsFindTracksQa.h:154
CbmStsFindTracksQa::fStsPoints
CbmMCDataArray * fStsPoints
MCtrack.
Definition: CbmStsFindTracksQa.h:127
CbmStsFindTracksQa::fhNpAccAll
TH1F * fhNpAccAll
Definition: CbmStsFindTracksQa.h:153
CbmStsFindTracksQa::Finish
virtual void Finish()
Definition: CbmStsFindTracksQa.cxx:477
CbmStsFindTracksQa::fHitMap
std::map< Int_t, std::map< Int_t, Int_t > > fHitMap
Definition: CbmStsFindTracksQa.h:113
CbmStsFindTracksQa::fNStations
Int_t fNStations
Definition: CbmStsFindTracksQa.h:140
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmStsFindTracksQa::FillHitMap
void FillHitMap(CbmEvent *event)
Definition: CbmStsFindTracksQa.cxx:714
CbmStsFindTracksQa::fhNhClones
TH1F * fhNhClones
Definition: CbmStsFindTracksQa.h:157
CbmStsFindTracksQa::fNClones
Int_t fNClones
Definition: CbmStsFindTracksQa.h:167
CbmStsFindTracksQa::fhNpEffPrim
TH1F * fhNpEffPrim
Definition: CbmStsFindTracksQa.h:154
CbmStsFindTracksQa::fNAccRef
Int_t fNAccRef
Definition: CbmStsFindTracksQa.h:165
CbmStsFindTracksQa::fhNhGhosts
TH1F * fhNhGhosts
Definition: CbmStsFindTracksQa.h:157
CbmStsFindTracksQa::fNGhosts
Int_t fNGhosts
Definition: CbmStsFindTracksQa.h:167
CbmStsFindTracksQa::fhMomRecAll
TH1F * fhMomRecAll
Definition: CbmStsFindTracksQa.h:150
CbmStsFindTracksQa::fNEvents
Int_t fNEvents
Definition: CbmStsFindTracksQa.h:168
CbmStsFindTracksQa::fNEventsFailed
Int_t fNEventsFailed
Definition: CbmStsFindTracksQa.h:169
CbmStsFindTracksQa::fhMomEffSec
TH1F * fhMomEffSec
Definition: CbmStsFindTracksQa.h:152
CbmStsFindTracksQa::fTime
Double_t fTime
Definition: CbmStsFindTracksQa.h:170
CbmStsFindTracksQa::fQuota
Double_t fQuota
Definition: CbmStsFindTracksQa.h:146
CbmStsFindTracksQa::ClassDef
ClassDef(CbmStsFindTracksQa, 2)