LCOV - code coverage report
Current view: top level - HLT/MUON - AliHLTMUONMansoTrack.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 18 5.6 %
Date: 2016-06-14 17:26:59 Functions: 1 24 4.2 %

          Line data    Source code
       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   29 Sep 2007
      13             : /// @brief  Declaration of the Manso track class used to store converted track data.
      14             : ///
      15             : 
      16             : #include "TObject.h"
      17             : #include "TVector3.h"
      18             : 
      19             : class AliHLTMUONTriggerRecord;
      20             : class AliHLTMUONRecHit;
      21             : 
      22             : /**
      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.
      26             :  */
      27             : class AliHLTMUONMansoTrack : public TObject
      28             : {
      29             :         /**
      30             :          * Stream operator for usage with std::ostream classes.
      31             :          * Allows usage such as:
      32             :          *   AliHLTMUONMansoTrack t; std::cout << t;
      33             :          */
      34             :         friend std::ostream& operator << (
      35             :                         std::ostream& stream,
      36             :                         const AliHLTMUONMansoTrack& track
      37             :                 );
      38             : 
      39             : public:
      40             : 
      41             :         /**
      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
      52             :          *                 this track.
      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
      60             :          *              calculation.
      61             :          */
      62             :         AliHLTMUONMansoTrack(
      63             :                         Int_t id = -1, Int_t sign = 0,
      64             :                         Float_t px = 0, Float_t py = 0, Float_t pz = 0,
      65             :                         Float_t chi2 = -1,
      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
      72             :                 );
      73             :         
      74             :         /**
      75             :          * Default destructor.
      76             :          */
      77           0 :         virtual ~AliHLTMUONMansoTrack() {}
      78             : 
      79             :         /**
      80             :          * Returns the track ID number, which is unique for an event.
      81             :          */
      82           0 :         Int_t Id() const { return fId; }
      83             :         
      84             :         /**
      85             :          * Returns the sign of the particle: -1, 1 or 0 if the sign is unknown.
      86             :          */
      87           0 :         Int_t Sign() const { return fSign; }
      88             : 
      89             :         /**
      90             :          * Returns the momentum vector with components in GeV/c.
      91             :          */
      92           0 :         const TVector3& Momentum() const { return fMomentum; }
      93             : 
      94             :         /**
      95             :          * Returns the X component of the particle's momentum in GeV/c.
      96             :          */
      97           0 :         Double_t Px() const { return fMomentum.Px(); }
      98             : 
      99             :         /**
     100             :          * Returns the Y component of the particle's momentum in GeV/c.
     101             :          */
     102           0 :         Double_t Py() const { return fMomentum.Py(); }
     103             : 
     104             :         /**
     105             :          * Returns the Z component of the particle's momentum in GeV/c.
     106             :          */
     107           0 :         Double_t Pz() const { return fMomentum.Pz(); }
     108             : 
     109             :         /**
     110             :          * Returns the momentum magnitude of the particle in GeV/c.
     111             :          */
     112           0 :         Double_t P() const { return fMomentum.Mag(); }
     113             : 
     114             :         /**
     115             :          * Returns the transverse momentum of the particle in GeV/c.
     116             :          */
     117           0 :         Double_t Pt() const { return fMomentum.Pt(); }
     118             : 
     119             :         /**
     120             :          * Returns the polar angle of the momentum vector in radians.
     121             :          */
     122           0 :         Double_t Polar() const { return fMomentum.Theta(); }
     123             : 
     124             :         /**
     125             :          * Returns the azimuthal angle of the transverse momentum in radians.
     126             :          */
     127           0 :         Double_t Phi() const { return fMomentum.Phi(); }
     128             : 
     129             :         /**
     130             :          * Returns the chi squared of the track fit, indicating the quality of
     131             :          * the fit.
     132             :          */
     133           0 :         Float_t Chi2() const { return fChi2; }
     134             : 
     135             :         /**
     136             :          * Returns the trigger record corresponding to this track.
     137             :          * If NULL is returned then no trigger record was found.
     138             :          */
     139           0 :         const AliHLTMUONTriggerRecord* TriggerRecord() const { return fTrigRec; }
     140             : 
     141             :         /**
     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].
     146             :          */
     147             :         const AliHLTMUONRecHit* Hit(Int_t chamber) const;
     148             :         
     149             :         /**
     150             :          * Prints the details of the track.
     151             :          * @param option  A case sensitive string that can contain one of the
     152             :          *     following strings:
     153             :          *       "compact" - Prints just the momentum, sign and ID of the track
     154             :          *                   in a terse format.
     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.
     159             :          */
     160             :         virtual void Print(Option_t* option = NULL) const;
     161             :         
     162             :         // Methods inherited from TObject
     163           0 :         virtual Bool_t IsSortable() const { return kTRUE; }
     164             :         Int_t Compare(const TObject* obj) const;
     165             : 
     166             :         // Implement comparison operators.
     167             :         bool operator == (const AliHLTMUONMansoTrack& track) const;
     168             : 
     169             :         bool operator != (const AliHLTMUONMansoTrack& track) const
     170             :         {
     171           0 :                 return not this->operator == (track);
     172             :         }
     173             :         
     174             :         /**
     175             :          * Returns the Z coordinate in the middle of the magnetic field used to
     176             :          * calculate the momentum.
     177             :          */
     178           0 :         Float_t Zmiddle() const { return fZmiddle; }
     179             :         
     180             :         /**
     181             :          * Returns the integrated magnetic field strength times polarity used in
     182             :          * the calculation of the momentum. Value returned in (T.m) tesla metres.
     183             :          */
     184           0 :         Float_t QBL() const { return fQBL; }
     185             :         
     186             :         /**
     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.
     192             :          */
     193             :         void SetDebugData(Float_t zmiddle, Float_t bfieldintegral);
     194             :         
     195             :         /**
     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.
     201             :          */
     202             :         const TVector3& RoICentre(Int_t chamber) const;
     203             :         
     204             :         /**
     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.
     210             :          */
     211             :         Float_t RoIRadius(Int_t chamber) const;
     212             :         
     213             :         /**
     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.
     221             :          */
     222             :         void SetRoI(Int_t chamber, Float_t x, Float_t y, Float_t z, Float_t r);
     223             : 
     224             : private:
     225             : 
     226             :         // Do not allow copying of this class.
     227             :         AliHLTMUONMansoTrack(const AliHLTMUONMansoTrack& track);
     228             :         AliHLTMUONMansoTrack& operator = (const AliHLTMUONMansoTrack& track);
     229             :         
     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.
     236             :         
     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.
     241             :         
     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.
     245             : 
     246           6 :         ClassDef(AliHLTMUONMansoTrack, 4); // Manso track object containing data converted from a dHLT internal track structure.
     247             : };
     248             : 
     249             : #endif // ALIHLTMUONMANSOTRACK_H

Generated by: LCOV version 1.11