PamCut: CaloCuts/CaloTrackCut/CaloTrackCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# CaloCuts/CaloTrackCut/CaloTrackCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * CaloTrackCut.cpp
    00003  *
    00004  *  Created on: 17-mar-2009
    00005  *      Author: Sergio Ricciarini, Nicola Mori
    00006  */
    00007
    00010 #include "CaloTrackCut.h"
    00011
    00012
    00013 int CaloTrackCut::Check(PamLevel2 *event) {
    00014
    00015   // 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
    00016   // NOTE: axis=0 => X, axis=1 => Y; tolerance in cm
    00017
    00018   float rcil = 1.; // tolerance (cm)
    00019   xCaloAxis.Reset();
    00020   yCaloAxis.Reset();
    00021
    00022   if ( !(xCaloAxis.FitAxis(event->GetCaloLevel1(), 0, rcil) ) || !(yCaloAxis.FitAxis(event->GetCaloLevel1(), 1, rcil) ) ) {
    00023     return 0;
    00024   }
    00025
    00026   // NOTE: chi2 must be positive for the track to be meaningful
    00027   if ( !(xCaloAxis.GetChi2() > 0 ) || !(yCaloAxis.GetChi2() > 0) ) {
    00028     return 0; // check that the track is meaningful
    00029   }
    00030
    00031   return CUTOK;
    00032 }