PamCut: CaloCuts/CaloGeomCut/CaloGeomCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# CaloCuts/CaloGeomCut/CaloGeomCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * CaloGeomCut.cpp
    00003  *
    00004  *  Created on: 19-mar-2009
    00005  *      Author: Sergio Ricciarini, Nicola Mori
    00006  */
    00007
    00010 #include "CaloGeomCut.h"
    00011
    00012 int CaloGeomCut::Check(PamLevel2 *event) {
    00013
    00014   float xCaloTrack;
    00015   float yCaloTrack;
    00016
    00017   for (Int_t igf = 0; igf < TrkParams::nGF; igf++) {
    00018     xCaloTrack = _xCaloAxis->par[0] + (_xCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm
    00019     if (! (TrkParams::xGF_min[igf] + _xTolCaloTrack < xCaloTrack && xCaloTrack < TrkParams::xGF_max[igf]
    00020         - _xTolCaloTrack) ) {
    00021       return 0;
    00022     }
    00023
    00024     yCaloTrack = _yCaloAxis->par[0] + (_yCaloAxis->par[1]) * TrkParams::zGF[igf]; // cm
    00025     if (! (TrkParams::yGF_min[igf] + _yTolCaloTrack < yCaloTrack && yCaloTrack < TrkParams::yGF_max[igf]
    00026         - _yTolCaloTrack) ) {
    00027       return 0;
    00028     }
    00029   }
    00030
    00031   return CUTOK;
    00032 }