]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/latex/classhlt_1_1phos_1_1PhosFitter.tex
This commit was generated by cvs2svn to compensate for changes in r13866,
[u/mrichter/AliRoot.git] / HLT / PHOS / latex / classhlt_1_1phos_1_1PhosFitter.tex
1 \section{hlt::phos::Phos\-Fitter Class Reference}
2 \label{classhlt_1_1phos_1_1PhosFitter}\index{hlt::phos::PhosFitter@{hlt::phos::PhosFitter}}
3 {\tt \#include $<$Phos\-Fitter.h$>$}
4
5 \subsection*{Public Member Functions}
6 \begin{CompactItemize}
7 \item 
8 {\bf Phos\-Fitter} ()
9 \item 
10 {\bf Phos\-Fitter} (int $\ast$data)
11 \item 
12 {\bf Phos\-Fitter} (float $\ast$data)
13 \item 
14 void {\bf Fit\-KLevel} (float k\-Level, int start, int lenght)
15 \item 
16 void {\bf Fit\-Peak\-Finder} (int start, int lenght)
17 \item 
18 void {\bf Fit\-Peak\-Finder} (int start, int lenght, float $\ast$t\-Vector, float $\ast$a\-Vector)
19 \item 
20 void {\bf Fit\-Chi\-Square} (int start, int lenght)
21 \item 
22 void {\bf Fit\-Chi\-Square} (int start, int lenght, float t\-Guess, float a\-Guess)
23 \item 
24 void {\bf Fit\-Least\-Mean\-Square} (int start, int lenght, const float $\ast$$\ast$m\-Covar, float $\ast$$\ast$p\-Covar)
25 \item 
26 void {\bf Fit\-Least\-Mean\-Square} (int start, int lenght, const float $\ast$$\ast$m\-Covar, float $\ast$$\ast$p\-Covar, float t\-Guess, float a\-Guess)
27 \item 
28 int {\bf Find\-Start\-Index} (float treshold)
29 \item 
30 void {\bf Get\-Timing} ()
31 \item 
32 void {\bf Get\-Eneergy} ()
33 \item 
34 void {\bf Set\-Data} (int $\ast$data)
35 \item 
36 void {\bf Set\-Data} (float $\ast$data)
37 \end{CompactItemize}
38 \subsection*{Private Member Functions}
39 \begin{CompactItemize}
40 \item 
41 void {\bf Make\-Initial\-Guess} ()
42 \item 
43 void {\bf Make\-Initial\-Guess} (int treshold)
44 \end{CompactItemize}
45 \subsection*{Private Attributes}
46 \begin{CompactItemize}
47 \item 
48 int $\ast$ {\bf d\-Data}
49 \item 
50 float $\ast$ {\bf f\-Data}
51 \item 
52 float {\bf d\-Tof}
53 \item 
54 float {\bf d\-Ampl}
55 \item 
56 float {\bf d\-Tof\-Guess}
57 \item 
58 float {\bf d\-Ampl\-Guess}
59 \end{CompactItemize}
60
61
62 \subsection{Detailed Description}
63 The {\bf Phos\-Fitter}{\rm (p.\,\pageref{classhlt_1_1phos_1_1PhosFitter})} class is the class for extracting the basic signal parameters \char`\"{}timing\char`\"{} and \char`\"{}energy\char`\"{} from the PHOS raw data. Physical data will for a given readout channel be a sequense of ADC digitized 10 bit values. For debugging, it is also usefull to have the possibulity to use arrays of floating poin values. 
64
65
66
67 \subsection{Constructor \& Destructor Documentation}
68 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!PhosFitter@{PhosFitter}}
69 \index{PhosFitter@{PhosFitter}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
70 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}hlt::phos::Phos\-Fitter::Phos\-Fitter ()}\label{classhlt_1_1phos_1_1PhosFitter_a0}
71
72
73 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!PhosFitter@{PhosFitter}}
74 \index{PhosFitter@{PhosFitter}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
75 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}hlt::phos::Phos\-Fitter::Phos\-Fitter (int $\ast$ {\em data})}\label{classhlt_1_1phos_1_1PhosFitter_a1}
76
77
78 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!PhosFitter@{PhosFitter}}
79 \index{PhosFitter@{PhosFitter}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
80 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}hlt::phos::Phos\-Fitter::Phos\-Fitter (float $\ast$ {\em data})}\label{classhlt_1_1phos_1_1PhosFitter_a2}
81
82
83
84
85 \subsection{Member Function Documentation}
86 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!FindStartIndex@{FindStartIndex}}
87 \index{FindStartIndex@{FindStartIndex}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
88 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int hlt::phos::Phos\-Fitter::Find\-Start\-Index (float {\em treshold})}\label{classhlt_1_1phos_1_1PhosFitter_a10}
89
90
91 This method finds the start index of the pulse (relative to the data array) by serching for three or more continious samples above trheshold. \begin{Desc}
92 \item[Parameters:]
93 \begin{description}
94 \item[{\em treshold}]treshold to use when searchin for the start of the pulse \end{description}
95 \end{Desc}
96 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!FitChiSquare@{FitChiSquare}}
97 \index{FitChiSquare@{FitChiSquare}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
98 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Fit\-Chi\-Square (int {\em start}, int {\em lenght}, float {\em t\-Guess}, float {\em a\-Guess})}\label{classhlt_1_1phos_1_1PhosFitter_a7}
99
100
101 Extraction of timing and energy using a least square fit assuming uncorrelated measurement errors. This is also called a \char`\"{}Chi square fit\char`\"{}. The default method is the Levenberg Marquardt nonlinear fit. If the errors are correlated (which is typically the case) the timing and energy will not be mimimum variance lower bound. Correlated errors might also give a systematic error. The parameters \char`\"{}start\char`\"{} and \char`\"{}length\char`\"{} defines the subarray of the data array set in the constructor that will be used in the fit. \char`\"{}start + length\char`\"{} cannot exeed the length of the data array. The baseline must be subtracted before performing the fit othervise the result wil biased. A good initial guess greatly enchanes performance. A poor initial guess might give a solution that is a local minima instead of a global minima. If the startindex of the pulse is the first sample above a low (2-3 ADC levels) above the baseline, then the initial guess of t0 an be set to zero. A good initial guess for amplitude will for a gamma 2 function be for instance (Max sample valu - baseline)$\ast$exp(2). If a Gamma N function is used multiply with exp(N). \begin{Desc}
102 \item[Parameters:]
103 \begin{description}
104 \item[{\em start}]the start index of the subarray of the data array. \item[{\em length}]the number of samples to use starting from index \item[{\em t\-Guess}]initial guess for timing (in entities of samples) \item[{\em a\-Guess}]initial guess for energy in entities of (ADC channels)$\ast$exp(2) (for a gamma 2 fuction) \end{description}
105 \end{Desc}
106 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!FitChiSquare@{FitChiSquare}}
107 \index{FitChiSquare@{FitChiSquare}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
108 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Fit\-Chi\-Square (int {\em start}, int {\em lenght})}\label{classhlt_1_1phos_1_1PhosFitter_a6}
109
110
111 Extraction of timing and energy using a least square fit assuming uncorrelated measurement errors. This is also called a \char`\"{}Chi square fit\char`\"{}. The default method is the Levenberg Marquardt nonlinear fit. If the errors are correlated (which is typically the case) the timing and energy will not be mimimum variance lower bound. Correlated errors might also give a systematic error. The parameters \char`\"{}start\char`\"{} and \char`\"{}length\char`\"{} defines the subarray of the data array set in the constructor that will be used in the fit. \char`\"{}start + length\char`\"{} cannot exeed the length of the data array. The baseline must be subtracted before performing the fit. the initial guess parameters is found by the method \char`\"{}Make\-Initial\-Guess\char`\"{}. \begin{Desc}
112 \item[Parameters:]
113 \begin{description}
114 \item[{\em start}]the start index of the subarray of the data array. \item[{\em length}]the number of samples to use starting from index \item[{\em start}]the start index of the subarray of the data array. \item[{\em length}]the number of samples to use starting from index \end{description}
115 \end{Desc}
116 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!FitKLevel@{FitKLevel}}
117 \index{FitKLevel@{FitKLevel}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
118 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Fit\-KLevel (float {\em k\-Level}, int {\em start}, int {\em lenght})}\label{classhlt_1_1phos_1_1PhosFitter_a3}
119
120
121 Extraction of timing an energy using the K-level method. \begin{Desc}
122 \item[Parameters:]
123 \begin{description}
124 \item[{\em k\-Level}]the K-level \char`\"{}start\char`\"{} and \char`\"{}length\char`\"{} defines the subarray of the data array (set in the constructor) \item[{\em start}]index of samples to use relative to the the data array \item[{\em length}]the number of samples to use (starting at \char`\"{}start\char`\"{}) \end{description}
125 \end{Desc}
126 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!FitLeastMeanSquare@{FitLeastMeanSquare}}
127 \index{FitLeastMeanSquare@{FitLeastMeanSquare}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
128 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Fit\-Least\-Mean\-Square (int {\em start}, int {\em lenght}, const float $\ast$$\ast$ {\em m\-Covar}, float $\ast$$\ast$ {\em p\-Covar}, float {\em t\-Guess}, float {\em a\-Guess})}\label{classhlt_1_1phos_1_1PhosFitter_a9}
129
130
131 The same as the previous exep that initial guess for timing and energy is supplied by the user. This will greatly enchance performance. \begin{Desc}
132 \item[Parameters:]
133 \begin{description}
134 \item[{\em start}]the start index of the subarray of the data array. \item[{\em length}]the number of samples to use starting from index \item[{\em m\-Covar}]the measurement correlation matrix \item[{\em p\-Covar}]the correlation matrix of the estimated parameters \end{description}
135 \end{Desc}
136 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!FitLeastMeanSquare@{FitLeastMeanSquare}}
137 \index{FitLeastMeanSquare@{FitLeastMeanSquare}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
138 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Fit\-Least\-Mean\-Square (int {\em start}, int {\em lenght}, const float $\ast$$\ast$ {\em m\-Covar}, float $\ast$$\ast$ {\em p\-Covar})}\label{classhlt_1_1phos_1_1PhosFitter_a8}
139
140
141 Extraction of timing and energy using a least square fit assuming correlated errors. The user must supply the autocovariance matrix. For N number of samples this matrix will be a Nx\-N matrix. The default method is the Levenberg Marquardt nonlinear fit. If the errors are correlated (which is typically the case) the timing and energy will not be mimimum variance lower bound. Correlated errors might also give a systematic error. The parameters \char`\"{}start\char`\"{} and \char`\"{}length\char`\"{} defines the subarray of the data array set in the constructor that will be used in the fit. \char`\"{}start + length\char`\"{} cannot exeed the length of the data array. The baseline must be subtracted before performing the fit othervise the result wil biased. A good initial guess greatly enchanes performance. A poor initial guess might give a solution that is a local minima instead of a global minima. If the startindex of the pulse is the first sample above a low (2-3 ADC levels) above the baseline, then the initial guess of t0 an be set to zero. A good initial guess for amplitude will for a gamma 2 function be for instance (Max sample valu - baseline)$\ast$exp(2). If a Gamma N function is used multiply with exp(N). The correlation matrix for the parameters is written to the matrix pointe to by p\-Covar \begin{Desc}
142 \item[Parameters:]
143 \begin{description}
144 \item[{\em start}]the start index of the subarray of the data array. \item[{\em length}]the number of samples to use starting from index \item[{\em m\-Covar}]the measurement correlation matrix \item[{\em p\-Covar}]the correlation matrix of the estimated parameters \end{description}
145 \end{Desc}
146 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!FitPeakFinder@{FitPeakFinder}}
147 \index{FitPeakFinder@{FitPeakFinder}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
148 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Fit\-Peak\-Finder (int {\em start}, int {\em lenght}, float $\ast$ {\em t\-Vector}, float $\ast$ {\em a\-Vector})}\label{classhlt_1_1phos_1_1PhosFitter_a5}
149
150
151 Extraction of timing and energy using the Peakfinde Algorithm. The. The parameters \char`\"{}start\char`\"{} and \char`\"{}length\char`\"{} 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. \char`\"{}start\char`\"{} must be chosen as close as possible to t0. The baseline must also be subtracted. The length of \char`\"{}t\-Vector\char`\"{} and \char`\"{}a\-Vector\char`\"{} mus be equal to length. \char`\"{}index + length\char`\"{} must not exeed the length of the data array set in the constructor. \begin{Desc}
152 \item[Parameters:]
153 \begin{description}
154 \item[{\em start}]the start index of the subarray of the data array. \item[{\em length}]the number of samples to use starting from index \item[{\em t\-Vector}]the peakfinder vector for timing \item[{\em a\-Vector}]the peakfinder vector for amplitude (energy) \end{description}
155 \end{Desc}
156 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!FitPeakFinder@{FitPeakFinder}}
157 \index{FitPeakFinder@{FitPeakFinder}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
158 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Fit\-Peak\-Finder (int {\em start}, int {\em lenght})}\label{classhlt_1_1phos_1_1PhosFitter_a4}
159
160
161 Extraction of timing and energy using the Peakfinde Algorithm. The. The parameters \char`\"{}start\char`\"{} and \char`\"{}length\char`\"{} 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. \char`\"{}start\char`\"{} must be chosen as close as possible to t0. The peakfinder reguire timing and energy vector that is unique for a given number of samples and will have exactly \char`\"{}length\char`\"{} number of samples. The timing and energy vectors will be searched for in a file, and if matching vectors are not found, an error is issued. \begin{Desc}
162 \item[Parameters:]
163 \begin{description}
164 \item[{\em start}]the start index of the subarray of the data array. \item[{\em length}]the number of samples to use starting from index \end{description}
165 \end{Desc}
166 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!GetEneergy@{GetEneergy}}
167 \index{GetEneergy@{GetEneergy}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
168 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Get\-Eneergy ()}\label{classhlt_1_1phos_1_1PhosFitter_a12}
169
170
171 Gives the time in entities of ADC channels (quantization levels). Absolute enrgy is found by multiplying with offline calibration constants. \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!GetTiming@{GetTiming}}
172 \index{GetTiming@{GetTiming}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
173 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Get\-Timing ()}\label{classhlt_1_1phos_1_1PhosFitter_a11}
174
175
176 Gives the timing in entities of sample indexes Physical time is found by multiplying with the sampling intervall (Ts). \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!MakeInitialGuess@{MakeInitialGuess}}
177 \index{MakeInitialGuess@{MakeInitialGuess}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
178 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Make\-Initial\-Guess (int {\em treshold})\hspace{0.3cm}{\tt  [private]}}\label{classhlt_1_1phos_1_1PhosFitter_d1}
179
180
181 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. \begin{Desc}
182 \item[Parameters:]
183 \begin{description}
184 \item[{\em treshold}]The index of the first value above treshold is ntaken to be the first value. \end{description}
185 \end{Desc}
186 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!MakeInitialGuess@{MakeInitialGuess}}
187 \index{MakeInitialGuess@{MakeInitialGuess}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
188 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Make\-Initial\-Guess ()\hspace{0.3cm}{\tt  [private]}}\label{classhlt_1_1phos_1_1PhosFitter_d0}
189
190
191 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. \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!SetData@{SetData}}
192 \index{SetData@{SetData}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
193 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Set\-Data (float $\ast$ {\em data})}\label{classhlt_1_1phos_1_1PhosFitter_a14}
194
195
196 Set data array. Overrides data data array set in the constructor. \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!SetData@{SetData}}
197 \index{SetData@{SetData}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
198 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void hlt::phos::Phos\-Fitter::Set\-Data (int $\ast$ {\em data})}\label{classhlt_1_1phos_1_1PhosFitter_a13}
199
200
201 Set data array. Overrrides the data array set in the constructor. 
202
203 \subsection{Member Data Documentation}
204 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!dAmpl@{dAmpl}}
205 \index{dAmpl@{dAmpl}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
206 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}float {\bf hlt::phos::Phos\-Fitter::d\-Ampl}\hspace{0.3cm}{\tt  [private]}}\label{classhlt_1_1phos_1_1PhosFitter_r3}
207
208
209 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!dAmplGuess@{dAmplGuess}}
210 \index{dAmplGuess@{dAmplGuess}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
211 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}float {\bf hlt::phos::Phos\-Fitter::d\-Ampl\-Guess}\hspace{0.3cm}{\tt  [private]}}\label{classhlt_1_1phos_1_1PhosFitter_r5}
212
213
214 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!dData@{dData}}
215 \index{dData@{dData}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
216 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int$\ast$ {\bf hlt::phos::Phos\-Fitter::d\-Data}\hspace{0.3cm}{\tt  [private]}}\label{classhlt_1_1phos_1_1PhosFitter_r0}
217
218
219 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!dTof@{dTof}}
220 \index{dTof@{dTof}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
221 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}float {\bf hlt::phos::Phos\-Fitter::d\-Tof}\hspace{0.3cm}{\tt  [private]}}\label{classhlt_1_1phos_1_1PhosFitter_r2}
222
223
224 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!dTofGuess@{dTofGuess}}
225 \index{dTofGuess@{dTofGuess}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
226 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}float {\bf hlt::phos::Phos\-Fitter::d\-Tof\-Guess}\hspace{0.3cm}{\tt  [private]}}\label{classhlt_1_1phos_1_1PhosFitter_r4}
227
228
229 \index{hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}!fData@{fData}}
230 \index{fData@{fData}!hlt::phos::PhosFitter@{hlt::phos::Phos\-Fitter}}
231 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}float$\ast$ {\bf hlt::phos::Phos\-Fitter::f\-Data}\hspace{0.3cm}{\tt  [private]}}\label{classhlt_1_1phos_1_1PhosFitter_r1}
232
233
234
235
236 The documentation for this class was generated from the following files:\begin{CompactItemize}
237 \item 
238 {\bf Phos\-Fitter.h}\item 
239 {\bf Phos\-Fitter.cxx}\end{CompactItemize}