]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.cxx
removing the HLT autoconf build system, however keep on using that for the
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSRawAnalyzerPeakFinder.cxx
index 559bdf3cc1d59c5f9b1e8c3defc3a7941e09db23..1b4835c0b381ac2babe2fb1d1e709a58d05e0720 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+
 /**************************************************************************
  * This file is property of and copyright by the Experimental Nuclear     *
  * Physics Group, Dep. of Physics                                         *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+
+
+
 #include "AliHLTPHOSRawAnalyzerPeakFinder.h"
-#include <iostream>
+//#include <iostream>
 #include <cmath>
+#include "AliHLTCaloUtilities.h" 
 
 using std::cout;
 using std::endl;
@@ -26,12 +32,6 @@ 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
@@ -39,8 +39,14 @@ AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder(const AliHLTPHO
  * 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)
+//  fUtilitiesPtr(0)
 {
+  //  fUtilitiesPtr = new  AliHLTPHOSUtilities(); 
   //  cout <<"PeakFinder:You cannot invoke the Fitter without arguments"<<endl;;
 }
 
@@ -51,6 +57,8 @@ AliHLTPHOSRawAnalyzerPeakFinder::~AliHLTPHOSRawAnalyzerPeakFinder()
 
 } //end AliHLTPHOSRawAnalyzerPeakFinder
 
+
+
 void 
 AliHLTPHOSRawAnalyzerPeakFinder::SetTVector(Double_t *tVec, Int_t size)
 {
@@ -91,9 +99,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)
 {
   fDTof = 0;
   fDAmpl = 0;
@@ -105,8 +114,6 @@ AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(Int_t start, Int_t length)
     }
   else
     {
-     
       if(length <  fTVectorSize)
        {
          tmpLength = length;
@@ -118,17 +125,21 @@ 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]; removed 18 april 2008    
+         fDAmpl += fAVectorPtr[i]*fDoubleDataPtr[i];   
        }
 
       for(int i=0; i < tmpLength; i++)
        {   
-         fDTof += fTVectorPtr[i]*fFloatDataPtr[i]; 
+         //  fDTof += fTVectorPtr[i]*fIntDataPtr[i];  removed 18 april 2008   
+         fDTof += fTVectorPtr[i]*fDoubleDataPtr[i]; 
        }
       
       if(fDAmpl > 900)
        {
-         Double_t tmpMax = GetMaxValue(fFloatDataPtr, tmpLength);
+         //      Double_t tmpMax = MaxValue(const_cast<unsigned int*>(fIntDataPtr), tmpLength);  removed 18 april 2008   
+         double tmpMax = fUtilitiesPtr->MaxValue(fDoubleDataPtr, tmpLength); 
+
          if(tmpMax == 1023)
            {
              fDAmpl = tmpMax;