1 ////////////////////////////////////////////////////////////////////////////////
3 // Author: Artur Szostak
4 // Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
6 ////////////////////////////////////////////////////////////////////////////////
8 #ifndef dHLT_ALIROOT_TRACK_HPP
9 #define dHLT_ALIROOT_TRACK_HPP
12 #include <Riostream.h>
14 #include "AliRoot/Point.hpp"
15 #include "AliRoot/Region.hpp"
22 class Track : public TObject
26 /* Default constructor initialises everything to zero and fTriggerID to -1.
30 /* Create a track object from the given parameters.
31 This constructor checks that momentum >= pt and sign is one of the
32 following values: -1, 0 or +1. If these conditions are violated then
33 the internal data is initialised as in the default constructor and an
34 error message is displayed.
37 const Int_t triggerid, const Int_t sign, const Float_t momentum, const Float_t pt,
38 const Point hits[10], const Region regions[10]
44 // Get/et methods for the trigger ID.
45 void TriggerID(const Int_t value) { fTriggerID = value; };
46 Int_t TriggerID() const { return fTriggerID; };
48 /* Get/Set method for the particle sign. The particle sign must be one
49 of the following values: -1, 0 or +1
50 If the new value is not in this range then an error message is
51 displayed and the internal value remain unchanged.
53 void ParticleSign(const Int_t value);
54 Int_t ParticleSign() const { return fParticleSign; };
56 /* The get and set methods for the momentum and transverse momentum pt.
57 These methods check that the momentum is always equal or larger than
58 the pt. If not then the internal value are left unchanged and an
59 error message is displayed. The numbers must also be positive.
61 void P(const Float_t value);
62 Float_t P() const { return fP; };
63 void Pt(const Float_t value);
64 Float_t Pt() const { return fPt; };
66 /* Returns the hit point for the specified chamber.
67 If the chamber number in out of bounds the point on the first
68 chamber is returned and an error message displayed.
70 Point& Hit(const UInt_t chamber);
71 const Point& Hit(const UInt_t chamber) const;
73 /* Set method for hits. The chamber must be in the range [0..9]
75 void Hit(const UInt_t chamber, const Point& value);
77 /* Returns the region of interest for the specified chamber.
78 If the chamber number in out of bounds the region on the first
79 chamber is returned and an error message displayed.
81 Region& RegionOfInterest(const UInt_t chamber);
82 const Region& RegionOfInterest(const UInt_t chamber) const;
84 /* Set method for regions. The chamber must be in the range [0..9]
86 void RegionOfInterest(const UInt_t chamber, const Region& value);
88 /* Checks to see if the all the hits are within their respective regions
89 of interest for each chamber. kTRUE is returned if they are and kFALSE
92 Bool_t HitsInRegions() const;
94 // ostream operator usefull for text output.
95 friend ostream& operator << (ostream& os, const Track& t);
99 // Internal initialisation routine used by the constructors.
102 Int_t fTriggerID; // The ID number of the trigger record this track was found for.
103 Int_t fParticleSign; // The sign of the particle.
104 Float_t fP; // momentum of particle.
105 Float_t fPt; // transverse momentum.
106 Point fHit[10]; // Fitted track hit coordinates for the 10 tracking chambers.
107 Region fRegionOfInterest[10]; // Region of interest per chamber.
109 ClassDef(Track, 1); // Track data.
115 #endif // dHLT_ALIROOT_TRACK_HPP