1 #include "AliHLTPHOSRawAnalyzer.h"
9 AliHLTPHOSRawAnalyzer:: AliHLTPHOSRawAnalyzer():fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
15 AliHLTPHOSRawAnalyzer::~AliHLTPHOSRawAnalyzer()
20 AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(AliHLTPHOSRawAnalyzer const&):fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
27 * @param dataPtr Data array for wich a subarray will be taken to perform the fit
28 * @param fs the sampling frequency in entities of MHz. Needed in order to calculate physical time
30 AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(double *dtaPtr, double fs):fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
32 fFloatDataPtr = dtaPtr;
33 fSampleFrequency = fs;
38 * Attemps to level the basline to zero.
39 * The baseline will be calculated from the pretrigger samples and subtracted from the
41 * If pretrigger samples are not present then the basline correction will be incorrect.
42 * @param dataPtr array for wich to correct the basline
43 * @param N the number of pretrigger samples used to calculate the baseline.
46 AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, int N)
48 fFloatDataPtr = dataPtr;
50 cout << "Baseline correction not yet implemeted" << endl;
51 } //end BaselineCorrection
55 * Shifts the basline with the amount given by baselineValue
56 * If pretrigger samples are not present then the basline correction will be incorrect.
57 * @param dataPtr array for wich to correct the basline
58 * @param BaslineValue the basline value to subtract..
61 AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, double baselineValue)
63 fFloatDataPtr = dataPtr;
64 printf("\nbaselineValue = %f\n", baselineValue);
65 cout << "Baseline correction not yet implemeted" << endl;
66 } //end BaslineCorrection
70 * Gives the timing in entities of sample indexes
71 * Physical time is found by multiplying with the sampling intervall (Ts).
74 AliHLTPHOSRawAnalyzer::GetTiming()
81 * Gives the time in entities of ADC channels (quantization levels).
82 * Absolute enrgy is found by multiplying with offline calibration constants.
85 AliHLTPHOSRawAnalyzer::GetEnergy()
92 * Set data array. Overrides data data array set in the constructor.
95 AliHLTPHOSRawAnalyzer::SetData(double *data)
100 // cout << "Set data not yet implemented" << endl;
104 AliHLTPHOSRawAnalyzer::SetSampleFreq(double freq)
110 AliHLTPHOSRawAnalyzer::FindStartIndex(double treshold)
112 printf("\ntreshold = %f \n", treshold);
113 cout << "Find Start index not yet implemented" << endl;
115 } //end FindStartIndex
119 * This function applies only to the Chi and Least mean square fit. An initial guess is made
120 * based on the average of the first 5 samples and the first value exeeding this value.
123 AliHLTPHOSRawAnalyzer::MakeInitialGuess()
125 cout << "Make initial guess not yet implemeted" << endl;
130 * This function applies only to the Chi and Least mean square fit. An initial guess is made
131 * based on the average of the first 5 samples and the first value exeeding threshold + this value.
132 * @param treshold The index of the first value above treshold is ntaken to be the first value.
135 AliHLTPHOSRawAnalyzer::MakeInitialGuess(int treshold)
137 printf("\ntreshold = %d\n", treshold);
138 cout << "Make initial guess not yet implemeted" << endl;