1 |
pam-fi |
1.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 |
pam-fi |
1.2 |
if ( (!(_xCaloAxis) || !(_yCaloAxis)) && !(_pamTrack) ) { // check that one of the two possible initializations has been correctly done |
14 |
pam-fi |
1.1 |
return 0; |
15 |
|
|
} |
16 |
|
|
|
17 |
pam-fi |
1.2 |
if (!(_pamTrack)) { // CALOAXIS track |
18 |
pam-fi |
1.1 |
|
19 |
|
|
// energy released along the event axis in the calo / total energy release in the calo |
20 |
|
|
|
21 |
pam-fi |
1.4 |
Double_t qtot = event->GetCaloLevel2()->qtot; |
22 |
|
|
if ( qtot>0 ) { |
23 |
|
|
|
24 |
|
|
Double_t qratio = ( _xCaloAxis->GetQaxis() + _yCaloAxis->GetQaxis() ) / qtot; |
25 |
pam-fi |
1.1 |
|
26 |
pam-fi |
1.4 |
if (! (qratio > _qRatioMin) ) { |
27 |
|
|
return 1; |
28 |
|
|
} |
29 |
|
|
|
30 |
pam-fi |
1.1 |
} |
31 |
|
|
} |
32 |
|
|
|
33 |
pam-fi |
1.2 |
if (_pamTrack) { // PAMELA track |
34 |
|
|
|
35 |
pam-fi |
1.4 |
Double_t qtot = event->GetCaloLevel2()->qtot; |
36 |
|
|
if ( qtot>0 ) { |
37 |
|
|
|
38 |
|
|
Double_t qratio = ( (*_pamTrack)->GetCaloTrack()->qtrack ) / qtot; |
39 |
pam-fi |
1.2 |
|
40 |
pam-fi |
1.4 |
if (! (qratio > _qRatioMin) ) { |
41 |
|
|
return 2; |
42 |
|
|
} |
43 |
|
|
|
44 |
pam-fi |
1.2 |
} |
45 |
pam-fi |
1.1 |
|
46 |
|
|
} |
47 |
|
|
|
48 |
|
|
return CUTOK; |
49 |
|
|
|
50 |
|
|
} |