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)
69 if ( index1 < 0 || index2 < 0 )
73 momentum.SetXYZT(0,0,0,0);
74 prodVertex.SetXYZ(-10,-10,-10);
85 if(label1[0]==label2[0])
93 Int_t label=label1[0];
95 while(label > -1 && counter1 < 999)
98 AliVParticle * mom = mcevent->GetTrack(label);
101 label = mom->GetMother() ;
102 label1[counter1]=label;
110 while(label > -1 && counter2 < 999)
113 AliVParticle * mom = mcevent->GetTrack(label);
116 label = mom->GetMother() ;
117 label2[counter2]=label;
123 if((counter1==999 || counter2==999))
124 AliWarning(Form(
"Genealogy too large, generations: cluster1: %d, cluster2= %d", counter1, counter2));
131 for (
Int_t c1 = 0; c1 < counter1; c1++)
133 for (
Int_t c2 = 0; c2 < counter2; c2++)
135 if ( label1[c1]==label2[c2] && label1[c1]>-1 &&
136 ancLabel < label1[c1] )
138 ancLabel = label1[c1];
141 AliVParticle * mom = mcevent->GetTrack(label1[c1]);
145 ancPDG = mom->PdgCode();
146 ancStatus = mom->MCStatusCode();
147 momentum.SetPxPyPzE(mom->Px(),mom->Py(),mom->Pz(),mom->E());
148 prodVertex.SetXYZ(mom->Xv(),mom->Yv(),mom->Zv());
166 momentum.SetXYZT(0,0,0,0);
167 prodVertex.SetXYZ(-10,-10,-10);
182 Int_t labels[] = { label };
204 const AliMCEvent* mcevent,
const TObjArray* arrayCluster)
208 AliWarning(
"No MC labels available, please check!!!");
214 AliDebug(1,
"MCEvent is not available, check analysis settings in configuration file, do nothing with MC!!");
219 Int_t nprimaries = mcevent->GetNumberOfTracks();
222 if ( labels[0] < 0 || labels[0] >= nprimaries )
225 AliWarning(Form(
"*** bad label ***: label %d", labels[0]));
227 if(labels[0] >= nprimaries)
228 AliWarning(Form(
"*** large label ***: label %d, n tracks %d", labels[0], nprimaries));
236 Int_t label=labels[0];
239 AliVParticle * mom = mcevent->GetTrack(label);
241 Int_t mPdgSign = mom->PdgCode();
242 Int_t mPdg = TMath::Abs(mPdgSign);
243 Int_t mStatus = mom->MCStatusCode() ;
244 Int_t iParent = mom->GetMother() ;
249 AliVParticle * parent = NULL ;
254 parent = mcevent->GetTrack(iParent);
255 pPdg = TMath::Abs(parent->PdgCode());
256 pStatus = parent->MCStatusCode();
258 else AliDebug(1,Form(
"Parent with label %d",iParent));
260 AliDebug(2,
"Cluster most contributing mother and its parent:");
261 AliDebug(2,Form(
"\t Mother label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d",
262 iMom , mPdg, mStatus, mom->IsPrimary() , mom->IsPhysicalPrimary()));
263 AliDebug(2,Form(
"\t Parent label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d",
264 iParent, pPdg, pStatus, parent?parent->IsPrimary():-1, parent?parent->IsPhysicalPrimary():-1));
267 if((mPdg == 22 || mPdg == 11) && (pPdg == 22 || pPdg == 11) && mStatus==0)
272 while ((pPdg == 22 || pPdg == 11) && !mom->IsPhysicalPrimary())
275 iMom = mom->GetMother();
279 AliInfo(Form(
"pdg = %d, mother = %d, skip",pPdg,iMom));
283 mom = mcevent->GetTrack(iMom);
284 mPdgSign = mom->PdgCode();
285 mPdg = TMath::Abs(mPdgSign);
286 mStatus = mom->MCStatusCode() ;
287 iParent = mom->GetMother() ;
291 if(iParent >= 0 && parent)
293 parent = mcevent->GetTrack(iParent);
294 pPdg = TMath::Abs(parent->PdgCode());
295 pStatus = parent->MCStatusCode();
302 AliDebug(2,
"Converted photon/electron:");
303 AliDebug(2,Form(
"\t Mother label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d"
304 ,iMom , mPdg, mStatus, mom->IsPrimary() , mom->IsPhysicalPrimary()));
305 AliDebug(2,Form(
"\t Parent label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d"
306 ,iParent, pPdg, pStatus, parent?parent->IsPrimary():-1, parent?parent->IsPhysicalPrimary():-1));
309 else if((mPdg == 22 || mPdg == 11) && mStatus==0)
312 if(pPdg == 2112 || pPdg == 211 || pPdg == 321 ||
313 pPdg == 2212 || pPdg == 130 || pPdg == 13 )
316 iMom = mom->GetMother();
320 AliInfo(Form(
"pdg = %d, mother = %d, skip",pPdg,iMom));
324 mom = mcevent->GetTrack(iMom);
325 mPdgSign = mom->PdgCode();
326 mPdg = TMath::Abs(mPdgSign);
327 mStatus = mom->MCStatusCode() ;
329 AliDebug(2,
"Converted hadron:");
330 AliDebug(2,Form(
"\t Mother label %d, pdg %d, status %d, Primary? %d, Physical Primary? %d",
331 iMom, mPdg, mStatus, mom->IsPrimary(), mom->IsPhysicalPrimary()));
364 AliDebug(2,
"First mother is directly pi0, not decayed by generator");
372 AliDebug(2,
"First mother is directly eta, not decayed by generator");
385 AliDebug(2,
"Generator pi0 decay photon");
398 else if ( pPdg == 221 )
402 AliDebug(2,
"Generator eta decay photon");
411 else if ( pPdg > 100 )
415 AliDebug(2,Form(
"Generator decay photon from parent pdg %d",pPdg));
419 if(iParent < 8 && iParent > 5 )
429 else if ( pPdg < 23 )
433 AliDebug(2,Form(
"Generator fragmentation photon from parent pdg %d",pPdg));
437 AliDebug(2,Form(
"Generator physical primary (pythia/herwig) unknown photon from parent pdg %d",pPdg));
444 AliDebug(2,Form(
"Generator unknown photon from parent pdg %d",pPdg));
481 if(pPdg == 11 && parent)
483 Int_t iGrandma = parent->GetMother();
486 AliVParticle * gma = mcevent->GetTrack(iGrandma);
487 Int_t gPdg = TMath::Abs(gma->PdgCode());
496 AliDebug(1,
"Checking ancestors of electrons");
500 else if((499 < pPdg && pPdg < 600)||(4999 < pPdg && pPdg < 6000)) {
SetTagBit(tag,
kMCEFromB);}
501 else if((399 < pPdg && pPdg < 500)||(3999 < pPdg && pPdg < 5000))
506 Int_t iGrandma = parent->GetMother();
509 AliVParticle * gma = mcevent->GetTrack(iGrandma);
510 Int_t gPdg = TMath::Abs(gma->PdgCode());
519 TParticlePDG* foo = TDatabasePDG::Instance()->GetParticle(pPdg);
520 TParticlePDG* foo1 = TDatabasePDG::Instance()->GetParticle(mPdg);
522 AliDebug(1,Form(
"Electron from other origin: %s (pPdg = %d) %s (mPdg = %d)",foo->GetName(), pPdg,foo1->GetName(),mPdg));
531 AliDebug(1,Form(
"\t Setting kMCUnknown for cluster with pdg = %d, Parent pdg = %d",mPdg,pPdg));
543 Int_t mesonIndex,
const AliMCEvent* mcevent,
546 if(labels[0] < 0 || labels[0] > mcevent->GetNumberOfTracks() || nlabels <= 1)
548 AliDebug(2,Form(
"Exit : label[0] %d, n primaries %d, nlabels %d",labels[0],mcevent->GetNumberOfTracks(), nlabels));
552 AliVParticle *
meson = mcevent->GetTrack(mesonIndex);
553 Int_t mesonPdg = meson->PdgCode();
554 if(mesonPdg != 111 && mesonPdg != 221)
556 AliWarning(Form(
"Wrong pi0/eta PDG : %d",mesonPdg));
560 AliDebug(2,Form(
"pdg %d, label %d, ndaughters %d", mesonPdg, mesonIndex, meson->GetNDaughters()));
563 if(meson->GetNDaughters() != 2)
581 AliDebug(2,Form(
"Not overlapped. Number of daughters is %d, not 2",meson->GetNDaughters()));
585 Int_t iPhoton0 = meson->GetDaughterLabel(0);
586 Int_t iPhoton1 = meson->GetDaughterLabel(1);
595 AliVParticle *photon0 = mcevent->GetTrack(iPhoton0);
596 AliVParticle *photon1 = mcevent->GetTrack(iPhoton1);
599 if(photon0->PdgCode() != 22 && photon1->PdgCode()!=22)
601 AliWarning(Form(
"Not overlapped. PDG: daughter 1 = %d, of daughter 2 = %d",photon0->PdgCode(),photon1->PdgCode()));
605 AliDebug(2,Form(
"Daughter labels : photon0 = %d, photon1 = %d",iPhoton0,iPhoton1));
608 Bool_t okPhoton0 = kFALSE;
609 Bool_t okPhoton1 = kFALSE;
611 AliDebug(3,
"Labels loop:");
613 Bool_t conversion = kFALSE;
620 for(
Int_t i = 0; i < nlabels; i++)
622 AliDebug(3, Form(
"\t label %d/%d: %d, ok? %d, %d", i, nlabels, labels[i], okPhoton0, okPhoton1));
624 if ( labels[i] < 0 )
continue;
627 if(okPhoton0 && okPhoton1)
break;
629 Int_t index = labels[i];
630 if (iPhoton0 == index)
635 else if (iPhoton1 == index)
642 if(index >= mcevent->GetNumberOfTracks())
644 AliWarning(Form(
"Particle index %d larger than size of list %d!!",index,mcevent->GetNumberOfTracks()));
648 AliVParticle * daught = mcevent->GetTrack(index);
649 Int_t tmpindex = daught->GetMother();
650 AliDebug(3,Form(
"Conversion? : mother %d",tmpindex));
655 AliDebug(3,Form(
"\t parent index %d",tmpindex));
656 daught = mcevent->GetTrack(tmpindex);
658 if (iPhoton0 == tmpindex)
664 else if (iPhoton1 == tmpindex)
671 tmpindex = daught->GetMother();
680 if(okPhoton0 && okPhoton1)
682 AliDebug(2,Form(
"%s OVERLAPPED DECAY",(TDatabasePDG::Instance()->GetParticle(mesonPdg))->GetName()));
686 AliDebug(2,
"Second decay photon produced a conversion");
716 const AliMCEvent* mcevent,
Int_t & tag)
718 if(!arrayCluster || iMom < 0 || iParent < 0|| !mcevent)
return;
720 AliVParticle * parent = mcevent->GetTrack(iParent);
724 if(parent->GetNDaughters()!=2)
731 Int_t pairLabel = -1;
732 if ( iMom != parent->GetDaughterLabel(0) ) pairLabel = parent->GetDaughterLabel(0);
733 else if( iMom != parent->GetDaughterLabel(1) ) pairLabel = parent->GetDaughterLabel(1);
744 for(
Int_t iclus = 0; iclus < arrayCluster->GetEntriesFast(); iclus++)
746 AliVCluster * cluster = (AliVCluster*) arrayCluster->At(iclus);
749 for(
UInt_t ilab = 0; ilab< cluster->GetNLabels(); ilab++)
751 Int_t label = cluster->GetLabels()[ilab];
755 if ( label==pairLabel )
761 else if ( label== iParent || label== iMom )
768 AliVParticle * mother = mcevent->GetTrack(label);
772 AliInfo(Form(
"MC Mother not available for label %d",label));
776 Int_t momPDG = TMath::Abs(mother->PdgCode());
777 if ( momPDG!=11 && momPDG!=22 )
continue;
780 Int_t iParentClus = mother->GetMother();
781 if(iParentClus < 0)
continue;
783 AliVParticle * parentClus = mcevent->GetTrack(iParentClus);
784 if(!parentClus)
continue;
786 Int_t parentClusPDG = TMath::Abs(parentClus->PdgCode());
787 Int_t parentClusStatus = parentClus->MCStatusCode();
789 if ( parentClusPDG != 22 && parentClusPDG != 11 && parentClusStatus != 0 )
798 while ((parentClusPDG == 22 || parentClusPDG == 11) && parentClusStatus != 1)
802 momPDG = parentClusPDG;
804 iParentClus = parentClus->GetMother();
805 if ( iParentClus < 0 )
break;
807 parentClus = mcevent->GetTrack(iParentClus);
808 if ( !parentClus )
break;
810 parentClusPDG = TMath::Abs(parentClus->PdgCode());
811 parentClusStatus = parentClus->MCStatusCode() ;
814 if ( (momPDG == 22 || parentClusPDG ==22) && (label==pairLabel || iParentClus == pairLabel) )
845 Int_t nTriggerJets = 0;
851 if(mcevent->GetNumberOfTracks() < 8)
return fJetsList;
853 AliVParticle * parton1 = mcevent->GetTrack(6);
854 AliVParticle * parton2 = mcevent->GetTrack(7);
856 AliDebug(2,Form(
"Parton 6 : %s, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
857 parton1->GetName(),parton1->Pt(),parton1->E(),parton1->Phi()*TMath::RadToDeg(),parton1->Eta()));
858 AliDebug(2,Form(
"Parton 7 : %s, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
859 parton2->GetName(),parton2->Pt(),parton2->E(),parton2->Phi()*TMath::RadToDeg(),parton2->Eta()));
902 TParticle * jet = 0x0;
903 AliGenPythiaEventHeader* pygeh = (AliGenPythiaEventHeader*) mcheader;
904 nTriggerJets = pygeh->NTriggerJets();
905 AliDebug(2,Form(
"PythiaEventHeader: Njets: %d",nTriggerJets));
907 for(
Int_t i = 0; i< nTriggerJets; i++)
909 pygeh->TriggerJet(i, tmpjet);
911 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
914 Float_t phidiff1 = TMath::Abs(jet->Phi()-parton1->Phi());
915 Float_t phidiff2 = TMath::Abs(jet->Phi()-parton2->Phi());
917 if(phidiff1 > phidiff2) jet->SetFirstMother(7);
918 else jet->SetFirstMother(6);
921 AliDebug(1,Form(
"PYTHIA Jet %d: mother %d, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
922 i, jet->GetFirstMother(),jet->Pt(),jet->Energy(),jet->Phi()*TMath::RadToDeg(),jet->Eta()));
932 AliVParticle * tmp = parton1;
933 if(parton1->PdgCode()!=22)
937 if(tmp->GetFirstDaughter()==-1)
return fJetsList;
939 tmp = mcevent->GetTrack(tmp->GetFirstDaughter());
940 pdg = tmp->PdgCode();
944 TParticle *jet1 =
new TParticle(94, 21, -1, -1, -1, -1, tmp->Px(),tmp->Py(),tmp->Pz(),tmp->E(), 0,0,0,0);
946 jet1->SetFirstMother(6);
954 AliDebug(1,Form(
"HERWIG Jet 1: mother %d, status %d, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
955 jet1->GetFirstMother(),jet1->GetStatusCode(),jet1->Pt(),jet1->Energy(),jet1->Phi()*TMath::RadToDeg(),jet1->Eta()));
961 if(parton2->PdgCode()!=22)
965 if(tmp->GetFirstDaughter()==-1)
return fJetsList;
967 tmp = mcevent->GetTrack(tmp->GetFirstDaughter());
968 pdg = tmp->PdgCode();
972 TParticle *jet2 =
new TParticle(94, 21, -1, -1, -1, -1, tmp->Px(),tmp->Py(),tmp->Pz(),tmp->E(), 0,0,0,0);
974 jet2->SetFirstMother(7);
979 AliDebug(2,Form(
"HERWIG Jet 2: mother %d, status %d, pt %2.2f,E %2.2f, phi %2.2f, eta %2.2f",
980 jet2->GetFirstMother(),jet2->GetStatusCode(),jet2->Pt(),jet2->Energy(),jet2->Phi()*TMath::RadToDeg(),jet2->Eta()));
1001 const AliMCEvent* mcevent,
1003 Bool_t & ok,
Int_t & daughlabel, TVector3 & prodVertex)
1009 AliWarning(
"MCEvent is not available, check analysis settings in configuration file!!");
1015 Int_t nprimaries = mcevent->GetNumberOfTracks();
1016 if(label < 0 || label >= nprimaries)
1022 AliVParticle * momP = mcevent->GetTrack(label);
1023 daughlabel = momP->GetDaughterLabel(idaugh);
1025 if(daughlabel < 0 || daughlabel >= nprimaries)
1031 AliVParticle * daughP = mcevent->GetTrack(daughlabel);
1032 fDaughMom.SetPxPyPzE(daughP->Px(),daughP->Py(),daughP->Pz(),daughP->E());
1033 pdg = daughP->PdgCode();
1034 status = daughP->MCStatusCode();
1035 prodVertex.SetXYZ(daughP->Xv(),daughP->Yv(),daughP->Zv());
1049 return GetMother(label,mcevent,pdg,status, ok,momlabel);
1058 Int_t momlabel = -1;
1060 return GetMother(label,mcevent,pdg,status, ok,momlabel);
1073 AliWarning(
"MCEvent is not available, check analysis settings in configuration file, STOP!!");
1079 Int_t nprimaries = mcevent->GetNumberOfTracks();
1080 if(label < 0 || label >= nprimaries)
1086 AliVParticle * momP = mcevent->GetTrack(label);
1087 fMotherMom.SetPxPyPzE(momP->Px(),momP->Py(),momP->Pz(),momP->E());
1088 pdg = momP->PdgCode();
1089 status = momP->MCStatusCode();
1090 momlabel = momP->GetMother();
1101 const AliMCEvent* mcevent,
1108 AliWarning(
"MCEvent is not available, check analysis settings in configuration file!!");
1114 Int_t nprimaries = mcevent->GetNumberOfTracks();
1115 if ( label < 0 || label >= nprimaries )
1122 AliVParticle * momP = mcevent->GetTrack(label);
1124 if(momP->PdgCode()==
pdg)
1126 AliDebug(2,
"PDG of mother is already the one requested!");
1127 fGMotherMom.SetPxPyPzE(momP->Px(),momP->Py(),momP->Pz(),momP->E());
1133 Int_t grandmomLabel = momP->GetMother();
1134 Int_t grandmomPDG = -1;
1135 AliVParticle * grandmomP = 0x0;
1137 while (grandmomLabel >=0 )
1139 grandmomP = mcevent->GetTrack(grandmomLabel);
1140 grandmomPDG = grandmomP->PdgCode();
1141 if(grandmomPDG==pdg)
1144 momlabel = grandmomLabel;
1145 fGMotherMom.SetPxPyPzE(grandmomP->Px(),grandmomP->Py(),grandmomP->Pz(),grandmomP->E());
1149 grandmomLabel = grandmomP->GetMother();
1152 if(grandmomPDG!=pdg) AliInfo(Form(
"Mother with PDG %d, NOT found!",pdg));
1164 Int_t & grandMomLabel,
Int_t & greatMomLabel)
1170 AliWarning(
"MCEvent is not available, check analysis settings in configuration file, STOP!!");
1176 Int_t nprimaries = mcevent->GetNumberOfTracks();
1177 if ( label < 0 || label >= nprimaries )
1183 AliVParticle * momP = mcevent->GetTrack(label);
1185 grandMomLabel = momP->GetMother();
1187 AliVParticle * grandmomP = 0x0;
1189 if(grandMomLabel >=0 )
1191 grandmomP = mcevent->GetTrack(grandMomLabel);
1192 pdg = grandmomP->PdgCode();
1193 status = grandmomP->MCStatusCode();
1195 fGMotherMom.SetPxPyPzE(grandmomP->Px(),grandmomP->Py(),grandmomP->Pz(),grandmomP->E());
1196 greatMomLabel = grandmomP->GetMother();
1213 AliWarning(
"MCEvent is not available, check analysis settings in configuration file, STOP!!");
1219 Int_t nprimaries = mcevent->GetNumberOfTracks();
1220 if ( label < 0 || label >= nprimaries )
1226 AliVParticle * momP = mcevent->GetTrack(label);
1228 Int_t grandmomLabel = momP->GetMother();
1229 Int_t grandmomPDG = -1;
1230 AliVParticle * grandmomP = 0x0;
1232 while (grandmomLabel >=0 )
1234 grandmomP = mcevent->GetTrack(grandmomLabel);
1235 grandmomPDG = grandmomP->PdgCode();
1237 if(grandmomPDG==pdg)
break;
1239 grandmomLabel = grandmomP->GetMother();
1242 if(grandmomPDG==pdg && grandmomP->GetNDaughters()==2)
1244 AliVParticle * d1 = mcevent->GetTrack(grandmomP->GetDaughterLabel(0));
1245 AliVParticle * d2 = mcevent->GetTrack(grandmomP->GetDaughterLabel(1));
1247 if(d1->PdgCode() == 22 && d1->PdgCode() == 22)
1249 asym = (d1->E()-d2->E())/grandmomP->E();
1250 fDaughMom .SetPxPyPzE(d1->Px(),d1->Py(),d1->Pz(),d1->E());
1251 fDaughMom2.SetPxPyPzE(d2->Px(),d2->Py(),d2->Pz(),d2->E());
1258 AliInfo(Form(
"Mother with PDG %d, not found! \n",pdg));
1272 AliWarning(
"MCEvent is not available, check analysis settings in configuration file, STOP!!");
1278 Int_t nprimaries = mcevent->GetNumberOfTracks();
1279 if ( label < 0 || label >= nprimaries )
1285 AliVParticle * momP = mcevent->GetTrack(label);
1289 return momP->GetNDaughters();
1300 AliMCEvent* mcevent,
1303 Int_t ancPDG = 0, ancStatus = -1;
1304 TVector3 prodVertex;
1306 Int_t noverlaps = 0;
1309 for (
UInt_t ilab = 1; ilab < nlabels; ilab++ )
1323 else if ( ( ancPDG==111 || ancPDG==221 ) &&
1325 ( (mesonLabel != ancLabel) && mesonLabel >=0 ) )
1330 else if( ancPDG!=22 && TMath::Abs(ancPDG)!=11 && ancPDG != 111 && ancPDG != 221 )
1336 if( !overlap ) continue ;
1346 Int_t mpdg = -999999, gpdg = -1;
1347 Int_t mstatus = -1, gstatus = -1;
1348 Int_t gLabel = -1, ggLabel = -1;
1350 GetMother (label[ilab],mcevent,mpdg,mstatus,mOK);
1352 GetGrandMother(label[ilab],mcevent,gpdg,gstatus,gOK, gLabel,ggLabel);
1356 if( ( mpdg == 22 || TMath::Abs(mpdg==11) ) &&
1357 ( gpdg == 22 || TMath::Abs(gpdg==11) ) &&
1360 Int_t labeltmp = gLabel;
1361 while( ( gpdg == 22 || TMath::Abs(gpdg==11) ) && gLabel >=0 )
1368 overpdg [noverlaps-1] = mpdg;
1369 overlabel[noverlaps-1] = label[ilab];
1383 printf(
"***** Print: %s %s ******\n", GetName(), GetTitle() ) ;
1385 printf(
"Debug level = %d\n",
fDebug);
1401 AliVParticle * primary = 0;
1402 Int_t index = label;
1405 AliInfo(
"*********** Start");
1408 primary = mcevent->GetTrack(index);
1412 AliWarning(
"primary pointer not available!!");
1418 if ( primary->E() == TMath::Abs(primary->Pz()) ||
1419 (primary->E() - primary->Pz()) < 1e-3 ||
1420 (primary->E() + primary->Pz()) < 0 )
1423 eta = primary->Eta();
1427 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"
1428 " mother %d, n daughters %d, d1 %d, d2 %d\n",
1429 gener,index,TDatabasePDG::Instance()->GetParticle(pdg)->GetName(),pdg,primary->MCStatusCode(),primary->IsPhysicalPrimary(),
1430 primary->E(),primary->Pt(),primary->Px(),primary->Py(),primary->Pz(),
1431 eta,primary->Phi()*TMath::RadToDeg(),
1432 primary->GetMother(),primary->GetNDaughters(),primary->GetDaughterLabel(0), primary->GetDaughterLabel(1));
1435 index = primary->GetMother();
1436 if ( nGenerMax < gener ) index = -1;
1439 AliInfo(
"*********** End");
1451 (
"Tag %d: photon %d, conv %d, prompt %d, frag %d, isr %d,\n"
1452 " pi0 decay %d, eta decay %d, other decay %d, lost decay %d, in calo decay %d, pi0 %d, eta %d,\n"
1453 " electron %d, muon %d,pion %d, proton %d, neutron %d,\n"
1454 " 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)
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)