]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/html/AliHLTPHOSRawAnalyzerPeakFinder_8cxx-source.html
New documenation:wq
[u/mrichter/AliRoot.git] / HLT / PHOS / html / AliHLTPHOSRawAnalyzerPeakFinder_8cxx-source.html
CommitLineData
8562a9e6 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">
5</head><body>
6<!-- Generated by Doxygen 1.3.9.1 -->
7<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
eace7fcd 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 <span class="comment">/**************************************************************************</span>
900002 <span class="comment"> * This file is property of and copyright by the Experimental Nuclear *</span>
1000003 <span class="comment"> * Physics Group, Dep. of Physics *</span>
1100004 <span class="comment"> * University of Oslo, Norway, 2007 *</span>
1200005 <span class="comment"> * * </span>
1300006 <span class="comment"> * Author: Per Thomas Hille &lt;perthi@fys.uio.no&gt; for the ALICE HLT Project.*</span>
1400007 <span class="comment"> * Contributors are mentioned in the code where appropriate. *</span>
1500008 <span class="comment"> * Please report bugs to perthi@fys.uio.no * </span>
1600009 <span class="comment"> * *</span>
1700010 <span class="comment"> * Permission to use, copy, modify and distribute this software and its *</span>
1800011 <span class="comment"> * documentation strictly for non-commercial purposes is hereby granted *</span>
1900012 <span class="comment"> * without fee, provided that the above copyright notice appears in all *</span>
2000013 <span class="comment"> * copies and that both the copyright notice and this permission notice *</span>
2100014 <span class="comment"> * appear in the supporting documentation. The authors make no claims *</span>
2200015 <span class="comment"> * about the suitability of this software for any purpose. It is *</span>
2300016 <span class="comment"> * provided "as is" without express or implied warranty. *</span>
2400017 <span class="comment"> **************************************************************************/</span>
2500018
2600019 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSRawAnalyzerPeakFinder_8h.html">AliHLTPHOSRawAnalyzerPeakFinder.h</a>"</span>
2700020 <span class="preprocessor">#include &lt;iostream&gt;</span>
2800021 <span class="preprocessor">#include &lt;cmath&gt;</span>
8562a9e6 2900022
eace7fcd 3000023 <span class="keyword">using</span> std::cout;
3100024 <span class="keyword">using</span> std::endl;
8562a9e6 3200025
eace7fcd 33<a name="l00026"></a><a class="code" href="AliHLTPHOSRawAnalyzerPeakFinder_8cxx.html#a0">00026</a> <a class="code" href="AliHLTPHOSRawAnalyzerPeakFinder_8cxx.html#a0">ClassImp</a>(<a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html">AliHLTPHOSRawAnalyzerPeakFinder</a>)
3400027
8562a9e6 3500028
eace7fcd 3600029 <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>&amp;):<a class="code" href="classAliHLTPHOSRawAnalyzer.html">AliHLTPHOSRawAnalyzer</a>() , fTVectorPtr(0), fAVectorPtr(0), fTVectorSize(0), fAVectorSize(0)
3700030 {
8562a9e6 3800031
eace7fcd 3900032
4000033 }
4100034
4200035
43<a name="l00042"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera0">00042</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera0">AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder</a>():<a class="code" href="classAliHLTPHOSRawAnalyzer.html">AliHLTPHOSRawAnalyzer</a>(), fTVectorPtr(0), fAVectorPtr(0), fTVectorSize(0), fAVectorSize(0)
4400043 {
4500044 <span class="comment">// cout &lt;&lt;"PeakFinder:You cannot invoke the Fitter without arguments"&lt;&lt;endl;;</span>
4600045 }
4700046
8562a9e6 4800047
eace7fcd 4900048
50<a name="l00049"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera3">00049</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera3">AliHLTPHOSRawAnalyzerPeakFinder::~AliHLTPHOSRawAnalyzerPeakFinder</a>()
5100050 {
5200051
5300052 } <span class="comment">//end AliHLTPHOSRawAnalyzerPeakFinder</span>
5400053
5500054 <span class="keywordtype">void</span>
56<a name="l00055"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera4">00055</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera4">AliHLTPHOSRawAnalyzerPeakFinder::SetTVector</a>(Double_t *tVec, Int_t size)
5700056 {
5800057 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr2">fTVectorSize</a> = size;
5900058
6000059 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">fTVectorPtr</a> != 0)
6100060 {
6200061 <span class="keyword">delete</span> fTVectorPtr;
6300062 }
6400063
6500064 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">fTVectorPtr</a> = <span class="keyword">new</span> Double_t[size];
6600065
6700066 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i&lt; size; i++)
6800067 {
6900068 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">fTVectorPtr</a>[i] = tVec[i];
7000069 }
7100070 }
7200071
7300072
7400073 <span class="keywordtype">void</span>
75<a name="l00074"></a><a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera5">00074</a> <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera5">AliHLTPHOSRawAnalyzerPeakFinder::SetAVector</a>(Double_t *aVec, Int_t size)
7600075 {
7700076
7800077 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr3">fAVectorSize</a> = size;
7900078
8000079 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">fAVectorPtr</a> != 0)
8100080 {
8200081 <span class="keyword">delete</span> fAVectorPtr;
8300082 }
8400083
8500084 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">fAVectorPtr</a> = <span class="keyword">new</span> Double_t[size];
8600085
8700086 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i&lt; size; i++)
8562a9e6 8800087 {
eace7fcd 8900088 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">fAVectorPtr</a>[i] = aVec[i];
9000089 }
9100090 }
9200091
9300105 <span class="keywordtype">void</span>
9400106 <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFindera6">AliHLTPHOSRawAnalyzerPeakFinder::Evaluate</a>(<span class="keywordtype">int</span> start, <span class="keywordtype">int</span> length)
9500107 {
9600108 <span class="comment">// printf("\n AliHLTPHOSRawAnalyzerPeakFinder::Evaluat from index %d to %d\n", start, start + length);</span>
9700109 fDTof = 0;
9800110 fDAmpl = 0;
9900111 Int_t tmpLength;
10000112
10100113
10200114 <span class="keywordflow">if</span>(fTVectorPtr == 0 || fAVectorPtr == 0)
10300115 {
10400116 <span class="comment">// printf("\nError: the peakfinder vectors are not specified, aborting !!!\n");</span>
10500117 }
10600118 <span class="keywordflow">else</span>
10700119 {
10800120
10900121 <span class="keywordflow">if</span>(length &lt; fTVectorSize)
11000122 {
11100123 tmpLength = length;
11200124 }
11300125 <span class="keywordflow">else</span>
11400126 {
11500127 tmpLength = fTVectorSize;
11600128 }
11700129
11800130 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i &lt; tmpLength; i++)
11900131 {
12000132 <a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFinderp6">fDAmpl</a> += <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr1">fAVectorPtr</a>[i]*<a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFinderp0">fFloatDataPtr</a>[i];
12100133 }
12200134
12300135 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i &lt; tmpLength; i++)
12400136 {
12500137 <a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFinderp5">fDTof</a> += <a class="code" href="classAliHLTPHOSRawAnalyzerPeakFinder.html#AliHLTPHOSRawAnalyzerPeakFinderr0">fTVectorPtr</a>[i]*<a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFinderp0">fFloatDataPtr</a>[i];
12600138 }
12700139
12800140 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFinderp6">fDAmpl</a> &gt; 900)
12900141 {
13000142 Double_t tmpMax = <a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFindera18">GetMaxValue</a>(fFloatDataPtr, tmpLength);
13100143 <span class="keywordflow">if</span>(tmpMax == 1023)
13200144 {
13300145 <a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFinderp6">fDAmpl</a> = tmpMax;
13400146 }
13500147 }
13600148
13700149 <a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFinderp5">fDTof</a> = <a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFinderp5">fDTof</a>/fDAmpl;
13800150
13900151 }
14000152 } <span class="comment">//end Evaluate</span>
14100153
14200154
14300155
14400156
145</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Feb 18 22:17:03 2007 for AliHLTPHOS by&nbsp;
8562a9e6 146<a href="http://www.doxygen.org/index.html">
147<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
148</body>
149</html>