Small modification in loops by Sylwester to speed up the code
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Mar 2007 08:31:40 +0000 (08:31 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Mar 2007 08:31:40 +0000 (08:31 +0000)
TRD/AliTRDclusterizerV1.cxx

index 4f4067b..411a20b 100644 (file)
@@ -293,12 +293,14 @@ Bool_t AliTRDclusterizerV1::MakeClusters()
          for ( col = 2;  col <  nColMax;    col++) {
             for (time = 0; time < nTimeTotal; time++) {
 
-              Float_t signalL = TMath::Abs(digitsOut->GetDataUnchecked(row,col  ,time));
               Float_t signalM = TMath::Abs(digitsOut->GetDataUnchecked(row,col-1,time));
-              Float_t signalR = TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time));
  
              // Look for the maximum
               if (signalM >= maxThresh) {
+
+                Float_t signalL = TMath::Abs(digitsOut->GetDataUnchecked(row,col  ,time));
+                Float_t signalR = TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time));
+
                 if ((TMath::Abs(signalL) <= signalM) && 
                     (TMath::Abs(signalR) <  signalM)) {
                  if ((TMath::Abs(signalL) >= sigThresh) ||
@@ -307,6 +309,7 @@ Bool_t AliTRDclusterizerV1::MakeClusters()
                     digitsOut->SetDataUnchecked(row,col-1,time,-signalM);
                  }
                }
+
              }
 
             }