]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/MUON/AliHLTMUONMansoTrack.h
Minor cleanup of code.
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONMansoTrack.h
CommitLineData
753896cd 1#ifndef ALIHLTMUONMANSOTRACK_H
2#define ALIHLTMUONMANSOTRACK_H
3/* This file is property of and copyright by the ALICE HLT Project *
4 * ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9/**
10 * @file AliHLTMUONMansoTrack.h
11 * @author Artur Szostak <artursz@iafrica.com>
12 * @date
13 * @brief Declaration of the Manso track class used to store converted track
14 * data from dHLT raw internal data blocks.
15 */
16
17#include "AliHLTMUONRecHit.h"
18#include "AliHLTMUONTriggerRecord.h"
19
20/**
21 * AliHLTMUONMansoTrack stores converted dHLT raw track data as a ROOT object.
22 */
23class AliHLTMUONMansoTrack : public TObject
24{
25 /**
26 * Stream operator for usage with std::ostream classes.
27 * Allows usage such as:
28 * AliHLTMUONMansoTrack t; std::cout << t;
29 */
30 friend std::ostream& operator << (
31 std::ostream& stream,
32 const AliHLTMUONMansoTrack& track
33 );
34
35public:
36
37 /**
38 * Constructor for creating a track object with none, some or all 4 hits
39 * specified. Note: this class does not take ownership of the hit or trigger
40 * record objects and will not attempt to delete them.
41 * @param id The track ID number which must be unique for any event.
42 * @param sign The particle's sign: -1, 1 or 0 if unknown.
43 * @param px X component of the particle's momentum (GeV/c).
44 * @param py Y component of the particle's momentum (GeV/c).
45 * @param pz Z component of the particle's momentum (GeV/c).
46 * @param chi2 The chi squared of the track fit.
47 * @param trigrec Corresponding trigger record used as a seed to find
48 * this track.
49 * @param hit7 Hit on chamber 7, tracking station 4.
50 * @param hit8 Hit on chamber 8, tracking station 4.
51 * @param hit9 Hit on chamber 9, tracking station 5.
52 * @param hit10 Hit on chamber 10, tracking station 5.
53 * @param zf The Z coordinate of the middle of the magnetic field assumed
54 * during momentum calculation.
55 * @param qbl The integrated magnetic field strength assumed during momentum
56 * calculation.
57 */
58 AliHLTMUONMansoTrack(
59 Int_t id = -1, Int_t sign = 0,
60 Float_t px = 0, Float_t py = 0, Float_t pz = 0,
61 Float_t chi2 = -1,
62 const AliHLTMUONTriggerRecord* trigrec = NULL,
63 const AliHLTMUONRecHit* hit7 = NULL,
64 const AliHLTMUONRecHit* hit8 = NULL,
65 const AliHLTMUONRecHit* hit9 = NULL,
66 const AliHLTMUONRecHit* hit10 = NULL,
67 Float_t zf = 0, Float_t qbl = 0
68 );
69
70 virtual ~AliHLTMUONMansoTrack() {}
71
72 /**
73 * Returns the track ID number, which is unique for an event.
74 */
75 Int_t Id() const { return fId; }
76
77 /**
78 * Returns the sign of the particle: -1, 1 or 0 if the sign is unknown.
79 */
80 Int_t Sign() const { return fSign; }
81
82 /**
83 * Returns the momentum vector with components in GeV/c.
84 */
85 const TVector3& Momentum() const { return fMomentum; }
86
87 /**
88 * Returns the X component of the particle's momentum in GeV/c.
89 */
90 Double_t Px() const { return fMomentum.Px(); }
91
92 /**
93 * Returns the Y component of the particle's momentum in GeV/c.
94 */
95 Double_t Py() const { return fMomentum.Py(); }
96
97 /**
98 * Returns the Z component of the particle's momentum in GeV/c.
99 */
100 Double_t Pz() const { return fMomentum.Pz(); }
101
102 /**
103 * Returns the momentum magnitude of the particle in GeV/c.
104 */
105 Double_t P() const { return fMomentum.Mag(); }
106
107 /**
108 * Returns the transverse momentum of the particle in GeV/c.
109 */
110 Double_t Pt() const { return fMomentum.Pt(); }
111
112 /**
113 * Returns the polar angle of the momentum vector in radians.
114 */
115 Double_t Polar() const { return fMomentum.Theta(); }
116
117 /**
118 * Returns the azimuthal angle of the transverse momentum in radians.
119 */
120 Double_t Phi() const { return fMomentum.Phi(); }
121
122 /**
123 * Returns the chi squared of the track fit, indicating the quality of
124 * the fit.
125 */
126 Float_t Chi2() const { return fChi2; }
127
128 /**
129 * Returns the trigger record corresponding to this track.
130 * If NULL is returned then no trigger record was found.
131 */
132 const AliHLTMUONTriggerRecord* TriggerRecord() const { return fTrigRec; }
133
134 /**
135 * Returns tje hit found on the specified tracking chamber.
136 * If NULL is returned then no hit was found or set.
137 * @param chamber Specifies the chamber for which to return the hit.
138 * Valid values are in the range [7..10].
139 */
140 const AliHLTMUONRecHit* Hit(Int_t chamber) const;
141
142 /**
143 * Prints the details of the track.
144 * @param option A case sensitive string that can contain one of the
145 * following strings:
146 * "compact" - Prints just the momentum, sign and ID of the track
147 * in a terse format.
148 * "detail" - Prints also the hit information.
149 * "all" - Prints all known information about this track.
150 * If the string contains an empty option or NULL then the default is
151 * to print compactly.
152 */
153 virtual void Print(Option_t* option = NULL) const;
154
155 // Methods inherited from TObject
156 virtual Bool_t IsSortable() const { return kTRUE; }
157 Int_t Compare(const TObject* obj) const;
158
159 // Implement comparison operators.
160 bool operator == (const AliHLTMUONMansoTrack& track) const;
161
162 bool operator != (const AliHLTMUONMansoTrack& track) const
163 {
164 return not this->operator == (track);
165 }
166
167private:
168
169 // Do not allow copying of this class.
170 AliHLTMUONMansoTrack(const AliHLTMUONMansoTrack& track);
171 AliHLTMUONMansoTrack& operator = (const AliHLTMUONMansoTrack& track);
172
173 Int_t fId; // Track ID number which is unique for a particular event.
174 Int_t fSign; // The sign of the particle.
175 TVector3 fMomentum; // Momentum vector of the particle in GeV/c.
176 Float_t fChi2; // Chi squared of fit.
177 const AliHLTMUONTriggerRecord* fTrigRec; // Corresponding trigger record.
178 const AliHLTMUONRecHit* fHit[4]; // Particle hits on tracking chambers 7 to 10.
179
180 // The following is debugging information and may not be filled if the
181 // dHLT components were not set to produce this information.
182
183 // Parameters used in momentum estimation:
184 Float_t fZmiddle; // Particle momentum X component in GeV/c.
185 Float_t fQBL; // The integrated magnetic field times charge in (T.m) tesla metres.
186
187 ClassDef(AliHLTMUONMansoTrack, 1); // Manso track object containing data converted from a dHLT internal track structure.
188};
189
190#endif // ALIHLTMUONMANSOTRACK_H