1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TrkCalQualCut.cpp |
3 |
|
|
* |
4 |
|
|
* Created on: 10-mar-2009 |
5 |
|
|
* Author: Sergio Ricciarini, Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TrkCalQualCut.cpp The TrkCalQualCut class implementation file */ |
9 |
|
|
|
10 |
|
|
#include "TrkCalQualCut.h" |
11 |
|
|
|
12 |
|
|
int TrkCalQualCut::Check(PamLevel2 *event) { |
13 |
|
|
|
14 |
|
|
if ((event->GetRunInfo()->TRK_CALIB_USED == 1 || event->GetRunInfo()->TRK_CALIB_USED == 2 ) && |
15 |
|
|
(event->GetRunInfo()->VALIDATION == 1)){ |
16 |
|
|
_calibration = TRKCAL_ONLINE; |
17 |
|
|
return CUTOK; // VALIDATED on-line calibration |
18 |
|
|
} |
19 |
|
|
else if (event->GetRunInfo()->TRK_CALIB_USED == 104){ |
20 |
|
|
_calibration = TRKCAL_DEFAULT; |
21 |
|
|
return CUTOK; // default calibration |
22 |
|
|
} |
23 |
|
|
_calibration = TRKCAL_BAD; |
24 |
|
|
return TRKCAL_BAD; |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
inline int TrkCalQualCut::GetCalibration(){ |
28 |
|
|
return _calibration; |
29 |
|
|
} |