1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TrkGeomCut.cpp |
3 |
|
|
* |
4 |
|
|
* Created on: 13-mar-2009 |
5 |
|
|
* Author: Sergio Ricciarini, Nicola Mori |
6 |
|
|
*/ |
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 |
|
|
|
16 |
|
|
for (int igf = 0; igf < TrkParams::nGF; igf++) { // loop on GF planes |
17 |
|
|
|
18 |
|
|
// check done for all 14 planes |
19 |
|
|
if (!(TrkParams::xGF_min[igf] + _xTol < trkTrack->xGF[igf] && trkTrack->xGF[igf] < TrkParams::xGF_max[igf] - _xTol)) |
20 |
|
|
return 0; |
21 |
|
|
if (!(TrkParams::yGF_min[igf] + _yTol < trkTrack->yGF[igf] && trkTrack->yGF[igf] < TrkParams::yGF_max[igf] - _yTol)) |
22 |
|
|
return 0; |
23 |
|
|
|
24 |
|
|
} // end loop on GF planes |
25 |
|
|
|
26 |
|
|
return CUTOK; |
27 |
|
|
} |