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

Annotation of /PamCut/CaloCuts/CaloNotIntCut/CaloNotIntCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.23