if (theMUONTrackParam.fCovariances) {
if (fCovariances) *fCovariances = *(theMUONTrackParam.fCovariances);
else fCovariances = new TMatrixD(*(theMUONTrackParam.fCovariances));
- } else if (fCovariances) {
+ } else {
delete fCovariances;
fCovariances = 0x0;
}
if (theMUONTrackParam.fPropagator) {
if (fPropagator) *fPropagator = *(theMUONTrackParam.fPropagator);
else fPropagator = new TMatrixD(*(theMUONTrackParam.fPropagator));
- } else if (fPropagator) {
+ } else {
delete fPropagator;
fPropagator = 0x0;
}
if (theMUONTrackParam.fExtrapParameters) {
if (fExtrapParameters) *fExtrapParameters = *(theMUONTrackParam.fExtrapParameters);
else fExtrapParameters = new TMatrixD(*(theMUONTrackParam.fExtrapParameters));
- } else if (fExtrapParameters) {
+ } else {
delete fExtrapParameters;
fExtrapParameters = 0x0;
}
if (theMUONTrackParam.fExtrapCovariances) {
if (fExtrapCovariances) *fExtrapCovariances = *(theMUONTrackParam.fExtrapCovariances);
else fExtrapCovariances = new TMatrixD(*(theMUONTrackParam.fExtrapCovariances));
- } else if (fExtrapCovariances) {
+ } else {
delete fExtrapCovariances;
fExtrapCovariances = 0x0;
}
if (theMUONTrackParam.fSmoothParameters) {
if (fSmoothParameters) *fSmoothParameters = *(theMUONTrackParam.fSmoothParameters);
else fSmoothParameters = new TMatrixD(*(theMUONTrackParam.fSmoothParameters));
- } else if (fSmoothParameters) {
+ } else {
delete fSmoothParameters;
fSmoothParameters = 0x0;
}
if (theMUONTrackParam.fSmoothCovariances) {
if (fSmoothCovariances) *fSmoothCovariances = *(theMUONTrackParam.fSmoothCovariances);
else fSmoothCovariances = new TMatrixD(*(theMUONTrackParam.fSmoothCovariances));
- } else if (fSmoothCovariances) {
+ } else {
delete fSmoothCovariances;
fSmoothCovariances = 0x0;
}
void AliMUONTrackParam::SetCovariances(const TMatrixD& covariances)
{
/// Set the covariance matrix
- if (&covariances == fCovariances) return; // nothing to be done
if (fCovariances) *fCovariances = covariances;
else fCovariances = new TMatrixD(covariances);
}
/// Return the propagator (create it before if needed)
if (!fPropagator) {
fPropagator = new TMatrixD(5,5);
- fPropagator->Zero();
+ fPropagator->UnitMatrix();
}
return *fPropagator;
}
void AliMUONTrackParam::ResetPropagator()
{
/// Reset the propagator
- if (!fPropagator) fPropagator = new TMatrixD(5,5);
- fPropagator->UnitMatrix();
+ if (fPropagator) fPropagator->UnitMatrix();
}
//__________________________________________________________________________
void AliMUONTrackParam::UpdatePropagator(const TMatrixD& propagator)
{
/// Update the propagator
- if (&propagator == fPropagator) return; // nothing to be done
if (fPropagator) *fPropagator = TMatrixD(propagator,TMatrixD::kMult,*fPropagator);
else fPropagator = new TMatrixD(propagator);
}
void AliMUONTrackParam::SetExtrapParameters(const TMatrixD& extrapParameters)
{
/// Set extrapolated parameters
- if (&extrapParameters == fExtrapParameters) return; // nothing to be done
if (fExtrapParameters) *fExtrapParameters = extrapParameters;
else fExtrapParameters = new TMatrixD(extrapParameters);
}
void AliMUONTrackParam::SetExtrapCovariances(const TMatrixD& extrapCovariances)
{
/// Set the extrapolated covariance matrix
- if (&extrapCovariances == fExtrapCovariances) return; // nothing to be done
if (fExtrapCovariances) *fExtrapCovariances = extrapCovariances;
else fExtrapCovariances = new TMatrixD(extrapCovariances);
}
void AliMUONTrackParam::SetSmoothParameters(const TMatrixD& smoothParameters)
{
/// Set the smoothed parameters
- if (&smoothParameters == fSmoothParameters) return; // nothing to be done
if (fSmoothParameters) *fSmoothParameters = smoothParameters;
else fSmoothParameters = new TMatrixD(smoothParameters);
}
void AliMUONTrackParam::SetSmoothCovariances(const TMatrixD& smoothCovariances)
{
/// Set the smoothed covariance matrix
- if (&smoothCovariances == fSmoothCovariances) return; // nothing to be done
if (fSmoothCovariances) *fSmoothCovariances = smoothCovariances;
else fSmoothCovariances = new TMatrixD(smoothCovariances);
}