]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTrackParam.h
Conding conventions violation and Doxygen comments (Philippe Pillot)
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackParam.h
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 "AliMUONHitForRec.h"
19
20 class AliESDMuonTrack;
21 class AliMagF;
22
23 class AliMUONTrackParam : public TObject 
24 {
25  public:
26   AliMUONTrackParam(); // Constructor
27   virtual ~AliMUONTrackParam(); // Destructor
28   
29   AliMUONTrackParam(const AliMUONTrackParam& theMUONTrackParam);
30   AliMUONTrackParam& operator=(const  AliMUONTrackParam& theMUONTrackParam);
31
32   void GetParamFrom(const AliESDMuonTrack& esdMuonTrack);
33   void SetParamFor(AliESDMuonTrack& esdMuonTrack);
34
35
36   // Get and Set methods for data
37         /// return inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
38   Double_t GetInverseBendingMomentum(void) const {return fInverseBendingMomentum;}
39         /// set inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
40   void     SetInverseBendingMomentum(Double_t InverseBendingMomentum) {fInverseBendingMomentum = InverseBendingMomentum;}
41         /// return bending slope (cm ** -1)
42   Double_t GetBendingSlope(void) const {return fBendingSlope;}
43         /// set bending slope (cm ** -1)
44   void     SetBendingSlope(Double_t BendingSlope) {fBendingSlope = BendingSlope;}
45         /// return non bending slope (cm ** -1)
46   Double_t GetNonBendingSlope(void) const {return fNonBendingSlope;}
47         /// set non bending slope (cm ** -1)
48   void     SetNonBendingSlope(Double_t NonBendingSlope) {fNonBendingSlope = NonBendingSlope;}
49         /// return Z coordinate (cm)
50   Double_t GetZ(void) const {return fZ;}
51         /// set Z coordinate (cm)
52   void     SetZ(Double_t Z) {fZ = Z;}
53         /// return bending coordinate (cm)
54   Double_t GetBendingCoor(void) const {return fBendingCoor;}
55         /// set bending coordinate (cm)
56   void     SetBendingCoor(Double_t BendingCoor) {fBendingCoor = BendingCoor;}
57         /// return non bending coordinate (cm)
58   Double_t GetNonBendingCoor(void) const {return fNonBendingCoor;}
59         /// set non bending coordinate (cm)
60   void     SetNonBendingCoor(Double_t NonBendingCoor) {fNonBendingCoor = NonBendingCoor;}
61   void              SetTrackParam(AliMUONTrackParam& TrackParam);
62   AliMUONHitForRec* GetHitForRecPtr(void) const;
63         /// set pointeur to associated HitForRec if any
64   void              SetHitForRecPtr(AliMUONHitForRec* HitForRec) {fHitForRecPtr = HitForRec;}
65   
66   Double_t Px() const;  // return px
67   Double_t Py() const;  // return py
68   Double_t Pz() const;  // return pz
69   Double_t P()  const;  // return total momentum
70
71         /// necessary for sorting TClonesArray of TrackHit's
72   Bool_t IsSortable () const {return kTRUE;}
73         /// "Compare" function for sorting
74   Int_t Compare(const TObject* TrackParam) const;
75
76   void ExtrapToZ(Double_t Z);
77   void ExtrapToStation(Int_t Station, AliMUONTrackParam *TrackParam);
78   void ExtrapToVertex(Double_t xVtx, Double_t yVtx, Double_t zVtx);  // extrapolation to vertex through the absorber (with true vertex) 
79    void BransonCorrection(Double_t xVtx, Double_t yVtx, Double_t zVtx); // makes Branson correction with true vertex  
80    // returns total momentum after energy loss correction in the absorber
81   Double_t TotalMomentumEnergyLoss(Double_t thetaLimit, Double_t pTotal, Double_t theta);
82   void FieldCorrection(Double_t Z); // makes simple magnetic field correction through the absorber 
83
84   void ExtrapOneStepHelix(Double_t charge, Double_t step, 
85                           Double_t *vect, Double_t *vout) const;
86   void ExtrapOneStepHelix3(Double_t field, Double_t step, 
87                            Double_t *vect, Double_t *vout) const;
88
89   void ExtrapOneStepRungekutta(Double_t charge, Double_t step, 
90                                Double_t* vect, Double_t* vout) const;
91   
92   virtual void Print(Option_t* opt="") const;
93  
94         /// set field map
95   void SetField(const AliMagF* magField) {fkField = magField;}
96
97
98  protected:
99  private:
100   Double_t fInverseBendingMomentum; ///< Inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
101   Double_t fBendingSlope; ///< Bending slope (cm ** -1)
102   Double_t fNonBendingSlope; ///< Non bending slope (cm ** -1)
103   Double_t fZ; ///< Z coordinate (cm)
104   Double_t fBendingCoor; ///< bending coordinate (cm)
105   Double_t fNonBendingCoor; ///< non bending coordinate (cm)
106
107   const AliMagF* fkField;     //!< field map
108
109   void SetGeant3Parameters(Double_t *VGeant3, Double_t ForwardBackward);
110   void GetFromGeant3Parameters(Double_t *VGeant3, Double_t Charge);
111
112   void GetField(Double_t *Position, Double_t *Field) const;
113   
114   AliMUONHitForRec *fHitForRecPtr; //!< Pointer to associated HitForRec if any
115   
116   ClassDef(AliMUONTrackParam, 2) // Track parameters in ALICE dimuon spectrometer
117     };
118         
119 #endif