X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONTrackParam.h;h=9dd8a7f0440014026b266e3c2f145d2dc50aa6ee;hb=4c7ce41d6cfde69970f65efc3ca5106c22a8ee92;hp=fb712003c7274a271caef53ecfd053849478db8e;hpb=37827b29e5f6e1b84be7a505e789b40cd3423b50;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONTrackParam.h b/MUON/AliMUONTrackParam.h index fb712003c72..9dd8a7f0440 100644 --- a/MUON/AliMUONTrackParam.h +++ b/MUON/AliMUONTrackParam.h @@ -15,8 +15,9 @@ //////////////////////////////////////////////////// #include -#include "AliMUONHitForRec.h" +#include +class AliMUONHitForRec; class AliESDMuonTrack; class AliMUONTrackParam : public TObject @@ -29,62 +30,148 @@ class AliMUONTrackParam : public TObject AliMUONTrackParam& operator=(const AliMUONTrackParam& theMUONTrackParam); void GetParamFrom(const AliESDMuonTrack& esdMuonTrack); - void SetParamFor(AliESDMuonTrack& esdMuonTrack); + void SetParamFor(AliESDMuonTrack& esdMuonTrack) const; + void GetParamFromUncorrected(const AliESDMuonTrack& esdMuonTrack); + void SetParamForUncorrected(AliESDMuonTrack& esdMuonTrack) const; + + void GetCovFrom(const AliESDMuonTrack& esdMuonTrack); + void SetCovFor(AliESDMuonTrack& esdMuonTrack) const; // Get and Set methods for data - /// return inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) - Double_t GetInverseBendingMomentum(void) const {return fInverseBendingMomentum;} - /// set inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) - void SetInverseBendingMomentum(Double_t InverseBendingMomentum) {fInverseBendingMomentum = InverseBendingMomentum;} - /// return bending slope (cm ** -1) - Double_t GetBendingSlope(void) const {return fBendingSlope;} - /// set bending slope (cm ** -1) - void SetBendingSlope(Double_t BendingSlope) {fBendingSlope = BendingSlope;} - /// return non bending slope (cm ** -1) - Double_t GetNonBendingSlope(void) const {return fNonBendingSlope;} - /// set non bending slope (cm ** -1) - void SetNonBendingSlope(Double_t NonBendingSlope) {fNonBendingSlope = NonBendingSlope;} /// return Z coordinate (cm) - Double_t GetZ(void) const {return fZ;} + Double_t GetZ() const {return fZ;} /// set Z coordinate (cm) - void SetZ(Double_t Z) {fZ = Z;} - /// return bending coordinate (cm) - Double_t GetBendingCoor(void) const {return fBendingCoor;} - /// set bending coordinate (cm) - void SetBendingCoor(Double_t BendingCoor) {fBendingCoor = BendingCoor;} + void SetZ(Double_t z) {fZ = z;} /// return non bending coordinate (cm) - Double_t GetNonBendingCoor(void) const {return fNonBendingCoor;} + Double_t GetNonBendingCoor() const {return fParameters(0,0);} /// set non bending coordinate (cm) - void SetNonBendingCoor(Double_t NonBendingCoor) {fNonBendingCoor = NonBendingCoor;} - void SetTrackParam(AliMUONTrackParam& TrackParam); - AliMUONHitForRec* GetHitForRecPtr(void) const; - /// set pointeur to associated HitForRec if any - void SetHitForRecPtr(AliMUONHitForRec* HitForRec) {fHitForRecPtr = HitForRec;} + void SetNonBendingCoor(Double_t nonBendingCoor) {fParameters(0,0) = nonBendingCoor;} + /// return non bending slope (cm ** -1) + Double_t GetNonBendingSlope() const {return fParameters(1,0);} + /// set non bending slope (cm ** -1) + void SetNonBendingSlope(Double_t nonBendingSlope) {fParameters(1,0) = nonBendingSlope;} + /// return bending coordinate (cm) + Double_t GetBendingCoor() const {return fParameters(2,0);} + /// set bending coordinate (cm) + void SetBendingCoor(Double_t bendingCoor) {fParameters(2,0) = bendingCoor;} + /// return bending slope (cm ** -1) + Double_t GetBendingSlope() const {return fParameters(3,0);} + /// set bending slope (cm ** -1) + void SetBendingSlope(Double_t bendingSlope) {fParameters(3,0) = bendingSlope;} + /// return inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) + Double_t GetInverseBendingMomentum() const {return fParameters(4,0);} + /// set inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) + void SetInverseBendingMomentum(Double_t inverseBendingMomentum) {fParameters(4,0) = inverseBendingMomentum;} + /// return the charge (assumed forward motion) + Double_t GetCharge() const {return TMath::Sign(1.,fParameters(4,0));} + /// set the charge (assumed forward motion) + void SetCharge(Double_t charge) {if (charge*fParameters(4,0) < 0.) fParameters(4,0) *= -1.;} + + /// return track parameters + const TMatrixD& GetParameters() const {return fParameters;} + /// set track parameters + void SetParameters(const TMatrixD& parameters) {fParameters = parameters;} + /// add track parameters + void AddParameters(const TMatrixD& parameters) {fParameters += parameters;} Double_t Px() const; // return px Double_t Py() const; // return py Double_t Pz() const; // return pz Double_t P() const; // return total momentum + /// return kTRUE if the covariance matrix exist, kFALSE if not + Bool_t CovariancesExist() const {return (fCovariances) ? kTRUE : kFALSE;} + + const TMatrixD& GetCovariances() const; + void SetCovariances(const TMatrixD& covariances); + void SetCovariances(const Double_t matrix[5][5]); + void SetVariances(const Double_t matrix[5][5]); + void DeleteCovariances(); + + const TMatrixD& GetPropagator() const; + void ResetPropagator(); + void UpdatePropagator(const TMatrixD& propagator); + + const TMatrixD& GetExtrapParameters() const; + void SetExtrapParameters(const TMatrixD& parameters); + + const TMatrixD& GetExtrapCovariances() const; + void SetExtrapCovariances(const TMatrixD& covariances); + + const TMatrixD& GetSmoothParameters() const; + void SetSmoothParameters(const TMatrixD& parameters); + + const TMatrixD& GetSmoothCovariances() const; + void SetSmoothCovariances(const TMatrixD& covariances); + + AliMUONHitForRec* GetHitForRecPtr() const; + /// set pointeur to associated HitForRec + void SetHitForRecPtr(AliMUONHitForRec* hitForRec) {fHitForRecPtr = hitForRec;} + + /// return kTRUE if the associated hit can be removed from the track it belongs to + Bool_t IsRemovable() const {return fRemovable;} + /// set the flag telling whether the associated hit can be removed from the track it belongs to or not + void SetRemovable(Bool_t removable) {fRemovable = removable;} + + /// return kTRUE if the associated hit alone in its chamber + Bool_t IsAloneInChamber() const {return fAloneInChamber;} + /// set the flag telling whether the associated hi alone in its chamber or not + void SetAloneInChamber(Bool_t aloneInChamber) {fAloneInChamber = aloneInChamber;} + + /// return the chi2 of the track when the associated HitForRec was attached + Double_t GetTrackChi2() const {return fTrackChi2;} + /// set the chi2 of the track when the associated HitForRec was attached + void SetTrackChi2(Double_t chi2) {fTrackChi2 = chi2;} + /// return the local chi2 of the associated HitForRec with respect to the track + Double_t GetLocalChi2() const {return fLocalChi2;} + /// set the local chi2 of the associated HitForRec with respect to the track + void SetLocalChi2(Double_t chi2) {fLocalChi2 = chi2;} + /// necessary for sorting TClonesArray of TrackHit's Bool_t IsSortable () const {return kTRUE;} - /// "Compare" function for sorting - Int_t Compare(const TObject* TrackParam) const; + Int_t Compare(const TObject* trackParam) const; virtual void Print(Option_t* opt="") const; + virtual void Clear(Option_t* opt=""); private: - Double_t fInverseBendingMomentum; ///< Inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) - Double_t fBendingSlope; ///< Bending slope (cm ** -1) - Double_t fNonBendingSlope; ///< Non bending slope (cm ** -1) + Double_t fZ; ///< Z coordinate (cm) - Double_t fBendingCoor; ///< bending coordinate (cm) - Double_t fNonBendingCoor; ///< non bending coordinate (cm) - + + /// Track parameters ordered as follow:
+  /// X       = Non bending coordinate   (cm)
+  /// SlopeX  = Non bending slope        (cm ** -1)
+  /// Y       = Bending coordinate       (cm)
+  /// SlopeY  = Bending slope            (cm ** -1)
+  /// InvP_yz = Inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)  
+ TMatrixD fParameters; ///< \brief Track parameters + + /// Covariance matrix of track parameters, ordered as follow:
+  ///                               
+  ///         
+  ///                               
+  ///         
+  ///       
+ mutable TMatrixD *fCovariances; ///< \brief Covariance matrix of track parameters + + mutable TMatrixD *fPropagator; //!< Jacobian used to extrapolate the track parameters and covariances to the actual z position + mutable TMatrixD *fExtrapParameters; //!< Track parameters extrapolated to the actual z position (not filtered by Kalman) + mutable TMatrixD *fExtrapCovariances; //!< Covariance matrix extrapolated to the actual z position (not filtered by Kalman) + + mutable TMatrixD *fSmoothParameters; //!< Track parameters obtained using smoother + mutable TMatrixD *fSmoothCovariances; //!< Covariance matrix obtained using smoother + AliMUONHitForRec *fHitForRecPtr; //!< Pointer to associated HitForRec if any - ClassDef(AliMUONTrackParam, 2) // Track parameters in ALICE dimuon spectrometer + Bool_t fRemovable; //!< kTRUE if the associated hit can be removed from the track it belongs to + + Bool_t fAloneInChamber; //!< kTRUE if the associated hit is alone in its chamber + + Double_t fTrackChi2; //!< Chi2 of the track when the associated HitForRec was attached + Double_t fLocalChi2; //!< Local chi2 of the associated HitForRec with respect to the track + + ClassDef(AliMUONTrackParam, 4) // Track parameters in ALICE dimuon spectrometer }; #endif