43  constexpr double s_LONGLIVED = s_SHORTLIVED;
 
   57  constexpr double s_INFINITY = 0.5 * std::numeric_limits<double>::max();
 
  152  return m_item.validate( svc );
 
 
  242  return s << 
" HasQuark(" << (int)
m_quark << 
") ";
 
 
  247    return s << 
" Scalar ";
 
  249    return s << 
" Spinor ";
 
  251    return s << 
" Vector ";
 
  253    return s << 
" ThreeHalf ";
 
  255    return s << 
" Tensor ";
 
  257    return s << 
" FiveHalf ";
 
  260  return s << 
" JSpin(" << 
m_spin << 
") ";
 
 
  274  return s << 
" CTau(" << 
low() << 
"," << 
high() << 
") ";
 
 
  286    if ( !
ppSvc() ) { 
return false; } 
 
  289    if ( !pp ) { 
return false; } 
 
  291    const auto ctau = pp->ctau();
 
  292    return low() <= ctau && ctau <= 
high();
 
 
  298        auto& c     = ( acc ? pids.accepted : pids.rejected );
 
  299        auto  ifind = std::lower_bound( c.begin(), c.end(), pid );
 
  300        if ( c.end() == ifind || pid < ( *ifind ) ) { c.insert( ifind, pid ); }
 
 
  310      pids.accepted.clear();
 
  311      pids.rejected.clear();
 
 
  330  return s << 
" Mass(" << 
low() << 
"," << 
high() << 
") ";
 
 
  336    if ( !
ppSvc() ) { 
return false; } 
 
  339    if ( !pp ) { 
return false; } 
 
  341    const auto mass = pp->mass();
 
  342    return low() <= mass && mass <= 
