1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* CaloIonCut.cpp |
3 |
|
|
* |
4 |
|
|
* Created on: 19-mar-2009 |
5 |
|
|
* Author: Sergio Ricciarini, Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file CaloIonCut.cpp The CaloCrossCut class implementation file */ |
9 |
|
|
|
10 |
|
|
#include "CaloIonCut.h" |
11 |
|
|
|
12 |
|
|
int CaloIonCut::Check(PamLevel2 *event) { |
13 |
|
|
|
14 |
|
|
float q_xcaltrack_fp = 0., q_ycaltrack_fp = 0.; // Q for first plane with Q along the track larger than 0 |
15 |
|
|
|
16 |
|
|
for (unsigned int ipl=0; ipl<22; ipl++) { |
17 |
|
|
if (_xCaloAxis->GetQ(ipl) > 0) { |
18 |
|
|
q_xcaltrack_fp=_xCaloAxis->GetQ(ipl); |
19 |
|
|
break; |
20 |
|
|
} |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
for (unsigned int ipl=0; ipl<22; ipl++) { |
24 |
|
|
if (_yCaloAxis->GetQ(ipl) > 0) { |
25 |
|
|
q_ycaltrack_fp=_yCaloAxis->GetQ(ipl); |
26 |
|
|
break; |
27 |
|
|
} |
28 |
|
|
} |
29 |
|
|
|
30 |
|
|
if (! (_minRelease < q_xcaltrack_fp && q_xcaltrack_fp < _maxRelease && |
31 |
|
|
_minRelease < q_ycaltrack_fp && q_ycaltrack_fp < _maxRelease) ) { |
32 |
|
|
return 0; |
33 |
|
|
} |
34 |
|
|
|
35 |
|
|
return CUTOK; |
36 |
|
|
|
37 |
|
|
} |