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" |
#include "CaloTrackCut.h" |
11 |
|
|
|
|
|
12 |
int CaloTrackCut::Check(PamLevel2 *event) { |
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 |
// 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 |
// NOTE: axis=0 => X, axis=1 => Y; tolerance in cm |
16 |
|
|
17 |
float rcil = 1.; // tolerance (cm) |
Float_t rcil; |
18 |
xCaloAxis.Reset(); |
xCaloAxis.Reset(); |
19 |
yCaloAxis.Reset(); |
yCaloAxis.Reset(); |
20 |
|
|
21 |
if ( !(xCaloAxis.FitAxis(event->GetCaloLevel1(), 0, rcil) ) || !(yCaloAxis.FitAxis(event->GetCaloLevel1(), 1, rcil) ) ) { |
if (_showerFit) { // shower fit |
22 |
return 0; |
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 |
} |
} |
33 |
|
|
34 |
// NOTE: chi2 must be positive for the track to be meaningful |
// NOTE: chi2 must be positive for the track to be meaningful |