LCOV - code coverage report
Current view: top level - MUON/MUONrec - AliMUONTrackParam.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 26 27 96.3 %
Date: 2016-06-14 17:26:59 Functions: 26 31 83.9 %

          Line data    Source code
       1             : #ifndef ALIMUONTRACKPARAM_H
       2             : #define ALIMUONTRACKPARAM_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /*$Id$*/
       7             : // Revision of includes 07/05/2004
       8             : 
       9             : /// \ingroup rec
      10             : /// \class AliMUONTrackParam
      11             : /// \brief Track parameters in ALICE dimuon spectrometer
      12             : ///
      13             : ////////////////////////////////////////////////////
      14             : /// Track parameters in ALICE dimuon spectrometer
      15             : ////////////////////////////////////////////////////
      16             : 
      17             : #include <TObject.h>
      18             : #include <TMatrixD.h>
      19             : 
      20             : class AliMUONVCluster;
      21             : 
      22             : class AliMUONTrackParam : public TObject 
      23             : {
      24             :  public:
      25             :   AliMUONTrackParam(); // Constructor
      26             :   virtual ~AliMUONTrackParam(); // Destructor
      27             :   
      28             :   AliMUONTrackParam(const AliMUONTrackParam& theMUONTrackParam);
      29             :   AliMUONTrackParam& operator=(const  AliMUONTrackParam& theMUONTrackParam);
      30             : 
      31             :   // Get and Set methods for data
      32             :         /// return Z coordinate (cm)
      33       72192 :   Double_t GetZ() const {return fZ;}
      34             :         /// set Z coordinate (cm)
      35       26548 :   void     SetZ(Double_t z) {fZ = z;}
      36             :         /// return non bending coordinate (cm)
      37       23740 :   Double_t GetNonBendingCoor() const {return fParameters(0,0);}
      38             :         /// set non bending coordinate (cm)
      39       19488 :   void     SetNonBendingCoor(Double_t nonBendingCoor) {fParameters(0,0) = nonBendingCoor;}
      40             :         /// return non bending slope (cm ** -1)
      41       59676 :   Double_t GetNonBendingSlope() const {return fParameters(1,0);}
      42             :         /// set non bending slope (cm ** -1)
      43        9392 :   void     SetNonBendingSlope(Double_t nonBendingSlope) {fParameters(1,0) = nonBendingSlope;}
      44             :         /// return bending coordinate (cm)
      45       23328 :   Double_t GetBendingCoor() const {return fParameters(2,0);}
      46             :         /// set bending coordinate (cm)
      47       19488 :   void     SetBendingCoor(Double_t bendingCoor) {fParameters(2,0) = bendingCoor;}
      48             :         /// return bending slope (cm ** -1)
      49       59364 :   Double_t GetBendingSlope() const {return fParameters(3,0);}
      50             :         /// set bending slope (cm ** -1)
      51        9392 :   void     SetBendingSlope(Double_t bendingSlope) {fParameters(3,0) = bendingSlope;}
      52             :         /// return inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
      53       20716 :   Double_t GetInverseBendingMomentum() const {return fParameters(4,0);}
      54             :         /// set inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
      55        9524 :   void     SetInverseBendingMomentum(Double_t inverseBendingMomentum) {fParameters(4,0) = inverseBendingMomentum;}
      56             :         /// return the charge (assumed forward motion)
      57         160 :   Double_t GetCharge() const {return TMath::Sign(1.,fParameters(4,0));}
      58             :         /// set the charge (assumed forward motion)
      59           0 :   void     SetCharge(Double_t charge) {if (charge*fParameters(4,0) < 0.) fParameters(4,0) *= -1.;}
      60             :   
      61             :         /// return track parameters
      62       11548 :   const TMatrixD& GetParameters() const {return fParameters;}
      63             :         /// set track parameters
      64        7956 :   void            SetParameters(const TMatrixD& parameters) {fParameters = parameters;}
      65             :         /// add track parameters
      66        6840 :   void            AddParameters(const TMatrixD& parameters) {fParameters += parameters;}
      67             :   
      68             :   Double_t Px() const;  // return px
      69             :   Double_t Py() const;  // return py
      70             :   Double_t Pz() const;  // return pz
      71             :   Double_t P()  const;  // return total momentum
      72             : 
      73             :         /// return kTRUE if the covariance matrix exist, kFALSE if not
      74        3668 :   Bool_t    CovariancesExist() const {return (fCovariances) ? kTRUE : kFALSE;}
      75             :   
      76             :   const TMatrixD& GetCovariances() const;
      77             :   void            SetCovariances(const TMatrixD& covariances);
      78             :   void            SetCovariances(const Double_t matrix[5][5]);
      79             :   void            SetVariances(const Double_t matrix[5][5]);
      80             :   void            DeleteCovariances();
      81             :   
      82             :   const TMatrixD& GetPropagator() const;
      83             :   void            ResetPropagator();
      84             :   void            UpdatePropagator(const TMatrixD& propagator);
      85             :   
      86             :   const TMatrixD& GetExtrapParameters() const;
      87             :   void            SetExtrapParameters(const TMatrixD& parameters);
      88             :   
      89             :   const TMatrixD& GetExtrapCovariances() const;
      90             :   void            SetExtrapCovariances(const TMatrixD& covariances);
      91             :   
      92             :   const TMatrixD& GetSmoothParameters() const;
      93             :   void            SetSmoothParameters(const TMatrixD& parameters);
      94             :   
      95             :   const TMatrixD& GetSmoothCovariances() const;
      96             :   void            SetSmoothCovariances(const TMatrixD& covariances);
      97             :   
      98             :         /// get pointeur to associated cluster
      99       10200 :   AliMUONVCluster* GetClusterPtr() const {return fClusterPtr;}
     100             :   void             SetClusterPtr(AliMUONVCluster* cluster, Bool_t owner = kFALSE);
     101             :   
     102             :         /// return kTRUE if the associated cluster can be removed from the track it belongs to
     103         180 :   Bool_t IsRemovable() const {return fRemovable;}
     104             :         /// set the flag telling whether the associated cluster can be removed from the track it belongs to or not
     105         558 :   void   SetRemovable(Bool_t removable) {fRemovable = removable;}
     106             :   
     107             :   /// return the chi2 of the track when the associated cluster was attached
     108         496 :   Double_t GetTrackChi2() const {return fTrackChi2;}
     109             :         /// set the chi2 of the track when the associated cluster was attached
     110         612 :   void     SetTrackChi2(Double_t chi2) {fTrackChi2 = chi2;}
     111             :         /// return the local chi2 of the associated cluster with respect to the track
     112         360 :   Double_t GetLocalChi2() const {return fLocalChi2;}
     113             :         /// set the local chi2 of the associated cluster with respect to the track
     114         740 :   void     SetLocalChi2(Double_t chi2) {fLocalChi2 = chi2;}
     115             :   
     116             :         /// necessary for sorting TClonesArray of AliMUONTrackParam
     117        2556 :   Bool_t IsSortable () const {return kTRUE;}
     118             :   Int_t Compare(const TObject* trackParam) const;
     119             : 
     120             :   Bool_t CompatibleTrackParam(const AliMUONTrackParam &trackParam, Double_t sigma2Cut, Double_t &normChi2) const;
     121             : 
     122             :   virtual void Print(Option_t* opt="") const;
     123             :  
     124             :   virtual void Clear(Option_t* opt="");
     125             : 
     126             :  private:
     127             :   
     128             :   Double_t fZ; ///< Z coordinate (cm)
     129             :   
     130             :   /// Track parameters ordered as follow:      <pre>
     131             :   /// X       = Non bending coordinate   (cm)
     132             :   /// SlopeX  = Non bending slope        (cm ** -1)
     133             :   /// Y       = Bending coordinate       (cm)
     134             :   /// SlopeY  = Bending slope            (cm ** -1)
     135             :   /// InvP_yz = Inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)  </pre>
     136             :   TMatrixD fParameters; ///< \brief Track parameters 
     137             :   
     138             :   /// Covariance matrix of track parameters, ordered as follow:      <pre>
     139             :   ///    <X,X>      <X,SlopeX>        <X,Y>      <X,SlopeY>       <X,InvP_yz>
     140             :   /// <X,SlopeX>  <SlopeX,SlopeX>  <Y,SlopeX>  <SlopeX,SlopeY>  <SlopeX,InvP_yz>
     141             :   ///    <X,Y>      <Y,SlopeX>        <Y,Y>      <Y,SlopeY>       <Y,InvP_yz>
     142             :   /// <X,SlopeY>  <SlopeX,SlopeY>  <Y,SlopeY>  <SlopeY,SlopeY>  <SlopeY,InvP_yz>
     143             :   /// <X,InvP_yz> <SlopeX,InvP_yz> <Y,InvP_yz> <SlopeY,InvP_yz> <InvP_yz,InvP_yz>  </pre>
     144             :   mutable TMatrixD *fCovariances; ///< \brief Covariance matrix of track parameters 
     145             :   
     146             :   mutable TMatrixD *fPropagator;        //!<! Jacobian used to extrapolate the track parameters and covariances to the actual z position
     147             :   mutable TMatrixD *fExtrapParameters;  //!<! Track parameters extrapolated to the actual z position (not filtered by Kalman)
     148             :   mutable TMatrixD *fExtrapCovariances; //!<! Covariance matrix extrapolated to the actual z position (not filtered by Kalman)
     149             :   
     150             :   mutable TMatrixD *fSmoothParameters;  //!<! Track parameters obtained using smoother
     151             :   mutable TMatrixD *fSmoothCovariances; //!<! Covariance matrix obtained using smoother
     152             :   
     153             :   AliMUONVCluster *fClusterPtr; //!<! Pointer to associated cluster if any
     154             :   Bool_t           fOwnCluster; //!<! Ownership of the associated cluster
     155             :   
     156             :   Bool_t fRemovable; //!<! kTRUE if the associated cluster can be removed from the track it belongs to
     157             :   
     158             :   Double_t fTrackChi2; //!<! Chi2 of the track when the associated cluster was attached
     159             :   Double_t fLocalChi2; //!<! Local chi2 of the associated cluster with respect to the track
     160             :   
     161          18 :   ClassDef(AliMUONTrackParam, 4) // Track parameters in ALICE dimuon spectrometer
     162             : };
     163             :         
     164             : #endif

Generated by: LCOV version 1.11