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 |
} |
22 |
} |
23 |
|
24 |
if (!_discardSaturated && !sat) |
25 |
return 0; |
26 |
|
27 |
return CUTOK; |
28 |
} |