| 1 |
pam-fi |
1.1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
| 3 |
|
|
<title>PamCut: CaloCuts/CaloNucleiZCut/CaloNucleiZCut.cpp Source File</title> |
| 4 |
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"> |
| 5 |
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
| 6 |
|
|
</head><body> |
| 7 |
|
|
<!-- Generated by Doxygen 1.5.9 --> |
| 8 |
|
|
<div class="navigation" id="top"> |
| 9 |
|
|
<div class="tabs"> |
| 10 |
|
|
<ul> |
| 11 |
|
|
<li><a href="index.html"><span>Main Page</span></a></li> |
| 12 |
|
|
<li><a href="annotated.html"><span>Classes</span></a></li> |
| 13 |
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li> |
| 14 |
|
|
</ul> |
| 15 |
|
|
</div> |
| 16 |
|
|
<div class="tabs"> |
| 17 |
|
|
<ul> |
| 18 |
|
|
<li><a href="files.html"><span>File List</span></a></li> |
| 19 |
|
|
<li><a href="globals.html"><span>File Members</span></a></li> |
| 20 |
|
|
</ul> |
| 21 |
|
|
</div> |
| 22 |
|
|
<h1>CaloCuts/CaloNucleiZCut/CaloNucleiZCut.cpp</h1><a href="CaloNucleiZCut_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> |
| 23 |
|
|
<a name="l00002"></a>00002 <span class="comment"> * CaloNucleiZCut.cpp</span> |
| 24 |
|
|
<a name="l00003"></a>00003 <span class="comment"> *</span> |
| 25 |
|
|
<a name="l00004"></a>00004 <span class="comment"> * Created on: 30-apr-2009</span> |
| 26 |
|
|
<a name="l00005"></a>00005 <span class="comment"> * Author: Nicola Mori</span> |
| 27 |
|
|
<a name="l00006"></a>00006 <span class="comment"> */</span> |
| 28 |
|
|
<a name="l00007"></a>00007 |
| 29 |
|
|
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef NO_CALONUCLEI</span> |
| 30 |
|
|
<a name="l00011"></a>00011 <span class="preprocessor"></span> |
| 31 |
|
|
<a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="CaloNucleiZCut_8h.html">CaloNucleiZCut.h</a>"</span> |
| 32 |
|
|
<a name="l00013"></a>00013 |
| 33 |
|
|
<a name="l00014"></a>00014 <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classCaloNucleiZCut.html#4c153a341ed7198ca6e3e88f7ed88803">CaloNucleiZCut::_sigmaZ</a>[] = { 0.11, 0.14, 0.21, 0.28, 0.28, 0.31, 0.32, 0.32 }; <span class="comment">// the charge-width in a layer for Z=1..8</span> |
| 34 |
|
|
<a name="l00015"></a>00015 |
| 35 |
|
|
<a name="l00016"></a><a class="code" href="classCaloNucleiZCut.html#af2ac497ae8c5b356eec8d0cfe8a2c7a">00016</a> <span class="keywordtype">int</span> <a class="code" href="classCaloNucleiZCut.html#af2ac497ae8c5b356eec8d0cfe8a2c7a" title="The CaloNucleiZ check.">CaloNucleiZCut::Check</a>(PamLevel2 *event) { |
| 36 |
|
|
<a name="l00017"></a>00017 |
| 37 |
|
|
<a name="l00018"></a>00018 <span class="keywordflow">if</span> (_Z < 1 || _Z > 8) |
| 38 |
|
|
<a name="l00019"></a>00019 <span class="keywordflow">return</span> <a class="code" href="CaloNucleiZCut_8h.html#e29bedb897bf34de936ffb98722fe6361a55dad6ccf6a45dd1bddf0a4ed739f1" title="Discarded because charge is not between 1 and 8.">CALONUCLEIZ_ILLEGALZ</a>; |
| 39 |
|
|
<a name="l00020"></a>00020 |
| 40 |
|
|
<a name="l00021"></a>00021 <span class="comment">// Check if CaloNuclei has already been initialized</span> |
| 41 |
|
|
<a name="l00022"></a>00022 <span class="keywordflow">if</span> (<a class="code" href="classCaloNucleiZCut.html#bdede0955c101d7e424e2cb734933a49">_caloNuclei</a> == NULL) |
| 42 |
|
|
<a name="l00023"></a>00023 <a class="code" href="classCaloNucleiZCut.html#bdede0955c101d7e424e2cb734933a49">_caloNuclei</a> = <span class="keyword">new</span> CaloNuclei(event); |
| 43 |
|
|
<a name="l00024"></a>00024 |
| 44 |
|
|
<a name="l00025"></a>00025 <span class="comment">// Obtain charge</span> |
| 45 |
|
|
<a name="l00026"></a>00026 Float_t charge; |
| 46 |
|
|
<a name="l00027"></a>00027 <span class="keywordflow">switch</span> (<a class="code" href="classCaloNucleiZCut.html#65d0469e52da5c6efe4f1b08a3c65029">_method</a>) { |
| 47 |
|
|
<a name="l00028"></a>00028 <span class="keywordflow">case</span> <a class="code" href="CaloNucleiZCut_8h.html#f52d4ca6dd7142aaf693bf81cca09fd3ee30a18a35c710fb18c934bc9657f0e8" title="Siegen method: stdedx vs. beta from ToF.">CALONUCLEIZ_SIEGEN</a>: |
| 48 |
|
|
<a name="l00029"></a>00029 charge = <a class="code" href="classCaloNucleiZCut.html#bdede0955c101d7e424e2cb734933a49">_caloNuclei</a>->Get_charge_siegen1(); |
| 49 |
|
|
<a name="l00030"></a>00030 <span class="keywordflow">break</span>; |
| 50 |
|
|
<a name="l00031"></a>00031 <span class="keywordflow">case</span> <a class="code" href="CaloNucleiZCut_8h.html#f52d4ca6dd7142aaf693bf81cca09fd36b41546a199dede78835209ae68515c1" title="dE/dx in the first calorimeter plane vs. beta from ToF">CALONUCLEIZ_DEDXBETA</a>: |
| 51 |
|
|
<a name="l00032"></a>00032 charge = <a class="code" href="classCaloNucleiZCut.html#bdede0955c101d7e424e2cb734933a49">_caloNuclei</a>->Get_ZCalo_dedx_b(); |
| 52 |
|
|
<a name="l00033"></a>00033 <span class="keywordflow">break</span>; |
| 53 |
|
|
<a name="l00034"></a>00034 <span class="keywordflow">case</span> <a class="code" href="CaloNucleiZCut_8h.html#f52d4ca6dd7142aaf693bf81cca09fd3d43aa7aa27454b2aad11c7dddbe88f27" title="dE/dx in the first calorimeter plane vs. deflection from Tracker">CALONUCLEIZ_DEDXDEFL</a>: |
| 54 |
|
|
<a name="l00035"></a>00035 charge = <a class="code" href="classCaloNucleiZCut.html#bdede0955c101d7e424e2cb734933a49">_caloNuclei</a>->Get_ZCalo_dedx_defl(); |
| 55 |
|
|
<a name="l00036"></a>00036 <span class="keywordflow">break</span>; |
| 56 |
|
|
<a name="l00037"></a>00037 } |
| 57 |
|
|
<a name="l00038"></a>00038 |
| 58 |
|
|
<a name="l00039"></a>00039 <span class="comment">// Check</span> |
| 59 |
|
|
<a name="l00040"></a>00040 <span class="keywordflow">if</span> ((charge > <a class="code" href="classCaloNucleiZCut.html#546c30cbf8cb5d91de0391b40a78c9bc">_Z</a> + <a class="code" href="classCaloNucleiZCut.html#d80ef8acd9fbf8359e30ee671f9d9430">_upperLimit</a> * <a class="code" href="classCaloNucleiZCut.html#4c153a341ed7198ca6e3e88f7ed88803">_sigmaZ</a>[<a class="code" href="classCaloNucleiZCut.html#546c30cbf8cb5d91de0391b40a78c9bc">_Z</a> - 1]) || (charge < <a class="code" href="classCaloNucleiZCut.html#546c30cbf8cb5d91de0391b40a78c9bc">_Z</a> - <a class="code" href="classCaloNucleiZCut.html#f98459195fa9578641561ed9f2b3ddd6">_lowerLimit</a> * <a class="code" href="classCaloNucleiZCut.html#4c153a341ed7198ca6e3e88f7ed88803">_sigmaZ</a>[<a class="code" href="classCaloNucleiZCut.html#546c30cbf8cb5d91de0391b40a78c9bc">_Z</a> - 1])) { |
| 60 |
|
|
<a name="l00041"></a>00041 <span class="keywordflow">return</span> <a class="code" href="CaloNucleiZCut_8h.html#e29bedb897bf34de936ffb98722fe636964c914035545841c3b5f2d348f87941" title="Discarded because charge is out of bounds.">CALONUCLEIZ_OUTOFBOUNDS</a>; |
| 61 |
|
|
<a name="l00042"></a>00042 } |
| 62 |
|
|
<a name="l00043"></a>00043 |
| 63 |
|
|
<a name="l00044"></a>00044 <span class="keywordflow">return</span> <a class="code" href="CommonDefs_8h.html#c857f4b76ae431837cbf61fd74863b6c" title="The implementations of PamCut::Check() must return this value if the event satisfy...">CUTOK</a>; |
| 64 |
|
|
<a name="l00045"></a>00045 |
| 65 |
|
|
<a name="l00046"></a>00046 } |
| 66 |
|
|
<a name="l00047"></a>00047 |
| 67 |
|
|
<a name="l00048"></a>00048 <span class="preprocessor">#endif </span><span class="comment">/* NO_CALONUCLEI */</span> |
| 68 |
|
|
</pre></div></div> |
| 69 |
|
|
<hr size="1"><address style="text-align: right;"><small>Generated on Wed May 27 15:21:27 2009 for PamCut by |
| 70 |
|
|
<a href="http://www.doxygen.org/index.html"> |
| 71 |
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> |
| 72 |
|
|
</body> |
| 73 |
|
|
</html> |