]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Change of naming convention from Analyzer to RawAnalyser for classes that analyses...
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Jan 2007 15:36:43 +0000 (15:36 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Jan 2007 15:36:43 +0000 (15:36 +0000)
18 files changed:
HLT/PHOS/AliHLTPHOSRawAnalyzer.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzer.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerChiSquareFit.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerChiSquareFit.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponent.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponent.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerKLevel.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerKLevel.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerLMS.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerLMS.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinderComponent.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinderComponent.h [new file with mode: 0644]

diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzer.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzer.cxx
new file mode 100644 (file)
index 0000000..8932756
--- /dev/null
@@ -0,0 +1,139 @@
+#include "AliHLTPHOSRawAnalyzer.h"
+#include <iostream>
+
+using std::cout;
+using std::endl;
+
+
+
+AliHLTPHOSRawAnalyzer:: AliHLTPHOSRawAnalyzer():fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
+{
+
+
+}
+
+AliHLTPHOSRawAnalyzer::~AliHLTPHOSRawAnalyzer()
+{
+
+}
+
+AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(AliHLTPHOSRawAnalyzer const&):fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
+{
+
+}
+
+/**
+* Main constructor
+* @param dataPtr Data array for wich a subarray will be taken to perform the fit
+* @param fs the sampling frequency in entities of MHz. Needed in order to calculate physical time
+**/
+AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(double *dtaPtr, double fs):fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
+{
+  fFloatDataPtr = dtaPtr;  
+  fSampleFrequency = fs;
+} //end  
+
+
+/**
+* Attemps to level the basline to zero.
+* The baseline will be calculated from the pretrigger samples and subtracted from the 
+* data array. 
+* If pretrigger samples are not present then the basline correction will be incorrect. 
+* @param dataPtr array for wich to correct the basline 
+* @param N the number of pretrigger samples used to calculate the baseline.
+**/
+void 
+AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, int N)
+{
+  fFloatDataPtr = dataPtr;  
+  n=N;
+  cout << "Baseline correction not yet implemeted" << endl;
+} //end BaselineCorrection
+
+
+/**
+* Shifts the basline with the amount given by baselineValue
+* If pretrigger samples are not present then the basline correction will be incorrect. 
+* @param dataPtr array for wich to correct the basline 
+* @param BaslineValue the basline value to subtract..
+**/
+void 
+AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, double baselineValue)
+{
+  fFloatDataPtr = dataPtr;   
+  printf("\nbaselineValue = %f\n", baselineValue);
+  cout << "Baseline correction not yet implemeted" << endl;
+} //end BaslineCorrection
+
+
+/**
+ * Gives the timing in entities of sample indexes
+ * Physical time is found by multiplying  with the sampling intervall (Ts).
+ **/
+float
+AliHLTPHOSRawAnalyzer::GetTiming()
+{
+  return fDTof;
+} //end GetTiming
+
+
+/**
+ * Gives the time in entities of ADC channels (quantization levels).  
+ * Absolute enrgy is found by multiplying with offline calibration constants.
+ **/
+float
+AliHLTPHOSRawAnalyzer::GetEnergy()
+{
+  return fDAmpl;
+} //end GetEnergy
+
+
+/**
+ * Set data array. Overrides data data array set in the constructor.
+ **/
+void 
+AliHLTPHOSRawAnalyzer::SetData(double *data)
+{
+  //  double *dta;
+  //  dta = data;
+  fFloatDataPtr = data;
+  //  cout << "Set data not yet implemented" << endl;
+}
+
+void 
+AliHLTPHOSRawAnalyzer::SetSampleFreq(double freq)
+{
+
+}
+
+int 
+AliHLTPHOSRawAnalyzer::FindStartIndex(double treshold)
+{
+  printf("\ntreshold = %f \n", treshold);
+  cout << "Find Start index not yet implemented" << endl;
+  return 0;
+} //end FindStartIndex
+
+
+/**
+ * This function applies only to the Chi and Least mean square fit. An initial guess is made
+ * based on the average of the first 5 samples and the first value exeeding this value.
+ **/
+void 
+AliHLTPHOSRawAnalyzer::MakeInitialGuess()
+{
+  cout << "Make initial guess not yet implemeted" << endl;
+}
+
+
+/**
+ * This function applies only to the Chi and Least mean square fit. An initial guess is made
+ * based on the average of the first 5 samples and the first value exeeding threshold + this value.
+ * @param treshold The index of the first value above treshold is ntaken to be the first value.
+ **/
+void 
+AliHLTPHOSRawAnalyzer::MakeInitialGuess(int treshold)
+{
+  printf("\ntreshold = %d\n", treshold);
+  cout << "Make initial guess not yet implemeted" << endl;  
+}
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzer.h b/HLT/PHOS/AliHLTPHOSRawAnalyzer.h
new file mode 100644 (file)
index 0000000..5351848
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef ALIHLTPHOSANALYZER_H
+#define ALIHLTPHOSANALYZER_H
+/* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+class AliHLTPHOSAnalyzer
+{
+ public:
+  AliHLTPHOSAnalyzer();
+  virtual ~AliHLTPHOSAnalyzer();
+  AliHLTPHOSAnalyzer(double *dataPtr, double fs);
+  AliHLTPHOSAnalyzer(const AliHLTPHOSAnalyzer & );
+  AliHLTPHOSAnalyzer & operator = (const AliHLTPHOSAnalyzer &)
+    {
+      return *this;
+    }
+
+  void BaselineCorrection(double *dataPtr, int N);
+  void BaselineCorrection(double *dataPtr, double baselineValue);  
+  int FindStartIndex(double treshold);
+  float GetTiming();
+  float GetEnergy();
+  void SetData(double *data);
+  void SetSampleFreq(double freq);
+  void MakeInitialGuess();
+  void MakeInitialGuess(int treshold);
+  virtual void Evaluate(int start = 0, int lenght = 100) = 0;
+
+ protected:
+  double    *fFloatDataPtr;    /**<Float representation of 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     fTau;            /**<The risetime in micro seconds*/               
+  double     fDTof;            /**<Time of flight in entities of sample intervals */
+  double     fDAmpl;           /**<Amplitude in entities of ADC levels*/
+  int        n;
+
+};
+
+
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerChiSquareFit.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerChiSquareFit.cxx
new file mode 100644 (file)
index 0000000..e681bf1
--- /dev/null
@@ -0,0 +1,72 @@
+
+/**************************************************************************
+ * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
+ *                                                                        *
+ * Author: Per Thomas Hille for the ALICE HLT Project.                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#include "AliHLTPHOSRawAnalyzerChiSquareFit.h"
+#include <iostream>
+
+using std::cout;
+using std::endl;
+
+ClassImp(AliHLTPHOSRawAnalyzerChiSquareFit) 
+
+AliHLTPHOSRawAnalyzerChiSquareFit::AliHLTPHOSRawAnalyzerChiSquareFit(const AliHLTPHOSRawAnalyzerChiSquareFit&):AliHLTPHOSRawAnalyzer()
+{
+
+}
+
+/**
+ * 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.
+ **/
+AliHLTPHOSRawAnalyzerChiSquareFit::AliHLTPHOSRawAnalyzerChiSquareFit():AliHLTPHOSRawAnalyzer()
+{
+  cout <<"You cannot invoke the Fitter without arguments"<<endl;;
+}
+
+
+AliHLTPHOSRawAnalyzerChiSquareFit::~AliHLTPHOSRawAnalyzerChiSquareFit()
+{
+
+} //end AliHLTPHOSRawAnalyzerChiSquareFit
+
+
+/**
+* Extraction of timing and energy using the Peakfinde Algorithm.
+* The. The parameters "start" and "length" defines a sub array  of the data array
+* that will be used for the the fit. If start+length must not exeed the total length
+* of the Data array. "start" must be chosen as close as possible to t0.
+* The baseline must also be subtracted.
+* The length of "tVector" and "aVector" mus be equal to length.
+* "index + length" must not exeed the length of the data array set in the constructor.
+* @param start the start index of the subarray of the data array. 
+* @param length the number of samples to use starting from index 
+**/
+void 
+AliHLTPHOSRawAnalyzerChiSquareFit::Evaluate(int start, int length)
+{
+  /*
+
+  */
+
+  //thats all 
+} //end FitChiSquareFit
+
+
+
+
+
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerChiSquareFit.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerChiSquareFit.h
new file mode 100644 (file)
index 0000000..0e8a082
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef ALIHLTPHOSANALYZERCHISQUAREFIT_H
+#define ALIHLTPHOSANALYZERCHISQUAREFIT_H
+#include <Rtypes.h>
+#include "TObject.h"
+#include "AliHLTPHOSRawAnalyzer.h"
+
+/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                          */
+
+
+class AliHLTPHOSRawAnalyzerChiSquareFit : public AliHLTPHOSRawAnalyzer
+{
+ public:
+  AliHLTPHOSRawAnalyzerChiSquareFit();
+  AliHLTPHOSRawAnalyzerChiSquareFit(const AliHLTPHOSRawAnalyzerChiSquareFit & );
+
+  AliHLTPHOSRawAnalyzerChiSquareFit & operator = (const AliHLTPHOSRawAnalyzerChiSquareFit)
+    {
+      return *this; 
+    }
+  
+  virtual ~AliHLTPHOSRawAnalyzerChiSquareFit();
+  virtual void Evaluate(int start = 0, int lenght = 100);
+ private:
+
+  ClassDef(AliHLTPHOSRawAnalyzerChiSquareFit, 2) 
+  
+    };
+
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.cxx
new file mode 100644 (file)
index 0000000..f9a3811
--- /dev/null
@@ -0,0 +1,91 @@
+/**************************************************************************
+ * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
+ *                                                                        *
+ * Author: Per Thomas Hille for the ALICE HLT Project.                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#include "AliHLTPHOSRawAnalyzerComponent.h"
+#include <iostream>
+
+//ClassImp(AliHLTPHOSRawAnalyzerComponent) 
+
+AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent()
+{
+
+} 
+
+AliHLTPHOSRawAnalyzerComponent::~AliHLTPHOSRawAnalyzerComponent()
+{
+
+}
+
+
+AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & ) : AliHLTProcessor()
+{
+
+}
+
+int 
+AliHLTPHOSRawAnalyzerComponent::Deinit()
+{
+  return 0;
+}
+
+int 
+AliHLTPHOSRawAnalyzerComponent::DoDeinit()
+{
+  return 0;
+}
+
+const char* 
+AliHLTPHOSRawAnalyzerComponent::GetComponentID()
+{
+  return 0;
+}
+
+void
+AliHLTPHOSRawAnalyzerComponent::GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&)
+{
+
+}
+
+AliHLTComponentDataType 
+AliHLTPHOSRawAnalyzerComponent::GetOutputDataType()
+{
+  AliHLTComponentDataType tmp;
+  return tmp;
+}
+
+void
+AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(long unsigned int&, double&)
+{
+
+}
+
+void 
+AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(long  int&, double&)
+{
+
+}
+
+AliHLTComponent* 
+AliHLTPHOSRawAnalyzerComponent::Spawn()
+{
+  return 0;
+}
+
+int 
+AliHLTPHOSRawAnalyzerComponent::DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&)
+{
+  printf("\nPHOSHLT DoEvent, not yet implemented\n");
+  return 0;
+}
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h
new file mode 100644 (file)
index 0000000..5fa27ed
--- /dev/null
@@ -0,0 +1,40 @@
+/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                          */
+
+#ifndef ALIHLTPHOSANALYZERCOMPONENT_H
+#define ALIHLTPHOSANALYZERCOMPONENT_H
+
+//#include <Rtypes.h>
+//#include "TObject.h"
+#include "AliHLTProcessor.h"
+#include "AliHLTPHOSRawAnalyzer.h"
+#include "AliHLTPHOSRawAnalyzerCrude.h"
+
+class AliHLTPHOSRawAnalyzerComponent: public AliHLTProcessor
+{
+ public:
+  AliHLTPHOSRawAnalyzerComponent();
+  ~AliHLTPHOSRawAnalyzerComponent();
+  AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & );
+  AliHLTPHOSRawAnalyzerComponent & operator = (const AliHLTPHOSRawAnalyzerComponent)
+   {
+      return *this;
+   };
+
+  virtual int Deinit();
+  virtual int DoDeinit();
+  virtual const char* GetComponentID();
+  virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+  virtual AliHLTComponentDataType GetOutputDataType();
+  virtual void GetOutputDataSize(long unsigned int&, double&);
+  virtual void GetOutputDataSize(long  int&, double&);
+  virtual AliHLTComponent* Spawn();
+  virtual int DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&);
+
+  // private:
+ protected:
+ AliHLTPHOSRawAnalyzer *analyzerPtr; 
+
+ // ClassDef(AliHLTPHOSRawAnalyzerComponent, 2) 
+};
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx
new file mode 100644 (file)
index 0000000..0b7380c
--- /dev/null
@@ -0,0 +1,88 @@
+/**************************************************************************
+ * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
+ *                                                                        *
+ * Author: Per Thomas Hille for the ALICE HLT Project.                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#include "AliHLTPHOSRawAnalyzerCrude.h"
+#include <iostream>
+
+using std::cout;
+using std::endl;
+
+ClassImp(AliHLTPHOSRawAnalyzerCrude) 
+
+
+AliHLTPHOSRawAnalyzerCrude::AliHLTPHOSRawAnalyzerCrude(const AliHLTPHOSRawAnalyzerCrude&):AliHLTPHOSRawAnalyzer()
+{
+
+}
+
+/**
+ * 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.
+ **/
+AliHLTPHOSRawAnalyzerCrude::AliHLTPHOSRawAnalyzerCrude():AliHLTPHOSRawAnalyzer() 
+{
+  cout <<"You cannot invoke the Fitter without arguments"<<endl;
+}
+
+
+
+AliHLTPHOSRawAnalyzerCrude::~AliHLTPHOSRawAnalyzerCrude()
+{
+
+} //end AliHLTPHOSRawAnalyzerCrude
+
+
+
+/**
+* Extraction of timing and energy using the Peakfinde Algorithm.
+* The. The parameters "start" and "length" defines a sub array  of the data array
+* that will be used for the the fit. If start+length must not exeed the total length
+* of the Data array. "start" must be chosen as close as possible to t0.
+* The baseline must also be subtracted.
+* The length of "tVector" and "aVector" mus be equal to length.
+* "index + length" must not exeed the length of the data array set in the constructor.
+* @param start the start index of the subarray of the data array. 
+* @param length the number of samples to use starting from index 
+* @param tVector the peakfinder vector for timing
+* @param aVector the peakfinder vector for amplitude (energy)
+**/
+void 
+AliHLTPHOSRawAnalyzerCrude::Evaluate(int start, int length)
+{
+  
+  double tmpAmplitudeMax =0; 
+  double tmpTime = 0;
+
+  for(int i=start; i<length; i++)
+    {
+      if(fFloatDataPtr[i] >  tmpAmplitudeMax)
+       {
+         tmpAmplitudeMax = fFloatDataPtr[i];
+         tmpTime = i;               
+       }
+    }
+       
+  fDAmpl = tmpAmplitudeMax;
+  fDTof =  tmpTime;
+  //thats all 
+} //end Crude
+
+
+
+
+
+
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.h
new file mode 100644 (file)
index 0000000..07805a5
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef ALIHLTPHOSANALYZERCRUDE_H
+#define ALIHLTPHOSANALYZERCRUDE_H
+#include <Rtypes.h>
+#include "TObject.h"
+#include "AliHLTPHOSAnalyzer.h"
+
+
+/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                          */
+
+
+class AliHLTPHOSAnalyzerCrude : public AliHLTPHOSAnalyzer
+{
+ public:
+  AliHLTPHOSAnalyzerCrude();
+  AliHLTPHOSAnalyzerCrude(const AliHLTPHOSAnalyzerCrude & );
+  AliHLTPHOSAnalyzerCrude & operator = (const AliHLTPHOSAnalyzerCrude)
+    {
+      return *this; 
+    }
+  
+  virtual ~AliHLTPHOSAnalyzerCrude();
+  virtual void Evaluate(int start = 0, int lenght = 100);
+ private:
+  ClassDef(AliHLTPHOSAnalyzerCrude, 2) 
+  
+    };
+
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponent.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponent.cxx
new file mode 100644 (file)
index 0000000..fdf278e
--- /dev/null
@@ -0,0 +1,37 @@
+/**************************************************************************
+ * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
+ *                                                                        *
+ * Author: Per Thomas Hille for the ALICE HLT Project.                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#include "AliHLTPHOSRawAnalyzerCrudeComponent.h"
+
+
+//ClassImp(AliHLTPHOSRawAnalyzerCrudeComponent) 
+
+
+AliHLTPHOSRawAnalyzerCrudeComponent::AliHLTPHOSRawAnalyzerCrudeComponent()
+{
+  analyzerPtr = new AliHLTPHOSRawAnalyzerCrude();
+} 
+
+AliHLTPHOSRawAnalyzerCrudeComponent::~AliHLTPHOSRawAnalyzerCrudeComponent()
+{
+
+}
+
+
+AliHLTPHOSRawAnalyzerCrudeComponent::AliHLTPHOSRawAnalyzerCrudeComponent(const AliHLTPHOSRawAnalyzerCrudeComponent & ):AliHLTPHOSRawAnalyzerComponent()
+{
+
+}
+
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponent.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponent.h
new file mode 100644 (file)
index 0000000..310a14a
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef ALIHLTPHOSANALYZERCRUDECOMPONENT_H
+#define ALIHLTPHOSANALYZERCRUDECOMPONENT_H
+
+#include "AliHLTPHOSRawAnalyzerComponent.h"
+
+/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice  */ 
+
+
+class AliHLTPHOSRawAnalyzerCrudeComponent: public AliHLTPHOSRawAnalyzerComponent
+{
+  AliHLTPHOSRawAnalyzerCrudeComponent();
+  ~AliHLTPHOSRawAnalyzerCrudeComponent();
+  AliHLTPHOSRawAnalyzerCrudeComponent(const AliHLTPHOSRawAnalyzerCrudeComponent & );
+  AliHLTPHOSRawAnalyzerCrudeComponent & operator = (const AliHLTPHOSRawAnalyzerCrudeComponent)
+  {
+    return *this;
+  };
+
+  //ClassDef(AliHLTPHOSRawAnalyzerCrudeComponent, 2) 
+  };
+
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerKLevel.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerKLevel.cxx
new file mode 100644 (file)
index 0000000..f5a2366
--- /dev/null
@@ -0,0 +1,70 @@
+
+/**************************************************************************
+ * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
+ *                                                                        *
+ * Author: Per Thomas Hille for the ALICE HLT Project.                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#include "AliHLTPHOSRawAnalyzerKLevel.h"
+#include <iostream>
+
+using std::cout;
+using std::endl;
+
+ClassImp(AliHLTPHOSRawAnalyzerKLevel) 
+
+
+AliHLTPHOSRawAnalyzerKLevel::AliHLTPHOSRawAnalyzerKLevel(const AliHLTPHOSRawAnalyzerKLevel&):AliHLTPHOSRawAnalyzer(), tKLevel(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.
+ **/
+AliHLTPHOSRawAnalyzerKLevel::AliHLTPHOSRawAnalyzerKLevel():AliHLTPHOSRawAnalyzer(), tKLevel(0) 
+{
+  cout <<"You cannot invoke the Fitter without arguments"<<endl;;
+}
+
+
+AliHLTPHOSRawAnalyzerKLevel::~AliHLTPHOSRawAnalyzerKLevel()
+{
+
+} //end AliHLTPHOSRawAnalyzerKLevel
+
+
+
+/**
+* Extraction of timing and energy using the Peakfinde Algorithm.
+* The. The parameters "start" and "length" defines a sub array  of the data array
+* that will be used for the the fit. If start+length must not exeed the total length
+* of the Data array. "start" must be chosen as close as possible to t0.
+* The baseline must also be subtracted.
+* The length of "tVector" and "aVector" mus be equal to length.
+* "index + length" must not exeed the length of the data array set in the constructor.
+* @param start the start index of the subarray of the data array. 
+* @param length the number of samples to use starting from index 
+**/
+void 
+AliHLTPHOSRawAnalyzerKLevel::Evaluate(int start, int length)
+{
+  //thats all 
+} //end FitKLevel
+
+
+
+
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerKLevel.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerKLevel.h
new file mode 100644 (file)
index 0000000..5281ef0
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef ALIHLTPHOSANALYZERKLEVEL_H
+#define ALIHLTPHOSANALYZERKLEVEL_H
+#include <Rtypes.h>
+#include "TObject.h"
+#include "AliHLTPHOSRawAnalyzer.h"
+
+/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                          */
+
+class AliHLTPHOSRawAnalyzerKLevel : public AliHLTPHOSRawAnalyzer
+{
+ public:
+  AliHLTPHOSRawAnalyzerKLevel();
+  AliHLTPHOSRawAnalyzerKLevel(const AliHLTPHOSRawAnalyzerKLevel & );
+  AliHLTPHOSRawAnalyzerKLevel & operator = (const AliHLTPHOSRawAnalyzerKLevel)
+    {
+      return *this; 
+    }
+  
+  virtual ~AliHLTPHOSRawAnalyzerKLevel();
+  virtual void Evaluate(int start = 0, int lenght = 100);
+ private:
+  double tKLevel;
+  ClassDef(AliHLTPHOSRawAnalyzerKLevel, 2) 
+  
+    };
+
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerLMS.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerLMS.cxx
new file mode 100644 (file)
index 0000000..4209fc3
--- /dev/null
@@ -0,0 +1,86 @@
+/**************************************************************************
+ * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
+ *                                                                        *
+ * Author: Per Thomas Hille for the ALICE HLT Project.                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+
+#include "AliHLTPHOSRawRawAnalyzerLMS.h"
+#include <iostream>
+
+using std::cout;
+using std::endl;
+
+ClassImp(AliHLTPHOSRawRawAnalyzerLMS) 
+
+
+AliHLTPHOSRawRawAnalyzerLMS::AliHLTPHOSRawRawAnalyzerLMS(const AliHLTPHOSRawRawAnalyzerLMS&):AliHLTPHOSRawRawAnalyzer(), kfMCovarPtrPtr(0), fPCovarPtrPtr(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.
+ **/
+AliHLTPHOSRawRawAnalyzerLMS::AliHLTPHOSRawRawAnalyzerLMS():AliHLTPHOSRawRawAnalyzer(), kfMCovarPtrPtr(0), fPCovarPtrPtr(0) 
+{
+  cout <<"You cannot invoke the Fitter without arguments"<<endl;;
+}
+
+
+/**
+* Main constructor
+* @param dataPtr Data array for wich a subarray will be taken to perform the fit
+* @param fs the sampling frequency in entities of MHz. Needed in order to calculate physical time
+**/
+AliHLTPHOSRawRawAnalyzerLMS::AliHLTPHOSRawRawAnalyzerLMS(double *dtaPtr, double fs):AliHLTPHOSRawRawAnalyzer(),kfMCovarPtrPtr(0), fPCovarPtrPtr(0) 
+{
+  fFloatDataPtr = dtaPtr;  
+  fSampleFrequency = fs;
+} //end   AliHLTPHOSRawRawAnalyzerLMS 
+
+
+AliHLTPHOSRawRawAnalyzerLMS::~AliHLTPHOSRawRawAnalyzerLMS()
+{
+
+} //end AliHLTPHOSRawRawAnalyzerLMS
+
+
+/**
+* Extraction of timing and energy using the Peakfinde Algorithm.
+* The. The parameters "start" and "length" defines a sub array  of the data array
+* that will be used for the the fit. If start+length must not exeed the total length
+* of the Data array. "start" must be chosen as close as possible to t0.
+* The baseline must also be subtracted.
+* The length of "tVector" and "aVector" mus be equal to length.
+* "index + length" must not exeed the length of the data array set in the constructor.
+* @param start the start index of the subarray of the data array. 
+* @param length the number of samples to use starting from index 
+**/
+void 
+AliHLTPHOSRawRawAnalyzerLMS::Evaluate(int start, int length)
+{
+  /*
+
+  */
+
+  //thats all 
+} //end FitLMS
+
+
+
+
+
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerLMS.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerLMS.h
new file mode 100644 (file)
index 0000000..11caa8c
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef ALIHLTPHOSANALYZERLMS_H
+#define ALIHLTPHOSANALYZERLMS_H
+#include <Rtypes.h>
+#include "TObject.h"
+#include "AliHLTPHOSRawAnalyzer.h"
+
+/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                          */
+
+
+class AliHLTPHOSRawAnalyzerLMS : public AliHLTPHOSRawAnalyzer
+{
+ public:
+  AliHLTPHOSRawAnalyzerLMS();
+  AliHLTPHOSRawAnalyzerLMS(double *dataPtr, double fs);
+  AliHLTPHOSRawAnalyzerLMS(const AliHLTPHOSRawAnalyzerLMS & );
+  AliHLTPHOSRawAnalyzerLMS & operator = (const AliHLTPHOSRawAnalyzerLMS)
+    {
+      return *this; 
+    }
+  
+  virtual ~AliHLTPHOSRawAnalyzerLMS();
+  virtual void Evaluate(int start = 0, int lenght = 100);
+ private:
+  double   **kfMCovarPtrPtr;   /**<Covariance matrix of the measurements*/
+  double   **fPCovarPtrPtr;    /**<Covariance matrix of the estimated parameters*/
+
+  ClassDef(AliHLTPHOSRawAnalyzerLMS, 2) 
+  
+    };
+
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.cxx
new file mode 100644 (file)
index 0000000..16726b5
--- /dev/null
@@ -0,0 +1,110 @@
+
+/**************************************************************************
+ * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
+ *                                                                        *
+ * Author: Per Thomas Hille for the ALICE HLT Project.                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#include "AliHLTPHOSRawAnalyzerPeakFinder.h"
+#include <iostream>
+
+using std::cout;
+using std::endl;
+
+ClassImp(AliHLTPHOSRawAnalyzerPeakFinder) 
+
+
+AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder(const AliHLTPHOSRawAnalyzerPeakFinder&):AliHLTPHOSRawAnalyzer(),tVector(0), aVector(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(),tVector(0), aVector(0) 
+{
+  cout <<"You cannot invoke the Fitter without arguments"<<endl;;
+}
+
+
+
+AliHLTPHOSRawAnalyzerPeakFinder::~AliHLTPHOSRawAnalyzerPeakFinder()
+{
+
+} //end AliHLTPHOSRawAnalyzerPeakFinder
+
+void 
+AliHLTPHOSRawAnalyzerPeakFinder::SetTVector(double *tVec)
+{
+  tVector = tVec;
+}
+
+void
+AliHLTPHOSRawAnalyzerPeakFinder::SetAVector(double *aVec)
+{
+  aVector = aVec;
+
+}
+
+/**
+* Extraction of timing and energy using the Peakfinde Algorithm.
+* The. The parameters "start" and "length" defines a sub array  of the data array
+* that will be used for the the fit. If start+length must not exeed the total length
+* of the Data array. "start" must be chosen as close as possible to t0.
+* The baseline must also be subtracted.
+* The length of "tVector" and "aVector" mus be equal to length.
+* "index + length" must not exeed the length of the data array set in the constructor.
+* @param start the start index of the subarray of the data array. 
+* @param length the number of samples to use starting from index 
+* @param tVector the peakfinder vector for timing
+* @param aVector the peakfinder vector for amplitude (energy)
+**/
+void 
+AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(int start, int length)
+{
+  fDTof = 0;
+  fDAmpl = 0;
+
+  if(tVector == 0 || aVector == 0)
+    {
+      printf("\nError: the peakfinder vectors are not specified, aborting !!!\n");
+    }
+  else
+    {
+
+      printf("\nstart = %d, length = %d\n", start, length);   
+      double tmpTime[1008];
+      
+      for(int i=0; i < length; i++)
+       {  
+         fDAmpl += aVector[i]*fFloatDataPtr[i];    
+       }
+  
+      for(int i=0; i < length; i++)
+       {   
+         tmpTime[i] = tVector[i]*fFloatDataPtr[i];
+         fDTof = fDTof + tmpTime[i]; 
+       }
+
+      fDTof = fDTof/fDAmpl;
+    }
+  //thats all 
+} //end FitPeakFinder
+
+
+
+
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.h
new file mode 100644 (file)
index 0000000..31be0c6
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef ALIHLTPHOSANALYZERPEAKFINDER_H
+#define ALIHLTPHOSANALYZERPEAKFINDER_H
+#include <Rtypes.h>
+#include "TObject.h"
+#include "AliHLTPHOSRawAnalyzer.h"
+
+/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                          */
+
+class AliHLTPHOSRawAnalyzerPeakFinder : public AliHLTPHOSRawAnalyzer
+{
+ public:
+  AliHLTPHOSRawAnalyzerPeakFinder();
+  AliHLTPHOSRawAnalyzerPeakFinder(const AliHLTPHOSRawAnalyzerPeakFinder & );
+  AliHLTPHOSRawAnalyzerPeakFinder & operator = (const AliHLTPHOSRawAnalyzerPeakFinder)
+    {
+      return *this; 
+    }
+  
+  virtual ~AliHLTPHOSRawAnalyzerPeakFinder();
+  void SetTVector(double *tVector);
+  void SetAVector(double *aVector);
+  virtual void Evaluate(int start = 0, int lenght = 100);
+ private:
+  double    *tVector;          /**<Peakfinder vector for TOF reconstruction*/
+  double    *aVector;          /**<Peakfinder vector for Energy reconstruction*/
+
+  ClassDef(AliHLTPHOSRawAnalyzerPeakFinder, 2) 
+  
+    };
+
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinderComponent.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinderComponent.cxx
new file mode 100644 (file)
index 0000000..eb1fdb5
--- /dev/null
@@ -0,0 +1,38 @@
+/**************************************************************************
+ * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
+ *                                                                        *
+ * Author: Per Thomas Hille for the ALICE HLT Project.                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#include "AliHLTPHOSRawAnalyzerPeakFinderComponent.h"
+
+
+//ClassImp(AliHLTPHOSRawAnalyzerPeakFinderComponent) 
+
+
+  AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent():AliHLTPHOSRawAnalyzerComponent()
+{
+
+} 
+
+AliHLTPHOSRawAnalyzerPeakFinderComponent::~AliHLTPHOSRawAnalyzerPeakFinderComponent()
+{
+
+}
+
+
+AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent(const AliHLTPHOSRawAnalyzerPeakFinderComponent & ) : AliHLTPHOSRawAnalyzerComponent()
+{
+
+}
+
+
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinderComponent.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinderComponent.h
new file mode 100644 (file)
index 0000000..714ed59
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef ALIHLTPHOSANALYZERPEAKFINDERCOMPONENT_H
+#define ALIHLTPHOSANALYZERPEAKFINDERCOMPONENT_H
+
+/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice  */ 
+
+#include "AliHLTPHOSRawAnalyzerComponent.h"
+
+class AliHLTPHOSRawAnalyzerPeakFinderComponent: public AliHLTPHOSRawAnalyzerComponent
+{
+  AliHLTPHOSRawAnalyzerPeakFinderComponent();
+  ~AliHLTPHOSRawAnalyzerPeakFinderComponent();
+  AliHLTPHOSRawAnalyzerPeakFinderComponent(const AliHLTPHOSRawAnalyzerPeakFinderComponent & );
+  AliHLTPHOSRawAnalyzerPeakFinderComponent & operator = (const AliHLTPHOSRawAnalyzerPeakFinderComponent)
+  {
+    return *this;
+  };
+
+  //ClassDef(AliHLTPHOSRawAnalyzerPeakFinderComponent, 2) 
+  };
+
+
+
+#endif