]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/src/AliRoot/TriggerRecord.hpp
Changes to compile on solarisCC5
[u/mrichter/AliRoot.git] / HLT / MUON / src / AliRoot / TriggerRecord.hpp
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Author: Artur Szostak
4 // Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
5 //
6 ////////////////////////////////////////////////////////////////////////////////
7
8 #ifndef dHLT_ALIROOT_TRIGGER_RECORD_HPP
9 #define dHLT_ALIROOT_TRIGGER_RECORD_HPP
10
11 #include <TObject.h>
12 #include "AliRoot/Point.hpp"
13 #include "Utils.hpp"
14
15 namespace AliMUONHLT
16 {
17
18
19 class TriggerRecord : public TObject
20 {
21 public:
22
23         /* Default constructor initialises everything to zero and the trigger
24            number to -1.
25          */
26         TriggerRecord();
27         
28         /* Creates a trigger record from the specified parameters.
29            Note: the trigger number must be greater or equal to zero. The particle
30            sign must also be one of the following values: -1, 0 or +1
31            Pt must be a positive number.
32            If these conditions are not met then an error message is displayed and
33            the object is filled like it is in the default constructor. 
34          */
35         TriggerRecord(
36                         const Int_t triggernumber, const Int_t sign, const Float_t pt,
37                         const Point& station1point, const Point& station2point
38                 );
39
40         virtual ~TriggerRecord() {};
41         
42         /* Get/Set method for the trigger number. 
43            The trigger number must be positive when assigning the trigger number.
44            If it is not then an error message is displayed and the internal value
45            remains untouched.
46          */
47         void TriggerNumber(const Int_t value);
48         Int_t TriggerNumber() const { return fTriggerNumber; };
49         
50         /* Get/Set method for the particle sign.
51            The particle sign must be one of the following values: -1, 0 or +1
52            If it is not then an error message is displayed and the internal value
53            remains untouched.
54          */
55         void ParticleSign(const Int_t value);
56         Int_t ParticleSign() const { return fParticleSign; };
57         
58         /* Get/Set method for the particle Pt, as measured by the L0 trigger.
59            The pt must be a positive number when assigning the pt.
60            If it is not then an error message is displayed and the internal value
61            remains untouched.
62          */
63         void Pt(const Float_t value);
64         Float_t Pt() const { return fPt; };
65         
66         /* Get/Set methods for the two trigger stations.
67          */
68         void Station1Point(const Point& value) { fSt1Point = value; };
69         Point& Station1Point() { return fSt1Point; };
70         const Point& Station1Point() const { return fSt1Point; };
71         void Station2Point(const Point& value) { fSt2Point = value; };
72         Point& Station2Point() { return fSt2Point; };
73         const Point& Station2Point() const { return fSt2Point; };
74
75         // ostream operator usefull for text output.
76         friend ostream& operator << (ostream& os, const TriggerRecord& r);
77
78 private:
79
80         // Performs internal initialisation for the constructors.
81         void Init();
82
83         Int_t fTriggerNumber;  // The trigger number/index in AliMUONDataInterface.
84         Int_t fParticleSign;   // -1 = negative, 0 = unknown, +1 = positive.
85         Float_t fPt;           // Transverse momentum of the particle.
86         Point fSt1Point;       // Coordinate on trigger station 1.
87         Point fSt2Point;       // Coordinate on trigger station 2.
88
89         ClassDef(TriggerRecord, 1)  // Trigger information.
90 };
91
92
93 } // AliMUONHLT
94
95 #endif // dHLT_ALIROOT_TRIGGER_RECORD_HPP