Fixed some missing implementations, changed test task to use VV classes. Please,...
[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>
50ff8c36 15#include "AliVVtrack.h"
6bc03c45 16
6a7d7784 17#include <float.h>
18
19const Double_t kAlmost1=1. - Double_t(FLT_EPSILON);
20const Double_t kAlmost0=Double_t(FLT_MIN);
c683ddc2 21
02d77919 22const Double_t kB2C=-0.299792458e-3;
c683ddc2 23const Double_t kAlmost0Field=1.e-13;
24
50ff8c36 25class AliVParticle: public TObject, public AliVVtrack {
6bc03c45 26
27public:
ddfbc51a 28 AliVParticle() { }
6bc03c45 29 virtual ~AliVParticle() { }
30 AliVParticle(const AliVParticle& vPart);
31 AliVParticle& operator=(const AliVParticle& vPart);
32
33 // kinematics
34 virtual Double_t Px() const = 0;
35 virtual Double_t Py() const = 0;
36 virtual Double_t Pz() const = 0;
37 virtual Double_t Pt() const = 0;
6a8e543a 38 virtual Double_t P() const = 0;
c683ddc2 39 virtual Bool_t PxPyPz(Double_t p[3]) const = 0;
40
41 virtual Double_t Xv() const = 0;
42 virtual Double_t Yv() const = 0;
43 virtual Double_t Zv() const = 0;
44 virtual Bool_t XvYvZv(Double_t x[3]) const = 0;
6bc03c45 45
6a8e543a 46 virtual Double_t OneOverPt() const = 0;
47 virtual Double_t Phi() const = 0;
48 virtual Double_t Theta() const = 0;
6bc03c45 49
50
6a8e543a 51 virtual Double_t E() const = 0;
52 virtual Double_t M() const = 0;
6bc03c45 53
6a8e543a 54 virtual Double_t Eta() const = 0;
55 virtual Double_t Y() const = 0;
6bc03c45 56
6a8e543a 57 virtual Short_t Charge() const = 0;
58 virtual Int_t GetLabel() const = 0;
6bc03c45 59 // PID
6a8e543a 60 virtual Int_t PdgCode() const = 0;
6bc03c45 61 virtual const Double_t *PID() const = 0; // return PID object (to be defined, still)
62
5ffcfef5 63
64
65 /** Compare this class with an other instance of this class
66 * used in a TCollection::Sort()/TClonesArray::Sort()
67 * @param obj ptr to other instance
68 * @return Returns 0 when equal, 1 when this is smaller
69 * and -1 when bigger -- sorts descending
70 */
71 Int_t Compare( const TObject* obj) const;
72
73
74 /** Defines this class as being sortable in a TCollection
75 * @return always kTRUE;
76 */
77 Bool_t IsSortable() const { return kTRUE; }
78
79
c683ddc2 80 // coordinate system conversions
81 Bool_t Local2GlobalMomentum(Double_t p[3], Double_t alpha) const;
82 Bool_t Local2GlobalPosition(Double_t r[3], Double_t alpha) const;
83 Bool_t Global2LocalMomentum(Double_t p[3], Short_t charge, Double_t &alpha) const;
84 Bool_t Global2LocalPosition(Double_t r[3], Double_t alpha) const;
6bc03c45 85
5ffcfef5 86
ddfbc51a 87
6a15ab77 88 ClassDef(AliVParticle, 4) // base class for particles
6bc03c45 89};
90
91#endif