]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - STEER/AliESDcascade.h
Fix for #82970: Change of module sequence in AliReconstruction
[u/mrichter/AliRoot.git] / STEER / AliESDcascade.h
... / ...
CommitLineData
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
7/* $Id$ */
8
9//-------------------------------------------------------------------------
10// ESD Cascade Vertex Class
11// Implementation of the cascade vertex class
12// Origin: Christian Kuhn, IReS, Strasbourg, christian.kuhn@ires.in2p3.fr
13// Modified by: Antonin Maire,IPHC, Antonin.Maire@ires.in2p3.fr
14// and Boris Hippolyte,IPHC, hippolyt@in2p3.fr
15//-------------------------------------------------------------------------
16
17#include <TPDGCode.h>
18#include "AliESDv0.h"
19
20class AliLog;
21class AliExternalTrackParam;
22
23class AliESDcascade : public AliESDv0 {
24
25public:
26 AliESDcascade();
27 AliESDcascade(const AliESDcascade& cas);
28 AliESDcascade(const AliESDv0 &v0,
29 const AliExternalTrackParam &t, Int_t i);
30 ~AliESDcascade();
31 AliESDcascade& operator=(const AliESDcascade& cas);
32 virtual void Copy(TObject &obj) const;
33
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)); }
53 virtual Double_t Y() const;
54 virtual Short_t Charge() const { return (GetPdgCodeXi()>0) ? -1 : 1; } // due to PDG sign convention !
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
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
69 Double_t ChangeMassHypothesis(Double_t &v0q, Int_t code=kXiMinus);
70
71 Int_t GetPdgCodeXi() const {return fPdgCodeXi;}
72 Double_t GetEffMassXi() const {return fEffMassXi;}
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;
76 Double_t GetDcascade(Double_t x0, Double_t y0, Double_t z0) const;
77
78 void GetBPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const {
79 px=fBachMom[0]; py=fBachMom[1]; pz=fBachMom[2];
80 }
81
82 Int_t GetBindex() const {return fBachIdx;}
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
85 void SetDcaXiDaughters(Double_t rDcaXiDaughters=0.);
86 Double_t GetDcaXiDaughters() const {return fDcaXiDaughters;}
87 Double_t GetCascadeCosineOfPointingAngle(Double_t refPointX, Double_t refPointY, Double_t refPointZ) const;
88
89 void GetPosCovXi(Double_t cov[6]) const;
90
91protected:
92
93 Double32_t fEffMassXi; // reconstructed cascade effective mass
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
98 Double32_t fBachMom[3]; // bachelor momentum (global)
99 Double32_t fBachMomCov[6]; // covariance matrix of the bachelor momentum.
100 Int_t fPdgCodeXi; // reconstructed cascade type (PDG code)
101 Int_t fBachIdx; // label of the bachelor track
102
103
104private:
105
106
107 ClassDef(AliESDcascade,5) // reconstructed cascade vertex
108};
109
110inline
111void AliESDcascade::SetDcaXiDaughters(Double_t rDcaXiDaughters){
112 fDcaXiDaughters=rDcaXiDaughters;
113}
114
115#endif