X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONTrackParam.h;h=1fa228611c1a1a90073dc81b8a3674ffad38c609;hb=0742685016164b4badfff3326341f1f29c07d4d8;hp=9b8ad7a008b5650c39d42552a23dfbe70831ecce;hpb=208f139e833dd194dfe897fdfd4afccd65d31e53;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONTrackParam.h b/MUON/AliMUONTrackParam.h index 9b8ad7a008b..1fa228611c1 100644 --- a/MUON/AliMUONTrackParam.h +++ b/MUON/AliMUONTrackParam.h @@ -15,10 +15,9 @@ //////////////////////////////////////////////////// #include -#include -#include "AliMUONHitForRec.h" +#include -class AliESDMuonTrack; +class AliMUONVCluster; class AliMUONTrackParam : public TObject { @@ -29,39 +28,42 @@ class AliMUONTrackParam : public TObject AliMUONTrackParam(const AliMUONTrackParam& theMUONTrackParam); AliMUONTrackParam& operator=(const AliMUONTrackParam& theMUONTrackParam); - void GetParamFrom(const AliESDMuonTrack& esdMuonTrack); - void SetParamFor(AliESDMuonTrack& esdMuonTrack); - // 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;} /// 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& theMUONTrackParam); + 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.;} - AliMUONHitForRec* GetHitForRecPtr(void) const; - void SetHitForRecPtr(AliMUONHitForRec* hitForRec); + /// 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 @@ -69,42 +71,94 @@ class AliMUONTrackParam : public TObject Double_t P() const; // return total momentum /// return kTRUE if the covariance matrix exist, kFALSE if not - Bool_t CovariancesExist(void) {return (fCovariances) ? kTRUE : kFALSE;} - TMatrixD* GetCovariances(void); - void SetCovariances(TMatrixD* covariances); - void SetCovariances(Double_t matrix[5][5]); - void SetVariances(Double_t matrix[5][5]); - void DeleteCovariances(void); - - void EvalCovariances(AliMUONHitForRec* hit2); - - /// necessary for sorting TClonesArray of TrackHit's + 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); + + /// get pointeur to associated cluster + AliMUONVCluster* GetClusterPtr() const {return fClusterPtr;} + void SetClusterPtr(AliMUONVCluster* cluster, Bool_t owner = kFALSE); + + /// return kTRUE if the associated cluster can be removed from the track it belongs to + Bool_t IsRemovable() const {return fRemovable;} + /// set the flag telling whether the associated cluster can be removed from the track it belongs to or not + void SetRemovable(Bool_t removable) {fRemovable = removable;} + + /// return the chi2 of the track when the associated cluster was attached + Double_t GetTrackChi2() const {return fTrackChi2;} + /// set the chi2 of the track when the associated cluster was attached + void SetTrackChi2(Double_t chi2) {fTrackChi2 = chi2;} + /// return the local chi2 of the associated cluster with respect to the track + Double_t GetLocalChi2() const {return fLocalChi2;} + /// set the local chi2 of the associated cluster with respect to the track + void SetLocalChi2(Double_t chi2) {fLocalChi2 = chi2;} + + /// necessary for sorting TClonesArray of AliMUONTrackParam Bool_t IsSortable () const {return kTRUE;} Int_t Compare(const TObject* trackParam) const; + Bool_t CompatibleTrackParam(const AliMUONTrackParam &trackParam, Double_t sigma2Cut, Double_t &normChi2) const; + virtual void Print(Option_t* opt="") const; + virtual void Clear(Option_t* opt=""); private: - // Parameters - Double_t fNonBendingCoor; ///< Non bending coordinate (cm) - Double_t fNonBendingSlope; ///< Non bending slope (cm ** -1) - Double_t fBendingCoor; ///< Bending coordinate (cm) - Double_t fBendingSlope; ///< Bending slope (cm ** -1) - Double_t fInverseBendingMomentum; ///< Inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) + Double_t fZ; ///< Z coordinate (cm) - /// Covariance matrix of track parameters, ordered as follow: + /// 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:
   ///                               
   ///         
   ///                               
   ///         
-  ///     
-  TMatrixD *fCovariances; //!
+  ///       
+ 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 + + AliMUONVCluster *fClusterPtr; //!< Pointer to associated cluster if any + Bool_t fOwnCluster; //!< Ownership of the associated cluster + + Bool_t fRemovable; //!< kTRUE if the associated cluster can be removed from the track it belongs to - AliMUONHitForRec *fHitForRecPtr; //!< Pointer to associated HitForRec if any + Double_t fTrackChi2; //!< Chi2 of the track when the associated cluster was attached + Double_t fLocalChi2; //!< Local chi2 of the associated cluster with respect to the track - ClassDef(AliMUONTrackParam, 2) // Track parameters in ALICE dimuon spectrometer + ClassDef(AliMUONTrackParam, 4) // Track parameters in ALICE dimuon spectrometer }; #endif