CbmRoot
CbmKresConversionReconstruction.cxx
Go to the documentation of this file.
1 
17 #include "CbmKresFunctions.h"
18 
19 #include "CbmGlobalTrack.h"
20 #include "CbmMCTrack.h"
21 #include "CbmRichRing.h"
22 #include "CbmStsTrack.h"
23 #include "CbmTrackMatchNew.h"
24 #include "FairRootManager.h"
25 #include "TH1.h"
26 #include "TH1D.h"
27 #include "TH2D.h"
28 #include "TH3D.h"
29 #include "TProfile2D.h"
30 
31 #include <iostream>
32 
33 
34 using namespace std;
35 
37  : fMcTracks(nullptr)
38  , fGlobalTracks(nullptr)
39  , fStsTracks(nullptr)
40  , fStsTrackMatches(nullptr)
41  , fRichRings(nullptr)
42  , fRichRingMatches(nullptr)
43  , STS_refmomentum()
44  , STS_MCtrack()
45  , STS_Id()
46  , STS_and_RICH_refmomentum()
47  , STS_and_RICH_MCtrack()
48  , STS_and_RICH_Id()
49  , fHistoList_reco()
50  , ConversionPoints2D(nullptr)
51  , ConversionPoints3D(nullptr)
52  , fHistoList_reco_STS_gg()
53  , fHistoList_reco_STS_and_RICH_gg()
54  , fHistoList_reco_STS_gee()
55  , fHistoList_reco_STS_and_RICH_gee()
56  , fHistoList_reco_STS_eeee()
57  , fHistoList_reco_STS_and_RICH_eeee()
58  , STS_InvMass_eeee_mc(nullptr)
59  , STS_InvMass_eeee_refitted(nullptr)
60  , STSRICH_InvMass_eeee_mc(nullptr)
61  , STSRICH_InvMass_eeee_refitted(nullptr)
62  , STS_InvMass_gee_mc(nullptr)
63  , STS_InvMass_gee_refitted(nullptr)
64  , STS_InvMass_realg_gee_reffited(nullptr)
65  , STS_InvMass_img_gee_refitted(nullptr)
66  , STS_OpeningAngle_realg_gee_mc(nullptr)
67  , STS_OpeningAngle_realg_gee_reffited(nullptr)
68  , STS_OpeningAngle_img_gee_mc(nullptr)
69  , STS_OpeningAngle_img_gee_reffited(nullptr)
70  , STSRICH_InvMass_gee_mc(nullptr)
71  , STSRICH_InvMass_gee_refitted(nullptr)
72  , STSRICH_InvMass_realg_gee_reffited(nullptr)
73  , STSRICH_InvMass_img_gee_refitted(nullptr)
74  , STSRICH_OpeningAngle_realg_gee_mc(nullptr)
75  , STSRICH_OpeningAngle_realg_gee_reffited(nullptr)
76  , STSRICH_OpeningAngle_img_gee_mc(nullptr)
77  , STSRICH_OpeningAngle_img_gee_reffited(nullptr)
78  , STS_InvMass_gg_mc(nullptr)
79  , STS_InvMass_gg_reffited(nullptr)
80  , STS_InvMass_realg_gg_mc(nullptr)
81  , STS_InvMass_realg_gg_reffited(nullptr)
82  , STS_OpeningAngle_realg_gg_mc(nullptr)
83  , STS_OpeningAngle_realg_gg_reffited(nullptr)
84  , STS_OpeningAngle_between_gg_mc(nullptr)
85  , STS_OpeningAngle_between_gg_reffited(nullptr)
86  , STSRICH_InvMass_gg_mc(nullptr)
87  , STSRICH_InvMass_gg_reffited(nullptr)
88  , STSRICH_InvMass_realg_gg_mc(nullptr)
89  , STSRICH_InvMass_realg_gg_reffited(nullptr)
90  , STSRICH_OpeningAngle_realg_gg_mc(nullptr)
91  , STSRICH_OpeningAngle_realg_gg_reffited(nullptr)
92  , STSRICH_OpeningAngle_between_gg_mc(nullptr)
93  , STSRICH_OpeningAngle_between_gg_reffited(nullptr) {}
94 
96 
99 
100  FairRootManager* ioman = FairRootManager::Instance();
101  if (nullptr == ioman) {
102  Fatal("CbmKresConversionReconstruction::Init",
103  "RootManager not instantised!");
104  }
105 
106  fMcTracks = (TClonesArray*) ioman->GetObject("MCTrack");
107  if (nullptr == fMcTracks) {
108  Fatal("CbmKresConversionReconstruction::Init", "No MCTrack array!");
109  }
110 
111  fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
112  if (nullptr == fGlobalTracks) {
113  Fatal("CbmKresConversionReconstruction::Init", "No GlobalTrack array!");
114  }
115 
116  fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
117  if (nullptr == fStsTracks) {
118  Fatal("CbmKresConversionReconstruction::Init", "No StsTrack array!");
119  }
120 
121  fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
122  if (nullptr == fStsTrackMatches) {
123  Fatal("CbmKresConversionReconstruction::Init", "No StsTrackMatch array!");
124  }
125 
126  fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
127  if (nullptr == fRichRings) {
128  Fatal("CbmKresConversionReconstruction::Init", "No RichRing array!");
129  }
130 
131  fRichRingMatches = (TClonesArray*) ioman->GetObject("RichRingMatch");
132  if (nullptr == fRichRingMatches) {
133  Fatal("CbmKresConversionReconstruction::Init", "No RichRingMatch array!");
134  }
135 }
136 
137 void CbmKresConversionReconstruction::Exec(int /*fEventNumRec*/) {
138  // cout << "CbmKresConversionReconstruction, event No. " << fEventNumRec << endl;
139 
140  STS_refmomentum.clear();
141  STS_MCtrack.clear();
142  STS_Id.clear();
143  STS_and_RICH_refmomentum.clear();
144  STS_and_RICH_MCtrack.clear();
145  STS_and_RICH_Id.clear();
146 
148  // ========================================================================================
149  Int_t ngTracks = fGlobalTracks->GetEntriesFast();
150  for (Int_t iTr = 0; iTr < ngTracks; iTr++) {
151  CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(iTr);
152  if (nullptr == gTrack) continue;
153  int stsInd = gTrack->GetStsTrackIndex();
154  int richInd = gTrack->GetRichRingIndex();
155 
156  // ========================================================================================
158  if (stsInd < 0) continue;
159  CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(stsInd);
160  if (stsTrack == nullptr) continue;
161  CbmTrackMatchNew* stsMatch =
162  (CbmTrackMatchNew*) fStsTrackMatches->At(stsInd);
163  if (stsMatch == nullptr) continue;
164  if (stsMatch->GetNofLinks() <= 0) continue;
165  int stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
166  if (stsMcTrackId < 0) continue;
167  CbmMCTrack* mcTrackSTS = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
168  if (mcTrackSTS == nullptr) continue;
169  int pdgSTS = mcTrackSTS->GetPdgCode();
170  int motherIdSTS = mcTrackSTS->GetMotherId();
171  if (TMath::Abs(pdgSTS) != 11) continue;
173  // ========================================================================================
174 
175 
176  if (motherIdSTS == -1) continue;
177  CbmMCTrack* mcTrackMotherSTS = (CbmMCTrack*) fMcTracks->At(motherIdSTS);
178  if (mcTrackMotherSTS == nullptr) continue;
179 
180  if (mcTrackMotherSTS->GetPdgCode() == 111) {
181 
182  } else if (mcTrackMotherSTS->GetPdgCode() == 22) {
183  if (mcTrackMotherSTS->GetMotherId() == -1) continue;
184  CbmMCTrack* mcTrackMotherOfGammaSTS =
185  (CbmMCTrack*) fMcTracks->At(mcTrackMotherSTS->GetMotherId());
186  if (mcTrackMotherOfGammaSTS->GetPdgCode() != 111) continue;
187  float xConv = mcTrackSTS->GetStartX();
188  float yConv = mcTrackSTS->GetStartY();
189  float zConv = mcTrackSTS->GetStartZ();
190  ConversionPoints3D->Fill(zConv, xConv, yConv);
191  ConversionPoints2D->Fill(zConv, yConv);
192  } else {
193  continue;
194  }
195 
196  TVector3 refmomentum =
198  mcTrackSTS->GetStartX(),
199  mcTrackSTS->GetStartY(),
200  mcTrackSTS->GetStartZ());
201 
202  STS_refmomentum.push_back(refmomentum);
203  STS_MCtrack.push_back(mcTrackSTS);
204  STS_Id.push_back(stsMcTrackId);
205 
206 
207  // ========================================================================================
209  if (richInd < 0) continue;
210  CbmRichRing* richRing = (CbmRichRing*) fRichRings->At(richInd);
211  if (richRing == nullptr) continue;
212  CbmTrackMatchNew* richMatch =
213  (CbmTrackMatchNew*) fRichRingMatches->At(richInd);
214  if (richMatch == nullptr) continue;
215  if (richMatch->GetNofLinks() <= 0) continue;
216  int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
217  if (richMcTrackId < 0) continue;
218  CbmMCTrack* mcTrackRICH = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
219  if (mcTrackRICH == nullptr) continue;
220  int pdgRICH = mcTrackRICH->GetPdgCode();
221  if (TMath::Abs(pdgRICH) != 11) continue;
223  // ========================================================================================
224 
225  if (stsMcTrackId != richMcTrackId) continue;
226 
227  STS_and_RICH_refmomentum.push_back(refmomentum);
228  STS_and_RICH_MCtrack.push_back(mcTrackSTS);
229  STS_and_RICH_Id.push_back(stsMcTrackId);
230  }
232  // ========================================================================================
233 
235  STS_MCtrack,
236  STS_Id,
246 }
247 
249  vector<CbmMCTrack*> MC,
250  vector<Int_t> Id,
251  vector<TH1*> gg,
252  vector<TH1*> gee,
253  vector<TH1*> eeee) {
254  Int_t fDecayedParticlePdg = 111;
255 
256  if (MC.size() < 4) return;
257 
258  for (size_t i = 0; i < MC.size(); i++) {
259  for (size_t j = i + 1; j < MC.size(); j++) {
260  for (size_t k = j + 1; k < MC.size(); k++) {
261  for (size_t l = k + 1; l < MC.size(); l++) {
262 
263  if (MC.at(i)->GetPdgCode() + MC.at(j)->GetPdgCode()
264  + MC.at(k)->GetPdgCode() + MC.at(l)->GetPdgCode()
265  != 0)
266  continue;
267 
268  int motherId1 = MC.at(i)->GetMotherId();
269  int motherId2 = MC.at(j)->GetMotherId();
270  int motherId3 = MC.at(k)->GetMotherId();
271  int motherId4 = MC.at(l)->GetMotherId();
272 
273  int STSmcId1 = Id.at(i);
274  int STSmcId2 = Id.at(j);
275  int STSmcId3 = Id.at(k);
276  int STSmcId4 = Id.at(l);
277  if (STSmcId1 == STSmcId2 || STSmcId1 == STSmcId3
278  || STSmcId1 == STSmcId4 || STSmcId2 == STSmcId3
279  || STSmcId2 == STSmcId4 || STSmcId3 == STSmcId4)
280  continue; // particle is not used twice
281 
283  if (motherId1 == motherId2 && motherId1 == motherId3
284  && motherId1 == motherId4) {
285  if (motherId1 != -1) {
286  CbmMCTrack* mother1 = (CbmMCTrack*) fMcTracks->At(motherId1);
287  if (nullptr == mother1) continue;
288  int mcMotherPdg1 = mother1->GetPdgCode();
289  if (mcMotherPdg1 == fDecayedParticlePdg) {
290  Double_t InvMass_true = CbmKresFunctions::Invmass_4particles_MC(
291  MC.at(i), MC.at(j), MC.at(k), MC.at(l));
292  Double_t InvMass_reco =
294  RefMom.at(i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
295  cout << "Decay pi0 -> e+e-e+e- detected!\t\t mc mass: "
296  << InvMass_true << " \t reco mass: " << InvMass_reco
297  << endl;
298  cout << "motherIds: " << motherId1 << "/" << motherId2 << "/"
299  << motherId3 << "/" << motherId4
300  << "\t motherpdg: " << mcMotherPdg1
301  << "\t mctrack mass: " << mother1->GetMass() << endl;
302  cout << "pdgs: " << MC.at(i)->GetPdgCode() << "/"
303  << MC.at(j)->GetPdgCode() << "/" << MC.at(k)->GetPdgCode()
304  << "/" << MC.at(l)->GetPdgCode() << endl;
305  eeee[0]->Fill(InvMass_true);
306  eeee[1]->Fill(InvMass_reco);
307  }
308  }
309  }
310 
311 
312  //================================== decay pi0 -> gamma(e+e-) e+e-
313  if ((motherId1 == motherId2 && motherId3 == motherId4)
314  || (motherId1 == motherId3 && motherId2 == motherId4)
315  || (motherId1 == motherId4 && motherId2 == motherId3)) {
316 
317  int grandmotherId1 = -1;
318  int grandmotherId2 = -1;
319  int grandmotherId3 = -1;
320  int grandmotherId4 = -1;
321 
322  int mcMotherPdg1 = -1;
323  int mcMotherPdg2 = -1;
324  int mcMotherPdg3 = -1;
325  // int mcMotherPdg4 = -1;
326  int mcGrandmotherPdg1 = -1;
327  // int mcGrandmotherPdg2 = -1;
328  // int mcGrandmotherPdg3 = -1;
329  // int mcGrandmotherPdg4 = -1;
330 
331  CbmMCTrack* grandmother1 = nullptr;
332 
333  if (motherId1 == -1 || motherId2 == -1 || motherId3 == -1
334  || motherId4 == -1)
335  continue;
336  CbmMCTrack* mother1 = (CbmMCTrack*) fMcTracks->At(motherId1);
337  if (nullptr != mother1) mcMotherPdg1 = mother1->GetPdgCode();
338  grandmotherId1 = mother1->GetMotherId();
339  if (grandmotherId1 != -1) {
340  grandmother1 = (CbmMCTrack*) fMcTracks->At(grandmotherId1);
341  if (nullptr != grandmother1)
342  mcGrandmotherPdg1 = grandmother1->GetPdgCode();
343  }
344  CbmMCTrack* mother2 = (CbmMCTrack*) fMcTracks->At(motherId2);
345  if (nullptr != mother2) mcMotherPdg2 = mother2->GetPdgCode();
346  grandmotherId2 = mother2->GetMotherId();
347  CbmMCTrack* mother3 = (CbmMCTrack*) fMcTracks->At(motherId3);
348  if (nullptr != mother3) mcMotherPdg3 = mother3->GetPdgCode();
349  grandmotherId3 = mother3->GetMotherId();
350  CbmMCTrack* mother4 = (CbmMCTrack*) fMcTracks->At(motherId4);
351  // if (nullptr != mother4) mcMotherPdg4 = mother4->GetPdgCode();
352  grandmotherId4 = mother4->GetMotherId();
353 
354  if (motherId1 == motherId2 && motherId3 == motherId4) {
355  if (CbmKresFunctions::NofDaughters(motherId1, MC) != 2
356  || CbmKresFunctions::NofDaughters(motherId3, MC) != 2)
357  continue;
358  if ((grandmotherId1 == motherId3
359  && mcMotherPdg3 == fDecayedParticlePdg)
360  || (motherId1 == grandmotherId3
361  && mcMotherPdg1 == fDecayedParticlePdg)) {
362  Double_t InvMass_true = CbmKresFunctions::Invmass_4particles_MC(
363  MC.at(i), MC.at(j), MC.at(k), MC.at(l));
364  Double_t InvMass_reco =
366  RefMom.at(i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
367  cout << "Decay pi0 -> gamma(e+e-) e+e- detected!\t\t mc mass: "
368  << InvMass_true << "\t, reco mass: " << InvMass_reco
369  << endl;
370  cout << "motherids: " << motherId1 << "/" << motherId2 << "/"
371  << motherId3 << "/" << motherId4 << endl;
372  cout << "pdgs " << MC.at(i)->GetPdgCode() << "/"
373  << MC.at(j)->GetPdgCode() << "/" << MC.at(k)->GetPdgCode()
374  << "/" << MC.at(l)->GetPdgCode() << endl;
375 
376  gee[0]->Fill(InvMass_true);
377  gee[1]->Fill(InvMass_reco);
378 
379  TVector3 start1;
380  MC.at(i)->GetStartVertex(start1);
381  TVector3 start2;
382  MC.at(j)->GetStartVertex(start2);
383  TVector3 start3;
384  MC.at(k)->GetStartVertex(start3);
385  TVector3 start4;
386  MC.at(l)->GetStartVertex(start4);
387  cout << "start: " << start1.Z() << "/" << start2.Z() << "/"
388  << start3.Z() << "/" << start4.Z() << endl;
389 
390  if (
391  mcGrandmotherPdg1
392  == fDecayedParticlePdg) { // case: i,j = electrons from gamma, k,l = electrons from pi0
393  Double_t InvMass_realg =
395  RefMom.at(j));
396  Double_t InvMass_img =
398  RefMom.at(l));
399  gee[2]->Fill(InvMass_realg);
400  gee[3]->Fill(InvMass_img);
401 
402  Double_t OpeningAngle_realg_mc =
404  MC.at(j));
405  Double_t OpeningAngle_realg_refitted =
407  RefMom.at(j));
408  gee[4]->Fill(OpeningAngle_realg_mc);
409  gee[5]->Fill(OpeningAngle_realg_refitted);
410 
411  Double_t OpeningAngle_img_mc =
413  MC.at(l));
414  Double_t OpeningAngle_img_refitted =
416  RefMom.at(l));
417  gee[6]->Fill(OpeningAngle_img_mc);
418  gee[7]->Fill(OpeningAngle_img_refitted);
419  }
420  if (
421  mcMotherPdg1
422  == fDecayedParticlePdg) { // case: i,j = electrons from pi0, k,l = electrons from gamma
423  Double_t InvMass_realg =
425  RefMom.at(l));
426  Double_t InvMass_img =
428  RefMom.at(j));
429  gee[2]->Fill(InvMass_realg);
430  gee[3]->Fill(InvMass_img);
431 
432  Double_t OpeningAngle_realg_mc =
434  MC.at(l));
435  Double_t OpeningAngle_realg_refitted =
437  RefMom.at(l));
438  gee[4]->Fill(OpeningAngle_realg_mc);
439  gee[5]->Fill(OpeningAngle_realg_refitted);
440 
441  Double_t OpeningAngle_img_mc =
443  MC.at(j));
444  Double_t OpeningAngle_img_refitted =
446  RefMom.at(j));
447  gee[6]->Fill(OpeningAngle_img_mc);
448  gee[7]->Fill(OpeningAngle_img_refitted);
449  }
450  }
451  }
452 
453  if (motherId1 == motherId3 && motherId2 == motherId4) {
454  if (CbmKresFunctions::NofDaughters(motherId1, MC) != 2
455  || CbmKresFunctions::NofDaughters(motherId2, MC) != 2)
456  continue;
457  if ((grandmotherId1 == motherId2
458  && mcMotherPdg2 == fDecayedParticlePdg)
459  || (motherId1 == grandmotherId2
460  && mcMotherPdg1 == fDecayedParticlePdg)) {
461  Double_t InvMass_true = CbmKresFunctions::Invmass_4particles_MC(
462  MC.at(i), MC.at(j), MC.at(k), MC.at(l));
463  Double_t InvMass_reco =
465  RefMom.at(i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
466  cout << "Decay pi0 -> gamma(e+e-) e+e- detected!\t\t mc mass: "
467  << InvMass_true << "\t, reco mass: " << InvMass_reco
468  << endl;
469  cout << "motherids: " << motherId1 << "/" << motherId2 << "/"
470  << motherId3 << "/" << motherId4 << endl;
471  cout << "pdgs " << MC.at(i)->GetPdgCode() << "/"
472  << MC.at(j)->GetPdgCode() << "/" << MC.at(k)->GetPdgCode()
473  << "/" << MC.at(l)->GetPdgCode() << endl;
474 
475  gee[0]->Fill(InvMass_true);
476  gee[1]->Fill(InvMass_reco);
477 
478  TVector3 start1;
479  MC.at(i)->GetStartVertex(start1);
480  TVector3 start2;
481  MC.at(j)->GetStartVertex(start2);
482  TVector3 start3;
483  MC.at(k)->GetStartVertex(start3);
484  TVector3 start4;
485  MC.at(l)->GetStartVertex(start4);
486  cout << "start: " << start1.Z() << "/" << start2.Z() << "/"
487  << start3.Z() << "/" << start4.Z() << endl;
488 
489  if (
490  mcGrandmotherPdg1
491  == fDecayedParticlePdg) { // case: i,k = electrons from gamma, j,l = electrons from pi0
492  Double_t InvMass_realg =
494  RefMom.at(k));
495  Double_t InvMass_img =
497  RefMom.at(l));
498  gee[2]->Fill(InvMass_realg);
499  gee[3]->Fill(InvMass_img);
500 
501  Double_t OpeningAngle_realg_mc =
503  MC.at(k));
504  Double_t OpeningAngle_realg_refitted =
506  RefMom.at(k));
507  gee[4]->Fill(OpeningAngle_realg_mc);
508  gee[5]->Fill(OpeningAngle_realg_refitted);
509 
510  Double_t OpeningAngle_img_mc =
512  MC.at(l));
513  Double_t OpeningAngle_img_refitted =
515  RefMom.at(l));
516  gee[6]->Fill(OpeningAngle_img_mc);
517  gee[7]->Fill(OpeningAngle_img_refitted);
518  }
519  if (
520  mcMotherPdg1
521  == fDecayedParticlePdg) { // case: i,k = electrons from pi0, j,l = electrons from gamma
522  Double_t InvMass_realg =
524  RefMom.at(l));
525  Double_t InvMass_img =
527  RefMom.at(k));
528  gee[2]->Fill(InvMass_realg);
529  gee[3]->Fill(InvMass_img);
530 
531  Double_t OpeningAngle_realg_mc =
533  MC.at(l));
534  Double_t OpeningAngle_realg_refitted =
536  RefMom.at(l));
537  gee[4]->Fill(OpeningAngle_realg_mc);
538  gee[5]->Fill(OpeningAngle_realg_refitted);
539 
540  Double_t OpeningAngle_img_mc =
542  MC.at(k));
543  Double_t OpeningAngle_img_refitted =
545  RefMom.at(k));
546  gee[6]->Fill(OpeningAngle_img_mc);
547  gee[7]->Fill(OpeningAngle_img_refitted);
548  }
549  }
550  }
551 
552  if (motherId1 == motherId4 && motherId2 == motherId3) {
553  if (CbmKresFunctions::NofDaughters(motherId1, MC) != 2
554  || CbmKresFunctions::NofDaughters(motherId2, MC) != 2)
555  continue;
556  if ((grandmotherId1 == motherId2
557  && mcMotherPdg2 == fDecayedParticlePdg)
558  || (motherId1 == grandmotherId2
559  && mcMotherPdg1 == fDecayedParticlePdg)) {
560  Double_t InvMass_true = CbmKresFunctions::Invmass_4particles_MC(
561  MC.at(i), MC.at(j), MC.at(k), MC.at(l));
562  Double_t InvMass_reco =
564  RefMom.at(i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
565  cout << "Decay pi0 -> gamma(e+e-) e+e- detected!\t\t mc mass: "
566  << InvMass_true << "\t, reco mass: " << InvMass_reco
567  << endl;
568  cout << "motherids: " << motherId1 << "/" << motherId2 << "/"
569  << motherId3 << "/" << motherId4 << endl;
570  cout << "pdgs " << MC.at(i)->GetPdgCode() << "/"
571  << MC.at(j)->GetPdgCode() << "/" << MC.at(k)->GetPdgCode()
572  << "/" << MC.at(l)->GetPdgCode() << endl;
573 
574  gee[0]->Fill(InvMass_true);
575  gee[1]->Fill(InvMass_reco);
576 
577  TVector3 start1;
578  MC.at(i)->GetStartVertex(start1);
579  TVector3 start2;
580  MC.at(j)->GetStartVertex(start2);
581  TVector3 start3;
582  MC.at(k)->GetStartVertex(start3);
583  TVector3 start4;
584  MC.at(l)->GetStartVertex(start4);
585  cout << "start: " << start1.Z() << "/" << start2.Z() << "/"
586  << start3.Z() << "/" << start4.Z() << endl;
587 
588  if (
589  mcGrandmotherPdg1
590  == fDecayedParticlePdg) { // case: i,l = electrons from gamma, k,j = electrons from pi0
591  Double_t InvMass_realg =
593  RefMom.at(l));
594  Double_t InvMass_img =
596  RefMom.at(j));
597  gee[2]->Fill(InvMass_realg);
598  gee[3]->Fill(InvMass_img);
599 
600  Double_t OpeningAngle_realg_mc =
602  MC.at(l));
603  Double_t OpeningAngle_realg_refitted =
605  RefMom.at(l));
606  gee[4]->Fill(OpeningAngle_realg_mc);
607  gee[5]->Fill(OpeningAngle_realg_refitted);
608 
609  Double_t OpeningAngle_img_mc =
611  MC.at(j));
612  Double_t OpeningAngle_img_refitted =
614  RefMom.at(j));
615  gee[6]->Fill(OpeningAngle_img_mc);
616  gee[7]->Fill(OpeningAngle_img_refitted);
617  }
618  if (
619  mcMotherPdg1
620  == fDecayedParticlePdg) { // case: i,l = electrons from pi0, k,j = electrons from gamma
621  Double_t InvMass_realg =
623  RefMom.at(j));
624  Double_t InvMass_img =
626  RefMom.at(l));
627  gee[2]->Fill(InvMass_realg);
628  gee[3]->Fill(InvMass_img);
629 
630  Double_t OpeningAngle_realg_mc =
632  MC.at(j));
633  Double_t OpeningAngle_realg_refitted =
635  RefMom.at(j));
636  gee[4]->Fill(OpeningAngle_realg_mc);
637  gee[5]->Fill(OpeningAngle_realg_refitted);
638 
639  Double_t OpeningAngle_img_mc =
641  MC.at(l));
642  Double_t OpeningAngle_img_refitted =
644  RefMom.at(l));
645  gee[6]->Fill(OpeningAngle_img_mc);
646  gee[7]->Fill(OpeningAngle_img_refitted);
647  }
648  }
649  }
650 
651 
652  //================================== decay pi0 -> gamma gamma -> e+e- e+e-
653  if (grandmotherId1 == grandmotherId2
654  && grandmotherId1 == grandmotherId3
655  && grandmotherId1 == grandmotherId4) {
656  if (mcGrandmotherPdg1 != fDecayedParticlePdg) continue;
657  Double_t InvMass_true = CbmKresFunctions::Invmass_4particles_MC(
658  MC.at(i), MC.at(j), MC.at(k), MC.at(l));
659  Double_t InvMass_reco = CbmKresFunctions::Invmass_4particles_RECO(
660  RefMom.at(i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
661  cout << "Decay pi0 -> gamma gamma -> e+e- e+e- detected!\t\t mc "
662  "mass: "
663  << InvMass_true << "\t, reco mass: " << InvMass_reco << endl;
664  cout << "motherids: " << motherId1 << "/" << motherId2 << "/"
665  << motherId3 << "/" << motherId4 << endl;
666  cout << "grandmotherid: " << grandmotherId1 << "/"
667  << grandmotherId2 << "/" << grandmotherId3 << "/"
668  << grandmotherId4 << endl;
669  cout << "pdgs " << MC.at(i)->GetPdgCode() << "/"
670  << MC.at(j)->GetPdgCode() << "/" << MC.at(k)->GetPdgCode()
671  << "/" << MC.at(l)->GetPdgCode() << endl;
672 
673  gg[0]->Fill(InvMass_true);
674  gg[1]->Fill(InvMass_reco);
675 
676  cout << "\t \t mc true info: " << endl;
677  cout << "particle 1: \t" << MC.at(i)->GetPdgCode()
678  << ";\t pt = " << MC.at(i)->GetPt()
679  << ";\t X = " << MC.at(i)->GetStartX()
680  << ";\t Y = " << MC.at(i)->GetStartY()
681  << ";\t Z = " << MC.at(i)->GetStartZ()
682  << ";\t E = " << MC.at(i)->GetEnergy() << endl;
683  cout << "particle 2: \t" << MC.at(j)->GetPdgCode()
684  << ";\t pt = " << MC.at(j)->GetPt()
685  << ";\t X = " << MC.at(j)->GetStartX()
686  << ";\t Y = " << MC.at(j)->GetStartY()
687  << ";\t Z = " << MC.at(j)->GetStartZ()
688  << ";\t E = " << MC.at(j)->GetEnergy() << endl;
689  cout << "particle 3: \t" << MC.at(k)->GetPdgCode()
690  << ";\t pt = " << MC.at(k)->GetPt()
691  << ";\t X = " << MC.at(k)->GetStartX()
692  << ";\t Y = " << MC.at(k)->GetStartY()
693  << ";\t Z = " << MC.at(k)->GetStartZ()
694  << ";\t E = " << MC.at(k)->GetEnergy() << endl;
695  cout << "particle 4: \t" << MC.at(l)->GetPdgCode()
696  << ";\t pt = " << MC.at(l)->GetPt()
697  << ";\t X = " << MC.at(l)->GetStartX()
698  << ";\t Y = " << MC.at(l)->GetStartY()
699  << ";\t Z = " << MC.at(l)->GetStartZ()
700  << ";\t E = " << MC.at(l)->GetEnergy() << endl;
701 
702  Double_t OpeningAngle1_mc = 0;
703  Double_t OpeningAngle2_mc = 0;
704  Double_t OpeningAngle1_refitted = 0;
705  Double_t OpeningAngle2_refitted = 0;
706  Double_t InvMass_realg1_mc = 0;
707  Double_t InvMass_realg2_mc = 0;
708  Double_t InvMass_realg1_refitted = 0;
709  Double_t InvMass_realg2_refitted = 0;
710 
711  if (motherId1 == motherId2) {
713  MC.at(i), MC.at(j));
715  MC.at(k), MC.at(l));
716  gg[4]->Fill(OpeningAngle1_mc);
717  gg[4]->Fill(OpeningAngle2_mc);
718  OpeningAngle1_refitted =
720  RefMom.at(j));
721  OpeningAngle2_refitted =
723  RefMom.at(l));
724  gg[5]->Fill(OpeningAngle1_refitted);
725  gg[5]->Fill(OpeningAngle2_refitted);
726 
727  InvMass_realg1_mc =
728  CbmKresFunctions::Invmass_2particles_MC(MC.at(i), MC.at(j));
729  InvMass_realg2_mc =
730  CbmKresFunctions::Invmass_2particles_MC(MC.at(k), MC.at(l));
731  gg[2]->Fill(InvMass_realg1_mc);
732  gg[2]->Fill(InvMass_realg2_mc);
733  InvMass_realg1_refitted =
735  RefMom.at(j));
736  InvMass_realg2_refitted =
738  RefMom.at(l));
739  gg[3]->Fill(InvMass_realg1_refitted);
740  gg[3]->Fill(InvMass_realg2_refitted);
741  }
742  if (motherId1 == motherId3) {
744  MC.at(i), MC.at(k));
746  MC.at(j), MC.at(l));
747  gg[4]->Fill(OpeningAngle1_mc);
748  gg[4]->Fill(OpeningAngle2_mc);
749  OpeningAngle1_refitted =
751  RefMom.at(k));
752  OpeningAngle2_refitted =
754  RefMom.at(l));
755  gg[5]->Fill(OpeningAngle1_refitted);
756  gg[5]->Fill(OpeningAngle2_refitted);
757 
758  InvMass_realg1_mc =
759  CbmKresFunctions::Invmass_2particles_MC(MC.at(i), MC.at(k));
760  InvMass_realg2_mc =
761  CbmKresFunctions::Invmass_2particles_MC(MC.at(j), MC.at(l));
762  gg[2]->Fill(InvMass_realg1_mc);
763  gg[2]->Fill(InvMass_realg2_mc);
764  InvMass_realg1_refitted =
766  RefMom.at(k));
767  InvMass_realg2_refitted =
769  RefMom.at(l));
770  gg[3]->Fill(InvMass_realg1_refitted);
771  gg[3]->Fill(InvMass_realg2_refitted);
772  }
773  if (motherId1 == motherId4) {
775  MC.at(i), MC.at(l));
777  MC.at(j), MC.at(k));
778  gg[4]->Fill(OpeningAngle1_mc);
779  gg[4]->Fill(OpeningAngle2_mc);
780  OpeningAngle1_refitted =
782  RefMom.at(l));
783  OpeningAngle2_refitted =
785  RefMom.at(k));
786  gg[5]->Fill(OpeningAngle1_refitted);
787  gg[5]->Fill(OpeningAngle2_refitted);
788 
789  InvMass_realg1_mc =
790  CbmKresFunctions::Invmass_2particles_MC(MC.at(i), MC.at(l));
791  InvMass_realg2_mc =
792  CbmKresFunctions::Invmass_2particles_MC(MC.at(j), MC.at(k));
793  gg[2]->Fill(InvMass_realg1_mc);
794  gg[2]->Fill(InvMass_realg2_mc);
795  InvMass_realg1_refitted =
797  RefMom.at(l));
798  InvMass_realg2_refitted =
800  RefMom.at(k));
801  gg[3]->Fill(InvMass_realg1_refitted);
802  gg[3]->Fill(InvMass_realg2_refitted);
803  }
804  Double_t openingAngleBetweenGammas =
806  MC.at(i), MC.at(j), MC.at(k), MC.at(l));
807  gg[6]->Fill(openingAngleBetweenGammas);
808  Double_t openingAngleBetweenGammasReco =
810  RefMom.at(i), RefMom.at(j), RefMom.at(k), RefMom.at(l));
811  gg[7]->Fill(openingAngleBetweenGammasReco);
812  }
813  }
814  }
815  }
816  }
817  }
818 }
819 
820 
822  CbmMCTrack* mctrack1,
823  CbmMCTrack* mctrack2,
824  CbmMCTrack* mctrack3,
825  CbmMCTrack* mctrack4) {
826  Double_t openingAngle;
827  TLorentzVector gamma1;
828  TLorentzVector gamma2;
829 
830  if (mctrack1->GetMotherId() == mctrack2->GetMotherId()
831  && mctrack3->GetMotherId() == mctrack4->GetMotherId()) {
832  CbmMCTrack* mother1 = (CbmMCTrack*) fMcTracks->At(mctrack1->GetMotherId());
833  mother1->Get4Momentum(gamma1);
834  CbmMCTrack* mother2 = (CbmMCTrack*) fMcTracks->At(mctrack3->GetMotherId());
835  mother2->Get4Momentum(gamma2);
836  }
837  if (mctrack1->GetMotherId() == mctrack3->GetMotherId()
838  && mctrack2->GetMotherId() == mctrack4->GetMotherId()) {
839  CbmMCTrack* mother1 = (CbmMCTrack*) fMcTracks->At(mctrack1->GetMotherId());
840  mother1->Get4Momentum(gamma1);
841  CbmMCTrack* mother2 = (CbmMCTrack*) fMcTracks->At(mctrack2->GetMotherId());
842  mother2->Get4Momentum(gamma2);
843  }
844  if (mctrack1->GetMotherId() == mctrack4->GetMotherId()
845  && mctrack2->GetMotherId() == mctrack3->GetMotherId()) {
846  CbmMCTrack* mother1 = (CbmMCTrack*) fMcTracks->At(mctrack1->GetMotherId());
847  mother1->Get4Momentum(gamma1);
848  CbmMCTrack* mother2 = (CbmMCTrack*) fMcTracks->At(mctrack2->GetMotherId());
849  mother2->Get4Momentum(gamma2);
850  }
851 
852  Double_t angle = gamma1.Angle(gamma2.Vect());
853  openingAngle = 180. * angle / TMath::Pi();
854 
855  return openingAngle;
856 }
857 
858 
859 Double_t
861  TVector3 electron1,
862  TVector3 electron2,
863  TVector3 electron3,
864  TVector3 electron4) {
865  Double_t energy1 = TMath::Sqrt(electron1.Mag2() + M2E);
866  TLorentzVector lorVec1(electron1, energy1);
867 
868  Double_t energy2 = TMath::Sqrt(electron2.Mag2() + M2E);
869  TLorentzVector lorVec2(electron2, energy2);
870 
871  Double_t energy3 = TMath::Sqrt(electron3.Mag2() + M2E);
872  TLorentzVector lorVec3(electron3, energy3);
873 
874  Double_t energy4 = TMath::Sqrt(electron4.Mag2() + M2E);
875  TLorentzVector lorVec4(electron4, energy4);
876 
877  TLorentzVector lorPhoton1 = lorVec1 + lorVec2;
878  TLorentzVector lorPhoton2 = lorVec3 + lorVec4;
879 
880  Double_t angleBetweenPhotons = lorPhoton1.Angle(lorPhoton2.Vect());
881  Double_t theta = 180. * angleBetweenPhotons / TMath::Pi();
882 
883  return theta;
884 }
885 
886 
888  gDirectory->mkdir("Reconstruction");
889  gDirectory->cd("Reconstruction");
890 
891  gDirectory->mkdir("STS");
892  gDirectory->cd("STS");
893 
894  gDirectory->mkdir("STS_gg");
895  gDirectory->cd("STS_gg");
896  for (UInt_t i = 0; i < fHistoList_reco_STS_gg.size(); i++) {
897  fHistoList_reco_STS_gg[i]->Write();
898  }
899  gDirectory->cd("..");
900 
901  gDirectory->mkdir("STS_gee");
902  gDirectory->cd("STS_gee");
903  for (UInt_t i = 0; i < fHistoList_reco_STS_gee.size(); i++) {
904  fHistoList_reco_STS_gee[i]->Write();
905  }
906  gDirectory->cd("..");
907 
908  gDirectory->mkdir("STS_eeee");
909  gDirectory->cd("STS_eeee");
910  for (UInt_t i = 0; i < fHistoList_reco_STS_eeee.size(); i++) {
911  fHistoList_reco_STS_eeee[i]->Write();
912  }
913  gDirectory->cd("..");
914  gDirectory->cd("..");
915 
916  gDirectory->mkdir("STS_and_RICH");
917  gDirectory->cd("STS_and_RICH");
918 
919  gDirectory->mkdir("STS_and_RICH_gg");
920  gDirectory->cd("STS_and_RICH_gg");
921  for (UInt_t i = 0; i < fHistoList_reco_STS_and_RICH_gg.size(); i++) {
923  }
924  gDirectory->cd("..");
925 
926  gDirectory->mkdir("STS_and_RICH_gee");
927  gDirectory->cd("STS_and_RICH_gee");
928  for (UInt_t i = 0; i < fHistoList_reco_STS_and_RICH_gee.size(); i++) {
930  }
931  gDirectory->cd("..");
932 
933  gDirectory->mkdir("STS_and_RICH_eeee");
934  gDirectory->cd("STS_and_RICH_eeee");
935  for (UInt_t i = 0; i < fHistoList_reco_STS_and_RICH_eeee.size(); i++) {
937  }
938  gDirectory->cd("..");
939  gDirectory->cd("..");
940 
941  for (UInt_t i = 0; i < fHistoList_reco.size(); i++) {
942  fHistoList_reco[i]->Write();
943  }
944  gDirectory->cd("..");
945 }
946 
947 
949  ConversionPoints2D = new TH2D("ConversionPoints2D",
950  "Conversion Points 2D ; z [cm]; y [cm]",
951  200,
952  -1,
953  200,
954  300,
955  -150,
956  150);
958  ConversionPoints3D = new TH3D("ConversionPoints3D",
959  "Conversion Points 3D ; z [cm]; x [cm]; y [cm]",
960  200,
961  -1,
962  200,
963  300,
964  -150,
965  150,
966  300,
967  -150,
968  150);
970 
973  new TH1D("STS_InvMass_eeee_mc",
974  "STS_InvMass_eeee_mc; invariant mass in GeV/c^{2};#",
975  410,
976  -0.01,
977  0.4);
980  new TH1D("STS_InvMass_eeee_refitted",
981  "STS_InvMass_eeee_refitted; invariant mass in GeV/c^{2};#",
982  410,
983  -0.01,
984  0.4);
986 
989  new TH1D("STSRICH_InvMass_eeee_mc",
990  "STSRICH_InvMass_eeee_mc; invariant mass in GeV/c^{2};#",
991  410,
992  -0.01,
993  0.4);
996  new TH1D("STSRICH_InvMass_eeee_refitted",
997  "STSRICH_InvMass_eeee_refitted; invariant mass in GeV/c^{2};#",
998  410,
999  -0.01,
1000  0.4);
1002 
1005  new TH1D("STS_InvMass_gee_mc",
1006  "STS_InvMass_gee_mc; invariant mass in GeV/c^{2};#",
1007  410,
1008  -0.01,
1009  0.4);
1012  new TH1D("STS_InvMass_gee_refitted",
1013  "STS_InvMass_gee_refitted; invariant mass in GeV/c^{2};#",
1014  410,
1015  -0.01,
1016  0.4);
1019  new TH1D("STS_InvMass_realg_gee_reffited",
1020  "STS_InvMass_realg_gee_reffited; invariant mass in GeV/c^{2};#",
1021  110,
1022  -0.01,
1023  0.1);
1026  new TH1D("STS_InvMass_img_gee_refitted",
1027  "STS_InvMass_img_gee_refitted; invariant mass in GeV/c^{2};#",
1028  110,
1029  -0.01,
1030  0.1);
1032  STS_OpeningAngle_realg_gee_mc = new TH1D(
1033  "STS_OpeningAngle_realg_gee_mc",
1034  "STS_OpeningAngle_realg_gee_mc (between e+e- from #gamma); angle [deg];#",
1035  300,
1036  -0.1,
1037  29.9);
1040  new TH1D("STS_OpeningAngle_realg_gee_reffited",
1041  "STS_OpeningAngle_realg_gee_reffited (between e+e- from #gamma); "
1042  "angle [deg];#",
1043  300,
1044  -0.1,
1045  29.9);
1048  new TH1D("STS_OpeningAngle_img_gee_mc",
1049  "STS_OpeningAngle_img_gee_mc (between e+e- from imaginary "
1050  "#gamma); angle [deg];#",
1051  300,
1052  -0.1,
1053  29.9);
1056  new TH1D("STS_OpeningAngle_img_gee_reffited",
1057  "STS_OpeningAngle_img_gee_reffited (between e+e- from imaginary "
1058  "#gamma); angle [deg];#",
1059  300,
1060  -0.1,
1061  29.9);
1063 
1066  new TH1D("STSRICH_InvMass_gee_mc",
1067  "STSRICH_InvMass_gee_mc; invariant mass in GeV/c^{2};#",
1068  410,
1069  -0.01,
1070  0.4);
1073  new TH1D("STSRICH_InvMass_gee_refitted",
1074  "STSRICH_InvMass_gee_refitted; invariant mass in GeV/c^{2};#",
1075  410,
1076  -0.01,
1077  0.4);
1080  "STSRICH_InvMass_realg_gee_reffited",
1081  "STSRICH_InvMass_realg_gee_reffited; invariant mass in GeV/c^{2};#",
1082  110,
1083  -0.01,
1084  0.1);
1088  new TH1D("STSRICH_InvMass_img_gee_refitted",
1089  "STSRICH_InvMass_img_gee_refitted; invariant mass in GeV/c^{2};#",
1090  110,
1091  -0.01,
1092  0.1);
1095  new TH1D("STSRICH_OpeningAngle_realg_gee_mc",
1096  "STSRICH_OpeningAngle_realg_gee_mc (between e+e- from #gamma); "
1097  "angle [deg];#",
1098  300,
1099  -0.1,
1100  29.9);
1103  new TH1D("STSRICH_OpeningAngle_realg_gee_reffited",
1104  "STSRICH_OpeningAngle_realg_gee_reffited (between e+e- from "
1105  "#gamma); angle [deg];#",
1106  300,
1107  -0.1,
1108  29.9);
1112  new TH1D("STSRICH_OpeningAngle_img_gee_mc",
1113  "STSRICH_OpeningAngle_img_gee_mc (between e+e- from imaginary "
1114  "#gamma); angle [deg];#",
1115  300,
1116  -0.1,
1117  29.9);
1120  new TH1D("STSRICH_OpeningAngle_img_gee_reffited",
1121  "STSRICH_OpeningAngle_img_gee_reffited (between e+e- from "
1122  "imaginary #gamma); angle [deg];#",
1123  300,
1124  -0.1,
1125  29.9);
1128 
1131  new TH1D("STS_InvMass_gg_mc",
1132  "STS_InvMass_gg_mc; invariant mass in GeV/c^{2};#",
1133  410,
1134  -0.01,
1135  0.4);
1138  new TH1D("STS_InvMass_gg_reffited",
1139  "STS_InvMass_gg_reffited; invariant mass in GeV/c^{2};#",
1140  410,
1141  -0.01,
1142  0.4);
1145  new TH1D("STS_InvMass_realg_gg_mc",
1146  "STS_InvMass_realg_gg_mc; invariant mass in GeV/c^{2};#",
1147  110,
1148  -0.01,
1149  0.1);
1152  new TH1D("STS_InvMass_realg_gg_reffited",
1153  "STS_InvMass_realg_gg_reffited; invariant mass in GeV/c^{2};#",
1154  110,
1155  -0.01,
1156  0.1);
1158  STS_OpeningAngle_realg_gg_mc = new TH1D(
1159  "STS_OpeningAngle_realg_gg_mc",
1160  "STS_OpeningAngle_realg_gg_mc (between e+e- from #gamma); angle [deg];#",
1161  300,
1162  -0.1,
1163  29.9);
1166  new TH1D("STS_OpeningAngle_realg_gg_reffited",
1167  "STS_OpeningAngle_realg_gg_reffited (between e+e- from #gamma); "
1168  "angle [deg];#",
1169  300,
1170  -0.1,
1171  29.9);
1174  new TH1D("STS_OpeningAngle_between_gg_mc",
1175  "STS_OpeningAngle_between_gg_mc (between #gamma#gamma from "
1176  "#pi^{0}); angle [deg];#",
1177  300,
1178  -0.1,
1179  29.9);
1182  new TH1D("STS_OpeningAngle_between_gg_reffited",
1183  "STS_OpeningAngle_between_gg_reffited (between #gamma#gamma from "
1184  "#pi^{0}); angle [deg];#",
1185  300,
1186  -0.1,
1187  29.9);
1189 
1192  new TH1D("STSRICH_InvMass_gg_mc",
1193  "STSRICH_InvMass_gg_mc; invariant mass in GeV/c^{2};#",
1194  410,
1195  -0.01,
1196  0.4);
1199  new TH1D("STSRICH_InvMass_gg_reffited",
1200  "STSRICH_InvMass_gg_reffited; invariant mass in GeV/c^{2};#",
1201  410,
1202  -0.01,
1203  0.4);
1206  new TH1D("STSRICH_InvMass_realg_gg_mc",
1207  "STSRICH_InvMass_realg_gg_mc; invariant mass in GeV/c^{2};#",
1208  110,
1209  -0.01,
1210  0.1);
1213  new TH1D("STSRICH_InvMass_realg_gg_reffited",
1214  "STSRICH_InvMass_realg_gg_reffited; invariant mass in GeV/c^{2};#",
1215  110,
1216  -0.01,
1217  0.1);
1220  new TH1D("STSRICH_OpeningAngle_realg_gg_mc",
1221  "STSRICH_OpeningAngle_realg_gg_mc (between e+e- from #gamma); "
1222  "angle [deg];#",
1223  300,
1224  -0.1,
1225  29.9);
1228  new TH1D("STSRICH_OpeningAngle_realg_gg_reffited",
1229  "STSRICH_OpeningAngle_realg_gg_reffited (between e+e- from "
1230  "#gamma); angle [deg];#",
1231  300,
1232  -0.1,
1233  29.9);
1237  new TH1D("STSRICH_OpeningAngle_between_gg_mc",
1238  "STSRICH_OpeningAngle_between_gg_mc (between #gamma#gamma from "
1239  "#pi^{0}); angle [deg];#",
1240  300,
1241  -0.1,
1242  29.9);
1245  new TH1D("STSRICH_OpeningAngle_between_gg_reffited",
1246  "STSRICH_OpeningAngle_between_gg_reffited (between #gamma#gamma "
1247  "from #pi^{0}); angle [deg];#",
1248  300,
1249  -0.1,
1250  29.9);
1253 }
CbmKresConversionReconstruction::STS_InvMass_gg_mc
TH1D * STS_InvMass_gg_mc
Definition: CbmKresConversionReconstruction.h:99
CbmMCTrack::GetMotherId
Int_t GetMotherId() const
Definition: CbmMCTrack.h:71
CbmMatch::GetMatchedLink
const CbmLink & GetMatchedLink() const
Definition: CbmMatch.h:37
CbmMCTrack::GetMass
Double_t GetMass() const
Mass of the associated particle.
Definition: CbmMCTrack.cxx:114
CbmKresConversionReconstruction::Init
void Init()
Definition: CbmKresConversionReconstruction.cxx:97
CbmMCTrack::GetStartX
Double_t GetStartX() const
Definition: CbmMCTrack.h:75
CbmKresConversionReconstruction::STSRICH_InvMass_gg_reffited
TH1D * STSRICH_InvMass_gg_reffited
Definition: CbmKresConversionReconstruction.h:109
CbmKresConversionReconstruction::ConversionPoints3D
TH3D * ConversionPoints3D
Definition: CbmKresConversionReconstruction.h:65
CbmKresConversionReconstruction::Exec
void Exec(int fEventNumRec)
Definition: CbmKresConversionReconstruction.cxx:137
CbmMatch::GetNofLinks
Int_t GetNofLinks() const
Definition: CbmMatch.h:38
CbmKresConversionReconstruction::STS_and_RICH_MCtrack
vector< CbmMCTrack * > STS_and_RICH_MCtrack
Definition: CbmKresConversionReconstruction.h:59
CbmKresConversionReconstruction::STS_InvMass_realg_gg_reffited
TH1D * STS_InvMass_realg_gg_reffited
Definition: CbmKresConversionReconstruction.h:102
CbmKresConversionReconstruction::CalculateOpeningAngleBetweenGammas_Reco
Double_t CalculateOpeningAngleBetweenGammas_Reco(TVector3 electron1, TVector3 electron2, TVector3 electron3, TVector3 electron4)
Definition: CbmKresConversionReconstruction.cxx:860
CbmKresConversionReconstruction::STSRICH_InvMass_img_gee_refitted
TH1D * STSRICH_InvMass_img_gee_refitted
Definition: CbmKresConversionReconstruction.h:93
CbmKresConversionReconstruction::STSRICH_OpeningAngle_realg_gg_reffited
TH1D * STSRICH_OpeningAngle_realg_gg_reffited
Definition: CbmKresConversionReconstruction.h:113
CbmKresConversionReconstruction::STS_OpeningAngle_realg_gg_reffited
TH1D * STS_OpeningAngle_realg_gg_reffited
Definition: CbmKresConversionReconstruction.h:104
CbmKresConversionReconstruction::InitHistograms
void InitHistograms()
Definition: CbmKresConversionReconstruction.cxx:948
CbmGlobalTrack::GetRichRingIndex
Int_t GetRichRingIndex() const
Definition: CbmGlobalTrack.h:41
CbmKresConversionReconstruction::STSRICH_InvMass_realg_gg_reffited
TH1D * STSRICH_InvMass_realg_gg_reffited
Definition: CbmKresConversionReconstruction.h:111
CbmMCTrack::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMCTrack.h:70
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmKresConversionReconstruction::ConversionPoints2D
TH2D * ConversionPoints2D
Definition: CbmKresConversionReconstruction.h:64
CbmGlobalTrack.h
CbmKresConversionReconstruction::fHistoList_reco_STS_and_RICH_gg
vector< TH1 * > fHistoList_reco_STS_and_RICH_gg
Definition: CbmKresConversionReconstruction.h:68
CbmRichRing
Definition: CbmRichRing.h:17
CbmKresConversionReconstruction::STS_InvMass_eeee_refitted
TH1D * STS_InvMass_eeee_refitted
Definition: CbmKresConversionReconstruction.h:76
CbmKresConversionReconstruction::STS_InvMass_realg_gee_reffited
TH1D * STS_InvMass_realg_gee_reffited
Definition: CbmKresConversionReconstruction.h:83
CbmKresConversionReconstruction::STS_OpeningAngle_img_gee_mc
TH1D * STS_OpeningAngle_img_gee_mc
Definition: CbmKresConversionReconstruction.h:87
CbmRichRing.h
CbmKresConversionReconstruction::STS_Id
vector< Int_t > STS_Id
Definition: CbmKresConversionReconstruction.h:56
CbmKresConversionReconstruction::STS_OpeningAngle_between_gg_reffited
TH1D * STS_OpeningAngle_between_gg_reffited
Definition: CbmKresConversionReconstruction.h:106
CbmKresConversionReconstruction::fHistoList_reco_STS_gee
vector< TH1 * > fHistoList_reco_STS_gee
Definition: CbmKresConversionReconstruction.h:69
CbmKresConversionReconstruction::fHistoList_reco_STS_gg
vector< TH1 * > fHistoList_reco_STS_gg
Definition: CbmKresConversionReconstruction.h:67
CbmKresConversionReconstruction::fRichRings
TClonesArray * fRichRings
Definition: CbmKresConversionReconstruction.h:51
CbmKresConversionReconstruction::STSRICH_OpeningAngle_between_gg_mc
TH1D * STSRICH_OpeningAngle_between_gg_mc
Definition: CbmKresConversionReconstruction.h:114
CbmKresConversionReconstruction::STS_and_RICH_refmomentum
vector< TVector3 > STS_and_RICH_refmomentum
Definition: CbmKresConversionReconstruction.h:58
CbmKresConversionReconstruction::fHistoList_reco_STS_eeee
vector< TH1 * > fHistoList_reco_STS_eeee
Definition: CbmKresConversionReconstruction.h:71
CbmMCTrack::GetStartZ
Double_t GetStartZ() const
Definition: CbmMCTrack.h:77
CbmKresConversionReconstruction::fStsTracks
TClonesArray * fStsTracks
Definition: CbmKresConversionReconstruction.h:49
M2E
#define M2E
Definition: CbmAnaJpsiKinematicParams.h:10
CbmKresConversionReconstruction::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmKresConversionReconstruction.h:48
CbmKresConversionReconstruction::STSRICH_OpeningAngle_img_gee_reffited
TH1D * STSRICH_OpeningAngle_img_gee_reffited
Definition: CbmKresConversionReconstruction.h:97
CbmKresConversionReconstruction::STS_OpeningAngle_img_gee_reffited
TH1D * STS_OpeningAngle_img_gee_reffited
Definition: CbmKresConversionReconstruction.h:88
CbmKresConversionReconstruction::STSRICH_OpeningAngle_img_gee_mc
TH1D * STSRICH_OpeningAngle_img_gee_mc
Definition: CbmKresConversionReconstruction.h:96
CbmStsTrack.h
Data class for STS tracks.
CbmGlobalTrack::GetStsTrackIndex
Int_t GetStsTrackIndex() const
Definition: CbmGlobalTrack.h:38
CbmKresConversionReconstruction::STSRICH_OpeningAngle_realg_gg_mc
TH1D * STSRICH_OpeningAngle_realg_gg_mc
Definition: CbmKresConversionReconstruction.h:112
CbmKresFunctions::NofDaughters
static int NofDaughters(int motherId, vector< CbmMCTrack * > MC)
Definition: CbmKresFunctions.h:168
CbmKresConversionReconstruction::STSRICH_InvMass_eeee_refitted
TH1D * STSRICH_InvMass_eeee_refitted
Definition: CbmKresConversionReconstruction.h:78
CbmKresConversionReconstruction::STSRICH_InvMass_eeee_mc
TH1D * STSRICH_InvMass_eeee_mc
Definition: CbmKresConversionReconstruction.h:77
CbmKresConversionReconstruction::STS_InvMass_realg_gg_mc
TH1D * STS_InvMass_realg_gg_mc
Definition: CbmKresConversionReconstruction.h:101
CbmKresConversionReconstruction::STSRICH_OpeningAngle_realg_gee_reffited
TH1D * STSRICH_OpeningAngle_realg_gee_reffited
Definition: CbmKresConversionReconstruction.h:95
CbmKresConversionReconstruction::STS_InvMass_gg_reffited
TH1D * STS_InvMass_gg_reffited
Definition: CbmKresConversionReconstruction.h:100
CbmKresConversionReconstruction::STSRICH_InvMass_realg_gee_reffited
TH1D * STSRICH_InvMass_realg_gee_reffited
Definition: CbmKresConversionReconstruction.h:92
CbmTrackMatchNew.h
CbmKresConversionReconstruction::STS_OpeningAngle_realg_gee_mc
TH1D * STS_OpeningAngle_realg_gee_mc
Definition: CbmKresConversionReconstruction.h:85
CbmKresFunctions::FitToVertex
static TVector3 FitToVertex(CbmStsTrack *stsTrack, double x, double y, double z)
Definition: CbmKresFunctions.h:29
CbmKresConversionReconstruction::STS_OpeningAngle_realg_gg_mc
TH1D * STS_OpeningAngle_realg_gg_mc
Definition: CbmKresConversionReconstruction.h:103
CbmKresConversionReconstruction::fHistoList_reco_STS_and_RICH_eeee
vector< TH1 * > fHistoList_reco_STS_and_RICH_eeee
Definition: CbmKresConversionReconstruction.h:72
xMath::Pi
double Pi()
Definition: xMath.h:5
CbmKresConversionReconstruction::STS_InvMass_gee_refitted
TH1D * STS_InvMass_gee_refitted
Definition: CbmKresConversionReconstruction.h:82
CbmKresConversionReconstruction::fMcTracks
TClonesArray * fMcTracks
Definition: CbmKresConversionReconstruction.h:47
CbmKresConversionReconstruction::STSRICH_InvMass_gee_mc
TH1D * STSRICH_InvMass_gee_mc
Definition: CbmKresConversionReconstruction.h:90
CbmKresConversionReconstruction::CalculateOpeningAngleBetweenGammas_MC
Double_t CalculateOpeningAngleBetweenGammas_MC(CbmMCTrack *mctrack1, CbmMCTrack *mctrack2, CbmMCTrack *mctrack3, CbmMCTrack *mctrack4)
Definition: CbmKresConversionReconstruction.cxx:821
CbmKresConversionReconstruction::CbmKresConversionReconstruction
CbmKresConversionReconstruction()
Definition: CbmKresConversionReconstruction.cxx:36
CbmKresFunctions::Invmass_2particles_RECO
static double Invmass_2particles_RECO(const TVector3 part1, const TVector3 part2)
Definition: CbmKresFunctions.h:107
CbmKresFunctions.h
CbmGlobalTrack
Definition: CbmGlobalTrack.h:26
CbmKresFunctions::CalculateOpeningAngle_MC
static Double_t CalculateOpeningAngle_MC(CbmMCTrack *mctrack1, CbmMCTrack *mctrack2)
Definition: CbmKresFunctions.h:267
CbmMCTrack::GetStartY
Double_t GetStartY() const
Definition: CbmMCTrack.h:76
CbmKresConversionReconstruction::Finish
void Finish()
Definition: CbmKresConversionReconstruction.cxx:887
CbmMCTrack.h
CbmKresConversionReconstruction::STS_InvMass_eeee_mc
TH1D * STS_InvMass_eeee_mc
Definition: CbmKresConversionReconstruction.h:75
CbmKresFunctions::Invmass_4particles_MC
static double Invmass_4particles_MC(const CbmMCTrack *mctrack1, const CbmMCTrack *mctrack2, const CbmMCTrack *mctrack3, const CbmMCTrack *mctrack4)
Definition: CbmKresFunctions.h:122
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmKresConversionReconstruction::fHistoList_reco_STS_and_RICH_gee
vector< TH1 * > fHistoList_reco_STS_and_RICH_gee
Definition: CbmKresConversionReconstruction.h:70
CbmKresConversionReconstruction::STSRICH_InvMass_gee_refitted
TH1D * STSRICH_InvMass_gee_refitted
Definition: CbmKresConversionReconstruction.h:91
CbmKresConversionReconstruction::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmKresConversionReconstruction.h:52
CbmKresConversionReconstruction::STSRICH_InvMass_realg_gg_mc
TH1D * STSRICH_InvMass_realg_gg_mc
Definition: CbmKresConversionReconstruction.h:110
CbmKresConversionReconstruction::STS_MCtrack
vector< CbmMCTrack * > STS_MCtrack
Definition: CbmKresConversionReconstruction.h:55
CbmKresConversionReconstruction::STS_refmomentum
vector< TVector3 > STS_refmomentum
Definition: CbmKresConversionReconstruction.h:54
CbmTrackMatchNew
Definition: CbmTrackMatchNew.h:19
CbmKresConversionReconstruction::STS_InvMass_gee_mc
TH1D * STS_InvMass_gee_mc
Definition: CbmKresConversionReconstruction.h:81
CbmMCTrack::Get4Momentum
void Get4Momentum(TLorentzVector &momentum) const
Definition: CbmMCTrack.h:177
CbmKresConversionReconstruction::fHistoList_reco
vector< TH1 * > fHistoList_reco
Definition: CbmKresConversionReconstruction.h:63
CbmKresConversionReconstruction::STSRICH_OpeningAngle_realg_gee_mc
TH1D * STSRICH_OpeningAngle_realg_gee_mc
Definition: CbmKresConversionReconstruction.h:94
CbmKresConversionReconstruction::fStsTrackMatches
TClonesArray * fStsTrackMatches
Definition: CbmKresConversionReconstruction.h:50
CbmKresConversionReconstruction::MakeRecoAnalysis
void MakeRecoAnalysis(vector< TVector3 > RefMom, vector< CbmMCTrack * > MC, vector< Int_t > Id, vector< TH1 * > gg, vector< TH1 * > gee, vector< TH1 * > eeee)
Definition: CbmKresConversionReconstruction.cxx:248
CbmStsTrack
Definition: CbmStsTrack.h:37
CbmKresFunctions::CalculateOpeningAngle_Reco
static Double_t CalculateOpeningAngle_Reco(TVector3 electron1, TVector3 electron2)
Definition: CbmKresFunctions.h:251
CbmKresConversionReconstruction::STS_InvMass_img_gee_refitted
TH1D * STS_InvMass_img_gee_refitted
Definition: CbmKresConversionReconstruction.h:84
CbmKresConversionReconstruction::~CbmKresConversionReconstruction
virtual ~CbmKresConversionReconstruction()
Definition: CbmKresConversionReconstruction.cxx:95
CbmKresFunctions::Invmass_2particles_MC
static double Invmass_2particles_MC(const CbmMCTrack *mctrack1, const CbmMCTrack *mctrack2)
Definition: CbmKresFunctions.h:92
CbmKresConversionReconstruction.h
CbmKresConversionReconstruction::STS_and_RICH_Id
vector< Int_t > STS_and_RICH_Id
Definition: CbmKresConversionReconstruction.h:60
CbmKresConversionReconstruction::STS_OpeningAngle_between_gg_mc
TH1D * STS_OpeningAngle_between_gg_mc
Definition: CbmKresConversionReconstruction.h:105
CbmKresConversionReconstruction::STSRICH_InvMass_gg_mc
TH1D * STSRICH_InvMass_gg_mc
Definition: CbmKresConversionReconstruction.h:108
CbmKresFunctions::Invmass_4particles_RECO
static double Invmass_4particles_RECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
Definition: CbmKresFunctions.h:145
CbmKresConversionReconstruction::STS_OpeningAngle_realg_gee_reffited
TH1D * STS_OpeningAngle_realg_gee_reffited
Definition: CbmKresConversionReconstruction.h:86
CbmKresConversionReconstruction::STSRICH_OpeningAngle_between_gg_reffited
TH1D * STSRICH_OpeningAngle_between_gg_reffited
Definition: CbmKresConversionReconstruction.h:115