1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //-------------------------------------------------------------------------
17 // Implementation of the Analysis Oriented Data (AOD) V0 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 V0s
21 //-------------------------------------------------------------------------
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;
55 AliAODv0::AliAODv0(AliESDv0* rV0Vertex ,AliESD* rEvent){
56 this->Fill(rV0Vertex,rEvent);
59 void AliAODv0::Fill(AliESDv0* rV0Vertex ,AliESD* rEvent){
60 // Fills the data memebers of the AOD
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];
67 fDcaV0Daughters = rV0Vertex->GetDcaDaughters();
69 fDcaV0ToPrimVertex = rV0Vertex->GetD();
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];
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];
82 fKeyPos = TMath::Abs(rV0Vertex->GetPindex());// need to ask why Abs
83 fKeyNeg = TMath::Abs(rV0Vertex->GetNindex());
85 AliESDtrack *pTrack=fEvent->GetTrack(fKeyPos);
86 AliESDtrack *nTrack=fEvent->GetTrack(fKeyNeg);
88 Float_t tDcaPosToPrimVertex[2];
89 if(pTrack) pTrack->GetImpactParameters(tDcaPosToPrimVertex[0],tDcaPosToPrimVertex[1]);
90 else { tDcaPosToPrimVertex[0]=999.; tDcaPosToPrimVertex[1]=999.;}
92 fDcaPosToPrimVertex = TMath::Sqrt(tDcaPosToPrimVertex[0]*tDcaPosToPrimVertex[0]+tDcaPosToPrimVertex[1]*tDcaPosToPrimVertex[1]);
94 Float_t tDcaNegToPrimVertex[2];
95 if(nTrack) nTrack->GetImpactParameters(tDcaNegToPrimVertex[0],tDcaNegToPrimVertex[1]);
96 else { tDcaNegToPrimVertex[0]=999.; tDcaNegToPrimVertex[1]=999.;}
98 fDcaNegToPrimVertex = TMath::Sqrt(tDcaNegToPrimVertex[0]*tDcaNegToPrimVertex[0]+tDcaNegToPrimVertex[1]*tDcaNegToPrimVertex[1]);
101 void AliAODv0::ResetV0(){
102 // Sets the default values of the AOD data members
103 fDecayVertexV0X = 999;
104 fDecayVertexV0Y = 999;
105 fDecayVertexV0Z = 999;
106 fDcaV0Daughters = 999;
107 fDcaV0ToPrimVertex = 999;
108 fDcaPosToPrimVertex = 999;
109 fDcaNegToPrimVertex = 999;