]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added extraction of V0s origin
authormaszyman <maszyman@cern.ch>
Thu, 16 Oct 2014 14:01:09 +0000 (16:01 +0200)
committermaszyman <maszyman@cern.ch>
Thu, 16 Oct 2014 14:07:35 +0000 (16:07 +0200)
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorV0.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorV0.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoModelHiddenInfo.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoModelHiddenInfo.h

index 35edbfee246eba679f7b6fa89b734af933408df0..dd8672dc2079f411aaf5c8a750c53059cda8daed 100644 (file)
@@ -18,7 +18,9 @@ AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID():
   fTOFNSigma(0),
   fTPCNSigma(0),
   fTPCTOFNSigma(0),
-  fTPCvsTOFNSigma(0)
+  fTPCvsTOFNSigma(0),
+  fParticleOrigin(0),
+  fParticleId(0)
 {
   // Default constructor
   fTPCdEdx =  new TH2D("TPCdEdx", "TPC dEdx vs. momentum", 100, 0.0, 5.0, 250, 0.0, 500.0);
@@ -27,6 +29,8 @@ AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID():
   fTPCNSigma = new TH2D("TPCNSigma","TPC NSigma vs. momentum", 100, 0.0, 5.0, 100, -5.0, 5.0);
   fTPCTOFNSigma = new TH2D("TPCTOFNSigma","TPC & TOF NSigma vs. momentum", 100, 0.0, 5.0, 100, 0.0, 10.0);
   fTPCvsTOFNSigma = new TH2D("TPCvsTOFNSigma","TPC vs TOF Nsigma",100, -5.0, 5.0, 100, -5.0, 5.0);
+  fParticleOrigin =  new TH1D("POrigin", "Mothers PDG Codes", 6000, 0.0, 6000.0);
+  fParticleId =  new TH1D("PId", "Particle PDG Codes", 6000, 0.0, 6000.0);
 
 }
 
@@ -38,7 +42,9 @@ AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const char *aName,
   fTOFNSigma(0),
   fTPCNSigma(0),
   fTPCTOFNSigma(0),
-  fTPCvsTOFNSigma(0)
+  fTPCvsTOFNSigma(0),
+  fParticleOrigin(0),
+  fParticleId(0)
 {
   // Normal constructor
   char name[200];
@@ -60,6 +66,12 @@ AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const char *aName,
 
   snprintf(name, 200, "TPCvsTOFNSigma%s", aName);
   fTPCvsTOFNSigma = new TH2D(name,"TPC vs TOF Nsigma",100, -5.0, 5.0, 100, -5.0, 5.0);
+
+  snprintf(name, 200, "POrigin%s", aName);
+  fParticleOrigin =  new TH1D(name, "Mothers PDG Codes", 6000, 0.0, 6000.0);
+
+  snprintf(name, 200, "PId%s", aName);
+  fParticleId =  new TH1D(name, "Particle PDG Codes", 6000, 0.0, 6000.0);
 }
 
 AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const AliFemtoCutMonitorParticlePID &aCut):
@@ -70,7 +82,9 @@ AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const AliFemtoCutMo
   fTOFNSigma(0),
   fTPCNSigma(0),
   fTPCTOFNSigma(0),
-  fTPCvsTOFNSigma(0)
+  fTPCvsTOFNSigma(0),
+  fParticleOrigin(0),
+  fParticleId(0)
 
 {
   // copy constructor
@@ -88,6 +102,12 @@ AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const AliFemtoCutMo
 
   if (fTPCTOFNSigma) delete fTPCTOFNSigma;
   fTPCTOFNSigma= new TH2D(*aCut.fTPCTOFNSigma);
+
+  if (fParticleOrigin) delete fParticleOrigin;
+  fParticleOrigin= new TH1D(*aCut.fParticleOrigin);
+
+  if (fParticleId) delete fParticleId;
+  fParticleId= new TH1D(*aCut.fParticleId);
 }
 
 AliFemtoCutMonitorParticlePID::~AliFemtoCutMonitorParticlePID()
@@ -99,6 +119,8 @@ AliFemtoCutMonitorParticlePID::~AliFemtoCutMonitorParticlePID()
   delete fTPCNSigma;
   delete fTPCTOFNSigma;
   delete fTPCvsTOFNSigma;
