| # Gaudi Framework, version v21r7p1 |

Home |  | Generated: 15 Feb 2010

# FindByMassRange.h

Go to the documentation of this file.

    00001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/FindByMassRange.h,v 1.2 2000/12/13 12:57:13 mato Exp $
    00002 #ifndef GAUDIKERNEL_FINDBYMASSRANGE_H
    00003 #define GAUDIKERNEL_FINDBYMASSRANGE_H
    00004
    00005
    00006 // Include files
    00007 #include "GaudiKernel/IParticlePropertySvc.h"
    00008 #include "GaudiKernel/ParticleProperty.h"
    00009
    00010
    00031 class GAUDI_API FindByMassRange: public std::unary_function< ParticleProperty* ,bool > {
    00032
    00033 public:
    00034
    00036   FindByMassRange( double low, double high ) : m_low( low ), m_high( high ) { }
    00037
    00041   bool operator() ( const ParticleProperty* pp ) const                        {
    00042     bool in_range = false;
    00043     if ( pp ) {
    00044       if ( pp->mass() >= m_low && pp->mass() <= m_high ) {
    00045               in_range = true;
    00046       }
    00047     }
    00048     return in_range;
    00049   }
    00050
    00051 private:
    00052
    00054   double m_low;
    00055   double m_high;
    00056 };
    00057
    00058 #endif  // GAUDIKERNEL_FINDBYMASSRANGE_H