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

Annotation of /PamCut/CaloCuts/CaloTrackCut/CaloTrackCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Wed Mar 10 08:44:02 2010 UTC (14 years, 9 months ago) by pam-fi
Branch: MAIN
CVS Tags: Root_V8, BeforeMergingFromV8_1
Branch point for: V8
Changes since 1.1: +13 -5 lines
Support for interacting events (through FitShower in CaloAxis) added.

1 pam-fi 1.1 /*
2     * CaloTrackCut.cpp
3     *
4     * Created on: 17-mar-2009
5 pam-fi 1.2 * Author: S: Ricciarini
6 pam-fi 1.1 */
7    
8     /*! @file CaloTrackCut.cpp The CaloTrackCut class implementation file */
9    
10     #include "CaloTrackCut.h"
11    
12     int CaloTrackCut::Check(PamLevel2 *event) {
13    
14     // NOTE: FitAxis(L1 calo tree, axis, tolerance) method finds the X (Y) axis projection of the track into the calorimeter, by excluding clusters which are far away from the main X (Y) clustering area
15     // NOTE: axis=0 => X, axis=1 => Y; tolerance in cm
16    
17 pam-fi 1.2 Float_t rcil;
18 pam-fi 1.1 xCaloAxis.Reset();
19     yCaloAxis.Reset();
20    
21 pam-fi 1.2 if (_showerFit) { // shower fit
22     rcil=1.; // tolerance (cm)
23     if ( !(xCaloAxis.FitShower(event->GetCaloLevel1(), 0, rcil) ) || !(yCaloAxis.FitShower(event->GetCaloLevel1(), 1, rcil) ) ) {
24     return 0;
25     }
26     }
27     else { // single-track fit
28     rcil=1.; // tolerance (cm)
29     if ( !(xCaloAxis.FitAxis(event->GetCaloLevel1(), 0, rcil) ) || !(yCaloAxis.FitAxis(event->GetCaloLevel1(), 1, rcil) ) ) {
30     return 0;
31     }
32 pam-fi 1.1 }
33    
34     // NOTE: chi2 must be positive for the track to be meaningful
35     if ( !(xCaloAxis.GetChi2() > 0 ) || !(yCaloAxis.GetChi2() > 0) ) {
36     return 0; // check that the track is meaningful
37     }
38    
39     return CUTOK;
40     }

  ViewVC Help
Powered by ViewVC 1.1.23