1 #include "AliConversionPhotonBase.h"
6 ClassImp(AliConversionPhotonBase)
8 AliConversionPhotonBase::AliConversionPhotonBase() :
25 fConversionPoint[0]=-999;
26 fConversionPoint[1]=-999;
27 fConversionPoint[2]=-999;
31 AliConversionPhotonBase::AliConversionPhotonBase(const AliConversionPhotonBase & original) :
32 fV0Index(original.fV0Index),
33 fChi2perNDF(original.fChi2perNDF),
34 fTagged(original.fTagged),
35 fIMass(original.fIMass)
38 fLabel[0] = original.fLabel[0];
39 fLabel[1] = original.fLabel[1];
41 fMCLabel[0]=original.fMCLabel[0];
42 fMCLabel[1]=original.fMCLabel[1];
44 fArmenteros[0]=original.fArmenteros[0];
45 fArmenteros[1]=original.fArmenteros[1];
47 fConversionPoint[0]=original.fConversionPoint[0];
48 fConversionPoint[1]=original.fConversionPoint[1];
49 fConversionPoint[2]=original.fConversionPoint[2];
53 AliConversionPhotonBase::~AliConversionPhotonBase() {
54 // empty standard destructor
59 AliConversionPhotonBase & AliConversionPhotonBase::operator = (const AliConversionPhotonBase & /*source*/)
61 // assignment operator
65 TParticle *AliConversionPhotonBase::GetMCParticle(AliStack *fMCStack){
66 if(!fMCStack){printf("MC Stack not defined");return 0x0;}
68 Int_t label=GetMCParticleLabel(fMCStack);
71 return fMCStack->Particle(label);
77 Int_t AliConversionPhotonBase::GetMCParticleLabel(AliStack *fMCStack){
78 if(!fMCStack){printf("MC Stack not defined");return -1;}
80 TParticle *fPositiveMCParticle=GetPositiveMCDaughter(fMCStack);
81 TParticle *fNegativeMCParticle=GetNegativeMCDaughter(fMCStack);
83 if(!fPositiveMCParticle||!fNegativeMCParticle){return -1;}
85 if(fPositiveMCParticle->GetMother(0)>-1&&(fNegativeMCParticle->GetMother(0) == fPositiveMCParticle->GetMother(0))){
87 return fPositiveMCParticle->GetMother(0);
94 TParticle *AliConversionPhotonBase::GetMCDaughter(AliStack *fMCStack,Int_t label){
95 if(!fMCStack){printf("MC Stack not defined \n");return 0x0;}
96 if(label<0||label>1){printf("Requested index out of bounds: %i \n",label);return 0x0;}
98 if(fMCLabel[label]>-1){
99 TParticle *fMCDaughter=fMCStack->Particle(fMCLabel[label]);