AliRoot Core  3dc7879 (3dc7879)
AliESDcascade.h
Go to the documentation of this file.
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 
20 class AliLog;
22 
23 class AliESDcascade : public AliESDv0 {
24 
25 public:
26  AliESDcascade();
27  AliESDcascade(const AliESDcascade& cas);
28  AliESDcascade(const AliESDv0 &v0,
29  const AliExternalTrackParam &t, Int_t i);
32  virtual void Copy(TObject &obj) const;
33 
34  Int_t RefitCascade(AliExternalTrackParam *bachelor); //to be invoked immediately after creation
35 
36 // Start with AliVParticle functions
37  virtual Double_t Px() const { return fNmom[0]+fPmom[0]+fBachMom[0]; }
38  virtual Double_t Py() const { return fNmom[1]+fPmom[1]+fBachMom[1]; }
39  virtual Double_t Pz() const { return fNmom[2]+fPmom[2]+fBachMom[2]; }
40  virtual Double_t Pt() const { return TMath::Sqrt(Px()*Px()+Py()*Py()); }
41  virtual Double_t P() const {
42  return TMath::Sqrt(Px()*Px()+Py()*Py()+Pz()*Pz());
43  }
44  virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
45  virtual Double_t Xv() const { return fPosXi[0]; }
46  virtual Double_t Yv() const { return fPosXi[1]; }
47  virtual Double_t Zv() const { return fPosXi[2]; }
48  virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
49  virtual Double_t OneOverPt() const { return (Pt() != 0.) ? 1./Pt() : -999.; }
50  virtual Double_t Phi() const {return TMath::Pi()+TMath::ATan2(-Py(),-Px()); }
51  virtual Double_t Theta() const {return 0.5*TMath::Pi()-TMath::ATan(Pz()/(Pt()+1.e-13)); }
52  virtual Double_t E() const; // default is Xis but can be changed via ChangeMassHypothesis (defined in the .cxx)
53  virtual Double_t M() const { return GetEffMassXi(); }
54  virtual Double_t Eta() const { return 0.5*TMath::Log((P()+Pz())/(P()-Pz()+1.e-13)); }
55  virtual Double_t Y() const;
56  virtual Short_t Charge() const { return (GetPdgCodeXi()>0) ? -1 : 1; } // due to PDG sign convention !
57  virtual Int_t GetLabel() const { return -1; } // temporary
58  virtual const Double_t *PID() const { return 0; } // return PID object ? (to be discussed!)
59 
60  // Then extend the AliVParticle functions
61  Double_t E(Int_t pdg) const;
62  Double_t Y(Int_t pdg) const;
63 
64  // Now the functions for analysis consistency
65  Double_t RapXi() const;
66  Double_t RapOmega() const;
67  Double_t AlphaXi() const;
68  Double_t PtArmXi() const;
69 
70  // Eventually the older functions
71  Double_t ChangeMassHypothesis(Double_t &v0q, Int_t code=kXiMinus);
72 
73  Int_t GetPdgCodeXi() const {return fPdgCodeXi;}
74  Double_t GetEffMassXi() const {return fEffMassXi;}
75  Double_t GetChi2Xi() const {return fChi2Xi;}
76  void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
77  void GetXYZcascade(Double_t &x, Double_t &y, Double_t &z) const;
78  void SetXYZcascade(Double_t x, Double_t y, Double_t z); //for testing purposes
79  Double_t GetDcascade(Double_t x0, Double_t y0, Double_t z0) const;
80 
81  void GetBPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const {
82  px=fBachMom[0]; py=fBachMom[1]; pz=fBachMom[2];
83  }
84 
85  Int_t GetBindex() const {return fBachIdx;}
86  void SetIndex(Int_t i) {fBachIdx=i;} //for the consistency with V0
87  Int_t GetIndex() const {return GetBindex();} //for the consistency with V0
88  void SetDcaXiDaughters(Double_t rDcaXiDaughters=0.);
89  Double_t GetDcaXiDaughters() const {return fDcaXiDaughters;}
90  Double_t GetCascadeCosineOfPointingAngle(Double_t refPointX, Double_t refPointY, Double_t refPointZ) const;
91 
92  void GetPosCovXi(Double_t cov[6]) const;
93 
94 protected:
95 
96  Double32_t fEffMassXi; // reconstructed cascade effective mass
97  Double32_t fChi2Xi; // chi2 value
98  Double32_t fDcaXiDaughters; // dca between Xi's daughters
99  Double32_t fPosXi[3]; // cascade vertex position (global)
100  Double32_t fPosCovXi[6]; // covariance matrix of the vertex position
101  Double32_t fBachMom[3]; // bachelor momentum (global)
102  Double32_t fBachMomCov[6]; // covariance matrix of the bachelor momentum.
103  Int_t fPdgCodeXi; // reconstructed cascade type (PDG code)
104  Int_t fBachIdx; // label of the bachelor track
105 
106 
107 private:
108 
109 
110  ClassDef(AliESDcascade,6) // reconstructed cascade vertex
111 };
112 
113 inline
114 void AliESDcascade::SetDcaXiDaughters(Double_t rDcaXiDaughters){
115  fDcaXiDaughters=rDcaXiDaughters;
116 }
117 
118 #endif
Double32_t fNmom[3]
Definition: AliESDv0.h:162
void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const
virtual Double_t E() const
AliESDcascade & operator=(const AliESDcascade &cas)
virtual Double_t Xv() const
Definition: AliESDcascade.h:45
Double_t ChangeMassHypothesis(Double_t &v0q, Int_t code=kXiMinus)
Double_t AlphaXi() const
virtual Double_t Pt() const
Definition: AliESDcascade.h:40
virtual Short_t Charge() const
Definition: AliESDcascade.h:56
Double_t PtArmXi() const
Float_t p[]
Definition: kNNTest.C:133
Double32_t fEffMassXi
Definition: AliESDcascade.h:96
Double_t GetCascadeCosineOfPointingAngle(Double_t refPointX, Double_t refPointY, Double_t refPointZ) const
Double_t GetEffMassXi() const
Definition: AliESDcascade.h:74
Double32_t fPosCovXi[6]
virtual Bool_t XvYvZv(Double_t x[3]) const
Definition: AliESDcascade.h:48
virtual Double_t Px() const
Definition: AliESDcascade.h:37
void SetDcaXiDaughters(Double_t rDcaXiDaughters=0.)
Double32_t fBachMomCov[6]
virtual Double_t M() const
Definition: AliESDcascade.h:53
Int_t RefitCascade(AliExternalTrackParam *bachelor)
void GetBPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const
Definition: AliESDcascade.h:81
Double_t RapXi() const
virtual Double_t OneOverPt() const
Definition: AliESDcascade.h:49
virtual Double_t Y() const
Int_t GetPdgCodeXi() const
Definition: AliESDcascade.h:73
virtual Double_t Theta() const
Definition: AliESDcascade.h:51
Definition: AliLog.h:27
Double_t GetDcascade(Double_t x0, Double_t y0, Double_t z0) const
virtual Bool_t PxPyPz(Double_t p[3]) const
Definition: AliESDcascade.h:44
virtual Double_t P() const
Definition: AliESDcascade.h:41
virtual Double_t Zv() const
Definition: AliESDcascade.h:47
AliTPCcalibV0 v0
Double32_t fPmom[3]
Definition: AliESDv0.h:163
Double_t GetChi2Xi() const
Definition: AliESDcascade.h:75
virtual const Double_t * PID() const
Definition: AliESDcascade.h:58
virtual void Copy(TObject &obj) const
Int_t GetIndex() const
Definition: AliESDcascade.h:87
virtual Double_t Pz() const
Definition: AliESDcascade.h:39
Double_t GetDcaXiDaughters() const
Definition: AliESDcascade.h:89
Int_t GetBindex() const
Definition: AliESDcascade.h:85
void GetPosCovXi(Double_t cov[6]) const
Double32_t fDcaXiDaughters
Definition: AliESDcascade.h:98
void SetXYZcascade(Double_t x, Double_t y, Double_t z)
Double32_t fPosXi[3]
Definition: AliESDcascade.h:99
void GetXYZcascade(Double_t &x, Double_t &y, Double_t &z) const
Double32_t fBachMom[3]
Double32_t fChi2Xi
Definition: AliESDcascade.h:97
virtual Int_t GetLabel() const
Definition: AliESDcascade.h:57
Double_t RapOmega() const
void SetIndex(Int_t i)
Definition: AliESDcascade.h:86
virtual Double_t Eta() const
Definition: AliESDcascade.h:54
virtual Double_t Py() const
Definition: AliESDcascade.h:38
virtual Double_t Yv() const
Definition: AliESDcascade.h:46
virtual Double_t Phi() const
Definition: AliESDcascade.h:50