1 |
/* |
2 |
* CaloGeomCut.cpp |
3 |
* |
4 |
* Created on: 19-mar-2009 |
5 |
* Author: Sergio Ricciarini, Nicola Mori |
6 |
*/ |
7 |
|
8 |
/*! @file CaloGeomCut.cpp The CaloCrossCut class implementation file */ |
9 |
|
10 |
#include "CaloGeomCut.h" |
11 |
|
12 |
int CaloGeomCut::Check(PamLevel2 *event) { |
13 |
|
14 |
float xCaloTrack; |
15 |
float yCaloTrack; |
16 |
|
17 |
for (Int_t igf = 0; igf < TrkParams::nGF; igf++) { |
18 |
xCaloTrack = _xCaloAxis->par[0] + (_xCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm |
19 |
if (! (TrkParams::xGF_min[igf] + _xTolCaloTrack < xCaloTrack && xCaloTrack < TrkParams::xGF_max[igf] |
20 |
- _xTolCaloTrack) ) { |
21 |
return 0; |
22 |
} |
23 |
|
24 |
yCaloTrack = _yCaloAxis->par[0] + (_yCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm |
25 |
if (! (TrkParams::yGF_min[igf] + _yTolCaloTrack < yCaloTrack && yCaloTrack < TrkParams::yGF_max[igf] |
26 |
- _yTolCaloTrack) ) { |
27 |
return 0; |
28 |
} |
29 |
} |
30 |
|
31 |
return CUTOK; |
32 |
} |