Moving the classes that belong to the following libraries: STEERBase, ESD, CDB, AOD...
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliVParticle.h
CommitLineData
6bc03c45 1#ifndef AliVParticle_H
2#define AliVParticle_H
3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//-------------------------------------------------------------------------
9// base class for ESD and AOD particles
10// Author: Markus Oldenburg, CERN
11//-------------------------------------------------------------------------
12
13#include <Rtypes.h>
14#include <TObject.h>
15
6a7d7784 16#include <float.h>
17
18const Double_t kAlmost1=1. - Double_t(FLT_EPSILON);
19const Double_t kAlmost0=Double_t(FLT_MIN);
c683ddc2 20
02d77919 21const Double_t kB2C=-0.299792458e-3;
c683ddc2 22const Double_t kAlmost0Field=1.e-13;
23
6bc03c45 24class AliVParticle: public TObject {
25
26public:
27 AliVParticle() { }
28 virtual ~AliVParticle() { }
29 AliVParticle(const AliVParticle& vPart);
30 AliVParticle& operator=(const AliVParticle& vPart);
31
32 // kinematics
33 virtual Double_t Px() const = 0;
34 virtual Double_t Py() const = 0;
35 virtual Double_t Pz() const = 0;
36 virtual Double_t Pt() const = 0;
6a8e543a 37 virtual Double_t P() const = 0;
c683ddc2 38 virtual Bool_t PxPyPz(Double_t p[3]) const = 0;
39
40 virtual Double_t Xv() const = 0;
41 virtual Double_t Yv() const = 0;
42 virtual Double_t Zv() const = 0;
43 virtual Bool_t XvYvZv(Double_t x[3]) const = 0;
6bc03c45 44
6a8e543a 45 virtual Double_t OneOverPt() const = 0;
46 virtual Double_t Phi() const = 0;
47 virtual Double_t Theta() const = 0;
6bc03c45 48
49
6a8e543a 50 virtual Double_t E() const = 0;
51 virtual Double_t M() const = 0;
6bc03c45 52
6a8e543a 53 virtual Double_t Eta() const = 0;
54 virtual Double_t Y() const = 0;
6bc03c45 55
6a8e543a 56 virtual Short_t Charge() const = 0;
57 virtual Int_t GetLabel() const = 0;
6bc03c45 58 // PID
6a8e543a 59 virtual Int_t PdgCode() const = 0;
6bc03c45 60 virtual const Double_t *PID() const = 0; // return PID object (to be defined, still)
61
5ffcfef5 62
63
64 /** Compare this class with an other instance of this class
65 * used in a TCollection::Sort()/TClonesArray::Sort()
66 * @param obj ptr to other instance
67 * @return Returns 0 when equal, 1 when this is smaller
68 * and -1 when bigger -- sorts descending
69 */
70 Int_t Compare( const TObject* obj) const;
71
72
73 /** Defines this class as being sortable in a TCollection
74 * @return always kTRUE;
75 */
76 Bool_t IsSortable() const { return kTRUE; }
77
78
c683ddc2 79 // coordinate system conversions
80 Bool_t Local2GlobalMomentum(Double_t p[3], Double_t alpha) const;
81 Bool_t Local2GlobalPosition(Double_t r[3], Double_t alpha) const;
82 Bool_t Global2LocalMomentum(Double_t p[3], Short_t charge, Double_t &alpha) const;
83 Bool_t Global2LocalPosition(Double_t r[3], Double_t alpha) const;
6bc03c45 84
5ffcfef5 85
86
5adacc53 87 ClassDef(AliVParticle, 3) // base class for particles
6bc03c45 88};
89
90#endif