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

Contents of /PamCut/CaloCuts/CaloNotIntCut/CaloNotIntCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Jul 8 14:00:29 2010 UTC (14 years, 4 months ago) by pam-fi
Branch: MAIN
CVS Tags: MergedFromV8_1, V9, HEAD
Changes since 1.4: +9 -1 lines
Merged from branch V8 (tag MergedToHEAD_1). Tag before the merge: BeforeMergingFromV8_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 #ifndef NO_CALOAXIS
14 if ( (!(_xCaloAxis) || !(_yCaloAxis)) && !(_pamTrack) ) { // check that one of the two possible initializations has been correctly done
15 return 0;
16 }
17 #else
18 if ( !(_pamTrack) ) { // check that the initialization has been correctly done
19 return 0;
20 }
21 #endif /* NO_CALOAXIS */
22
23 #ifndef NO_CALOAXIS
24 if (!(_pamTrack)) { // CALOAXIS track
25
26 // energy released along the event axis in the calo / total energy release in the calo
27
28 Double_t qtot = event->GetCaloLevel2()->qtot;
29 if ( qtot>0 ) {
30
31 Double_t qratio = ( _xCaloAxis->GetQaxis() + _yCaloAxis->GetQaxis() ) / qtot;
32
33 if (! (qratio > _qRatioMin) ) {
34 return 1;
35 }
36
37 }
38 }
39 #endif /* NO_CALOAXIS */
40
41 if (_pamTrack) { // PAMELA track
42
43 Double_t qtot = event->GetCaloLevel2()->qtot;
44 if ( qtot>0 ) {
45
46 Double_t qratio = ( (*_pamTrack)->GetCaloTrack()->qtrack ) / qtot;
47
48 if (! (qratio > _qRatioMin) ) {
49 return 2;
50 }
51
52 }
53
54 }
55
56 return CUTOK;
57
58 }

  ViewVC Help
Powered by ViewVC 1.1.23