+//-*- Mode: C++ -*-
#ifndef ALIHLTPHOSRAWANALYZER_H
#define ALIHLTPHOSRAWANALYZER_H
/* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. *
/* $Id$ */
+#include "Rtypes.h"
-#include "AliHLTPHOSBase.h"
-class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase
+//#include "AliHLTPHOSBase.h"
+class AliHLTPHOSUtilities;
+
+//class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase
+class AliHLTPHOSRawAnalyzer
//class AliHLTPHOSRawAnalyzer
{
public:
virtual ~AliHLTPHOSRawAnalyzer();
AliHLTPHOSRawAnalyzer(double *dataPtr, double fs);
- void BaselineCorrection(double *dataPtr, int N);
- void BaselineCorrection(double *dataPtr, double baselineValue);
+ void SetCorrectBaselineUsingFirstFiveSamples();
+ void CorrectBaselineUsingFirstFiveSamples(UInt_t *data, const int length);
+ // void CorrectBaselineUsingFirstFiveSamples(int *data, int length);
+ //void CorrectBaselineUsingFirstFiveSamples(double *data, int length);
+
+
+ // void BaselineCorrection(double *dataPtr, int N);
+ void BaselineCorrection(double *dataPtr, double baselineValue);
+
int FindStartIndex(double treshold);
float GetTiming() const;
float GetEnergy() const;
- void SetData(double *data);
- void SetData(UInt_t *data);
+ // void SetData(const double *data);
+ void SetData(const UInt_t *data, const int length);
+ void SetData(const UShort_t *data, const int length);
+ // void SetData(UInt_t *data, const int length);
+
+ // void SetData(double *data, const int length);
+ // void SetData(int *data, const int length);
+
void SetSampleFreq(double freq);
void SetStartIndex(int startIndex);
void MakeInitialGuess();
void MakeInitialGuess(int treshold);
-
+
virtual void SetTVector(Double_t *tVector, Int_t size);
virtual void SetAVector(Double_t *aVector, Int_t size);
+
virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0;
+
protected:
- Double_t *fFloatDataPtr; /**<Float representation of data that should be fitted */
- UInt_t *fIntDataPtr; /**<data that should be fitted */
+ bool fDoCorrectBaselineUsingFirstFiveSamples;
+
+ // mutable Double_t *fFloatDataPtr; /**<Float representation of data that should be fitted */
+ // mutable UInt_t *fIntDataPtr; /**<data that should be fitted */
+
+ /* mutable const Double_t *fFloatDataPtr; /\**<Float representation of data that should be fitted *\/ */
+/* mutable const unsigned int *fIntDataPtr; /\**<data that should be fitted *\/ */
+
+
+ //double *fFloatDataPtr; /**<Float representation of data that should be fitted */
+
+ double *fDoubleDataPtr; /**<Float representation of data that should be fitted */
+ UInt_t *fIntDataPtr; /**<data that should be fitted */
+ UShort_t *fShortDataPtr; /**<data that should be fitted */
+ // int *fIntDataPtr; /**<data that should be fitted */
+
+
+ // mutable const UInt_t *fIntDataPtr; /**<data that should be fitted */
+
double fSampleFrequency; /**<The ADC sample frequency in MHz used under data taking */
double fDTofGuess; /**<Initial guess for t0*/
double fDAmplGuess; /**<Initial guess for amplitude*/
double fDAmpl; /**<Amplitude in entities of ADC levels*/
int fStartIndex; /**<Starindex of the time dependent altro signal*/
+ // double unsigned fTest;
+
+ bool fUseShortValues;
+
+ protected:
+ AliHLTPHOSUtilities *fUtilitiesPtr;
+
private:
AliHLTPHOSRawAnalyzer(const AliHLTPHOSRawAnalyzer & );
AliHLTPHOSRawAnalyzer & operator = (const AliHLTPHOSRawAnalyzer &);