Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

FindByMassRange.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/GaudiKernel/GaudiKernel/FindByMassRange.h,v 1.1.1.1 2001/04/18 18:14:18 tlindner 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 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

Generated at Wed Nov 21 12:22:03 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000