]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSRawAnalyzer.cxx~
Inclusion of several new files. The Peakfinder class is now made a
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSRawAnalyzer.cxx~
1 #include "AliHLTPHOSRawAnalyzer.h"
2 #include <iostream>
3
4 using std::cout;
5 using std::endl;
6
7
8 AliHLTPHOSRawAnalyzer:: AliHLTPHOSRawAnalyzer():fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
9 {
10
11
12 }
13
14
15
16 /**
17 * Attemps to level the basline to zero.
18 * The baseline will be calculated from the pretrigger samples and subtracted from the 
19 * data array. 
20 * If pretrigger samples are not present then the basline correction will be incorrect. 
21 * @param dataPtr array for wich to correct the basline 
22 * @param N the number of pretrigger samples used to calculate the baseline.
23 **/
24 void 
25 AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, int N)
26 {
27   fFloatDataPtr = dataPtr;  
28   n=N;
29   cout << "Baseline correction not yet implemeted" << endl;
30 } //end BaselineCorrection
31
32 /**
33 * Shifts the basline with the amount given by baselineValue
34 * If pretrigger samples are not present then the basline correction will be incorrect. 
35 * @param dataPtr array for wich to correct the basline 
36 * @param BaslineValue the basline value to subtract..
37 **/
38 void 
39 AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, double baselineValue)
40 {
41   fFloatDataPtr = dataPtr;   
42   printf("\nbaselineValue = %f\n", baselineValue);
43   cout << "Baseline correction not yet implemeted" << endl;
44 } //end BaslineCorrection
45
46
47 /**
48  * Gives the timing in entities of sample indexes
49  * Physical time is found by multiplying  with the sampling intervall (Ts).
50  **/
51 float
52 AliHLTPHOSRawAnalyzer::GetTiming()
53 {
54   return fDTof;
55 } //end GetTiming
56
57
58 /**
59  * Gives the time in entities of ADC channels (quantization levels).  
60  * Absolute enrgy is found by multiplying with offline calibration constants.
61  **/
62 float
63 AliHLTPHOSRawAnalyzer::GetEnergy()
64 {
65   return fDAmpl;
66 } //end GetEnergy
67
68
69 /**
70  * Set data array. Overrides data data array set in the constructor.
71  **/
72 void 
73 AliHLTPHOSRawAnalyzer::SetData(double *data)
74 {
75   double *dta;
76   dta = data;
77   cout << "Set data not yet implemented" << endl;
78 }