19 #include "TParticle.h"
20 #include "TDatabasePDG.h"
25 #include "AliMCEvent.h"
26 #include "AliGenPythiaEventHeader.h"
27 #include "AliVParticle.h"
42 fMCGenerator(kPythia),
43 fMCGeneratorString(
"PYTHIA"),
44 fDaughMom(), fDaughMom2(),
45 fMotherMom(), fGMotherMom()
65 const AliMCEvent* mcevent,
67 TLorentzVector & momentum, TVector3 & prodVertex)
76 if(label1[0]==label2[0])
84 Int_t label=label1[0];
85 if(label < 0)
return -1;
87 while(label > -1 && counter1 < 99)
90 AliVParticle * mom = mcevent->GetTrack(label);
93 label = mom->GetMother() ;
94 label1[counter1]=label;
101 if(label < 0)
return -1;
103 while(label > -1 && counter2 < 99)
106 AliVParticle * mom = mcevent->GetTrack(label);
109 label = mom->GetMother() ;
110 label2[counter2]=label;
120 Int_t commonparents = 0;
123 for (
Int_t c1 = 0; c1 < counter1; c1++)
125 for (
Int_t c2 = 0; c2 < counter2; c2++)
127 if(label1[c1]==label2[c2] && label1[c1]>-1)
129 ancLabel = label1[c1];
132 AliVParticle * mom = mcevent->GetTrack(label1[c1]);
136 ancPDG = mom->PdgCode();
137 ancStatus = mom->MCStatusCode();
138 momentum.SetPxPyPzE(mom->Px(),mom->Py(),mom->Pz(),mom->E());
139 prodVertex.SetXYZ(mom->Xv(),mom->Yv(),mom->Zv());
153 momentum.SetXYZT(0,0,0,0);
154 prodVertex.SetXYZ(-10,-10,-10);
169 Int_t labels[] = { label };
191 const AliMCEvent* mcevent,
const TObjArray* arrayCluster)
195 AliWarning(
"No MC labels available, please check!!!");
201 AliDebug(1,
"MCEvent is not available, check analysis settings in configuration file, do nothing with MC!!");
206 Int_t nprimaries = mcevent->GetNumberOfTracks();
209 if ( labels[0] < 0 || labels[0] >= nprimaries )
212 AliWarning(Form(
"*** bad label ***: label %d", labels[0]));
214 if(labels[0] >= nprimaries)
215 AliWarning(Form(
"*** large label ***: label %d, n tracks %d", labels[0], nprimaries));
223 Int_t label=labels[0];
226 AliVParticle * mom = mcevent->GetTrack(label);
228 Int_t mPdgSign = mom->PdgCode();
229 Int_t mPdg = TMath::Abs(mPdgSign);
230 Int_t mStatus = mom->MCStatusCode() ;
231 Int_t iParent = mom->GetMother() ;
236 AliVParticle * parent = NULL ;
241 parent = mcevent->GetTrack(iParent);
242 pPdg = TMath::Abs(parent->PdgCode());
243 pStatus = parent->MCStatusCode();
245 else AliDebug(1,Form(
"Parent with label %d",iParent));
247 AliDebug(2,
"Cluster most contributing mother and its parent:");
248 AliDebug(2,Form(
"\t Mother label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d",
249 iMom , mPdg, mStatus, mom->IsPrimary() , mom->IsPhysicalPrimary()));
250 AliDebug(2,Form(
"\t Parent label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d",
251 iParent, pPdg, pStatus, parent?parent->IsPrimary():-1, parent?parent->IsPhysicalPrimary():-1));
254 if((mPdg == 22 || mPdg == 11) && (pPdg == 22 || pPdg == 11) && mStatus==0)
259 while ((pPdg == 22 || pPdg == 11) && !mom->IsPhysicalPrimary())
262 iMom = mom->GetMother();
266 AliInfo(Form(
"pdg = %d, mother = %d, skip",pPdg,iMom));
270 mom = mcevent->GetTrack(iMom);
271 mPdgSign = mom->PdgCode();
272 mPdg = TMath::Abs(mPdgSign);
273 mStatus = mom->MCStatusCode() ;
274 iParent = mom->GetMother() ;
278 if(iParent >= 0 && parent)
280 parent = mcevent->GetTrack(iParent);
281 pPdg = TMath::Abs(parent->PdgCode());
282 pStatus = parent->MCStatusCode();
289 AliDebug(2,
"Converted photon/electron:");
290 AliDebug(2,Form(
"\t Mother label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d"
291 ,iMom , mPdg, mStatus, mom->IsPrimary() , mom->IsPhysicalPrimary()));
292 AliDebug(2,Form(
"\t Parent label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d"
293 ,iParent, pPdg, pStatus, parent?parent->IsPrimary():-1, parent?parent->IsPhysicalPrimary():-1));
296 else if((mPdg == 22 || mPdg == 11) && mStatus==0)
299 if(pPdg == 2112 || pPdg == 211 || pPdg == 321 ||
300 pPdg == 2212 || pPdg == 130 || pPdg == 13 )
303 iMom = mom->GetMother();
307 AliInfo(Form(
"pdg = %d, mother = %d, skip",pPdg,iMom));
311 mom = mcevent->GetTrack(iMom);
312 mPdgSign = mom->PdgCode();
313 mPdg = TMath::Abs(mPdgSign);
314 mStatus = mom->MCStatusCode() ;
316 AliDebug(2,
"Converted hadron:");
317 AliDebug(2,Form(
"\t Mother label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d",
318 iMom, mPdg, mStatus, mom->IsPrimary(), mom->IsPhysicalPrimary()));
351 AliDebug(2,
"First mother is directly pi0, not decayed by generator");
359 AliDebug(2,
"First mother is directly eta, not decayed by generator");
372 AliDebug(2,
"Generator pi0 decay photon");
385 else if ( pPdg == 221 )
389 AliDebug(2,
"Generator eta decay photon");
398 else if ( pPdg > 100 )
402 AliDebug(2,Form(
"Generator decay photon from parent pdg %d",pPdg));
406 if(iParent < 8 && iParent > 5 )
416 else if ( pPdg < 23 )
420 AliDebug(2,Form(
"Generator fragmentation photon from parent pdg %d",pPdg));
424 AliDebug(2,Form(
"Generator physical primary (pythia/herwig) unknown photon from parent pdg %d",pPdg));
431 AliDebug(2,Form(
"Generator unknown photon from parent pdg %d",pPdg));
468 if(pPdg == 11 && parent)
470 Int_t iGrandma = parent->GetMother();
473 AliVParticle * gma = mcevent->GetTrack(iGrandma);
474 Int_t gPdg = TMath::Abs(gma->PdgCode());
483 AliDebug(1,
"Checking ancestors of electrons");
487 else if((499 < pPdg && pPdg < 600)||(4999 < pPdg && pPdg < 6000)) {
SetTagBit(tag,
kMCEFromB);}
488 else if((399 < pPdg && pPdg < 500)||(3999 < pPdg && pPdg < 5000))
493 Int_t iGrandma = parent->GetMother();
496 AliVParticle * gma = mcevent->GetTrack(iGrandma);
497 Int_t gPdg = TMath::Abs(gma->PdgCode());
506 TParticlePDG* foo = TDatabasePDG::Instance()->GetParticle(pPdg);
507 TParticlePDG* foo1 = TDatabasePDG::Instance()->GetParticle(mPdg);
509 AliDebug(1,Form(
"Electron from other origin: %s (pPdg = %d) %s (mPdg = %d)",foo->GetName(), pPdg,foo1->GetName(),mPdg));
518 AliDebug(1,Form(
"\t Setting kMCUnknown for cluster with pdg = %d, Parent pdg = %d",mPdg,pPdg));
530 Int_t mesonIndex,
const AliMCEvent* mcevent,
533 if(labels[0] < 0 || labels[0] > mcevent->GetNumberOfTracks() || nlabels <= 1)
535 AliDebug(2,Form(
"Exit : label[0] %d, n primaries %d, nlabels %d",labels[0],mcevent->GetNumberOfTracks(), nlabels));
539 AliVParticle *
meson = mcevent->GetTrack(mesonIndex);
540 Int_t mesonPdg = meson->PdgCode();
541 if(mesonPdg != 111 && mesonPdg != 221)
543 AliWarning(Form(
"Wrong pi0/eta PDG : %d",mesonPdg));
547 AliDebug(2,Form(
"pdg %d, label %d, ndaughters %d", mesonPdg, mesonIndex, meson->GetNDaughters()));
550 if(meson->GetNDaughters() != 2)
568 AliDebug(2,Form(
"Not overlapped. Number of daughters is %d, not 2",meson->GetNDaughters()));
572 Int_t iPhoton0 = meson->GetDaughterLabel(0);
573 Int_t iPhoton1 = meson->GetDaughterLabel(1);
582 AliVParticle *photon0 = mcevent->GetTrack(iPhoton0);
583 AliVParticle *photon1 = mcevent->GetTrack(iPhoton1);
586 if(photon0->PdgCode() != 22 && photon1->PdgCode()!=22)
588 AliWarning(Form(
"Not overlapped. PDG: daughter 1 = %d, of daughter 2 = %d",photon0->PdgCode(),photon1->PdgCode()));
592 AliDebug(2,Form(
"Daughter labels : photon0 = %d, photon1 = %d",iPhoton0,iPhoton1));
595 Bool_t okPhoton0 = kFALSE;
596 Bool_t okPhoton1 = kFALSE;
598 AliDebug(3,
"Labels loop:");
600 Bool_t conversion = kFALSE;
607 for(
Int_t i = 0; i < nlabels; i++)
609 AliDebug(3, Form(
"\t label %d/%d: %d, ok? %d, %d", i, nlabels, labels[i], okPhoton0, okPhoton1));
611 if ( labels[i] < 0 )
continue;
614 if(okPhoton0 && okPhoton1)
break;
616 Int_t index = labels[i];
617 if (iPhoton0 == index)
622 else if (iPhoton1 == index)
629 if(index >= mcevent->GetNumberOfTracks())
631 AliWarning(Form(
"Particle index %d larger than size of list %d!!",index,mcevent->GetNumberOfTracks()));
635 AliVParticle * daught = mcevent->GetTrack(index);
636 Int_t tmpindex = daught->GetMother();
637 AliDebug(3,Form(
"Conversion? : mother %d",tmpindex));
642 AliDebug(3,Form(
"\t parent index %d",tmpindex));
643 daught = mcevent->GetTrack(tmpindex);
645 if (iPhoton0 == tmpindex)
651 else if (iPhoton1 == tmpindex)
658 tmpindex = daught->GetMother();
667 if(okPhoton0 && okPhoton1)
669 AliDebug(2,Form(
"%s OVERLAPPED DECAY",(TDatabasePDG::Instance()->GetParticle(mesonPdg))->GetName()));
673 AliDebug(2,
"Second decay photon produced a conversion");
703 const AliMCEvent* mcevent,
Int_t & tag)
705 if(!arrayCluster || iMom < 0 || iParent < 0|| !mcevent)
return;
707 AliVParticle * parent = mcevent->GetTrack(iParent);
711 if(parent->GetNDaughters()!=2)
718 Int_t pairLabel = -1;
719 if ( iMom != parent->GetDaughterLabel(0) ) pairLabel = parent->GetDaughterLabel(0);
720 else if( iMom != parent->GetDaughterLabel(1) ) pairLabel = parent->GetDaughterLabel(1);
731 for(
Int_t iclus = 0; iclus < arrayCluster->GetEntriesFast(); iclus++)
733 AliVCluster * cluster = (AliVCluster*) arrayCluster->At(iclus);
736 for(
UInt_t ilab = 0; ilab< cluster->GetNLabels(); ilab++)
738 Int_t label = cluster->GetLabels()[ilab];
742 if ( label==pairLabel )
748 else if ( label== iParent || label== iMom )
755 AliVParticle * mother = mcevent->GetTrack(label);
759 AliInfo(Form(
"MC Mother not available for label %d",label));
763 Int_t momPDG = TMath::Abs(mother->PdgCode());
764 if ( momPDG!=11 && momPDG!=22 )
continue;
767 Int_t iParentClus = mother->GetMother();
768 if(iParentClus < 0)
continue;
770 AliVParticle * parentClus = mcevent->GetTrack(iParentClus);
771 if(!parentClus)
continue;
773 Int_t parentClusPDG = TMath::Abs(parentClus->PdgCode());
774 Int_t parentClusStatus = parentClus->MCStatusCode();
776 if ( parentClusPDG != 22 && parentClusPDG != 11 && parentClusStatus != 0 )
785 while ((parentClusPDG == 22 || parentClusPDG == 11) && parentClusStatus != 1)
789 momPDG = parentClusPDG;
791 iParentClus = parentClus->GetMother();
792 if ( iParentClus < 0 )
break;
794 parentClus = mcevent->GetTrack(iParentClus);
795 if ( !parentClus )
break;
797 parentClusPDG = TMath::Abs(parentClus->PdgCode());
798 parentClusStatus = parentClus->MCStatusCode() ;
801 if ( (momPDG == 22 || parentClusPDG ==22) && (label==pairLabel || iParentClus == pairLabel) )
832 Int_t nTriggerJets = 0;
838 if(mcevent->GetNumberOfTracks() < 8)
return fJetsList;
840 AliVParticle * parton1 = mcevent->GetTrack(6);
841 AliVParticle * parton2 = mcevent->GetTrack(7);
843 AliDebug(2,Form(
"Parton 6 : %s, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
844 parton1->GetName(),parton1->Pt(),parton1->E(),parton1->Phi()*TMath::RadToDeg(),parton1->Eta()));
845 AliDebug(2,Form(
"Parton 7 : %s, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
846 parton2->GetName(),parton2->Pt(),parton2->E(),parton2->Phi()*TMath::RadToDeg(),parton2->Eta()));
889 TParticle * jet = 0x0;
890 AliGenPythiaEventHeader* pygeh = (AliGenPythiaEventHeader*) mcheader;
891 nTriggerJets = pygeh->NTriggerJets();
892 AliDebug(2,Form(
"PythiaEventHeader: Njets: %d",nTriggerJets));
894 for(
Int_t i = 0; i< nTriggerJets; i++)
896 pygeh->TriggerJet(i, tmpjet);
898 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
901 Float_t phidiff1 = TMath::Abs(jet->Phi()-parton1->Phi());
902 Float_t phidiff2 = TMath::Abs(jet->Phi()-parton2->Phi());
904 if(phidiff1 > phidiff2) jet->SetFirstMother(7);
905 else jet->SetFirstMother(6);
908 AliDebug(1,Form(
"PYTHIA Jet %d: mother %d, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
909 i, jet->GetFirstMother(),jet->Pt(),jet->Energy(),jet->Phi()*TMath::RadToDeg(),jet->Eta()));
919 AliVParticle * tmp = parton1;
920 if(parton1->PdgCode()!=22)
924 if(tmp->GetFirstDaughter()==-1)
return fJetsList;
926 tmp = mcevent->GetTrack(tmp->GetFirstDaughter());
927 pdg = tmp->PdgCode();
931 TParticle *jet1 =
new TParticle(94, 21, -1, -1, -1, -1, tmp->Px(),tmp->Py(),tmp->Pz(),tmp->E(), 0,0,0,0);
933 jet1->SetFirstMother(6);
941 AliDebug(1,Form(
"HERWIG Jet 1: mother %d, status %d, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
942 jet1->GetFirstMother(),jet1->GetStatusCode(),jet1->Pt(),jet1->Energy(),jet1->Phi()*TMath::RadToDeg(),jet1->Eta()));
948 if(parton2->PdgCode()!=22)
952 if(tmp->GetFirstDaughter()==-1)
return fJetsList;
954 tmp = mcevent->GetTrack(tmp->GetFirstDaughter());
955 pdg = tmp->PdgCode();
959 TParticle *jet2 =
new TParticle(94, 21, -1, -1, -1, -1, tmp->Px(),tmp->Py(),tmp->Pz(),tmp->E(), 0,0,0,0);
961 jet2->SetFirstMother(7);
966 AliDebug(2,Form(
"HERWIG Jet 2: mother %d, status %d, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
967 jet2->GetFirstMother(),jet2->GetStatusCode(),jet2->Pt(),jet2->Energy(),jet2->Phi()*TMath::RadToDeg(),jet2->Eta()));
988 const AliMCEvent* mcevent,
990 Bool_t & ok,
Int_t & daughlabel, TVector3 & prodVertex)
996 AliWarning(
"MCEvent is not available, check analysis settings in configuration file!!");
1002 Int_t nprimaries = mcevent->GetNumberOfTracks();
1003 if(label < 0 || label >= nprimaries)
1009 AliVParticle * momP = mcevent->GetTrack(label);
1010 daughlabel = momP->GetDaughterLabel(idaugh);
1012 if(daughlabel < 0 || daughlabel >= nprimaries)
1018 AliVParticle * daughP = mcevent->GetTrack(daughlabel);
1019 fDaughMom.SetPxPyPzE(daughP->Px(),daughP->Py(),daughP->Pz(),daughP->E());
1020 pdg = daughP->PdgCode();
1021 status = daughP->MCStatusCode();
1022 prodVertex.SetXYZ(daughP->Xv(),daughP->Yv(),daughP->Zv());
1036 return GetMother(label,mcevent,pdg,status, ok,momlabel);
1045 Int_t momlabel = -1;
1047 return GetMother(label,mcevent,pdg,status, ok,momlabel);
1060 AliWarning(
"MCEvent is not available, check analysis settings in configuration file, STOP!!");
1066 Int_t nprimaries = mcevent->GetNumberOfTracks();
1067 if(label < 0 || label >= nprimaries)
1073 AliVParticle * momP = mcevent->GetTrack(label);
1074 fMotherMom.SetPxPyPzE(momP->Px(),momP->Py(),momP->Pz(),momP->E());
1075 pdg = momP->PdgCode();
1076 status = momP->MCStatusCode();
1077 momlabel = momP->GetMother();
1088 const AliMCEvent* mcevent,
1095 AliWarning(
"MCEvent is not available, check analysis settings in configuration file!!");
1101 Int_t nprimaries = mcevent->GetNumberOfTracks();
1102 if ( label < 0 || label >= nprimaries )
1109 AliVParticle * momP = mcevent->GetTrack(label);
1111 if(momP->PdgCode()==
pdg)
1113 AliDebug(2,
"PDG of mother is already the one requested!");
1114 fGMotherMom.SetPxPyPzE(momP->Px(),momP->Py(),momP->Pz(),momP->E());
1120 Int_t grandmomLabel = momP->GetMother();
1121 Int_t grandmomPDG = -1;
1122 AliVParticle * grandmomP = 0x0;
1124 while (grandmomLabel >=0 )
1126 grandmomP = mcevent->GetTrack(grandmomLabel);
1127 grandmomPDG = grandmomP->PdgCode();
1128 if(grandmomPDG==pdg)
1131 momlabel = grandmomLabel;
1132 fGMotherMom.SetPxPyPzE(grandmomP->Px(),grandmomP->Py(),grandmomP->Pz(),grandmomP->E());
1136 grandmomLabel = grandmomP->GetMother();
1139 if(grandmomPDG!=pdg) AliInfo(Form(
"Mother with PDG %d, NOT found!",pdg));
1151 Int_t & grandMomLabel,
Int_t & greatMomLabel)
1157 AliWarning(
"MCEvent is not available, check analysis settings in configuration file, STOP!!");
1163 Int_t nprimaries = mcevent->GetNumberOfTracks();
1164 if ( label < 0 || label >= nprimaries )
1170 AliVParticle * momP = mcevent->GetTrack(label);
1172 grandMomLabel = momP->GetMother();
1174 AliVParticle * grandmomP = 0x0;
1176 if(grandMomLabel >=0 )
1178 grandmomP = mcevent->GetTrack(grandMomLabel);
1179 pdg = grandmomP->PdgCode();
1180 status = grandmomP->MCStatusCode();
1182 fGMotherMom.SetPxPyPzE(grandmomP->Px(),grandmomP->Py(),grandmomP->Pz(),grandmomP->E());
1183 greatMomLabel = grandmomP->GetMother();
1200 AliWarning(
"MCEvent is not available, check analysis settings in configuration file, STOP!!");
1206 Int_t nprimaries = mcevent->GetNumberOfTracks();
1207 if ( label < 0 || label >= nprimaries )
1213 AliVParticle * momP = mcevent->GetTrack(label);
1215 Int_t grandmomLabel = momP->GetMother();
1216 Int_t grandmomPDG = -1;
1217 AliVParticle * grandmomP = 0x0;
1219 while (grandmomLabel >=0 )
1221 grandmomP = mcevent->GetTrack(grandmomLabel);
1222 grandmomPDG = grandmomP->PdgCode();
1224 if(grandmomPDG==pdg)
break;
1226 grandmomLabel = grandmomP->GetMother();
1229 if(grandmomPDG==pdg && grandmomP->GetNDaughters()==2)
1231 AliVParticle * d1 = mcevent->GetTrack(grandmomP->GetDaughterLabel(0));
1232 AliVParticle * d2 = mcevent->GetTrack(grandmomP->GetDaughterLabel(1));
1234 if(d1->PdgCode() == 22 && d1->PdgCode() == 22)
1236 asym = (d1->E()-d2->E())/grandmomP->E();
1237 fDaughMom .SetPxPyPzE(d1->Px(),d1->Py(),d1->Pz(),d1->E());
1238 fDaughMom2.SetPxPyPzE(d2->Px(),d2->Py(),d2->Pz(),d2->E());
1245 AliInfo(Form(
"Mother with PDG %d, not found! \n",pdg));
1259 AliWarning(
"MCEvent is not available, check analysis settings in configuration file, STOP!!");
1265 Int_t nprimaries = mcevent->GetNumberOfTracks();
1266 if ( label < 0 || label >= nprimaries )
1272 AliVParticle * momP = mcevent->GetTrack(label);
1276 return momP->GetNDaughters();
1287 AliMCEvent* mcevent,
1290 Int_t ancPDG = 0, ancStatus = -1;
1291 TVector3 prodVertex;
1293 Int_t noverlaps = 0;
1296 for (
UInt_t ilab = 1; ilab < nlabels; ilab++ )
1310 else if ( ( ancPDG==111 || ancPDG==221 ) &&
1312 ( (mesonLabel != ancLabel) && mesonLabel >=0 ) )
1317 else if( ancPDG!=22 && TMath::Abs(ancPDG)!=11 && ancPDG != 111 && ancPDG != 221 )
1323 if( !overlap ) continue ;
1333 Int_t mpdg = -999999, gpdg = -1;
1334 Int_t mstatus = -1, gstatus = -1;
1335 Int_t gLabel = -1, ggLabel = -1;
1337 GetMother (label[ilab],mcevent,mpdg,mstatus,mOK);
1339 GetGrandMother(label[ilab],mcevent,gpdg,gstatus,gOK, gLabel,ggLabel);
1343 if( ( mpdg == 22 || TMath::Abs(mpdg==11) ) &&
1344 ( gpdg == 22 || TMath::Abs(gpdg==11) ) &&
1347 Int_t labeltmp = gLabel;
1348 while( ( gpdg == 22 || TMath::Abs(gpdg==11) ) && gLabel >=0 )
1355 overpdg [noverlaps-1] = mpdg;
1356 overlabel[noverlaps-1] = label[ilab];
1370 printf(
"***** Print: %s %s ******\n", GetName(), GetTitle() ) ;
1372 printf(
"Debug level = %d\n",
fDebug);
1388 AliVParticle * primary = 0;
1389 Int_t index = label;
1392 AliInfo(
"*********** Start");
1395 primary = mcevent->GetTrack(index);
1399 AliWarning(
"primary pointer not available!!");
1405 if ( primary->E() == TMath::Abs(primary->Pz()) ||
1406 (primary->E() - primary->Pz()) < 1e-3 ||
1407 (primary->E() + primary->Pz()) < 0 )
1410 eta = primary->Eta();
1414 printf(
"generation %d, label %d, %s, pdg %d, status %d, phys prim %d, E %2.2f, pT %2.2f, p(%2.2f,%2.2f,%2.2f) eta %2.2f, phi %2.2f"
1415 " mother %d, n daughters %d, d1 %d, d2 %d\n",
1416 gener,index,TDatabasePDG::Instance()->GetParticle(pdg)->GetName(),pdg,primary->MCStatusCode(),primary->IsPhysicalPrimary(),
1417 primary->E(),primary->Pt(),primary->Px(),primary->Py(),primary->Pz(),
1418 eta,primary->Phi()*TMath::RadToDeg(),
1419 primary->GetMother(),primary->GetNDaughters(),primary->GetDaughterLabel(0), primary->GetDaughterLabel(1));
1422 index = primary->GetMother();
1423 if ( nGenerMax < gener ) index = -1;
1426 AliInfo(
"*********** End");
1438 (
"Tag %d: photon %d, conv %d, prompt %d, frag %d, isr %d,\n"
1439 " pi0 decay %d, eta decay %d, other decay %d, lost decay %d, in calo decay %d, pi0 %d, eta %d,\n"
1440 " electron %d, muon %d,pion %d, proton %d, neutron %d,\n"
1441 " kaon %d, a-proton %d, a-neutron %d, unk %d, bad %d",
void SetMCGenerator(Int_t mcgen)
Set the generator type.
Int_t fCurrentEvent
Current Event number - GetJets()
TLorentzVector GetMother(Int_t label, const AliMCEvent *mcevent, Bool_t &ok)
TLorentzVector GetMotherWithPDG(Int_t label, Int_t pdg, const AliMCEvent *mcevent, Bool_t &ok, Int_t &momLabel)
TLorentzVector fMotherMom
! particle momentum
void PrintMCTag(Int_t tag) const
Print the assigned origins to this particle.
TLorentzVector GetDaughter(Int_t daughter, Int_t label, const AliMCEvent *mcevent, Int_t &pdg, Int_t &status, Bool_t &ok, Int_t &daugLabel, TVector3 &prodVertex)
void GetMCDecayAsymmetryAngleForPDG(Int_t label, Int_t pdg, const AliMCEvent *mcevent, Float_t &asy, Float_t &angle, Bool_t &ok)
In case of an eta or pi0 decay into 2 photons, get the asymmetry in the energy of the photons...
TLorentzVector GetGrandMother(Int_t label, const AliMCEvent *mcevent, Int_t &pdg, Int_t &status, Bool_t &ok, Int_t &grandMomLabel, Int_t &greatMomLabel)
virtual ~AliMCAnalysisUtils()
Destructor.
void SetTagBit(Int_t &tag, UInt_t set) const
Int_t CheckOrigin(Int_t label, const AliMCEvent *mcevent)
TLorentzVector fGMotherMom
! particle momentum
TLorentzVector fDaughMom2
! particle momentum
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void PrintAncestry(AliMCEvent *mcevent, Int_t label, Int_t nGenerMax=1000) const
Int_t fMCGenerator
MC generator used to generate data in simulation.
TLorentzVector fDaughMom
! particle momentum
void CheckOverlapped2GammaDecay(const Int_t *labels, Int_t nlabels, Int_t mesonIndex, const AliMCEvent *mcevent, Int_t &tag)
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
TList * fJetsList
List of jets - GetJets()
TList * GetJets(AliMCEvent *mcevent, AliGenEventHeader *mcheader, Int_t eventNumber)
TString fMCGeneratorString
MC generator used to generate data in simulation.
void CheckLostDecayPair(const TObjArray *arrayCluster, Int_t iMom, Int_t iParent, const AliMCEvent *mcevent, Int_t &tag)
Check on AODs if the current decay photon has the second photon companion lost.
Int_t GetNDaughters(Int_t label, const AliMCEvent *mcevent, Bool_t &ok)
Int_t CheckCommonAncestor(Int_t index1, Int_t index2, const AliMCEvent *mcevent, Int_t &ancPDG, Int_t &ancStatus, TLorentzVector &momentum, TVector3 &prodVertex)
AliMCAnalysisUtils()
Constructor.
Class with analysis utils for simulations.
Bool_t CheckTagBit(Int_t tag, UInt_t test) const
Int_t GetNOverlaps(const Int_t *label, UInt_t nlabels, Int_t mctag, Int_t mesonLabel, AliMCEvent *mcevent, Int_t *overpdg, Int_t *overlabel)