#include <GaudiKernel/FindByMassRange.h>
Public Member Functions | |
FindByMassRange (double low, double high) | |
Constructor - sets the mass range in Gev. | |
bool | operator() (const ParticleProperty *pp) const |
This routine check to see if the mass of a particle lies within the given mass range and returns true if it does. | |
Private Attributes | |
double | m_low |
Low and high mass range (GeV). | |
double | m_high |
In this case it corresponds to pair< std::string, ParticleProperty* > as the ParticlePropertySvc stores all its data in a map. The string will be the map's key (usually the particle name) and the pointer is a pointer to the ParticleProperty object. The bool template argument states that operator() returns true or false.
The data is accessed in the following manner: const IParticlePropertySvc::value_type& pp_ref; std::string key = pp_ref.first; ParticleProperty* pp = pp_ref.second;
Definition at line 31 of file FindByMassRange.h.
FindByMassRange::FindByMassRange | ( | double | low, | |
double | high | |||
) | [inline] |
bool FindByMassRange::operator() | ( | const ParticleProperty * | pp | ) | const [inline] |
This routine check to see if the mass of a particle lies within the given mass range and returns true if it does.
Definition at line 41 of file FindByMassRange.h.
00041 { 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 }
double FindByMassRange::m_low [private] |
double FindByMassRange::m_high [private] |
Definition at line 55 of file FindByMassRange.h.