]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Bugfix for calculation of cluster widths.
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Jun 2004 09:26:43 +0000 (09:26 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Jun 2004 09:26:43 +0000 (09:26 +0000)
HLT/src/AliL3ClustFinderNew.cxx
HLT/src/AliL3ClustFinderNew.h

index 2f2a5178a2a01c186577ee6b2308f17c93f38ba2..a2cdd4ad10215fe2d37aa9573f7962b22ffb3812 100644 (file)
@@ -380,15 +380,16 @@ void AliL3ClustFinderNew::WriteClusters(Int_t n_clusters,AliClusterData *list)
       if(list[j].fTotalCharge < fThreshold) continue; //noise cluster
 
       Float_t xyz[3];      
       if(list[j].fTotalCharge < fThreshold) continue; //noise cluster
 
       Float_t xyz[3];      
-      Float_t fpad =(Float_t)list[j].fPad /(Float_t)list[j].fTotalCharge;
+      Float_t fpad =(Float_t)list[j].fPad / list[j].fTotalCharge;
       Float_t fpad2=fXYErr*fXYErr; //fixed given error
       Float_t fpad2=fXYErr*fXYErr; //fixed given error
-      Float_t ftime =(Float_t)list[j].fTime /(Float_t)list[j].fTotalCharge;
+      Float_t ftime =(Float_t)list[j].fTime / list[j].fTotalCharge;
       Float_t ftime2=fZErr*fZErr;  //fixed given error
 
       if(fCalcerr) { //calc the errors, otherwice take the fixed error 
        Int_t patch = AliL3Transform::GetPatch(fCurrentRow);
       Float_t ftime2=fZErr*fZErr;  //fixed given error
 
       if(fCalcerr) { //calc the errors, otherwice take the fixed error 
        Int_t patch = AliL3Transform::GetPatch(fCurrentRow);
-
-       Double_t sy2=(Float_t)list[j].fPad2/(Float_t)list[j].fTotalCharge - fpad*fpad;
+       UInt_t q2=list[j].fTotalCharge*list[j].fTotalCharge;
+       Float_t sy2=list[j].fPad2 * list[j].fTotalCharge - list[j].fPad * list[j].fPad;
+       sy2/=q2;
        if(sy2 < 0) {
            LOG(AliL3Log::kError,"AliL3ClustFinderNew::WriteClusters","Cluster width")
              <<"SigmaY2 negative "<<sy2<<" on row "<<fCurrentRow<<" "<<fpad<<" "<<ftime<<ENDLOG;
        if(sy2 < 0) {
            LOG(AliL3Log::kError,"AliL3ClustFinderNew::WriteClusters","Cluster width")
              <<"SigmaY2 negative "<<sy2<<" on row "<<fCurrentRow<<" "<<fpad<<" "<<ftime<<ENDLOG;
@@ -403,7 +404,8 @@ void AliL3ClustFinderNew::WriteClusters(Int_t n_clusters,AliClusterData *list)
            }
          } else fpad2=sy2; //take the width not the error
        }
            }
          } else fpad2=sy2; //take the width not the error
        }
-       Double_t sz2=(Float_t)list[j].fTime2/(Float_t)list[j].fTotalCharge - ftime*ftime;
+       Float_t sz2=list[j].fTime2*list[j].fTotalCharge - list[j].fTime*list[j].fTime;
+       sz2/=q2;
        if(sz2 < 0){
          LOG(AliL3Log::kError,"AliL3ClustFinderNew::WriteClusters","Cluster width")
            <<"SigmaZ2 negative "<<sz2<<" on row "<<fCurrentRow<<" "<<fpad<<" "<<ftime<<ENDLOG;
        if(sz2 < 0){
          LOG(AliL3Log::kError,"AliL3ClustFinderNew::WriteClusters","Cluster width")
            <<"SigmaZ2 negative "<<sz2<<" on row "<<fCurrentRow<<" "<<fpad<<" "<<ftime<<ENDLOG;
index 294b3ef1713b25af9332a97cafdc8b23d493e75a..55748e104a652effafb336aea063b4a466241581 100644 (file)
@@ -11,8 +11,8 @@ struct AliClusterData
   UInt_t fTotalCharge;
   UInt_t fPad;
   UInt_t fTime;
   UInt_t fTotalCharge;
   UInt_t fPad;
   UInt_t fTime;
-  UInt_t fPad2;     //for error in XY direction
-  ULong64_t fTime2; //for error in Z  direction
+  ULong64_t fPad2;     //for error in XY direction
+  ULong64_t fTime2;    //for error in Z  direction
   UInt_t fMean;
   UInt_t fFlags;
   UInt_t fChargeFalling; //for deconvolution
   UInt_t fMean;
   UInt_t fFlags;
   UInt_t fChargeFalling; //for deconvolution