X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=MUON%2FAliMUONTrackParam.h;h=70d611e1cfb705bd4a1cfe08ee7ecd46a1bc1b08;hp=7d5d01211dbacd6505bd984b091c0efb0bd74b9d;hb=90e04a88850826c977c7d9d2ed222418a128e488;hpb=956019b6f1a9c8ffba04d71dd660928e16d14b35 diff --git a/MUON/AliMUONTrackParam.h b/MUON/AliMUONTrackParam.h index 7d5d01211db..70d611e1cfb 100644 --- a/MUON/AliMUONTrackParam.h +++ b/MUON/AliMUONTrackParam.h @@ -4,54 +4,180 @@ * See cxx source for full Copyright notice */ /*$Id$*/ +// Revision of includes 07/05/2004 -#include +/// \ingroup rec +/// \class AliMUONTrackParam +/// \brief Track parameters in ALICE dimuon spectrometer +/// +//////////////////////////////////////////////////// +/// Track parameters in ALICE dimuon spectrometer +//////////////////////////////////////////////////// -class AliMUONHitForRec; -class AliMUONSegment; +#include +#include -class AliMUONTrackParam : public TObject { +class AliMUONVCluster; +class AliESDMuonTrack; + +class AliMUONTrackParam : public TObject +{ public: - AliMUONTrackParam(){ - // Constructor - ;} // Constructor - virtual ~AliMUONTrackParam(){ - // Destructor - ;} // Destructor + AliMUONTrackParam(); // Constructor + virtual ~AliMUONTrackParam(); // Destructor + + AliMUONTrackParam(const AliMUONTrackParam& theMUONTrackParam); + AliMUONTrackParam& operator=(const AliMUONTrackParam& theMUONTrackParam); + + void GetParamFrom(const AliESDMuonTrack& esdMuonTrack); + void SetParamFor(AliESDMuonTrack& esdMuonTrack) const; + void GetParamFromDCA(const AliESDMuonTrack& esdMuonTrack); + void SetParamForDCA(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 - Double_t GetInverseBendingMomentum(void); - void SetInverseBendingMomentum(Double_t InverseBendingMomentum); - Double_t GetBendingSlope(void); - void SetBendingSlope(Double_t BendingSlope); - Double_t GetNonBendingSlope(void); - void SetNonBendingSlope(Double_t NonBendingSlope); - Double_t GetZ(void); - void SetZ(Double_t Z); - Double_t GetBendingCoor(void); - void SetBendingCoor(Double_t BendingCoor); - Double_t GetNonBendingCoor(void); - void SetNonBendingCoor(Double_t NonBendingCoor); - - void ExtrapToZ(Double_t Z); - void ExtrapToStation(Int_t Station, AliMUONTrackParam *TrackParam); - void ExtrapToVertex(); // extrapolation to vertex through the absorber - void BransonCorrection(); // makes Branson correction - Double_t TotalMomentumEnergyLoss(Double_t rLimit, Double_t pTotal, Double_t theta, Double_t xEndAbsorber, Double_t yEndAbsorber); // returns total momentum after energy loss correction in the absorber - - protected: + /// return Z coordinate (cm) + Double_t GetZ() const {return fZ;} + /// set Z coordinate (cm) + void SetZ(Double_t z) {fZ = z;} + /// return non bending coordinate (cm) + Double_t GetNonBendingCoor() const {return fParameters(0,0);} + /// set non bending coordinate (cm) + 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); + + /// get pointeur to associated cluster + AliMUONVCluster* GetClusterPtr() const {return fClusterPtr;} + /// set pointeur to associated cluster + void SetClusterPtr(AliMUONVCluster* cluster, Bool_t owner = kFALSE) {fClusterPtr = cluster; fOwnCluster = owner;} + + /// 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 kTRUE if the associated cluster 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 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: - 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) - - void SetGeant3Parameters(Double_t *VGeant3, Double_t ForwardBackward); - void GetFromGeant3Parameters(Double_t *VGeant3, Double_t Charge); - - ClassDef(AliMUONTrackParam, 1) // Track parameters in ALICE dimuon spectrometer - }; + + Double_t fZ; ///< Z 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 + + 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 + + Bool_t fAloneInChamber; //!< kTRUE if the associated cluster is alone in its chamber + + 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, 4) // Track parameters in ALICE dimuon spectrometer +}; #endif