Parent Directory | Revision Log
Support for external CaloAxis library added.
1 | pam-fi | 1.1 | /* |
2 | * CaloNHitCut.cpp | ||
3 | * | ||
4 | * Created on: 18-mar-2009 | ||
5 | * Author: Sergio Ricciarini, Nicola Mori | ||
6 | */ | ||
7 | |||
8 | /*! @file CaloNHitCut.cpp The CaloNHitCut class implementation file */ | ||
9 | |||
10 | pam-fi | 1.1.1.1.2.1 | #ifndef NO_CALOAXIS |
11 | |||
12 | pam-fi | 1.1 | #include "CaloNHitCut.h" |
13 | |||
14 | int CaloNHitCut::Check(PamLevel2 *event) { | ||
15 | |||
16 | int nHit; | ||
17 | |||
18 | // Check X | ||
19 | |||
20 | nHit=0; | ||
21 | for (unsigned int ipl=0; ipl<22; ipl++) { | ||
22 | if (_xCaloAxis->GetQ(ipl) > 0) { | ||
23 | nHit++; | ||
24 | } | ||
25 | } | ||
26 | |||
27 | if (nHit < _nMinHit) { | ||
28 | return 0; | ||
29 | } | ||
30 | |||
31 | // Check Y | ||
32 | nHit = 0; | ||
33 | for (unsigned int ipl=0; ipl<22; ipl++) { | ||
34 | if (_yCaloAxis->GetQ(ipl) > 0) { | ||
35 | nHit++; | ||
36 | } | ||
37 | } | ||
38 | |||
39 | if (nHit < _nMinHit) { | ||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | return CUTOK; | ||
44 | |||
45 | } | ||
46 | pam-fi | 1.1.1.1.2.1 | |
47 | #endif /* NO_CALOAXIS */ |
ViewVC Help | |
Powered by ViewVC 1.1.23 |