AliPhysics  c4973fd (c4973fd)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliKFConversionPhoton.cxx
Go to the documentation of this file.
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 
13 AliKFParticle(),
15 {
16  //Default constructor
17 }
18 
19 AliKFConversionPhoton::AliKFConversionPhoton(AliKFParticle & kfparticle) :
20 AliKFParticle(kfparticle),
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 // SetPsiPair(fV0Reader->GetPsiPair(fV0Reader->GetCurrentV0()));
53 //
54 // }
55 
56 AliKFConversionPhoton::AliKFConversionPhoton(const AliKFParticle &fCurrentNegativeKFParticle,const AliKFParticle &fCurrentPositiveKFParticle) :
57 AliKFParticle(fCurrentNegativeKFParticle,fCurrentPositiveKFParticle),
59 {
60  SetArmenterosQtAlpha(fArmenteros,fCurrentNegativeKFParticle,fCurrentPositiveKFParticle);
61 
62  if(GetNDF())fChi2perNDF=GetChi2()/GetNDF();
63  else{fChi2perNDF=-1;}
64 
65 }
66 
67 
69 AliKFParticle(original),
71 {
72 }
73 
74 void AliKFConversionPhoton::ConstructGamma(const AliKFParticle &fCurrentNegativeKFParticle,const AliKFParticle &fCurrentPositiveKFParticle)
75 {
76 
77  AliKFParticle::ConstructGamma(fCurrentNegativeKFParticle,fCurrentPositiveKFParticle);
78 
79 
80  SetArmenterosQtAlpha(fArmenteros,fCurrentNegativeKFParticle,fCurrentPositiveKFParticle);
81 }
82 
84 {
85  // assignment operator
86  return *this;
87 }
88 
89 
90 void AliKFConversionPhoton::SetArmenterosQtAlpha(Double_t armenteros[2],const AliKFParticle &fCurrentNegativeParticle,const AliKFParticle &fCurrentPositiveParticle){
91 
92 
93  AliKFParticle PosParticle = fCurrentPositiveParticle;
94  AliKFParticle NegParticle = fCurrentNegativeParticle;
95 
96  AliKFParticle Gamma;
97  Gamma += fCurrentPositiveParticle;
98  Gamma += fCurrentNegativeParticle;
99 
100  Double_t VertexGamma[3] = {Gamma.GetX(), Gamma.GetY(), Gamma.GetZ()};
101  PosParticle.TransportToPoint(VertexGamma);
102  NegParticle.TransportToPoint(VertexGamma);
103 
104  AliKFParticle::GetArmenterosPodolanski(PosParticle,NegParticle, armenteros);
105 }
106 
107 
109 {
110 
111 
112  Double_t phi = AliKFParticle::GetPhi();
113  if (phi < 0.) phi += 2. * TMath::Pi();
114  return phi;
115 }
116 
double Double_t
Definition: External.C:58
AliKFConversionPhoton & operator=(const AliKFConversionPhoton &g)
Double_t GetChi2(const TH1F *h1, const TH1F *h2, TH1F *hchi2, Int_t &ndof)
void SetArmenterosQtAlpha(Double_t armenteros[2], const AliKFParticle &fCurrentNegativeKFParticle, const AliKFParticle &fCurrentPositiveKFParticle)
void ConstructGamma(const AliKFParticle &fCurrentNegativeKFParticle, const AliKFParticle &fCurrentPositiveKFParticle)