]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.cxx
Revert accidental changes
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSRawAnalyzerPeakFinder.cxx
index 082ea95a9e5e5949bf8874a28f41cc24bcd06c75..3ce5004899babe19d884891b826778bd0d3c7200 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+
 /**************************************************************************
  * This file is property of and copyright by the Experimental Nuclear     *
  * Physics Group, Dep. of Physics                                         *
  **************************************************************************/
 
 #include "AliHLTPHOSRawAnalyzerPeakFinder.h"
-#include <iostream>
 #include <cmath>
+#include "AliHLTCaloUtilities.h" 
 
-using std::cout;
-using std::endl;
+//using std::cout;
+//using std::endl;
 
 ClassImp(AliHLTPHOSRawAnalyzerPeakFinder) 
 
 
-AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder(const AliHLTPHOSRawAnalyzerPeakFinder&):AliHLTPHOSRawAnalyzer() , fTVectorPtr(0), fAVectorPtr(0), fTVectorSize(0), fAVectorSize(0)
-{
-
-
-}
-
-
 /**
  * The AliHLTPHOSPeakfinder class is the class for extracting the basic signal parameters
  * "timing" and "energy" from the PHOS raw data. Physical data will for a given readout channel be
  * a sequense of ADC digitized 10 bit integer values, however for performance reasons all values used in
  * calculation is of type double.
  **/
-AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder():AliHLTPHOSRawAnalyzer(), fTVectorPtr(0), fAVectorPtr(0), fTVectorSize(0), fAVectorSize(0)
+AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder():AliHLTPHOSRawAnalyzer(), 
+                                                                   fTVectorPtr(0), 
+                                                                  fAVectorPtr(0), 
+                                                                  fTVectorSize(0), 
+                                                                  fAVectorSize(0)
 {
-  //  cout <<"PeakFinder:You cannot invoke the Fitter without arguments"<<endl;;
+
 }
 
 
@@ -51,6 +50,7 @@ AliHLTPHOSRawAnalyzerPeakFinder::~AliHLTPHOSRawAnalyzerPeakFinder()
 
 } //end AliHLTPHOSRawAnalyzerPeakFinder
 
+
 void 
 AliHLTPHOSRawAnalyzerPeakFinder::SetTVector(Double_t *tVec, Int_t size)
 {
@@ -70,11 +70,10 @@ AliHLTPHOSRawAnalyzerPeakFinder::SetTVector(Double_t *tVec, Int_t size)
 }
 
 
-//___________________________________________________________________
 void
 AliHLTPHOSRawAnalyzerPeakFinder::SetAVector(Double_t *aVec, Int_t size)
 {
-    
+  //comment
   fAVectorSize = size;
 
   if(fAVectorPtr != 0)
@@ -90,11 +89,10 @@ AliHLTPHOSRawAnalyzerPeakFinder::SetAVector(Double_t *aVec, Int_t size)
     }
 }
 
-
-//___________________________________________________________________
 void 
-AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(Int_t start, Int_t length)
+AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(Int_t /*start*/, Int_t length)
 {
+  //comment
   fDTof = 0;
   fDAmpl = 0;
   Int_t tmpLength;
@@ -105,7 +103,6 @@ AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(Int_t start, Int_t length)
     }
   else
     {
-
       if(length <  fTVectorSize)
        {
          tmpLength = length;
@@ -117,29 +114,24 @@ AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(Int_t start, Int_t length)
       
       for(int i=0; i < tmpLength; i++)
        {  
-         //      fDAmpl += fAVectorPtr[i]*fFloatDataPtr[i];    
-         fDAmpl += fAVectorPtr[i]*fIntDataPtr[i];   
+         fDAmpl += fAVectorPtr[i]*fDoubleDataPtr[i];   
        }
 
       for(int i=0; i < tmpLength; i++)
        {   
-         //      fDTof += fTVectorPtr[i]*fFloatDataPtr[i]; 
-         fDTof += fTVectorPtr[i]*fIntDataPtr[i]; 
+         fDTof += fTVectorPtr[i]*fDoubleDataPtr[i]; 
        }
       
       if(fDAmpl > 900)
        {
-         //      Double_t tmpMax = GetMaxValue(fFloatDataPtr, tmpLength);
-         Double_t tmpMax = GetMaxValue(fIntDataPtr, tmpLength);
-                                 
+         double tmpMax = AliHLTCaloUtilities::MaxValue(fDoubleDataPtr, tmpLength); 
+
          if(tmpMax == 1023)
            {
              fDAmpl = tmpMax;
            }
        }
-
       fDTof = fDTof/fDAmpl;
-
     }
 } //end Evaluate