PamCut: CaloCuts/CaloIonCut/CaloIonCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# CaloCuts/CaloIonCut/CaloIonCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * CaloIonCut.cpp
    00003  *
    00004  *  Created on: 19-mar-2009
    00005  *      Author: Sergio Ricciarini, Nicola Mori
    00006  */
    00007
    00010 #include "CaloIonCut.h"
    00011
    00012 int CaloIonCut::Check(PamLevel2 *event) {
    00013
    00014   float q_xcaltrack_fp = 0., q_ycaltrack_fp = 0.; // Q for first plane with Q along the track larger than 0
    00015
    00016   for (unsigned int ipl=0; ipl<22; ipl++) {
    00017     if (_xCaloAxis->GetQ(ipl) > 0) {
    00018       q_xcaltrack_fp=_xCaloAxis->GetQ(ipl);
    00019       break;
    00020     }
    00021   }
    00022
    00023   for (unsigned int ipl=0; ipl<22; ipl++) {
    00024     if (_yCaloAxis->GetQ(ipl) > 0) {
    00025       q_ycaltrack_fp=_yCaloAxis->GetQ(ipl);
    00026       break;
    00027     }
    00028   }
    00029
    00030   if (! (_minRelease < q_xcaltrack_fp && q_xcaltrack_fp < _maxRelease &&
    00031          _minRelease < q_ycaltrack_fp && q_ycaltrack_fp < _maxRelease) ) {
    00032     return 0;
    00033   }
    00034
    00035   return CUTOK;
    00036
    00037 }