]>
Commit | Line | Data |
---|---|---|
2eedd4ed | 1 | #include "AliKFConversionPhoton.h" |
2 | #include "AliV0Reader.h" | |
3 | #include "AliESDtrack.h" | |
4 | #include "AliESDpid.h" | |
5 | #include <iostream> | |
6 | ||
7 | ||
8 | using namespace std; | |
9 | ||
10 | ClassImp(AliKFConversionPhoton) | |
11 | ||
12 | AliKFConversionPhoton::AliKFConversionPhoton() : | |
13 | AliKFParticle(), | |
14 | AliConversionPhotonBase() | |
15 | { | |
16 | //Default constructor | |
17 | } | |
18 | ||
19 | AliKFConversionPhoton::AliKFConversionPhoton(AliKFParticle & kfparticle) : | |
20 | AliKFParticle(kfparticle), | |
21 | AliConversionPhotonBase() | |
22 | ||
23 | { | |
24 | //Default constructor | |
25 | ||
26 | } | |
27 | ||
28 | AliKFConversionPhoton::AliKFConversionPhoton(AliV0Reader *fV0Reader) ://,AliESDEvent *fESDEvent) : | |
29 | AliKFParticle(*fV0Reader->GetMotherCandidateKFCombination()), | |
30 | AliConversionPhotonBase() | |
31 | ||
32 | { | |
33 | ||
34 | fV0Index=fV0Reader->GetCurrentV0IndexNumber()-1; //?? Checked and its correct | |
35 | ||
36 | //Default constructor | |
37 | fLabel[0] = fV0Reader->GetCurrentV0()->GetPindex(); | |
38 | fLabel[1] = fV0Reader->GetCurrentV0()->GetNindex(); | |
39 | ||
40 | SetArmenterosQtAlpha(fArmenteros,*fV0Reader->GetNegativeKFParticle(),*fV0Reader->GetPositiveKFParticle()); | |
41 | ||
42 | fConversionPoint[0]=fV0Reader->GetX(); | |
43 | fConversionPoint[1]=fV0Reader->GetY(); | |
44 | fConversionPoint[2]=fV0Reader->GetZ(); | |
45 | ||
46 | //Chi2 | |
47 | ||
48 | Double_t ndf=fV0Reader->GetMotherCandidateNDF(); | |
49 | if(ndf>0)fChi2perNDF=fV0Reader->GetMotherCandidateChi2()/ndf; | |
50 | ||
51 | } | |
52 | ||
53 | AliKFConversionPhoton::AliKFConversionPhoton(const AliKFParticle &fCurrentNegativeKFParticle,const AliKFParticle &fCurrentPositiveKFParticle) : | |
54 | AliKFParticle(fCurrentNegativeKFParticle,fCurrentPositiveKFParticle), | |
55 | AliConversionPhotonBase() | |
56 | { | |
57 | SetArmenterosQtAlpha(fArmenteros,fCurrentNegativeKFParticle,fCurrentPositiveKFParticle); | |
58 | ||
59 | if(GetNDF())fChi2perNDF=GetChi2()/GetNDF(); | |
60 | else{fChi2perNDF=-1;} | |
61 | ||
62 | } | |
63 | ||
64 | ||
65 | AliKFConversionPhoton::AliKFConversionPhoton(const AliKFConversionPhoton & original) : | |
66 | AliKFParticle(original), | |
67 | AliConversionPhotonBase(original) | |
68 | { | |
69 | } | |
70 | ||
71 | void AliKFConversionPhoton::ConstructGamma(const AliKFParticle &fCurrentNegativeKFParticle,const AliKFParticle &fCurrentPositiveKFParticle) | |
72 | { | |
73 | ||
74 | AliKFParticle::ConstructGamma(fCurrentNegativeKFParticle,fCurrentPositiveKFParticle); | |
75 | ||
76 | ||
77 | SetArmenterosQtAlpha(fArmenteros,fCurrentNegativeKFParticle,fCurrentPositiveKFParticle); | |
78 | } | |
79 | ||
80 | AliKFConversionPhoton & AliKFConversionPhoton::operator = (const AliKFConversionPhoton & /*source*/) | |
81 | { | |
82 | // assignment operator | |
83 | return *this; | |
84 | } | |
85 | ||
86 | ||
87 | void AliKFConversionPhoton::SetArmenterosQtAlpha(Double_t armenteros[2],const AliKFParticle &fCurrentNegativeParticle,const AliKFParticle &fCurrentPositiveParticle){ | |
88 | ||
89 | TVector3 momentumVectorPositive(fCurrentPositiveParticle.GetPx(),fCurrentPositiveParticle.GetPy(),fCurrentPositiveParticle.GetPz()); | |
90 | TVector3 momentumVectorNegative(fCurrentNegativeParticle.GetPx(),fCurrentNegativeParticle.GetPy(),fCurrentNegativeParticle.GetPz()); | |
91 | TVector3 vecV0(GetPx(),GetPy(),GetPz()); | |
92 | ||
93 | ||
94 | Float_t thetaV0pos=TMath::ACos(( momentumVectorPositive* vecV0)/(momentumVectorPositive.Mag() * vecV0.Mag())); | |
95 | Float_t thetaV0neg=TMath::ACos(( momentumVectorNegative* vecV0)/(momentumVectorNegative.Mag() * vecV0.Mag())); | |
96 | ||
97 | armenteros[1] =((momentumVectorNegative.Mag())*TMath::Cos(thetaV0pos)-(momentumVectorPositive.Mag())*TMath::Cos(thetaV0neg))/ | |
98 | ((momentumVectorNegative.Mag())*TMath::Cos(thetaV0pos)+(momentumVectorPositive.Mag())*TMath::Cos(thetaV0neg)) ; | |
99 | ||
100 | ||
101 | armenteros[0] = momentumVectorPositive.Mag()*TMath::Sin(thetaV0pos); | |
102 | ||
103 | } | |
104 | ||
105 | ||
106 | Double_t AliKFConversionPhoton::Phi() const | |
107 | { | |
108 | ||
109 | ||
110 | Double_t phi = AliKFParticle::GetPhi(); | |
111 | if (phi < 0.) phi += 2. * TMath::Pi(); | |
112 | return phi; | |
113 | } | |
114 |