All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FindByMassRange.h
Go to the documentation of this file.
1 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/FindByMassRange.h,v 1.2 2000/12/13 12:57:13 mato Exp $
2 #ifndef GAUDIKERNEL_FINDBYMASSRANGE_H
3 #define GAUDIKERNEL_FINDBYMASSRANGE_H
4 
5 
6 // Include files
9 
10 
31 class GAUDI_API FindByMassRange: public std::unary_function< ParticleProperty* ,bool > {
32 
33 public:
34 
36  FindByMassRange( double low, double high ) : m_low( low ), m_high( high ) { }
37 
41  bool operator() ( const ParticleProperty* pp ) const {
42  bool in_range = false;
43  if ( pp ) {
44  if ( pp->mass() >= m_low && pp->mass() <= m_high ) {
45  in_range = true;
46  }
47  }
48  return in_range;
49  }
50 
51 private:
52 
54  double m_low;
55  double m_high;
56 };
57 
58 #endif // GAUDIKERNEL_FINDBYMASSRANGE_H
A trivial class to hold information about a single particle properties.
FindByMassRange(double low, double high)
Constructor - sets the mass range in Gev.
double m_low
Low and high mass range (GeV)
#define GAUDI_API
Definition: Kernel.h:108
double mass() const
Get the particle mass.
The function object must be derived from std::unary_function< IParticlePropertySvc::value_type ...