1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>AliHLTPHOS: AliHLTPHOSRawAnalyzerPeakFinder.cxx Source File</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
6 <!-- Generated by Doxygen 1.3.9.1 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
8 <h1>AliHLTPHOSRawAnalyzerPeakFinder.cxx</h1><a href="AliHLTPHOSRawAnalyzerPeakFinder_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001
9 00002 <span class="comment">/**************************************************************************</span>
10 00003 <span class="comment"> * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *</span>
11 00004 <span class="comment"> * *</span>
12 00005 <span class="comment"> * Author: Per Thomas Hille for the ALICE HLT Project. *</span>
13 00006 <span class="comment"> * Contributors are mentioned in the code where appropriate. *</span>
14 00007 <span class="comment"> * *</span>
15 00008 <span class="comment"> * Permission to use, copy, modify and distribute this software and its *</span>
16 00009 <span class="comment"> * documentation strictly for non-commercial purposes is hereby granted *</span>
17 00010 <span class="comment"> * without fee, provided that the above copyright notice appears in all *</span>
18 00011 <span class="comment"> * copies and that both the copyright notice and this permission notice *</span>
19 00012 <span class="comment"> * appear in the supporting documentation. The authors make no claims *</span>
20 00013 <span class="comment"> * about the suitability of this software for any purpose. It is *</span>
21 00014 <span class="comment"> * provided "as is" without express or implied warranty. *</span>
22 00015 <span class="comment"> **************************************************************************/</span>
24 00017 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSRawAnalyzerPeakFinder_8h.html">AliHLTPHOSRawAnalyzerPeakFinder.h</a>"</span>
25 00018 <span class="preprocessor">#include <iostream></span>
27 00020 <span class="keyword">using</span> std::cout;
28 00021 <span class="keyword">using</span> std::endl;
30 <a name="l00023"></a><a class="code" href="AliHLTPHOSRawAnalyzerPeakFinder_8cxx.html#a0">00023</a> <a class="code" href="AliHLTPHOSRawAnalyzerPeakFinder_8cxx.html#a0">ClassImp</a>(<a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html">AliHLTPHOSRawAnalyzerPeakFinder</a>)
33 00026 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html">AliHLTPHOSRawAnalyzerPeakFinder</a>::<a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html">AliHLTPHOSRawAnalyzerPeakFinder</a>(const <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html">AliHLTPHOSRawAnalyzerPeakFinder</a>&):<a class="code" href="classAliHLTPHOSRawAnalyzer.html">AliHLTPHOSRawAnalyzer</a>(),tVector(0), aVector(0)
39 <a name="l00038"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera0">00038</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera0">AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder</a>():<a class="code" href="classAliHLTPHOSRawAnalyzer.html">AliHLTPHOSRawAnalyzer</a>(),tVector(0), aVector(0)
41 00040 cout <<<span class="stringliteral">"PeakFinder:You cannot invoke the Fitter without arguments"</span><<endl;;
46 <a name="l00045"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera3">00045</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera3">AliHLTPHOSRawAnalyzerPeakFinder::~AliHLTPHOSRawAnalyzerPeakFinder</a>()
49 00048 } <span class="comment">//end AliHLTPHOSRawAnalyzerPeakFinder</span>
51 00050 <span class="keywordtype">void</span>
52 <a name="l00051"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera4">00051</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera4">AliHLTPHOSRawAnalyzerPeakFinder::SetTVector</a>(<span class="keywordtype">double</span> *tVec)
54 00053 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">tVector</a> = tVec;
57 00056 <span class="keywordtype">void</span>
58 <a name="l00057"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera5">00057</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera5">AliHLTPHOSRawAnalyzerPeakFinder::SetAVector</a>(<span class="keywordtype">double</span> *aVec)
60 00059 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">aVector</a> = aVec;
64 00076 <span class="keywordtype">void</span>
65 <a name="l00077"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera6">00077</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera6">AliHLTPHOSRawAnalyzerPeakFinder::Evaluate</a>(<span class="keywordtype">int</span> start, <span class="keywordtype">int</span> length)
70 00082 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">tVector</a> == 0 || <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">aVector</a> == 0)
72 00084 printf(<span class="stringliteral">"\nError: the peakfinder vectors are not specified, aborting !!!\n"</span>);
74 00086 <span class="keywordflow">else</span>
77 00089 printf(<span class="stringliteral">"\nstart = %d, length = %d\n"</span>, start, length);
78 00090 <span class="keywordtype">double</span> tmpTime[1008];
80 00092 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i < length; i++)
82 00094 fDAmpl += <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">aVector</a>[i]*fFloatDataPtr[i];
85 00097 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i < length; i++)
87 00099 tmpTime[i] = <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">tVector</a>[i]*fFloatDataPtr[i];
88 00100 fDTof = fDTof + tmpTime[i];
91 00103 fDTof = fDTof/fDAmpl;
93 00105 <span class="comment">//thats all </span>
94 00106 } <span class="comment">//end FitPeakFinder</span>
99 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Jan 17 21:56:43 2007 for AliHLTPHOS by
100 <a href="http://www.doxygen.org/index.html">
101 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>