high();
 
 
  348  constexpr bool essentiallyEqual( 
double const a, 
double const b ) {
 
  365  if ( essentiallyEqual( 
high(), s_SHORTLIVED ) ) { 
return s << 
" ShortLived "; }
 
  366  return s << 
" ShortLived_( " << 
high() << 
") ";
 
 
  379  if ( essentiallyEqual( 
low(), s_LONGLIVED ) ) { 
return s << 
" LongLived "; }
 
  380  return s << 
" LongLived_( " << 
low() << 
") ";
 
 
  404    if ( !
ppSvc() ) { 
return false; } 
 
  407    if ( !pp ) { 
return false; } 
 
  409    return low() <= pp->ctau() && 0 != 
id.threeCharge();
 
 
the helper representation of the item in the decay chain
the rather simple (but powerful) node in the decay tree: it matches .AND.
the most simple node in the decay tree: it matches to all valid the Gaudi::Particles
bool operator()(const Gaudi::ParticleID &) const override
MANDATORY: the only one essential method.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
bool valid() const override
MANDATORY: check the validity.
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
Any * clone() const override
MANDATORY: clone method ("virtual constructor")
The trivial node : it match the Baryon.
Baryon * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
The simple node in the decay tree: it matches to a certain particle ID or its antiparticle.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
CC(const Decays::Decay::Item &item)
constructor from the decay item
CC * clone() const override
MANDATORY: clone method ("virtual constructor")
simple pid-checker for particle lifetime (in c*tau units)
bool valid() const override
MANDATORY: check the validity.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
double low() const
get low edge
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
double high() const
get high edge
const Gaudi::Interfaces::IParticlePropertySvc * ppSvc() const
CTau(const double low, const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=nullptr)
constructor from c-tau range
CTau * clone() const override
MANDATORY: clone method ("virtual constructor")
StatusCode setService(const Gaudi::Interfaces::IParticlePropertySvc *svc) const
bool add_(Gaudi::ParticleID pid, bool acc) const
bool classify(Gaudi::ParticleID pid, F &&f) const
Gaudi::cxx::SynchronizedValue< KnownPids > m_pids
Service m_ppSvc
the service :
The trivial node : it match the Charged.
Charged * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
The trivial node : it match any charged lepton.
Ell * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
The trivial node : it match any negative lepton.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
EllMinus * clone() const override
MANDATORY: clone method ("virtual constructor")
The trivial node : it match any positive lepton.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
EllPlus * clone() const override
MANDATORY: clone method ("virtual constructor")
The trivial node : it match the Hadron.
Hadron * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
The trivial node : it match the quark content.
Gaudi::ParticleID::Quark m_quark
the quark to be tested
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
HasQuark * clone() const override
MANDATORY: clone method ("virtual constructor")
HasQuark(Gaudi::ParticleID::Quark quark)
constructor from the quark
simple pid-checker for particle mass
Heavy(const double low, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor from mass-range
Heavy * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
the most simple node to represent the invalid node it matches to all valid the Gaudi::Particles
The trivial node : it match the 2J+1 spin.
JSpin(const int spin)
constructor from the 2J+1
bool valid() const override
valid only for positive spin-values
JSpin * clone() const override
MANDATORY: clone method ("virtual constructor")
int m_spin
the j-spin to be tested
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *) const override
MANDATORY: the proper validation of the node.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
The trivial node : it match the 2L+1 spin.
LSpin * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
LSpin(const int spin)
constructor from the 2L+1
The trivial node : it match the Lepton.
Lepton * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
simple pid-checker for particle mass
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Light(const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor from mass-range
Light * clone() const override
MANDATORY: clone method ("virtual constructor")
simple pid-checker for particle mass
Mass(const double low, const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor from mass-range
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Mass * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
The trivial node : it match the meson.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Meson * clone() const override
MANDATORY: clone method ("virtual constructor")
NegID * clone() const override
MANDATORY: clone method ("virtual constructor")
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
bool valid() const override
MANDATORY: check the validity.
bool operator()(const Gaudi::ParticleID &) const override
MANDATORY: the only one essential method.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
The trivial node : it match the negatively charged particles.
Negative * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
The trivial node : it match the Neutral.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Neutral * clone() const override
MANDATORY: clone method ("virtual constructor")
The trivial node : it match any neutral lepton.
Nu * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
The trivial node : it match the Nucleus.
Nucleus * clone() const override
MANDATORY: clone method ("virtual constructor")
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
the rather simple (but powerful) node in the decay tree: it matches .OR.
The simple node in the decay tree: it matches to a certain particle ID.
const Decays::Decay::Item & item() const
get DaVinci Decay item
Pid * clone() const override
MANDATORY: clone method ("virtual constructor")
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
bool valid() const override
MANDATORY: check the validity.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Pid(const Decays::Decay::Item &item)
constructor from the decay item
Decays::Decay::Item m_item
the decay item itself
bool valid() const override
MANDATORY: check the validity.
PosID * clone() const override
MANDATORY: clone method ("virtual constructor")
bool operator()(const Gaudi::ParticleID &) const override
MANDATORY: the only one essential method.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
The trivial node : it match the positively charged particles.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Positive * clone() const override
MANDATORY: clone method ("virtual constructor")
The trivial node : it match the 2S+1 spin.
SSpin(const int spin)
constructor from the 2S+1
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
SSpin * clone() const override
MANDATORY: clone method ("virtual constructor")
represent simple predicate for short-lived particles
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
ShortLived_(const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor with high edge and service
ShortLived_ * clone() const override
MANDATORY: clone method ("virtual constructor")
represent simple predicate for Stable+Charged particles
StableCharged(const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor service
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.
StableCharged * clone() const override
MANDATORY: clone method ("virtual constructor")
represent simple predicate for Stable particles
Stable * clone() const override
MANDATORY: clone method ("virtual constructor")
Stable(const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor service
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Decays::Node m_symbol
the actual symbol
bool valid() const override
MANDATORY: check the validity.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Symbol * clone() const override
MANDATORY: clone method ("virtual constructor")
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
Symbol(const std::string &sym)
the constructor from the symbol
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Helper class to obtain the information about the valid symbols for particles, decay descriptors and N...
static Symbols & instance()
static accessor to teh singleton
const std::string & symbol(std::string sym) const
help for the basic primitive special symbol
The abstract class which represents the single "node" of decay tree.
The abstract interface to Particle Property Service.
Holds PDG + LHCb extension particle code, following the PDG particle numbering scheme (pdg....
int pid() const
Retrieve the PDG ID.
A trivial class to hold information about a single particle properties.
This class is used for returning status codes from appropriate routines.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
bool valid(Iterator begin, Iterator end)
check the validness of the trees or nodes
Decays::Nodes::And operator&&(const Decays::iNode &o1, const Decays::iNode &o2)
Create the "AND" of two nodes.
Decays::Nodes::Or operator||(const Decays::iNode &o1, const Decays::iNode &o2)
Create the "OR" of two nodes.
constexpr double micrometer
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Gaudi::ParticleID abs(const Gaudi::ParticleID &p)
Return the absolute value for a PID.
represent simple predicate for Long-lived particles
LongLived_(const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor with high edge and service
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
LongLived_ * clone() const override
MANDATORY: clone method ("virtual constructor")