CbmRoot
PairAnalysisMC.cxx
Go to the documentation of this file.
1 // //
3 // //
4 // Authors: //
5 // * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
6 // Julian Book <Julian.Book@cern.ch>
7 /*
8 
9  Finds signal in the MC stack that are defined via PairAnalysisSignalMC
10 
11  */
12 // //
14 
15 
16 #include <TClonesArray.h>
17 #include <TMCProcess.h>
18 #include <TPDGCode.h>
19 #include <TParticle.h>
20 
21 #include "CbmMCTrack.h"
22 #include "FairRootManager.h"
23 
24 #include "PairAnalysisMC.h"
25 #include "PairAnalysisSignalMC.h"
26 #include "PairAnalysisTrack.h"
27 
28 
30 
32 
33 //____________________________________________________________
35  //
36  // return pointer to singleton implementation
37  //
38  if (fgInstance) return fgInstance;
39 
40  fgInstance = new PairAnalysisMC();
41  // fgInstance->SetHasMC(kTRUE);
42 
43  return fgInstance;
44 }
45 
46 //____________________________________________________________
48  : fMCEvent(0x0), fHasMC(kFALSE), fMCArray(0x0) {
49  //
50  // default constructor
51  //
52 }
53 
54 
55 //____________________________________________________________
57  //
58  // default destructor
59  //
60 }
61 
62 //____________________________________________________________
64  //
65  // return the number of generated tracks from MC event
66  //
67  if (!fMCArray) {
68  Error("PairAnalysisMC::", "No fMCArray");
69  return 0;
70  }
71  return fMCArray->GetEntriesFast();
72 }
73 
74 //____________________________________________________________
76  //
77  // return MC track directly from MC event
78  // used not only for tracks but for mothers as well, therefore do not use abs(label)
79  //
80  if (label < 0) return NULL;
81  if (!fMCArray) {
82  Error("PairAnalysisMC::", "No fMCArray");
83  return NULL;
84  }
85 
86  if (label > fMCArray->GetEntriesFast()) {
87  Info("PairAnalysisMC::",
88  "track %d out of array size %d",
89  label,
90  fMCArray->GetEntriesFast());
91  return NULL;
92  }
93 
94  CbmMCTrack* track = static_cast<CbmMCTrack*>(
95  fMCArray->UncheckedAt(label)); // tracks from MC event
96  // CbmMCTrack *track = static_cast<CbmMCTrack*>( fMCArray->At(label) ); // tracks from MC event
97  return track;
98 }
99 
100 //____________________________________________________________
102  //
103  // connect MC array of tracks
104  //
105 
106  fMCArray = 0x0;
107  fMCEvent = 0x0;
108 
109  FairRootManager* man = FairRootManager::Instance();
110  if (!man) { Fatal("PairAnalysisMC::Instance", "No FairRootManager!"); }
111 
112  fMCArray = dynamic_cast<TClonesArray*>(man->GetObject("MCTrack"));
113  if (!fMCArray) {
114  Error("PairAnalysisMC::Instance", "Initialization of MC object failed!");
115  return kFALSE;
116  } else
117  fHasMC = kTRUE;
118  // printf("PairAnalysisMC::ConnectMCEvent: size of mc array: %04d \n",fMCArray->GetSize());
119  return kTRUE;
120 }
121 
122 
123 //____________________________________________________________
125  //
126  // return MC track
127  //
128  return (_track->GetMCTrack());
129 }
130 
131 //______________________________________________________________
133  //
134  // return MC track mother
135  //
136  CbmMCTrack* mcpart = GetMCTrack(_track);
137  if (!mcpart) return NULL;
138  return (GetMCTrackMother(mcpart));
139 }
140 
141 //____________________________________________________________
143  //
144  // return MC track mother
145  //
146  if (_particle->GetMotherId() < 0) return NULL;
147  CbmMCTrack* mcmother =
148  dynamic_cast<CbmMCTrack*>(fMCArray->At(_particle->GetMotherId()));
149  return mcmother;
150 }
151 
152 
153 //________________________________________________________
155  //
156  // return PDG code of the mother track from the MC truth info
157  //
158  CbmMCTrack* mcmother = GetMCTrackMother(_track);
159  if (!mcmother) return -99999;
160  return mcmother->GetPdgCode();
161 }
162 
163 //________________________________________________________
165  //
166  // return PDG code of the mother track from the MC truth info
167  //
168  if (!_track) return -99999;
169  CbmMCTrack* mcmother = GetMCTrackMother(_track);
170  if (!mcmother) return -99999;
171  return mcmother->GetPdgCode();
172 }
173 
174 //____________________________________________________________
176  //
177  // returns the number of daughters
178  //
179  CbmMCTrack* mcmother = GetMCTrackMother(particle);
180  if (!mcmother) return -9999;
181  return 0; //TODO: maybe request number of daughters or remove function
182  //mcmother->GetNDaughters();
183 }
184 
185 //____________________________________________________________
187  const PairAnalysisTrack* particle2,
188  Int_t pdgMother) {
189  //
190  // test if mother of particle 1 and 2 has pdgCode pdgMother and is the same;
191  //
192  if (!fMCArray) return -1;
193  CbmMCTrack* mcPart1 = particle1->GetMCTrack();
194  CbmMCTrack* mcPart2 = particle2->GetMCTrack();
195  if (!mcPart1 || !mcPart2) return -1;
196 
197  // get mother
198  Int_t lblMother1 = mcPart1->GetMotherId();
199  Int_t lblMother2 = mcPart2->GetMotherId();
200  if (lblMother1 != lblMother2) return -1;
201  CbmMCTrack* mcMother1 = GetMCTrackFromMCEvent(lblMother1);
202  if (!mcMother1) return -1;
203 
204  // compare mc truth with expectation
205  if (TMath::Abs(mcPart1->GetPdgCode()) != particle1->PdgCode()) return -1;
206  if (TMath::Abs(mcPart2->GetPdgCode()) != particle2->PdgCode()) return -1;
207  // if (mcPart1->GetPdgCode()!=-mcPart2->GetPdgCode()) return -1;
208  if (mcMother1->GetPdgCode() != pdgMother) return -1;
209 
210  return lblMother1;
211 }
212 
213 //____________________________________________________________
214 void PairAnalysisMC::GetDaughters(const TObject* /*mother*/,
215  CbmMCTrack*& d1,
216  CbmMCTrack*& d2) {
217  //
218  // Get First two daughters of the mother
219  // TODO: theres NO connection from mother to daughters
220  // Int_t lblD1=-1;
221  // Int_t lblD2=-1;
222  d1 = 0;
223  d2 = 0;
224  if (!fMCArray) return;
225  return; // TOBEDONE
226  /*
227  const CbmMCTrack *mom=static_cast<const CbmMCTrack*>(mother);
228  lblD1=mom->GetDaughter(0);
229  lblD2=mom->GetDaughter(1);
230  d1 = (CbmMCTrack*)fMCArray->At(lblD1);
231  d2 = (CbmMCTrack*)fMCArray->At(lblD2);
232  */
233 }
234 
235 
236 //________________________________________________________________________________
237 Int_t PairAnalysisMC::GetMothersLabel(Int_t daughterLabel) const {
238  //
239  // Get the label of the mother for particle with label daughterLabel
240  // NOTE: for tracks, the absolute label should be passed
241  //
242  if (daughterLabel < 0) return -1;
243  if (!fMCArray) return -1;
244  if (GetMCTrackFromMCEvent(daughterLabel))
245  return (GetMCTrackFromMCEvent(daughterLabel))->GetMotherId();
246  return -1;
247 }
248 
249 
250 //________________________________________________________________________________
251 Int_t PairAnalysisMC::GetPdgFromLabel(Int_t label) const {
252  //
253  // Get particle code using the label from stack
254  // NOTE: for tracks, the absolute label should be passed
255  //
256  if (label < 0) return 0;
257  if (!fMCArray) return 0;
258  return (GetMCTrackFromMCEvent(label)->GetPdgCode());
259  return 0;
260 }
261 
262 
263 //________________________________________________________________________________
264 Bool_t PairAnalysisMC::ComparePDG(Int_t particlePDG,
265  Int_t requiredPDG,
266  Bool_t pdgExclusion,
267  Bool_t checkBothCharges) const {
268  //
269  // Test the PDG codes of particles with the required ones
270  //
271  Bool_t result = kTRUE;
272  Int_t absRequiredPDG = TMath::Abs(requiredPDG);
273 
274  switch (absRequiredPDG) {
275  case 0:
276  result = kTRUE; // PDG not required (any code will do fine)
277  break;
278  case 100: // light flavoured mesons
279  if (checkBothCharges)
280  result =
281  TMath::Abs(particlePDG) >= 100 && TMath::Abs(particlePDG) <= 199;
282  else {
283  if (requiredPDG > 0) result = particlePDG >= 100 && particlePDG <= 199;
284  if (requiredPDG < 0)
285  result = particlePDG >= -199 && particlePDG <= -100;
286  }
287  break;
288  case 1000: // light flavoured baryons
289  if (checkBothCharges)
290  result =
291  TMath::Abs(particlePDG) >= 1000 && TMath::Abs(particlePDG) <= 1999;
292  else {
293  if (requiredPDG > 0)
294  result = particlePDG >= 1000 && particlePDG <= 1999;
295  if (requiredPDG < 0)
296  result = particlePDG >= -1999 && particlePDG <= -1000;
297  }
298  break;
299  case 200: // light flavoured mesons
300  if (checkBothCharges)
301  result =
302  TMath::Abs(particlePDG) >= 200 && TMath::Abs(particlePDG) <= 299;
303  else {
304  if (requiredPDG > 0) result = particlePDG >= 200 && particlePDG <= 299;
305  if (requiredPDG < 0)
306  result = particlePDG >= -299 && particlePDG <= -200;
307  }
308  break;
309  case 2000: // light flavoured baryons
310  if (checkBothCharges)
311  result =
312  TMath::Abs(particlePDG) >= 2000 && TMath::Abs(particlePDG) <= 2999;
313  else {
314  if (requiredPDG > 0)
315  result = particlePDG >= 2000 && particlePDG <= 2999;
316  if (requiredPDG < 0)
317  result = particlePDG >= -2999 && particlePDG <= -2000;
318  }
319  break;
320  case 300: // all strange mesons
321  if (checkBothCharges)
322  result =
323  TMath::Abs(particlePDG) >= 300 && TMath::Abs(particlePDG) <= 399;
324  else {
325  if (requiredPDG > 0) result = particlePDG >= 300 && particlePDG <= 399;
326  if (requiredPDG < 0)
327  result = particlePDG >= -399 && particlePDG <= -300;
328  }
329  break;
330  case 3000: // all strange baryons
331  if (checkBothCharges)
332  result =
333  TMath::Abs(particlePDG) >= 3000 && TMath::Abs(particlePDG) <= 3999;
334  else {
335  if (requiredPDG > 0)
336  result = particlePDG >= 3000 && particlePDG <= 3999;
337  if (requiredPDG < 0)
338  result = particlePDG >= -3999 && particlePDG <= -3000;
339  }
340  break;
341  case 400: // all charmed mesons
342  if (checkBothCharges)
343  result =
344  TMath::Abs(particlePDG) >= 400 && TMath::Abs(particlePDG) <= 499;
345  else {
346  if (requiredPDG > 0) result = particlePDG >= 400 && particlePDG <= 499;
347  if (requiredPDG < 0)
348  result = particlePDG >= -499 && particlePDG <= -400;
349  }
350  break;
351  case 401: // open charm mesons
352  if (checkBothCharges)
353  result =
354  TMath::Abs(particlePDG) >= 400 && TMath::Abs(particlePDG) <= 439;
355  else {
356  if (requiredPDG > 0) result = particlePDG >= 400 && particlePDG <= 439;
357  if (requiredPDG < 0)
358  result = particlePDG >= -439 && particlePDG <= -400;
359  }
360  break;
361  case 402: // open charm mesons and baryons together
362  if (checkBothCharges)
363  result =
364  (TMath::Abs(particlePDG) >= 400 && TMath::Abs(particlePDG) <= 439)
365  || (TMath::Abs(particlePDG) >= 4000
366  && TMath::Abs(particlePDG) <= 4399);
367  else {
368  if (requiredPDG > 0)
369  result = (particlePDG >= 400 && particlePDG <= 439)
370  || (particlePDG >= 4000 && particlePDG <= 4399);
371  if (requiredPDG < 0)
372  result = (particlePDG >= -439 && particlePDG <= -400)
373  || (particlePDG >= -4399 && particlePDG <= -4000);
374  }
375  break;
376  case 403: // all charm hadrons
377  if (checkBothCharges)
378  result =
379  (TMath::Abs(particlePDG) >= 400 && TMath::Abs(particlePDG) <= 499)
380  || (TMath::Abs(particlePDG) >= 4000
381  && TMath::Abs(particlePDG) <= 4999);
382  else {
383  if (requiredPDG > 0)
384  result = (particlePDG >= 400 && particlePDG <= 499)
385  || (particlePDG >= 4000 && particlePDG <= 4999);
386  if (requiredPDG < 0)
387  result = (particlePDG >= -499 && particlePDG <= -400)
388  || (particlePDG >= -4999 && particlePDG <= -4000);
389  }
390  break;
391  case 4000: // all charmed baryons
392  if (checkBothCharges)
393  result =
394  TMath::Abs(particlePDG) >= 4000 && TMath::Abs(particlePDG) <= 4999;
395  else {
396  if (requiredPDG > 0)
397  result = particlePDG >= 4000 && particlePDG <= 4999;
398  if (requiredPDG < 0)
399  result = particlePDG >= -4999 && particlePDG <= -4000;
400  }
401  break;
402  case 4001: // open charm baryons
403  if (checkBothCharges)
404  result =
405  TMath::Abs(particlePDG) >= 4000 && TMath::Abs(particlePDG) <= 4399;
406  else {
407  if (requiredPDG > 0)
408  result = particlePDG >= 4000 && particlePDG <= 4399;
409  if (requiredPDG < 0)
410  result = particlePDG >= -4399 && particlePDG <= -4000;
411  }
412  break;
413  case 500: // all beauty mesons
414  if (checkBothCharges)
415  result =
416  TMath::Abs(particlePDG) >= 500 && TMath::Abs(particlePDG) <= 599;
417  else {
418  if (requiredPDG > 0) result = particlePDG >= 500 && particlePDG <= 599;
419  if (requiredPDG < 0)
420  result = particlePDG >= -599 && particlePDG <= -500;
421  }
422  break;
423  case 501: // open beauty mesons
424  if (checkBothCharges)
425  result =
426  TMath::Abs(particlePDG) >= 500 && TMath::Abs(particlePDG) <= 549;
427  else {
428  if (requiredPDG > 0) result = particlePDG >= 500 && particlePDG <= 549;
429  if (requiredPDG < 0)
430  result = particlePDG >= -549 && particlePDG <= -500;
431  }
432  break;
433  case 502: // open beauty mesons and baryons
434  if (checkBothCharges)
435  result =
436  (TMath::Abs(particlePDG) >= 500 && TMath::Abs(particlePDG) <= 549)
437  || (TMath::Abs(particlePDG) >= 5000
438  && TMath::Abs(particlePDG) <= 5499);
439  else {
440  if (requiredPDG > 0)
441  result = (particlePDG >= 500 && particlePDG <= 549)
442  || (particlePDG >= 5000 && particlePDG <= 5499);
443  if (requiredPDG < 0)
444  result = (particlePDG >= -549 && particlePDG <= -500)
445  || (particlePDG >= -5499 && particlePDG <= -5000);
446  }
447  break;
448  case 503: // all beauty hadrons
449  if (checkBothCharges)
450  result =
451  (TMath::Abs(particlePDG) >= 500 && TMath::Abs(particlePDG) <= 599)
452  || (TMath::Abs(particlePDG) >= 5000
453  && TMath::Abs(particlePDG) <= 5999);
454  else {
455  if (requiredPDG > 0)
456  result = (particlePDG >= 500 && particlePDG <= 599)
457  || (particlePDG >= 5000 && particlePDG <= 5999);
458  if (requiredPDG < 0)
459  result = (particlePDG >= -599 && particlePDG <= -500)
460  || (particlePDG >= -5999 && particlePDG <= -5000);
461  }
462  break;
463  case 5000: // all beauty baryons
464  if (checkBothCharges)
465  result =
466  TMath::Abs(particlePDG) >= 5000 && TMath::Abs(particlePDG) <= 5999;
467  else {
468  if (requiredPDG > 0)
469  result = particlePDG >= 5000 && particlePDG <= 5999;
470  if (requiredPDG < 0)
471  result = particlePDG >= -5999 && particlePDG <= -5000;
472  }
473  break;
474  case 5001: // open beauty baryons
475  if (checkBothCharges)
476  result =
477  TMath::Abs(particlePDG) >= 5000 && TMath::Abs(particlePDG) <= 5499;
478  else {
479  if (requiredPDG > 0)
480  result = particlePDG >= 5000 && particlePDG <= 5499;
481  if (requiredPDG < 0)
482  result = particlePDG >= -5499 && particlePDG <= -5000;
483  }
484  break;
485  case 902: // // open charm,beauty mesons and baryons together
486  if (checkBothCharges)
487  result =
488  (TMath::Abs(particlePDG) >= 400 && TMath::Abs(particlePDG) <= 439)
489  || (TMath::Abs(particlePDG) >= 4000
490  && TMath::Abs(particlePDG) <= 4399)
491  || (TMath::Abs(particlePDG) >= 500 && TMath::Abs(particlePDG) <= 549)
492  || (TMath::Abs(particlePDG) >= 5000
493  && TMath::Abs(particlePDG) <= 5499);
494  else {
495  if (requiredPDG > 0)
496  result = (particlePDG >= 400 && particlePDG <= 439)
497  || (particlePDG >= 4000 && particlePDG <= 4399)
498  || (particlePDG >= 500 && particlePDG <= 549)
499  || (particlePDG >= 5000 && particlePDG <= 5499);
500  if (requiredPDG < 0)
501  result = (particlePDG >= -439 && particlePDG <= -400)
502  || (particlePDG >= -4399 && particlePDG <= -4000)
503  || (particlePDG >= -549 && particlePDG <= -500)
504  || (particlePDG >= -5499 && particlePDG <= -5000);
505  }
506  break;
507  default: // all specific cases
508  if (checkBothCharges)
509  result = (absRequiredPDG == TMath::Abs(particlePDG));
510  else
511  result = (requiredPDG == particlePDG);
512  }
513 
514  if (absRequiredPDG != 0 && pdgExclusion) result = !result;
515  return result;
516 }
517 
518 //________________________________________________________________________________
520  TMCProcess process) const {
521  //
522  // Check the GEANT process for the particle
523  //
524  if (label < 0) return kFALSE;
525 
526  if (!fMCArray) return kFALSE;
527  UInt_t processID =
528  static_cast<CbmMCTrack*>(GetMCTrackFromMCEvent(label))->GetGeantProcessId();
529  // printf("process: id %d --> %s \n",processID,TMCProcessName[processID]);
530  return (process == processID);
531 }
532 
533 //________________________________________________________________________________
535  Int_t label,
536  PairAnalysisSignalMC::ESource source) const {
537  //
538  // Check the source for the particle
539  // NOTE: TODO: check and clarify different sources, UPDATE!
540  //
541 
542  UInt_t processID =
543  static_cast<CbmMCTrack*>(GetMCTrackFromMCEvent(label))->GetGeantProcessId();
544  // printf("process: id %d --> %s \n",processID,TMCProcessName[processID]);
545 
546  switch (source) {
547  case PairAnalysisSignalMC::kDontCare: return kTRUE; break;
549  // NOTE: This includes all physics event history (initial state particles,
550  // exchange bosons, quarks, di-quarks, strings, un-stable particles, final state particles)
551  // Only the final state particles make it to the detector!!
552  return (processID == kPPrimary);
553  break;
555  // particles which are created by the interaction of final state primaries with the detector
556  // or particles from strange weakly decaying particles (e.g. lambda, kaons, etc.)
557  return (!IsPhysicalPrimary(label, processID));
558  break;
560  // primary particles created in the collision which reach the detectors
561  // These would be:
562  // 1.) particles produced in the collision
563  // 2.) stable particles with respect to strong and electromagnetic interactions
564  // 3.) excludes initial state particles
565  // 4.) includes products of directly produced Sigma0 hyperon decay
566  // 5.) includes products of directly produced pi0 decays
567  // 6.) includes products of directly produced beauty hadron decays
568  return IsPhysicalPrimary(label, processID);
569  break;
571  // Primary particles which do not have any mother
572  // This is the case for:
573  // 1.) Initial state particles (the 2 protons in Pythia pp collisions)
574  // 2.) In some codes, with sudden freeze-out, all particles generated from the fireball are direct.
575  // There is no history for these particles.
576  // 3.) Certain particles added via MC generator cocktails (e.g. J/psi added to pythia MB events)
577  return (label >= 0 && GetMothersLabel(label) < 0);
578  break;
580  // secondary particle from weak decay
581  // or particles from strange weakly decaying particles (e.g. lambda, kaons, etc.)
582  return (IsSecondaryFromWeakDecay(label, processID));
583  break;
585  // secondary particle from material
586  return (IsSecondaryFromMaterial(label, processID));
587  break;
588  default: return kFALSE;
589  }
590  return kFALSE;
591 }
592 
593 //________________________________________________________________________________
595  Int_t label,
596  const PairAnalysisSignalMC* const signalMC) const {
597  //
598  // Check if the particle has a three body decay, one being a dalitz pdg
599  // NOTE: no information on # of daugthers available in CbmMCTrack
600 
601  // loop over the MC tracks
602  // for(Int_t ipart=0; ipart<fMCArray->GetEntriesFast(); ++ipart) { // super slow
603  for (Int_t ipart = label; ipart < label + 5;
604  ++ipart) { // embedded particles are sorted
605  CbmMCTrack* daughter =
606  static_cast<CbmMCTrack*>(GetMCTrackFromMCEvent(ipart));
607  if (!daughter) continue;
608  if (daughter->GetPdgCode() != signalMC->GetDalitzPdg()) continue;
609  if (daughter->GetMotherId() == label) return kTRUE;
610  }
611  return kFALSE;
612 }
613 
614 //________________________________________________________________________________
616  Int_t mLabel,
617  const PairAnalysisSignalMC* const signalMC) const {
618  //
619  // Check for the decision of the dalitz type request
620  //
621 
622  if (!signalMC) return kFALSE;
623 
624  if (signalMC->GetDalitz() == PairAnalysisSignalMC::kWhoCares) return kTRUE;
625 
626  Bool_t isDalitz = CheckIsDalitz(mLabel, signalMC);
627  if ((signalMC->GetDalitz() == PairAnalysisSignalMC::kIsDalitz) && !isDalitz)
628  return kFALSE;
629  if ((signalMC->GetDalitz() == PairAnalysisSignalMC::kIsNotDalitz) && isDalitz)
630  return kFALSE;
631 
632  return kTRUE;
633 }
634 
635 //________________________________________________________________________________
636 Bool_t PairAnalysisMC::IsMCTruth(Int_t label,
637  PairAnalysisSignalMC* signalMC,
638  Int_t branch) const {
639  //
640  // Check if the particle corresponds to the MC truth in signalMC in the branch specified
641  //
642 
643  if (label < 0) return kFALSE; // to be checked
644  // if(label<0) label *= -1;
645 
647  if (signalMC->IsSingleParticle() && branch > 1) return kFALSE;
648 
649  CbmMCTrack* part = GetMCTrackFromMCEvent(label);
650  if (!part) {
651  Error(
652  "PairAnalysisMC::", "Could not find MC particle with label %d", label);
653  return kFALSE;
654  }
655 
656  // check geant process if set
657  if (signalMC->GetCheckGEANTProcess()
658  && !CheckGEANTProcess(label, signalMC->GetGEANTProcess()))
659  return kFALSE;
660 
661 
662  // check the LEG
663  if (!ComparePDG(part->GetPdgCode(),
664  signalMC->GetLegPDG(branch),
665  signalMC->GetLegPDGexclude(branch),
666  signalMC->GetCheckBothChargesLegs(branch)))
667  return kFALSE;
668 
669 
670  // Check the source (primary, secondary, embedded) for the particle
671  if (!CheckParticleSource(label, signalMC->GetLegSource(branch)))
672  return kFALSE;
673 
674  // check the MOTHER
675  CbmMCTrack* mcMother = 0x0;
676  Int_t mLabel = -1;
677  if (signalMC->GetMotherPDG(branch) != 0
678  || signalMC->GetMotherSource(branch) != PairAnalysisSignalMC::kDontCare) {
679  mLabel = GetMothersLabel(label);
680  mcMother = GetMCTrackFromMCEvent(mLabel);
681 
682  if (!mcMother && !signalMC->GetMotherPDGexclude(branch)) return kFALSE;
683 
684  if (!ComparePDG((mcMother ? mcMother->GetPdgCode() : -99999),
685  signalMC->GetMotherPDG(branch),
686  signalMC->GetMotherPDGexclude(branch),
687  signalMC->GetCheckBothChargesMothers(branch)))
688  return kFALSE;
689  if (!CheckParticleSource(mLabel, signalMC->GetMotherSource(branch)))
690  return kFALSE;
691 
692  //check for dalitz decay
693  if (!CheckDalitzDecision(mLabel, signalMC)) return kFALSE;
694  }
695 
696  // check the GRANDMOTHER
697  CbmMCTrack* mcGrandMother = 0x0;
698  Int_t gmLabel = -1;
699  if (signalMC->GetGrandMotherPDG(branch) != 0
700  || signalMC->GetGrandMotherSource(branch)
702  if (mcMother) {
703  gmLabel = GetMothersLabel(mLabel);
704  mcGrandMother = GetMCTrackFromMCEvent(gmLabel);
705  }
706  if (!mcGrandMother && !signalMC->GetGrandMotherPDGexclude(branch))
707  return kFALSE;
708 
709  if (!ComparePDG((mcGrandMother ? mcGrandMother->GetPdgCode() : 0),
710  signalMC->GetGrandMotherPDG(branch),
711  signalMC->GetGrandMotherPDGexclude(branch),
712  signalMC->GetCheckBothChargesGrandMothers(branch)))
713  return kFALSE;
714  if (!CheckParticleSource(gmLabel, signalMC->GetGrandMotherSource(branch)))
715  return kFALSE;
716  }
717 
718  // check the GREAT GRANDMOTHER
719  CbmMCTrack* mcGreatGrandMother = 0x0;
720  Int_t ggmLabel = -1;
721  if(signalMC->GetGreatGrandMotherPDG(branch) !=0/* ||
722  signalMC->GetGreatGrandMotherSource(branch)!=PairAnalysisSignalMC::kDontCare
723  */) {
724  if (mcGrandMother) {
725  ggmLabel = GetMothersLabel(gmLabel);
726  mcGreatGrandMother = GetMCTrackFromMCEvent(ggmLabel);
727  }
728  if (!mcGreatGrandMother && !signalMC->GetGreatGrandMotherPDGexclude(branch))
729  return kFALSE;
730 
731  if (!ComparePDG((mcGreatGrandMother ? mcGreatGrandMother->GetPdgCode() : 0),
732  signalMC->GetGreatGrandMotherPDG(branch),
733  signalMC->GetGreatGrandMotherPDGexclude(branch),
734  signalMC->GetCheckBothChargesGreatGrandMothers(branch)))
735  return kFALSE;
736  // if( !CheckParticleSource(gmLabel, signalMC->GetGreatGrandMotherSource(branch))) return kFALSE;
737  }
738 
739  return kTRUE;
740 }
741 
742 //________________________________________________________________________________
744  PairAnalysisSignalMC* signalMC,
745  Int_t branch) const {
746  //
747  // Check if the particle corresponds to the MC truth in signalMC in the branch specified
748  //
749  return IsMCTruth(trk->GetLabel(), signalMC, branch);
750 }
751 
752 //________________________________________________________________________________
754  const PairAnalysisSignalMC* signalMC) const {
755  //
756  // Check if the pair corresponds to the MC truth in signalMC
757  //
758 
759  // legs (daughters)
760  const PairAnalysisTrack* mcD1 = pair->GetFirstDaughter();
761  const PairAnalysisTrack* mcD2 = pair->GetSecondDaughter();
762  Int_t labelD1 = (mcD1 ? mcD1->GetLabel() : -1);
763  Int_t labelD2 = (mcD2 ? mcD2->GetLabel() : -1);
764  Int_t d1Pdg = GetPdgFromLabel(labelD1);
765  Int_t d2Pdg = GetPdgFromLabel(labelD2);
766 
767  // check geant process if set
768  Bool_t processGEANT = kTRUE;
769  if (signalMC->GetCheckGEANTProcess()) {
770  if (!CheckGEANTProcess(labelD1, signalMC->GetGEANTProcess())
771  && !CheckGEANTProcess(labelD2, signalMC->GetGEANTProcess()))
772  return kFALSE;
773  }
774 
775  // mothers
776  CbmMCTrack* mcM1 = 0x0;
777  CbmMCTrack* mcM2 = 0x0;
778 
779  // grand-mothers
780  CbmMCTrack* mcG1 = 0x0;
781  CbmMCTrack* mcG2 = 0x0;
782 
783  // great grand-mothers
784  CbmMCTrack* mcGG1 = 0x0;
785  CbmMCTrack* mcGG2 = 0x0;
786 
787  // make direct(1-1 and 2-2) and cross(1-2 and 2-1) comparisons for the whole branch
788  Bool_t directTerm = kTRUE;
789  // daughters
790  directTerm = directTerm && mcD1
791  && ComparePDG(d1Pdg,
792  signalMC->GetLegPDG(1),
793  signalMC->GetLegPDGexclude(1),
794  signalMC->GetCheckBothChargesLegs(1))
795  && CheckParticleSource(labelD1, signalMC->GetLegSource(1));
796 
797  directTerm = directTerm && mcD2
798  && ComparePDG(d2Pdg,
799  signalMC->GetLegPDG(2),
800  signalMC->GetLegPDGexclude(2),
801  signalMC->GetCheckBothChargesLegs(2))
802  && CheckParticleSource(labelD2, signalMC->GetLegSource(2));
803 
804  // mothers
805  Int_t labelM1 = -1;
806  if (signalMC->GetMotherPDG(1) != 0
808  labelM1 = GetMothersLabel(labelD1);
809  if (labelD1 > -1 && labelM1 > -1) mcM1 = GetMCTrackFromMCEvent(labelM1);
810  directTerm = directTerm && (mcM1 || signalMC->GetMotherPDGexclude(1))
811  && ComparePDG((mcM1 ? mcM1->GetPdgCode() : -99999),
812  signalMC->GetMotherPDG(1),
813  signalMC->GetMotherPDGexclude(1),
814  signalMC->GetCheckBothChargesMothers(1))
815  && CheckParticleSource(labelM1, signalMC->GetMotherSource(1))
816  && CheckDalitzDecision(labelM1, signalMC);
817  }
818 
819  Int_t labelM2 = -1;
820  if (signalMC->GetMotherPDG(2) != 0
822  labelM2 = GetMothersLabel(labelD2);
823  if (labelD2 > -1 && labelM2 > -1) mcM2 = GetMCTrackFromMCEvent(labelM2);
824  directTerm = directTerm && (mcM2 || signalMC->GetMotherPDGexclude(2))
825  && ComparePDG((mcM2 ? mcM2->GetPdgCode() : -99999),
826  signalMC->GetMotherPDG(2),
827  signalMC->GetMotherPDGexclude(2),
828  signalMC->GetCheckBothChargesMothers(2))
829  && CheckParticleSource(labelM2, signalMC->GetMotherSource(2))
830  && CheckDalitzDecision(labelM2, signalMC);
831  }
832 
833  // grand-mothers
834  Int_t labelG1 = -1;
835  if (signalMC->GetGrandMotherPDG(1) != 0
837  labelG1 = GetMothersLabel(labelM1);
838  if (mcM1 && labelG1 > -1) mcG1 = GetMCTrackFromMCEvent(labelG1);
839  directTerm =
840  directTerm && (mcG1 || signalMC->GetGrandMotherPDGexclude(1))
841  && ComparePDG((mcG1 ? mcG1->GetPdgCode() : 0),
842  signalMC->GetGrandMotherPDG(1),
843  signalMC->GetGrandMotherPDGexclude(1),
844  signalMC->GetCheckBothChargesGrandMothers(1))
845  && CheckParticleSource(labelG1, signalMC->GetGrandMotherSource(1));
846  }
847 
848  Int_t labelG2 = -1;
849  if (signalMC->GetGrandMotherPDG(2) != 0
851  labelG2 = GetMothersLabel(labelM2);
852  if (mcM2 && labelG2 > -1) mcG2 = GetMCTrackFromMCEvent(labelG2);
853  directTerm =
854  directTerm && (mcG2 || signalMC->GetGrandMotherPDGexclude(2))
855  && ComparePDG((mcG2 ? mcG2->GetPdgCode() : 0),
856  signalMC->GetGrandMotherPDG(2),
857  signalMC->GetGrandMotherPDGexclude(2),
858  signalMC->GetCheckBothChargesGrandMothers(2))
859  && CheckParticleSource(labelG2, signalMC->GetGrandMotherSource(2));
860  }
861 
862  // great grand-mothers
863  Int_t labelGG1 = -1;
864  if (
865  signalMC->GetGreatGrandMotherPDG(1) != 0
866  /* || signalMC->GetGreatGrandMotherSource(1)!=PairAnalysisSignalMC::kDontCare*/) {
867  labelGG1 = GetMothersLabel(labelG1);
868  if (mcG1 && labelGG1 > -1) mcGG1 = GetMCTrackFromMCEvent(labelGG1);
869  directTerm =
870  directTerm && (mcGG1 || signalMC->GetGreatGrandMotherPDGexclude(1))
871  && ComparePDG((mcGG1 ? mcGG1->GetPdgCode() : 0),
872  signalMC->GetGreatGrandMotherPDG(1),
873  signalMC->GetGreatGrandMotherPDGexclude(1),
875  // && CheckParticleSource(labelGG1, signalMC->GetGreatGrandMotherSource(1));
876  }
877 
878  Int_t labelGG2 = -1;
879  if (
880  signalMC->GetGreatGrandMotherPDG(2) != 0
881  /* || signalMC->GetGreatGrandMotherSource(2)!=PairAnalysisSignalMC::kDontCare*/) {
882  labelGG2 = GetMothersLabel(labelG2);
883  if (mcG2 && labelGG2 > -1) mcGG2 = GetMCTrackFromMCEvent(labelGG2);
884  directTerm =
885  directTerm && (mcGG2 || signalMC->GetGreatGrandMotherPDGexclude(2))
886  && ComparePDG((mcGG2 ? mcGG2->GetPdgCode() : 0),
887  signalMC->GetGreatGrandMotherPDG(2),
888  signalMC->GetGreatGrandMotherPDGexclude(2),
890  // && CheckParticleSource(labelG2, signalMC->GetGreatGrandMotherSource(2));
891  }
892 
893  // Cross term
894  Bool_t crossTerm = kTRUE;
895  // daughters
896  crossTerm = crossTerm && mcD2
897  && ComparePDG(d2Pdg,
898  signalMC->GetLegPDG(1),
899  signalMC->GetLegPDGexclude(1),
900  signalMC->GetCheckBothChargesLegs(1))
901  && CheckParticleSource(labelD2, signalMC->GetLegSource(1));
902 
903  crossTerm = crossTerm && mcD1
904  && ComparePDG(d1Pdg,
905  signalMC->GetLegPDG(2),
906  signalMC->GetLegPDGexclude(2),
907  signalMC->GetCheckBothChargesLegs(2))
908  && CheckParticleSource(labelD1, signalMC->GetLegSource(2));
909 
910  // mothers
911  if (signalMC->GetMotherPDG(1) != 0
913  if (!mcM2 && labelD2 > -1) {
914  labelM2 = GetMothersLabel(labelD2);
915  if (labelM2 > -1) mcM2 = GetMCTrackFromMCEvent(labelM2);
916  }
917  crossTerm = crossTerm && (mcM2 || signalMC->GetMotherPDGexclude(1))
918  && ComparePDG((mcM2 ? mcM2->GetPdgCode() : -99999),
919  signalMC->GetMotherPDG(1),
920  signalMC->GetMotherPDGexclude(1),
921  signalMC->GetCheckBothChargesMothers(1))
922  && CheckParticleSource(labelM2, signalMC->GetMotherSource(1))
923  && CheckDalitzDecision(labelM2, signalMC);
924  }
925 
926  if (signalMC->GetMotherPDG(2) != 0
928  if (!mcM1 && labelD1 > -1) {
929  labelM1 = GetMothersLabel(labelD1);
930  if (labelM1 > -1) mcM1 = GetMCTrackFromMCEvent(labelM1);
931  }
932  crossTerm = crossTerm && (mcM1 || signalMC->GetMotherPDGexclude(2))
933  && ComparePDG((mcM1 ? mcM1->GetPdgCode() : -99999),
934  signalMC->GetMotherPDG(2),
935  signalMC->GetMotherPDGexclude(2),
936  signalMC->GetCheckBothChargesMothers(2))
937  && CheckParticleSource(labelM1, signalMC->GetMotherSource(2))
938  && CheckDalitzDecision(labelM1, signalMC);
939  }
940 
941  // grand-mothers
942  if (signalMC->GetGrandMotherPDG(1) != 0
944  if (!mcG2 && mcM2) {
945  labelG2 = GetMothersLabel(labelM2);
946  if (labelG2 > -1) mcG2 = GetMCTrackFromMCEvent(labelG2);
947  }
948  crossTerm =
949  crossTerm && (mcG2 || signalMC->GetGrandMotherPDGexclude(1))
950  && ComparePDG((mcG2 ? mcG2->GetPdgCode() : 0),
951  signalMC->GetGrandMotherPDG(1),
952  signalMC->GetGrandMotherPDGexclude(1),
953  signalMC->GetCheckBothChargesGrandMothers(1))
954  && CheckParticleSource(labelG2, signalMC->GetGrandMotherSource(1));
955  }
956 
957  if (signalMC->GetGrandMotherPDG(2) != 0
959  if (!mcG1 && mcM1) {
960  labelG1 = GetMothersLabel(labelM1);
961  if (labelG1 > -1) mcG1 = GetMCTrackFromMCEvent(labelG1);
962  }
963  crossTerm =
964  crossTerm && (mcG1 || signalMC->GetGrandMotherPDGexclude(2))
965  && ComparePDG((mcG1 ? mcG1->GetPdgCode() : 0),
966  signalMC->GetGrandMotherPDG(2),
967  signalMC->GetGrandMotherPDGexclude(2),
968  signalMC->GetCheckBothChargesGrandMothers(2))
969  && CheckParticleSource(labelG1, signalMC->GetGrandMotherSource(2));
970  }
971 
972  // great grand-mothers
973  if (
974  signalMC->GetGreatGrandMotherPDG(1) != 0
975  /*|| signalMC->GetGreatGrandMotherSource(1)!=PairAnalysisSignalMC::kDontCare*/) {
976  if (!mcGG2 && mcG2) {
977  labelGG2 = GetMothersLabel(labelG2);
978  if (labelGG2 > -1) mcGG2 = GetMCTrackFromMCEvent(labelGG2);
979  }
980  crossTerm =
981  crossTerm && (mcGG2 || signalMC->GetGreatGrandMotherPDGexclude(1))
982  && ComparePDG((mcGG2 ? mcGG2->GetPdgCode() : 0),
983  signalMC->GetGreatGrandMotherPDG(1),
984  signalMC->GetGreatGrandMotherPDGexclude(1),
986  // && CheckParticleSource(labelG2, signalMC->GetGreatGrandMotherSource(1));
987  }
988 
989  if (
990  signalMC->GetGreatGrandMotherPDG(2) != 0
991  /* || signalMC->GetGreatGrandMotherSource(2)!=PairAnalysisSignalMC::kDontCare*/) {
992  if (!mcGG1 && mcG1) {
993  labelGG1 = GetMothersLabel(labelG1);
994  if (labelGG1 > -1) mcGG1 = GetMCTrackFromMCEvent(labelGG1);
995  }
996  crossTerm =
997  crossTerm && (mcGG1 || signalMC->GetGreatGrandMotherPDGexclude(2))
998  && ComparePDG((mcGG1 ? mcGG1->GetPdgCode() : 0),
999  signalMC->GetGreatGrandMotherPDG(2),
1000  signalMC->GetGreatGrandMotherPDGexclude(2),
1002  // && CheckParticleSource(labelG1, signalMC->GetGreatGrandMotherSource(2));
1003  }
1004 
1005  Bool_t motherRelation = kTRUE;
1006  if (signalMC->GetMothersRelation() == PairAnalysisSignalMC::kSame) {
1007  motherRelation = motherRelation && HaveSameMother(pair);
1008  }
1010  motherRelation = motherRelation && !HaveSameMother(pair);
1011  }
1012 
1013 
1014  return ((directTerm || crossTerm) && motherRelation && processGEANT);
1015 }
1016 
1017 //____________________________________________________________
1019  //
1020  // Check whether two particles have the same mother
1021  //
1022 
1023  const PairAnalysisTrack* daughter1 = pair->GetFirstDaughter();
1024  const PairAnalysisTrack* daughter2 = pair->GetSecondDaughter();
1025  if (!daughter1 || !daughter2) return 0;
1026 
1027  CbmMCTrack* mcDaughter1 = GetMCTrackFromMCEvent(daughter1->GetLabel());
1028  CbmMCTrack* mcDaughter2 = GetMCTrackFromMCEvent(daughter2->GetLabel());
1029  if (!mcDaughter1 || !mcDaughter2) return 0;
1030 
1031  Int_t labelMother1 = mcDaughter1->GetMotherId();
1032  Int_t labelMother2 = mcDaughter2->GetMotherId();
1033  Bool_t sameMother = (labelMother1 > -1) && (labelMother2 > -1)
1034  && (labelMother1 == labelMother2);
1035 
1036  return sameMother;
1037 }
1038 
1039 //____________________________________________________________
1040 Bool_t PairAnalysisMC::IsPhysicalPrimary(Int_t label, UInt_t processID) const {
1041 
1042  // initial state particle
1043  if (processID != kPPrimary) return kFALSE;
1044 
1045  // stable (anti-)particles
1046  Double_t isStable = kFALSE;
1047  Int_t pdg = TMath::Abs(GetPdgFromLabel(label));
1048 
1049  // All ions/nucleons are considered as stable
1050  // Nuclear code is 10LZZZAAAI
1051  if (pdg > 1000000000) isStable = kTRUE;
1052 
1053  switch (pdg) {
1054  case kGamma: // Photon
1055  case kElectron: // Electron
1056  case kMuonMinus: // Muon
1057  case kPiPlus: // Pion
1058  case kKPlus: // kaon
1059  case kK0Short: // k0s
1060  case kK0Long: // k0l
1061  case kProton: // Proton
1062  case kNeutron: // Neutron
1063  case kLambda0: // Lambda_0
1064  case kSigmaMinus: // Sigma Minus
1065  case kSigmaPlus: // Sigma Plus
1066  case kXiMinus: // Xsi Minus
1067  case kOmegaMinus: // Omega
1068  case kNuE: // Electron Neutrino
1069  case kNuMu: // Muon Neutrino
1070  case kNuTau: // Tau Neutrino
1071  case 3322: // Xsi
1072  isStable = kTRUE;
1073  break;
1074  default:
1075  isStable = kFALSE;
1076  return isStable;
1077  break;
1078  }
1079 
1080  // particle produced during transport
1082  if (!mother) return kTRUE;
1083  Int_t pdgMother = TMath::Abs(mother->GetPdgCode());
1084  UInt_t processMother = mother->GetGeantProcessId();
1085 
1086  // Check for Sigma0
1087  if ((pdgMother == kSigma0) && (processMother == kPPrimary)) return kTRUE;
1088  // Check if it comes from a pi0 decay
1089  if ((pdgMother == kPi0) && (processMother == kPPrimary)) return kTRUE;
1090  // Check if it this is a heavy flavor decay product
1091  Int_t mfl =
1092  Int_t(pdgMother / TMath::Power(10, Int_t(TMath::Log10(pdgMother))));
1093  if (mfl < 4) return kFALSE; // Light hadron
1094  // Heavy flavor hadron produced by generator
1095  if (processMother == kPPrimary) return kTRUE;
1096  // Check for secondary interaction producing the heavy flavour
1097  Int_t mLabel = -1;
1098  while ((mLabel = mother->GetMotherId() && mLabel >= 0)) {
1099  mother = GetMCTrackFromMCEvent(mLabel);
1100  }
1101  pdgMother = TMath::Abs(mother->GetPdgCode());
1102  mfl = Int_t(pdgMother / TMath::Power(10, Int_t(TMath::Log10(pdgMother))));
1103  return (mfl < 4 ? kFALSE : kTRUE);
1104 }
1105 
1106 //____________________________________________________________
1108  UInt_t processID) const {
1109  if (IsPhysicalPrimary(label, processID)) return kFALSE;
1110  if (processID != kPDecay) return kFALSE;
1111 
1112  Float_t pdgMother =
1113  (Float_t) TMath::Abs(GetPdgFromLabel(GetMothersLabel(label)));
1114  // mass fo the flavour
1115  Int_t mfl =
1116  Int_t(pdgMother / TMath::Power(10, Int_t(TMath::Log10(pdgMother))));
1117  // mother has strangeness, pion+- or muon decay
1118  if (mfl == 3 || pdgMother == 211 || pdgMother == 13)
1119  return kTRUE;
1120  else
1121  return kFALSE;
1122 }
1123 //____________________________________________________________
1125  UInt_t processID) const {
1126  if (IsPhysicalPrimary(label, processID)) return kFALSE;
1127  if (IsSecondaryFromWeakDecay(label, processID)) return kFALSE;
1128 
1129  // Check if it is a non-stable product or one of the beams
1131  if (!mother)
1132  return kFALSE;
1133  else
1134  return kTRUE;
1135 }
CbmMCTrack::GetMotherId
Int_t GetMotherId() const
Definition: CbmMCTrack.h:71
PairAnalysisMC::GetLabelMotherWithPdg
Int_t GetLabelMotherWithPdg(const PairAnalysisPair *pair, Int_t pdgMother)
Definition: PairAnalysisMC.h:133
PairAnalysisPair::GetFirstDaughter
PairAnalysisTrack * GetFirstDaughter() const
Definition: PairAnalysisPair.h:140
PairAnalysisSignalMC::ESource
ESource
Definition: PairAnalysisSignalMC.h:19
PairAnalysisSignalMC::kSecondaryFromWeakDecay
@ kSecondaryFromWeakDecay
Definition: PairAnalysisSignalMC.h:25
PairAnalysisMC::GetMotherPDG
Int_t GetMotherPDG(const PairAnalysisTrack *_track)
Definition: PairAnalysisMC.cxx:154
PairAnalysisSignalMC::IsSingleParticle
Bool_t IsSingleParticle() const
Definition: PairAnalysisSignalMC.h:198
PairAnalysisSignalMC::GetGEANTProcess
TMCProcess GetGEANTProcess() const
Definition: PairAnalysisSignalMC.h:189
PairAnalysisMC::CheckGEANTProcess
Bool_t CheckGEANTProcess(Int_t label, TMCProcess process) const
Definition: PairAnalysisMC.cxx:519
PairAnalysisSignalMC::kWhoCares
@ kWhoCares
Definition: PairAnalysisSignalMC.h:28
PairAnalysisSignalMC::GetMotherPDG
Int_t GetMotherPDG(Int_t branch) const
Definition: PairAnalysisSignalMC.h:143
PairAnalysisMC::ComparePDG
Bool_t ComparePDG(Int_t particlePDG, Int_t requiredPDG, Bool_t pdgExclusion, Bool_t checkBothCharges) const
Definition: PairAnalysisMC.cxx:264
PairAnalysisSignalMC::GetCheckGEANTProcess
Bool_t GetCheckGEANTProcess() const
Definition: PairAnalysisSignalMC.h:190
PairAnalysisSignalMC::kIsNotDalitz
@ kIsNotDalitz
Definition: PairAnalysisSignalMC.h:28
PairAnalysisSignalMC::GetGrandMotherSource
ESource GetGrandMotherSource(Int_t branch) const
Definition: PairAnalysisSignalMC.h:171
PairAnalysisSignalMC::GetGreatGrandMotherPDGexclude
Bool_t GetGreatGrandMotherPDGexclude(Int_t branch) const
Definition: PairAnalysisSignalMC.h:161
PairAnalysisMC::fMCArray
TClonesArray * fMCArray
Definition: PairAnalysisMC.h:95
PairAnalysisSignalMC::kSecondaryFromMaterial
@ kSecondaryFromMaterial
Definition: PairAnalysisSignalMC.h:26
PairAnalysisMC.h
CbmMCTrack::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMCTrack.h:70
PairAnalysisMC::GetMCTrack
CbmMCTrack * GetMCTrack(const PairAnalysisTrack *_track)
Definition: PairAnalysisMC.cxx:124
PairAnalysisMC::fgInstance
static PairAnalysisMC * fgInstance
Definition: PairAnalysisMC.h:97
PairAnalysisSignalMC::kDifferent
@ kDifferent
Definition: PairAnalysisSignalMC.h:18
PairAnalysisTrack::GetMCTrack
CbmMCTrack * GetMCTrack() const
Definition: PairAnalysisTrack.h:81
PairAnalysisSignalMC::kDontCare
@ kDontCare
Definition: PairAnalysisSignalMC.h:20
PairAnalysisSignalMC::kPrimary
@ kPrimary
Definition: PairAnalysisSignalMC.h:21
PairAnalysisTrack
Definition: PairAnalysisTrack.h:37
PairAnalysisPair
Definition: PairAnalysisPair.h:25
PairAnalysisMC::IsSecondaryFromMaterial
Bool_t IsSecondaryFromMaterial(Int_t label, UInt_t processID) const
Definition: PairAnalysisMC.cxx:1124
PairAnalysisMC::IsMCTruth
Bool_t IsMCTruth(const PairAnalysisPair *pair, const PairAnalysisSignalMC *signalMC) const
Definition: PairAnalysisMC.cxx:753
PairAnalysisSignalMC::GetGreatGrandMotherPDG
Int_t GetGreatGrandMotherPDG(Int_t branch) const
Definition: PairAnalysisSignalMC.h:149
PairAnalysisTrack::GetLabel
Int_t GetLabel() const
Definition: PairAnalysisTrack.h:109
PairAnalysisMC::~PairAnalysisMC
virtual ~PairAnalysisMC()
Definition: PairAnalysisMC.cxx:56
PairAnalysisSignalMC::GetGrandMotherPDGexclude
Bool_t GetGrandMotherPDGexclude(Int_t branch) const
Definition: PairAnalysisSignalMC.h:158
PairAnalysisMC::CheckDalitzDecision
Bool_t CheckDalitzDecision(Int_t mLabel, const PairAnalysisSignalMC *const signalMC) const
Definition: PairAnalysisMC.cxx:615
PairAnalysisSignalMC::GetCheckBothChargesGrandMothers
Bool_t GetCheckBothChargesGrandMothers(Int_t branch) const
Definition: PairAnalysisSignalMC.h:180
PairAnalysisSignalMC::kFinalState
@ kFinalState
Definition: PairAnalysisSignalMC.h:23
PairAnalysisSignalMC::GetLegPDG
Int_t GetLegPDG(Int_t branch) const
Definition: PairAnalysisSignalMC.h:142
PairAnalysisMC::CheckIsDalitz
Bool_t CheckIsDalitz(Int_t label, const PairAnalysisSignalMC *const signalMC) const
Definition: PairAnalysisMC.cxx:594
PairAnalysisSignalMC::GetCheckBothChargesMothers
Bool_t GetCheckBothChargesMothers(Int_t branch) const
Definition: PairAnalysisSignalMC.h:177
PairAnalysisMC::IsSecondaryFromWeakDecay
Bool_t IsSecondaryFromWeakDecay(Int_t label, UInt_t processID) const
Definition: PairAnalysisMC.cxx:1107
PairAnalysisSignalMC::GetCheckBothChargesGreatGrandMothers
Bool_t GetCheckBothChargesGreatGrandMothers(Int_t branch) const
Definition: PairAnalysisSignalMC.h:184
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmMCTrack::GetGeantProcessId
UInt_t GetGeantProcessId() const
Definition: CbmMCTrack.h:69
PairAnalysisMC::CheckParticleSource
Bool_t CheckParticleSource(Int_t label, PairAnalysisSignalMC::ESource source) const
Definition: PairAnalysisMC.cxx:534
kGamma
@ kGamma
Definition: CbmLmvmHist.h:10
PairAnalysisSignalMC::GetMotherPDGexclude
Bool_t GetMotherPDGexclude(Int_t branch) const
Definition: PairAnalysisSignalMC.h:155
PairAnalysisMC
Definition: PairAnalysisMC.h:25
PairAnalysisTrack.h
PairAnalysisMC::fHasMC
Bool_t fHasMC
Definition: PairAnalysisMC.h:94
PairAnalysisMC::NumberOfDaughters
Int_t NumberOfDaughters(const CbmMCTrack *particle)
Definition: PairAnalysisMC.cxx:175
PairAnalysisMC::ConnectMCEvent
Bool_t ConnectMCEvent()
Definition: PairAnalysisMC.cxx:101
CbmMCTrack.h
PairAnalysisMC::GetDaughters
void GetDaughters(const TObject *mother, CbmMCTrack *&d1, CbmMCTrack *&d2)
Definition: PairAnalysisMC.cxx:214
PairAnalysisMC::GetMCTrackMother
CbmMCTrack * GetMCTrackMother(const PairAnalysisTrack *_track)
Definition: PairAnalysisMC.cxx:132
CbmMCTrack
Definition: CbmMCTrack.h:34
PairAnalysisMC::GetPdgFromLabel
Int_t GetPdgFromLabel(Int_t label) const
Definition: PairAnalysisMC.cxx:251
PairAnalysisMC::HaveSameMother
Bool_t HaveSameMother(const PairAnalysisPair *pair) const
Definition: PairAnalysisMC.cxx:1018
PairAnalysisSignalMC::GetDalitzPdg
Int_t GetDalitzPdg() const
Definition: PairAnalysisSignalMC.h:205
PairAnalysisMC::PairAnalysisMC
PairAnalysisMC()
Definition: PairAnalysisMC.cxx:47
PairAnalysisSignalMC::kSecondary
@ kSecondary
Definition: PairAnalysisSignalMC.h:22
PairAnalysisTrack::PdgCode
Int_t PdgCode() const
Definition: PairAnalysisTrack.h:108
PairAnalysisSignalMC::GetDalitz
EDalitz GetDalitz() const
Definition: PairAnalysisSignalMC.h:204
PairAnalysisMC::GetMCTrackFromMCEvent
CbmMCTrack * GetMCTrackFromMCEvent(Int_t label) const
Definition: PairAnalysisMC.cxx:75
PairAnalysisSignalMC.h
PairAnalysisSignalMC::GetLegPDGexclude
Bool_t GetLegPDGexclude(Int_t branch) const
Definition: PairAnalysisSignalMC.h:152
PairAnalysisSignalMC::kDirect
@ kDirect
Definition: PairAnalysisSignalMC.h:24
PairAnalysisMC::Instance
static PairAnalysisMC * Instance()
PairAnalysisSignalMC
Definition: PairAnalysisSignalMC.h:15
PairAnalysisSignalMC::kIsDalitz
@ kIsDalitz
Definition: PairAnalysisSignalMC.h:28
PairAnalysisSignalMC::GetMothersRelation
EBranchRelation GetMothersRelation() const
Definition: PairAnalysisSignalMC.h:188
PairAnalysisSignalMC::kSame
@ kSame
Definition: PairAnalysisSignalMC.h:18
PairAnalysisMC::fMCEvent
TObject * fMCEvent
Definition: PairAnalysisMC.h:93
PairAnalysisSignalMC::GetCheckBothChargesLegs
Bool_t GetCheckBothChargesLegs(Int_t branch) const
Definition: PairAnalysisSignalMC.h:174
PairAnalysisMC::IsPhysicalPrimary
Bool_t IsPhysicalPrimary(Int_t label, UInt_t processID) const
Definition: PairAnalysisMC.cxx:1040
PairAnalysisPair::GetSecondDaughter
PairAnalysisTrack * GetSecondDaughter() const
Definition: PairAnalysisPair.h:143
PairAnalysisSignalMC::GetMotherSource
ESource GetMotherSource(Int_t branch) const
Definition: PairAnalysisSignalMC.h:168
PairAnalysisMC::GetNMCTracks
Int_t GetNMCTracks()
Definition: PairAnalysisMC.cxx:63
PairAnalysisSignalMC::GetLegSource
ESource GetLegSource(Int_t branch) const
Definition: PairAnalysisSignalMC.h:165
PairAnalysisSignalMC::GetGrandMotherPDG
Int_t GetGrandMotherPDG(Int_t branch) const
Definition: PairAnalysisSignalMC.h:146
kPi0
@ kPi0
Definition: CbmLmvmHist.h:10
PairAnalysisMC::GetMothersLabel
Int_t GetMothersLabel(Int_t daughterLabel) const
Definition: PairAnalysisMC.cxx:237