Additional protection
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 May 2006 07:05:02 +0000 (07:05 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 May 2006 07:05:02 +0000 (07:05 +0000)
HLT/src/AliL3ClustFinderNew.cxx

index b36c2c2c4c0c1b21cbaa0d3e1314f52d768b052e..2bfd282bbe6681b5616aff598a476b06f6ac5319 100644 (file)
@@ -388,6 +388,12 @@ void AliL3ClustFinderNew::WriteClusters(Int_t nclusters,AliClusterData *list)
       if(fCalcerr) { //calc the errors, otherwice take the fixed error 
        Int_t patch = AliL3Transform::GetPatch(fCurrentRow);
        UInt_t q2=list[j].fTotalCharge*list[j].fTotalCharge;
+       if (!q2) {
+           LOG(AliL3Log::kError,"AliL3ClustFinderNew::WriteClusters","Total charge")
+             <<"Zero total charge "<<q2<<" on row "<<fCurrentRow<<" "<<fpad<<" "<<ftime<<ENDLOG;
+           continue;
+
+       }
        Float_t sy2=list[j].fPad2 * list[j].fTotalCharge - list[j].fPad * list[j].fPad;
        sy2/=q2;
        if(sy2 < 0) {