]>
Commit | Line | Data |
---|---|---|
d77fd7b3 | 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) V0 vertex class | |
d77fd7b3 | 18 | // Origin: B.Hippolyte, IReS, hippolyt@in2p3.fr |
19 | // G.Van Buren, BNL, gene@bnl.gov (original STAR MuDsts) | |
2d8e3807 | 20 | // Purpose: Having observables for physics available for V0s |
d77fd7b3 | 21 | //------------------------------------------------------------------------- |
0206ddfb | 22 | |
d77fd7b3 | 23 | #include <TMath.h> |
d77fd7b3 | 24 | |
25 | #include "AliESD.h" | |
d77fd7b3 | 26 | #include "AliAODv0.h" |
27 | ||
28 | ClassImp(AliAODv0) | |
29 | ||
30 | AliAODv0::AliAODv0() : TObject() { | |
31 | //-------------------------------------------------------------------- | |
32 | // Default constructor | |
33 | //-------------------------------------------------------------------- | |
34 | fDecayVertexV0X = 999; | |
35 | fDecayVertexV0Y = 999; | |
36 | fDecayVertexV0Z = 999; | |
37 | fDcaV0Daughters = 999; | |
38 | fDcaV0ToPrimVertex = 999; | |
39 | fDcaPosToPrimVertex = 999; | |
40 | fDcaNegToPrimVertex = 999; | |
41 | fMomPosX = 999; | |
42 | fMomPosY = 999; | |
43 | fMomPosZ = 999; | |
44 | fMomNegX = 999; | |
45 | fMomNegY = 999; | |
46 | fMomNegZ = 999; | |
47 | ||
48 | fKeyPos = 999; | |
49 | fKeyNeg = 999; | |
50 | ||
51 | fChi2 = 999; | |
52 | fEvent = 0; | |
53 | } | |
54 | ||
55 | AliAODv0::AliAODv0(AliESDv0* rV0Vertex ,AliESD* rEvent){ | |
56 | this->Fill(rV0Vertex,rEvent); | |
57 | } | |
58 | ||
0206ddfb | 59 | void AliAODv0::Fill(AliESDv0* rV0Vertex ,AliESD* rEvent){ |
60 | // Fills the data memebers of the AOD | |
d77fd7b3 | 61 | fEvent=rEvent; |
62 | Double_t tDecayVertexV0[3]; rV0Vertex->GetXYZ(tDecayVertexV0[0],tDecayVertexV0[1],tDecayVertexV0[2]); | |
63 | fDecayVertexV0X = tDecayVertexV0[0]; | |
64 | fDecayVertexV0Y = tDecayVertexV0[1]; | |
65 | fDecayVertexV0Z = tDecayVertexV0[2]; | |
66 | ||
67 | fDcaV0Daughters = rV0Vertex->GetDcaDaughters(); | |
68 | ||
69 | fDcaV0ToPrimVertex = rV0Vertex->GetD(); | |
70 | ||
71 | ||
72 | Double_t tMomPos[3]; rV0Vertex->GetPPxPyPz(tMomPos[0],tMomPos[1],tMomPos[2]); | |
73 | fMomPosX = tMomPos[0]; | |
74 | fMomPosY = tMomPos[1]; | |
75 | fMomPosZ = tMomPos[2]; | |
76 | ||
77 | Double_t tMomNeg[3]; rV0Vertex->GetNPxPyPz(tMomNeg[0],tMomNeg[1],tMomNeg[2]); | |
78 | fMomNegX = tMomNeg[0]; | |
79 | fMomNegY = tMomNeg[1]; | |
80 | fMomNegZ = tMomNeg[2]; | |
81 | ||
82 | fKeyPos = TMath::Abs(rV0Vertex->GetPindex());// need to ask why Abs | |
83 | fKeyNeg = TMath::Abs(rV0Vertex->GetNindex()); | |
84 | ||
85 | AliESDtrack *pTrack=fEvent->GetTrack(fKeyPos); | |
86 | AliESDtrack *nTrack=fEvent->GetTrack(fKeyNeg); | |
87 | ||
88 | Float_t tDcaPosToPrimVertex[2]; | |
89 | if(pTrack) pTrack->GetImpactParameters(tDcaPosToPrimVertex[0],tDcaPosToPrimVertex[1]); | |
90 | else { tDcaPosToPrimVertex[0]=999.; tDcaPosToPrimVertex[1]=999.;} | |
91 | ||
92 | fDcaPosToPrimVertex = TMath::Sqrt(tDcaPosToPrimVertex[0]*tDcaPosToPrimVertex[0]+tDcaPosToPrimVertex[1]*tDcaPosToPrimVertex[1]); | |
93 | ||
94 | Float_t tDcaNegToPrimVertex[2]; | |
95 | if(nTrack) nTrack->GetImpactParameters(tDcaNegToPrimVertex[0],tDcaNegToPrimVertex[1]); | |
96 | else { tDcaNegToPrimVertex[0]=999.; tDcaNegToPrimVertex[1]=999.;} | |
97 | ||
98 | fDcaNegToPrimVertex = TMath::Sqrt(tDcaNegToPrimVertex[0]*tDcaNegToPrimVertex[0]+tDcaNegToPrimVertex[1]*tDcaPosToPrimVertex[1]); | |
99 | } | |
100 | ||
0206ddfb | 101 | void AliAODv0::ResetV0(){ |
102 | // Sets the default values of the AOD data members | |
d77fd7b3 | 103 | fDecayVertexV0X = 999; |
104 | fDecayVertexV0Y = 999; | |
105 | fDecayVertexV0Z = 999; | |
106 | fDcaV0Daughters = 999; | |
107 | fDcaV0ToPrimVertex = 999; | |
108 | fDcaPosToPrimVertex = 999; | |
109 | fDcaNegToPrimVertex = 999; | |
110 | fMomPosX = 999; | |
111 | fMomPosY = 999; | |
112 | fMomPosZ = 999; | |
113 | fMomNegX = 999; | |
114 | fMomNegY = 999; | |
115 | fMomNegZ = 999; | |
116 | ||
117 | fKeyPos = 999; | |
118 | fKeyNeg = 999; | |
119 | ||
120 | fChi2 = 999; | |
121 | } |