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

Contents of /PamCut/CaloCuts/CaloIonCut/CaloIonCut.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:16 2010 UTC (14 years, 4 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 * CaloIonCut.cpp
3 *
4 * Created on: 19-mar-2009
5 * Author: Sergio Ricciarini, Nicola Mori
6 */
7
8 /*! @file CaloIonCut.cpp The CaloCrossCut class implementation file */
9
10 #ifndef NO_CALOAXIS
11
12 #include "CaloIonCut.h"
13
14 int CaloIonCut::Check(PamLevel2 *event) {
15
16 float q_xcaltrack_fp = 0., q_ycaltrack_fp = 0.; // Q for first plane with Q along the track larger than 0
17
18 for (unsigned int ipl=0; ipl<22; ipl++) {
19 if (_xCaloAxis->GetQ(ipl) > 0) {
20 q_xcaltrack_fp=_xCaloAxis->GetQ(ipl);
21 break;
22 }
23 }
24
25 for (unsigned int ipl=0; ipl<22; ipl++) {
26 if (_yCaloAxis->GetQ(ipl) > 0) {
27 q_ycaltrack_fp=_yCaloAxis->GetQ(ipl);
28 break;
29 }
30 }
31
32 if (! (_minRelease < q_xcaltrack_fp && q_xcaltrack_fp < _maxRelease &&
33 _minRelease < q_ycaltrack_fp && q_ycaltrack_fp < _maxRelease) ) {
34 return 0;
35 }
36
37 return CUTOK;
38
39 }
40
41 #endif /* NO_CALOAXIS */

  ViewVC Help
Powered by ViewVC 1.1.23