CbmRoot
Loading...
Searching...
No Matches
CbmAnaConversion.cxx
Go to the documentation of this file.
1/* Copyright (C) 2014-2019 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sascha Reinecke, Florian Uhlig, Andrey Lebedev [committer] */
4
13
14#include "CbmAnaConversion.h"
15
16// includes of CBMROOT classes
17#include "CbmDrawHist.h"
18#include "CbmGlobalTrack.h"
19#include "CbmKFParticleFinder.h"
21#include "CbmL1PFFitter.h"
22#include "CbmMCTrack.h"
23#include "CbmRichHit.h"
24#include "CbmRichPoint.h"
25#include "CbmRichRing.h"
26#include "CbmStsTrack.h"
27#include "CbmTrackMatchNew.h"
28#include "CbmUtils.h"
29#include "FairMCPoint.h"
30#include "FairTrackParam.h"
31#include "KFParticle/KFParticleTopoReconstructor.h"
32
33#include <Logger.h>
34
35
36// includes of standard c++ classes or ROOT classes
37#include "TCanvas.h"
38#include "TClonesArray.h"
39#include "TH1.h"
40#include "TH1D.h"
41#include "TH2D.h"
42#include "TH3.h"
43#include "TRandom3.h"
44
45#include <boost/assign/list_of.hpp>
46
47#include <iomanip>
48#include <iostream>
49#include <string>
50
51
52// includes of further conversion classes
54#include "CbmAnaConversionKF.h"
63
64
65#define M2E 2.6112004954086e-7
66
67using namespace std;
68using boost::assign::list_of;
69
71 : FairTask("CbmAnaConversion")
72 , DoTomography(0)
74 , DoKFAnalysis(0)
76 , DoPhotons(0)
77 , DoPhotons2(0)
78 , DoRecoFull(0)
79 , DoTest(0)
80 , fhPdgCodes(NULL)
81 , fhNofElPrim(NULL)
82 , fhNofElSec(NULL)
83 , fhNofElAll(NULL)
84 , fhElectronSources(NULL)
85 , fhNofPi0_perEvent(NULL)
89 , fhNofEta_perEvent(NULL)
92 , fhPi0_z(NULL)
93 , fhPi0_z_cut(NULL)
94 , fhPi0_pt(NULL)
95 , fhPi0_pt_vs_rap(NULL)
96 , fhPi0_theta(NULL)
97 , fhPi0_theta_vs_rap(NULL)
98 , fhEta_pt(NULL)
99 , fhEta_pt_vs_rap(NULL)
100 , fhEta_theta(NULL)
101 , fhEta_theta_vs_rap(NULL)
102 , fhRho_pt(NULL)
103 , fhRho_pt_vs_rap(NULL)
104 , fhRho_theta(NULL)
105 , fhRho_theta_vs_rap(NULL)
106 , fhOmega_pt(NULL)
107 , fhOmega_pt_vs_rap(NULL)
108 , fhOmega_theta(NULL)
111 , fhNofTracks_mctrack(NULL)
120 , fhMomentum_MCvsReco(NULL)
122 , fhSearchGammas(NULL)
123 , fPrimVertex(NULL)
124 , fKFVertex()
125 , fRichPoints(NULL)
126 , fRichRings(NULL)
127 , fRichRingMatches(NULL)
128 , fMcTracks(NULL)
129 , fStsTracks(NULL)
130 , fStsTrackMatches(NULL)
131 , fGlobalTracks(NULL)
136 , fhANN_output_else(NULL)
137 , fhANN_output_else2(NULL)
140 , fEventNum(0)
141 , test(0)
142 , testint(0)
143 , fAnalyseMode(0)
144 , fKFparticle(NULL)
145 , fKFparticleFinderQA(NULL)
146 , fKFtopo(NULL)
148 , particlecounter(0)
157 , fhPi0Ratio(NULL)
158 , fhPi0_mass(NULL)
159 , fhPi0_NDaughters(NULL)
160 , fHistoList()
161 , fHistoList_MC()
168 , fMCTracklist()
189 , fRecoMomentum()
192 , fhPi0_MC_occurence(NULL)
193 , fhPi0_MC_occurence2(NULL)
196 , fhPi0_Reco_angles(NULL)
197 , fhPi0_Reco_chi(NULL)
198 , fhPi0_Reco_ndf(NULL)
207 , fhPi0_Reco_invmass(NULL)
229 , timer_all()
230 , fTime_all(0.)
231 , timer_exec()
232 , fTime_exec(0.)
233 , timer_mc()
234 , fTime_mc(0.)
235 , timer_rec()
236 , fTime_rec(0.)
237 , fAnaTomography(NULL)
238 , fAnaRich(NULL)
239 , fAnaKF(NULL)
240 , fAnaReco(NULL)
241 , fAnaPhotons(NULL)
242 , fAnaPhotons2(NULL)
243 , fAnaRecoFull(NULL)
244 , fAnaTest(NULL)
245 , fAnaTest2(NULL)
246{
247}
248
250
252{
253 //timer_all.Reset();
254 timer_all.Start();
255
256 cout << "CbmAnaConversion::Init" << endl;
257 FairRootManager* ioman = FairRootManager::Instance();
258 if (NULL == ioman) { Fatal("CbmAnaConversion::Init", "RootManager not instantised!"); }
259
260 fRichPoints = (TClonesArray*) ioman->GetObject("RichPoint");
261 if (NULL == fRichPoints) { Fatal("CbmAnaConversion::Init", "No RichPoint array!"); }
262
263 fMcTracks = (TClonesArray*) ioman->GetObject("MCTrack");
264 if (NULL == fMcTracks) { Fatal("CbmAnaConversion::Init", "No MCTrack array!"); }
265
266 fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
267 if (NULL == fStsTracks) { Fatal("CbmAnaConversion::Init", "No StsTrack array!"); }
268
269 fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
270 if (NULL == fStsTrackMatches) { Fatal("CbmAnaConversion::Init", "No StsTrackMatch array!"); }
271
272 fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
273 if (NULL == fGlobalTracks) { Fatal("CbmAnaConversion::Init", "No GlobalTrack array!"); }
274
275 // Get pointer to PrimaryVertex object from IOManager if it exists
276 // The old name for the object is "PrimaryVertex" the new one
277 // "PrimaryVertex." Check first for the new name
278 fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
279 if (nullptr == fPrimVertex) { fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex")); }
280 if (nullptr == fPrimVertex) { LOG(fatal) << "No PrimaryVertex array!"; }
281
282 fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
283 if (NULL == fRichRings) { Fatal("CbmAnaConversion::Init", "No RichRing array!"); }
284
285 fRichRingMatches = (TClonesArray*) ioman->GetObject("RichRingMatch");
286 if (NULL == fRichRingMatches) { Fatal("CbmAnaConversion::Init", "No RichRingMatch array!"); }
287
289
290 particlecounter = 0;
291
292 testint = 0;
293 test = 0;
294
297
298
299 DoTomography = 1;
300 DoRichAnalysis = 1;
301 DoKFAnalysis = 0;
303 DoPhotons = 1;
304 DoPhotons2 = 1;
305 DoRecoFull = 1;
306 DoTest = 1;
307
308 if (DoTomography) {
310 fAnaTomography->Init();
311 }
312 if (DoRichAnalysis) {
314 fAnaRich->Init();
315 }
316 if (DoKFAnalysis) {
319 fAnaKF->Init();
320 }
321 if (DoReconstruction) {
323 fAnaReco->Init();
324 }
325 if (DoPhotons) {
327 fAnaPhotons->Init();
328 }
329 if (DoPhotons2) {
331 fAnaPhotons2->Init();
332 }
333 if (DoRecoFull) {
335 fAnaRecoFull->Init();
336 }
337 if (DoTest) {
339 fAnaTest->Init();
341 fAnaTest2->Init();
342 }
343
344 timer_all.Stop();
345 fTime_all += timer_all.RealTime();
346
347 return kSUCCESS;
348}
349
351{
352 fHistoList.clear();
353 fHistoList_kfparticle.clear();
355
356
357 fhPdgCodes = new TH1D("fhPdfCodes", "fhPdgCodes;pdg code;#", 1000, 0, 1000);
358 fhNofElPrim = new TH1D("fhNofElPrim", "fhNofElPrim;Nof prim El;Entries", 10., -0.5, 9.5);
359 fhNofElSec = new TH1D("fhNofElSec", "fhNofElSec;Nof Sec El;Entries", 20., -0.5, 19.5);
360 fhNofElAll = new TH1D("fhNofElAll", "fhNofElAll;Nof All El;Entries", 30., -0.5, 29.5);
361 fhNofPi0_perEvent = new TH1D("fhNofPi0_perEvent", "fhNofPi0_perEvent;Nof pi0;Entries", 1000., -0.5, 999.5);
363 new TH1D("fhNofPi0_perEvent_cut", "fhNofPi0_perEvent_cut (Z<10cm);Nof pi0;Entries", 800., -0.5, 799.5);
365 new TH1D("fhNofPi0_perEvent_cut2", "fhNofPi0_perEvent_cut2 (motherId = -1);Nof pi0;Entries", 800., -0.5, 799.5);
366 fhNofPi0_perEvent_cut3 = new TH1D(
367 "fhNofPi0_perEvent_cut3", "fhNofPi0_perEvent_cut3 (conversion before 70cm);Nof pi0;Entries", 100., -0.5, 99.5);
368 fhNofEta_perEvent = new TH1D("fhNofEta_perEvent", "fhNofEta_perEvent;Nof eta;Entries", 100., -0.5, 99.5);
370 new TH1D("fhNofEta_perEvent_cut", "fhNofEta_perEvent_cut (Z<4cm);Nof eta;Entries", 100., -0.5, 99.5);
372 new TH1D("fhNofEta_perEvent_cut2", "fhNofEta_perEvent_cut2 (motherId = -1);Nof eta;Entries", 100., -0.5, 99.5);
373 fhPi0_z = new TH1D("fhPi0_z", "fhPi0_z;z in cm;Entries", 600., -0.5, 599.5);
374 fhPi0_z_cut = new TH1D("fhPi0_z_cut", "fhPi0_z_cut;z in cm;Entries", 600., -0.5, 599.5);
375 fhPi0_pt = new TH1D("fhPi0_pt", "fhPi0_pt;p_{t} in GeV/c;Entries", 200., 0., 10.);
377 new TH2D("fhPi0_pt_vs_rap", "fhPi0_pt_vs_rap;p_{t} in GeV/c; rapidity y", 240, -2., 10., 270, -2., 7.);
378 fhPi0_theta = new TH1D("fhPi0_theta", "fhPi0_theta;emission angle #theta in deg;Entries", 180., 0., 180.);
380 new TH2D("fhPi0_theta_vs_rap", "fhPi0_theta_vs_rap;theta in deg;rapidity y", 180., 0., 180., 270, -2., 7.);
381 fhEta_pt = new TH1D("fhEta_pt", "fhEta_pt;p_{t} in GeV;Entries", 200., 0., 10.);
383 new TH2D("fhEta_pt_vs_rap", "fhEta_pt_vs_rap;p_{t} in GeV; rapidity y", 240, -2., 10., 270, -2., 7.);
384 fhEta_theta = new TH1D("fhEta_theta", "fhEta_theta;emission angle #theta in deg;Entries", 180., 0., 180.);
385 fhEta_theta_vs_rap = new TH2D("fhEta_theta_vs_rap", "fhEta_theta_vs_rap;emission angle #theta in deg;rapidity y",
386 180., 0., 180., 270, -2., 7.);
387 fhRho_pt = new TH1D("fhRho_pt", "fhRho_pt;p_{t} in GeV/c;Entries", 200., 0., 10.);
389 new TH2D("fhRho_pt_vs_rap", "fhRho_pt_vs_rap;p_{t} in GeV/c; rapidity y", 240, -2., 10., 270, -2., 7.);
390 fhRho_theta = new TH1D("fhRho_theta", "fhRho_theta;emission angle #theta in deg;Entries", 180., 0., 180.);
391 fhRho_theta_vs_rap = new TH2D("fhRho_theta_vs_rap", "fhRho_theta_vs_rap;emission angle #theta in deg;rapidity y",
392 180., 0., 180., 270, -2., 7.);
393 fhOmega_pt = new TH1D("fhOmega_pt", "fhOmega_pt;p_{t} in GeV/c;Entries", 200., 0., 10.);
395 new TH2D("fhOmega_pt_vs_rap", "fhOmega_pt_vs_rap;p_{t} in GeV; rapidity y", 240, -2., 10., 270, -2., 7.);
396 fhOmega_theta = new TH1D("fhOmega_theta", "fhOmega_theta;emission angle #theta in deg;Entries", 180., 0., 180.);
398 new TH2D("fhOmega_theta_vs_rap", "fhOmega_theta_vs_rap;emission angle #theta in deg;rapidity y", 180., 0., 180.,
399 270, -2., 7.);
400
401
402 fhElectronSources = new TH1D("fhElectronSources", "fhElectronSources;Source;Entries", 6., 0., 6.);
403 fhElectronsFromPi0_z = new TH1D(
404 "fhElectronsFromPi0_z", "fhElectronsFromPi0_z (= pos. of gamma conversion);z [cm];Entries", 600., -0.5, 599.5);
405 fHistoList.push_back(fhPdgCodes);
406 fHistoList.push_back(fhNofPi0_perEvent);
410 fHistoList.push_back(fhNofEta_perEvent);
413 fHistoList.push_back(fhPi0_z);
414 fHistoList.push_back(fhPi0_z_cut);
415 fHistoList.push_back(fhPi0_pt);
416 fHistoList.push_back(fhPi0_pt_vs_rap);
417 fHistoList.push_back(fhPi0_theta);
419 fHistoList.push_back(fhEta_pt);
420 fHistoList.push_back(fhEta_pt_vs_rap);
421 fHistoList.push_back(fhEta_theta);
423 fHistoList.push_back(fhRho_pt);
424 fHistoList.push_back(fhRho_pt_vs_rap);
425 fHistoList.push_back(fhRho_theta);
427 fHistoList.push_back(fhOmega_pt);
428 fHistoList.push_back(fhOmega_pt_vs_rap);
429 fHistoList.push_back(fhOmega_theta);
431 fHistoList.push_back(fhElectronSources);
433
434 fhElectronSources->GetXaxis()->SetBinLabel(1, "gamma");
435 fhElectronSources->GetXaxis()->SetBinLabel(2, "pi0");
436 fhElectronSources->GetXaxis()->SetBinLabel(3, "eta");
437 fhElectronSources->GetXaxis()->SetBinLabel(4, "else");
438 fhElectronSources->GetXaxis()->SetBinLabel(5, "gamma from pi0");
439 fhElectronSources->GetXaxis()->SetBinLabel(6, "gamma from eta");
440
441
442 fhNofTracks_mctrack = new TH1D("fhNofTracks_mctrack", "fhNofTracks_mctrack;nof;#", 1000., 0., 1000.);
444 fhNofTracks_globaltrack = new TH1D("fhNofTracks_globaltrack", "fhNofTracks_globaltrack;nof;#", 1000., 0., 1000.);
446
447
448 // for UrQMD events (invariant mass from pi0 -> gamma + gamma
449 fhInvariantMass_test = new TH1D("fhInvariant", "fhInvariant;mass in GeV/c^{2}];#", 2000, 0., 2.);
450 fhInvariantMass_test2 = new TH1D("fhInvariant2", "fhInvariant2;mass in GeV/c^{2}];#", 2000, 0., 2.);
451 fhInvariantMass_test3 = new TH1D("fhInvariant3", "fhInvariant3;mass in GeV/c^{2}];#", 2000, 0., 2.);
455
456 fhInvariantMassReco_test = new TH1D("fhInvariantReco", "fhInvariantReco;mass [GeV/c^2];#", 2000, 0., 2.);
457 fhInvariantMassReco_test2 = new TH1D("fhInvariantReco2", "fhInvariantReco2;mass [GeV/c^2];#", 2000, 0., 2.);
458 fhInvariantMassReco_test3 = new TH1D("fhInvariantReco3", "fhInvariantReco3;mass [GeV/c^2];#", 2000, 0., 2.);
462
463 fhInvariantMassReco_pi0 = new TH1D("fhInvariantReco_pi0", "fhInvariantReco_pi0;mass [GeV/c^2];#", 2000, 0., 2.);
465
466
467 // for reconstructed tracks
468 fhMomentum_MCvsReco = new TH2D("fhMomentum_MCvsReco", "fhMomentum_MCvsReco;MC;Reco", 400, 0., 40., 400, 0., 40.);
470 new TH1D("fhMomentum_MCvsReco_diff", "fhMomentum_MCvsReco_diff;(MC-Reco)/MC", 500, -0.01, 4.);
473
474
475 fhSearchGammas = new TH1D("fhSearchGammas", "fhSearchGammas;mass;#", 100, -0.005, 0.995);
476 fHistoList.push_back(fhSearchGammas);
477
478
479 fhANN_output_electrons = new TH1D("fhANN_output_electrons", "fhANN_output_electrons;ann output", 400, -2, 2.);
480 fhANN_output_electrons2 = new TH1D("fhANN_output_electrons2", "fhANN_output_electrons2;ann output", 400, -2, 2.);
482 new TH1D("fhANN_output_electrons_chiCut", "fhANN_output_electrons_chiCut;ann output", 400, -2, 2.);
484 new TH2D("fhANN_output_electrons_vs_p", "fhANN_output_electrons_vs_p;momentum in GeV/c; ann output", 100, 0., 10.,
485 400, -2, 2.);
486 fhANN_output_else = new TH1D("fhANN_output_else", "fhANN_output_else;ann output", 400, -2, 2.);
487 fhANN_output_else2 = new TH1D("fhANN_output_else2", "fhANN_output_else2;ann output", 400, -2, 2.);
488 fhANN_output_else_chiCut = new TH1D("fhANN_output_else_chiCut", "fhANN_output_else_chiCut;ann output", 400, -2, 2.);
489 fhANN_output_else_vs_p = new TH2D("fhANN_output_else_vs_p", "fhANN_output_else_vs_p;momentum in GeV/c; ann output",
490 100, 0., 10., 400, -2, 2.);
495 fHistoList.push_back(fhANN_output_else);
499
500
501 // #############################################
502 // Histograms related to KFParticle results
503 fhPi0_NDaughters = new TH1D("fhPi0_NDaughters", "fhPi0_NDaughters;number of daughers;#", 4, 0.5, 4.5);
504 fhPi0Ratio = new TH1D("fhPi0Ratio", "fhPi0Ratio; ratio;#", 1000, 0., 0.02);
505 fhPi0_mass = new TH1D("fhPi0_mass", "fhPi0_mass;mass;#", 500, 0., 0.5);
509
510
512 new TH1D("fhNofElectrons_4epem", "fhNofElectrons_4epem;number of electrons per event;#", 101, -0.5, 100.5);
514
515 fhPi0_MC_occurence = new TH1D("fhPi0_MC_occurence", "fhPi0_MC_occurence;;#", 20, 0, 20);
517 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(1, "== -1: all pi0 from target");
518 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(2, "all pi0 -> gg");
519 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(3, "all g -> e+e-");
520 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(4, "both conv before 70cm");
521 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(5, "both conv in target");
522 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(6, "...");
523 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(7, "!= -1: all pi0 not from target");
524 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(8, "all pi0 -> gg");
525 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(9, "all g -> e+e-");
526 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(10, "both conv before 70cm");
527 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(11, "both conv in target");
528 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(12, "...");
529 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(13, "daughters == 0");
530 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(14, "daughters == 1");
531 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(15, "daughters == 2");
532 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(16, "daughters == 3");
533 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(17, "daughters == 4");
534 fhPi0_MC_occurence->GetXaxis()->SetBinLabel(18, "daughters > 4");
535
536 fhPi0_MC_occurence2 = new TH1D("fhPi0_MC_occurence2", "fhPi0_MC_occurence2;;#", 20, 0, 20);
538 fhPi0_MC_occurence2->GetXaxis()->SetBinLabel(1, "!= -1: all pi0 not from target");
539 fhPi0_MC_occurence2->GetXaxis()->SetBinLabel(2, "all pi0 -> gg");
540 fhPi0_MC_occurence2->GetXaxis()->SetBinLabel(3, "all g -> e+e-");
541 fhPi0_MC_occurence2->GetXaxis()->SetBinLabel(4, "both conv before 70cm");
542 fhPi0_MC_occurence2->GetXaxis()->SetBinLabel(5, "both conv in target");
543 fhPi0_MC_occurence2->GetXaxis()->SetBinLabel(6, "...");
544
545 fhPi0_Reco_occurence = new TH1D("fhPi0_Reco_occurence", "fhPi0_Reco_occurence;;#", 16, 0, 16);
547 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(1, "4 e from pi0 (not same)");
548 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(2, "test");
549 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(3, "x 1 e from same pi0");
550 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(4, "x 2 e from same pi0");
551 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(5, "x 3 e from same pi0");
552 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(6, "x 4 e from same pi0");
553 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(7, "x >4 e from same pi0");
554 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(8, "...");
555 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(9, "==4, within cuts");
556 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(10, "==4, chi-check");
557 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(11, "==4, chi+cuts");
558 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(12, "richInd: ==1");
559 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(13, "richInd: ==2");
560 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(14, "richInd: ==3");
561 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(15, "richInd: ==4");
562 fhPi0_Reco_occurence->GetXaxis()->SetBinLabel(16, "richInd: >4");
563
564 fhPi0_Reco_occurence2 = new TH1D("fhPi0_Reco_occurence2", "fhPi0_Reco_occurence2;;#", 16, 0, 16);
566 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(1, "4 e from pi0 (not same)");
567 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(2, "test");
568 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(3, "x 1 e from same pi0");
569 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(4, "x 2 e from same pi0");
570 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(5, "x 3 e from same pi0");
571 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(6, "x 4 e from same pi0");
572 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(7, "x >4 e from same pi0");
573 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(8, "...");
574 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(9, "==4, within cuts");
575 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(10, "==4, chi-check");
576 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(11, "==4, chi+cuts");
577 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(12, "...");
578 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(13, "...");
579 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(14, "...");
580 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(15, "...");
581 fhPi0_Reco_occurence2->GetXaxis()->SetBinLabel(16, "...");
582
583
584 fhPi0_Reco_angles = new TH1D("fhPi0_Reco_angles", "fhPi0_Reco_angles;angle;#", 500, 0, 50);
586 fhPi0_Reco_chi = new TH1D("fhPi0_Reco_chi", "fhPi0_Reco_chi;chi;#", 500, 0, 500);
588 fhPi0_Reco_ndf = new TH1D("fhPi0_Reco_ndf", "fhPi0_Reco_ndf;ndf;#", 500, 0, 50);
591 new TH2D("fhPi0_Reco_ndf_vs_chi", "fhPi0_Reco_ndf_vs_chi;ndf;chi", 51, -0.5, 50.5, 500, 0, 50);
594 "fhPi0_Reco_ndf_vs_startvertex", "fhPi0_Reco_ndf_vs_startvertex;ndf;startvertex", 51, -0.5, 50.5, 101, -0.5, 100.5);
597 "fhPi0_Reco_startvertex_vs_chi", "fhPi0_Reco_startvertex_vs_chi;startvertex;chi", 101, -0.5, 100.5, 100, 0, 100);
600 new TH2D("fhPi0_Reco_startvertex_vs_nofhits", "fhPi0_Reco_startvertex_vs_nofhits;startvertex;nofhits", 101, -0.5,
601 100.5, 21, -0.5, 20.5);
604 new TH1D("fhPi0_noRichInd_diffPhi", "fhPi0_noRichInd_diffPhi;phi difference;#", 150, 0, 150);
607 new TH1D("fhPi0_noRichInd_diffTheta", "fhPi0_noRichInd_diffTheta;theta difference;#", 150, 0, 150);
609
611 new TH2D("fhPi0_Reco_invmass_cases", "fhPi0_Reco_invmass_cases;cases;invmass [GeV]", 6, 0, 6, 300, 0, 3);
613 fhPi0_Reco_invmass_cases->GetXaxis()->SetBinLabel(1, "..");
614 fhPi0_Reco_invmass_cases->GetXaxis()->SetBinLabel(2, "no cuts");
615 fhPi0_Reco_invmass_cases->GetXaxis()->SetBinLabel(3, "only chi");
616 fhPi0_Reco_invmass_cases->GetXaxis()->SetBinLabel(4, "only cuts");
617 fhPi0_Reco_invmass_cases->GetXaxis()->SetBinLabel(5, "both");
618 fhPi0_Reco_invmass_cases->GetXaxis()->SetBinLabel(6, "mc-true");
620 new TH2D("fhPi0_Reco_noRichInd_invmass_cases", "fhPi0_Reco_noRichInd_invmass_cases;cases;invmass in GeV^{2}", 11, 0,
621 11, 300, 0, 3);
623 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(1, "..");
624 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(2, "no cuts");
625 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(3, "only chi");
626 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(4, "only cuts");
627 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(5, "both");
628 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(6, "mc-true");
629 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(7, "richInd-no cuts");
630 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(8, "richInd-chi");
631 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(9, "richInd-cuts");
632 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(10, "richInd-both");
633 fhPi0_Reco_noRichInd_invmass_cases->GetXaxis()->SetBinLabel(11, "richInd-mctrue");
634
635 fhPi0_Reco_invmass = new TH1D("fhPi0_Reco_invmass", "fhPi0_Reco_invmass;invmass [GeV];#", 300, 0, 3);
637 fhPi0_Reco_invmass_mc = new TH1D("fhPi0_Reco_invmass_mc", "fhPi0_Reco_invmass_mc;invmass_mc [GeV];#", 300, 0, 3);
640 new TH1D("fhPi0_Reco_noRichInd_invmass", "fhPi0_Reco_noRichInd_invmass;invmass_noRichInd [GeV];#", 300, 0, 3);
642 fhPi0_Reco_noRichInd_invmass_mc = new TH1D("fhPi0_Reco_noRichInd_invmass_mc",
643 "fhPi0_Reco_noRichInd_invmass_mc;invmass_noRichInd_mc [GeV];#", 300, 0, 3);
645
647 new TH2D("fhPi0_Reco_noRichInd_ndf_vs_nofhits", "fhPi0_Reco_noRichInd_ndf_vs_nofhits;ndf;nofhits", 31, -0.5, 30.5,
648 21, -0.5, 20.5);
651 new TH2D("fhPi0_Reco_ndf_vs_nofhits", "fhPi0_Reco_ndf_vs_nofhits;ndf;nofhits", 31, -0.5, 30.5, 21, -0.5, 20.5);
654 new TH2D("fhPi0_Reco_noRichInd_ndf_vs_nofhits_withChi", "fhPi0_Reco_noRichInd_ndf_vs_nofhits_withChi;ndf;nofhits",
655 31, -0.5, 30.5, 21, -0.5, 20.5);
658 new TH2D("fhPi0_Reco_ndf_vs_nofhits_withChi", "fhPi0_Reco_ndf_vs_nofhits_withChi;ndf;nofhits", 31, -0.5, 30.5, 21,
659 -0.5, 20.5);
661
662
663 // ################################################
664
665 fhPi0_Reco_noRichInd_chi_vs_momentum = new TH2D("fhPi0_Reco_noRichInd_chi_vs_momentum",
666 "fhPi0_Reco_noRichInd_chi_vs_momentum;momentum [GeV];#chi^{2} of "
667 "momentum fit",
668 200, 0., 10., 1000, 0., 100.);
670 fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0 = new TH2D("fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0",
671 "fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0;momentum "
672 "[GeV];#chi^{2} of momentum fit",
673 200, 0., 10., 1000, 0., 100.);
676 new TH2D("fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0_Target",
677 "fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0_Target;momentum "
678 "[GeV];#chi^{2} of momentum fit",
679 200, 0., 10., 1000, 0., 100.);
681 fhPi0_Reco_noRichInd_chi_vs_momentum_eRest = new TH2D("fhPi0_Reco_noRichInd_chi_vs_momentum_eRest",
682 "fhPi0_Reco_noRichInd_chi_vs_momentum_eRest;momentum "
683 "[GeV];#chi^{2} of momentum fit",
684 200, 0., 10., 1000, 0., 100.);
686
688 new TH2D("fhPi0_Reco_noRichInd_chi_vs_pt", "fhPi0_Reco_noRichInd_chi_vs_pt;pt [GeV];#chi^{2} of momentum fit", 200,
689 0., 10., 1000, 0., 100.);
692 new TH2D("fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0",
693 "fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0;pt [GeV];#chi^{2} of momentum fit", 200, 0., 10., 1000, 0., 100.);
696 new TH2D("fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0_Target",
697 "fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0_Target;pt [GeV];#chi^{2} "
698 "of momentum fit",
699 200, 0., 10., 1000, 0., 100.);
702 new TH2D("fhPi0_Reco_noRichInd_chi_vs_pt_eRest",
703 "fhPi0_Reco_noRichInd_chi_vs_pt_eRest;pt [GeV];#chi^{2} of momentum fit", 200, 0., 10., 1000, 0., 100.);
705
706
707 // ################################################
708
710 new TH2D("fhPi0_Reco_chi_vs_momentum", "fhPi0_Reco_chi_vs_momentum;momentum [GeV];#chi^{2} of momentum fit", 200,
711 0., 10., 1000, 0., 100.);
713 fhPi0_Reco_chi_vs_momentum_eFromPi0 = new TH2D("fhPi0_Reco_chi_vs_momentum_eFromPi0",
714 "fhPi0_Reco_chi_vs_momentum_eFromPi0;momentum [GeV];#chi^{2} of "
715 "momentum fit",
716 200, 0., 10., 1000, 0., 100.);
718 fhPi0_Reco_chi_vs_momentum_eFromPi0_Target = new TH2D("fhPi0_Reco_chi_vs_momentum_eFromPi0_Target",
719 "fhPi0_Reco_chi_vs_momentum_eFromPi0_Target;momentum "
720 "[GeV];#chi^{2} of momentum fit",
721 200, 0., 10., 1000, 0., 100.);
723
724 fhPi0_Reco_chi_vs_pt = new TH2D("fhPi0_Reco_chi_vs_pt", "fhPi0_Reco_chi_vs_pt;pt [GeV];#chi^{2} of momentum fit", 200,
725 0., 10., 1000, 0., 100.);
728 new TH2D("fhPi0_Reco_chi_vs_pt_eFromPi0", "fhPi0_Reco_chi_vs_pt_eFromPi0;pt [GeV];#chi^{2} of momentum fit", 200,
729 0., 10., 1000, 0., 100.);
732 new TH2D("fhPi0_Reco_chi_vs_pt_eFromPi0_Target",
733 "fhPi0_Reco_chi_vs_pt_eFromPi0_Target;pt [GeV];#chi^{2} of momentum fit", 200, 0., 10., 1000, 0., 100.);
735}
736
737
739{
740 timer_exec.Start();
741 timer_all.Start();
742
743
744 cout << "=======================================================================" << endl;
745 cout << "========== CbmAnaConversion, event No. " << fEventNum << endl;
746 cout << "=======================================================================" << endl;
747
748 fEventNum++;
749
752
753
754 // arrays of tracks
755 fMCTracklist.clear();
756 fMCTracklist_all.clear();
757 fRecoTracklist.clear();
758 fRecoTracklistEPEM.clear();
759 fRecoTracklistEPEM_id.clear();
762 fRecoMomentum.clear();
763 fRecoRefittedMomentum.clear();
764
765 fTestTracklist.clear();
767 fTestTracklist_chi.clear();
769 fTestTracklist_ndf.clear();
771
780
781 // several counters
782 int countPrimEl = 0;
783 int countSecEl = 0;
784 int countAllEl = 0;
785 // int countGammaEl = 0;
786 // int countMothers = 0;
787 int countPrimPart = 0;
788 int countPi0MC = 0;
789 int countPi0MC_cut = 0;
790 int countPi0MC_fromPrimary = 0;
791 int countPi0MC_reconstructible = 0;
792 int countEtaMC = 0;
793 int countEtaMC_cut = 0;
794 int countEtaMC_fromPrimary = 0;
795
796 if (fPrimVertex != NULL) { fKFVertex = CbmKFVertex(*fPrimVertex); }
797 else {
798 Fatal("CbmAnaConversion::Exec", "No PrimaryVertex array!");
799 }
800
801 if (DoKFAnalysis) {
802 // fAnaKF->SetSignalIds(fKFparticleFinderQA->GetSignalIds());
803 // fAnaKF->SetGhostIds(fKFparticleFinderQA->GetGhostIds());
804 fAnaKF->Exec();
805 }
806
807 if (DoRichAnalysis) { fAnaRich->AnalyseRICHdata(); }
808
809 if (DoPhotons) { fAnaPhotons->Exec(); }
810
811 if (DoPhotons2) { fAnaPhotons2->Exec(); }
812
813 if (DoRecoFull) { fAnaRecoFull->Exec(); }
814
815 if (DoTomography) {
816 fAnaTomography->Exec(); // analyse gamma-conversions with MC data
817 }
818
819 if (DoTest) {
820 fAnaTest->Exec();
821 fAnaTest2->Exec();
822 }
823
824 // ========================================================================================
825 // START - Analyse MC tracks
826 timer_mc.Start();
827
828 Int_t nofMcTracks = fMcTracks->GetEntriesFast();
829 fhNofTracks_mctrack->Fill(nofMcTracks);
830 for (int i = 0; i < nofMcTracks; i++) {
831 CbmMCTrack* mctrack = (CbmMCTrack*) fMcTracks->At(i);
832 if (mctrack == NULL) continue;
833
834 FillMCTracklists(mctrack, i); // fill tracklists for further analyses
835
836 fhPdgCodes->Fill(TMath::Abs(mctrack->GetPdgCode()));
837
838 if (mctrack->GetMotherId() == -1) { countPrimPart++; }
839 if (mctrack->GetMotherId() == -1 && TMath::Abs(mctrack->GetPdgCode()) == 11) { countPrimEl++; }
840 if (mctrack->GetMotherId() != -1 && TMath::Abs(mctrack->GetPdgCode()) == 11) { countSecEl++; }
841 if (TMath::Abs(mctrack->GetPdgCode()) == 11) { countAllEl++; }
842
843
844 if (mctrack->GetPdgCode() == 111) { // particle is pi0
845 countPi0MC++;
846 TVector3 v;
847 mctrack->GetStartVertex(v);
848 if (v.Z() <= 4) { countPi0MC_cut++; }
849 fhPi0_z->Fill(v.Z());
850 //Double_t r2 = v.Z()*v.Z() * tan(25./180*TMath::Pi()) * tan(25./180*TMath::Pi());
851 //if( (v.X()*v.X() + v.Y()*v.Y()) <= r2) {
852 // fhPi0_z_cut->Fill(v.Z());
853 //}
854
855
856 TVector3 momentum;
857 mctrack->GetMomentum(momentum);
858
859 int motherId = mctrack->GetMotherId();
860 if (motherId == -1) {
861 countPi0MC_fromPrimary++;
862 fhPi0_pt->Fill(mctrack->GetPt());
863 fhPi0_pt_vs_rap->Fill(mctrack->GetPt(), mctrack->GetRapidity());
864 fhPi0_theta->Fill(momentum.Theta() * 180. / TMath::Pi());
865 fhPi0_theta_vs_rap->Fill(momentum.Theta() * 180. / TMath::Pi(), mctrack->GetRapidity());
866 fhPi0_z_cut->Fill(v.Z());
867 }
868
869 Bool_t reconstructible = AnalysePi0_MC(mctrack, i);
870 if (reconstructible) countPi0MC_reconstructible++;
871 }
872
873
874 if (TMath::Abs(mctrack->GetPdgCode()) == 221) { // particle is eta
875 countEtaMC++;
876 TVector3 v, momentum;
877 mctrack->GetStartVertex(v);
878 mctrack->GetMomentum(momentum);
879
880 if (v.Z() <= 4) { countEtaMC_cut++; }
881 int motherId = mctrack->GetMotherId();
882 if (motherId == -1) {
883 countEtaMC_fromPrimary++;
884 fhEta_pt->Fill(mctrack->GetPt());
885 fhEta_pt_vs_rap->Fill(mctrack->GetPt(), mctrack->GetRapidity());
886 fhEta_theta->Fill(momentum.Theta() * 180. / TMath::Pi());
887 fhEta_theta_vs_rap->Fill(momentum.Theta() * 180. / TMath::Pi(), mctrack->GetRapidity());
888 }
889 }
890
891
892 if (TMath::Abs(mctrack->GetPdgCode()) == 113
893 || TMath::Abs(mctrack->GetPdgCode()) == 213) { // particle is rho(770)^0 or rho^+/-
894 TVector3 v, momentum;
895 mctrack->GetStartVertex(v);
896 mctrack->GetMomentum(momentum);
897
898 //if (v.Z() <= 1) {
899 fhRho_pt->Fill(mctrack->GetPt());
900 fhRho_pt_vs_rap->Fill(mctrack->GetPt(), mctrack->GetRapidity());
901 fhRho_theta->Fill(momentum.Theta() * 180. / TMath::Pi());
902 fhRho_theta_vs_rap->Fill(momentum.Theta() * 180. / TMath::Pi(), mctrack->GetRapidity());
903 //}
904 }
905
906
907 if (TMath::Abs(mctrack->GetPdgCode()) == 223
908 || TMath::Abs(mctrack->GetPdgCode()) == 3334) { // particle is omega(782)^0 or omega^+/-
909 TVector3 v, momentum;
910 mctrack->GetStartVertex(v);
911 mctrack->GetMomentum(momentum);
912
913 //if (v.Z() <= 1) {
914 fhOmega_pt->Fill(mctrack->GetPt());
915 fhOmega_pt_vs_rap->Fill(mctrack->GetPt(), mctrack->GetRapidity());
916 fhOmega_theta->Fill(momentum.Theta() * 180. / TMath::Pi());
917 fhOmega_theta_vs_rap->Fill(momentum.Theta() * 180. / TMath::Pi(), mctrack->GetRapidity());
918 //}
919 }
920
921 if (TMath::Abs(mctrack->GetPdgCode()) == 11) { // particle is electron
922 AnalyseElectrons(mctrack);
923 }
924 }
925
926
927 cout << "CbmAnaConversion::Exec - Number of pi0 in MC sample: " << countPi0MC << endl;
928 cout << "CbmAnaConversion::Exec - Number of pi0 from primary: " << countPi0MC_fromPrimary << endl;
929 fhNofPi0_perEvent->Fill(countPi0MC);
930 fhNofPi0_perEvent_cut->Fill(countPi0MC_cut);
931 fhNofPi0_perEvent_cut2->Fill(countPi0MC_fromPrimary);
932 fhNofPi0_perEvent_cut3->Fill(countPi0MC_reconstructible);
933 fhNofEta_perEvent->Fill(countEtaMC);
934 fhNofEta_perEvent_cut->Fill(countEtaMC_cut);
935 fhNofEta_perEvent_cut2->Fill(countEtaMC_fromPrimary);
936
937 fNofGeneratedPi0 = countPi0MC_fromPrimary;
941
943
944 if (DoReconstruction) {
945 fAnaReco->SetTracklistMC(fMCTracklist_all);
946 //fAnaReco->InvariantMassMC_all();
947 }
948
950
951
952 fhNofElPrim->Fill(countPrimEl);
953 fhNofElSec->Fill(countSecEl);
954 fhNofElAll->Fill(countAllEl);
955
956
957 // END - Analyse MC tracks
958 // ========================================================================================
959 timer_mc.Stop();
960 fTime_mc += timer_mc.RealTime();
961
962
963 // ========================================================================================
964 // START - Analyse reconstructed tracks
965 timer_rec.Start();
966
967 Int_t nofElectrons4epem = 0;
968
969 Int_t ngTracks = fGlobalTracks->GetEntriesFast();
970 fhNofTracks_globaltrack->Fill(ngTracks);
971 for (Int_t iGTrack = 0; iGTrack < ngTracks; iGTrack++) {
972 CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(iGTrack);
973 if (NULL == gTrack) continue;
974 int stsInd = gTrack->GetStsTrackIndex();
975 int richInd = gTrack->GetRichRingIndex();
976 // int trdInd = gTrack->GetTrdTrackIndex();
977 // int tofInd = gTrack->GetTofHitIndex();
978
979 if (stsInd < 0) continue;
980 CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(stsInd);
981 if (stsTrack == NULL) continue;
982 CbmTrackMatchNew* stsMatch = (CbmTrackMatchNew*) fStsTrackMatches->At(stsInd);
983 if (stsMatch == NULL) continue;
984 if (stsMatch->GetNofLinks() <= 0) continue;
985 int stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
986 if (stsMcTrackId < 0) continue;
987 CbmMCTrack* mcTrack1 = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
988 if (mcTrack1 == NULL) continue;
989
990
991 // calculate refitted momenta at primary vertex
992 TVector3 refittedMomentum;
993 CbmL1PFFitter fPFFitter;
994 vector<CbmStsTrack> stsTracks;
995 stsTracks.resize(1);
996 stsTracks[0] = *stsTrack;
997 vector<CbmL1PFFitter::PFFieldRegion> vField;
998 vector<float> chiPrim;
999 fPFFitter.GetChiToVertex(stsTracks, vField, chiPrim, fKFVertex, 3e6);
1000 //cand.chi2sts = stsTracks[0].GetChiSq() / stsTracks[0].GetNDF();
1001 //cand.chi2Prim = chiPrim[0];
1002 const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
1003 vtxTrack->Momentum(refittedMomentum);
1004 float result_chi = chiPrim[0];
1005
1006
1007 // Doing refit of momenta with electron assumption
1008 CbmL1PFFitter fPFFitter_electron;
1009 vector<CbmStsTrack> stsTracks_electron;
1010 stsTracks_electron.resize(1);
1011 stsTracks_electron[0] = *stsTrack;
1012 vector<CbmL1PFFitter::PFFieldRegion> vField_electron;
1013 vector<float> chiPrim_electron;
1014 vector<int> pidHypo_electron;
1015 pidHypo_electron.push_back(11);
1016 fPFFitter_electron.Fit(stsTracks_electron, pidHypo_electron);
1017 fPFFitter_electron.GetChiToVertex(stsTracks_electron, vField_electron, chiPrim_electron, fKFVertex, 3e6);
1018
1019 TVector3 refittedMomentum_electron;
1020 const FairTrackParam* vtxTrack_electron = stsTracks_electron[0].GetParamFirst();
1021 vtxTrack_electron->Momentum(refittedMomentum_electron);
1022 float result_chi_electron = chiPrim_electron[0];
1023 float result_ndf_electron = stsTracks_electron[0].GetNDF();
1024
1025
1026 Double_t startvertexZ = vtxTrack_electron->GetZ();
1027 fhPi0_Reco_ndf->Fill(result_ndf_electron);
1028 fhPi0_Reco_chi->Fill(result_chi_electron);
1029 fhPi0_Reco_ndf_vs_chi->Fill(result_ndf_electron, result_chi_electron);
1030 fhPi0_Reco_ndf_vs_startvertex->Fill(result_ndf_electron, startvertexZ);
1031 fhPi0_Reco_startvertex_vs_chi->Fill(startvertexZ, result_chi_electron);
1032
1033 Double_t nofhits_sts = stsTrack->GetTotalNofHits();
1034 fhPi0_Reco_startvertex_vs_nofhits->Fill(startvertexZ, nofhits_sts);
1035
1036 fhPi0_Reco_noRichInd_chi_vs_momentum->Fill(refittedMomentum_electron.Mag(), result_chi_electron);
1037 fhPi0_Reco_noRichInd_chi_vs_pt->Fill(refittedMomentum_electron.Perp(), result_chi_electron);
1038
1039 fTestTracklist_noRichInd.push_back(mcTrack1);
1040 fTestTracklist_noRichInd_MCindex.push_back(stsMcTrackId);
1041 fTestTracklist_noRichInd_momentum.push_back(refittedMomentum_electron);
1042 fTestTracklist_noRichInd_chi.push_back(result_chi_electron);
1043 fTestTracklist_noRichInd_richInd.push_back(richInd);
1044 fTestTracklist_noRichInd_gTrackId.push_back(iGTrack);
1045 fTestTracklist_noRichInd_ndf.push_back(result_ndf_electron);
1046 fTestTracklist_noRichInd_nofhits.push_back(nofhits_sts);
1047
1048
1049 if (richInd < 0) continue;
1050
1051 // ANN output for rings
1052 Int_t pdg = mcTrack1->GetPdgCode();
1053 CbmRichRing* ring = static_cast<CbmRichRing*>(fRichRings->At(richInd));
1054 if (NULL != ring) {
1055 Double_t ann = CbmRichElectronIdAnn::GetInstance().CalculateAnnValue(iGTrack, refittedMomentum_electron.Mag());
1056
1057 if (TMath::Abs(pdg) == 11) {
1058 fhANN_output_electrons->Fill(ann);
1059 if (result_chi_electron <= CbmAnaConversionCutSettings::CalcChiCut(refittedMomentum_electron.Perp())) {
1061 }
1062 }
1063 if (TMath::Abs(pdg) != 11) {
1064 fhANN_output_else->Fill(ann);
1065 if (result_chi_electron <= CbmAnaConversionCutSettings::CalcChiCut(refittedMomentum_electron.Perp())) {
1066 fhANN_output_else_chiCut->Fill(ann);
1067 }
1068 }
1069 }
1070
1071
1072 TVector3 stsMomentumVec; // momenta as measured by STS
1073 stsTrack->GetParamFirst()->Momentum(stsMomentumVec);
1074 Double_t stsMomentum = stsMomentumVec.Mag();
1075
1076 TVector3 mcMomentumVec; // momenta from true-MC data
1077 mcTrack1->GetMomentum(mcMomentumVec);
1078 Double_t mcMomentum = mcMomentumVec.Mag();
1079 fhMomentum_MCvsReco->Fill(mcMomentum, stsMomentum);
1080 fhMomentum_MCvsReco_diff->Fill(TMath::Abs(mcMomentum - stsMomentum) / mcMomentum);
1081
1082 TVector3 bothtogether; // combination of measured (STS) momenta and MC momenta
1083 bothtogether.SetX(mcMomentumVec.X());
1084 bothtogether.SetY(stsMomentumVec.Y());
1085 bothtogether.SetZ(stsMomentumVec.Z());
1086
1087
1088 // Fill tracklists containing momenta from mc-true, measured in sts, refitted at primary
1089 Bool_t isFilled =
1090 FillRecoTracklistEPEM(mcTrack1, stsMomentumVec, refittedMomentum, stsMcTrackId, result_chi, iGTrack);
1091 if (isFilled) nofElectrons4epem++;
1092
1093
1094 CbmTrackMatchNew* richMatch = (CbmTrackMatchNew*) fRichRingMatches->At(richInd);
1095 if (richMatch == NULL) continue;
1096 int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
1097 if (richMcTrackId < 0) continue;
1098 CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
1099 if (mcTrack2 == NULL) continue;
1100
1101 //if(stsMcTrackId != richMcTrackId) continue;
1102
1103
1104 if (stsMcTrackId == richMcTrackId) {
1105 //CbmRichRing* ring = static_cast<CbmRichRing*> (fRichRings->At(richInd));
1106 if (NULL != ring) {
1107 Double_t ann = CbmRichElectronIdAnn::GetInstance().CalculateAnnValue(iGTrack, refittedMomentum_electron.Mag());
1108 if (TMath::Abs(pdg) == 11) {
1109 fhANN_output_electrons2->Fill(ann);
1110 fhANN_output_electrons_vs_p->Fill(refittedMomentum_electron.Mag(), ann);
1111 }
1112 if (TMath::Abs(pdg) != 11) {
1113 fhANN_output_else2->Fill(ann);
1114 fhANN_output_else_vs_p->Fill(refittedMomentum_electron.Mag(), ann);
1115 }
1116 }
1117 }
1118
1119
1120 //int pdg = TMath::Abs(mcTrack1->GetPdgCode());
1121 //int motherId = mcTrack1->GetMotherId();
1122 //double momentum = mcTrack1->GetP();
1123 stsMatch->GetTrueOverAllHitsRatio();
1124
1125
1126 if (DoTomography) { fAnaTomography->TomographyReco(mcTrack1); }
1127 FillRecoTracklist(mcTrack1);
1128
1129
1130 fTestTracklist.push_back(mcTrack1);
1131 fTestTracklist_momentum.push_back(refittedMomentum_electron);
1132 fTestTracklist_chi.push_back(result_chi_electron);
1133 fTestTracklist_richInd.push_back(richInd);
1134 fTestTracklist_ndf.push_back(result_ndf_electron);
1135 fTestTracklist_nofhits.push_back(nofhits_sts);
1136
1137 fhPi0_Reco_chi_vs_pt->Fill(refittedMomentum_electron.Perp(), result_chi_electron);
1138 fhPi0_Reco_chi_vs_momentum->Fill(refittedMomentum_electron.Mag(), result_chi_electron);
1139 }
1140
1143
1144
1145 fhNofElectrons_4epem->Fill(nofElectrons4epem);
1146
1147
1148 // InvariantMassTestReco();
1149
1150 if (DoReconstruction) {
1153 fAnaReco->InvariantMassTest_4epem();
1154 fAnaReco->CalculateInvMassWithFullRecoCuts();
1155 }
1156
1157 // END - analyse reconstructed tracks
1158 // ========================================================================================
1159 timer_rec.Stop();
1160 fTime_rec += timer_rec.RealTime();
1161
1162
1163 // =========================================================================================================================
1164 // ============================================== END - EXEC function ======================================================
1165 // =========================================================================================================================
1166 timer_exec.Stop();
1167 fTime_exec += timer_exec.RealTime();
1168 timer_all.Stop();
1169 fTime_all += timer_all.RealTime();
1170}
1171
1172
1174{
1175 timer_all.Start();
1176
1177 cout << "\n\n############### CALLING FINISH ROUTINES... ############" << endl;
1178
1179
1180 // Write histograms to a file
1181 gDirectory->mkdir("analysis-conversion");
1182 gDirectory->cd("analysis-conversion");
1183
1184
1185 gDirectory->mkdir("KFParticle");
1186 gDirectory->cd("KFParticle");
1187 for (UInt_t i = 0; i < fHistoList_kfparticle.size(); i++) {
1188 fHistoList_kfparticle[i]->Write();
1189 }
1190 gDirectory->cd("..");
1191
1192
1193 if (DoTomography) { fAnaTomography->Finish(); }
1194 if (DoRichAnalysis) { fAnaRich->Finish(); }
1195 if (DoKFAnalysis) { fAnaKF->Finish(); }
1196 if (DoReconstruction) { fAnaReco->Finish(); }
1197 if (DoRecoFull) { fAnaRecoFull->Finish(); }
1198 if (DoPhotons) { fAnaPhotons->Finish(); }
1199 if (DoPhotons2) { fAnaPhotons2->Finish(); }
1200 if (DoTest) { fAnaTest->Finish(); }
1201 if (DoTest) { fAnaTest2->Finish(); }
1202
1203
1204 gDirectory->mkdir("further analyses");
1205 gDirectory->cd("further analyses");
1206 for (UInt_t i = 0; i < fHistoList_furtherAnalyses.size(); i++) {
1207 fHistoList_furtherAnalyses[i]->Write();
1208 }
1209 gDirectory->cd("..");
1210
1211 for (UInt_t i = 0; i < fHistoList.size(); i++) {
1212 fHistoList[i]->Write();
1213 }
1214 gDirectory->cd("..");
1215
1216
1217 timer_all.Stop();
1218 fTime_all += timer_all.RealTime();
1219
1220 cout << endl;
1221 cout << "############### FINISHED MAIN TASK ##############" << endl;
1222 cout << "Particlecounter: " << particlecounter << endl;
1223 cout << "Particlecounter (2 daughters): " << particlecounter_2daughters << endl;
1224 cout << "Particlecounter (3 daughters): " << particlecounter_3daughters << endl;
1225 cout << "Particlecounter (4 daughters): " << particlecounter_4daughters << endl;
1226 cout << "Particlecounter_all: " << particlecounter_all << endl;
1227 cout << "#####################################" << endl;
1228 cout << "Number of generated pi0 (all events): " << fNofGeneratedPi0_allEvents << endl;
1229 cout << "Number of reconstructed pi0 (all events): " << fNofPi0_kfparticle_allEvents
1230 << "\t - fraction: " << 1.0 * fNofPi0_kfparticle_allEvents / fNofGeneratedPi0_allEvents << endl;
1231 cout << "#####################################" << endl;
1232 cout << "############### OVERALL TIMERS ###############" << endl;
1233 cout << std::fixed;
1234 cout << std::setprecision(1);
1235 cout << "Complete time: " << fTime_all << endl;
1236 cout << "Exec time: " << fTime_exec << endl;
1237 cout << "MC time: " << fTime_mc << "\t RECO time: " << fTime_rec << endl;
1238 cout << "############### ############## ###############" << endl;
1239 cout << "Number of events in fhNofPi0_perEvent histogram: " << fhNofPi0_perEvent->GetEntries() << endl;
1240 cout << "############### ############## ###############" << endl;
1241 // =========================================================================================================================
1242 // ============================================== END - FINISH function ====================================================
1243 // =========================================================================================================================
1244}
1245
1246
1248{
1249 int motherId = mctrack->GetMotherId();
1250 if (motherId == -1) return;
1251 CbmMCTrack* mother = (CbmMCTrack*) fMcTracks->At(motherId);
1252 int mcMotherPdg = -1;
1253 if (NULL != mother) mcMotherPdg = mother->GetPdgCode();
1254 //cout << mcMotherPdg << endl;
1255
1256 if (mcMotherPdg == 22) {
1257 fhElectronSources->Fill(0);
1258 int grandmotherId = mother->GetMotherId();
1259 if (grandmotherId == -1) return;
1260 CbmMCTrack* grandmother = (CbmMCTrack*) fMcTracks->At(grandmotherId);
1261 int mcGrandmotherPdg = -1;
1262 if (NULL != grandmother) mcGrandmotherPdg = grandmother->GetPdgCode();
1263 if (mcGrandmotherPdg == 111) fhElectronSources->Fill(4);
1264 if (mcGrandmotherPdg == 221) fhElectronSources->Fill(5);
1265
1266 if (mcGrandmotherPdg == 111) {
1267 TVector3 v;
1268 mctrack->GetStartVertex(v);
1269 fhElectronsFromPi0_z->Fill(v.Z());
1270 }
1271 }
1272 if (mcMotherPdg == 111) fhElectronSources->Fill(1);
1273 if (mcMotherPdg == 221) fhElectronSources->Fill(2);
1274 if (mcMotherPdg != 22 && mcMotherPdg != 111 && mcMotherPdg != 221) fhElectronSources->Fill(3);
1275
1276 if (mcMotherPdg == 22) {
1277 TVector3 v;
1278 mctrack->GetStartVertex(v);
1279 // fhGammaZ->Fill(v.Z());
1280 // countGammaEl++;
1281 }
1282}
1283
1284
1286{
1287 LmvmKinePar params;
1288
1289 TVector3 momP; //momentum e+
1290 mctrackP->GetMomentum(momP);
1291 Double_t energyP = TMath::Sqrt(momP.Mag2() + M2E);
1292 TLorentzVector lorVecP(momP, energyP);
1293
1294 TVector3 momM; //momentum e-
1295 mctrackM->GetMomentum(momM);
1296 Double_t energyM = TMath::Sqrt(momM.Mag2() + M2E);
1297 TLorentzVector lorVecM(momM, energyM);
1298
1299 TVector3 momPair = momP + momM;
1300 Double_t energyPair = energyP + energyM;
1301 Double_t ptPair = momPair.Perp();
1302 Double_t pzPair = momPair.Pz();
1303 Double_t yPair = 0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
1304 Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
1305 Double_t theta = 180. * anglePair / TMath::Pi();
1306 Double_t minv = 2. * TMath::Sin(anglePair / 2.) * TMath::Sqrt(momM.Mag() * momP.Mag());
1307
1308 params.fMomentumMag = momPair.Mag();
1309 params.fPt = ptPair;
1310 params.fRapidity = yPair;
1311 params.fMinv = minv;
1312 params.fAngle = theta;
1313 return params;
1314}
1315
1316Double_t CbmAnaConversion::Invmass_2gammas(const CbmMCTrack* mctrack1, const CbmMCTrack* mctrack2)
1317// calculation of invariant mass from two gammas (m=0)
1318{
1319 TVector3 mom1;
1320 mctrack1->GetMomentum(mom1);
1321 Double_t energy1 = TMath::Sqrt(mom1.Mag2());
1322 TLorentzVector lorVec1(mom1, energy1);
1323
1324 TVector3 mom2;
1325 mctrack2->GetMomentum(mom2);
1326 Double_t energy2 = TMath::Sqrt(mom2.Mag2());
1327 TLorentzVector lorVec2(mom2, energy2);
1328
1329 TLorentzVector sum = lorVec1 + lorVec2;
1330 return sum.Mag();
1331}
1332
1333
1334Double_t CbmAnaConversion::Invmass_2particles(const CbmMCTrack* mctrack1, const CbmMCTrack* mctrack2)
1335// calculation of invariant mass from two electrons/positrons
1336{
1337 TVector3 mom1;
1338 mctrack1->GetMomentum(mom1);
1339 Double_t energy1 = TMath::Sqrt(mom1.Mag2() + M2E);
1340 TLorentzVector lorVec1(mom1, energy1);
1341
1342 TVector3 mom2;
1343 mctrack2->GetMomentum(mom2);
1344 Double_t energy2 = TMath::Sqrt(mom2.Mag2() + M2E);
1345 TLorentzVector lorVec2(mom2, energy2);
1346
1347 TLorentzVector sum = lorVec1 + lorVec2;
1348 return sum.Mag();
1349}
1350
1351
1352Double_t CbmAnaConversion::Invmass_4particles(const CbmMCTrack* mctrack1, const CbmMCTrack* mctrack2,
1353 const CbmMCTrack* mctrack3, const CbmMCTrack* mctrack4)
1354// calculation of invariant mass from four electrons/positrons
1355{
1356 /* TVector3 mom1;
1357 mctrack1->GetMomentum(mom1);
1358 TVector3 tempmom1;
1359 tempmom1.SetX(SmearValue(mom1.X()));
1360 tempmom1.SetY(SmearValue(mom1.Y()));
1361 tempmom1.SetZ(SmearValue(mom1.Z()));
1362 Double_t energy1 = TMath::Sqrt(tempmom1.Mag2() + M2E);
1363 TLorentzVector lorVec1(tempmom1, energy1);
1364
1365 TVector3 mom2;
1366 mctrack2->GetMomentum(mom2);
1367 TVector3 tempmom2;
1368 tempmom2.SetX(SmearValue(mom2.X()));
1369 tempmom2.SetY(SmearValue(mom2.Y()));
1370 tempmom2.SetZ(SmearValue(mom2.Z()));
1371 Double_t energy2 = TMath::Sqrt(tempmom2.Mag2() + M2E);
1372 TLorentzVector lorVec2(tempmom2, energy2);
1373
1374 TVector3 mom3;
1375 mctrack3->GetMomentum(mom3);
1376 TVector3 tempmom3;
1377 tempmom3.SetX(SmearValue(mom3.X()));
1378 tempmom3.SetY(SmearValue(mom3.Y()));
1379 tempmom3.SetZ(SmearValue(mom3.Z()));
1380 Double_t energy3 = TMath::Sqrt(tempmom3.Mag2() + M2E);
1381 TLorentzVector lorVec3(tempmom3, energy3);
1382
1383 TVector3 mom4;
1384 mctrack4->GetMomentum(mom4);
1385 TVector3 tempmom4;
1386 tempmom4.SetX(SmearValue(mom4.X()));
1387 tempmom4.SetY(SmearValue(mom4.Y()));
1388 tempmom4.SetZ(SmearValue(mom4.Z()));
1389 Double_t energy4 = TMath::Sqrt(tempmom4.Mag2() + M2E);
1390 TLorentzVector lorVec4(tempmom4, energy4);
1391*/
1392 TLorentzVector lorVec1;
1393 mctrack1->Get4Momentum(lorVec1);
1394
1395 TLorentzVector lorVec2;
1396 mctrack2->Get4Momentum(lorVec2);
1397
1398 TLorentzVector lorVec3;
1399 mctrack3->Get4Momentum(lorVec3);
1400
1401 TLorentzVector lorVec4;
1402 mctrack4->Get4Momentum(lorVec4);
1403
1404
1405 TLorentzVector sum;
1406 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
1407 cout << "mc: \t" << sum.Px() << " / " << sum.Py() << " / " << sum.Pz() << " / " << sum.E()
1408 << "\t => mag = " << sum.Mag() << endl;
1409 return sum.Mag();
1410}
1411
1412
1413Double_t CbmAnaConversion::Invmass_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3,
1414 const TVector3 part4)
1415// calculation of invariant mass from four electrons/positrons
1416{
1417 Double_t energy1 = TMath::Sqrt(part1.Mag2() + M2E);
1418 TLorentzVector lorVec1(part1, energy1);
1419
1420 Double_t energy2 = TMath::Sqrt(part2.Mag2() + M2E);
1421 TLorentzVector lorVec2(part2, energy2);
1422
1423 Double_t energy3 = TMath::Sqrt(part3.Mag2() + M2E);
1424 TLorentzVector lorVec3(part3, energy3);
1425
1426 Double_t energy4 = TMath::Sqrt(part4.Mag2() + M2E);
1427 TLorentzVector lorVec4(part4, energy4);
1428
1429 TLorentzVector sum;
1430 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
1431
1432 return sum.Mag();
1433}
1434
1435
1436// =========================================================================================================================
1437// ============================================== UP TO HERE: Invariant mass calculation ===================================
1438// =========================================================================================================================
1439
1440
1442// fill all relevant tracklists containing MC tracks
1443{
1444 Bool_t electrons = true;
1445 Bool_t gammas = true;
1446
1447 // fill gamma tracklist
1448 if (TMath::Abs(mctrack->GetPdgCode()) == 22 && gammas) {
1449 int motherId = mctrack->GetMotherId();
1450 if (motherId != -1) {
1451 CbmMCTrack* mother = (CbmMCTrack*) fMcTracks->At(motherId);
1452 int mcMotherPdg = -1;
1453 if (NULL != mother) mcMotherPdg = mother->GetPdgCode();
1454 if (mcMotherPdg == 111) { // pdg code 111 = pi0
1455 fMCTracklist.push_back(mctrack);
1456 }
1457 }
1458 }
1459
1460 // fill electron tracklists
1461 if (TMath::Abs(mctrack->GetPdgCode()) == 11 && electrons) {
1462 TVector3 v;
1463 mctrack->GetStartVertex(v);
1464 if (v.Z() <= 70) {
1465 int motherId = mctrack->GetMotherId();
1466 if (motherId >= 0) {
1467 CbmMCTrack* mother = (CbmMCTrack*) fMcTracks->At(motherId);
1468 int mcMotherPdg = -1;
1469 if (NULL != mother) mcMotherPdg = mother->GetPdgCode();
1470 if (mcMotherPdg == 22 || mcMotherPdg == 111 || mcMotherPdg == 221) {
1471 int grandmotherId = mother->GetMotherId();
1472 if (grandmotherId >= 0 || true) {
1473 // CbmMCTrack* grandmother = (CbmMCTrack*) fMcTracks->At(grandmotherId);
1474 // int mcGrandmotherPdg = -1;
1475 // if (NULL != grandmother) mcGrandmotherPdg = grandmother->GetPdgCode();
1476 // if(mcGrandmotherPdg == 111) {
1477 fMCTracklist_all.push_back(mctrack);
1478 // }
1479 }
1480 }
1481 }
1482 }
1483 }
1484}
1485
1486
1488{
1489 if (TMath::Abs(mctrack->GetPdgCode()) == 11) {
1490 int motherId = mctrack->GetMotherId();
1491 if (motherId != -1) {
1492 CbmMCTrack* mother = (CbmMCTrack*) fMcTracks->At(motherId);
1493 int mcMotherPdg = -1;
1494 if (NULL != mother) mcMotherPdg = mother->GetPdgCode();
1495 if (mcMotherPdg == 111 || mcMotherPdg == 22) { // pdg code 111 = pi0, 22 = gamma
1496 fRecoTracklist.push_back(mctrack);
1497 // cout << "pdg " << mctrack->GetPdgCode() << "\t motherid " << motherId << endl;
1498 test++;
1499 }
1500 }
1501 }
1502}
1503
1504
1505Bool_t CbmAnaConversion::FillRecoTracklistEPEM(CbmMCTrack* mctrack, TVector3 stsMomentum, TVector3 refittedMom, int i,
1506 Double_t chi, Int_t GlobalTrackId)
1507{
1508 Bool_t isFilled = false;
1509 if (TMath::Abs(mctrack->GetPdgCode()) == 11) {
1510 int motherId = mctrack->GetMotherId();
1511 if (motherId != -1) {
1512 fRecoTracklistEPEM.push_back(mctrack);
1513 fRecoTracklistEPEM_id.push_back(i);
1514 fRecoTracklistEPEM_chi.push_back(chi);
1515 fRecoTracklistEPEM_gtid.push_back(GlobalTrackId);
1516 fRecoMomentum.push_back(stsMomentum);
1517 fRecoRefittedMomentum.push_back(refittedMom);
1518 isFilled = true;
1519 }
1520 }
1521 return isFilled;
1522}
1523
1524
1526{
1527 for (unsigned int i = 0; i < fMCTracklist_all.size(); i++) {
1528 for (unsigned int j = i + 1; j < fMCTracklist_all.size(); j++) {
1529 // Double_t invmass = Invmass_2particles(fMCTracklist_all[i],fMCTracklist_all[j]);
1530
1531 int motherId_i = fMCTracklist_all[i]->GetMotherId();
1532 int motherId_j = fMCTracklist_all[j]->GetMotherId();
1533
1534 CbmMCTrack* mother_i = (CbmMCTrack*) fMcTracks->At(motherId_i);
1535 int mcMotherPdg_i = -1;
1536 if (NULL != mother_i) mcMotherPdg_i = mother_i->GetPdgCode();
1537
1538 // CbmMCTrack* mother_j = (CbmMCTrack*) fMcTracks->At(motherId_j);
1539 // int mcMotherPdg_j = -1;
1540 // if (NULL != mother_j) mcMotherPdg_j = mother_j->GetPdgCode();
1541
1542 if (motherId_i == motherId_j
1543 && ((fMCTracklist_all[i]->GetPdgCode() == 11 && fMCTracklist_all[j]->GetPdgCode() == -11)
1544 || (fMCTracklist_all[i]->GetPdgCode() == -11 && fMCTracklist_all[j]->GetPdgCode() == 11))) {
1545 // fhInvariantMass_MC_all->Fill(invmass);
1546 //cout << "e+e- decay detected! MotherId " << motherId_i << "\t invariant mass: " << invmass << endl;
1547
1548 if (mcMotherPdg_i == 111) {
1549 //fhInvariantMass_MC_pi0->Fill(invmass);
1550 cout << "-- mother particle of decay: pi0" << endl;
1551 }
1552 }
1553 }
1554 }
1555}
1556
1557
1559// calculation of invariant mass via pi0-> gamma gamma, ONLY FROM MC DATA!
1560{
1561 for (unsigned int i = 0; i < fMCTracklist.size(); i++) {
1562 for (unsigned int j = i + 1; j < fMCTracklist.size(); j++) {
1563
1564 //if(fMCTracklist[i]->GetPx() != fMCTracklist[j]->GetPx() && fMCTracklist[i]->GetPy() != fMCTracklist[j]->GetPy()) {
1565 Double_t invmass = Invmass_2gammas(fMCTracklist[i], fMCTracklist[j]);
1566 fhInvariantMass_test->Fill(invmass);
1567 TVector3 vi;
1568 fMCTracklist[i]->GetStartVertex(vi);
1569 TVector3 vj;
1570 fMCTracklist[j]->GetStartVertex(vj);
1571
1572 int motherId_i = fMCTracklist[i]->GetMotherId();
1573 int motherId_j = fMCTracklist[j]->GetMotherId();
1574
1575 if (motherId_i == motherId_j) {
1576 fhInvariantMass_test2->Fill(invmass);
1577
1578 if (invmass < 0.001) {
1579 // cout << "gamma1 " << fMCTracklist[i]->GetPx() << "\t" << fMCTracklist[i]->GetPy() << "\t" << fMCTracklist[i]->GetPz() << endl;
1580 // cout << "gamma2 " << fMCTracklist[j]->GetPx() << "\t" << fMCTracklist[j]->GetPy() << "\t" << fMCTracklist[j]->GetPz() << endl;
1581 }
1582 }
1583 if (vi.Z() == vj.Z() && vi.Y() == vj.Y() && vi.X() == vj.X()) { fhInvariantMass_test3->Fill(invmass); }
1584 //}
1585 }
1586 }
1587}
1588
1589
1591// calculation of invariant mass via pi0 -> .. -> e+ e- e+ e-, ONLY FROM RECONSTRUCTED TRACKS!
1592{
1593 // cout << "InvariantMassTestReco - Start..." << endl;
1594 // cout << "InvariantMassTestReco - Size of fRecoTracklist:\t " << fRecoTracklist.size() << endl;
1595 if (fRecoTracklist.size() >= 4) {
1596 for (unsigned int i = 0; i < fRecoTracklist.size(); i++) {
1597 for (unsigned int j = i + 1; j < fRecoTracklist.size(); j++) {
1598 for (unsigned int k = j + 1; k < fRecoTracklist.size(); k++) {
1599 for (unsigned int l = k + 1; l < fRecoTracklist.size(); l++) {
1600
1601 if (fRecoTracklist[i]->GetPdgCode() + fRecoTracklist[j]->GetPdgCode() + fRecoTracklist[k]->GetPdgCode()
1602 + fRecoTracklist[l]->GetPdgCode()
1603 != 0)
1604 continue;
1605
1606 int motherId1 = fRecoTracklist[i]->GetMotherId();
1607 int motherId2 = fRecoTracklist[j]->GetMotherId();
1608 int motherId3 = fRecoTracklist[k]->GetMotherId();
1609 int motherId4 = fRecoTracklist[l]->GetMotherId();
1610 int grandmotherId1 = -1;
1611 int grandmotherId2 = -1;
1612 int grandmotherId3 = -1;
1613 int grandmotherId4 = -1;
1614
1615 int mcMotherPdg1 = -1;
1616 int mcMotherPdg2 = -1;
1617 int mcMotherPdg3 = -1;
1618 /*
1619 int mcMotherPdg4 = -1;
1620 int mcGrandmotherPdg1 = -1;
1621 int mcGrandmotherPdg2 = -1;
1622 int mcGrandmotherPdg3 = -1;
1623 int mcGrandmotherPdg4 = -1;
1624*/
1625
1626 if (motherId1 != -1) {
1627 CbmMCTrack* mother1 = (CbmMCTrack*) fMcTracks->At(motherId1);
1628 if (NULL != mother1) mcMotherPdg1 = mother1->GetPdgCode();
1629 grandmotherId1 = mother1->GetMotherId();
1630 if (grandmotherId1 != -1) {
1631 // CbmMCTrack* grandmother1 = (CbmMCTrack*) fMcTracks->At(grandmotherId1);
1632 // if (NULL != grandmother1) mcGrandmotherPdg1 = grandmother1->GetPdgCode();
1633 }
1634 }
1635 if (motherId2 != -1) {
1636 CbmMCTrack* mother2 = (CbmMCTrack*) fMcTracks->At(motherId2);
1637 if (NULL != mother2) mcMotherPdg2 = mother2->GetPdgCode();
1638 grandmotherId2 = mother2->GetMotherId();
1639 if (grandmotherId2 != -1) {
1640 // CbmMCTrack* grandmother2 = (CbmMCTrack*) fMcTracks->At(grandmotherId2);
1641 // if (NULL != grandmother2) mcGrandmotherPdg2 = grandmother2->GetPdgCode();
1642 }
1643 }
1644 if (motherId3 != -1) {
1645 CbmMCTrack* mother3 = (CbmMCTrack*) fMcTracks->At(motherId3);
1646 if (NULL != mother3) mcMotherPdg3 = mother3->GetPdgCode();
1647 grandmotherId3 = mother3->GetMotherId();
1648 if (grandmotherId3 != -1) {
1649 // CbmMCTrack* grandmother3 = (CbmMCTrack*) fMcTracks->At(grandmotherId3);
1650 // if (NULL != grandmother3) mcGrandmotherPdg3 = grandmother3->GetPdgCode();
1651 }
1652 }
1653 if (motherId4 != -1) {
1654 CbmMCTrack* mother4 = (CbmMCTrack*) fMcTracks->At(motherId4);
1655 // if (NULL != mother4) mcMotherPdg4 = mother4->GetPdgCode();
1656 grandmotherId4 = mother4->GetMotherId();
1657 if (grandmotherId4 != -1) {
1658 // CbmMCTrack* grandmother4 = (CbmMCTrack*) fMcTracks->At(grandmotherId4);
1659 // if (NULL != grandmother4) mcGrandmotherPdg4 = grandmother4->GetPdgCode();
1660 }
1661 }
1662
1663
1664 if (motherId1 == motherId2 && motherId2 == motherId3 && motherId3 == motherId4) {
1665 Double_t invmass =
1667 fhInvariantMassReco_pi0->Fill(invmass);
1668 // cout << "Decay pi0 -> e+ e- e+ e- detected!" << endl;
1669 }
1670
1671 if (motherId1 == motherId2 && motherId1 == motherId3) {}
1672 if (motherId1 == motherId2 && motherId1 == motherId4) {}
1673 if (motherId1 == motherId3 && motherId1 == motherId4) {}
1674 if (motherId2 == motherId3 && motherId2 == motherId4) {}
1675
1676 // if( ((motherId1 == motherId2 && motherId3 == motherId4) && (mcMotherPdg1 == 22 || mcMotherPdg1 == 111) && (mcMotherPdg3 == 22 || mcMotherPdg3 == 111))
1677 // || ((motherId1 == motherId3 && motherId2 == motherId4) && (mcMotherPdg1 == 22 || mcMotherPdg1 == 111) && (mcMotherPdg2 == 22 || mcMotherPdg2 == 111))
1678 // || ((motherId1 == motherId4 && motherId2 == motherId3) && (mcMotherPdg1 == 22 || mcMotherPdg1 == 111) && (mcMotherPdg2 == 22 || mcMotherPdg2 == 111))) {
1679 if (((motherId1 == motherId2 && motherId3 == motherId4) && (mcMotherPdg1 == 22) && (mcMotherPdg3 == 22)
1680 && grandmotherId1 == grandmotherId3)
1681 || ((motherId1 == motherId3 && motherId2 == motherId4) && (mcMotherPdg1 == 22) && (mcMotherPdg2 == 22)
1682 && grandmotherId1 == grandmotherId2)
1683 || ((motherId1 == motherId4 && motherId2 == motherId3) && (mcMotherPdg1 == 22) && (mcMotherPdg2 == 22)
1684 && grandmotherId1 == grandmotherId2)) {
1685 Double_t invmass =
1687 fhInvariantMassReco_pi0->Fill(invmass);
1688 // cout << "Decay pi0 -> 2gamma -> e+ e-! \t MotherId " << motherId1 << "\t" << motherId2 << "\t" << motherId3 << "\t" << motherId4 <<
1689 // "\t GrandmotherId " << grandmotherId1 << "\t" << grandmotherId2 << "\t" << grandmotherId3 << "\t" << grandmotherId4 << endl;
1690 }
1691 }
1692 }
1693 }
1694 }
1695 }
1696 // cout << "InvariantMassTestReco - End!" << endl;
1697}
1698
1699
1701
1702
1704
1705
1707// mode 1 = tomography
1708// mode 2 = urqmd
1709// mode 3 = pluto
1710{
1711 fAnalyseMode = mode;
1712}
1713
1714
1716{
1717 if (fMCTracklist_all.size() >= 2) {
1718 for (unsigned int i = 0; i < fMCTracklist_all.size(); i++) {
1719 for (unsigned int j = i + 1; j < fMCTracklist_all.size(); j++) {
1720 if (fMCTracklist_all[i]->GetPdgCode() + fMCTracklist_all[j]->GetPdgCode() != 0) continue;
1721
1722 int motherId1 = fMCTracklist_all[i]->GetMotherId();
1723 int motherId2 = fMCTracklist_all[j]->GetMotherId();
1724
1725 if (motherId1 == motherId2) {
1726 Double_t invmass = Invmass_2particles(fMCTracklist_all[i], fMCTracklist_all[j]);
1727 fhSearchGammas->Fill(invmass);
1728 }
1729 }
1730 }
1731 }
1732}
1733
1734
1736{
1737
1738 fKFparticle = kfparticle;
1739 fKFparticleFinderQA = kfparticleQA;
1740 if (fKFparticle) { cout << "kf works" << endl; }
1741 else {
1742 cout << "kf works not" << endl;
1743 }
1744}
1745
1746
1748{
1749 Bool_t reconstructible = false;
1750 if (mctrack->GetMotherId() == -1) {
1751 fhPi0_MC_occurence->Fill(0);
1752
1753 Int_t daughters = 0;
1754 Int_t gammaDaughters = 0;
1755 Int_t electronDaughters = 0;
1756 Int_t electronDaughtersBeforeRICH = 0;
1757 Int_t electronDaughtersInTarget = 0;
1758 vector<int> gammaDaughterIDs;
1759 gammaDaughterIDs.clear();
1760 vector<int> electronDaughterIDs;
1761 electronDaughterIDs.clear();
1762
1763 Int_t nofMcTracks = fMcTracks->GetEntriesFast();
1764 for (int i = 0; i < nofMcTracks; i++) {
1765 CbmMCTrack* mctrack_switch = (CbmMCTrack*) fMcTracks->At(i);
1766 if (mctrack_switch == NULL) continue;
1767 Int_t motherID = mctrack_switch->GetMotherId();
1768 Int_t pdg = mctrack_switch->GetPdgCode();
1769 if (motherID == trackid && pdg == 22) {
1770 gammaDaughters++;
1771 gammaDaughterIDs.push_back(i);
1772 }
1773 if (motherID == trackid) { daughters++; }
1774 }
1775
1776
1777 if (daughters == 0) fhPi0_MC_occurence->Fill(12);
1778 if (daughters == 1) fhPi0_MC_occurence->Fill(13);
1779 if (daughters == 2) fhPi0_MC_occurence->Fill(14);
1780 if (daughters == 3) fhPi0_MC_occurence->Fill(15);
1781 if (daughters == 4) fhPi0_MC_occurence->Fill(16);
1782 if (daughters > 4) fhPi0_MC_occurence->Fill(17);
1783
1784
1785 if (gammaDaughters == 2) {
1786 fhPi0_MC_occurence->Fill(1);
1787
1788 for (int i = 0; i < nofMcTracks; i++) {
1789 CbmMCTrack* mctrack_switch = (CbmMCTrack*) fMcTracks->At(i);
1790 if (mctrack_switch == NULL) continue;
1791 Int_t motherID = mctrack_switch->GetMotherId();
1792 Int_t pdg = mctrack_switch->GetPdgCode();
1793 if (TMath::Abs(pdg) == 11 && (motherID == gammaDaughterIDs[0] || motherID == gammaDaughterIDs[1])) {
1794 electronDaughters++;
1795 electronDaughterIDs.push_back(i);
1796
1797 TVector3 startvertex;
1798 mctrack_switch->GetStartVertex(startvertex);
1799 if (startvertex.Z() <= 70) { electronDaughtersBeforeRICH++; }
1800 if (startvertex.Z() <= 4) { electronDaughtersInTarget++; }
1801 }
1802 }
1803
1804 if (electronDaughters == 4) { fhPi0_MC_occurence->Fill(2); }
1805 if (electronDaughtersBeforeRICH == 4) {
1806 fhPi0_MC_occurence->Fill(3);
1807 reconstructible = true;
1808 }
1809 if (electronDaughtersInTarget == 4) { fhPi0_MC_occurence->Fill(4); }
1810 }
1811 }
1812 else {
1813 fhPi0_MC_occurence2->Fill(0);
1814 Int_t daughters = 0;
1815 Int_t gammaDaughters = 0;
1816 Int_t electronDaughters = 0;
1817 Int_t electronDaughtersBeforeRICH = 0;
1818 Int_t electronDaughtersInTarget = 0;
1819 vector<int> gammaDaughterIDs;
1820 gammaDaughterIDs.clear();
1821 vector<int> electronDaughterIDs;
1822 electronDaughterIDs.clear();
1823
1824 Int_t nofMcTracks = fMcTracks->GetEntriesFast();
1825 for (int i = 0; i < nofMcTracks; i++) {
1826 CbmMCTrack* mctrack_switch = (CbmMCTrack*) fMcTracks->At(i);
1827 if (mctrack_switch == NULL) continue;
1828 Int_t motherID = mctrack_switch->GetMotherId();
1829 Int_t pdg = mctrack_switch->GetPdgCode();
1830 if (motherID == trackid && pdg == 22) {
1831 gammaDaughters++;
1832 gammaDaughterIDs.push_back(i);
1833 }
1834 if (motherID == trackid) { daughters++; }
1835 }
1836
1837 if (gammaDaughters == 2) {
1838 fhPi0_MC_occurence2->Fill(1);
1839 for (int i = 0; i < nofMcTracks; i++) {
1840 CbmMCTrack* mctrack_switch = (CbmMCTrack*) fMcTracks->At(i);
1841 if (mctrack_switch == NULL) continue;
1842 Int_t motherID = mctrack_switch->GetMotherId();
1843 Int_t pdg = mctrack_switch->GetPdgCode();
1844 if (TMath::Abs(pdg) == 11 && (motherID == gammaDaughterIDs[0] || motherID == gammaDaughterIDs[1])) {
1845 electronDaughters++;
1846 electronDaughterIDs.push_back(i);
1847
1848 TVector3 startvertex;
1849 mctrack_switch->GetStartVertex(startvertex);
1850 if (startvertex.Z() <= 70) { electronDaughtersBeforeRICH++; }
1851 if (startvertex.Z() <= 4) { electronDaughtersInTarget++; }
1852 }
1853 }
1854 if (electronDaughters == 4) { fhPi0_MC_occurence2->Fill(2); }
1855 if (electronDaughtersBeforeRICH == 4) { fhPi0_MC_occurence2->Fill(3); }
1856 if (electronDaughtersInTarget == 4) { fhPi0_MC_occurence2->Fill(4); }
1857 }
1858 }
1859
1860 return reconstructible;
1861}
1862
1863
1865{
1866 Int_t electrons = 0;
1867 std::multimap<int, int> electronPi0ID_map; // contains all IDs of pi0, from which an electron has been detected
1868 std::multimap<int, int> electronPi0ID_map_richInd;
1869
1870 Int_t nof = fTestTracklist.size();
1871 for (int i = 0; i < nof; i++) {
1872 Int_t motherID = fTestTracklist[i]->GetMotherId();
1873 Int_t pdg = fTestTracklist[i]->GetPdgCode();
1874
1875 if (TMath::Abs(pdg) == 11 && motherID != -1) {
1876 CbmMCTrack* mctrack_mother = (CbmMCTrack*) fMcTracks->At(motherID);
1877 if (mctrack_mother == NULL) continue;
1878 Int_t grandmotherID = mctrack_mother->GetMotherId();
1879 Int_t motherPdg = mctrack_mother->GetPdgCode();
1880
1881 if (motherPdg == 22 && grandmotherID != -1) {
1882 CbmMCTrack* mctrack_grandmother = (CbmMCTrack*) fMcTracks->At(grandmotherID);
1883 if (mctrack_grandmother == NULL) continue;
1884 Int_t grandmotherPdg = mctrack_grandmother->GetPdgCode();
1885
1886 if (grandmotherPdg == 111) {
1887 electrons++;
1888 electronPi0ID_map.insert(std::pair<int, int>(grandmotherID, i));
1889 if (!(fTestTracklist_richInd[i] < 0)) {
1890 electronPi0ID_map_richInd.insert(std::pair<int, int>(grandmotherID, i));
1891 }
1894
1895 TVector3 startvertex;
1896 fTestTracklist[i]->GetStartVertex(startvertex);
1897 if (startvertex.Z() < 1) {
1900 }
1901 }
1902 }
1903 }
1904 }
1905
1906 if (electrons >= 4) { // at least 4 electrons from pi0 (NOT from the same one) have been detected
1907 fhPi0_Reco_occurence->Fill(0);
1908 }
1909
1910
1911 int samePi0counter = 0;
1912 int check = 0;
1913 for (std::map<int, int>::iterator it = electronPi0ID_map.begin(); it != electronPi0ID_map.end(); ++it) {
1914 if (it == electronPi0ID_map.begin()) check = 1;
1915 if (it != electronPi0ID_map.begin()) {
1916 std::map<int, int>::iterator zwischen = it;
1917 zwischen--;
1918 int id = it->first;
1919 int id_old = zwischen->first;
1920 if (id == id_old) {
1921 check++;
1922 if (check > 3) {
1923 fhPi0_Reco_occurence->Fill(1);
1924 samePi0counter++;
1925 }
1926 }
1927 else {
1928 if (check == 1) fhPi0_Reco_occurence->Fill(2);
1929 if (check == 2) fhPi0_Reco_occurence->Fill(3);
1930 if (check == 3) fhPi0_Reco_occurence->Fill(4);
1931 if (check == 4) fhPi0_Reco_occurence->Fill(5);
1932 if (check > 4) fhPi0_Reco_occurence->Fill(6);
1933
1934 if (check == 4) {
1935 std::map<int, int>::iterator alt3 = zwischen;
1936 alt3--;
1937 std::map<int, int>::iterator alt4 = alt3;
1938 alt4--;
1939 std::map<int, int>::iterator alt5 = alt4;
1940 alt5--;
1941 cout << "CbmAnaConversion: AnalysePi0_Reco: " << alt5->first << "/" << zwischen->first << "/" << alt3->first
1942 << "/" << alt4->first << endl;
1943 cout << "CbmAnaConversion: AnalysePi0_Reco: " << alt5->second << "/" << zwischen->second << "/"
1944 << alt3->second << "/" << alt4->second << endl;
1945 Bool_t IsWithinCuts = AnalysePi0_Reco_calc(alt5->second, zwischen->second, alt3->second, alt4->second);
1946
1947 Double_t chi_e1 = fTestTracklist_chi[alt5->second];
1948 Double_t chi_e2 = fTestTracklist_chi[zwischen->second];
1949 Double_t chi_e3 = fTestTracklist_chi[alt3->second];
1950 Double_t chi_e4 = fTestTracklist_chi[alt4->second];
1951
1952
1953 Double_t invmass =
1955 fTestTracklist_momentum[alt3->second], fTestTracklist_momentum[alt4->second]);
1956 fhPi0_Reco_invmass->Fill(invmass);
1957 fhPi0_Reco_invmass_cases->Fill(1, invmass);
1958 Double_t invmass_mc = Invmass_4particles(fTestTracklist[alt5->second], fTestTracklist[zwischen->second],
1959 fTestTracklist[alt3->second], fTestTracklist[alt4->second]);
1960 fhPi0_Reco_invmass_mc->Fill(invmass_mc);
1961 fhPi0_Reco_invmass_cases->Fill(5, invmass_mc);
1962
1963
1964 std::map<int, int>::iterator temp = zwischen;
1965 for (int i = 0; i < 4; i++) {
1966 int ndf = fTestTracklist_ndf[temp->second];
1967 int nofhits = fTestTracklist_nofhits[temp->second];
1968 fhPi0_Reco_ndf_vs_nofhits->Fill(ndf, nofhits);
1969 temp--;
1970 }
1971
1972
1973 if (chi_e1 <= 3 && chi_e2 <= 3 && chi_e3 <= 3 && chi_e4 <= 3) {
1974 fhPi0_Reco_occurence->Fill(9);
1975 fhPi0_Reco_invmass_cases->Fill(2, invmass);
1976 if (IsWithinCuts) {
1977 fhPi0_Reco_occurence->Fill(10);
1978 fhPi0_Reco_invmass_cases->Fill(4, invmass);
1979 }
1980
1981 std::map<int, int>::iterator temp2 = zwischen;
1982 for (int i = 0; i < 4; i++) {
1983 int ndf = fTestTracklist_ndf[temp2->second];
1984 int nofhits = fTestTracklist_nofhits[temp2->second];
1985 fhPi0_Reco_ndf_vs_nofhits_withChi->Fill(ndf, nofhits);
1986 temp2--;
1987 }
1988 }
1989 if (IsWithinCuts) fhPi0_Reco_invmass_cases->Fill(3, invmass);
1990
1991 fhPi0_Reco_chi->Fill(chi_e1);
1992 fhPi0_Reco_chi->Fill(chi_e2);
1993 fhPi0_Reco_chi->Fill(chi_e3);
1994 fhPi0_Reco_chi->Fill(chi_e4);
1995 }
1996
1997 check = 1;
1998 }
1999 }
2000 }
2001
2002 if (samePi0counter >= 4) {
2003 //fhPi0_MC_occurence->Fill(13);
2004 }
2005
2006
2007 int samePi0counter2 = 0;
2008 int check2 = 0;
2009 cout << "CbmAnaConversion: RecoPi0: electronmapsize: " << electronPi0ID_map_richInd.size() << endl;
2010 for (std::map<int, int>::iterator it = electronPi0ID_map_richInd.begin(); it != electronPi0ID_map_richInd.end();
2011 ++it) {
2012 if (it == electronPi0ID_map_richInd.begin()) check = 1;
2013 if (it != electronPi0ID_map_richInd.begin()) {
2014 std::map<int, int>::iterator zwischen = it;
2015 zwischen--;
2016 int id = it->first;
2017 int id_old = zwischen->first;
2018 if (id == id_old) {
2019 check2++;
2020 if (check2 > 3) {
2021 //fhPi0_Reco_occurence->Fill(1);
2022 samePi0counter2++;
2023 }
2024 }
2025 else {
2026 if (check2 == 1) fhPi0_Reco_occurence->Fill(11);
2027 if (check2 == 2) fhPi0_Reco_occurence->Fill(12);
2028 if (check2 == 3) fhPi0_Reco_occurence->Fill(13);
2029 if (check2 == 4) fhPi0_Reco_occurence->Fill(14);
2030 if (check2 > 4) fhPi0_Reco_occurence->Fill(15);
2031 /*
2032 if(check == 4) {
2033 std::map<int,int>::iterator alt3 = zwischen;
2034 alt3--;
2035 std::map<int,int>::iterator alt4 = alt3;
2036 alt4--;
2037 std::map<int,int>::iterator alt5 = alt4;
2038 alt5--;
2039 cout << "CbmAnaConversion: AnalysePi0_Reco: " << alt5->first << "/" << zwischen->first << "/" << alt3->first << "/" << alt4->first << endl;
2040 cout << "CbmAnaConversion: AnalysePi0_Reco: " << alt5->second << "/" << zwischen->second << "/" << alt3->second << "/" << alt4->second << endl;
2041 AnalysePi0_Reco_calc(alt5->second, zwischen->second, alt3->second, alt4->second);
2042
2043 }
2044 */
2045 check2 = 1;
2046 }
2047 }
2048 }
2049}
2050
2051
2052Bool_t CbmAnaConversion::AnalysePi0_Reco_calc(int e1, int e2, int e3, int e4)
2053{
2054 CbmMCTrack* mctrack_e1 = fTestTracklist[e1];
2055 CbmMCTrack* mctrack_e2 = fTestTracklist[e2];
2056 CbmMCTrack* mctrack_e3 = fTestTracklist[e3];
2057 CbmMCTrack* mctrack_e4 = fTestTracklist[e4];
2058
2059 Int_t motherID_e1 = mctrack_e1->GetMotherId();
2060 Int_t motherID_e2 = mctrack_e2->GetMotherId();
2061 Int_t motherID_e3 = mctrack_e3->GetMotherId();
2062 Int_t motherID_e4 = mctrack_e4->GetMotherId();
2063
2064
2065 Double_t energy1 = TMath::Sqrt(fTestTracklist_momentum[e1].Mag2() + M2E);
2066 TLorentzVector lorVec1(fTestTracklist_momentum[e1], energy1);
2067
2068 Double_t energy2 = TMath::Sqrt(fTestTracklist_momentum[e2].Mag2() + M2E);
2069 TLorentzVector lorVec2(fTestTracklist_momentum[e2], energy2);
2070
2071 Double_t energy3 = TMath::Sqrt(fTestTracklist_momentum[e3].Mag2() + M2E);
2072 TLorentzVector lorVec3(fTestTracklist_momentum[e3], energy3);
2073
2074 Double_t energy4 = TMath::Sqrt(fTestTracklist_momentum[e4].Mag2() + M2E);
2075 TLorentzVector lorVec4(fTestTracklist_momentum[e4], energy4);
2076
2077
2078 Bool_t IsWithinCuts = false;
2079 Double_t OpeningAngleCut = 1.5;
2080
2081 if (motherID_e1 == motherID_e2 && motherID_e3 == motherID_e4) {
2082 Double_t anglePair1 = lorVec1.Angle(lorVec2.Vect());
2083 Double_t theta1 = 180. * anglePair1 / TMath::Pi();
2084
2085 Double_t anglePair2 = lorVec3.Angle(lorVec4.Vect());
2086 Double_t theta2 = 180. * anglePair2 / TMath::Pi();
2087
2088 if (theta1 <= OpeningAngleCut && theta2 <= OpeningAngleCut) IsWithinCuts = true;
2089 fhPi0_Reco_angles->Fill(theta1);
2090 fhPi0_Reco_angles->Fill(theta2);
2091 cout << "CbmAnaConversion: AnalysePi0_Reco_calc: " << theta1 << "/" << theta2 << endl;
2092 }
2093
2094 if (motherID_e1 == motherID_e3 && motherID_e2 == motherID_e4) {
2095 Double_t anglePair1 = lorVec1.Angle(lorVec3.Vect());
2096 Double_t theta1 = 180. * anglePair1 / TMath::Pi();
2097
2098 Double_t anglePair2 = lorVec2.Angle(lorVec4.Vect());
2099 Double_t theta2 = 180. * anglePair2 / TMath::Pi();
2100
2101 if (theta1 <= OpeningAngleCut && theta2 <= OpeningAngleCut) IsWithinCuts = true;
2102 fhPi0_Reco_angles->Fill(theta1);
2103 fhPi0_Reco_angles->Fill(theta2);
2104 cout << "CbmAnaConversion: AnalysePi0_Reco_calc: " << theta1 << "/" << theta2 << endl;
2105 }
2106
2107 if (motherID_e1 == motherID_e4 && motherID_e2 == motherID_e3) {
2108 Double_t anglePair1 = lorVec1.Angle(lorVec4.Vect());
2109 Double_t theta1 = 180. * anglePair1 / TMath::Pi();
2110
2111 Double_t anglePair2 = lorVec2.Angle(lorVec3.Vect());
2112 Double_t theta2 = 180. * anglePair2 / TMath::Pi();
2113
2114 if (theta1 <= OpeningAngleCut && theta2 <= OpeningAngleCut) IsWithinCuts = true;
2115 fhPi0_Reco_angles->Fill(theta1);
2116 fhPi0_Reco_angles->Fill(theta2);
2117 cout << "CbmAnaConversion: AnalysePi0_Reco_calc: " << theta1 << "/" << theta2 << endl;
2118 }
2119
2120 if (IsWithinCuts == true) { fhPi0_Reco_occurence->Fill(8); }
2121
2122 return IsWithinCuts;
2123}
2124
2125
2127{
2128 Int_t electrons = 0;
2129 std::multimap<int, int> electronPi0ID_map; // contains all IDs of pi0, from which an electron has been detected
2130 std::multimap<int, int>
2131 electronPi0ID_map_richInd; // contains all IDs of pi0, from which an electron has been detected
2132
2133 Int_t nof = fTestTracklist_noRichInd.size();
2134 for (int i = 0; i < nof; i++) {
2135 Int_t motherID = fTestTracklist_noRichInd[i]->GetMotherId();
2136 Int_t pdg = fTestTracklist_noRichInd[i]->GetPdgCode();
2137
2138 if (TMath::Abs(pdg) == 11 && motherID != -1) {
2139 CbmMCTrack* mctrack_mother = (CbmMCTrack*) fMcTracks->At(motherID);
2140 if (mctrack_mother == NULL) continue;
2141 Int_t grandmotherID = mctrack_mother->GetMotherId();
2142 Int_t motherPdg = mctrack_mother->GetPdgCode();
2143
2144 if (motherPdg == 22 && grandmotherID != -1) {
2145 CbmMCTrack* mctrack_grandmother = (CbmMCTrack*) fMcTracks->At(grandmotherID);
2146 if (mctrack_grandmother == NULL) continue;
2147 Int_t grandmotherPdg = mctrack_grandmother->GetPdgCode();
2148
2149 if (grandmotherPdg == 111) {
2150 electrons++;
2151 electronPi0ID_map.insert(std::pair<int, int>(grandmotherID, i));
2152 if (!(fTestTracklist_noRichInd_richInd[i] < 0)) {
2153 electronPi0ID_map_richInd.insert(std::pair<int, int>(grandmotherID, i));
2154 }
2159
2160 TVector3 startvertex;
2161 fTestTracklist_noRichInd[i]->GetStartVertex(startvertex);
2162 if (startvertex.Z() < 1) {
2167 }
2168 }
2169 else {
2174 }
2175 }
2176 else {
2181 }
2182 }
2183 else {
2184 if (TMath::Abs(pdg) != 11) continue;
2189 }
2190 }
2191
2192 if (electrons >= 4) { // at least 4 electrons from pi0 (NOT from the same one) have been detected
2193 fhPi0_Reco_occurence2->Fill(0);
2194 }
2195
2196
2197 int samePi0counter = 0;
2198 int check = 0;
2199 int check_withRichInd = 0;
2200 for (std::map<int, int>::iterator it = electronPi0ID_map.begin(); it != electronPi0ID_map.end(); ++it) {
2201 if (it == electronPi0ID_map.begin()) check = 1;
2202 if (it != electronPi0ID_map.begin()) {
2203 std::map<int, int>::iterator zwischen = it;
2204 zwischen--;
2205 int id = it->first;
2206 int id_old = zwischen->first;
2207 if (id == id_old) {
2208 check++;
2209 if (check > 3) {
2210 //fhPi0_Reco_occurence->Fill(1);
2211 samePi0counter++;
2212 }
2213 if (fTestTracklist_noRichInd_richInd[it->second] >= 0) { check_withRichInd++; }
2214 }
2215 else {
2216 if (check == 1) fhPi0_Reco_occurence2->Fill(2);
2217 if (check == 2) fhPi0_Reco_occurence2->Fill(3);
2218 if (check == 3) fhPi0_Reco_occurence2->Fill(4);
2219 if (check == 4) fhPi0_Reco_occurence2->Fill(5);
2220 if (check > 4) fhPi0_Reco_occurence2->Fill(6);
2221
2222 if (check == 4) {
2223 std::map<int, int>::iterator alt3 = zwischen;
2224 alt3--;
2225 std::map<int, int>::iterator alt4 = alt3;
2226 alt4--;
2227 std::map<int, int>::iterator alt5 = alt4;
2228 alt5--;
2229 cout << "CbmAnaConversion: AnalysePi0_Reco_noRichInd: " << alt5->first << "/" << zwischen->first << "/"
2230 << alt3->first << "/" << alt4->first << endl;
2231 cout << "CbmAnaConversion: AnalysePi0_Reco_noRichInd: " << alt5->second << "/" << zwischen->second << "/"
2232 << alt3->second << "/" << alt4->second << endl;
2233 Bool_t IsWithinCuts =
2234 AnalysePi0_Reco_noRichInd_calc(alt5->second, zwischen->second, alt3->second, alt4->second);
2235
2236 Double_t chi_e1 = fTestTracklist_noRichInd_chi[alt5->second];
2237 Double_t chi_e2 = fTestTracklist_noRichInd_chi[zwischen->second];
2238 Double_t chi_e3 = fTestTracklist_noRichInd_chi[alt3->second];
2239 Double_t chi_e4 = fTestTracklist_noRichInd_chi[alt4->second];
2240
2241 Int_t richInd_e1 = fTestTracklist_noRichInd_richInd[alt5->second];
2242 Int_t richInd_e2 = fTestTracklist_noRichInd_richInd[zwischen->second];
2243 Int_t richInd_e3 = fTestTracklist_noRichInd_richInd[alt3->second];
2244 Int_t richInd_e4 = fTestTracklist_noRichInd_richInd[alt4->second];
2245
2246
2247 Double_t invmass = Invmass_4particlesRECO(
2250 fhPi0_Reco_noRichInd_invmass->Fill(invmass);
2251 fhPi0_Reco_noRichInd_invmass_cases->Fill(1, invmass);
2252 Double_t invmass_mc =
2254 fTestTracklist_noRichInd[alt3->second], fTestTracklist_noRichInd[alt4->second]);
2255 fhPi0_Reco_noRichInd_invmass_mc->Fill(invmass_mc);
2256 fhPi0_Reco_noRichInd_invmass_cases->Fill(5, invmass_mc);
2257
2258
2259 std::map<int, int>::iterator temp = zwischen;
2260 for (int i = 0; i < 4; i++) {
2261 int ndf = fTestTracklist_noRichInd_ndf[temp->second];
2262 int nofhits = fTestTracklist_noRichInd_nofhits[temp->second];
2263 fhPi0_Reco_noRichInd_ndf_vs_nofhits->Fill(ndf, nofhits);
2264 temp--;
2265 }
2266
2267 if (chi_e1 <= 3 && chi_e2 <= 3 && chi_e3 <= 3 && chi_e4 <= 3) {
2268 fhPi0_Reco_occurence2->Fill(9);
2269 fhPi0_Reco_noRichInd_invmass_cases->Fill(2, invmass);
2270 if (IsWithinCuts) {
2271 fhPi0_Reco_occurence2->Fill(10);
2272 fhPi0_Reco_noRichInd_invmass_cases->Fill(4, invmass);
2273 }
2274
2275 std::map<int, int>::iterator temp2 = zwischen;
2276 for (int i = 0; i < 4; i++) {
2277 int ndf = fTestTracklist_noRichInd_ndf[temp2->second];
2278 int nofhits = fTestTracklist_noRichInd_nofhits[temp2->second];
2280 temp2--;
2281 }
2282 }
2283
2284 if (IsWithinCuts) { fhPi0_Reco_noRichInd_invmass_cases->Fill(3, invmass); }
2285
2286 if (richInd_e1 >= 0 && richInd_e2 >= 0 && richInd_e3 >= 0 && richInd_e4 >= 0) {
2287 fhPi0_Reco_noRichInd_invmass_cases->Fill(6, invmass);
2288 fhPi0_Reco_noRichInd_invmass_cases->Fill(10, invmass_mc);
2289 if (IsWithinCuts) { fhPi0_Reco_noRichInd_invmass_cases->Fill(8, invmass); }
2290 if (chi_e1 <= 3 && chi_e2 <= 3 && chi_e3 <= 3 && chi_e4 <= 3) {
2291 fhPi0_Reco_noRichInd_invmass_cases->Fill(7, invmass);
2292 if (IsWithinCuts) { fhPi0_Reco_noRichInd_invmass_cases->Fill(9, invmass); }
2293 }
2294 }
2295 }
2296
2297 if (check > 4) {
2298 std::map<int, int>::iterator temp = zwischen;
2299 cout << "CbmAnaConversion: AnalysePi0_Reco_noRichInd, check>4: ";
2300 for (int i = 0; i < check; i++) {
2301 TVector3 momentum_mc;
2302 fTestTracklist_noRichInd[temp->second]->GetMomentum(momentum_mc);
2303 Double_t theta_mc = 180.0 * momentum_mc.Theta() / TMath::Pi();
2304 Double_t phi_mc = 180.0 * momentum_mc.Phi() / TMath::Pi();
2305 TVector3 momentum_reco = fTestTracklist_noRichInd_momentum[temp->second];
2306 Double_t theta_reco = 180.0 * momentum_reco.Theta() / TMath::Pi();
2307 Double_t phi_reco = 180.0 * momentum_reco.Phi() / TMath::Pi();
2308 cout << "(" << temp->first << "/" << temp->second << "/" << fTestTracklist_noRichInd_MCindex[temp->second]
2309 << "/" << momentum_reco.Mag() << "/" << theta_mc << "-" << phi_mc << "/" << theta_reco << "-"
2310 << phi_reco << ") \t";
2311 temp--;
2312 fhPi0_noRichInd_diffPhi->Fill(TMath::Abs(phi_mc - phi_reco));
2313 fhPi0_noRichInd_diffTheta->Fill(TMath::Abs(theta_mc - theta_reco));
2314 }
2315 cout << endl;
2316 }
2317
2318
2319 if (check_withRichInd == 1) fhPi0_Reco_occurence2->Fill(11);
2320 if (check_withRichInd == 2) fhPi0_Reco_occurence2->Fill(12);
2321 if (check_withRichInd == 3) fhPi0_Reco_occurence2->Fill(13);
2322 if (check_withRichInd == 4) fhPi0_Reco_occurence2->Fill(14);
2323 if (check_withRichInd > 4) fhPi0_Reco_occurence2->Fill(15);
2324
2325
2326 // reset of check-parameters for next loop
2327 check = 1;
2328 if (fTestTracklist_noRichInd_richInd[it->second] >= 0) { check_withRichInd = 1; }
2329 else {
2330 check_withRichInd = 0;
2331 }
2332 }
2333 }
2334 }
2335
2336 if (samePi0counter >= 4) {
2337 //fhPi0_MC_occurence->Fill(13);
2338 }
2339}
2340
2341
2343{
2344 CbmMCTrack* mctrack_e1 = fTestTracklist_noRichInd[e1];
2345 CbmMCTrack* mctrack_e2 = fTestTracklist_noRichInd[e2];
2346 CbmMCTrack* mctrack_e3 = fTestTracklist_noRichInd[e3];
2347 CbmMCTrack* mctrack_e4 = fTestTracklist_noRichInd[e4];
2348
2349 Int_t motherID_e1 = mctrack_e1->GetMotherId();
2350 Int_t motherID_e2 = mctrack_e2->GetMotherId();
2351 Int_t motherID_e3 = mctrack_e3->GetMotherId();
2352 Int_t motherID_e4 = mctrack_e4->GetMotherId();
2353
2354
2355 Double_t energy1 = TMath::Sqrt(fTestTracklist_noRichInd_momentum[e1].Mag2() + M2E);
2356 TLorentzVector lorVec1(fTestTracklist_noRichInd_momentum[e1], energy1);
2357
2358 Double_t energy2 = TMath::Sqrt(fTestTracklist_noRichInd_momentum[e2].Mag2() + M2E);
2359 TLorentzVector lorVec2(fTestTracklist_noRichInd_momentum[e2], energy2);
2360
2361 Double_t energy3 = TMath::Sqrt(fTestTracklist_noRichInd_momentum[e3].Mag2() + M2E);
2362 TLorentzVector lorVec3(fTestTracklist_noRichInd_momentum[e3], energy3);
2363
2364 Double_t energy4 = TMath::Sqrt(fTestTracklist_noRichInd_momentum[e4].Mag2() + M2E);
2365 TLorentzVector lorVec4(fTestTracklist_noRichInd_momentum[e4], energy4);
2366
2367
2368 Bool_t IsWithinCuts = false;
2369 Double_t OpeningAngleCut = 1.5;
2370
2371 if (motherID_e1 == motherID_e2 && motherID_e3 == motherID_e4) {
2372 Double_t anglePair1 = lorVec1.Angle(lorVec2.Vect());
2373 Double_t theta1 = 180. * anglePair1 / TMath::Pi();
2374
2375 Double_t anglePair2 = lorVec3.Angle(lorVec4.Vect());
2376 Double_t theta2 = 180. * anglePair2 / TMath::Pi();
2377
2378 if (theta1 <= OpeningAngleCut && theta2 <= OpeningAngleCut) IsWithinCuts = true;
2379 cout << "CbmAnaConversion: AnalysePi0_Reco_noRichInd_calc: " << theta1 << "/" << theta2 << endl;
2380 }
2381
2382 if (motherID_e1 == motherID_e3 && motherID_e2 == motherID_e4) {
2383 Double_t anglePair1 = lorVec1.Angle(lorVec3.Vect());
2384 Double_t theta1 = 180. * anglePair1 / TMath::Pi();
2385
2386 Double_t anglePair2 = lorVec2.Angle(lorVec4.Vect());
2387 Double_t theta2 = 180. * anglePair2 / TMath::Pi();
2388
2389 if (theta1 <= OpeningAngleCut && theta2 <= OpeningAngleCut) IsWithinCuts = true;
2390 cout << "CbmAnaConversion: AnalysePi0_Reco_noRichInd_calc: " << theta1 << "/" << theta2 << endl;
2391 }
2392
2393 if (motherID_e1 == motherID_e4 && motherID_e2 == motherID_e3) {
2394 Double_t anglePair1 = lorVec1.Angle(lorVec4.Vect());
2395 Double_t theta1 = 180. * anglePair1 / TMath::Pi();
2396
2397 Double_t anglePair2 = lorVec2.Angle(lorVec3.Vect());
2398 Double_t theta2 = 180. * anglePair2 / TMath::Pi();
2399
2400 if (theta1 <= OpeningAngleCut && theta2 <= OpeningAngleCut) IsWithinCuts = true;
2401 cout << "CbmAnaConversion: AnalysePi0_Reco_noRichInd_calc: " << theta1 << "/" << theta2 << endl;
2402 }
2403
2404 if (IsWithinCuts == true) { fhPi0_Reco_occurence2->Fill(8); }
2405
2406 return IsWithinCuts;
2407}
2408
2409
#define M2E
ClassImp(CbmConverterManager)
Helper functions for drawing 1D and 2D histograms and graphs.
Data class for STS tracks.
fscal v[fmask::Size]
Definition KfSimdPseudo.h:4
int Int_t
bool Bool_t
static Double_t CalcChiCut(Double_t pt)
Bool_t FillRecoTracklistEPEM(CbmMCTrack *mctrack, TVector3 stsMomentum, TVector3 refittedMom, int i, Double_t chi, Int_t GlobalTrackId)
std::vector< int > trackindexarray
std::vector< CbmMCTrack * > fTestTracklist
std::vector< TVector3 > fTestTracklist_momentum
TH2D * fhPi0_Reco_noRichInd_chi_vs_pt
TH2D * fhPi0_Reco_ndf_vs_startvertex
std::vector< TH1 * > fHistoList_richrings
TH2D * fhPi0_Reco_startvertex_vs_nofhits
TH2D * fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0
std::vector< TH1 * > fHistoList_kfparticle
std::vector< TH1 * > fHistoList_reco_mom
std::vector< CbmMCTrack * > fMCTracklist_all
TH2D * fhPi0_Reco_noRichInd_chi_vs_momentum
TH2D * fhPi0_Reco_chi_vs_momentum
std::vector< int > fTestTracklist_nofhits
std::vector< CbmMCTrack * > fRecoTracklist
std::vector< Double_t > fRecoTracklistEPEM_chi
std::vector< CbmMCTrack * > fRecoTracklistEPEM
TClonesArray * fGlobalTracks
TH2D * fhPi0_Reco_noRichInd_chi_vs_pt_eFromPi0_Target
std::vector< TVector3 > fTestTracklist_noRichInd_momentum
TClonesArray * fRichRings
std::vector< TH1 * > fHistoList_furtherAnalyses
Double_t Invmass_4particles(const CbmMCTrack *mctrack1, const CbmMCTrack *mctrack2, const CbmMCTrack *mctrack3, const CbmMCTrack *mctrack4)
TH2D * fhPi0_Reco_chi_vs_pt_eFromPi0
CbmAnaConversion()
Standard constructor.
std::vector< int > fTestTracklist_noRichInd_ndf
void AnalyseElectrons(CbmMCTrack *mctrack)
std::vector< float > fTestTracklist_noRichInd_chi
TH2D * fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0
CbmKFParticleFinder * fKFparticle
TH2D * fhPi0_Reco_chi_vs_momentum_eFromPi0
CbmAnaConversionPhotons2 * fAnaPhotons2
std::vector< int > fTestTracklist_richInd
std::vector< TH1 * > fHistoList_MC
Bool_t AnalysePi0_Reco_noRichInd_calc(int e1, int e2, int e3, int e4)
TH2D * fhPi0_Reco_noRichInd_chi_vs_pt_eRest
CbmKFParticleFinderQa * fKFparticleFinderQA
Double_t Invmass_2particles(const CbmMCTrack *mctrack1, const CbmMCTrack *mctrack2)
std::vector< int > fTestTracklist_ndf
virtual void Finish()
Inherited from FairTask.
std::vector< TVector3 > fRecoMomentum
CbmAnaConversionReco * fAnaReco
std::vector< CbmMCTrack * > fMCTracklist
virtual InitStatus Init()
Inherited from FairTask.
TH2D * fhPi0_Reco_ndf_vs_nofhits_withChi
std::vector< TH1 * > fHistoList
Double_t Invmass_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
LmvmKinePar CalculateKinematicParams(const CbmMCTrack *mctrackP, const CbmMCTrack *mctrackM)
Bool_t AnalysePi0_MC(CbmMCTrack *mctrack, int i)
std::vector< TH1 * > fHistoList_reco
TClonesArray * fStsTrackMatches
std::vector< TVector3 > fRecoRefittedMomentum
void FillMCTracklists(CbmMCTrack *mctrack, int i)
std::vector< Int_t > fRecoTracklistEPEM_gtid
TH2D * fhANN_output_electrons_vs_p
CbmAnaConversionKF * fAnaKF
const KFParticleTopoReconstructor * fKFtopo
void FillRecoTracklist(CbmMCTrack *mtrack)
TH2D * fhPi0_Reco_noRichInd_chi_vs_momentum_eFromPi0_Target
TH2D * fhPi0_Reco_chi_vs_pt_eFromPi0_Target
void InitHistograms()
Initialize histograms.
virtual void Exec(Option_t *option)
Inherited from FairTask.
void SetKF(CbmKFParticleFinder *kfparticle, CbmKFParticleFinderQa *kfparticleQA)
CbmAnaConversionRecoFull * fAnaRecoFull
TClonesArray * fRichRingMatches
std::vector< int > fTestTracklist_noRichInd_gTrackId
std::vector< int > fRecoTracklistEPEM_id
TH1D * fhANN_output_electrons_chiCut
TH2D * fhPi0_Reco_noRichInd_ndf_vs_nofhits_withChi
Bool_t AnalysePi0_Reco_calc(int e1, int e2, int e3, int e4)
CbmAnaConversionTest2 * fAnaTest2
TH1D * fhPi0_Reco_noRichInd_invmass
TH2D * fhPi0_Reco_noRichInd_chi_vs_momentum_eRest
CbmAnaConversionTomography * fAnaTomography
CbmAnaConversionRich * fAnaRich
TClonesArray * fMcTracks
TClonesArray * fRichPoints
TH1D * fhPi0_Reco_noRichInd_invmass_mc
TH2D * fhPi0_Reco_chi_vs_momentum_eFromPi0_Target
CbmVertex * fPrimVertex
virtual ~CbmAnaConversion()
Standard destructor.
Double_t Invmass_2gammas(const CbmMCTrack *gamma1, const CbmMCTrack *gamma2)
TH2D * fhPi0_Reco_noRichInd_invmass_cases
CbmAnaConversionPhotons * fAnaPhotons
TClonesArray * fStsTracks
CbmAnaConversionTest * fAnaTest
std::vector< CbmMCTrack * > fTestTracklist_noRichInd
TH2D * fhPi0_Reco_startvertex_vs_chi
std::vector< int > fTestTracklist_noRichInd_MCindex
std::vector< float > fTestTracklist_chi
std::vector< int > fTestTracklist_noRichInd_richInd
TH2D * fhPi0_Reco_noRichInd_ndf_vs_nofhits
std::vector< TH1 * > fHistoList_tomography
std::vector< int > fTestTracklist_noRichInd_nofhits
int32_t GetStsTrackIndex() const
int32_t GetRichRingIndex() const
void GetChiToVertex(std::vector< CbmStsTrack > &Tracks, std::vector< PFFieldRegion > &field, std::vector< float > &chiToVtx, CbmKFVertex &primVtx, float chiPrim=-1)
void Fit(std::vector< CbmStsTrack > &Tracks, const std::vector< CbmMvdHit > &vMvdHits, const std::vector< CbmStsHit > &vStsHits, const std::vector< int > &pidHypo)
double GetPt() const
Definition CbmMCTrack.h:96
void GetMomentum(TVector3 &momentum) const
Definition CbmMCTrack.h:169
int32_t GetMotherId() const
Definition CbmMCTrack.h:68
int32_t GetPdgCode() const
Definition CbmMCTrack.h:67
void Get4Momentum(TLorentzVector &momentum) const
Definition CbmMCTrack.h:172
double GetRapidity() const
void GetStartVertex(TVector3 &vertex) const
Definition CbmMCTrack.h:175
int32_t GetNofLinks() const
Definition CbmMatch.h:42
const CbmLink & GetMatchedLink() const
Definition CbmMatch.h:41
double CalculateAnnValue(int globalTrackIndex, double momentum)
Calculate output value of the ANN.
static CbmRichElectronIdAnn & GetInstance()
virtual int32_t GetTotalNofHits() const
Definition CbmStsTrack.h:81
double GetTrueOverAllHitsRatio() const
const FairTrackParam * GetParamFirst() const
Definition CbmTrack.h:68
Double_t fAngle
Definition LmvmKinePar.h:21
Double_t fMinv
Definition LmvmKinePar.h:20
Double_t fPt
Definition LmvmKinePar.h:18
Double_t fMomentumMag
Definition LmvmKinePar.h:17
Double_t fRapidity
Definition LmvmKinePar.h:19
Hash for CbmL1LinkKey.