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

Diff of /PamCut/CaloCuts/CaloTrackCut/CaloTrackCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by pam-fi, Wed May 27 13:30:09 2009 UTC revision 1.2.2.1 by pam-fi, Thu Jul 8 10:43:11 2010 UTC
# Line 2  Line 2 
2   * CaloTrackCut.cpp   * CaloTrackCut.cpp
3   *   *
4   *  Created on: 17-mar-2009   *  Created on: 17-mar-2009
5   *      Author: Sergio Ricciarini, Nicola Mori   *      Author: S: Ricciarini
6   */   */
7    
8  /*! @file CaloTrackCut.cpp The CaloTrackCut class implementation file */  /*! @file CaloTrackCut.cpp The CaloTrackCut class implementation file */
9    
10  #include "CaloTrackCut.h"  #ifndef NO_CALOAXIS
11    
12    #include "CaloTrackCut.h"
13    
14  int CaloTrackCut::Check(PamLevel2 *event) {  int CaloTrackCut::Check(PamLevel2 *event) {
15    
16    // 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    // 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
17    // NOTE: axis=0 => X, axis=1 => Y; tolerance in cm    // NOTE: axis=0 => X, axis=1 => Y; tolerance in cm
18    
19    float rcil = 1.; // tolerance (cm)    Float_t rcil;
20    xCaloAxis.Reset();    xCaloAxis.Reset();
21    yCaloAxis.Reset();    yCaloAxis.Reset();
22        
23    if ( !(xCaloAxis.FitAxis(event->GetCaloLevel1(), 0, rcil) ) || !(yCaloAxis.FitAxis(event->GetCaloLevel1(), 1, rcil) ) ) {    if (_showerFit) { // shower fit
24      return 0;      rcil=1.; // tolerance (cm)
25        if ( !(xCaloAxis.FitShower(event->GetCaloLevel1(), 0, rcil) ) || !(yCaloAxis.FitShower(event->GetCaloLevel1(), 1, rcil) ) ) {
26          return 0;
27        }
28      }
29      else { // single-track fit
30        rcil=1.; // tolerance (cm)
31        if ( !(xCaloAxis.FitAxis(event->GetCaloLevel1(), 0, rcil) ) || !(yCaloAxis.FitAxis(event->GetCaloLevel1(), 1, rcil) ) ) {
32          return 0;
33        }
34    }    }
35        
36    // NOTE: chi2 must be positive for the track to be meaningful    // NOTE: chi2 must be positive for the track to be meaningful
# Line 30  int CaloTrackCut::Check(PamLevel2 *event Line 40  int CaloTrackCut::Check(PamLevel2 *event
40    
41    return CUTOK;    return CUTOK;
42  }  }
43    
44    #endif /* NO_CALOAXIS */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2.2.1

  ViewVC Help
Powered by ViewVC 1.1.23