+  delete fParticleOrigin;
+  delete fParticleId;
 
 }
 
@@ -126,6 +148,12 @@ AliFemtoCutMonitorParticlePID& AliFemtoCutMonitorParticlePID::operator=(const Al
   if(fTPCvsTOFNSigma) delete fTPCvsTOFNSigma;
   fTPCvsTOFNSigma = new TH2D(*aCut.fTPCvsTOFNSigma);
 
+  if (fParticleOrigin) delete fParticleOrigin;
+  fParticleOrigin= new TH1D(*aCut.fParticleOrigin);
+
+  if (fParticleId) delete fParticleId;
+  fParticleId= new TH1D(*aCut.fParticleId);
+
   return *this;
 }
 
@@ -150,6 +178,14 @@ void AliFemtoCutMonitorParticlePID::Fill(const AliFemtoTrack* aTrack)
   fTPCdEdx->Fill(tMom, tdEdx);
   fTOFTime->Fill(tMom, tTOF);
 
+  AliFemtoModelHiddenInfo *tInfo = (AliFemtoModelHiddenInfo*)aTrack->GetHiddenInfo();
+  if(tInfo!=NULL) {
+    Int_t partID = TMath::Abs(tInfo->GetPDGPid());
+    Int_t motherID = TMath::Abs(tInfo->GetMotherPdgCode());
+
+    fParticleId->Fill(partID);
+    fParticleOrigin->Fill(motherID);
+  }
   //  float vp= aTrack->VTOF();
   //     if (vp > 0.) {
   //         fTOFTime->Fill(tMom, tTOF);
@@ -186,6 +222,8 @@ void AliFemtoCutMonitorParticlePID::Write()
   fTPCNSigma->Write();
   fTPCTOFNSigma->Write();
   fTPCvsTOFNSigma->Write();
+  fParticleId->Write();
+  fParticleOrigin->Write();
 }
 
 TList *AliFemtoCutMonitorParticlePID::GetOutputList()
@@ -197,6 +235,8 @@ TList *AliFemtoCutMonitorParticlePID::GetOutputList()
   tOutputList->Add(fTPCNSigma);
   tOutputList->Add(fTPCTOFNSigma);
   tOutputList->Add(fTPCvsTOFNSigma);
+  tOutputList->Add(fParticleId);
+  tOutputList->Add(fParticleOrigin);
 
   return tOutputList;
 }
index 8072fc11a3eebee32dad54ffd626f9df8fe441f6..6c51f1be37f4e4522cfd473f9c8d28c78977148f 100644 (file)
@@ -53,7 +53,8 @@ private:
   TH2D *fTPCNSigma;   // TPC NSigma values vs mom
   TH2D *fTPCTOFNSigma;   // TPC^2+ TOF^2 NSigma values vs mom
   TH2D *fTPCvsTOFNSigma; // TPC vs TOF
-  
+  TH1D *fParticleOrigin; //particle origin from MC
+  TH1D *fParticleId;     //true particle identification from MC
 
 };
 
index 2d1254335abe13f5e42eeec0d9b739066201f425..66e2f7dfb991ac3d7304e28b3c70201cd5390967 100644 (file)
@@ -31,7 +31,9 @@ AliFemtoCutMonitorV0::AliFemtoCutMonitorV0():
   fnsigmaPosL(0),
   fnsigmaNegL(0),
   fnsigmaPosAL(0),
