1 #include "AliConversionPhotonBase.h"
6 ClassImp(AliConversionPhotonBase)
8 AliConversionPhotonBase::AliConversionPhotonBase() :
26 fConversionPoint[0]=-999;
27 fConversionPoint[1]=-999;
28 fConversionPoint[2]=-999;
32 AliConversionPhotonBase::AliConversionPhotonBase(const AliConversionPhotonBase & original) :
33 fV0Index(original.fV0Index),
34 fChi2perNDF(original.fChi2perNDF),
35 fTagged(original.fTagged),
36 fIMass(original.fIMass),
37 fPsiPair(original.fPsiPair)
40 fLabel[0] = original.fLabel[0];
41 fLabel[1] = original.fLabel[1];
43 fMCLabel[0]=original.fMCLabel[0];
44 fMCLabel[1]=original.fMCLabel[1];
46 fArmenteros[0]=original.fArmenteros[0];
47 fArmenteros[1]=original.fArmenteros[1];
49 fConversionPoint[0]=original.fConversionPoint[0];
50 fConversionPoint[1]=original.fConversionPoint[1];
51 fConversionPoint[2]=original.fConversionPoint[2];
55 AliConversionPhotonBase::~AliConversionPhotonBase() {
56 // empty standard destructor
61 AliConversionPhotonBase & AliConversionPhotonBase::operator = (const AliConversionPhotonBase & /*source*/)
63 // assignment operator
67 TParticle *AliConversionPhotonBase::GetMCParticle(AliStack *fMCStack){
68 if(!fMCStack){printf("MC Stack not defined");return 0x0;}
70 Int_t label=GetMCParticleLabel(fMCStack);
73 return fMCStack->Particle(label);
79 Bool_t AliConversionPhotonBase::IsTruePhoton(AliStack *fMCStack){
80 TParticle *mcgamma=GetMCParticle(fMCStack);
83 // Check if it is a true photon
84 if(mcgamma->GetPdgCode()==22){
91 Int_t AliConversionPhotonBase::GetMCParticleLabel(AliStack *fMCStack){
92 if(!fMCStack){printf("MC Stack not defined");return -1;}
94 TParticle *fPositiveMCParticle=GetPositiveMCDaughter(fMCStack);
95 TParticle *fNegativeMCParticle=GetNegativeMCDaughter(fMCStack);
97 if(!fPositiveMCParticle||!fNegativeMCParticle){return -1;}
99 if(fPositiveMCParticle->GetMother(0)>-1&&(fNegativeMCParticle->GetMother(0) == fPositiveMCParticle->GetMother(0))){
101 return fPositiveMCParticle->GetMother(0);
108 TParticle *AliConversionPhotonBase::GetMCDaughter(AliStack *fMCStack,Int_t label){
109 if(!fMCStack){printf("MC Stack not defined \n");return 0x0;}
110 if(label<0||label>1){printf("Requested index out of bounds: %i \n",label);return 0x0;}
112 if(fMCLabel[label]>-1){
113 TParticle *fMCDaughter=fMCStack->Particle(fMCLabel[label]);