1 #include "AliConversionPhotonBase.h"
6 ClassImp(AliConversionPhotonBase)
8 AliConversionPhotonBase::AliConversionPhotonBase() :
27 fConversionPoint[0]=-999;
28 fConversionPoint[1]=-999;
29 fConversionPoint[2]=-999;
33 AliConversionPhotonBase::AliConversionPhotonBase(const AliConversionPhotonBase & original) :
34 fV0Index(original.fV0Index),
35 fChi2perNDF(original.fChi2perNDF),
36 fTagged(original.fTagged),
37 fIMass(original.fIMass),
38 fPsiPair(original.fPsiPair),
39 fQuality(original.fQuality)
42 fLabel[0] = original.fLabel[0];
43 fLabel[1] = original.fLabel[1];
45 fMCLabel[0]=original.fMCLabel[0];
46 fMCLabel[1]=original.fMCLabel[1];
48 fArmenteros[0]=original.fArmenteros[0];
49 fArmenteros[1]=original.fArmenteros[1];
51 fConversionPoint[0]=original.fConversionPoint[0];
52 fConversionPoint[1]=original.fConversionPoint[1];
53 fConversionPoint[2]=original.fConversionPoint[2];
57 AliConversionPhotonBase::~AliConversionPhotonBase() {
58 // empty standard destructor
63 AliConversionPhotonBase & AliConversionPhotonBase::operator = (const AliConversionPhotonBase & /*source*/)
65 // assignment operator
69 TParticle *AliConversionPhotonBase::GetMCParticle(AliStack *fMCStack){
70 if(!fMCStack){printf("MC Stack not defined");return 0x0;}
72 Int_t label=GetMCParticleLabel(fMCStack);
75 return fMCStack->Particle(label);
81 Bool_t AliConversionPhotonBase::IsTruePhoton(AliStack *fMCStack){
82 TParticle *mcgamma=GetMCParticle(fMCStack);
85 // Check if it is a true photon
86 if(mcgamma->GetPdgCode()==22){
93 Int_t AliConversionPhotonBase::GetMCParticleLabel(AliStack *fMCStack){
94 if(!fMCStack){printf("MC Stack not defined");return -1;}
96 TParticle *fPositiveMCParticle=GetPositiveMCDaughter(fMCStack);
97 TParticle *fNegativeMCParticle=GetNegativeMCDaughter(fMCStack);
99 if(!fPositiveMCParticle||!fNegativeMCParticle){return -1;}
101 if(fPositiveMCParticle->GetMother(0)>-1&&(fNegativeMCParticle->GetMother(0) == fPositiveMCParticle->GetMother(0))){
103 return fPositiveMCParticle->GetMother(0);
110 TParticle *AliConversionPhotonBase::GetMCDaughter(AliStack *fMCStack,Int_t label){
111 if(!fMCStack){printf("MC Stack not defined \n");return 0x0;}
112 if(label<0||label>1){printf("Requested index out of bounds: %i \n",label);return 0x0;}
114 if(fMCLabel[label]>-1){
115 TParticle *fMCDaughter=fMCStack->Particle(fMCLabel[label]);
120 ///________________________________________________________________________
121 void AliConversionPhotonBase::DeterminePhotonQuality(AliVTrack* negTrack, AliVTrack* posTrack){
124 if(!negTrack || !posTrack) {
128 if(negTrack->Charge() == posTrack->Charge()){
132 Int_t nClusterITSneg = negTrack->GetNcls(0);
133 Int_t nClusterITSpos = posTrack->GetNcls(0);
135 if (nClusterITSneg > 1 && nClusterITSpos > 1){
138 } else if (nClusterITSneg > 1 || nClusterITSpos > 1){