The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::Interfaces::IParticlePropertySvc Class Referenceabstract

The abstract interface to Particle Property Service. More...

#include </builds/gaudi/Gaudi/GaudiPartProp/include/Gaudi/Interfaces/IParticlePropertySvc.h>

Inheritance diagram for Gaudi::Interfaces::IParticlePropertySvc:
Collaboration diagram for Gaudi::Interfaces::IParticlePropertySvc:

Public Types

typedef std::vector< const Gaudi::ParticleProperty * > ParticleProperties
 the actual type of (ordered) container of particle properties
typedef ParticleProperties::const_iterator iterator
 the actual type of iterator over the (ordered) container of properties
Public Types inherited from extend_interfaces< IInterface >
using ext_iids
 take union of the ext_iids of all Interfaces...

Public Member Functions

 DeclareInterfaceID (Gaudi::Interfaces::IParticlePropertySvc, 2, 0)
virtual iterator begin () const =0
 get the begin-iterator for the container of particle properties It is assumed that the container is properly ordered
virtual iterator end () const =0
 get the end-iterator for the container of particle properties It is assumed that the container is properly ordered
virtual size_t size () const =0
 get the container size.
virtual const ParticleProperty * find (const std::string &name) const =0
 Retrieve an object by name:
virtual const ParticleProperty * find (const Gaudi::ParticleID &pid) const =0
 Retrieve an object by Gaudi::ParticleID:
template<class PREDICATE, class OUTPUT>
OUTPUT get (const PREDICATE &cut, OUTPUT output) const
 get the properties according to some criteria
virtual std::string cc (const std::string &decay) const =0
 make the charge conjugation for the string/decay descriptor

Detailed Description

The abstract interface to Particle Property Service.

Author
Iain Last
G.Corti
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl

Definition at line 29 of file IParticlePropertySvc.h.

Member Typedef Documentation

◆ iterator

typedef ParticleProperties::const_iterator Gaudi::Interfaces::IParticlePropertySvc::iterator

the actual type of iterator over the (ordered) container of properties

Definition at line 36 of file IParticlePropertySvc.h.

◆ ParticleProperties

the actual type of (ordered) container of particle properties

Definition at line 34 of file IParticlePropertySvc.h.

Member Function Documentation

◆ begin()

virtual iterator Gaudi::Interfaces::IParticlePropertySvc::begin ( ) const
pure virtual

get the begin-iterator for the container of particle properties It is assumed that the container is properly ordered

Returns
begin-iterator for the container of particle properties

◆ cc()

virtual std::string Gaudi::Interfaces::IParticlePropertySvc::cc ( const std::string & decay) const
pure virtual

make the charge conjugation for the string/decay descriptor

std::string decay = "B0 -> pi+ pi-" ;
Gaudi::IParticlePropertySvc* svc = ... ;
std::string cc = svc -> cc ( decay ) ;
virtual std::string cc(const std::string &decay) const =0
make the charge conjugation for the string/decay descriptor
Parameters
decaythe decay descriptor
Returns
the charge conjugation for the decay descriptor

◆ DeclareInterfaceID()

Gaudi::Interfaces::IParticlePropertySvc::DeclareInterfaceID ( Gaudi::Interfaces::IParticlePropertySvc ,
2 ,
0  )

◆ end()

virtual iterator Gaudi::Interfaces::IParticlePropertySvc::end ( ) const
pure virtual

get the end-iterator for the container of particle properties It is assumed that the container is properly ordered

Returns
end-iterator for the container of particle properties

◆ find() [1/2]

virtual const ParticleProperty * Gaudi::Interfaces::IParticlePropertySvc::find ( const Gaudi::ParticleID & pid) const
pure virtual

Retrieve an object by Gaudi::ParticleID:

const Gaudi::ParticleID& pid = ... ;
const Gaudi::ParticleProperty* pp = svc -> find ( pid ) ;
The abstract interface to Particle Property Service.
virtual const ParticleProperty * find(const std::string &name) const =0
Retrieve an object by name:
Holds PDG + LHCb extension particle code, following the PDG particle numbering scheme (pdg....
Definition ParticleID.h:43
A trivial class to hold information about a single particle properties.
Parameters
pidthe particle's Gaudi::ParticleID
Returns
pointer to particle property object

◆ find() [2/2]

virtual const ParticleProperty * Gaudi::Interfaces::IParticlePropertySvc::find ( const std::string & name) const
pure virtual

Retrieve an object by name:

const std::string& name = ... ;
const Gaudi::ParticleProperty* pp = svc -> find ( name ) ;
Parameters
namethe particle name
Returns
pointer to particle property object

◆ get()

template<class PREDICATE, class OUTPUT>
OUTPUT Gaudi::Interfaces::IParticlePropertySvc::get ( const PREDICATE & cut,
OUTPUT output ) const

get the properties according to some criteria

e.g. get all leptons:

#include "boost/lambda/lambda.hpp"
#include "boost/lambda/bind.hpp"
...
using namespace boost::lambda ;
...
// create the output vector:
Vector leptons ;
// use the service
svc -> get
std::back_inserter ( lepton ) ) ; // output
OUTPUT get(const PREDICATE &cut, OUTPUT output) const
get the properties according to some criteria
std::vector< const Gaudi::ParticleProperty * > ParticleProperties
the actual type of (ordered) container of particle properties
bool isLepton() const
Return if the PID is for a lepton.
const Gaudi::ParticleID & particleID() const
get the particle ID

Essentially it is just std::copy_if STL-algorithm

Parameters
cutthe predicate
outputthe output iterator
Returns
the updated position of output iterator

Definition at line 492 of file IParticlePropertySvc.h.

492 {
493 iterator first = this->begin();
494 iterator last = this->end();
495 return Gaudi::ParticleProperties::get( first, last, cut, output );
496 }
virtual iterator begin() const =0
get the begin-iterator for the container of particle properties It is assumed that the container is p...
virtual iterator end() const =0
get the end-iterator for the container of particle properties It is assumed that the container is pro...
ParticleProperties::const_iterator iterator
the actual type of iterator over the (ordered) container of properties
OUTPUT get(INPUT first, INPUT last, const PREDICATE &cut, OUTPUT output)
get all particle properties which satisfy the certain criteria

◆ size()

virtual size_t Gaudi::Interfaces::IParticlePropertySvc::size ( ) const
pure virtual

get the container size.


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