PamCut: CaloCuts/CaloNHitCut/CaloNHitCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# CaloCuts/CaloNHitCut/CaloNHitCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * CaloNHitCut.cpp
    00003  *
    00004  *  Created on: 18-mar-2009
    00005   *      Author: Sergio Ricciarini, Nicola Mori
    00006  */
    00007
    00010 #include "CaloNHitCut.h"
    00011
    00012 int CaloNHitCut::Check(PamLevel2 *event) {
    00013
    00014   int nHit;
    00015
    00016   // Check X
    00017
    00018   nHit=0;
    00019   for (unsigned int ipl=0; ipl<22; ipl++) {
    00020     if (_xCaloAxis->GetQ(ipl) > 0) {
    00021       nHit++;
    00022     }
    00023   }
    00024
    00025   if (nHit < _nMinHit) {
    00026     return 0;
    00027   }
    00028
    00029   // Check Y
    00030   nHit = 0;
    00031   for (unsigned int ipl=0; ipl<22; ipl++) {
    00032     if (_yCaloAxis->GetQ(ipl) > 0) {
    00033       nHit++;
    00034     }
    00035   }
    00036
    00037   if (nHit < _nMinHit) {
    00038     return 0;
    00039   }
    00040
    00041   return CUTOK;
    00042
    00043 }