Bug corrected.
[u/mrichter/AliRoot.git] / STEER / AliESDcascade.h
CommitLineData
e23730c7 1#ifndef ALIESDCASCADE_H
2#define ALIESDCASCADE_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
4f679a16 7/* $Id$ */
8
e23730c7 9//-------------------------------------------------------------------------
10// ESD Cascade Vertex Class
4f679a16 11// Implementation of the cascade vertex class
e23730c7 12// Origin: Christian Kuhn, IReS, Strasbourg, christian.kuhn@ires.in2p3.fr
3e27a419 13// Modified by: Antonin Maire,IPHC, Antonin.Maire@ires.in2p3.fr
14// and Boris Hippolyte,IPHC, hippolyt@in2p3.fr
e23730c7 15//-------------------------------------------------------------------------
16
7d245e03 17#include <TPDGCode.h>
c028b974 18#include "AliESDv0.h"
e23730c7 19
97135b34 20class AliLog;
c7bafca9 21class AliExternalTrackParam;
e23730c7 22
c028b974 23class AliESDcascade : public AliESDv0 {
24
e23730c7 25public:
26 AliESDcascade();
97135b34 27 AliESDcascade(const AliESDcascade& cas);
c028b974 28 AliESDcascade(const AliESDv0 &v0,
c7bafca9 29 const AliExternalTrackParam &t, Int_t i);
c028b974 30 ~AliESDcascade();
97135b34 31 AliESDcascade& operator=(const AliESDcascade& cas);
732a24fe 32 virtual void Copy(TObject &obj) const;
c028b974 33
646c9704 34// Start with AliVParticle functions
35 virtual Double_t Px() const { return fNmom[0]+fPmom[0]+fBachMom[0]; }
36 virtual Double_t Py() const { return fNmom[1]+fPmom[1]+fBachMom[1]; }
37 virtual Double_t Pz() const { return fNmom[2]+fPmom[2]+fBachMom[2]; }
38 virtual Double_t Pt() const { return TMath::Sqrt(Px()*Px()+Py()*Py()); }
39 virtual Double_t P() const {
40 return TMath::Sqrt(Px()*Px()+Py()*Py()+Pz()*Pz());
41 }
42 virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
43 virtual Double_t Xv() const { return fPosXi[0]; }
44 virtual Double_t Yv() const { return fPosXi[1]; }
45 virtual Double_t Zv() const { return fPosXi[2]; }
46 virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
47 virtual Double_t OneOverPt() const { return (Pt() != 0.) ? 1./Pt() : -999.; }
48 virtual Double_t Phi() const {return TMath::Pi()+TMath::ATan2(-Py(),-Px()); }
49 virtual Double_t Theta() const {return 0.5*TMath::Pi()-TMath::ATan(Pz()/(Pt()+1.e-13)); }
50 virtual Double_t E() const; // default is Xis but can be changed via ChangeMassHypothesis (defined in the .cxx)
51 virtual Double_t M() const { return GetEffMassXi(); }
52 virtual Double_t Eta() const { return 0.5*TMath::Log((P()+Pz())/(P()-Pz()+1.e-13)); }
3e27a419 53 virtual Double_t Y() const;
d8e40f75 54 virtual Short_t Charge() const { return (GetPdgCodeXi()>0) ? -1 : 1; } // due to PDG sign convention !
646c9704 55 virtual Int_t GetLabel() const { return -1; } // temporary
56 virtual const Double_t *PID() const { return 0; } // return PID object ? (to be discussed!)
57
3e27a419 58 // Then extend the AliVParticle functions
59 Double_t E(Int_t pdg) const;
60 Double_t Y(Int_t pdg) const;
61
62 // Now the functions for analysis consistency
63 Double_t RapXi() const;
64 Double_t RapOmega() const;
65 Double_t AlphaXi() const;
66 Double_t PtArmXi() const;
67
68 // Eventually the older functions
e23730c7 69 Double_t ChangeMassHypothesis(Double_t &v0q, Int_t code=kXiMinus);
70
8668c148 71 Int_t GetPdgCodeXi() const {return fPdgCodeXi;}
72 Double_t GetEffMassXi() const {return fEffMassXi;}
c028b974 73 Double_t GetChi2Xi() const {return fChi2Xi;}
74 void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
75 void GetXYZcascade(Double_t &x, Double_t &y, Double_t &z) const;
d8e40f75 76 Double_t GetDcascade(Double_t x0, Double_t y0, Double_t z0) const;
e23730c7 77
c028b974 78 void GetBPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const {
e23730c7 79 px=fBachMom[0]; py=fBachMom[1]; pz=fBachMom[2];
80 }
c028b974 81
82 Int_t GetBindex() const {return fBachIdx;}
646c9704 83 void SetIndex(Int_t i) {fBachIdx=i;} //for the consistency with V0
84 Int_t GetIndex() const {return GetBindex();} //for the consistency with V0
c028b974 85 void SetDcaXiDaughters(Double_t rDcaXiDaughters=0.);
86 Double_t GetDcaXiDaughters() const {return fDcaXiDaughters;}
97135b34 87 Double_t GetCascadeCosineOfPointingAngle(Double_t refPointX, Double_t refPointY, Double_t refPointZ) const;
e23730c7 88
074f017b 89 void GetPosCovXi(Double_t cov[6]) const;
90
e23730c7 91protected:
562dd0b4 92
8668c148 93 Double32_t fEffMassXi; // reconstructed cascade effective mass
61402fa9 94 Double32_t fChi2Xi; // chi2 value
95 Double32_t fDcaXiDaughters; // dca between Xi's daughters
96 Double32_t fPosXi[3]; // cascade vertex position (global)
97 Double32_t fPosCovXi[6]; // covariance matrix of the vertex position
61402fa9 98 Double32_t fBachMom[3]; // bachelor momentum (global)
99 Double32_t fBachMomCov[6]; // covariance matrix of the bachelor momentum.
562dd0b4 100 Int_t fPdgCodeXi; // reconstructed cascade type (PDG code)
101 Int_t fBachIdx; // label of the bachelor track
102
e23730c7 103
d6a49f20 104private:
732a24fe 105
d6a49f20 106
562dd0b4 107 ClassDef(AliESDcascade,5) // reconstructed cascade vertex
e23730c7 108};
109
c028b974 110inline
111void AliESDcascade::SetDcaXiDaughters(Double_t rDcaXiDaughters){
112 fDcaXiDaughters=rDcaXiDaughters;
113}
e23730c7 114
c028b974 115#endif