- bendingSlope = (hit1Ptr->GetBendingCoor() - hit2Ptr->GetBendingCoor()) /
- (hit1Ptr->GetZ() - hit2Ptr->GetZ());
- // absolute value of impact parameter
- impactParam =
- TMath::Abs(hit1Ptr->GetBendingCoor() - hit1Ptr->GetZ() * bendingSlope);
+ if ( hit1Ptr->GetZ() - hit2Ptr->GetZ() != 0.0 ) {
+ bendingSlope = (hit1Ptr->GetBendingCoor() - hit2Ptr->GetBendingCoor()) /
+ (hit1Ptr->GetZ() - hit2Ptr->GetZ());
+ // absolute value of impact parameter
+ impactParam =
+ TMath::Abs(hit1Ptr->GetBendingCoor() - hit1Ptr->GetZ() * bendingSlope);
+ }
+ else {
+ AliWarning("hit1Ptr->GetZ() = hit2Ptr->GetZ(): impactParam set to maxImpactParam");
+ impactParam = maxImpactParam;
+ }