adding a protection for zero charge causing arithmetic exception
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Jun 2011 20:10:35 +0000 (20:10 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Jun 2011 20:10:35 +0000 (20:10 +0000)
HLT/TPCLib/AliHLTTPCClusterFinder.cxx

index 27e837d..a394ab9 100644 (file)
@@ -1127,6 +1127,11 @@ void AliHLTTPCClusterFinder::WriteClusters(Int_t nclusters,AliClusterData *list)
        UInt_t q2=list[j].fTotalCharge*list[j].fTotalCharge;
        //      Float_t sy2=list[j].fPad2 * list[j].fTotalCharge - list[j].fPad * list[j].fPad;
        Float_t sy2=(Float_t)list[j].fPad2 * list[j].fTotalCharge - (Float_t)list[j].fPad * list[j].fPad;
+       if(q2 == 0) {
+         LOG(AliHLTTPCLog::kError,"AliHLTTPCClusterFinder::WriteClusters","Cluster width")
+           <<"zero charge "<< list[j].fTotalCharge <<" on row "<<fCurrentRow<<" "<<fpad<<" "<<ftime<<ENDLOG;
+         continue;
+       }
        sy2/=q2;
        if(sy2 < 0) {
            LOG(AliHLTTPCLog::kError,"AliHLTTPCClusterFinder::WriteClusters","Cluster width")