| 1 |
pam-fi |
1.1 |
/* |
| 2 |
|
|
* CaloTrackCut.cpp |
| 3 |
|
|
* |
| 4 |
|
|
* Created on: 17-mar-2009 |
| 5 |
|
|
* Author: Sergio Ricciarini, Nicola Mori |
| 6 |
|
|
*/ |
| 7 |
|
|
|
| 8 |
|
|
/*! @file CaloTrackCut.cpp The CaloTrackCut class implementation file */ |
| 9 |
|
|
|
| 10 |
|
|
#include "CaloTrackCut.h" |
| 11 |
|
|
|
| 12 |
|
|
|
| 13 |
|
|
int CaloTrackCut::Check(PamLevel2 *event) { |
| 14 |
|
|
|
| 15 |
|
|
// 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 |
| 16 |
|
|
// NOTE: axis=0 => X, axis=1 => Y; tolerance in cm |
| 17 |
|
|
|
| 18 |
|
|
float rcil = 1.; // tolerance (cm) |
| 19 |
|
|
xCaloAxis.Reset(); |
| 20 |
|
|
yCaloAxis.Reset(); |
| 21 |
|
|
|
| 22 |
|
|
if ( !(xCaloAxis.FitAxis(event->GetCaloLevel1(), 0, rcil) ) || !(yCaloAxis.FitAxis(event->GetCaloLevel1(), 1, rcil) ) ) { |
| 23 |
|
|
return 0; |
| 24 |
|
|
} |
| 25 |
|
|
|
| 26 |
|
|
// NOTE: chi2 must be positive for the track to be meaningful |
| 27 |
|
|
if ( !(xCaloAxis.GetChi2() > 0 ) || !(yCaloAxis.GetChi2() > 0) ) { |
| 28 |
|
|
return 0; // check that the track is meaningful |
| 29 |
|
|
} |
| 30 |
|
|
|
| 31 |
|
|
return CUTOK; |
| 32 |
|
|
} |