]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGDQ/dielectron/AliDielectronMC.h
add proptections (marcel), add GEANT process for MC
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliDielectronMC.h
index 4ce8060001c88cdba1f4b899550cdc4a4de34176..ce4620eb90c3ebbc8b6bf6250b805b65bb386c33 100644 (file)
@@ -14,6 +14,7 @@
 
 #ifndef ROOT_TObject
 #include <TObject.h>
+#include <TMCProcess.h>
 #endif
 class AliESDEvent;
 class AliHFEpid;
@@ -24,6 +25,7 @@ class AliAODTrack;
 class TParticle;
 class AliMCParticle;
 class AliAODMCParticle;
+class AliAODMCHeader;
 
 #include "AliDielectronSignalMC.h"
 #include "AliDielectronPair.h"
@@ -51,6 +53,8 @@ public:
   Int_t GetMCPIDFromStack(const AliESDtrack* _track);             // return MC PID
   Int_t GetMotherPDG(const AliESDtrack* _track);                  // return mother PID from the MC stack
   Int_t GetMotherPDG(const AliAODTrack* _track);                  // return mother PID from the MC stack
+  Int_t GetMotherPDG(const AliMCParticle* _track);                  // return mother PID from the MC stack
+  Int_t GetMotherPDG(const AliAODMCParticle* _track);                  // return mother PID from the MC stack
   Int_t GetMotherPDGFromStack(const AliESDtrack* _track);         // return mother PID from the MC stack
   Int_t GetMCProcess(const AliESDtrack* _track);                  // return process number
   Int_t GetMCProcessFromStack(const AliESDtrack* _track);         // return process number
@@ -64,17 +68,22 @@ public:
   Bool_t IsMotherPdg(const AliVParticle *particle1, const AliVParticle *particle2, Int_t pdgMother);
   Bool_t IsMCMotherToEE(const AliVParticle *particle, Int_t pdgMother);
   Bool_t IsMCTruth(const AliDielectronPair* pair, const AliDielectronSignalMC* signalMC) const;
-  Bool_t IsMCTruth(Int_t ipart, AliDielectronSignalMC* signalMC, Int_t branch);
+  Bool_t IsMCTruth(Int_t label, AliDielectronSignalMC* signalMC, Int_t branch) const;
   Int_t GetMothersLabel(Int_t daughterLabel) const;
   Int_t GetPdgFromLabel(Int_t label) const;
 
+  Bool_t IsPhysicalPrimary(Int_t label) const;  // checks if a particle is physical primary
+  Bool_t CheckGEANTProcess(Int_t label, TMCProcess process) const;
+  Bool_t IsSecondaryFromWeakDecay(Int_t label) const;
+  Bool_t IsSecondaryFromMaterial(Int_t label) const;
+
   Bool_t HaveSameMother(const AliDielectronPair *pair) const;
   
   Int_t GetLabelMotherWithPdg(const AliDielectronPair* pair, Int_t pdgMother);
   Int_t GetLabelMotherWithPdg(const AliVParticle *particle1, const AliVParticle *particle2, Int_t pdgMother);
   
-  AliVParticle* GetMCTrackFromMCEvent(AliVParticle *track);   // return MC track directly from MC event
-  AliVParticle* GetMCTrackFromMCEvent(Int_t itrk) const;           // return MC track directly from MC event
+//   AliVParticle* GetMCTrackFromMCEvent(const AliVParticle *track);   // return MC track directly from MC event
+  AliVParticle* GetMCTrackFromMCEvent(Int_t label) const;           // return MC track directly from MC event
   TParticle* GetMCTrackFromStack(const AliESDtrack* _track);        // return MC track from stack
   AliMCParticle* GetMCTrack(const AliESDtrack* _track);             // return MC track associated with reco track
   AliAODMCParticle* GetMCTrack( const AliAODTrack* _track);          // return MC track associated with reco AOD track
@@ -93,6 +102,8 @@ public:
   void GetDaughters(const TObject *mother, AliVParticle* &d1, AliVParticle* &d2);
   Int_t IsJpsiPrimary(const AliDielectronPair * pair);
   Int_t IsJpsiPrimary(const AliVParticle * pair);
+  Bool_t CheckParticleSource(Int_t label, AliDielectronSignalMC::ESource source) const;
+  Bool_t GetPrimaryVertex(Double_t &primVtxX, Double_t &primVtxY, Double_t &primVtxZ);
 
   AliMCEvent* GetMCEvent() { return fMCEvent; }         // return the AliMCEvent
   
@@ -116,8 +127,10 @@ private:
   Int_t GetLabelMotherWithPdgESD(const AliVParticle *particle1, const AliVParticle *particle2, Int_t pdgMother);
   Int_t GetLabelMotherWithPdgAOD(const AliVParticle *particle1, const AliVParticle *particle2, Int_t pdgMother);
   
-  Bool_t ComparePDG(Int_t particlePDG, Int_t requiredPDG, Bool_t checkBothCharges) const;
-  Bool_t CheckParticleSource(Int_t label, AliDielectronSignalMC::ESource source) const;
+  Bool_t ComparePDG(Int_t particlePDG, Int_t requiredPDG, Bool_t pdgExclusion, Bool_t checkBothCharges) const;
+  Bool_t CheckIsRadiative(Int_t label) const;
+  Bool_t CheckRadiativeDecision(Int_t mLabel, const AliDielectronSignalMC * const signalMC) const;
+
   ClassDef(AliDielectronMC, 0)
 };
 
@@ -126,7 +139,7 @@ private:
 //
 inline Bool_t AliDielectronMC::IsMotherPdg(const AliDielectronPair* pair, Int_t pdgMother)
 {
-  return IsMotherPdg(pair->GetFirstDaughter(),pair->GetSecondDaughter(),pdgMother);
+  return IsMotherPdg(pair->GetFirstDaughterP(),pair->GetSecondDaughterP(),pdgMother);
 }
 //___________________________________________________________
 inline Bool_t AliDielectronMC::IsMotherPdg(const AliVParticle *particle1, const AliVParticle *particle2, Int_t pdgMother){
@@ -134,7 +147,7 @@ inline Bool_t AliDielectronMC::IsMotherPdg(const AliVParticle *particle1, const
 }
 //___________________________________________________________
 inline Int_t AliDielectronMC::GetLabelMotherWithPdg(const AliDielectronPair* pair, Int_t pdgMother){
-  return GetLabelMotherWithPdg(pair->GetFirstDaughter(),pair->GetSecondDaughter(),pdgMother);
+  return GetLabelMotherWithPdg(pair->GetFirstDaughterP(),pair->GetSecondDaughterP(),pdgMother);
 }
 
 #endif