/[PAMELA software]/PamCut/TrkCuts/TrkGeomCut/TrkGeomCut.cpp
ViewVC logotype

Annotation of /PamCut/TrkCuts/TrkGeomCut/TrkGeomCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Wed Mar 10 08:54:20 2010 UTC (14 years, 8 months ago) by pam-fi
Branch: MAIN
CVS Tags: Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9
Branch point for: V8
Changes since 1.1: +14 -3 lines
Support for independent tolerances on magnet planes added.

1 pam-fi 1.1 /*
2     * TrkGeomCut.cpp
3     *
4     * Created on: 13-mar-2009
5 pam-fi 1.2 * Author: N. Mori, S. Ricciarini
6 pam-fi 1.1 */
7    
8     /*! @file TrkGeomCut.cpp The TrkGeomCut class implementation file */
9    
10     #include "TrkGeomCut.h"
11    
12     int TrkGeomCut::Check(PamLevel2 *event) {
13    
14     TrkTrack *trkTrack = event->GetTrack(0)->GetTrkTrack();
15 pam-fi 1.2
16     Float_t xT, yT;
17 pam-fi 1.1
18     for (int igf = 0; igf < TrkParams::nGF; igf++) { // loop on GF planes
19    
20 pam-fi 1.2 if (igf==5 || igf==10) { // M1 and M2 planes
21     xT = _xMagnTol;
22     yT = _yMagnTol;
23     }
24     else {
25     xT = _xTol;
26     yT = _yTol;
27     }
28    
29 pam-fi 1.1 // check done for all 14 planes
30 pam-fi 1.2 if (!(TrkParams::xGF_min[igf] + xT < trkTrack->xGF[igf] && trkTrack->xGF[igf] < TrkParams::xGF_max[igf] - xT))
31 pam-fi 1.1 return 0;
32 pam-fi 1.2 if (!(TrkParams::yGF_min[igf] + yT < trkTrack->yGF[igf] && trkTrack->yGF[igf] < TrkParams::yGF_max[igf] - yT))
33 pam-fi 1.1 return 0;
34    
35     } // end loop on GF planes
36    
37     return CUTOK;
38     }

  ViewVC Help
Powered by ViewVC 1.1.23