1 #include "AliConversionPhotonBase.h"
6 ClassImp(AliConversionPhotonBase)
8 AliConversionPhotonBase::AliConversionPhotonBase() :
25 fConversionPoint[0]=-999;
26 fConversionPoint[1]=-999;
27 fConversionPoint[2]=-999;
29 for(Int_t i=0;i<5;i++){
30 fNSigmadEdxPositive[i]=-999;
31 fNSigmadEdxNegative[i]=-999;
36 AliConversionPhotonBase::AliConversionPhotonBase(const AliConversionPhotonBase & original) :
37 fV0Index(original.fV0Index),
38 fChi2perNDF(original.fChi2perNDF),
39 fTagged(original.fTagged)
43 fLabel[0] = original.fLabel[0];
44 fLabel[1] = original.fLabel[1];
46 fMCLabel[0]=original.fMCLabel[0];
47 fMCLabel[1]=original.fMCLabel[1];
49 fArmenteros[0]=original.fArmenteros[0];
50 fArmenteros[1]=original.fArmenteros[1];
52 fConversionPoint[0]=original.fConversionPoint[0];
53 fConversionPoint[1]=original.fConversionPoint[1];
54 fConversionPoint[2]=original.fConversionPoint[2];
56 for(Int_t i=0;i<5;i++){fNSigmadEdxNegative[i]=original.fNSigmadEdxNegative[i];}
57 for(Int_t i=0;i<5;i++){fNSigmadEdxPositive[i]=original.fNSigmadEdxPositive[i];}
60 AliConversionPhotonBase::~AliConversionPhotonBase() {
61 // empty standard destructor
66 AliConversionPhotonBase & AliConversionPhotonBase::operator = (const AliConversionPhotonBase & /*source*/)
68 // assignment operator
72 TParticle *AliConversionPhotonBase::GetMCParticle(AliStack *fMCStack){
73 if(!fMCStack){printf("MC Stack not defined");return 0x0;}
75 Int_t label=GetMCParticleLabel(fMCStack);
78 return fMCStack->Particle(label);
84 Int_t AliConversionPhotonBase::GetMCParticleLabel(AliStack *fMCStack){
85 if(!fMCStack){printf("MC Stack not defined");return -1;}
87 TParticle *fPositiveMCParticle=GetPositiveMCDaughter(fMCStack);
88 TParticle *fNegativeMCParticle=GetNegativeMCDaughter(fMCStack);
90 if(!fPositiveMCParticle||!fNegativeMCParticle){return -1;}
92 if(fPositiveMCParticle->GetMother(0)>-1&&(fNegativeMCParticle->GetMother(0) == fPositiveMCParticle->GetMother(0))){
94 return fPositiveMCParticle->GetMother(0);
100 TParticle *AliConversionPhotonBase::GetMCDaughter(AliStack *fMCStack,Int_t label){
101 if(!fMCStack){printf("MC Stack not defined \n");return 0x0;}
102 if(label<0||label>1){printf("Requested index out of bounds: %i \n",label);return 0x0;}
104 if(fMCLabel[label]>-1){
105 TParticle *fMCDaughter=fMCStack->Particle(fMCLabel[label]);