FindByMassRange.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_FINDBYMASSRANGE_H
2 #define GAUDIKERNEL_FINDBYMASSRANGE_H
3 
4 
5 // Include files
8 
9 
30 class GAUDI_API FindByMassRange: public std::unary_function< ParticleProperty* ,bool > {
31 
32 public:
33 
35  FindByMassRange( double low, double high ) : m_low( low ), m_high( high ) { }
36 
40  bool operator() ( const ParticleProperty* pp ) const {
41  return pp && pp->mass() >= m_low && pp->mass() <= m_high;
42  }
43 
44 private:
45 
47  double m_low;
48  double m_high;
49 };
50 
51 #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:107
double mass() const
Get the particle mass.
The function object must be derived from std::unary_function< IParticlePropertySvc::value_type ...