1 #include "AliHLTPHOSRawAnalyzer.h"
9 AliHLTPHOSRawAnalyzer:: AliHLTPHOSRawAnalyzer():fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
11 cout <<"AliHLTPHOSRawAnalyzer Base class::Creating a new AliHLTPHOSRawAnalyzer() object"<<endl;
14 AliHLTPHOSRawAnalyzer::~AliHLTPHOSRawAnalyzer()
19 AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(AliHLTPHOSRawAnalyzer const&):fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
26 * @param dataPtr Data array for wich a subarray will be taken to perform the fit
27 * @param fs the sampling frequency in entities of MHz. Needed in order to calculate physical time
29 AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(double *dtaPtr, double fs):fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
31 fFloatDataPtr = dtaPtr;
32 fSampleFrequency = fs;
37 * Attemps to level the basline to zero.
38 * The baseline will be calculated from the pretrigger samples and subtracted from the
40 * If pretrigger samples are not present then the basline correction will be incorrect.
41 * @param dataPtr array for wich to correct the basline
42 * @param N the number of pretrigger samples used to calculate the baseline.
45 AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, int N)
47 fFloatDataPtr = dataPtr;
49 cout << "Baseline correction not yet implemeted" << endl;
50 } //end BaselineCorrection
54 * Shifts the basline with the amount given by baselineValue
55 * If pretrigger samples are not present then the basline correction will be incorrect.
56 * @param dataPtr array for wich to correct the basline
57 * @param BaslineValue the basline value to subtract..
60 AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, double baselineValue)
62 fFloatDataPtr = dataPtr;
63 printf("\nbaselineValue = %f\n", baselineValue);
64 cout << "Baseline correction not yet implemeted" << endl;
65 } //end BaslineCorrection
69 * Gives the timing in entities of sample indexes
70 * Physical time is found by multiplying with the sampling intervall (Ts).
73 AliHLTPHOSRawAnalyzer::GetTiming()
80 * Gives the time in entities of ADC channels (quantization levels).
81 * Absolute enrgy is found by multiplying with offline calibration constants.
84 AliHLTPHOSRawAnalyzer::GetEnergy()
91 * Set data array. Overrides data data array set in the constructor.
94 AliHLTPHOSRawAnalyzer::SetData(double *data)
99 // cout << "Set data not yet implemented" << endl;
103 AliHLTPHOSRawAnalyzer::SetSampleFreq(double freq)
109 AliHLTPHOSRawAnalyzer::FindStartIndex(double treshold)
111 printf("\ntreshold = %f \n", treshold);
112 cout << "Find Start index not yet implemented" << endl;
114 } //end FindStartIndex
118 * This function applies only to the Chi and Least mean square fit. An initial guess is made
119 * based on the average of the first 5 samples and the first value exeeding this value.
122 AliHLTPHOSRawAnalyzer::MakeInitialGuess()
124 cout << "Make initial guess not yet implemeted" << endl;
129 * This function applies only to the Chi and Least mean square fit. An initial guess is made
130 * based on the average of the first 5 samples and the first value exeeding threshold + this value.
131 * @param treshold The index of the first value above treshold is ntaken to be the first value.
134 AliHLTPHOSRawAnalyzer::MakeInitialGuess(int treshold)
136 printf("\ntreshold = %d\n", treshold);
137 cout << "Make initial guess not yet implemeted" << endl;