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 */
10 /// @file AliHLTMUONMansoTrack.h
11 /// @author Artur Szostak <artursz@iafrica.com>
13 /// @brief Declaration of the Manso track class used to store converted track data.
19 class AliHLTMUONTriggerRecord;
20 class AliHLTMUONRecHit;
23 * AliHLTMUONMansoTrack stores converted dHLT raw track data as a ROOT object.
24 * This class is mainly for testing or as a helper object for dHLT specific analysis,
25 * since it is sometimes easier to store and handle ROOT objects.
27 class AliHLTMUONMansoTrack : public TObject
30 * Stream operator for usage with std::ostream classes.
31 * Allows usage such as:
32 * AliHLTMUONMansoTrack t; std::cout << t;
34 friend std::ostream& operator << (
36 const AliHLTMUONMansoTrack& track
42 * Constructor for creating a track object with none, some or all 4 hits
43 * specified. Note: this class does not take ownership of the hit or trigger
44 * record objects and will not attempt to delete them.
45 * @param id The track ID number which must be unique for any event.
46 * @param sign The particle's sign: -1, 1 or 0 if unknown.
47 * @param px X component of the particle's momentum (GeV/c).
48 * @param py Y component of the particle's momentum (GeV/c).
49 * @param pz Z component of the particle's momentum (GeV/c).
50 * @param chi2 The chi squared of the track fit.
51 * @param trigrec Corresponding trigger record used as a seed to find
53 * @param hit7 Hit on chamber 7, tracking station 4.
54 * @param hit8 Hit on chamber 8, tracking station 4.
55 * @param hit9 Hit on chamber 9, tracking station 5.
56 * @param hit10 Hit on chamber 10, tracking station 5.
57 * @param zf The Z coordinate of the middle of the magnetic field assumed
58 * during momentum calculation.
59 * @param qbl The integrated magnetic field strength assumed during momentum
63 Int_t id = -1, Int_t sign = 0,
64 Float_t px = 0, Float_t py = 0, Float_t pz = 0,
66 const AliHLTMUONTriggerRecord* trigrec = NULL,
67 const AliHLTMUONRecHit* hit7 = NULL,
68 const AliHLTMUONRecHit* hit8 = NULL,
69 const AliHLTMUONRecHit* hit9 = NULL,
70 const AliHLTMUONRecHit* hit10 = NULL,
71 Float_t zf = 0, Float_t qbl = 0
77 virtual ~AliHLTMUONMansoTrack() {}
80 * Returns the track ID number, which is unique for an event.
82 Int_t Id() const { return fId; }
85 * Returns the sign of the particle: -1, 1 or 0 if the sign is unknown.
87 Int_t Sign() const { return fSign; }
90 * Returns the momentum vector with components in GeV/c.
92 const TVector3& Momentum() const { return fMomentum; }
95 * Returns the X component of the particle's momentum in GeV/c.
97 Double_t Px() const { return fMomentum.Px(); }
100 * Returns the Y component of the particle's momentum in GeV/c.
102 Double_t Py() const { return fMomentum.Py(); }
105 * Returns the Z component of the particle's momentum in GeV/c.
107 Double_t Pz() const { return fMomentum.Pz(); }
110 * Returns the momentum magnitude of the particle in GeV/c.
112 Double_t P() const { return fMomentum.Mag(); }
115 * Returns the transverse momentum of the particle in GeV/c.
117 Double_t Pt() const { return fMomentum.Pt(); }
120 * Returns the polar angle of the momentum vector in radians.
122 Double_t Polar() const { return fMomentum.Theta(); }
125 * Returns the azimuthal angle of the transverse momentum in radians.
127 Double_t Phi() const { return fMomentum.Phi(); }
130 * Returns the chi squared of the track fit, indicating the quality of
133 Float_t Chi2() const { return fChi2; }
136 * Returns the trigger record corresponding to this track.
137 * If NULL is returned then no trigger record was found.
139 const AliHLTMUONTriggerRecord* TriggerRecord() const { return fTrigRec; }
142 * Returns the hit found on the specified tracking chamber.
143 * If NULL is returned then no hit was found or set.
144 * @param chamber Specifies the chamber for which to return the hit.
145 * Valid values are in the range [7..10].
147 const AliHLTMUONRecHit* Hit(Int_t chamber) const;
150 * Prints the details of the track.
151 * @param option A case sensitive string that can contain one of the
153 * "compact" - Prints just the momentum, sign and ID of the track
155 * "detail" - Prints also the hit information.
156 * "all" - Prints all known information about this track.
157 * If the string contains an empty option or NULL then the default is
158 * to print compactly.
160 virtual void Print(Option_t* option = NULL) const;
162 // Methods inherited from TObject
163 virtual Bool_t IsSortable() const { return kTRUE; }
164 Int_t Compare(const TObject* obj) const;
166 // Implement comparison operators.
167 bool operator == (const AliHLTMUONMansoTrack& track) const;
169 bool operator != (const AliHLTMUONMansoTrack& track) const
171 return not this->operator == (track);
175 * Returns the Z coordinate in the middle of the magnetic field used to
176 * calculate the momentum.
178 Float_t Zmiddle() const { return fZmiddle; }
181 * Returns the integrated magnetic field strength times polarity used in
182 * the calculation of the momentum. Value returned in (T.m) tesla metres.
184 Float_t QBL() const { return fQBL; }
187 * Sets the extra debugging information.
188 * @param zmiddle The Z coordinate of the middle of the magnetic field
189 * assumed during momentum calculation.
190 * @param bfieldintegral The integrated magnetic field strength assumed
191 * during momentum calculation.
193 void SetDebugData(Float_t zmiddle, Float_t bfieldintegral);
196 * Returns the Region of Interest (RoI) centre point for the given chamber.
197 * \param chamber Specifies the chamber for which to return the centre point.
198 * Valid values are in the range [7..10].
199 * \return The RoI centre or a zero vector if the RoI is not set or the
200 * chamber is an incorrect value.
202 const TVector3& RoICentre(Int_t chamber) const;
205 * Returns the Region of Interest (RoI) radius for the given chamber.
206 * \param chamber Specifies the chamber for which to return the radius.
207 * Valid values are in the range [7..10].
208 * \return The RoI radius or -1 if the RoI is not set or the chamber is
209 * an incorrect value.
211 Float_t RoIRadius(Int_t chamber) const;
214 * Sets the Region of Interest (RoI) on the given chamber.
215 * \param chamber Specifies the chamber for which to return the radius.
216 * Valid values are in the range [7..10].
217 * \param x X coordinate of the RoI centre point.
218 * \param y Y coordinate of the RoI centre point.
219 * \param z Z coordinate of the RoI centre point.
220 * \param r radius of the RoI.
222 void SetRoI(Int_t chamber, Float_t x, Float_t y, Float_t z, Float_t r);
226 // Do not allow copying of this class.
227 AliHLTMUONMansoTrack(const AliHLTMUONMansoTrack& track);
228 AliHLTMUONMansoTrack& operator = (const AliHLTMUONMansoTrack& track);
230 Int_t fId; ///< Track ID number which is unique for a particular event.
231 Int_t fSign; ///< The sign of the particle.
232 TVector3 fMomentum; ///< Momentum vector of the particle in GeV/c.
233 Float_t fChi2; ///< Chi squared of fit.
234 const AliHLTMUONTriggerRecord* fTrigRec; ///< Corresponding trigger record.
235 const AliHLTMUONRecHit* fHit[4]; ///< Particle hits on tracking chambers 7 to 10.
237 // The following is debugging information and may not be filled if the
238 // dHLT components were not set to produce this information.
239 TVector3 fRoICentre[4]; ///< Region of Interest centre points.
240 Float_t fRoIRadius[4]; ///< Region of Interest radii.
242 // Parameters used in momentum estimation:
243 Float_t fZmiddle; ///< Particle momentum X component in GeV/c.
244 Float_t fQBL; ///< The integrated magnetic field times the field polarity in (T.m) tesla metres.
246 ClassDef(AliHLTMUONMansoTrack, 4); // Manso track object containing data converted from a dHLT internal track structure.
249 #endif // ALIHLTMUONMANSOTRACK_H