/[PAMELA software]/PamCut/CaloCuts/CaloNHitCut/CaloNHitCut.cpp
ViewVC logotype

Contents of /PamCut/CaloCuts/CaloNHitCut/CaloNHitCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1.2.1 - (show annotations) (download) (vendor branch)
Thu Jul 8 10:43:18 2010 UTC (14 years, 5 months ago) by pam-fi
Branch: V8
CVS Tags: MergedToHEAD_1, nuclei_reproc
Changes since 1.1.1.1: +4 -0 lines
Support for external CaloAxis library added.

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 #ifndef NO_CALOAXIS
11
12 #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
47 #endif /* NO_CALOAXIS */

  ViewVC Help
Powered by ViewVC 1.1.23