-  fnsigmaNegAL(0)
+  fnsigmaNegAL(0),
+  fParticleOrigin(0),
+  fParticleId(0)
 {
   // Default constructor
   fLambdaMass = new TH1F("LambdaMass", "Mass Assuming Lambda Hypothesis", 10000, 0, 5);
@@ -58,6 +60,9 @@ AliFemtoCutMonitorV0::AliFemtoCutMonitorV0():
   fnsigmaPosAL = new TH1D("fnsigmaPosAL","Number of sigmas of positive AntiLambda daughters",200,-8,8);
   fnsigmaNegAL = new TH1D("fnsigmaNegAL","Number of sigmas of negative AntiLambda daughters",200,-8,8);
 
+  fParticleOrigin =  new TH1D("POrigin", "Mothers PDG Codes", 6000, 0.0, 6000.0);
+  fParticleId =  new TH1D("PId", "Particle PDG Codes", 6000, 0.0, 6000.0);
+
   fLambdaMass->Sumw2();
   fAntiLambdaMass->Sumw2();
   fK0ShortMass->Sumw2();
@@ -102,7 +107,9 @@ AliFemtoCutMonitorV0::AliFemtoCutMonitorV0(const char *aName):
   fnsigmaPosL(0),
   fnsigmaNegL(0),
   fnsigmaPosAL(0),
-  fnsigmaNegAL(0)
+  fnsigmaNegAL(0),
+  fParticleOrigin(0),
+  fParticleId(0)
 {
   // Normal constructor
   char name[200];
@@ -149,6 +156,12 @@ AliFemtoCutMonitorV0::AliFemtoCutMonitorV0(const char *aName):
   snprintf(name, 200, " fnsigmaNegAL%s", aName);
   fnsigmaNegAL = new TH1D(name,"Number of sigmas of negative AntiLambda daughters",200,-10,10);
 
+  snprintf(name, 200, "POrigin%s", aName);
+  fParticleOrigin =  new TH1D(name, "Mothers PDG Codes", 6000, 0.0, 6000.0);
+
+  snprintf(name, 200, "PId%s", aName);
+  fParticleId =  new TH1D(name, "Particle PDG Codes", 6000, 0.0, 6000.0);
+
   fLambdaMass->Sumw2();
   fAntiLambdaMass->Sumw2();
   fK0ShortMass->Sumw2();
@@ -193,7 +206,9 @@ AliFemtoCutMonitorV0::AliFemtoCutMonitorV0(const AliFemtoCutMonitorV0 &aCut):
   fnsigmaPosL(0),
   fnsigmaNegL(0),
   fnsigmaPosAL(0),
-  fnsigmaNegAL(0)
+  fnsigmaNegAL(0),
+  fParticleOrigin(0),
+  fParticleId(0)
 {
   // copy constructor
   if (fLambdaMass) delete fLambdaMass;
@@ -239,6 +254,11 @@ AliFemtoCutMonitorV0::AliFemtoCutMonitorV0(const AliFemtoCutMonitorV0 &aCut):
   if(fnsigmaNegAL) delete fnsigmaNegAL;
   fnsigmaNegAL = new TH1D(*aCut.fnsigmaNegAL);
 
+  if (fParticleOrigin) delete fParticleOrigin;
+  fParticleOrigin= new TH1D(*aCut.fParticleOrigin);
+  if (fParticleId) delete fParticleId;
+  fParticleId= new TH1D(*aCut.fParticleId);
+
   fLambdaMass->Sumw2();
   fAntiLambdaMass->Sumw2();
   fK0ShortMass->Sumw2();
@@ -285,6 +305,9 @@ AliFemtoCutMonitorV0::~AliFemtoCutMonitorV0()
   delete fnsigmaNegL;
   delete fnsigmaPosAL;
   delete fnsigmaNegAL;
+
+  delete fParticleOrigin;
+  delete fParticleId;
 }
 
 AliFemtoCutMonitorV0& AliFemtoCutMonitorV0::operator=(const AliFemtoCutMonitorV0& aCut)
@@ -336,6 +359,11 @@ AliFemtoCutMonitorV0& AliFemtoCutMonitorV0::operator=(const AliFemtoCutMonitorV0
   if(fnsigmaNegAL) delete fnsigmaNegAL;
   fnsigmaNegAL = new TH1D(*aCut.fnsigmaNegAL);
 
+  if (fParticleOrigin) delete fParticleOrigin;
+  fParticleOrigin= new TH1D(*aCut.fParticleOrigin);
+  if (fParticleId) delete fParticleId;
+  fParticleId= new TH1D(*aCut.fParticleId);
+
   fLambdaMass->Sumw2();
   fAntiLambdaMass->Sumw2();
   fK0ShortMass->Sumw2();
@@ -393,6 +421,15 @@ void AliFemtoCutMonitorV0::Fill(const AliFemtoV0* aV0)
   fnsigmaNegL->Fill(aV0->NegNSigmaTPCPi());
   fnsigmaNegAL->Fill(aV0->NegNSigmaTPCP());
   fnsigmaPosAL->Fill(aV0->PosNSigmaTPCPi());
+
+  AliFemtoModelHiddenInfo *tInfo = (AliFemtoModelHiddenInfo*)aV0->GetHiddenInfo();
+  if(tInfo!=NULL) {
+    Int_t partID = TMath::Abs(tInfo->GetPDGPid());
+    Int_t motherID = TMath::Abs(tInfo->GetMotherPdgCode());
+
+    fParticleId->Fill(partID);
+    fParticleOrigin->Fill(motherID);
+  }
 }
 
 void AliFemtoCutMonitorV0::Write()
@@ -419,6 +456,9 @@ void AliFemtoCutMonitorV0::Write()
   fnsigmaNegL->Write();
   fnsigmaPosAL->Write();
   fnsigmaNegAL->Write();
+
+  fParticleId->Write();
+  fParticleOrigin->Write();
 }
 
 TList *AliFemtoCutMonitorV0::GetOutputList()
@@ -447,5 +487,8 @@ TList *AliFemtoCutMonitorV0::GetOutputList()
   tOutputList->Add(fnsigmaPosAL);
   tOutputList->Add(fnsigmaNegAL);
 
+  tOutputList->Add(fParticleId);
+  tOutputList->Add(fParticleOrigin);
+
   return tOutputList;
 }
