1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TrkSaturationCut.cpp |
3 |
|
|
* |
4 |
|
|
* Created on: 31/ago/2009 |
5 |
|
|
* Author: Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TrkSaturationCut.cpp The TrkSaturationCut class implementation file. */ |
9 |
|
|
|
10 |
|
|
#include "TrkSaturationCut.h" |
11 |
|
|
|
12 |
|
|
int TrkSaturationCut::Check(PamLevel2 *event) { |
13 |
|
|
|
14 |
|
|
static bool sat; |
15 |
|
|
sat = false; |
16 |
|
|
for (unsigned int ip = 0; ip < 6; ip++) { |
17 |
|
|
if (event->GetTrack(0)->GetTrkTrack()->IsSaturated(ip)) { |
18 |
|
|
if (_discardSaturated) |
19 |
|
|
return 0; |
20 |
|
|
sat = true; |
21 |
pam-fi |
1.2 |
break; |
22 |
pam-fi |
1.1 |
} |
23 |
|
|
} |
24 |
|
|
|
25 |
|
|
if (!_discardSaturated && !sat) |
26 |
|
|
return 0; |
27 |
|
|
|
28 |
|
|
return CUTOK; |
29 |
|
|
} |