slsDetectorPackage/slsDetectorSoftware/slsDetectorAnalysis/docs/html/classenergyCalibrationFunctions.html
bergamaschi ee36cdf9e4 functions splitted in many sub-files
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@167 951219d9-93cf-4727-9268-0efd64621fa3
2012-04-02 15:16:32 +00:00

429 lines
20 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>energyCalibrationFunctions Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul></div>
<h1>energyCalibrationFunctions Class Reference</h1><!-- doxytag: class="energyCalibrationFunctions" -->Energy calibration functions.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="energyCalibration_8h-source.html">energyCalibration.h</a>&gt;</code>
<p>
<a href="classenergyCalibrationFunctions-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#8c17162b89f3b2e642004e7c88a22ac2">energyCalibrationFunctions</a> (int s=-1)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#716759a1ae09ea3c841f824af3ece415">setScanSign</a> (int s=0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Double_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#e9582e5c46d27ad25d6139d0386698f7">gaussChargeSharing</a> (Double_t *x, Double_t *par)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Double_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#2da1e3b9a10d23233256f8c2234f2457">erfFunction</a> (Double_t *x, Double_t *par)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Double_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#8d1b3d0f8b30423dad56d8ce5323a4a8">erfFunctionChargeSharing</a> (Double_t *x, Double_t *par)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Double_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#a5fbe9da48bc2ef90b699e06ea8c5111">erfFuncFluo</a> (Double_t *x, Double_t *par)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Double_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#015eb05dc34b77642ab2a2a9f126f170">spectrum</a> (Double_t *x, Double_t *par)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Double_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#e220482622e88a46b12498b0e4d8113a">scurve</a> (Double_t *x, Double_t *par)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Double_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#4eba39623b518d67a63192970a78f530">scurveFluo</a> (Double_t *x, Double_t *par)</td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#37f557bacb75213073c8d421cc1240f4">median</a> (float *x, int n)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#a3ab0e7c3c862fb51dfda78f1b09a55c">quick_select</a> (int arr[], int n)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#7d9a7b8d0c8ff69638a5fbb9f4c04b90">kth_smallest</a> (int *a, int n, int k)</td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classenergyCalibrationFunctions.html#4fc7c435169b5bf4672cf654270097d0">sign</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Energy calibration functions.
<p>
class containing all the possible energy calibration functions (scurves with and without charge sharing, gaussian spectrum with and without charge sharing, possibility of chosing the sign of the X-axis)
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="8c17162b89f3b2e642004e7c88a22ac2"></a><!-- doxytag: member="energyCalibrationFunctions::energyCalibrationFunctions" ref="8c17162b89f3b2e642004e7c88a22ac2" args="(int s=-1)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">energyCalibrationFunctions::energyCalibrationFunctions </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>s</em> = <code>-1</code> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a5fbe9da48bc2ef90b699e06ea8c5111"></a><!-- doxytag: member="energyCalibrationFunctions::erfFuncFluo" ref="a5fbe9da48bc2ef90b699e06ea8c5111" args="(Double_t *x, Double_t *par)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t energyCalibrationFunctions::erfFuncFluo </td>
<td>(</td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>par</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Double Erf function with charge sharing slope par[0] is the pedestal par[1] is the slope of the pedestal par[2] is the inflection point of the first energy par[3] is the RMS of the first energy par[4] is the amplitude of the first energy par[5] is the angual coefficient of the charge sharing slope of the first energy (scales with par[3]) par[6] is the inflection point of the second energy par[7] is the RMS of the second energy par[8] is the amplitude of the second energy par[9] is the angual coefficient of the charge sharing slope of the second energy (scales with par[8])
</div>
</div><p>
<a class="anchor" name="2da1e3b9a10d23233256f8c2234f2457"></a><!-- doxytag: member="energyCalibrationFunctions::erfFunction" ref="2da1e3b9a10d23233256f8c2234f2457" args="(Double_t *x, Double_t *par)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t energyCalibrationFunctions::erfFunction </td>
<td>(</td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>par</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Basic erf function par[0] is the inflection point par[1] is the RMS par[2] is the amplitude
</div>
</div><p>
<a class="anchor" name="8d1b3d0f8b30423dad56d8ce5323a4a8"></a><!-- doxytag: member="energyCalibrationFunctions::erfFunctionChargeSharing" ref="8d1b3d0f8b30423dad56d8ce5323a4a8" args="(Double_t *x, Double_t *par)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t energyCalibrationFunctions::erfFunctionChargeSharing </td>
<td>(</td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>par</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Erf function with charge sharing slope par[0] is the pedestal par[1] is the slope of the pedestal par[2] is the inflection point par[3] is the RMS par[4] is the amplitude par[5] is the angual coefficient of the charge sharing slope (scales with par[3])
</div>
</div><p>
<a class="anchor" name="e9582e5c46d27ad25d6139d0386698f7"></a><!-- doxytag: member="energyCalibrationFunctions::gaussChargeSharing" ref="e9582e5c46d27ad25d6139d0386698f7" args="(Double_t *x, Double_t *par)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t energyCalibrationFunctions::gaussChargeSharing </td>
<td>(</td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>par</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gaussian Function with charge sharing pedestal par[0] is the absolute height of the background pedestal par[1] is the slope of the background pedestal par[2] is the gaussian peak position par[3] is the RMS of the gaussian (and of the pedestal) par[4] is the height of the function par[5] is the fractional height of the charge sharing pedestal (scales with par[3])
</div>
</div><p>
<a class="anchor" name="7d9a7b8d0c8ff69638a5fbb9f4c04b90"></a><!-- doxytag: member="energyCalibrationFunctions::kth_smallest" ref="7d9a7b8d0c8ff69638a5fbb9f4c04b90" args="(int *a, int n, int k)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static int energyCalibrationFunctions::kth_smallest </td>
<td>(</td>
<td class="paramtype">int *&nbsp;</td>
<td class="paramname"> <em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>n</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>k</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Calculates the median of an array of n elements (swaps the arrays!)
</div>
</div><p>
<a class="anchor" name="37f557bacb75213073c8d421cc1240f4"></a><!-- doxytag: member="energyCalibrationFunctions::median" ref="37f557bacb75213073c8d421cc1240f4" args="(float *x, int n)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static float energyCalibrationFunctions::median </td>
<td>(</td>
<td class="paramtype">float *&nbsp;</td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>n</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Calculates the median of an array of n elements
</div>
</div><p>
<a class="anchor" name="a3ab0e7c3c862fb51dfda78f1b09a55c"></a><!-- doxytag: member="energyCalibrationFunctions::quick_select" ref="a3ab0e7c3c862fb51dfda78f1b09a55c" args="(int arr[], int n)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static int energyCalibrationFunctions::quick_select </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>arr</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>n</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Calculates the median of an array of n elements (swaps the arrays!)
</div>
</div><p>
<a class="anchor" name="e220482622e88a46b12498b0e4d8113a"></a><!-- doxytag: member="energyCalibrationFunctions::scurve" ref="e220482622e88a46b12498b0e4d8113a" args="(Double_t *x, Double_t *par)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t energyCalibrationFunctions::scurve </td>
<td>(</td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>par</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Erf function with charge sharing slope with the correct scan sign par[0] is the pedestal par[1] is the slope of the pedestal par[2] is the inflection point par[3] is the RMS par[4] is the amplitude par[5] is the angual coefficient of the charge sharing slope (scales with par[3])
</div>
</div><p>
<a class="anchor" name="4eba39623b518d67a63192970a78f530"></a><!-- doxytag: member="energyCalibrationFunctions::scurveFluo" ref="4eba39623b518d67a63192970a78f530" args="(Double_t *x, Double_t *par)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t energyCalibrationFunctions::scurveFluo </td>
<td>(</td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>par</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Double Erf function with charge sharing slope par[0] is the pedestal par[1] is the slope of the pedestal par[2] is the inflection point of the first energy par[3] is the RMS of the first energy par[4] is the amplitude of the first energy par[5] is the angual coefficient of the charge sharing slope of the first energy (scales with par[3]) par[6] is the inflection point of the second energy par[7] is the RMS of the second energy par[8] is the amplitude of the second energy par[9] is the angual coefficient of the charge sharing slope of the second energy (scales with par[8])
</div>
</div><p>
<a class="anchor" name="716759a1ae09ea3c841f824af3ece415"></a><!-- doxytag: member="energyCalibrationFunctions::setScanSign" ref="716759a1ae09ea3c841f824af3ece415" args="(int s=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int energyCalibrationFunctions::setScanSign </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>s</em> = <code>0</code> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
sets scan sign <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>can be 1 (energy and x-axis have the same direction) or -1 (energy and x-axis have opposite directions) otherwise gets </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>current scan sign can be 1 (energy and x-axis have the same direction) or -1 (energy and x-axis have opposite directions) </dd></dl>
</div>
</div><p>
<a class="anchor" name="015eb05dc34b77642ab2a2a9f126f170"></a><!-- doxytag: member="energyCalibrationFunctions::spectrum" ref="015eb05dc34b77642ab2a2a9f126f170" args="(Double_t *x, Double_t *par)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Double_t energyCalibrationFunctions::spectrum </td>
<td>(</td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Double_t *&nbsp;</td>
<td class="paramname"> <em>par</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
static function Gaussian with charge sharing pedestal with the correct scan sign par[0] is the absolute height of the background pedestal par[1] is the fractional height of the charge sharing pedestal (scales with par[3] par[2] is the gaussian peak position par[3] is the RMS of the gaussian (and of the pedestal) par[4] is the height of the function
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="4fc7c435169b5bf4672cf654270097d0"></a><!-- doxytag: member="energyCalibrationFunctions::sign" ref="4fc7c435169b5bf4672cf654270097d0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="classenergyCalibrationFunctions.html#4fc7c435169b5bf4672cf654270097d0">energyCalibrationFunctions::sign</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="energyCalibration_8h-source.html">energyCalibration.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 27 16:32:29 2012 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>