index 15b292bba8399c70c7045301aed89698062ac216..66f973402e08f3f8cfcc6a252abdc17a4a8b8c8e 100644 (file)
@@ -67,6 +67,9 @@ private:
   TH1D *fnsigmaNegL;
   TH1D *fnsigmaPosAL;
   TH1D *fnsigmaNegAL;
+
+  TH1D *fParticleOrigin; //particle origin from MC
+  TH1D *fParticleId;     //true particle identification from MC
 };
 
 #endif
index 8e9884d1f0df53bcc46a9dc9955811891da18942..126932dd705bda72be79e292007242089327cb6c 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "AliAODpidUtil.h"
 #include "AliAnalysisUtils.h"
+#include "AliGenHijingEventHeader.h"
 
 ClassImp(AliFemtoEventReaderAOD)
 
@@ -283,6 +284,8 @@ AliFemtoEvent* AliFemtoEventReaderAOD::CopyAODtoFemtoEvent()
   // and transfers the neccessary information into
   // the internal AliFemtoEvent
 
+  Int_t numberOfLastHijingLabel=0;
+
   AliFemtoEvent *tEvent = new AliFemtoEvent();
 
   // setting global event characteristics
@@ -305,6 +308,17 @@ AliFemtoEvent* AliFemtoEventReaderAOD::CopyAODtoFemtoEvent()
     if (!mcH) {
       cout << "AOD MC information requested, but no header found!" << endl;
     }
+    else {
+      TIter next(mcH->GetCocktailHeaders());
+      // Loop over the cocktail headers
+      while (const TObject *obj=next()){
+       // Check whether it's a Hijing header
+       // const AliGenHijingEventHeader* hijingHeader = dynamic_cast<const AliGenHijingEventHeader*>(obj);
+       // if(hijingHeader) {
+       //   numberOfLastHijingLabel=hijingHeader->NProduced()-1;
+       // } // End of found the hijing header
+      }
+    }
 
     mcP = (TClonesArray *) fEvent->FindListObject(AliAODMCParticle::StdBranchName());
     if (!mcP) {
@@ -313,23 +327,22 @@ AliFemtoEvent* AliFemtoEventReaderAOD::CopyAODtoFemtoEvent()
   }
 
   tEvent->SetReactionPlaneAngle(fEvent->GetHeader()->GetQTheta(0)/2.0);
