| 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: TrkCuts/TrkPhSinCut/TrkPhSinCut.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>TrkCuts/TrkPhSinCut/TrkPhSinCut.cpp</h1><a href="TrkPhSinCut_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"> * TrkPhSinCut.cpp</span> |
| 24 |
|
|
<a name="l00003"></a>00003 <span class="comment"> *</span> |
| 25 |
|
|
<a name="l00004"></a>00004 <span class="comment"> * Created on: 13-mar-2009</span> |
| 26 |
|
|
<a name="l00005"></a>00005 <span class="comment"> * Author: Sergio Ricciarini, 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">#include "<a class="code" href="TrkPhSinCut_8h.html">TrkPhSinCut.h</a>"</span> |
| 30 |
|
|
<a name="l00011"></a>00011 |
| 31 |
|
|
<a name="l00012"></a><a class="code" href="classTrkPhSinCut.html#c9529432c0c9b8667c5c97ea824a7c93">00012</a> <span class="keywordtype">int</span> <a class="code" href="classTrkPhSinCut.html#c9529432c0c9b8667c5c97ea824a7c93" title="The single physical track check.">TrkPhSinCut::Check</a>(PamLevel2 *event) { |
| 32 |
|
|
<a name="l00013"></a>00013 |
| 33 |
|
|
<a name="l00014"></a>00014 <span class="keywordflow">if</span> (!(event->GetTrkLevel2()->GetNTracks() == 1)) |
| 34 |
|
|
<a name="l00015"></a>00015 <span class="keywordflow">return</span> 0; <span class="comment">// one track exists (physical or not)</span> |
| 35 |
|
|
<a name="l00016"></a>00016 |
| 36 |
|
|
<a name="l00017"></a>00017 <span class="comment">// selection of the physical track (see TrkId below)</span> |
| 37 |
|
|
<a name="l00018"></a>00018 <span class="keyword">event</span>->SetSortingMethod(<a class="code" href="classTrkPhSinCut.html#8cfbff5ee817a3324c884a2a289b852e">_sortingMethod</a>); |
| 38 |
|
|
<a name="l00019"></a>00019 <a class="code" href="classTrkPhSinCut.html#f87ab859d5c5958d47ccef09ac7f9f65" title="The PamTrack for the last good event.">pamTrack</a> = <span class="keyword">event</span>->GetTrack(0); |
| 39 |
|
|
<a name="l00020"></a>00020 |
| 40 |
|
|
<a name="l00021"></a>00021 <span class="comment">// NOTE: pamtrack is null pointer if no physical track is selected; this is a redundant check to find bugs in the level2 (at least one physical track should always be present, given that GetNTracks()=1 according to the previous cut).</span> |
| 41 |
|
|
<a name="l00022"></a>00022 <span class="keywordflow">if</span> (!<a class="code" href="classTrkPhSinCut.html#f87ab859d5c5958d47ccef09ac7f9f65" title="The PamTrack for the last good event.">pamTrack</a>) |
| 42 |
|
|
<a name="l00023"></a>00023 <span class="keywordflow">return</span> 0; <span class="comment">// redundant check</span> |
| 43 |
|
|
<a name="l00024"></a>00024 |
| 44 |
|
|
<a name="l00025"></a>00025 <a class="code" href="classTrkPhSinCut.html#8e825d1bb1e530204caba55ebe4f3dda" title="The TrkTrack for the last good event.">trkTrack</a> = <a class="code" href="classTrkPhSinCut.html#f87ab859d5c5958d47ccef09ac7f9f65" title="The PamTrack for the last good event.">pamTrack</a>->GetTrkTrack(); |
| 45 |
|
|
<a name="l00026"></a>00026 |
| 46 |
|
|
<a name="l00027"></a>00027 <span class="keywordflow">if</span> (!(<a class="code" href="classTrkPhSinCut.html#8e825d1bb1e530204caba55ebe4f3dda" title="The TrkTrack for the last good event.">trkTrack</a>->nstep < 100 && <a class="code" href="classTrkPhSinCut.html#8e825d1bb1e530204caba55ebe4f3dda" title="The TrkTrack for the last good event.">trkTrack</a>->chi2 > 0.)) |
| 47 |
|
|
<a name="l00028"></a>00028 <span class="keywordflow">return</span> 0; <span class="comment">// check that the track is meaningful</span> |
| 48 |
|
|
<a name="l00029"></a>00029 |
| 49 |
|
|
<a name="l00030"></a>00030 <span class="comment">// int imatch=0;</span> |
| 50 |
|
|
<a name="l00031"></a>00031 |
| 51 |
|
|
<a name="l00032"></a>00032 <span class="comment">// identification of TRK-track TOF-index (this index is generally different from TRK-track TRK-index)</span> |
| 52 |
|
|
<a name="l00033"></a>00033 <a class="code" href="classTrkPhSinCut.html#542b80112113dc6e915934cfec1bb6a5" title="TOF_index for TRK-track for the last good event.">iTrackTof</a> = -1000; |
| 53 |
|
|
<a name="l00034"></a>00034 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<<span class="keyword">event</span>->GetToFLevel2()->ntrk(); i++) { |
| 54 |
|
|
<a name="l00035"></a>00035 <span class="keywordflow">if</span> ( event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == <a class="code" href="classTrkPhSinCut.html#8e825d1bb1e530204caba55ebe4f3dda" title="The TrkTrack for the last good event.">trkTrack</a>->GetSeqNo() ) { |
| 55 |
|
|
<a name="l00036"></a>00036 <a class="code" href="classTrkPhSinCut.html#542b80112113dc6e915934cfec1bb6a5" title="TOF_index for TRK-track for the last good event.">iTrackTof</a> = i; |
| 56 |
|
|
<a name="l00037"></a>00037 <span class="comment">// cout << "trkseqno " << event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno << " TOF track id " << i << endl;</span> |
| 57 |
|
|
<a name="l00038"></a>00038 <span class="comment">// imatch++;</span> |
| 58 |
|
|
<a name="l00039"></a>00039 <span class="keywordflow">break</span>; |
| 59 |
|
|
<a name="l00040"></a>00040 } |
| 60 |
|
|
<a name="l00041"></a>00041 } |
| 61 |
|
|
<a name="l00042"></a>00042 |
| 62 |
|
|
<a name="l00043"></a>00043 <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>; |
| 63 |
|
|
<a name="l00044"></a>00044 |
| 64 |
|
|
<a name="l00045"></a>00045 } |
| 65 |
|
|
</pre></div></div> |
| 66 |
|
|
<hr size="1"><address style="text-align: right;"><small>Generated on Wed May 27 15:21:27 2009 for PamCut by |
| 67 |
|
|
<a href="http://www.doxygen.org/index.html"> |
| 68 |
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> |
| 69 |
|
|
</body> |
| 70 |
|
|
</html> |