CbmRoot
Loading...
Searching...
No Matches
CbmLitTofQa.cxx
Go to the documentation of this file.
1/* Copyright (C) 2011-2020 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
10#include "CbmLitTofQa.h"
11
12#include "CbmGlobalTrack.h"
13#include "CbmHistManager.h"
15#include "CbmKFVertex.h"
16#include "CbmLitTofQaReport.h"
17#include "CbmMCDataManager.h"
18#include "CbmMCTrack.h"
19#include "CbmStsTrack.h"
20#include "CbmTofHit.h"
21#include "CbmTofPoint.h"
22#include "CbmTofTrack.h"
23#include "CbmTrackMatchNew.h"
24#include "CbmVertex.h"
25#include "TClonesArray.h"
26#include "TDatabasePDG.h"
27#include "TH2F.h"
28#include "TParticlePDG.h"
30
31#include <FairRootManager.h>
32
33#include <TFile.h>
34
35#include <boost/assign/list_of.hpp>
36
37#include <cmath>
38#include <utility>
39#include <vector>
40
41using boost::assign::list_of;
42using std::make_pair;
43using std::min;
44using std::pair;
45using std::sqrt;
46using std::vector;
47
49 : fIsFixedBounds(true)
50 , fOutputDir("./test/")
51 , fPRangeMin(0.)
52 , fPRangeMax(15.)
53 , fPRangeBins(400)
54 , fHM(NULL)
55 , fGlobalTracks(NULL)
56 , fStsTracks(NULL)
57 , fStsTrackMatches(NULL)
58 , fTofHits(NULL)
59 , fTofPoints(NULL)
60 , fTofHitsMatches(NULL)
61 , fTofTracks(NULL)
62 , fMCTracks(NULL)
63 , fPrimVertex(NULL)
64 , fTrackCategories()
65 , fTrackAcceptanceFunctions()
66 , fMCTrackIdForTofHits()
67 , fMCTrackIdForTofPoints()
68{
70}
71
73{
74 if (fHM) delete fHM;
75}
76
78{
79 fHM = new CbmHistManager();
82 return kSUCCESS;
83}
84
85void CbmLitTofQa::Exec(Option_t* /*opt*/)
86{
87 static Int_t nofEvents = 0;
88 nofEvents++;
89 std::cout << "CbmLitTofQa::Exec: event=" << nofEvents << std::endl;
90 ProcessMC(nofEvents - 1);
91 //ProcessGlobalTracks();
94}
95
97{
99
100 TDirectory* oldir = gDirectory;
101 TFile* outFile = FairRootManager::Instance()->GetOutFile();
102 if (outFile != NULL) {
103 outFile->cd();
104 fHM->WriteToFile();
105 }
106 gDirectory->cd(oldir->GetPath());
107
109 report->Create(fHM, fOutputDir);
110 delete report;
111}
112
114{
115 FairRootManager* ioman = FairRootManager::Instance();
116 assert(ioman != NULL);
117
118 CbmMCDataManager* mcManager = (CbmMCDataManager*) ioman->GetObject("MCDataManager");
119
120 fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
121 fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
122 fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
123 fTofHits = (TClonesArray*) ioman->GetObject("TofHit");
124 fTofHitsMatches = (TClonesArray*) ioman->GetObject("TofHitMatch");
125 fTofPoints = mcManager->InitBranch("TofPoint");
126 fTofTracks = (TClonesArray*) ioman->GetObject("TofTrack");
127 fMCTracks = mcManager->InitBranch("MCTrack");
128 // fPrimVertex = (CbmVertex*) ioman->GetObject("PrimaryVertex");
129 // Get pointer to PrimaryVertex object from IOManager if it exists
130 // The old name for the object is "PrimaryVertex" the new one
131 // "PrimaryVertex." Check first for the new name
132 fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
133 if (nullptr == fPrimVertex) {
134 fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex"));
135 }
136 if (nullptr == fPrimVertex) {
137 // LOG(fatal) << "No primary vertex";
138 }
139}
140
142{
143 vector<string> tmp = list_of("All")("Positive")("Negative")("Primary")("Secondary")("Electron")("Muon")("Proton")(
144 "AntiProton")("Pion")("PionPlus")("PionMinus")("Kaon")("KaonPlus")("KaonMinus");
145 fTrackCategories = tmp;
146 // List of all supported track categories
162}
163
165{
166 Int_t nofTrackCategories = fTrackCategories.size();
167 for (Int_t iCat = 0; iCat < nofTrackCategories; iCat++) {
168 string name = "hmp_Tof_Reco_" + fTrackCategories[iCat] + "_m2p";
169 fHM->Add(name, new TH2F(name.c_str(), string(name + ";P [GeV/c];M^{2} [(GeV/c)^{2}]").c_str(), fPRangeBins,
170 fPRangeMin, fPRangeMax, 400, -0.2, 1.8));
171 name = "hmp_Tof_RecoMCID_" + fTrackCategories[iCat] + "_m2p";
172 fHM->Add(name, new TH2F(name.c_str(), string(name + ";P [GeV/c];M^{2} [(GeV/c)^{2}]").c_str(), fPRangeBins,
173 fPRangeMin, fPRangeMax, 400, -0.2, 1.8));
174 name = "hmp_Tof_RecoAccTof_" + fTrackCategories[iCat] + "_m2p";
175 fHM->Add(name, new TH2F(name.c_str(), string(name + ";P [GeV/c];M^{2} [(GeV/c)^{2}]").c_str(), fPRangeBins,
176 fPRangeMin, fPRangeMax, 400, -0.2, 1.8));
177 name = "hmp_Tof_RecoMCIDAccTof_" + fTrackCategories[iCat] + "_m2p";
178 fHM->Add(name, new TH2F(name.c_str(), string(name + ";P [GeV/c];M^{2} [(GeV/c)^{2}]").c_str(), fPRangeBins,
179 fPRangeMin, fPRangeMax, 400, -0.2, 1.8));
180
181 name = "hmp_TofTrack_" + fTrackCategories[iCat] + "_Distance";
182 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Distance [cm]").c_str(), 200, 0., 50.));
183 name = "hmp_TofTrack_" + fTrackCategories[iCat] + "_NormDistance";
184 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Normalized distance").c_str(), 200, 0., 50.));
185 name = "hmp_TofTrack_" + fTrackCategories[iCat] + "_Length";
186 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Length [cm]").c_str(), 1200, 0., 1200.));
187 name = "hmp_TofTrack_" + fTrackCategories[iCat] + "_NofHitsPerGlobalTrack";
188 fHM->Add(name, new TH1F(name.c_str(), string(name + ";number of hits per global track").c_str(), 11, -0.5, 10.5));
189 }
190 string name = "hmp_Tof_dTime";
191 fHM->Add(name, new TH1F(name.c_str(), string(name + ";dt [ps];Counter").c_str(), 1000, -500., 500.));
192 name = "hmp_Tof_TimeZero_a";
193 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Time [ns];Counter").c_str(), 2000, 0., 36.));
194 name = "hmp_Tof_TimeZero_reco";
195 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Time [ns];Counter").c_str(), 2000, -5., 15.));
196 name = "hmp_Tof_TimeZero_mc";
197 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Time [ns];Counter").c_str(), 2000, -5., 15.));
198 name = "hmp_Tof_TimeZero_NofTracks";
199 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Number of tracks;Counter").c_str(), 100, 0., 100.));
200 name = "hmp_Tof_Time_FirstTrack";
201 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Time [ns];Counter").c_str(), 2000, 0., 36.));
202
203 name = "hmp_Tof_Z";
204 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Z [cm];Counter").c_str(), 200, 650, 900));
205 name = "hmp_TofTrack_Z";
206 fHM->Add(name, new TH1F(name.c_str(), string(name + ";Z [cm];Counter").c_str(), 200, 650, 900));
207}
208
209void CbmLitTofQa::ProcessMC(Int_t iEvent)
210{
211 fMCTrackIdForTofHits.clear();
213
214 Int_t nofHits = fTofHits->GetEntriesFast();
215 for (Int_t iHit = 0; iHit < nofHits; iHit++) {
216 //const CbmTofHit* tofHit = static_cast<const CbmTofHit*>(fTofHits->At(iHit));
217 CbmMatch* tofHitMatch = static_cast<CbmMatch*>(fTofHitsMatches->At(iHit));
218 if (tofHitMatch == NULL) {
219 continue;
220 }
221 Int_t tofPointIndex = tofHitMatch->GetMatchedLink().GetIndex();
222 Int_t tofPointEventNo = tofHitMatch->GetMatchedLink().GetEntry();
223 const CbmTofPoint* tofPoint = static_cast<const CbmTofPoint*>(fTofPoints->Get(0, tofPointEventNo, tofPointIndex));
224 fMCTrackIdForTofHits.insert(make_pair(tofPointEventNo, tofPoint->GetTrackID()));
225 }
226
227 Int_t nofPoints = fTofPoints->Size(0, iEvent);
228 for (Int_t iPoint = 0; iPoint < nofPoints; iPoint++) {
229 const CbmTofPoint* tofPoint = static_cast<const CbmTofPoint*>(fTofPoints->Get(0, iEvent, iPoint));
230 fMCTrackIdForTofPoints.insert(pair<Int_t, Int_t>(iEvent, tofPoint->GetTrackID()));
231 }
232}
233
235{
236 Double_t timeZeroReco = 0.0;
237 Double_t timeZeroMC = 0.0;
238 Double_t timeFirstTrack = 100.; // ns
239 Double_t timeZeroA = 0.; // ns
240 Int_t nofTracksForTimeZero = 0;
241
242 Int_t nofGlobalTracks = fGlobalTracks->GetEntriesFast();
243 for (Int_t iTrack = 0; iTrack < nofGlobalTracks; iTrack++) {
244 const CbmGlobalTrack* globalTrack = static_cast<const CbmGlobalTrack*>(fGlobalTracks->At(iTrack));
245 Int_t stsId = globalTrack->GetStsTrackIndex();
246 Int_t tofId = globalTrack->GetTofHitIndex();
247 if (stsId < 0 || tofId < 0) continue; // We need both STS track and TOF hit
248
249 CbmStsTrack* stsTrack = static_cast<CbmStsTrack*>(fStsTracks->At(stsId));
250 const CbmTrackMatchNew* stsMatch = static_cast<const CbmTrackMatchNew*>(fStsTrackMatches->At(stsId));
251 Int_t stsMCTrackId = stsMatch->GetMatchedLink().GetIndex();
252
253 const CbmTofHit* tofHit = static_cast<const CbmTofHit*>(fTofHits->At(tofId));
254 CbmMatch* tofHitMatch = static_cast<CbmMatch*>(fTofHitsMatches->At(tofId));
255 if (tofHitMatch == NULL) {
256 continue;
257 }
258 Int_t tofMCPointId = tofHitMatch->GetMatchedLink().GetIndex();
259 Int_t tofMCEventId = tofHitMatch->GetMatchedLink().GetEntry();
260 const CbmTofPoint* tofPoint = static_cast<const CbmTofPoint*>(fTofPoints->Get(0, tofMCEventId, tofMCPointId));
261 Int_t tofMCTrackId = tofPoint->GetTrackID();
262
263
264 FairTrackParam vtxTrack;
265 float chiSqPrimary = 0.f;
266 CbmKFParticleInterface::ExtrapolateTrackToPV(stsTrack, fPrimVertex, &vtxTrack, chiSqPrimary);
267
268 Bool_t chiSqPrimaryOk = chiSqPrimary < 3.;
269
270 // Double_t ctCorrection = -0.007;
271 Double_t ctCorrection = 0.0;
272 Double_t ctReco = 0.299792458 * tofHit->GetTime() + ctCorrection; // ToF time in ns -> transfrom to ct in m
273 //Double_t ctMC = 0.299792458 * tofPoint->GetTime(); // mc time in ns -> transfrom to ct in m
274 Double_t trackLengthReco = globalTrack->GetLength() / 100.; //global length
275 // Double_t trackLengthMC = tofPoint->GetLength() / 100.; //mc length
276 Double_t preco = (vtxTrack.GetQp() != 0) ? std::abs(1. / vtxTrack.GetQp()) : 0;
277 Double_t t = (trackLengthReco != 0) ? (ctReco / trackLengthReco) : 0;
278 Double_t m2reco = preco * preco * (t * t - 1);
279 Double_t radialPos = sqrt(tofHit->GetX() * tofHit->GetX() + tofHit->GetY() * tofHit->GetY());
280
281 if (chiSqPrimaryOk && radialPos < 50.) {
282 nofTracksForTimeZero++;
283 Double_t beta = 1.;
284 if (m2reco > 0.6) beta = preco / sqrt(preco * preco + 0.93827231 * 0.93827231);
285 if (m2reco <= 0.6) beta = preco / sqrt(preco * preco + 0.1395679 * 0.1395679);
286 timeZeroReco += tofHit->GetTime() - trackLengthReco / (beta * 0.299792458);
287 timeZeroMC += tofPoint->GetTime() - trackLengthReco / (beta * 0.299792458);
288 timeZeroA += trackLengthReco / 0.299792458;
289 timeFirstTrack = std::min(timeFirstTrack, trackLengthReco / 0.299792458);
290 }
291
292 Int_t nofTrackCategories = fTrackCategories.size();
293 for (Int_t iCat = 0; iCat < nofTrackCategories; iCat++) {
294 string category = fTrackCategories[iCat];
295 LitTrackAcceptanceFunction function = fTrackAcceptanceFunctions.find(category)->second;
296 Bool_t categoryOk = function(fMCTracks, tofMCEventId, stsMCTrackId);
297 //Bool_t accTofOk = fMCTrackIdForTofPoints.find(make_pair(tofMCEventId, stsMCTrackId)) != fMCTrackIdForTofPoints.end();
298 Bool_t accTofOk = fMCTrackIdForTofHits.find(make_pair(tofMCEventId, stsMCTrackId)) != fMCTrackIdForTofHits.end();
299
300 if (categoryOk && chiSqPrimaryOk) {
301 fHM->H1("hmp_Tof_Reco_" + category + "_m2p")->Fill(preco, m2reco);
302 if (accTofOk) fHM->H1("hmp_Tof_RecoAccTof_" + category + "_m2p")->Fill(preco, m2reco);
303
304 if (stsMCTrackId == tofMCTrackId) {
305 fHM->H1("hmp_Tof_RecoMCID_" + category + "_m2p")->Fill(preco, m2reco);
306 if (accTofOk) fHM->H1("hmp_Tof_RecoMCIDAccTof_" + category + "_m2p")->Fill(preco, m2reco);
307 }
308 }
309 }
310 }
311 if (nofTracksForTimeZero > 0) {
312 timeZeroReco /= nofTracksForTimeZero;
313 timeZeroMC /= nofTracksForTimeZero;
314 timeZeroA /= nofTracksForTimeZero;
315 }
316 fHM->H1("hmp_Tof_TimeZero_reco")->Fill(timeZeroReco);
317 fHM->H1("hmp_Tof_TimeZero_mc")->Fill(timeZeroMC);
318 fHM->H1("hmp_Tof_TimeZero_a")->Fill(timeZeroA);
319 fHM->H1("hmp_Tof_TimeZero_NofTracks")->Fill(nofTracksForTimeZero);
320 fHM->H1("hmp_Tof_Time_FirstTrack")->Fill(timeFirstTrack);
321}
322
324{
325 Int_t nofTofHits = fTofHits->GetEntriesFast();
326 for (Int_t iHit = 0; iHit < nofTofHits; iHit++) {
327 const CbmTofHit* tofHit = static_cast<const CbmTofHit*>(fTofHits->At(iHit));
328 CbmMatch* tofHitMatch = static_cast<CbmMatch*>(fTofHitsMatches->At(iHit));
329 if (tofHitMatch == NULL) {
330 continue;
331 }
332 Int_t tofMCPointId = tofHitMatch->GetMatchedLink().GetIndex();
333 Int_t tofMCEventId = tofHitMatch->GetMatchedLink().GetEntry();
334 const CbmTofPoint* tofPoint = static_cast<const CbmTofPoint*>(fTofPoints->Get(0, tofMCEventId, tofMCPointId));
335 //Int_t tofMCTrackId = tofPoint->GetTrackID();
336
337 fHM->H1("hmp_Tof_dTime")->Fill(1000 * (tofPoint->GetTime() - tofHit->GetTime()));
338 fHM->H1("hmp_Tof_Z")->Fill(tofHit->GetZ());
339 }
340}
341
343{
344 map<Int_t, Int_t> nofTofHitsPerGlobalTrack;
345 Int_t nofTofTracks = fTofTracks->GetEntriesFast();
346 for (Int_t iTrack = 0; iTrack < nofTofTracks; iTrack++) {
347 const CbmTofTrack* tofTrack = static_cast<const CbmTofTrack*>(fTofTracks->At(iTrack));
348 nofTofHitsPerGlobalTrack[tofTrack->GetTrackIndex()]++;
349 }
350
351 for (Int_t iTrack = 0; iTrack < nofTofTracks; iTrack++) {
352 const CbmTofTrack* tofTrack = static_cast<const CbmTofTrack*>(fTofTracks->At(iTrack));
353 const CbmTofHit* tofHit = static_cast<const CbmTofHit*>(fTofHits->At(tofTrack->GetTofHitIndex()));
354 CbmMatch* tofHitMatch = static_cast<CbmMatch*>(fTofHitsMatches->At(tofTrack->GetTofHitIndex()));
355 if (tofHitMatch == NULL) {
356 continue;
357 }
358 Int_t tofMCPointId = tofHitMatch->GetMatchedLink().GetIndex();
359 Int_t tofMCEventId = tofHitMatch->GetMatchedLink().GetEntry();
360 const FairMCPoint* tofPoint = static_cast<const FairMCPoint*>(fTofPoints->Get(0, tofMCEventId, tofMCPointId));
361 Int_t tofMCTrackId = tofPoint->GetTrackID();
362
363 const FairTrackParam* par = tofTrack->GetTrackParameter();
364 Double_t dx = par->GetX() - tofHit->GetX();
365 Double_t dy = par->GetY() - tofHit->GetY();
366 Double_t distance = sqrt(dx * dx + dy * dy);
367
368 fHM->H1("hmp_TofTrack_Z")->Fill(tofHit->GetZ());
369
370 Int_t nofTrackCategories = fTrackCategories.size();
371 for (Int_t iCat = 0; iCat < nofTrackCategories; iCat++) {
372 string category = fTrackCategories[iCat];
373 LitTrackAcceptanceFunction function = fTrackAcceptanceFunctions.find(category)->second;
374 Bool_t categoryOk = function(fMCTracks, tofMCEventId, tofMCTrackId);
375 if (categoryOk) {
376 fHM->H1("hmp_TofTrack_" + category + "_Distance")->Fill(distance);
377 fHM->H1("hmp_TofTrack_" + category + "_NormDistance")->Fill(tofTrack->GetDistance());
378 fHM->H1("hmp_TofTrack_" + category + "_Length")->Fill(tofTrack->GetTrackLength());
379 fHM->H1("hmp_TofTrack_" + category + "_NofHitsPerGlobalTrack")
380 ->Fill(nofTofHitsPerGlobalTrack[tofTrack->GetTrackIndex()]);
381 }
382 }
383 }
384}
385
387{
388 fHM->H2("hmp_Tof_RecoMCID_Pion_m2p")->FitSlicesY();
389 TH1* meanHist = gDirectory->Get<TH1>("hmp_Tof_RecoMCID_Pion_m2p_1"); // mean
390 TH1* sigmaHist = gDirectory->Get<TH1>("hmp_Tof_RecoMCID_Pion_m2p_2"); // sigma
391 Int_t nofBins = meanHist->GetNbinsX();
392 for (Int_t iBin = 0; iBin <= nofBins; iBin++) {
393 Double_t mean = meanHist->GetBinContent(iBin);
394 Double_t sigma = sigmaHist->GetBinContent(iBin);
395 std::cout << "mean=" << mean << " sigma=" << sigma << std::endl;
396 }
397}
398
ClassImp(CbmConverterManager)
TClonesArray * fTofTracks
Histogram manager.
Global function to define the track acceptance. Used in QA.
Create report for TOF QA.
Task for TOF QA.
Data class for STS tracks.
friend fvec sqrt(const fvec &a)
int32_t GetStsTrackIndex() const
int32_t GetTofHitIndex() const
double GetLength() const
Histogram manager.
TH2 * H2(const std::string &name) const
Return pointer to TH2 histogram.
void WriteToFile()
Write all objects to current opened file.
void Add(const std::string &name, TNamed *object)
Add new named object to manager.
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
double GetTime() const
Definition CbmHit.h:76
double GetZ() const
Definition CbmHit.h:71
static void ExtrapolateTrackToPV(const CbmStsTrack *track, CbmVertex *pv, FairTrackParam *paramAtPV, float &chiPrim)
static Bool_t KaonTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t KaonMinusTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t PionMinusTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t AllTrackAcceptanceFunction(CbmMCDataArray *, Int_t, Int_t)
static Bool_t PionTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t NegativeTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t MuonTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t PionPlusTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t SecondaryTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t KaonPlusTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t ProtonTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t PositiveTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t AntiProtonTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t PrimaryTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
static Bool_t ElectronTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
Create report for TOF QA.
Task for TOF QA.
Definition CbmLitTofQa.h:40
void FitHistograms()
void ProcessTofHits()
virtual ~CbmLitTofQa()
Destructor.
CbmMCDataArray * fTofPoints
Double_t fPRangeMax
TClonesArray * fStsTracks
virtual void Finish()
Inherited from FairTask.
Int_t fPRangeBins
void FillTrackCategoriesAndAcceptanceFunctions()
Assign default track categories and track acceptance functions.
void ProcessMC(Int_t iEvent)
set< pair< Int_t, Int_t > > fMCTrackIdForTofHits
string fOutputDir
TClonesArray * fTofTracks
Double_t fPRangeMin
set< pair< Int_t, Int_t > > fMCTrackIdForTofPoints
virtual void Exec(Option_t *opt)
Inherited from FairTask.
CbmMCDataArray * fMCTracks
CbmLitTofQa()
Constructor.
void ReadDataBranches()
Reads data branches.
CbmVertex * fPrimVertex
void ProcessGlobalTracks()
TClonesArray * fTofHits
TClonesArray * fStsTrackMatches
TClonesArray * fGlobalTracks
vector< string > fTrackCategories
void CreateHistograms()
Creates histograms.
TClonesArray * fTofHitsMatches
map< string, LitTrackAcceptanceFunction > fTrackAcceptanceFunctions
CbmHistManager * fHM
Bool_t(*) LitTrackAcceptanceFunction(CbmMCDataArray *mcTracks, Int_t eventNo, Int_t index)
void ProcessTofTracks()
virtual InitStatus Init()
Inherited from FairTask.
TObject * Get(const CbmLink *lnk)
Int_t Size(Int_t fileNumber, Int_t eventNumber)
Task class creating and managing CbmMCDataArray objects.
CbmMCDataObject * GetObject(const char *name)
CbmMCDataArray * InitBranch(const char *name)
const CbmLink & GetMatchedLink() const
Definition CbmMatch.h:41
double GetY() const
Definition CbmPixelHit.h:74
double GetX() const
Definition CbmPixelHit.h:73
Base class for simulation reports.
void Create(CbmHistManager *histManager, const std::string &outputDir)
Main function which creates report data.
Geometric intersection of a MC track with a TOFb detector.
Definition CbmTofPoint.h:44
int32_t GetTofHitIndex() const
Definition CbmTofTrack.h:55
double GetTrackLength() const
Definition CbmTofTrack.h:67
double GetDistance() const
Definition CbmTofTrack.h:79
int32_t GetTrackIndex() const
Definition CbmTofTrack.h:64
const FairTrackParam * GetTrackParameter() const
Definition CbmTofTrack.h:70