41 std::ostream&
fillStream( std::ostream& s )
const override;
43 bool valid()
const override;
69 std::ostream& fillStream( std::ostream& s )
const override;
71 bool valid()
const override;
103 CC(
const std::string&
item );
111 std::ostream& fillStream( std::ostream& s )
const override;
126 std::ostream& fillStream( std::ostream& s )
const override;
143 std::ostream& fillStream( std::ostream& s )
const override;
160 std::ostream& fillStream( std::ostream& s )
const override;
177 std::ostream& fillStream( std::ostream& s )
const override;
193 std::ostream& fillStream( std::ostream& s )
const override;
208 std::ostream& fillStream( std::ostream& s )
const override;
223 std::ostream& fillStream( std::ostream& s )
const override;
238 std::ostream& fillStream( std::ostream& s )
const override;
253 std::ostream& fillStream( std::ostream& s )
const override;
268 std::ostream& fillStream( std::ostream& s )
const override;
283 std::ostream& fillStream( std::ostream& s )
const override;
298 std::ostream& fillStream( std::ostream& s )
const override;
313 std::ostream& fillStream( std::ostream& s )
const override;
330 std::ostream& fillStream( std::ostream& s )
const override;
347 JSpin(
const int spin );
349 JSpin* clone()
const override;
353 std::ostream& fillStream( std::ostream& s )
const override;
356 bool valid()
const override;
381 std::ostream& fillStream( std::ostream& s )
const override;
398 std::ostream& fillStream( std::ostream& s )
const override;
416 std::ostream&
fillStream( std::ostream& s )
const override;
418 bool valid()
const override;
432 template <
typename F,
typename = std::is_invocable_r<
bool, F, Gaudi::ParticleID>>
434 enum struct Classification { Accepted = +1, Rejected = -1, Unknown = 0 };
435 auto r =
m_pids.with_lock(
437 return std::binary_search( pids.accepted.begin(), pids.accepted.end(), pid ) ? Classification::Accepted
438 : std::binary_search( pids.rejected.begin(), pids.rejected.end(), pid ) ? Classification::Rejected
439 : Classification::Unknown;
443 case Classification::Accepted:
445 case Classification::Rejected:
447 case Classification::Unknown:
448 return add_( pid, std::invoke( std::forward<F>( f ), pid ) );
450 __builtin_unreachable();
499 std::ostream&
fillStream( std::ostream& s )
const override;
515 std::ostream&
fillStream( std::ostream& s )
const override;
530 std::ostream&
fillStream( std::ostream& s )
const override;
547 std::ostream&
fillStream( std::ostream& s )
const override;
565 std::ostream&
fillStream( std::ostream& s )
const override;
581 std::ostream&
fillStream( std::ostream& s )
const override;
597 std::ostream&
fillStream( std::ostream& s )
const override;
615 std::ostream&
fillStream( std::ostream& s )
const override;
617 bool valid()
const override;
637 std::ostream&
fillStream( std::ostream& s )
const override;
639 bool valid()
const override;
647 Symbol(
const std::string& sym );
654 std::ostream&
fillStream( std::ostream& s )
const override;
656 bool valid()
const override;
Helper general purpose utilities to deal with decay nodes.
the helper representation of the item in the decay chain
The generic class to hold the pointer to other node.
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")
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
CC(const Decays::Decay::Item &item)
constructor from the decay item
CC * clone() const override
MANDATORY: clone method ("virtual constructor")
bool valid() const override
MANDATORY: check the validity.
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
MsgStream & printAcceptedAsTable(MsgStream &s) const
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")
bool add_(Gaudi::ParticleID pid, bool acc) const
SmartIF< Gaudi::Interfaces::IParticlePropertySvc > Service
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")
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
The trivial node : it match any charged lepton.
Ell * clone() const override
MANDATORY: clone method ("virtual constructor")
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
The trivial node : it match any negative lepton.
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
EllMinus * clone() const override
MANDATORY: clone method ("virtual constructor")
The trivial node : it match any positive lepton.
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
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")
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Gaudi::ParticleID::Quark m_quark
the quark to be tested
HasQuark * clone() const override
MANDATORY: clone method ("virtual constructor")
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
HasQuark(Gaudi::ParticleID::Quark quark)
constructor from the quark
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 trivial node : it match the 2J+1 spin.
JSpin(const int spin)
constructor from the 2J+1
int m_spin
the j-spin to be tested
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
LSpin * clone() const override
MANDATORY: clone method ("virtual constructor")
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
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")
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.
Light(const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor from mass-range
Light * clone() const override
MANDATORY: clone method ("virtual constructor")
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.
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
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.
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Negative * clone() const override
MANDATORY: clone method ("virtual constructor")
The trivial node : it match the Neutral.
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Neutral * clone() const override
MANDATORY: clone method ("virtual constructor")
The trivial node : it match any neutral lepton.
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Nu * clone() const override
MANDATORY: clone method ("virtual constructor")
The trivial node : it match the Nucleus.
Nucleus * clone() const override
MANDATORY: clone method ("virtual constructor")
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
The simple node in the decay tree: it matches to a certain particle ID.
const Decays::Decay::Item & item() const
get DaVinci Decay item
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Pid * clone() const override
MANDATORY: clone method ("virtual constructor")
bool check(Gaudi::ParticleID pid) const
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.
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Positive * clone() const override
MANDATORY: clone method ("virtual constructor")
SSpin(const int spin)
constructor from the 2S+1
SSpin * 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.
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")
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")
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.
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....
bool isHadron() const
Return if the PID is for a hadron.
int jSpin() const
Return 2J+1, where J is the total spin, valid for all particles.
constexpr unsigned int abspid() const
Absolute value of the PDG ID.
bool isBaryon() const
Return if the PID is for a baryon.
bool isNucleus() const
Return if the PID is for a nucleus.
int lSpin() const
Return 2L+1, where L is the orbital angular momentum, valid only for mesons.
bool hasQuark(const Quark &q) const
Return if the PID is a particle containing a specified quark flavor.
bool isMeson() const
Return if the PID is for a meson.
int threeCharge() const
Return three times the charge, in units of e+, valid for all particles.
int sSpin() const
Return 2S+1, where S is the spin, valid only for mesons.
bool isLepton() const
Return if the PID is for a lepton.
A trivial class to hold information about a single particle properties.
Definition of the MsgStream class used to transmit messages.
Small smart pointer class with automatic reference counting for IInterface.
This class is used for returning status codes from appropriate routines.
bool valid(Iterator begin, Iterator end)
check the validness of the trees or nodes
StatusCode validate(Iterator begin, Iterator end, const Gaudi::Interfaces::IParticlePropertySvc *svc)
validate trees/nodes
GAUDI_API std::string printAsTable(const std::vector< const Gaudi::ParticleProperty * > &particles, const Gaudi::Interfaces::IParticlePropertySvc *service=0)
print a list of properties in a form of the table
std::vector< Gaudi::ParticleID > accepted
std::vector< Gaudi::ParticleID > rejected
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")