BmnRoot
Loading...
Searching...
No Matches
BmnTrackingQa.cxx
Go to the documentation of this file.
1
8#include "BmnTrackingQa.h"
9
11#include "BmnDchHit.h"
12#include "BmnDchTrack.h"
13#include "BmnEnums.h"
14#include "BmnGemStripHit.h"
15#include "BmnGemTrack.h"
16#include "BmnGlobalTrack.h"
17#include "BmnHistManager.h"
18#include "BmnMCPoint.h"
19#include "BmnMatch.h"
20#include "BmnMath.h"
21#include "BmnSiliconHit.h"
22#include "BmnSiliconPoint.h"
23#include "BmnTrackMatch.h"
24#include "BmnTrackingQaReport.h"
25#include "BmnUtils.h"
26#include "BmnVertex.h"
27#include "CbmBaseHit.h"
28#include "CbmGlobalTrack.h"
29#include "CbmKFTrack.h"
30#include "CbmMCTrack.h"
31#include "CbmStsDigiScheme.h"
32#include "CbmStsPoint.h"
33#include "CbmStsTrack.h"
34#include "CbmTofHit.h"
35#include "CbmTrackMatch.h"
36#include "FairMCEventHeader.h"
37#include "FairMCPoint.h"
38#include "FairRunAna.h"
39#include "TClonesArray.h"
40#include "TF1.h"
41#include "TFitResult.h"
42#include "TH1.h"
43#include "TH2F.h"
44
45#include <fstream>
46#include <iostream>
47
48using namespace std;
49using namespace TMath;
51using lit::Split;
52
53BmnTrackingQa::BmnTrackingQa(Short_t ch, TString name, TString gemConf, TString silConf, TString cscConf)
54 : FairTask("BmnTrackingQA", 1)
55 , fOutName(name)
56 , fHM(nullptr)
57 , fOutputDir("./")
58 , fMinNofPoints(4)
59 , fMinNofPointsTof(1)
60 , fMinNofPointsDch(1)
61 , fQuota(0.5)
62 , fEtaCut(100000.0)
63 , fPCut(0.0)
64 , fPrimes(kFALSE)
65 , fPRangeMin(0.)
66 , fPRangeMax(4.)
67 , fPRangeBins(50)
68 , fPtRangeMin(0.)
69 , fPtRangeMax(1.)
70 , fPtRangeBins(50)
71 , fYRangeMin(0.)
72 , fYRangeMax(4.)
73 , fYRangeBins(100)
74 , fEtaRangeMin(0.)
75 , fEtaRangeMax(8.)
76 , fEtaRangeBins(50)
77 , fThetaRangeMin(0.)
78 , fThetaRangeMax(40.)
79 , fThetaRangeBins(50)
80 , fNHitsCut(1000)
81 , fNStations(0)
82 , fMCTracks(nullptr)
83 , fGlobalTracks(nullptr)
84 , fGemTracks(nullptr)
85 , fSilTracks(nullptr)
86 , fSilHits(nullptr)
87 , fStsHits(nullptr)
88 , fTof400Hits(nullptr)
89 , fTof700Hits(nullptr)
90 , fCscHits(nullptr)
91 , fCscPoints(nullptr)
92 , fDchTracks(nullptr)
93 , fGemPoints(nullptr)
94 , fSilPoints(nullptr)
95 , fConfigGem(gemConf)
96 , fConfigSil(silConf)
97 , fConfigCsc(cscConf)
98 , fInnerTrackBranchName("StsTrack")
99 , fEventNo(0)
100{
101 fChargeCut = ch;
102}
103
104static Int_t nAllMcTracks = 0;
105static Int_t nAllRecoTracks = 0;
106static Int_t nGoodRecoTracks = 0;
107static Int_t nBadRecoTracks = 0;
108static Int_t nSplitRecoTracks = 0;
109
110static Int_t nWellRecoInEvent = 0;
111static Int_t nBadRecoInEvent = 0;
112static Int_t nAllRecoInEvent = 0;
113
115{
116 if (fHM)
117 delete fHM;
118}
119
121{
122 fHM = new BmnHistManager();
123 CreateHistograms();
124 ReadDataBranches();
125 return kSUCCESS;
126}
127
128void BmnTrackingQa::Exec(Option_t* opt)
129{
130 if (fEventNo % 100 == 0)
131 printf("Event: %d\n", fEventNo);
132 fEventNo++;
133 // Int_t nHits = 0;
134 // if (fInnerTrackerSetup[kGEM]) nHits += fGemHits->GetEntriesFast();
135 // if (fInnerTrackerSetup[kSILICON]) nHits += fSilHits->GetEntriesFast();
136 // if (fInnerTrackerSetup[kSSD]) nHits += fSsdHits->GetEntriesFast();
137 // if (nHits > fNHitsCut || nHits == 0) return;
138 // Increase event counter
139 fHM->H1("hen_EventNo_TrackingQa")->Fill(0.5);
140 ReadEventHeader();
141 ProcessGlobal();
142}
143
145{
146
147 BmnSimulationReport* report = new BmnTrackingQaReport(fOutName);
148 report->SetOnlyPrimes(fPrimes);
149 report->Create(fHM, fOutputDir);
150 fHM->WriteToFile();
151 delete report;
152
153 printf("nAllMC = %d\n", nAllMcTracks);
154 printf("nAllReco = %d\n", nAllRecoTracks);
155 printf("nGoodReco = %d\n", nGoodRecoTracks);
156 printf("nBadReco = %d\n", nBadRecoTracks);
157 printf("nSplitReco = %d\n", nSplitRecoTracks);
158}
159
160void BmnTrackingQa::ReadDataBranches()
161{
162 FairRootManager* ioman = FairRootManager::Instance();
163 if (nullptr == ioman)
164 Fatal("Init", "BmnRootManager is not instantiated");
165
166 fMCTracks = (TClonesArray*)ioman->GetObject("MCTrack");
167 if (nullptr == fMCTracks)
168 Fatal("Init", "No MCTrack array!");
169
170 fGlobalTracks = (TClonesArray*)ioman->GetObject("BmnGlobalTrack");
171 if (nullptr == fGlobalTracks)
172 Fatal("Init", "No BmnGlobalTrack array!");
173 fGlobalTrackMatches = (TClonesArray*)ioman->GetObject("BmnGlobalTrackMatch");
174
175 fGemTracks = (TClonesArray*)ioman->GetObject("BmnGemTrack");
176 fSilTracks = (TClonesArray*)ioman->GetObject("BmnSiliconTrack");
177
178 fNStations = 0;
179 fInnerHits = (TClonesArray*)ioman->GetObject("BmnInnerHits");
180
181 fTof400Hits = (TClonesArray*)ioman->GetObject("BmnTof400Hit");
182 fTof700Hits = (TClonesArray*)ioman->GetObject("BmnTof700Hit");
183 fCscHits = (TClonesArray*)ioman->GetObject("BmnCSCHit");
184 fCscPoints = (TClonesArray*)ioman->GetObject("CSCPoint");
185 fDchTracks = (TClonesArray*)ioman->GetObject("BmnDchTrack");
186 fSilPoints = (TClonesArray*)ioman->GetObject("SiliconPoint");
187 fGemPoints = (TClonesArray*)ioman->GetObject("StsPoint");
188
189 if (fInnerTrackerSetup[kSILICON]) {
190 fSilHits = (TClonesArray*)ioman->GetObject("BmnSiliconHit");
191 fSilDetector = new BmnSiliconStationSet(fConfigSil);
192 fNStations += fSilDetector->GetNStations();
193 }
194
195 if (fInnerTrackerSetup[kSSD]) {
196 fSsdHits = (TClonesArray*)ioman->GetObject("BmnSSDHit");
197 fNStations += 4;
198 }
199
200 if (fInnerTrackerSetup[kGEM]) {
201 fGemHits = (TClonesArray*)ioman->GetObject("BmnGemStripHit");
202 fGemDetector = new BmnGemStripStationSet(fConfigGem);
203 fNStations += fGemDetector->GetNStations();
204 }
205
206 fStsHits = (TClonesArray*)ioman->GetObject("StsHit");
207 fStsTracks = (TClonesArray*)ioman->GetObject(fInnerTrackBranchName);
208 fStsTrackMatches = (TClonesArray*)ioman->GetObject("StsTrackMatch");
209
210 fVertex = (TClonesArray*)ioman->GetObject("BmnVertex");
211 fVertexL1 = (CbmVertex*)ioman->GetObject("PrimaryVertex.");
212
213 printf("\nBRANCHES READ!\n\n");
214}
215
216void BmnTrackingQa::ReadEventHeader()
217{
218 FairMCEventHeader* evHead = (FairMCEventHeader*)FairRootManager::Instance()->GetObject("MCEventHeader.");
219 fHM->H1("Impact parameter")->Fill(evHead->GetB());
220 fHM->H1("Multiplicity")->Fill(evHead->GetNPrim());
221 fHM->H2("Impact_Mult")->Fill(evHead->GetB(), evHead->GetNPrim());
222}
223
224void BmnTrackingQa::CreateH1(const string& name,
225 const string& xTitle,
226 const string& yTitle,
227 Int_t nofBins,
228 Double_t minBin,
229 Double_t maxBin)
230{
231 TH1F* h = new TH1F(name.c_str(), string(name + ";" + xTitle + ";" + yTitle).c_str(), nofBins, minBin, maxBin);
232 fHM->Add(name, h);
233}
234
235void BmnTrackingQa::CreateH2(const string& name,
236 const string& xTitle,
237 const string& yTitle,
238 const string& zTitle,
239 Int_t nofBinsX,
240 Double_t minBinX,
241 Double_t maxBinX,
242 Int_t nofBinsY,
243 Double_t minBinY,
244 Double_t maxBinY)
245{
246 TH2F* h = new TH2F(name.c_str(), (name + ";" + xTitle + ";" + yTitle + ";" + zTitle).c_str(), nofBinsX, minBinX,
247 maxBinX, nofBinsY, minBinY, maxBinY);
248 fHM->Add(name, h);
249}
250
251void BmnTrackingQa::CreateTrackHitsHistogram(const string& detName)
252{
253 string type[] = {"All", "True", "Fake", "TrueOverAll", "FakeOverAll"};
254 Double_t min[] = {0., 0., 0., 0., 0.};
255 Double_t max[] = {20, 20, 20, 1., 1.};
256 Int_t bins[] = {20, 20, 20, 20, 20};
257 for (Int_t i = 0; i < 5; i++) {
258 string xTitle = (i == 3 || i == 4) ? "Ratio" : "Number of hits";
259 string histName = "hth_" + detName + "_TrackHits_" + type[i];
260 CreateH1(histName.c_str(), xTitle, "Yeild", bins[i], min[i], max[i]);
261 }
262}
263
264void BmnTrackingQa::CreateHistograms()
265{
266
267 // Number of points distributions
268 const Float_t minNofPoints = -0.5;
269 const Float_t maxNofPoints = 14.5;
270 const Int_t nofBinsPoints = 15;
271
272 // Create number of object histograms
273 UInt_t nofBinsC = 100000;
274 Double_t maxXC = (Double_t)nofBinsC;
275 CreateH1("hno_NofObjects_GlobalTracks", "Tracks per event", "Yield", nofBinsC, 1., maxXC);
276 CreateH1("hno_NofObjects_GemTracks", "Tracks per event", "Yield", nofBinsC, 1., maxXC);
277 CreateH1("hno_NofObjects_GemHits", "GEM hits per event", "Yield", nofBinsC, 1., maxXC);
278
279 // Histogram stores number of events
280 CreateH1("hen_EventNo_TrackingQa", "", "", 1, 0, 1.);
281 CreateH1("Impact parameter", "b, fm", "Counter", 100, 0.0, 0.0);
282 CreateH1("Multiplicity", "N_{prim}", "Counter", 100, 0.0, 0.0);
283 CreateH2("Impact_Mult", "b, fm", "N_{prim}", "", 100, 0.0, 0.0, 100, 0.0, 0.0);
284
285 // Physics
286 CreateH2("momRes_2D", "P_{sim}/q, GeV/c", "#Delta P / P, %", "", 100, fPRangeMin, 10, 100, -10.0, 10.0);
287 CreateH1("momRes_1D", "P_{sim}/q, GeV/c", "#LT#Delta P / P#GT, %", fPRangeBins / 2, fPRangeMin, 10);
288 CreateH1("momMean_1D", "P_{sim}/q, GeV/c", "#Delta P / P, #mu, %", fPRangeBins / 2, fPRangeMin, 10);
289 CreateH1("momRes_Mean", "#Delta P / P, %", "Counter", 100, -10.0, 10.0);
290
291 CreateH2("PxRes_2D", "Px_{sim}/q, GeV/c", "#Delta Px / Px, %", "", 100, fPRangeMin, 1, 100, -10.0, 10.0);
292 CreateH1("PxRes_1D", "Px_{sim}/q, GeV/c", "#LT#Delta Px / Px#GT, %", fPRangeBins / 2, fPRangeMin, 1);
293 CreateH1("PxMean_1D", "Px_{sim}/q, GeV/c", "#Delta Px / Px, #mu, %", fPRangeBins / 2, fPRangeMin, 1);
294 CreateH1("PxRes_Mean", "#Delta Px / Px, %", "Counter", 100, -10.0, 10.0);
295
296 CreateH2("PyRes_2D", "Py_{sim}/q, GeV/c", "#Delta Py / Py, %", "", 100, fPRangeMin, 1, 100, -10.0, 10.0);
297 CreateH1("PyRes_1D", "Py_{sim}/q, GeV/c", "#LT#Delta Py / Py#GT, %", fPRangeBins / 2, fPRangeMin, 1);
298 CreateH1("PyMean_1D", "Py_{sim}/q, GeV/c", "#Delta Py / Py, #mu, %", fPRangeBins / 2, fPRangeMin, 1);
299 CreateH1("PyRes_Mean", "#Delta Py / Py, %", "Counter", 100, -10.0, 10.0);
300
301 CreateH2("PzRes_2D", "Pz_{sim}/q, GeV/c", "#Delta Pz / Pz, %", "", 100, fPRangeMin, 8, 100, -10.0, 10.0);
302 CreateH1("PzRes_1D", "Pz_{sim}/q, GeV/c", "#LT#Delta Pz / Pz#GT, %", fPRangeBins / 2, fPRangeMin, 8);
303 CreateH1("PzMean_1D", "Pz_{sim}/q, GeV/c", "#Delta Pz / Pz, #mu, %", fPRangeBins / 2, fPRangeMin, 8);
304 CreateH1("PzRes_Mean", "#Delta Pz / Pz, %", "Counter", 100, -10.0, 10.0);
305
306 CreateH2("MomRes_vs_Theta", "#theta_{sim}", "#Delta P / P, %", "", fThetaRangeBins * 2, fThetaRangeMin,
307 fThetaRangeMax, 100, -10, 10);
308 CreateH1("MomRes_vs_Theta_1D", "#theta_{sim}", "#Delta P / P, #sigma, %", fThetaRangeBins / 2, fThetaRangeMin,
309 fThetaRangeMax);
310 CreateH1("MomMean_vs_Theta_1D", "#theta_{sim}", "#Delta P / P, #mu, %", fThetaRangeBins / 2, fThetaRangeMin,
311 fThetaRangeMax);
312
313 CreateH2("MomRes_vs_Length", "Length, cm", "#Delta P / P, %", "", 400, 0, 800, 100, -10, 10);
314 CreateH1("MomRes_vs_Length_1D", "Length, cm", "#Delta P / P, #sigma, %", 50, 0, 800);
315 CreateH1("MomMean_vs_Length_1D", "Length, cm", "#Delta P / P, #mu, %", 50, 0, 800);
316
317 CreateH2("MomRes_vs_nHits", "N_{hits}", "#Delta P / P, %", "", 12, 0, 12, 100, -10, 10);
318 CreateH1("MomRes_vs_nHits_1D", "N_{hits}", "#Delta P / P, #sigma, %", 12, 0, 12);
319 CreateH1("MomMean_vs_nHits_1D", "N_{hits}", "#Delta P / P, #mu, %", 12, 0, 12);
320
321 CreateH2("EtaP_rec", "#eta_{rec}", "P_{rec}/q, GeV/c", "", 100, fEtaRangeMin, fEtaRangeMax, 100, fPRangeMin,
322 fPRangeMax);
323 CreateH2("EtaP_sim", "#eta_{sim}", "P_{sim}/q, GeV/c", "", 100, fEtaRangeMin, fEtaRangeMax, 100, fPRangeMin,
324 fPRangeMax);
325 CreateH2("EtaP_fakes_sim", "#eta_{sim}", "P_{sim}/q, GeV/c", "", 100, fEtaRangeMin, fEtaRangeMax, 100, fPRangeMin,
326 fPRangeMax);
327 CreateH2("EtaP_clones_sim", "#eta_{sim}", "P_{sim}/q, GeV/c", "", 100, fEtaRangeMin, fEtaRangeMax, 100, fPRangeMin,
328 fPRangeMax);
329 CreateH2("ThetaP_sim", "#theta_{sim}", "P_{sim}/q, GeV/c", "", 100, fThetaRangeMin, fThetaRangeMax, 100, fPRangeMin,
330 fPRangeMax);
331 CreateH2("ThetaP_rec", "#theta_{rec}", "P_{rec}/q, GeV/c", "", 100, fThetaRangeMin, fThetaRangeMax, 100, fPRangeMin,
332 fPRangeMax);
333
334 CreateH2("P_rec_P_sim", "P_{sim}/q, GeV/c", "P_{rec}/q, GeV/c", "", 100, fPRangeMin, fPRangeMax, 100, fPRangeMin,
335 fPRangeMax);
336 CreateH2("Px_rec_Px_sim", "P^{x}_{sim}/q, GeV/c", "P^{x}/q_{rec}, GeV/c", "", 100, -fPtRangeMax, fPtRangeMax, 100,
337 -fPtRangeMax, fPtRangeMax);
338 CreateH2("Py_rec_Py_sim", "P^{y}_{sim}/q, GeV/c", "P^{y}/q_{rec}, GeV/c", "", 100, -fPtRangeMax, fPtRangeMax, 100,
339 -fPtRangeMax, fPtRangeMax);
340 CreateH2("Pz_rec_Pz_sim", "P^{z}_{sim}/q, GeV/c", "P^{z}/q_{rec}, GeV/c", "", 100, fPtRangeMin, 4, 100, fPtRangeMin,
341 4);
342 CreateH2("Pt_rec_Pt_sim", "P^{t}_{sim}/q, GeV/c", "P^{t}/q_{rec}, GeV/c", "", 100, fPtRangeMin, 4, 100, fPtRangeMin,
343 4);
344
345 CreateH2("Eta_rec_Eta_sim", "#eta_{sim}", "#eta_{rec}", "", 100, fEtaRangeMin, fEtaRangeMax, 100, fEtaRangeMin,
346 fEtaRangeMax);
347 CreateH2("EtaRes_2D", "#eta_{sim}", "#Delta #eta / #eta, %", "", 100, 0, 4, 100, -5.0, 5.0);
348 CreateH1("EtaRes_1D", "#eta_{sim}", "#LT#Delta #eta / #eta#GT, %", fPRangeBins / 2, 0, 4);
349 CreateH1("EtaMean_1D", "#eta_{sim}", "#Delta #eta / #eta, #mu, %", fPRangeBins / 2, 0, 4);
350 CreateH1("EtaRes_Mean", "#Delta #eta / #eta, %", "Counter", 100, -5.0, 5.0);
351
352 CreateH2("Tx_rec_Tx_sim", "T^{x}_{sim}", "T^{x}_{rec}", "", 100, -1.0, 1.0, 100, -1.0, 1.0);
353 CreateH2("TxRes_2D", "Tx_{sim}", "#Delta Tx / Tx, %", "", 100, -1, 1, 100, -10.0, 10.0);
354 CreateH1("TxRes_1D", "Tx_{sim}", "#LT#Delta Tx / Tx#GT, %", fPRangeBins / 2, -1, 1);
355 CreateH1("TxMean_1D", "Tx_{sim}", "#Delta Tx / Tx, #mu, %", fPRangeBins / 2, -1, 1);
356 CreateH1("TxRes_Mean", "#Delta Tx / Tx, %", "Counter", 100, -10.0, 10.0);
357
358 CreateH2("Ty_rec_Ty_sim", "T^{y}_{sim}", "T^{y}_{rec}", "", 100, -1.0, 1.0, 100, -1.0, 1.0);
359 CreateH2("TyRes_2D", "Ty_{sim}", "#Delta Ty / Ty, %", "", 100, -1, 1, 100, -10.0, 10.0);
360 CreateH1("TyRes_1D", "Ty_{sim}", "#LT#Delta Ty / Ty#GT, %", fPRangeBins / 2, -1, 1);
361 CreateH1("TyMean_1D", "Ty_{sim}", "#Delta Ty / Ty, #mu, %", fPRangeBins / 2, -1, 1);
362 CreateH1("TyRes_Mean", "#Delta Ty / Ty, %", "Counter", 100, -10.0, 10.0);
363
364 CreateH2("Nh_rec_Nh_sim", "Number of mc-points", "Number of reco-hits", "", nofBinsPoints, minNofPoints,
365 maxNofPoints, nofBinsPoints, minNofPoints, maxNofPoints);
366
367 CreateH2("Nh_sim_Eta_sim", "Number of mc-points", "#eta_{sim}", "", nofBinsPoints, minNofPoints, maxNofPoints, 100,
368 fEtaRangeMin, fEtaRangeMax);
369 CreateH2("Nh_rec_Eta_rec", "Number of hits", "#eta_{rec}", "", nofBinsPoints, minNofPoints, maxNofPoints, 100,
370 fEtaRangeMin, fEtaRangeMax);
371 CreateH2("Nh_sim_P_sim", "Number of mc-points", "P_{sim}", "", nofBinsPoints, minNofPoints, maxNofPoints, 100,
372 fPRangeMin, 2 * fPRangeMax);
373 CreateH2("Nh_rec_P_rec", "Number of hits", "P_{rec}", "", nofBinsPoints, minNofPoints, maxNofPoints, 100,
374 fPRangeMin, 2 * fPRangeMax);
375 CreateH2("Nh_sim_Theta_sim", "Number of mc-points", "#theta_{sim}", "", nofBinsPoints, minNofPoints, maxNofPoints,
376 100, fThetaRangeMin, fThetaRangeMax);
377 CreateH2("Nh_rec_Theta_rec", "Number of hits", "#theta_{rec}", "", nofBinsPoints, minNofPoints, maxNofPoints, 100,
378 fThetaRangeMin, fThetaRangeMax);
379
380 CreateH1("Eff_vs_P", "P_{sim}/q, GeV/c", "Efficiency, %", fPRangeBins, fPRangeMin, fPRangeMax);
381 CreateH1("Split_vs_P", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, fPRangeMax);
382 CreateH1("SplitEff_vs_P", "P_{sim}/q, GeV/c", "Splits, %", fPRangeBins, fPRangeMin, fPRangeMax);
383 CreateH1("Sim_vs_P", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, fPRangeMax);
384 CreateH1("Rec_vs_P", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, fPRangeMax);
385 CreateH1("Ghost_vs_P", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, fPRangeMax);
386 CreateH1("Well_vs_P", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, fPRangeMax);
387 CreateH1("Fake_vs_P", "P_{sim}/q, GeV/c", "Ghosts, %", fPRangeBins, fPRangeMin, fPRangeMax);
388
389 CreateH1("Eff_vs_P_wide", "P_{sim}/q, GeV/c", "Efficiency, %", fPRangeBins, fPRangeMin, 10);
390 CreateH1("Split_vs_P_wide", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, 10);
391 CreateH1("SplitEff_vs_P_wide", "P_{sim}/q, GeV/c", "Splits, %", fPRangeBins, fPRangeMin, 10);
392 CreateH1("Sim_vs_P_wide", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, 10);
393 CreateH1("Rec_vs_P_wide", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, 10);
394 CreateH1("Ghost_vs_P_wide", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, 10);
395 CreateH1("Well_vs_P_wide", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, fPRangeMin, 10);
396 CreateH1("Fake_vs_P_wide", "P_{sim}/q, GeV/c", "Ghosts, %", fPRangeBins, fPRangeMin, 10);
397
398 CreateH1("Eff_vs_Eta", "#eta_{sim}", "Efficiency, %", fEtaRangeBins, fEtaRangeMin, fEtaRangeMax);
399 CreateH1("Split_vs_Eta", "#eta_{sim}", "Counter", fEtaRangeBins, fEtaRangeMin, fEtaRangeMax);
400 CreateH1("SplitEff_vs_Eta", "#eta_{sim}", "Splits, %", fEtaRangeBins, fEtaRangeMin, fEtaRangeMax);
401 CreateH1("Sim_vs_Eta", "#eta_{sim}", "Counter", fEtaRangeBins, fEtaRangeMin, fEtaRangeMax);
402 CreateH1("Rec_vs_Eta", "#eta_{sim}", "Counter", fEtaRangeBins, fEtaRangeMin, fEtaRangeMax);
403 CreateH1("Ghost_vs_Eta", "#eta_{sim}", "Counter", fEtaRangeBins, fEtaRangeMin, fEtaRangeMax);
404 CreateH1("Well_vs_Eta", "#eta_{sim}", "Counter", fEtaRangeBins, fEtaRangeMin, fEtaRangeMax);
405 CreateH1("Fake_vs_Eta", "#eta_{sim}", "Ghosts, %", fEtaRangeBins, fEtaRangeMin, fEtaRangeMax);
406
407 CreateH1("Eff_vs_Theta", "#theta_{sim}", "Efficiency, %", fThetaRangeBins, fThetaRangeMin, fThetaRangeMax);
408 CreateH1("Split_vs_Theta", "#theta_{sim}", "Counter", fThetaRangeBins, fThetaRangeMin, fThetaRangeMax);
409 CreateH1("SplitEff_vs_Theta", "#theta_{sim}", "Splits, %", fThetaRangeBins, fThetaRangeMin, fThetaRangeMax);
410 CreateH1("Sim_vs_Theta", "#theta_{sim}", "Counter", fThetaRangeBins, fThetaRangeMin, fThetaRangeMax);
411 CreateH1("Rec_vs_Theta", "#theta_{sim}", "Counter", fThetaRangeBins, fThetaRangeMin, fThetaRangeMax);
412 CreateH1("Ghost_vs_Theta", "#theta_{sim}", "Counter", fThetaRangeBins, fThetaRangeMin, fThetaRangeMax);
413 CreateH1("Well_vs_Theta", "#theta_{sim}", "Counter", fThetaRangeBins, fThetaRangeMin, fThetaRangeMax);
414 CreateH1("Fake_vs_Theta", "#theta_{sim}", "Ghosts, %", fThetaRangeBins, fThetaRangeMin, fThetaRangeMax);
415
416 CreateH1("Eff_vs_Nh", "Number of hits", "Efficiency, %", nofBinsPoints, minNofPoints, maxNofPoints);
417 CreateH1("Ghost_vs_Nh", "Number of hits", "Counter", nofBinsPoints, minNofPoints, maxNofPoints);
418 CreateH1("SplitEff_vs_Nh", "Number of hits", "Splits, %", nofBinsPoints, minNofPoints, maxNofPoints);
419 CreateH1("Split_vs_Nh", "Number of hits", "Counter", nofBinsPoints, minNofPoints, maxNofPoints);
420 CreateH1("Sim_vs_Nh", "Number of hits", "Counter", nofBinsPoints, minNofPoints, maxNofPoints);
421 CreateH1("Rec_vs_Nh", "Number of hits", "Counter", nofBinsPoints, minNofPoints, maxNofPoints);
422 CreateH1("Well_vs_Nh", "Number of hits", "Counter", nofBinsPoints, minNofPoints, maxNofPoints);
423 CreateH1("Fake_vs_Nh", "Number of hits", "Ghosts, %", nofBinsPoints, minNofPoints, maxNofPoints);
424
425 CreateH2("MomRes_vs_Chi2", "#chi^{2}", "#Delta P / P, %", "", 100, 0, 10, 100, -10, 10);
426 CreateH2("Mom_vs_Chi2", "#chi^{2}", "P_{rec}/q, GeV/c", "", 100, 0, 10, 100, fPRangeMin, fPRangeMax);
427 CreateH2("Mom_vs_Length", "Length, cm", "P_{rec}/q, GeV/c", "", 400, 0, 800, 100, fPRangeMin, fPRangeMax);
428 CreateH1("Chi2", "#chi^{2} / NDF", "Counter", 100, 0, 10);
429 CreateH1("Length", "length, cm", "Counter", 400, 0, 800);
430
431 CreateH1("VertResX", "#DeltaV_{x}, cm", "Counter", 100, -2.0, 2.0);
432 CreateH1("VertResY", "#DeltaV_{y}, cm", "Counter", 100, -2.0, 2.0);
433 CreateH1("VertResZ", "#DeltaV_{z}, cm", "Counter", 100, -2.0, 2.0);
434 CreateH1("VertX", "V_{x}, cm", "Counter", 300, -1.0, 1.0);
435 CreateH1("VertY", "V_{y}, cm", "Counter", 300, -1.0, 1.0);
436 CreateH1("VertZ", "V_{z}, cm", "Counter", 300, -2.0, +2.0);
437 CreateH2("VertX_vs_Ntracks", "Number of tracks", "V_{x}, cm", "", 100, 0, 100, 300, -1.0, 1.0);
438 CreateH2("VertY_vs_Ntracks", "Number of tracks", "V_{y}, cm", "", 100, 0, 100, 300, -1.0, 1.0);
439 CreateH2("VertZ_vs_Ntracks", "Number of tracks", "V_{z}, cm", "", 100, 0, 100, 300, -2.0, +2.0);
440
441 CreateH2("Eff_vs_EtaP", "#eta_{sim}", "P_{sim, GeV/c}", "", 100, fEtaRangeMin, fEtaRangeMax, 100, fPRangeMin,
442 fPRangeMax);
443 CreateH2("Clones_vs_EtaP", "#eta_{sim}", "P_{sim, GeV/c}", "", 100, fEtaRangeMin, fEtaRangeMax, 100, fPRangeMin,
444 fPRangeMax);
445 CreateH2("Fakes_vs_EtaP", "#eta_{sim}", "P_{sim, GeV/c}", "", 100, fEtaRangeMin, fEtaRangeMax, 100, fPRangeMin,
446 fPRangeMax);
447
448 // for first parameters
449 CreateH1("ResX_f", "Residual X, cm", "", 100, -20, 20);
450 CreateH1("ResY_f", "Residual Y, cm", "", 100, -20, 20);
451 CreateH1("ResTx_f", "Residual t_{x}", "", 100, -0.5, 0.5);
452 CreateH1("ResTy_f", "Residual t_{y}", "", 100, -0.5, 0.5);
453 CreateH1("ResQp_f", "Residual q/p, (GeV/c)^{-1}", "", 100, -2.0, 2.0);
454 CreateH1("ErrX_f", "Error X, cm", "", 100, -0, 1);
455 CreateH1("ErrY_f", "Error Y, cm", "", 100, -0, 1);
456 CreateH1("ErrTx_f", "Error t_{x}", "", 100, -0, 0.1);
457 CreateH1("ErrTy_f", "Error t_{y}", "", 100, -0, 0.1);
458 CreateH1("ErrQp_f", "Error q/p, (GeV/c)^{-1}", "", 100, -0, 0.2);
459 CreateH1("PullX_f", "Pull X", "", 100, -5.0, 5.0);
460 CreateH1("PullY_f", "Pull Y", "", 100, -5.0, 5.0);
461 CreateH1("PullTx_f", "Pull t_{x}", "", 100, -5.0, 5.0);
462 CreateH1("PullTy_f", "Pull t_{y}", "", 100, -5.0, 5.0);
463 CreateH1("PullQp_f", "Pull q/p", "", 100, -5.0, 5.0);
464
465 CreateH1("X_f", "X, cm", "", 100, -100, 100);
466 CreateH1("Y_f", "Y, cm", "", 100, -100, 100);
467 CreateH1("Tx_f", "t_{x}", "", 100, -1.0, 1.0);
468 CreateH1("Ty_f", "t_{y}", "", 100, -1.0, 1.0);
469 CreateH1("Qp_f", "q/p, (GeV/c)^{-1}", "", 100, -20.0, 20.0);
470 CreateH1("X_l", "X, cm", "", 100, -100, 100);
471 CreateH1("Y_l", "Y, cm", "", 100, -100, 100);
472 CreateH1("Tx_l", "t_{x}", "", 100, -1.0, 1.0);
473 CreateH1("Ty_l", "t_{y}", "", 100, -1.0, 1.0);
474 CreateH1("Qp_l", "q/p, (GeV/c)^{-1}", "", 100, -20.0, 20.0);
475
476 Int_t nMultBin = 100;
477 CreateH1("Eff_vs_mult", "N", "Efficiency, %", nMultBin, 0, nMultBin);
478 CreateH1("Split_vs_mult", "N", "Counter", nMultBin, 0, nMultBin);
479 CreateH1("SplitEff_vs_mult", "N", "Splits, %", nMultBin, 0, nMultBin);
480 CreateH1("Sim_vs_mult", "N", "Counter", nMultBin, 0, nMultBin);
481 CreateH1("Rec_vs_mult", "N", "Counter", nMultBin, 0, nMultBin);
482 CreateH1("Ghost_vs_mult", "N", "Counter", nMultBin, 0, nMultBin);
483 CreateH1("Well_vs_mult", "N", "Counter", nMultBin, 0, nMultBin);
484 CreateH1("Fake_vs_mult", "N", "Ghosts, %", nMultBin, 0, nMultBin);
485
486 // TOF
487 CreateH1("Eff_vs_P_tof400", "P_{sim}/q, GeV/c", "Efficiency, %", fPRangeBins, 0.0, 8.0);
488 CreateH1("Split_vs_P_tof400", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
489 CreateH1("SplitEff_vs_P_tof400", "P_{sim}/q, GeV/c", "Splits, %", fPRangeBins, 0.0, 8.0);
490 CreateH1("Sim_vs_P_tof400", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
491 CreateH1("Rec_vs_P_tof400", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
492 CreateH1("Ghost_vs_P_tof400", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
493 CreateH1("Well_vs_P_tof400", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
494 CreateH1("Fake_vs_P_tof400", "P_{sim}/q, GeV/c", "Ghosts, %", fPRangeBins, 0.0, 8.0);
495 CreateH1("Eff_vs_P_tof700", "P_{sim}/q, GeV/c", "Efficiency, %", fPRangeBins, 0.0, 8.0);
496 CreateH1("Split_vs_P_tof700", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
497 CreateH1("SplitEff_vs_P_tof700", "P_{sim}/q, GeV/c", "Splits, %", fPRangeBins, 0.0, 8.0);
498 CreateH1("Sim_vs_P_tof700", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
499 CreateH1("Rec_vs_P_tof700", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
500 CreateH1("Ghost_vs_P_tof700", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
501 CreateH1("Well_vs_P_tof700", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
502 CreateH1("Fake_vs_P_tof700", "P_{sim}/q, GeV/c", "Ghosts, %", fPRangeBins, 0.0, 8.0);
503
504 CreateH2("banana_tof400", "P_{rec}/Q, GeV/c", "#beta_{rec}", "", 500, -4, 10, 500, 0.5, 1.1);
505 CreateH2("banana_tof700", "P_{rec}/Q, GeV/c", "#beta_{rec}", "", 500, -4, 10, 500, 0.5, 1.1);
506 CreateH2("banana_tof400_good", "P_{rec}/Q, GeV/c", "#beta_{rec}", "", 500, -4, 10, 500, 0.5, 1.1);
507 CreateH2("banana_tof700_good", "P_{rec}/Q, GeV/c", "#beta_{rec}", "", 500, -4, 10, 500, 0.5, 1.1);
508 CreateH1("x_residuals_tof400_good", "dX, cm", "count", 250, -5.0, 5.0);
509 CreateH1("y_residuals_tof400_good", "dY, cm", "count", 250, -5.0, 5.0);
510 CreateH1("x_residuals_tof400_bad", "dX, cm", "count", 250, -5.0, 5.0);
511 CreateH1("y_residuals_tof400_bad", "dY, cm", "count", 250, -5.0, 5.0);
512 CreateH2("x_resi_vs_mom_tof400_good", "P/Q, GeV/c/Q", "dX, cm", "", 500, 0, 8, 500, -5.0, 5.0);
513 CreateH2("y_resi_vs_mom_tof400_good", "P/Q, GeV/c/Q", "dY, cm", "", 500, 0, 8, 500, -5.0, 5.0);
514 CreateH1("x_residuals_tof700_good", "dX, cm", "count", 250, -5.0, 5.0);
515 CreateH1("y_residuals_tof700_good", "dY, cm", "count", 250, -5.0, 5.0);
516 CreateH2("x_resi_vs_mom_tof700_good", "P/Q, GeV/c/Q", "dX, cm", "", 500, 0, 8, 500, -5.0, 5.0);
517 CreateH2("y_resi_vs_mom_tof700_good", "P/Q, GeV/c/Q", "dY, cm", "", 500, 0, 8, 500, -5.0, 5.0);
518 CreateH1("x_residuals_tof700_bad", "dX, cm", "count", 250, -5.0, 5.0);
519 CreateH1("y_residuals_tof700_bad", "dY, cm", "count", 250, -5.0, 5.0);
520 CreateH2("Mass_correlation", "M_{tof400}/Q, GeV/c^{2}/Q", "M_{tof700}/Q, GeV/c^{2}/Q", "", 500, 0, 3, 500, 0, 3);
521
522 // CSC
523 CreateH1("Eff_vs_P_csc", "P_{sim}/q, GeV/c", "Efficiency, %", fPRangeBins, 0.0, 8.0);
524 CreateH1("Split_vs_P_csc", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
525 CreateH1("SplitEff_vs_P_csc", "P_{sim}/q, GeV/c", "Splits, %", fPRangeBins, 0.0, 8.0);
526 CreateH1("Sim_vs_P_csc", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
527 CreateH1("Rec_vs_P_csc", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
528 CreateH1("Ghost_vs_P_csc", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
529 CreateH1("Well_vs_P_csc", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
530 CreateH1("Fake_vs_P_csc", "P_{sim}/q, GeV/c", "Ghosts, %", fPRangeBins, 0.0, 8.0);
531
532 CreateH1("x_residuals_csc_good", "dX, cm", "count", 250, -5.0, 5.0);
533 CreateH1("y_residuals_csc_good", "dY, cm", "count", 250, -5.0, 5.0);
534 CreateH2("x_resi_vs_mom_csc_good", "P/Q, GeV/c/Q", "dX, cm", "", 500, 0, 8, 500, -5.0, 5.0);
535 CreateH2("y_resi_vs_mom_csc_good", "P/Q, GeV/c/Q", "dY, cm", "", 500, 0, 8, 500, -5.0, 5.0);
536 CreateH1("x_residuals_csc_bad", "dX, cm", "count", 250, -5.0, 5.0);
537 CreateH1("y_residuals_csc_bad", "dY, cm", "count", 250, -5.0, 5.0);
538
539 // DCH1
540 CreateH1("Eff_vs_P_dch1", "P_{sim}/q, GeV/c", "Efficiency, %", fPRangeBins, 0.0, 8.0);
541 CreateH1("Split_vs_P_dch1", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
542 CreateH1("SplitEff_vs_P_dch1", "P_{sim}/q, GeV/c", "Splits, %", fPRangeBins, 0.0, 8.0);
543 CreateH1("Sim_vs_P_dch1", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
544 CreateH1("Rec_vs_P_dch1", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
545 CreateH1("Ghost_vs_P_dch1", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
546 CreateH1("Well_vs_P_dch1", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
547 CreateH1("Fake_vs_P_dch1", "P_{sim}/q, GeV/c", "Ghosts, %", fPRangeBins, 0.0, 8.0);
548
549 CreateH1("x_residuals_dch1_good", "dX, cm", "count", 250, -5.0, 5.0);
550 CreateH1("y_residuals_dch1_good", "dY, cm", "count", 250, -5.0, 5.0);
551 CreateH2("x_resi_vs_mom_dch1_good", "P/Q, GeV/c/Q", "dX, cm", "", 500, 0, 8, 500, -5.0, 5.0);
552 CreateH2("y_resi_vs_mom_dch1_good", "P/Q, GeV/c/Q", "dY, cm", "", 500, 0, 8, 500, -5.0, 5.0);
553 CreateH1("x_residuals_dch1_bad", "dX, cm", "count", 250, -5.0, 5.0);
554 CreateH1("y_residuals_dch1_bad", "dY, cm", "count", 250, -5.0, 5.0);
555
556 // DCH2
557 CreateH1("Eff_vs_P_dch2", "P_{sim}/q, GeV/c", "Efficiency, %", fPRangeBins, 0.0, 8.0);
558 CreateH1("Split_vs_P_dch2", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
559 CreateH1("SplitEff_vs_P_dch2", "P_{sim}/q, GeV/c", "Splits, %", fPRangeBins, 0.0, 8.0);
560 CreateH1("Sim_vs_P_dch2", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
561 CreateH1("Rec_vs_P_dch2", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
562 CreateH1("Ghost_vs_P_dch2", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
563 CreateH1("Well_vs_P_dch2", "P_{sim}/q, GeV/c", "Counter", fPRangeBins, 0.0, 8.0);
564 CreateH1("Fake_vs_P_dch2", "P_{sim}/q, GeV/c", "Ghosts, %", fPRangeBins, 0.0, 8.0);
565
566 CreateH1("x_residuals_dch2_good", "dX, cm", "count", 250, -5.0, 5.0);
567 CreateH1("y_residuals_dch2_good", "dY, cm", "count", 250, -5.0, 5.0);
568 CreateH2("x_resi_vs_mom_dch2_good", "P/Q, GeV/c/Q", "dX, cm", "", 500, 0, 8, 500, -5.0, 5.0);
569 CreateH2("y_resi_vs_mom_dch2_good", "P/Q, GeV/c/Q", "dY, cm", "", 500, 0, 8, 500, -5.0, 5.0);
570 CreateH1("x_residuals_dch2_bad", "dX, cm", "count", 250, -5.0, 5.0);
571 CreateH1("y_residuals_dch2_bad", "dY, cm", "count", 250, -5.0, 5.0);
572
573 // hits residuals
574 for (Int_t iSt = 0; iSt < 9; ++iSt) {
575 CreateH1(Form("ResX_%dst", iSt), "ResX, cm", "Counter", 100, -0.5, 0.5);
576 CreateH1(Form("ResY_%dst", iSt), "ResY, cm", "Counter", 100, -0.5, 0.5);
577 }
578
579 printf("\nHISTOGRAMS CREATED!\n\n");
580}
581
582void BmnTrackingQa::ProcessGlobal()
583{
584
585 cout << "New event" << endl;
586 vector<Int_t> refs;
587 vector<Int_t> splits;
588
589 nWellRecoInEvent = 0;
590 nBadRecoInEvent = 0;
591 nAllRecoInEvent = 0;
592
593 // BmnVertex* vrt = (fVertex == nullptr) ? nullptr : (BmnVertex*)fVertex->At(0);
594
595 // if (vrt != nullptr) {
596 // if (vrt->GetNTracks() > 1) {
597 // fHM->H1("VertResX")->Fill(vrt->GetX() - 0.0);
598 // fHM->H1("VertResY")->Fill(vrt->GetY() - 0.0);
599 // fHM->H1("VertResZ")->Fill(vrt->GetZ() - 0.0);
600 // fHM->H1("VertX")->Fill(vrt->GetX());
601 // fHM->H1("VertY")->Fill(vrt->GetY());
602 // fHM->H1("VertZ")->Fill(vrt->GetZ());
603 // fHM->H1("VertX_vs_Ntracks")->Fill(fGlobalTracks->GetEntriesFast(), vrt->GetX());
604 // fHM->H1("VertY_vs_Ntracks")->Fill(fGlobalTracks->GetEntriesFast(), vrt->GetY());
605 // fHM->H1("VertZ_vs_Ntracks")->Fill(fGlobalTracks->GetEntriesFast(), vrt->GetZ());
606 // }
607 // } else
608
609 if (!fVertexL1)
610 return;
611 if (fVertexL1->GetNTracks() < 2)
612 return;
613
614 Float_t vx = fVertexL1->GetX();
615 Float_t vy = fVertexL1->GetY();
616 Float_t vz = fVertexL1->GetZ();
617 Int_t nStsTracks = fStsTracks->GetEntriesFast();
618
619 fHM->H1("VertResX")->Fill(vx - 0.0);
620 fHM->H1("VertResY")->Fill(vy - 0.0);
621 fHM->H1("VertResZ")->Fill(vz - 0.0);
622 fHM->H1("VertX")->Fill(vx);
623 fHM->H1("VertY")->Fill(vy);
624 fHM->H1("VertZ")->Fill(vz);
625 fHM->H1("VertX_vs_Ntracks")->Fill(nStsTracks, vx);
626 fHM->H1("VertY_vs_Ntracks")->Fill(nStsTracks, vy);
627 fHM->H1("VertZ_vs_Ntracks")->Fill(nStsTracks, vz);
628
629 for (Int_t iTrack = 0; iTrack < nStsTracks; iTrack++) {
630 CbmStsTrack* stsTrk = (CbmStsTrack*)(fStsTracks->At(iTrack));
631 CbmTrackMatch* stsTrkMatch = (CbmTrackMatch*)fStsTrackMatches->At(iTrack);
632 if (!stsTrk)
633 continue;
634 if (!stsTrkMatch)
635 continue;
636 nAllRecoTracks++;
637 nAllRecoInEvent++;
638
639 FairTrackParam param;
640 CbmKFTrack kftr = CbmKFTrack(*stsTrk);
641 kftr.Extrapolate(vz);
642 kftr.GetTrackParam(param);
643
644 Float_t Tx = param.GetTx();
645 Float_t Ty = param.GetTy();
646 Float_t P_rec = Abs(1.0 / param.GetQp());
647 Float_t Pz_rec = P_rec / Sqrt(Tx * Tx + Ty * Ty + 1);
648 Float_t Px_rec = Pz_rec * Tx;
649 Float_t Py_rec = Pz_rec * Ty;
650 Float_t Pxy_rec = Sqrt(Px_rec * Px_rec + Py_rec * Py_rec);
651 Float_t Eta_rec = 0.5 * Log((P_rec + Pz_rec) / (P_rec - Pz_rec));
652 Float_t Theta_rec = ATan2(Pxy_rec, Pz_rec) * RadToDeg();
653 Int_t N_rec = stsTrk->GetNStsHits();
654 Float_t chi2 = stsTrk->GetChi2() / stsTrk->GetNDF();
655 Float_t len = 0.0; // stsTrk->GetLength()
656
657 Int_t stsMCId = stsTrkMatch->GetMCTrackId();
658 Float_t ratio = stsTrkMatch->GetTrueOverAllHitsRatio();
659
660 fHM->H1("Rec_vs_P")->Fill(P_rec);
661 fHM->H1("Rec_vs_P_wide")->Fill(P_rec);
662 fHM->H1("Rec_vs_Eta")->Fill(Eta_rec);
663 fHM->H1("Rec_vs_Theta")->Fill(Theta_rec);
664 fHM->H1("Rec_vs_Nh")->Fill(N_rec);
665
666 if (ratio < fQuota) { // fake tracks
667 nBadRecoTracks++;
668 nBadRecoInEvent++;
669
670 fHM->H1("Ghost_vs_P")->Fill(P_rec);
671 fHM->H1("Ghost_vs_P_wide")->Fill(P_rec);
672 fHM->H1("Ghost_vs_Nh")->Fill(N_rec);
673 fHM->H1("Ghost_vs_Eta")->Fill(Eta_rec);
674 fHM->H1("Ghost_vs_Theta")->Fill(Theta_rec);
675 fHM->H1("Fakes_vs_EtaP")->Fill(Eta_rec, P_rec);
676 } else { // true tracks
677
678 const CbmMCTrack* mcTrack = (CbmMCTrack*)fMCTracks->At(stsMCId);
679 if (!mcTrack)
680 continue;
681
682 Int_t N_sim = CalcNumberOfMcPointInTrack(stsMCId);
683 if (N_sim < fMinNofPoints)
684 continue; // FIXME!!! Do we need it or not???
685
686 Float_t P_sim = mcTrack->GetP();
687 Float_t Px_sim = mcTrack->GetPx();
688 Float_t Py_sim = mcTrack->GetPy();
689 Float_t Pz_sim = mcTrack->GetPz();
690 Float_t Pxy_sim = Sqrt(Px_sim * Px_sim + Py_sim * Py_sim);
691 Float_t Theta_sim = ATan2(Pxy_sim, Pz_sim) * RadToDeg();
692 Float_t Eta_sim = 0.5 * Log((P_sim + Pz_sim) / (P_sim - Pz_sim));
693
694 vector<Int_t>::iterator it = find(refs.begin(), refs.end(), stsMCId);
695 if (it != refs.end()) {
696 splits.push_back(stsMCId);
697 for (Int_t i = 0; i < nStsTracks; i++) {
698 CbmStsTrack* stsTrkSpl = (CbmStsTrack*)(fStsTracks->At(i));
699 CbmTrackMatch* stsTrkMatchSpl = (CbmTrackMatch*)fStsTrackMatches->At(i);
700 if (stsTrkMatchSpl->GetMCTrackId() == stsMCId) {
701 cout << "SPLIT: " << i << " | " << stsMCId << " | " << stsTrkSpl->GetNStsHits() << endl;
702 }
703 }
704
705 } else {
706 refs.push_back(stsMCId);
707 nGoodRecoTracks++;
708 nWellRecoInEvent++;
709 fHM->H1("Well_vs_P_wide")->Fill(P_sim);
710 fHM->H1("Well_vs_P")->Fill(P_sim);
711 fHM->H1("Well_vs_Nh")->Fill(N_sim);
712 fHM->H1("Well_vs_Eta")->Fill(Eta_sim);
713 fHM->H1("Well_vs_Theta")->Fill(Theta_sim);
714 fHM->H2("Nh_rec_Nh_sim")->Fill(N_sim, N_rec);
715 }
716
717 fHM->H2("Nh_rec_Eta_rec")->Fill(N_rec, Eta_rec);
718 fHM->H2("Nh_rec_P_rec")->Fill(N_rec, P_rec);
719 fHM->H2("Nh_rec_Theta_rec")->Fill(N_rec, Theta_rec);
720
721 fHM->H2("momRes_2D")->Fill(P_sim, (P_sim - P_rec) / P_sim * 100.0);
722 fHM->H2("PxRes_2D")->Fill(Px_sim, (Px_sim - Px_rec) / Px_sim * 100.0);
723 fHM->H2("PyRes_2D")->Fill(Py_sim, (Py_sim - Py_rec) / Py_sim * 100.0);
724 fHM->H2("PzRes_2D")->Fill(Pz_sim, (Pz_sim - Pz_rec) / Pz_sim * 100.0);
725 fHM->H2("MomRes_vs_Chi2")->Fill(chi2, (P_sim - P_rec) / P_sim * 100.0);
726 fHM->H2("MomRes_vs_Length")->Fill(len, (P_sim - P_rec) / P_sim * 100.0);
727 fHM->H2("MomRes_vs_nHits")->Fill(N_rec, (P_sim - P_rec) / P_sim * 100.0);
728 fHM->H2("MomRes_vs_Theta")->Fill(Theta_sim, (P_sim - P_rec) / P_sim * 100.0);
729 fHM->H2("Mom_vs_Chi2")->Fill(chi2, P_rec);
730 fHM->H2("Mom_vs_Length")->Fill(len, P_rec);
731 fHM->H1("Chi2")->Fill(chi2);
732 fHM->H1("Length")->Fill(len);
733
734 fHM->H2("P_rec_P_sim")->Fill(P_sim, P_rec);
735 fHM->H2("Eta_rec_Eta_sim")->Fill(Eta_sim, Eta_rec);
736 fHM->H2("EtaRes_2D")->Fill(Eta_sim, (Eta_sim - Eta_rec) / Eta_sim * 100.0);
737 fHM->H2("Px_rec_Px_sim")->Fill(Px_sim, Px_rec);
738 fHM->H2("Py_rec_Py_sim")->Fill(Py_sim, Py_rec);
739 fHM->H2("Pt_rec_Pt_sim")->Fill(Sqrt(Px_sim * Px_sim + Pz_sim * Pz_sim), Pz_rec * Sqrt(1 + Tx * Tx));
740 Float_t Tx_sim = Px_sim / Pz_sim;
741 Float_t Ty_sim = Py_sim / Pz_sim;
742 fHM->H2("Tx_rec_Tx_sim")->Fill(Tx_sim, Tx);
743 fHM->H2("TxRes_2D")->Fill(Tx_sim, (Tx_sim - Tx) / Tx_sim * 100.0);
744 fHM->H2("TyRes_2D")->Fill(Ty_sim, (Ty_sim - Ty) / Ty_sim * 100.0);
745 fHM->H2("Ty_rec_Ty_sim")->Fill(Py_sim / Pz_sim, Ty);
746 fHM->H2("Pz_rec_Pz_sim")->Fill(Pz_sim, Pz_rec);
747 fHM->H2("EtaP_rec")->Fill(Eta_rec, P_rec);
748 fHM->H2("ThetaP_rec")->Fill(Theta_rec, P_rec);
749
750 FairTrackParam* pf = &param; // stsTrk->GetParamFirst();
751 FairTrackParam* pl = stsTrk->GetParamLast();
752
753 Double_t cov[15];
754
755 pf->CovMatrix(cov);
756 // first parameters
757 fHM->H1("ResX_f")->Fill(mcTrack->GetStartX() - pf->GetX());
758 fHM->H1("ResY_f")->Fill(mcTrack->GetStartY() - pf->GetY());
759 fHM->H1("ResTx_f")->Fill(Tx_sim - pf->GetTx());
760 fHM->H1("ResTy_f")->Fill(Ty_sim - pf->GetTy());
761 fHM->H1("ResQp_f")->Fill(1.0 / P_sim - Abs(pf->GetQp()));
762 fHM->H1("ErrX_f")->Fill(Sqrt(cov[0]));
763 fHM->H1("ErrY_f")->Fill(Sqrt(cov[5]));
764 fHM->H1("ErrTx_f")->Fill(Sqrt(cov[9]));
765 fHM->H1("ErrTy_f")->Fill(Sqrt(cov[12]));
766 fHM->H1("ErrQp_f")->Fill(Sqrt(cov[14]));
767 fHM->H1("PullX_f")->Fill((mcTrack->GetStartX() - pf->GetX()) / Sqrt(cov[0]));
768 fHM->H1("PullY_f")->Fill((mcTrack->GetStartY() - pf->GetY()) / Sqrt(cov[5]));
769 fHM->H1("PullTx_f")->Fill((Tx_sim - pf->GetTx()) / Sqrt(cov[9]));
770 fHM->H1("PullTy_f")->Fill((Ty_sim - pf->GetTy()) / Sqrt(cov[12]));
771 fHM->H1("PullQp_f")->Fill((1.0 / P_sim - Abs(pf->GetQp())) / Sqrt(cov[14]));
772
773 fHM->H1("X_f")->Fill(pf->GetX());
774 fHM->H1("Y_f")->Fill(pf->GetY());
775 fHM->H1("Tx_f")->Fill(pf->GetTx());
776 fHM->H1("Ty_f")->Fill(pf->GetTy());
777 fHM->H1("Qp_f")->Fill(pf->GetQp());
778
779 fHM->H1("X_l")->Fill(pl->GetX());
780 fHM->H1("Y_l")->Fill(pl->GetY());
781 fHM->H1("Tx_l")->Fill(pl->GetTx());
782 fHM->H1("Ty_l")->Fill(pl->GetTy());
783 fHM->H1("Qp_l")->Fill(pl->GetQp());
784
785 // //TOF400
786 // if (glTrack->GetTof1HitIndex() != -1) {
787 // fHM->H1("Rec_vs_P_tof400")->Fill(P_sim);
788 // fHM->H2("banana_tof400")->Fill(glTrack->GetP(), glTrack->GetBeta(1));
789 // BmnHit* tofHit = (BmnHit*)fTof400Hits->At(glTrack->GetTof1HitIndex());
790 // Bool_t found = kFALSE;
791 // for (Int_t iLnk = 0; iLnk < tofHit->GetLinksWithType(0x2).GetNLinks(); ++iLnk) {
792 // if (tofHit->GetLinksWithType(0x2).GetLink(iLnk).GetIndex() == stsMCId) {
793 // found = kTRUE;
794 // break;
795 // }
796 // }
797 // if (!found) {
798 // fHM->H1("Ghost_vs_P_tof400")->Fill(P_sim);
799 // fHM->H1("x_residuals_tof400_bad")->Fill(tofHit->GetResX());
800 // fHM->H1("y_residuals_tof400_bad")->Fill(tofHit->GetResY());
801 // } else {
802 // fHM->H1("Well_vs_P_tof400")->Fill(P_sim);
803 // fHM->H2("banana_tof400_good")->Fill(glTrack->GetP(), glTrack->GetBeta(1));
804 // fHM->H1("x_residuals_tof400_good")->Fill(tofHit->GetResX());
805 // fHM->H1("y_residuals_tof400_good")->Fill(tofHit->GetResY());
806 // fHM->H2("x_resi_vs_mom_tof400_good")->Fill(P_sim, tofHit->GetResX());
807 // fHM->H2("y_resi_vs_mom_tof400_good")->Fill(P_sim, tofHit->GetResY());
808 // }
809 // }
810 // //TOF700
811 // if (glTrack->GetTof2HitIndex() != -1) {
812 // fHM->H1("Rec_vs_P_tof700")->Fill(P_sim);
813 // fHM->H2("banana_tof700")->Fill(glTrack->GetP(), glTrack->GetBeta(2));
814 // BmnHit* tofHit = (BmnHit*)fTof700Hits->At(glTrack->GetTof2HitIndex());
815 // Bool_t found = kFALSE;
816 // for (Int_t iLnk = 0; iLnk < tofHit->GetLinksWithType(0x2).GetNLinks(); ++iLnk) {
817 // if (tofHit->GetLinksWithType(0x2).GetLink(iLnk).GetIndex() == stsMCId) {
818 // found = kTRUE;
819 // break;
820 // }
821 // }
822 // if (!found) {
823 // fHM->H1("Ghost_vs_P_tof700")->Fill(P_sim);
824 // fHM->H1("x_residuals_tof700_bad")->Fill(tofHit->GetResX());
825 // fHM->H1("y_residuals_tof700_bad")->Fill(tofHit->GetResY());
826 // } else {
827 // fHM->H1("Well_vs_P_tof700")->Fill(P_sim);
828 // fHM->H2("banana_tof700_good")->Fill(glTrack->GetP(), glTrack->GetBeta(2));
829 // fHM->H1("x_residuals_tof700_good")->Fill(tofHit->GetResX());
830 // fHM->H1("y_residuals_tof700_good")->Fill(tofHit->GetResY());
831 // fHM->H2("x_resi_vs_mom_tof700_good")->Fill(P_sim, tofHit->GetResX());
832 // fHM->H2("y_resi_vs_mom_tof700_good")->Fill(P_sim, tofHit->GetResY());
833 // }
834 // }
835 // if (glTrack->GetTof1HitIndex() != -1 && glTrack->GetTof2HitIndex() != -1) {
836 // Double_t beta400sq = glTrack->GetBeta(1) * glTrack->GetBeta(1);
837 // Double_t beta700sq = glTrack->GetBeta(2) * glTrack->GetBeta(2);
838 // Double_t mom2 = glTrack->GetP() * glTrack->GetP();
839 // Double_t mass400 = Sqrt(mom2 / beta400sq - mom2);
840 // Double_t mass700 = Sqrt(mom2 / beta700sq - mom2);
841 // fHM->H2("Mass_correlation")->Fill(mass400, mass700);
842 // }
843 // //CSC
844 // if (glTrack->GetCscHitIndex(0) != -1) {
845 // fHM->H1("Rec_vs_P_csc")->Fill(P_sim);
846 // BmnHit* cscHit = (BmnHit*)fCscHits->At(glTrack->GetCscHitIndex(0));
847 // if (cscHit->GetRefIndex() != -1) { //index of parent mc point
848 // FairMCPoint* pnt = (FairMCPoint*)fCscPoints->At(cscHit->GetRefIndex());
849 // if (pnt) {
850 // if (stsMCId != pnt->GetTrackID()) {
851 // fHM->H1("Ghost_vs_P_csc")->Fill(P_sim);
852 // fHM->H1("x_residuals_csc_bad")->Fill(cscHit->GetResX());
853 // fHM->H1("y_residuals_csc_bad")->Fill(cscHit->GetResY());
854 // } else {
855 // fHM->H1("Well_vs_P_csc")->Fill(P_sim);
856 // fHM->H1("x_residuals_csc_good")->Fill(cscHit->GetResX());
857 // fHM->H1("y_residuals_csc_good")->Fill(cscHit->GetResY());
858 // fHM->H2("x_resi_vs_mom_csc_good")->Fill(P_sim, cscHit->GetResX());
859 // fHM->H2("y_resi_vs_mom_csc_good")->Fill(P_sim, cscHit->GetResY());
860 // }
861 // }
862 // }
863 // }
864 // //DCH1
865 // if (glTrack->GetDch1TrackIndex() != -1) {
866 // fHM->H1("Rec_vs_P_dch1")->Fill(P_sim);
867 // BmnDchTrack* dchTr = (BmnDchTrack*)fDchTracks->At(glTrack->GetDch1TrackIndex());
868 // if (dchTr)
869 // if (stsMCId != dchTr->GetTrackId()) {
870 // fHM->H1("Ghost_vs_P_dch1")->Fill(P_sim);
871 // fHM->H1("x_residuals_dch1_bad")->Fill(0.0);
872 // fHM->H1("y_residuals_dch1_bad")->Fill(0.0);
873 // } else {
874 // fHM->H1("Well_vs_P_dch1")->Fill(P_sim);
875 // fHM->H1("x_residuals_dch1_good")->Fill(0.0);
876 // fHM->H1("y_residuals_dch1_good")->Fill(0.0);
877 // fHM->H2("x_resi_vs_mom_dch1_good")->Fill(P_sim, 0.0);
878 // fHM->H2("y_resi_vs_mom_dch1_good")->Fill(P_sim, 0.0);
879 // }
880 // }
881 // //DCH2
882 // if (glTrack->GetDch2TrackIndex() != -1) {
883 // fHM->H1("Rec_vs_P_dch2")->Fill(P_sim);
884 // BmnDchTrack* dchTr = (BmnDchTrack*)fDchTracks->At(glTrack->GetDch2TrackIndex());
885 // if (dchTr)
886 // if (stsMCId != dchTr->GetTrackId()) {
887 // fHM->H1("Ghost_vs_P_dch2")->Fill(P_sim);
888 // fHM->H1("x_residuals_dch2_bad")->Fill(0.0);
889 // fHM->H1("y_residuals_dch2_bad")->Fill(0.0);
890 // } else {
891 // fHM->H1("Well_vs_P_dch2")->Fill(P_sim);
892 // fHM->H1("x_residuals_dch2_good")->Fill(0.0);
893 // fHM->H1("y_residuals_dch2_good")->Fill(0.0);
894 // fHM->H2("x_resi_vs_mom_dch2_good")->Fill(P_sim, 0.0);
895 // fHM->H2("y_resi_vs_mom_dch2_good")->Fill(P_sim, 0.0);
896 // }
897 // }
898 }
899 }
900
901 Int_t nSplitInOneEvent = 0;
902
903 for (size_t i = 0; i < splits.size(); ++i) {
904 const CbmMCTrack* mcTrack = (CbmMCTrack*)fMCTracks->At(splits[i]);
905 if (!mcTrack)
906 continue;
907
908 Int_t nPointsPerTrack = CalcNumberOfMcPointInTrack(splits[i]);
909 if (nPointsPerTrack < fMinNofPoints)
910 continue;
911
912 nSplitInOneEvent++;
913 nSplitRecoTracks++;
914
915 Float_t Px = mcTrack->GetPx();
916 Float_t Py = mcTrack->GetPy();
917 Float_t Pz = mcTrack->GetPz();
918 Float_t P = mcTrack->GetP();
919 Float_t Pxy = Sqrt(Px * Px + Py * Py);
920 Float_t eta = 0.5 * Log((P + Pz) / (P - Pz));
921 Float_t theta = ATan2(Pxy, Pz) * RadToDeg();
922
923 fHM->H1("Split_vs_P")->Fill(P);
924 fHM->H1("Split_vs_P_wide")->Fill(P);
925 fHM->H1("Split_vs_Eta")->Fill(eta);
926 fHM->H1("Split_vs_Theta")->Fill(theta);
927 fHM->H1("Split_vs_Nh")->Fill(nPointsPerTrack);
928 fHM->H2("Clones_vs_EtaP")->Fill(eta, P);
929 }
930
931 Int_t nReconstructable = 0;
932
933 for (Int_t iTrack = 0; iTrack < fMCTracks->GetEntriesFast(); iTrack++) {
934 const CbmMCTrack* mcTrack = (CbmMCTrack*)fMCTracks->At(iTrack);
935 if (!mcTrack)
936 continue;
937
938 Int_t nHitsPerTrack = CalcNumberOfMcPointInTrack(iTrack);
939 if (nHitsPerTrack < fMinNofPoints)
940 continue;
941
942 nAllMcTracks++;
943 nReconstructable++;
944
945 Float_t Px = mcTrack->GetPx();
946 Float_t Py = mcTrack->GetPy();
947 Float_t Pz = mcTrack->GetPz();
948 Float_t P = mcTrack->GetP();
949 Float_t Pxy = Sqrt(Px * Px + Py * Py);
950 Float_t eta = 0.5 * Log((P + Pz) / (P - Pz));
951 Float_t theta = ATan2(Pxy, Pz) * RadToDeg();
952
953 fHM->H1("Sim_vs_P")->Fill(P);
954 fHM->H1("Sim_vs_P_wide")->Fill(P);
955 fHM->H1("Sim_vs_Eta")->Fill(eta);
956 fHM->H1("Sim_vs_Theta")->Fill(theta);
957 fHM->H1("Sim_vs_Nh")->Fill(nHitsPerTrack);
958 fHM->H2("Nh_sim_Eta_sim")->Fill(nHitsPerTrack, eta);
959 fHM->H2("Nh_sim_Theta_sim")->Fill(nHitsPerTrack, theta);
960 fHM->H2("Nh_sim_P_sim")->Fill(nHitsPerTrack, P);
961 fHM->H2("ThetaP_sim")->Fill(theta, P);
962 fHM->H2("EtaP_sim")->Fill(eta, P);
963
964 if (mcTrack->GetNPoints(kTOF1) > 0) {
965 fHM->H1("Sim_vs_P_tof400")->Fill(P);
966 }
967
968 if (mcTrack->GetNPoints(kTOF) > 0) {
969 fHM->H1("Sim_vs_P_tof700")->Fill(P);
970 }
971
972 if (mcTrack->GetNPoints(kCSC) > 0) {
973 fHM->H1("Sim_vs_P_csc")->Fill(P);
974 }
975
976 if (mcTrack->GetNPoints(kDCH) == 16) {
977 fHM->H1("Sim_vs_P_dch1")->Fill(P);
978 fHM->H1("Sim_vs_P_dch2")->Fill(P);
979 }
980 }
981
982 fHM->H1("Sim_vs_mult")
983 ->SetBinContent(nReconstructable, fHM->H1("Sim_vs_mult")->GetBinContent(nReconstructable) + nReconstructable);
984 fHM->H1("Well_vs_mult")
985 ->SetBinContent(nReconstructable, fHM->H1("Well_vs_mult")->GetBinContent(nReconstructable) + nWellRecoInEvent);
986 fHM->H1("Rec_vs_mult")
987 ->SetBinContent(nReconstructable, fHM->H1("Rec_vs_mult")->GetBinContent(nReconstructable) + nAllRecoInEvent);
988 fHM->H1("Split_vs_mult")
989 ->SetBinContent(nReconstructable, fHM->H1("Split_vs_mult")->GetBinContent(nReconstructable) + nSplitInOneEvent);
990 fHM->H1("Ghost_vs_mult")
991 ->SetBinContent(nReconstructable, fHM->H1("Ghost_vs_mult")->GetBinContent(nReconstructable) + nBadRecoInEvent);
992}
993
994Int_t BmnTrackingQa::CalcNumberOfMcPointInTrack(BmnMCTrack mcTrack)
995{
996 Int_t nHitsOnStation[fNStations];
997 for (Int_t i = 0; i < fNStations; ++i)
998 nHitsOnStation[i] = 0;
999 vector<BmnMCPoint> pointsGem = mcTrack.GetPoints(kGEM);
1000 for (BmnMCPoint pntGEM : pointsGem) {
1001 nHitsOnStation[pntGEM.GetStationId()]++;
1002 }
1003 vector<BmnMCPoint> pointsSil = mcTrack.GetPoints(kSILICON);
1004 for (BmnMCPoint pntSIL : pointsSil)
1005 nHitsOnStation[pntSIL.GetStationId()]++;
1006
1007 Int_t nHitsPerTrack = 0;
1008 // Bool_t isGood = kTRUE;
1009 for (Int_t iSt = 0; iSt < fNStations; iSt++) {
1010 if (nHitsOnStation[iSt] == 0)
1011 continue;
1012 if (nHitsOnStation[iSt] > 1)
1013 return -1;
1014 nHitsPerTrack++;
1015 }
1016 return nHitsPerTrack;
1017}
1018
1019Int_t BmnTrackingQa::CalcNumberOfMcPointInTrack(Int_t trId)
1020{
1021 Int_t nHitsOnStation[fNStations];
1022 for (Int_t i = 0; i < fNStations; ++i)
1023 nHitsOnStation[i] = 0;
1024
1025 for (Int_t i = 0; i < fSilPoints->GetEntriesFast(); ++i) {
1026 BmnSiliconPoint* pnt = (BmnSiliconPoint*)fSilPoints->At(i);
1027 if (pnt->GetTrackID() != trId)
1028 continue;
1029 nHitsOnStation[pnt->GetStation()]++;
1030 }
1031
1032 for (Int_t i = 0; i < fGemPoints->GetEntriesFast(); ++i) {
1033 CbmStsPoint* pnt = (CbmStsPoint*)fGemPoints->At(i);
1034 if (pnt->GetTrackID() != trId)
1035 continue;
1036 nHitsOnStation[pnt->GetStation() + fSilDetector->GetNStations()]++;
1037 }
1038
1039 Int_t nHitsPerTrack = 0;
1040 for (Int_t iSt = 0; iSt < fNStations; iSt++) {
1041 if (nHitsOnStation[iSt] == 0)
1042 continue;
1043 if (nHitsOnStation[iSt] > 1)
1044 return -1;
1045 nHitsPerTrack++;
1046 }
1047 return nHitsPerTrack;
1048}
int i
Definition P4_F32vec4.h:22
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition P4_F32vec4.h:30
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition P4_F32vec4.h:31
Global function to define the track acceptance. Used in QA.
Monte-Carlo point.
Create report for tracking QA.
FairTask for tracking performance calculation.
@ kSILICON
@ kGEM
@ kTOF
@ kSSD
@ kTOF1
@ kCSC
@ kDCH
Histogram manager.
void Add(const TString &name, TNamed *object)
Add new named object to manager.
TH2 * H2(const TString &name) const
Return pointer to TH2 histogram.
void WriteToFile()
Write all histograms to current opened file.
TH1 * H1(const TString &name) const
Return pointer to TH1 histogram.
Monte-Carlo point.
Definition BmnMCPoint.h:21
Monte-Carlo track.
Definition BmnMCTrack.h:27
const vector< BmnMCPoint > & GetPoints(DetectorId detId) const
Return vector of MC point for specified detector id.
Definition BmnMCTrack.h:76
Base class for simulation reports.
void Create(BmnHistManager *histManager, const string &outputDir)
Main function which creates report data.
void SetOnlyPrimes(const Bool_t prime)
Create report for tracking QA.
virtual ~BmnTrackingQa()
Destructor.
virtual void Finish()
Derived from FairTask.
virtual void Exec(Option_t *opt)
Derived from FairTask.
BmnTrackingQa()
Constructor.
virtual InitStatus Init()
Derived from FairTask.
Int_t Extrapolate(Double_t z, Double_t *QP0=0, Bool_t line=false)
Access to i-th hit.
void GetTrackParam(FairTrackParam &track)
Double_t GetPy() const
Definition CbmMCTrack.h:59
Long64_t GetNPoints(DetectorId detId) const
Double_t GetPz() const
Definition CbmMCTrack.h:60
Double_t GetPx() const
Definition CbmMCTrack.h:58
Double_t GetStartY() const
Definition CbmMCTrack.h:62
Double_t GetP() const
Definition CbmMCTrack.h:68
Double_t GetStartX() const
Definition CbmMCTrack.h:61
Int_t GetStation() const
Definition CbmStsPoint.h:81
FairTrackParam * GetParamLast()
Definition CbmStsTrack.h:70
Int_t GetNStsHits() const
Definition CbmStsTrack.h:60
Double_t GetChi2() const
Definition CbmStsTrack.h:66
Int_t GetNDF() const
Definition CbmStsTrack.h:67
Int_t GetMCTrackId() const
Double_t GetTrueOverAllHitsRatio() const
Double_t GetZ() const
Definition CbmVertex.h:60
Double_t GetX() const
Definition CbmVertex.h:58
Int_t GetNTracks() const
Definition CbmVertex.h:63
Double_t GetY() const
Definition CbmVertex.h:59
string FindAndReplace(const string &name, const string &oldSubstr, const string &newSubstr)
Definition BmnUtils.cxx:20
vector< string > Split(const string &name, char delimiter)
Definition BmnUtils.cxx:27
name
Definition setup.py:7
STL namespace.