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
19 // Origin: B.Hippolyte, IReS, hippolyt@in2p3.fr
20 // G.Van Buren, BNL, gene@bnl.gov (original STAR MuDsts)
22 // Purpose: Having observables for physics available for V0s
23 //-------------------------------------------------------------------------
24 #include <Riostream.h>
32 AliAODv0::AliAODv0() : TObject() {
33 //--------------------------------------------------------------------
34 // Default constructor
35 //--------------------------------------------------------------------
36 fDecayVertexV0X = 999;
37 fDecayVertexV0Y = 999;
38 fDecayVertexV0Z = 999;
39 fDcaV0Daughters = 999;
40 fDcaV0ToPrimVertex = 999;
41 fDcaPosToPrimVertex = 999;
42 fDcaNegToPrimVertex = 999;
57 AliAODv0::AliAODv0(AliESDv0* rV0Vertex ,AliESD* rEvent){
58 this->Fill(rV0Vertex,rEvent);
61 // AliAODv0::~AliAODv0(){
64 void AliAODv0::Fill(AliESDv0* rV0Vertex ,AliESD* rEvent){// Filling method
66 Double_t tDecayVertexV0[3]; rV0Vertex->GetXYZ(tDecayVertexV0[0],tDecayVertexV0[1],tDecayVertexV0[2]);
67 fDecayVertexV0X = tDecayVertexV0[0];
68 fDecayVertexV0Y = tDecayVertexV0[1];
69 fDecayVertexV0Z = tDecayVertexV0[2];
71 fDcaV0Daughters = rV0Vertex->GetDcaDaughters();
73 fDcaV0ToPrimVertex = rV0Vertex->GetD();
76 Double_t tMomPos[3]; rV0Vertex->GetPPxPyPz(tMomPos[0],tMomPos[1],tMomPos[2]);
77 fMomPosX = tMomPos[0];
78 fMomPosY = tMomPos[1];
79 fMomPosZ = tMomPos[2];
81 Double_t tMomNeg[3]; rV0Vertex->GetNPxPyPz(tMomNeg[0],tMomNeg[1],tMomNeg[2]);
82 fMomNegX = tMomNeg[0];
83 fMomNegY = tMomNeg[1];
84 fMomNegZ = tMomNeg[2];
86 fKeyPos = TMath::Abs(rV0Vertex->GetPindex());// need to ask why Abs
87 fKeyNeg = TMath::Abs(rV0Vertex->GetNindex());
89 AliESDtrack *pTrack=fEvent->GetTrack(fKeyPos);
90 AliESDtrack *nTrack=fEvent->GetTrack(fKeyNeg);
92 Float_t tDcaPosToPrimVertex[2];
93 if(pTrack) pTrack->GetImpactParameters(tDcaPosToPrimVertex[0],tDcaPosToPrimVertex[1]);
94 else { tDcaPosToPrimVertex[0]=999.; tDcaPosToPrimVertex[1]=999.;}
96 fDcaPosToPrimVertex = TMath::Sqrt(tDcaPosToPrimVertex[0]*tDcaPosToPrimVertex[0]+tDcaPosToPrimVertex[1]*tDcaPosToPrimVertex[1]);
98 Float_t tDcaNegToPrimVertex[2];
99 if(nTrack) nTrack->GetImpactParameters(tDcaNegToPrimVertex[0],tDcaNegToPrimVertex[1]);
100 else { tDcaNegToPrimVertex[0]=999.; tDcaNegToPrimVertex[1]=999.;}
102 fDcaNegToPrimVertex = TMath::Sqrt(tDcaNegToPrimVertex[0]*tDcaNegToPrimVertex[0]+tDcaNegToPrimVertex[1]*tDcaPosToPrimVertex[1]);
105 void AliAODv0::ResetV0(){// Reset method
106 fDecayVertexV0X = 999;
107 fDecayVertexV0Y = 999;
108 fDecayVertexV0Z = 999;
109 fDcaV0Daughters = 999;
110 fDcaV0ToPrimVertex = 999;
111 fDcaPosToPrimVertex = 999;
112 fDcaNegToPrimVertex = 999;