-
-  Int_t *motherids=0;
-  if (mcP) {
-    const int motherTabSize = ((AliAODMCParticle *) mcP->At(mcP->GetEntries()-1))->GetLabel();
-    motherids = new int[motherTabSize+1];
-    for (int ip=0; ip<motherTabSize+1; ip++) motherids[ip] = 0;
-
-    // Read in mother ids
-    AliAODMCParticle *motherpart;
-    for (int ip=0; ip<mcP->GetEntries(); ip++) {
-      motherpart = (AliAODMCParticle *) mcP->At(ip);
-      if (motherpart->GetDaughter(0) > 0)
-        motherids[motherpart->GetDaughter(0)] = ip;
-      if (motherpart->GetDaughter(1) > 0)
-        motherids[motherpart->GetDaughter(1)] = ip;
-    }
-  }
+  // Int_t *motherids=0;
+  // if (mcP) {
+  //   const int motherTabSize = ((AliAODMCParticle *) mcP->At(mcP->GetEntries()-1))->GetLabel();
+  //   motherids = new int[motherTabSize+1];
+  //   for (int ip=0; ip<motherTabSize+1; ip++) motherids[ip] = 0;
+
+  //   // Read in mother ids
+  //   AliAODMCParticle *motherpart;
+  //   for (int ip=0; ip<mcP->GetEntries(); ip++) {
+  //     motherpart = (AliAODMCParticle *) mcP->At(ip);
+  //     if (motherpart->GetDaughter(0) > 0)
+  //       motherids[motherpart->GetDaughter(0)] = ip;
+  //     if (motherpart->GetDaughter(1) > 0)
+  //       motherids[motherpart->GetDaughter(1)] = ip;
+  //   }
+  // }
 
   //AliAnalysisUtils
   if(fisPileUp||fpA2013)
