AliPhysics  608b256 (608b256)
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 
29 AliKFConversionPhoton::AliKFConversionPhoton(const AliKFParticle &fCurrentNegativeKFParticle,const AliKFParticle &fCurrentPositiveKFParticle) :
30  AliKFParticle(fCurrentNegativeKFParticle,fCurrentPositiveKFParticle),
32 {
33  SetArmenterosQtAlpha(fArmenteros,fCurrentNegativeKFParticle,fCurrentPositiveKFParticle);
34 
35  if(GetNDF())fChi2perNDF=GetChi2()/GetNDF();
36  else{fChi2perNDF=-1;}
37 
38 }
39 
40 
42  AliKFParticle(original),
43  AliConversionPhotonBase(original)
44 {
45 }
46 
47 void AliKFConversionPhoton::ConstructGamma(const AliKFParticle &fCurrentNegativeKFParticle,const AliKFParticle &fCurrentPositiveKFParticle)
48 {
49  AliKFParticle::ConstructGamma(fCurrentNegativeKFParticle,fCurrentPositiveKFParticle);
50  SetArmenterosQtAlpha(fArmenteros,fCurrentNegativeKFParticle,fCurrentPositiveKFParticle);
51 }
52 
54 {
55  // assignment operator
56  return *this;
57 }
58 
59 
60 void AliKFConversionPhoton::SetArmenterosQtAlpha(Double_t armenteros[2],const AliKFParticle &fCurrentNegativeParticle,const AliKFParticle &fCurrentPositiveParticle)
61 {
62  AliKFParticle PosParticle = fCurrentPositiveParticle;
63  AliKFParticle NegParticle = fCurrentNegativeParticle;
64 
65  AliKFParticle Gamma;
66  Gamma += fCurrentPositiveParticle;
67  Gamma += fCurrentNegativeParticle;
68 
69  Double_t VertexGamma[3] = {Gamma.GetX(), Gamma.GetY(), Gamma.GetZ()};
70  PosParticle.TransportToPoint(VertexGamma);
71  NegParticle.TransportToPoint(VertexGamma);
72 
73  AliKFParticle::GetArmenterosPodolanski(PosParticle,NegParticle, armenteros);
74 }
75 
76 
78 {
79  Double_t phi = AliKFParticle::GetPhi();
80  if (phi < 0.) phi += 2. * TMath::Pi();
81  return phi;
82 }
83 
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)