Gaudi Framework, version v23r6

Home   Generated: Wed Jan 30 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
FindByMassRange Class Reference

The function object must be derived from std::unary_function< IParticlePropertySvc::value_type ,bool > IParticlePropertySvc::value_type is a typedef that defines the internal service storage type that is returned when an iterator is dereferenced. More...

#include <GaudiKernel/FindByMassRange.h>

Inheritance diagram for FindByMassRange:
Inheritance graph
[legend]
Collaboration diagram for FindByMassRange:
Collaboration graph
[legend]

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
 

Additional Inherited Members

- Public Types inherited from std::unary_function< _Arg, _Result >
typedef _Arg argument_type
 
typedef _Result result_type
 

Detailed Description

The function object must be derived from std::unary_function< IParticlePropertySvc::value_type ,bool > IParticlePropertySvc::value_type is a typedef that defines the internal service storage type that is returned when an iterator is dereferenced.

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;

Author
Ian Last

Definition at line 31 of file FindByMassRange.h.

Constructor & Destructor Documentation

FindByMassRange::FindByMassRange ( double  low,
double  high 
)
inline

Constructor - sets the mass range in Gev.

Definition at line 36 of file FindByMassRange.h.

: m_low( low ), m_high( high ) { }

Member Function Documentation

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.

{
bool in_range = false;
if ( pp ) {
if ( pp->mass() >= m_low && pp->mass() <= m_high ) {
in_range = true;
}
}
return in_range;
}

Member Data Documentation

double FindByMassRange::m_high
private

Definition at line 55 of file FindByMassRange.h.

double FindByMassRange::m_low
private

Low and high mass range (GeV)

Definition at line 54 of file FindByMassRange.h.


The documentation for this class was generated from the following file:

Generated at Wed Jan 30 2013 17:13:45 for Gaudi Framework, version v23r6 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004