The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::Decays::Nodes::Mass Class Reference

simple pid-checker for particle mass More...

#include </builds/gaudi/Gaudi/GaudiPartProp/include/Gaudi/Decays/NodesPIDs.h>

Inheritance diagram for Gaudi::Decays::Nodes::Mass:
Collaboration diagram for Gaudi::Decays::Nodes::Mass:

Public Member Functions

 Mass (const double low, const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
 constructor from mass-range
Mass * clone () const override
 MANDATORY: clone method ("virtual constructor").
bool operator() (const Gaudi::ParticleID &pid) const override
 MANDATORY: the only one essential method.
std::ostream & fillStream (std::ostream &s) const override
 MANDATORY: the specific printout.
Public Member Functions inherited from Gaudi::Decays::Nodes::CTau
 CTau (const double low, const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=nullptr)
 constructor from c-tau range
bool valid () const override
 MANDATORY: check the validity.
StatusCode validate (const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
 MANDATORY: the proper validation of the node.
const Gaudi::Interfaces::IParticlePropertySvc * ppSvc () const
double low () const
 get low edge
double high () const
 get high edge
StatusCode setService (const Gaudi::Interfaces::IParticlePropertySvc *svc) const
MsgStream & printAcceptedAsTable (MsgStream &s) const
Public Member Functions inherited from Gaudi::Decays::iNode
virtual bool operator! () const
 invalid node?
virtual std::string toString () const
 the string representation of the node
virtual ~iNode ()=default
 virtual destructor

Additional Inherited Members

Protected Member Functions inherited from Gaudi::Decays::Nodes::CTau
template<typename F, typename = std::is_invocable_r<bool, F, Gaudi::ParticleID>>
bool classify (Gaudi::ParticleID pid, F &&f) const

Detailed Description

simple pid-checker for particle mass

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-05-11

Definition at line 555 of file NodesPIDs.h.

Constructor & Destructor Documentation

◆ Mass()

Gaudi::Decays::Nodes::Mass::Mass ( const double low,
const double high,
const Gaudi::Interfaces::IParticlePropertySvc * svc = 0 )

constructor from mass-range

Definition at line 324 of file NodePIDs.cpp.

325 : Decays::Nodes::CTau( low, high, svc ) {}
double low() const
get low edge
Definition NodesPIDs.h:425
double high() const
get high edge
Definition NodesPIDs.h:427

Member Function Documentation

◆ clone()

Decays::Nodes::Mass * Gaudi::Decays::Nodes::Mass::clone ( ) const
overridevirtual

MANDATORY: clone method ("virtual constructor").

Reimplemented from Gaudi::Decays::Nodes::CTau.

Definition at line 327 of file NodePIDs.cpp.

327{ return new Mass( *this ); }
Mass(const double low, const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor from mass-range
Definition NodePIDs.cpp:324

◆ fillStream()

std::ostream & Gaudi::Decays::Nodes::Mass::fillStream ( std::ostream & s) const
overridevirtual

MANDATORY: the specific printout.

Reimplemented from Gaudi::Decays::Nodes::CTau.

Definition at line 329 of file NodePIDs.cpp.

329 {
330 return s << " Mass(" << low() << "," << high() << ") ";
331}

◆ operator()()

bool Gaudi::Decays::Nodes::Mass::operator() ( const Gaudi::ParticleID & pid) const
overridevirtual

MANDATORY: the only one essential method.

Reimplemented from Gaudi::Decays::Nodes::CTau.

Definition at line 333 of file NodePIDs.cpp.

333 {
334 return classify( pid, [&]( Gaudi::ParticleID pid ) {
335 // invalid node
336 if ( !ppSvc() ) { return false; } // REJECT for invaild service
337 // use the service
338 const Gaudi::ParticleProperty* pp = ppSvc()->find( pid );
339 if ( !pp ) { return false; } // REJECT for invalid particle
340 // final decision: check mass range
341 const auto mass = pp->mass();
342 return low() <= mass && mass <= high();
343 } );
344}
const Gaudi::Interfaces::IParticlePropertySvc * ppSvc() const
Definition NodesPIDs.h:422
bool classify(Gaudi::ParticleID pid, F &&f) const
Definition NodesPIDs.h:433
virtual const ParticleProperty * find(const std::string &name) const =0
Retrieve an object by name:

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