]>
Commit | Line | Data |
---|---|---|
c028b974 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | //------------------------------------------------------------------------- | |
17 | // Implementation of the Analysis Oriented Data (AOD) Xi vertex class | |
18 | // Origin: B.Hippolyte, IReS, hippolyt@in2p3.fr | |
19 | // G.Van Buren, BNL, gene@bnl.gov (original STAR MuDsts) | |
20 | // Purpose: Having observables for physics available for Xis | |
21 | //------------------------------------------------------------------------- | |
22 | ||
23 | #include <TMath.h> | |
24 | ||
25 | #include "AliESD.h" | |
26 | #include "AliAODv0.h" | |
27 | #include "AliAODxi.h" | |
28 | ||
29 | ClassImp(AliAODxi) | |
30 | ||
31 | AliAODxi::AliAODxi() : AliAODv0() { | |
32 | //-------------------------------------------------------------------- | |
33 | // Default constructor | |
34 | //-------------------------------------------------------------------- | |
35 | fCharge = 0; | |
36 | fDecayVertexXiX = 999; | |
37 | fDecayVertexXiY = 999; | |
38 | fDecayVertexXiZ = 999; | |
39 | fDcaXiDaughters = 999; | |
40 | fDcaXiToPrimVertex = 999; | |
41 | fDcaBachelorToPrimVertex = 999; | |
42 | fMomBachelorX = 999; | |
43 | fMomBachelorY = 999; | |
44 | fMomBachelorZ = 999; | |
45 | ||
46 | fKeyBachelor = 999; | |
47 | ||
48 | fChi2Xi = 999; | |
49 | } | |
50 | ||
51 | AliAODxi::AliAODxi(AliESDcascade* rXiVertex ,AliESD* rEvent){ | |
52 | this->Fill(rXiVertex,rEvent); | |
53 | } | |
54 | ||
55 | AliAODxi::AliAODxi(const AliAODxi &rAliAODxi) : AliAODv0(rAliAODxi){ | |
56 | //-------------------------------------------------------------------- | |
57 | // Copy constructor | |
58 | //-------------------------------------------------------------------- | |
59 | fDecayVertexXiX = rAliAODxi.fDecayVertexXiX; | |
60 | fDecayVertexXiY = rAliAODxi.fDecayVertexXiY; | |
61 | fDecayVertexXiZ = rAliAODxi.fDecayVertexXiZ; | |
62 | fDcaXiDaughters = rAliAODxi.fDcaXiDaughters; | |
63 | fDcaXiToPrimVertex = rAliAODxi.fDcaXiToPrimVertex ; | |
64 | fDcaBachelorToPrimVertex = rAliAODxi.fDcaBachelorToPrimVertex; | |
65 | fMomBachelorX = rAliAODxi.fMomBachelorX; | |
66 | fMomBachelorY = rAliAODxi.fMomBachelorY; | |
67 | fMomBachelorZ = rAliAODxi.fMomBachelorZ; | |
68 | fKeyBachelor = rAliAODxi.fKeyBachelor; | |
69 | fChi2Xi = rAliAODxi.fChi2Xi; | |
70 | } | |
71 | ||
72 | AliAODxi& AliAODxi::operator=(const AliAODxi& rAliAODxi){ | |
73 | //-------------------------------------------------------------------- | |
74 | // Assignment overload | |
75 | //-------------------------------------------------------------------- | |
76 | AliAODv0::operator=(rAliAODxi); | |
77 | this->fDecayVertexXiX = rAliAODxi.fDecayVertexXiX; | |
78 | this->fDecayVertexXiY = rAliAODxi.fDecayVertexXiY; | |
79 | this->fDecayVertexXiZ = rAliAODxi.fDecayVertexXiZ; | |
80 | this->fDcaXiDaughters = rAliAODxi.fDcaXiDaughters; | |
81 | this->fDcaXiToPrimVertex = rAliAODxi.fDcaXiToPrimVertex; | |
82 | this->fDcaBachelorToPrimVertex = rAliAODxi.fDcaBachelorToPrimVertex; | |
83 | this->fMomBachelorX = rAliAODxi.fMomBachelorX; | |
84 | this->fMomBachelorY = rAliAODxi.fMomBachelorY; | |
85 | this->fMomBachelorZ = rAliAODxi.fMomBachelorZ; | |
86 | this->fKeyBachelor = rAliAODxi.fKeyBachelor; | |
87 | this->fChi2Xi = rAliAODxi.fChi2Xi; | |
88 | return *this; | |
89 | } | |
90 | ||
91 | AliAODxi::~AliAODxi(){ | |
92 | //-------------------------------------------------------------------- | |
93 | // Empty destructor | |
94 | //-------------------------------------------------------------------- | |
95 | } | |
96 | ||
97 | void AliAODxi::Fill(AliESDcascade* rXiVertex ,AliESD* rEvent){ | |
98 | // Fills the data memebers of the AOD | |
99 | Double_t tDecayVertexXi[3]; rXiVertex->GetXYZcascade(tDecayVertexXi[0],tDecayVertexXi[1],tDecayVertexXi[2]); | |
100 | fDecayVertexXiX = tDecayVertexXi[0]; | |
101 | fDecayVertexXiY = tDecayVertexXi[1]; | |
102 | fDecayVertexXiZ = tDecayVertexXi[2]; | |
103 | ||
104 | fDcaXiDaughters = rXiVertex->GetDcaXiDaughters(); | |
105 | fDcaXiToPrimVertex = rXiVertex->GetD(); | |
106 | ||
107 | Double_t tMomPos[3]; rXiVertex->GetPPxPyPz(tMomPos[0],tMomPos[1],tMomPos[2]); | |
108 | fMomPosX = tMomPos[0]; | |
109 | fMomPosY = tMomPos[1]; | |
110 | fMomPosZ = tMomPos[2]; | |
111 | ||
112 | Double_t tMomNeg[3]; rXiVertex->GetNPxPyPz(tMomNeg[0],tMomNeg[1],tMomNeg[2]); | |
113 | fMomNegX = tMomNeg[0]; | |
114 | fMomNegY = tMomNeg[1]; | |
115 | fMomNegZ = tMomNeg[2]; | |
116 | ||
117 | Double_t tMomBachelor[3]; rXiVertex->GetBPxPyPz(tMomBachelor[0],tMomBachelor[1],tMomBachelor[2]); | |
118 | fMomBachelorX = tMomBachelor[0]; | |
119 | fMomBachelorY = tMomBachelor[1]; | |
120 | fMomBachelorZ = tMomBachelor[2]; | |
121 | ||
122 | fKeyPos = (UInt_t)TMath::Abs(rXiVertex->GetPindex());// need to ask why Abs | |
123 | fKeyNeg = (UInt_t)TMath::Abs(rXiVertex->GetNindex()); | |
124 | fKeyBachelor = (UInt_t)TMath::Abs(rXiVertex->GetBindex()); | |
125 | ||
126 | AliESDtrack *pTrack=rEvent->GetTrack(fKeyPos); | |
127 | AliESDtrack *nTrack=rEvent->GetTrack(fKeyNeg); | |
128 | AliESDtrack *bTrack=rEvent->GetTrack(fKeyBachelor); | |
129 | ||
130 | Float_t tDcaPosToPrimVertex[2]; | |
131 | if(pTrack) pTrack->GetImpactParameters(tDcaPosToPrimVertex[0],tDcaPosToPrimVertex[1]); | |
132 | else { tDcaPosToPrimVertex[0]=999.; tDcaPosToPrimVertex[1]=999.;} | |
133 | ||
134 | fDcaPosToPrimVertex = TMath::Sqrt(tDcaPosToPrimVertex[0]*tDcaPosToPrimVertex[0]+tDcaPosToPrimVertex[1]*tDcaPosToPrimVertex[1]); | |
135 | ||
136 | Float_t tDcaNegToPrimVertex[2]; | |
137 | if(nTrack) nTrack->GetImpactParameters(tDcaNegToPrimVertex[0],tDcaNegToPrimVertex[1]); | |
138 | else { tDcaNegToPrimVertex[0]=999.; tDcaNegToPrimVertex[1]=999.;} | |
139 | ||
140 | ||
141 | fDcaNegToPrimVertex = TMath::Sqrt(tDcaNegToPrimVertex[0]*tDcaNegToPrimVertex[0]+tDcaNegToPrimVertex[1]*tDcaNegToPrimVertex[1]); | |
142 | ||
143 | Float_t tDcaBachelorToPrimVertex[2]; | |
144 | if(bTrack) bTrack->GetImpactParameters(tDcaBachelorToPrimVertex[0],tDcaBachelorToPrimVertex[1]); | |
145 | else { tDcaBachelorToPrimVertex[0]=999.; tDcaBachelorToPrimVertex[1]=999.;} | |
146 | ||
147 | fDcaBachelorToPrimVertex = TMath::Sqrt(tDcaBachelorToPrimVertex[0]*tDcaBachelorToPrimVertex[0]+tDcaBachelorToPrimVertex[1]*tDcaBachelorToPrimVertex[1]); | |
148 | ||
149 | fDcaV0Daughters = rXiVertex->GetDcaV0Daughters(); | |
150 | fDcaV0ToPrimVertex = rXiVertex->GetDcascade(rEvent->GetVertex()->GetXv(), | |
151 | rEvent->GetVertex()->GetYv(), | |
152 | rEvent->GetVertex()->GetZv()); | |
153 | ||
154 | double tDecayVertexV0[3]; rXiVertex->GetXYZ(tDecayVertexV0[0],tDecayVertexV0[1],tDecayVertexV0[2]); | |
155 | fDecayVertexV0X=tDecayVertexV0[0]; | |
156 | fDecayVertexV0Y=tDecayVertexV0[1]; | |
157 | fDecayVertexV0Z=tDecayVertexV0[2]; | |
158 | } | |
159 | ||
160 | void AliAODxi::ResetXi(){ | |
161 | // Sets the default values of the AOD data members | |
162 | fDecayVertexXiX = 999; | |
163 | fDecayVertexXiY = 999; | |
164 | fDecayVertexXiZ = 999; | |
165 | fDcaXiDaughters = 999; | |
166 | fDcaXiToPrimVertex = 999; | |
167 | fDcaBachelorToPrimVertex = 999; | |
168 | fMomBachelorX = 999; | |
169 | fMomBachelorY = 999; | |
170 | fMomBachelorZ = 999; | |
171 | ||
172 | fKeyBachelor = 999; | |
173 | fChi2Xi = 999; | |
174 | } |