@@ -596,8 +609,14 @@ AliFemtoEvent* AliFemtoEventReaderAOD::CopyAODtoFemtoEvent()
     if (mcP) {
       // Fill the hidden information with the simulated data
       //         Int_t pLabel = aodtrack->GetLabel();
-      AliAODMCParticle *tPart = GetParticleWithLabel(mcP, (TMath::Abs(aodtrack->GetLabel())));
-
+      //      AliAODMCParticle *tPart = GetParticleWithLabel(mcP, (TMath::Abs(aodtrack->GetLabel())));
+      AliAODMCParticle *tPart;
+      if(aodtrack->GetLabel() > -1 ) {
+       tPart = (AliAODMCParticle*)mcP->At(aodtrack->GetLabel());
+      }
+      else {
+       tPart = NULL;
+      }
       AliFemtoModelGlobalHiddenInfo *tInfo = new AliFemtoModelGlobalHiddenInfo();
       double fpx=0.0, fpy=0.0, fpz=0.0, fpt=0.0;
       if (!tPart) {
@@ -635,10 +654,13 @@ AliFemtoEvent* AliFemtoEventReaderAOD::CopyAODtoFemtoEvent()
         //       fpt *= 1e13;
 
         //      cout << "Looking for mother ids " << endl;
-        if (motherids[TMath::Abs(aodtrack->GetLabel())]>0) {
-          //   cout << "Got mother id" << endl;
-          AliAODMCParticle *mother = GetParticleWithLabel(mcP, motherids[TMath::Abs(aodtrack->GetLabel())]);
-          // Check if this is the same particle stored twice on the stack
+
+        //if (motherids[TMath::Abs(aodtrack->GetLabel())]>0) {
+        if(tPart->GetMother() > -1) { //MC particle has a mother
+       //      cout << "Got mother id" << endl;
+         //          AliAODMCParticle *mother = GetParticleWithLabel(mcP, motherids[TMath::Abs(aodtrack->GetLabel())]);
+          AliAODMCParticle *mother = (AliAODMCParticle*)mcP->At(tPart->GetMother());
+         // Check if this is the same particle stored twice on the stack
           if (mother) {
             if ((mother->GetPdgCode() == tPart->GetPdgCode() || (mother->Px() == tPart->Px()))) {
               // It is the same particle
@@ -659,6 +681,9 @@ AliFemtoEvent* AliFemtoEventReaderAOD::CopyAODtoFemtoEvent()
               //             fpt = mother->T() *1e13*3e10;
 
             }
+           else { //particle's mother exists and the information about it can be added to hiddeninfo:
+             tInfo->SetMotherPdgCode(mother->GetPdgCode());
+           }
           }
         }
 
@@ -813,7 +838,7 @@ AliFemtoEvent* AliFemtoEventReaderAOD::CopyAODtoFemtoEvent()
     tEvent->SetNormalizedMult(multV0);
   }
 
-  if (mcP) delete [] motherids;
+  // if (mcP) delete [] motherids;
 
   // cout<<"end of reading nt "<<nofTracks<<" real number "<<realnofTracks<<endl;
 
@@ -828,7 +853,41 @@ AliFemtoEvent* AliFemtoEventReaderAOD::CopyAODtoFemtoEvent()
       if(aodv0->GetCharge()!=0) continue;
       if(aodv0->ChargeProng(0)==aodv0->ChargeProng(1)) continue;
       if(aodv0->CosPointingAngle(fV1)<0.998) continue;
+
+      AliAODTrack* daughterTrackPos = (AliAODTrack*)aodv0->GetDaughter(0); //getting positive daughter track
+      AliAODTrack* daughterTrackNeg = (AliAODTrack*)aodv0->GetDaughter(1); //getting negative daughter track
+      if(!daughterTrackPos) continue; //Daughter tracks must exist
+      if(!daughterTrackNeg) continue;
+      if(daughterTrackNeg->Charge() == daughterTrackPos->Charge() ) continue; //and have different charge
+
       AliFemtoV0* trackCopyV0 = CopyAODtoFemtoV0(aodv0);
+      if(mcP) {
+       daughterTrackPos->SetAODEvent(fEvent);
+       daughterTrackNeg->SetAODEvent(fEvent);
+       if(daughterTrackPos->GetLabel() > 0 && daughterTrackNeg->GetLabel() > 0 ) {
+         AliAODMCParticle* mcParticlePos = (AliAODMCParticle*)mcP->At(daughterTrackPos->GetLabel());
+         AliAODMCParticle* mcParticleNeg = (AliAODMCParticle*)mcP->At(daughterTrackNeg->GetLabel() );
+         if((mcParticlePos!=NULL) && (mcParticleNeg!=NULL)){
+           //mcparticle->GetMother() will return a "-1" if the particle doesn't have a true mother (i.e. it's a fake track or primary)
+           int motherOfPosID = mcParticlePos->GetMother();
+           int motherOfNegID = mcParticleNeg->GetMother();
+           if ((motherOfPosID > -1) && (motherOfPosID == motherOfNegID)){
+             AliFemtoModelHiddenInfo *tInfo = new AliFemtoModelHiddenInfo();
+             // Both daughter tracks refer to the same mother.  Return the MCParticle index of that mother.
+             AliAODMCParticle *v0 = (AliAODMCParticle*)mcP->At(motherOfPosID); //our V0 particle
+             // if(v0->GetLabel() > numberOfLastHijingLabel )  //if true - the particle is injected
+                  //continue;
+             tInfo->SetPDGPid(v0->GetPdgCode());
+             int v0MotherId = v0->GetMother();
+             if(v0MotherId>-1) { //particle has a mother
+               AliAODMCParticle* motherOfV0 = (AliAODMCParticle*)mcP->At(v0MotherId);
+               tInfo->SetMotherPdgCode(motherOfV0->GetPdgCode());
+             }
+             trackCopyV0->SetHiddenInfo(tInfo);
+           }
+         }
+       }
+      }
       tEvent->V0Collection()->push_back(trackCopyV0);
       count_pass++;
       //cout<<"Pushback v0 to v0collection"<<endl;
index 006c979d42e6b244af29feb7a6d77a058b60b8c2..0950e7c0ee3fe5daa7d01e92e666d08c874f5562 100644 (file)
@@ -12,6 +12,7 @@ AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo() :
   fTrueMomentum(0),
   fEmissionPoint(0),
   fPDGPid(0),
+  fMotherPdg(0),
   fMass(0),
   fTrueMomentumPos(0),
   fEmissionPointPos(0),
@@ -30,6 +31,7 @@ AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo(const AliFemtoModelHiddenInfo &
   fTrueMomentum(0),
   fEmissionPoint(0),
   fPDGPid(0),
+  fMotherPdg(0),
   fMass(0),
   fTrueMomentumPos(0),
   fEmissionPointPos(0),
@@ -46,6 +48,7 @@ AliFemtoModelHiddenInfo::AliFemtoModelHiddenInfo(const AliFemtoModelHiddenInfo &
   if (aInfo.GetEmissionPoint())
     SetEmissionPointPos(aInfo.GetEmissionPoint());
   fPDGPid = aInfo.GetPDGPid();
+  fMotherPdg = aInfo.GetMotherPdgCode();
   fMass = aInfo.GetMass();
 
   if (aInfo.GetTrueMomentumPos())
@@ -89,6 +92,7 @@ AliFemtoModelHiddenInfo& AliFemtoModelHiddenInfo::operator=(const AliFemtoModelH
     SetEmissionPoint(aInfo.GetEmissionPoint());
   else SetEmissionPoint(0);
   fPDGPid = aInfo.GetPDGPid();
+  fMotherPdg = aInfo.GetMotherPdgCode();
   fMass = aInfo.GetMass();
 
   if (fTrueMomentumPos) delete fTrueMomentumPos;
@@ -130,6 +134,10 @@ Int_t                  AliFemtoModelHiddenInfo::GetPDGPid() const
 {
   return fPDGPid;
 }
+Int_t                  AliFemtoModelHiddenInfo::GetMotherPdgCode() const
+{
+  return fMotherPdg;
+}
 //_____________________________________________
 Double_t                  AliFemtoModelHiddenInfo::GetMass() const
 {
@@ -205,6 +213,10 @@ void                   AliFemtoModelHiddenInfo::SetPDGPid(Int_t aPid)
 {
   fPDGPid = aPid;
 }
+void                   AliFemtoModelHiddenInfo::SetMotherPdgCode(Int_t aMotherPdg)
+{
+  fMotherPdg = aMotherPdg;
+}
 //_____________________________________________
 void                   AliFemtoModelHiddenInfo::SetMass(Double_t aMass)
 {
@@ -221,7 +233,7 @@ void                   AliFemtoModelHiddenInfo::SetEmissionPoint(Double_t aRx, D
     fEmissionPoint->SetT(aT);
   }
   else {
-    fEmissionPoint = new AliFemtoLorentzVector(aRx, aRy, aRz, aT); 
+    fEmissionPoint = new AliFemtoLorentzVector(aRx, aRy, aRz, aT);
   }
 }
 
@@ -331,7 +343,7 @@ void                   AliFemtoModelHiddenInfo::SetEmissionPointPos(Double_t aRx
     fEmissionPointPos->SetT(aT);
   }
   else {
-    fEmissionPointPos = new AliFemtoLorentzVector(aRx, aRy, aRz, aT); 
+    fEmissionPointPos = new AliFemtoLorentzVector(aRx, aRy, aRz, aT);
   }
 }
 
@@ -441,7 +453,7 @@ void                   AliFemtoModelHiddenInfo::SetEmissionPointNeg(Double_t aRx
     fEmissionPointNeg->SetT(aT);
   }
   else {
-    fEmissionPointNeg = new AliFemtoLorentzVector(aRx, aRy, aRz, aT); 
+    fEmissionPointNeg = new AliFemtoLorentzVector(aRx, aRy, aRz, aT);
   }
 }
 
index e8429bb32c8007606018a7d1a460377a40f9e552..487fa376a79ac197719ab4fe3e3946738547aff3 100644 (file)
@@ -26,6 +26,7 @@ public:
   AliFemtoThreeVector   *GetTrueMomentum() const;
   AliFemtoLorentzVector *GetEmissionPoint() const;
   Int_t                  GetPDGPid() const;
+  Int_t                  GetMotherPdgCode() const;
   Double_t               GetMass() const;
 
   AliFemtoThreeVector   *GetTrueMomentumPos() const;
@@ -45,6 +46,7 @@ public:
   void                   SetEmissionPoint(const AliFemtoLorentzVector& aPos);
   void                   SetEmissionPoint(Double_t aRx, Double_t aRy, Double_t aRz, Double_t aT);
   void                   SetPDGPid(Int_t aPid);
+  void                   SetMotherPdgCode(Int_t motherPdg);
   void                   SetMass(Double_t aMass);
 
   void                   SetTrueMomentumPos(AliFemtoThreeVector *aMom);
@@ -68,13 +70,14 @@ public:
 // !!! MANDATORY !!!
 // --- Copy the hidden info from AliFemtoTrack to AliFemtoParticle
   virtual AliFemtoHiddenInfo* Clone() const;
-  
+
  protected:
   virtual AliFemtoHiddenInfo* GetParticleHiddenInfo() const;
 
   AliFemtoThreeVector   *fTrueMomentum;  // True (simulated) momentum
   AliFemtoLorentzVector *fEmissionPoint; // Emission point coordinates
   Int_t                  fPDGPid;        // True PID of the particle
+  Int_t                  fMotherPdg;     // PDG code of particle's mother
   Double_t               fMass;          // True particle mass
 
   //daughter particles