1 |
/* |
2 |
* CaloNotIntCut.cpp |
3 |
* Created on: 17-mar-2009 |
4 |
* Author: Sergio Ricciarini, Nicola Mori |
5 |
*/ |
6 |
|
7 |
/*! @file CaloNotIntCut.cpp The CaloNotIntCut class implementation file */ |
8 |
|
9 |
#include "CaloNotIntCut.h" |
10 |
|
11 |
int CaloNotIntCut::Check(PamLevel2 *event) { |
12 |
|
13 |
if ( (!(_xCaloAxis) || !(_yCaloAxis)) && !(_pamTrack) ) { // check that one of the two possible initializations has been correctly done |
14 |
return 0; |
15 |
} |
16 |
|
17 |
if (!(_pamTrack)) { // CALOAXIS track |
18 |
|
19 |
// energy released along the event axis in the calo / total energy release in the calo |
20 |
|
21 |
float qratio = ( _xCaloAxis->GetQaxis() + _yCaloAxis->GetQaxis() ) / event->GetCaloLevel2()->qtot; |
22 |
|
23 |
if (! (qratio > _qRatioMin) ) { |
24 |
return 1; |
25 |
} |
26 |
|
27 |
} |
28 |
|
29 |
if (_pamTrack) { // PAMELA track |
30 |
|
31 |
float qratio = ( _pamTrack->GetCaloTrack()->qtrack ) / event->GetCaloLevel2()->qtot; |
32 |
|
33 |
if (! (qratio > _qRatioMin) ) { |
34 |
return 2; |
35 |
} |
36 |
|
37 |
} |
38 |
|
39 |
return CUTOK; |
40 |
|
41 |
} |