}
//__________________________________________________________________________
-TMatrixD* AliMUONTrackParam::GetCovariances()
+TMatrixD* AliMUONTrackParam::GetCovariances() const
{
/// Return the covariance matrix (create it before if needed)
if (!fCovariances) {
for (Int_t i=0; i<5; i++) (*fCovariances)(i,i) = matrix[i][i];
}
+//__________________________________________________________________________
+void
+AliMUONTrackParam::Clear(Option_t* /*opt*/)
+{
+ /// Delete the covariance matrix
+ DeleteCovariances();
+}
+
//__________________________________________________________________________
void AliMUONTrackParam::DeleteCovariances()
{
/// Delete the covariance matrix
- if (fCovariances) delete fCovariances;
+ delete fCovariances;
fCovariances = 0x0;
}
/// return kTRUE if the covariance matrix exist, kFALSE if not
Bool_t CovariancesExist(void) {return (fCovariances) ? kTRUE : kFALSE;}
- TMatrixD* GetCovariances(void);
+ TMatrixD* GetCovariances(void) const;
void SetCovariances(TMatrixD* covariances);
void SetCovariances(Double_t matrix[5][5]);
void SetVariances(Double_t matrix[5][5]);
virtual void Print(Option_t* opt="") const;
+ virtual void Clear(Option_t* opt="");
private:
// Parameters
/// <X,Y> <Y,SlopeX> <Y,Y> <Y,SlopeY> <Y,InvP_yz>
/// <X,SlopeY> <SlopeX,SlopeY> <Y,SlopeY> <SlopeY,SlopeY> <SlopeY,InvP_yz>
/// <X,InvP_yz> <SlopeX,InvP_yz> <Y,InvP_yz> <SlopeY,InvP_yz> <InvP_yz,InvP_yz> </pre>
- TMatrixD *fCovariances; ///< \brief Covariance matrix of track parameters
+ mutable TMatrixD *fCovariances; ///< \brief Covariance matrix of track parameters
AliMUONHitForRec *fHitForRecPtr; //!< Pointer to associated HitForRec if any