The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
NodePIDs.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
14#include <Gaudi/ParticleID.h>
16#include <GaudiKernel/SmartIF.h>
18#include <algorithm>
19#include <climits>
20#include <functional>
21
22namespace Decays = Gaudi::Decays;
23
29namespace {
36 constexpr double s_SHORTLIVED = 0.1 * Gaudi::Units::micrometer;
43 constexpr double s_LONGLIVED = s_SHORTLIVED;
50 constexpr double s_STABLE = 1 * Gaudi::Units::meter;
57 constexpr double s_INFINITY = 0.5 * std::numeric_limits<double>::max();
58} // namespace
59namespace Gaudi::Decays {
60 /* Create the "OR" of two nodes
61 * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
62 * @date 2008-04-12
63 */
64 Decays::Nodes::Or operator||( const Decays::iNode& o1, const std::string& o2 ) {
65 return o1 || Decays::Nodes::Pid( o2 );
66 }
68 return o1 || Decays::Nodes::Pid( o2 );
69 }
71 return o1 || Decays::Nodes::Pid( o2 );
72 }
74 return o1 || Decays::Nodes::Pid( o2 );
75 }
76 Decays::Nodes::Or operator||( const std::string& o2, const Decays::iNode& o1 ) {
77 return Decays::Nodes::Pid( o2 ) || o1;
78 }
80 return Decays::Nodes::Pid( o2 ) || o1;
81 }
83 return Decays::Nodes::Pid( o2 ) || o1;
84 }
86 return Decays::Nodes::Pid( o2 ) || o1;
87 }
88 /* Create the "AND" of two nodes
89 * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
90 * @date 2008-04-12
91 */
92 Decays::Nodes::And operator&&( const Decays::iNode& o1, const std::string& o2 ) {
93 return o1 && Decays::Nodes::Pid( o2 );
94 }
96 return o1 && Decays::Nodes::Pid( o2 );
97 }
99 return o1 && Decays::Nodes::Pid( o2 );
100 }
102 return o1 && Decays::Nodes::Pid( o2 );
103 }
104 Decays::Nodes::And operator&&( const std::string& o2, const Decays::iNode& o1 ) {
105 return Decays::Nodes::Pid( o2 ) && o1;
106 }
108 return Decays::Nodes::Pid( o2 ) && o1;
109 }
111 return Decays::Nodes::Pid( o2 ) && o1;
112 }
114 return Decays::Nodes::Pid( o2 ) && o1;
115 }
116} // namespace Gaudi::Decays
117// MANDATORY: clone method ("virtual constructor")
118Decays::Nodes::Any* Decays::Nodes::Any::clone() const { return new Any( *this ); }
119// MANDATORY: check the validity
120bool Decays::Nodes::Any::valid() const { return true; }
121// MANDATORY: the proper validation of the node
125// MANDATORY: the only one essential method
126bool Decays::Nodes::Any::operator()( const Gaudi::ParticleID& /* p */ ) const { return true; }
127
128// MANDATORY: clone method ("virtual constructor")
129Decays::Nodes::Pid* Decays::Nodes::Pid::clone() const { return new Pid( *this ); }
130// MANDATORY: clone method ("virtual constructor")
131Decays::Nodes::CC* Decays::Nodes::CC::clone() const { return new CC( *this ); }
132
133// xSpin: valid only for reasonable spin
134bool Decays::Nodes::JSpin::valid() const { return 0 < spin(); }
135// MANDATORY: the proper validation of the node
139
140// constructor from the decay item
142// constructor from Particle Property
144// constructor from ParticleID
146// constructor from Particle name
147Decays::Nodes::Pid::Pid( const std::string& item ) : Decays::iNode(), m_item( item ) {}
148// MANDATORY: check the validity
149bool Decays::Nodes::Pid::valid() const { return 0 != m_item.pp(); }
150// MANDATORY: the proper validation of the node
152 return m_item.validate( svc );
153}
154
155// constructor from the decay item
157// constructor from Particle Property
159// constructor from ParticleID
161// constructor from Particle name
162Decays::Nodes::CC::CC( const std::string& item ) : Decays::Nodes::Pid( item ) {}
163// constructor from Pid
165
166// MANDATORY: clone method ("virtual constructor")
168// MANDATORY: clone method ("virtual constructor")
170// MANDATORY: clone method ("virtual constructor")
171Decays::Nodes::Nu* Decays::Nodes::Nu::clone() const { return new Nu( *this ); }
172// MANDATORY: clone method ("virtual constructor")
173Decays::Nodes::Ell* Decays::Nodes::Ell::clone() const { return new Ell( *this ); }
174// MANDATORY: clone method ("virtual constructor")
176// MANDATORY: clone method ("virtual constructor")
178// MANDATORY: clone method ("virtual constructor")
180// MANDATORY: clone method ("virtual constructor")
182// MANDATORY: clone method ("virtual constructor")
184// MANDATORY: clone method ("virtual constructor")
186// MANDATORY: clone method ("virtual constructor")
188// MANDATORY: clone method ("virtual constructor")
190// MANDATORY: clone method ("virtual constructor")
192// MANDATORY: clone method ("virtual constructor")
194// MANDATORY: clone method ("virtual constructor")
196// MANDATORY: clone method ("virtual constructor")
198// MANDATORY: clone method ("virtual constructor")
200
201// constructor from the quark
203// constructor from the 2J+1
205// constructor from the 2S+1
207// constructor from the 2L+1
209
210std::ostream& Decays::Nodes::Any::fillStream( std::ostream& s ) const { return s << " X "; }
211std::ostream& Decays::Nodes::Pid::fillStream( std::ostream& s ) const { return s << " " << m_item.name() << " "; }
212std::ostream& Decays::Nodes::CC::fillStream( std::ostream& s ) const { return s << " [" << item().name() << "]cc "; }
213std::ostream& Decays::Nodes::Meson::fillStream( std::ostream& s ) const { return s << " Meson "; }
214std::ostream& Decays::Nodes::Hadron::fillStream( std::ostream& s ) const { return s << " Hadron "; }
215std::ostream& Decays::Nodes::Baryon::fillStream( std::ostream& s ) const { return s << " Baryon "; }
216std::ostream& Decays::Nodes::Lepton::fillStream( std::ostream& s ) const { return s << " Lepton "; }
217std::ostream& Decays::Nodes::Neutral::fillStream( std::ostream& s ) const { return s << " X0 "; }
218std::ostream& Decays::Nodes::Charged::fillStream( std::ostream& s ) const { return s << " Xq "; }
219std::ostream& Decays::Nodes::Positive::fillStream( std::ostream& s ) const { return s << " X+ "; }
220std::ostream& Decays::Nodes::Negative::fillStream( std::ostream& s ) const { return s << " X- "; }
221std::ostream& Decays::Nodes::Nu::fillStream( std::ostream& s ) const { return s << " Nu "; }
222std::ostream& Decays::Nodes::Ell::fillStream( std::ostream& s ) const { return s << " l "; }
223std::ostream& Decays::Nodes::EllPlus::fillStream( std::ostream& s ) const { return s << " l+ "; }
224std::ostream& Decays::Nodes::EllMinus::fillStream( std::ostream& s ) const { return s << " l- "; }
225std::ostream& Decays::Nodes::Nucleus::fillStream( std::ostream& s ) const { return s << " Nucleus "; }
226std::ostream& Decays::Nodes::HasQuark::fillStream( std::ostream& s ) const {
227 switch ( m_quark ) {
229 return s << " Xd ";
231 return s << " Xu ";
233 return s << " Xs ";
235 return s << " Xc ";
237 return s << " Xb ";
239 return s << " Xt ";
240 default:;
241 }
242 return s << " HasQuark(" << (int)m_quark << ") ";
243}
244std::ostream& Decays::Nodes::JSpin::fillStream( std::ostream& s ) const {
245 switch ( spin() ) {
246 case 1:
247 return s << " Scalar ";
248 case 2:
249 return s << " Spinor ";
250 case 3:
251 return s << " Vector ";
252 case 4:
253 return s << " ThreeHalf ";
254 case 5:
255 return s << " Tensor ";
256 case 6:
257 return s << " FiveHalf ";
258 default:;
259 }
260 return s << " JSpin(" << m_spin << ") ";
261}
262std::ostream& Decays::Nodes::SSpin::fillStream( std::ostream& s ) const { return s << " SSpin(" << spin() << ") "; }
263std::ostream& Decays::Nodes::LSpin::fillStream( std::ostream& s ) const { return s << " LSpin(" << spin() << ") "; }
264
265// constructor from c-tau range & Service
267 : m_low( low ), m_high( high ) {
268 if ( svc ) { m_ppSvc = const_cast<Gaudi::Interfaces::IParticlePropertySvc*>( svc ); }
269}
270// MANDATORY: clone method ("virtual constructor")
271Decays::Nodes::CTau* Decays::Nodes::CTau::clone() const { return new CTau( *this ); }
272// MANDATORY: the specific printout
273std::ostream& Decays::Nodes::CTau::fillStream( std::ostream& s ) const {
274 return s << " CTau(" << low() << "," << high() << ") ";
275}
276// MANDATORY: check the validity
277bool Decays::Nodes::CTau::valid() const { return m_ppSvc.isValid(); }
278// MANDATORY: the proper validation of the node
282// MANDATORY: the only one essential method
284 return classify( pid, [&]( Gaudi::ParticleID id ) {
285 // invalid node
286 if ( !ppSvc() ) { return false; } // REJECT for invalid service
287 // use the service
288 const Gaudi::ParticleProperty* pp = ppSvc()->find( id );
289 if ( !pp ) { return false; } // REJECT for invalid dparticle
290 // final decision: check ctau range
291 const auto ctau = pp->ctau();
292 return low() <= ctau && ctau <= high();
293 } );
294}
295bool Decays::Nodes::CTau::add_( Gaudi::ParticleID pid, bool acc ) const {
296 return m_pids.with_lock(
297 []( KnownPids& pids, Gaudi::ParticleID pid, bool acc ) {
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 ); }
301 return acc;
302 },
303 pid, acc );
304}
305// MANDATORY: the proper validation of the node
307 // if service is substituted, clear the cache
308 if ( m_ppSvc != svc ) {
309 m_pids.with_lock( []( KnownPids& pids ) {
310 pids.accepted.clear();
311 pids.rejected.clear();
312 } );
313 }
314 //
315 if ( svc ) {
317 } else {
318 m_ppSvc = nullptr;
319 }
320 //
322}
323// constructor from c-tau range & Service
325 : Decays::Nodes::CTau( low, high, svc ) {}
326// MANDATORY: clone method ("virtual constructor")
327Decays::Nodes::Mass* Decays::Nodes::Mass::clone() const { return new Mass( *this ); }
328// MANDATORY: the specific printout
329std::ostream& Decays::Nodes::Mass::fillStream( std::ostream& s ) const {
330 return s << " Mass(" << low() << "," << high() << ") ";
331}
332// MANDATORY: the only one essential method
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}
345
346namespace {
347 // idea coming from The art of computer programming by Knuth
348 constexpr bool essentiallyEqual( double const a, double const b ) {
349 return std::abs( a - b ) <= std::min( std::abs( a ), std::abs( b ) ) * std::numeric_limits<double>::epsilon();
350 }
351} // namespace
352
353// constructor with high edge and service
356// constructor with high edge and service
359// MANDATORY: clone method ("virtual constructor")
363// MANDATORY: the specific printout
364std::ostream& Decays::Nodes::ShortLived_::fillStream( std::ostream& s ) const {
365 if ( essentiallyEqual( high(), s_SHORTLIVED ) ) { return s << " ShortLived "; }
366 return s << " ShortLived_( " << high() << ") ";
367}
368
369// constructor with high edge and service
372// constructor with high edge and service
375// MANDATORY: clone method ("virtual constructor")
377// MANDATORY: the specific printout
378std::ostream& Decays::Nodes::LongLived_::fillStream( std::ostream& s ) const {
379 if ( essentiallyEqual( low(), s_LONGLIVED ) ) { return s << " LongLived "; }
380 return s << " LongLived_( " << low() << ") ";
381}
382
383// constructor with the service
386// MANDATORY: clone method ("virtual constructor")
388// MANDATORY: the specific printout
389std::ostream& Decays::Nodes::Stable::fillStream( std::ostream& s ) const { return s << " Stable "; }
390
391// constructor with the service
394// MANDATORY: clone method ("virtual constructor")
398// MANDATORY: the specific printout
399std::ostream& Decays::Nodes::StableCharged::fillStream( std::ostream& s ) const { return s << " StableCharged "; }
400// MANDATORY: the only one essential method
402 return classify( pid, [&]( Gaudi::ParticleID id ) {
403 // invalid node
404 if ( !ppSvc() ) { return false; } // REJECT for invalid service
405 // use the service
406 const Gaudi::ParticleProperty* pp = ppSvc()->find( id );
407 if ( !pp ) { return false; } // REJECT for invalid dparticle
408 // final decision: check ctau range
409 return low() <= pp->ctau() && 0 != id.threeCharge();
410 } );
411}
412
413// constructor with high edge and service
416// MANDATORY: clone method ("virtual constructor")
418// MANDATORY: the specific printout
419std::ostream& Decays::Nodes::Light::fillStream( std::ostream& s ) const { return s << " Light( " << high() << ") "; }
420
421// constructor with high edge and service
423 : Decays::Nodes::Mass( low, s_INFINITY, svc ) {}
424// MANDATORY: clone method ("virtual constructor")
426// MANDATORY: the specific printout
427std::ostream& Decays::Nodes::Heavy::fillStream( std::ostream& s ) const { return s << " Heavy( " << high() << ") "; }
428
429// MANDATORY: clone method ("virtual constructor")
431// MANDATORY: check the validity
432bool Decays::Nodes::PosID::valid() const { return true; }
433// MANDATORY: the proper validation of the node
437// MANDATORY: the only one essential method
438bool Decays::Nodes::PosID::operator()( const Gaudi::ParticleID& p ) const { return 0 < p.pid(); }
439// MANDATORY: the specific printout
440std::ostream& Decays::Nodes::PosID::fillStream( std::ostream& s ) const { return s << " ID+ "; }
441
442// MANDATORY: clone method ("virtual constructor")
444// MANDATORY: check the validity
445bool Decays::Nodes::NegID::valid() const { return true; }
446// MANDATORY: the proper validation of the node
450// MANDATORY: the only one essential method
451bool Decays::Nodes::NegID::operator()( const Gaudi::ParticleID& p ) const { return 0 > p.pid(); }
452// MANDATORY: the specific printout
453std::ostream& Decays::Nodes::NegID::fillStream( std::ostream& s ) const { return s << " ID- "; }
454
455// constructor from the symbol
458 StatusCode sc = sym.symbol( s, m_symbol );
459 sc.ignore();
460}
461// MANDATORY: clone method ("virtual constructor")
463// MANDATORY: the only one essential method
464bool Decays::Nodes::Symbol::operator()( const Gaudi::ParticleID& pid ) const { return m_symbol.node( pid ); }
465// MANDATORY: the specific printout
466std::ostream& Decays::Nodes::Symbol::fillStream( std::ostream& s ) const { return s << m_symbol.node(); }
467// MANDATORY: check the validity
468bool Decays::Nodes::Symbol::valid() const { return m_symbol.valid(); }
469// MANDATORY: validate
the helper representation of the item in the decay chain
Definition Decay.h:39
the rather simple (but powerful) node in the decay tree: it matches .AND.
Definition Nodes.h:270
the most simple node in the decay tree: it matches to all valid the Gaudi::Particles
Definition NodesPIDs.h:34
bool operator()(const Gaudi::ParticleID &) const override
MANDATORY: the only one essential method.
Definition NodePIDs.cpp:126
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:210
bool valid() const override
MANDATORY: check the validity.
Definition NodePIDs.cpp:120
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
Definition NodePIDs.cpp:122
Any * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:118
The trivial node : it match the Baryon.
Definition NodesPIDs.h:231
Baryon * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:179
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:215
The simple node in the decay tree: it matches to a certain particle ID or its antiparticle.
Definition NodesPIDs.h:94
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:212
CC(const Decays::Decay::Item &item)
constructor from the decay item
Definition NodePIDs.cpp:156
CC * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:131
simple pid-checker for particle lifetime (in c*tau units)
Definition NodesPIDs.h:406
bool valid() const override
MANDATORY: check the validity.
Definition NodePIDs.cpp:277
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:273
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
Definition NodePIDs.cpp:279
double low() const
get low edge
Definition NodesPIDs.h:425
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodePIDs.cpp:283
double high() const
get high edge
Definition NodesPIDs.h:427
const Gaudi::Interfaces::IParticlePropertySvc * ppSvc() const
Definition NodesPIDs.h:422
CTau(const double low, const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=nullptr)
constructor from c-tau range
Definition NodePIDs.cpp:266
CTau * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:271
double m_high
high edge
Definition NodesPIDs.h:482
StatusCode setService(const Gaudi::Interfaces::IParticlePropertySvc *svc) const
Definition NodePIDs.cpp:306
bool add_(Gaudi::ParticleID pid, bool acc) const
Definition NodePIDs.cpp:295
bool classify(Gaudi::ParticleID pid, F &&f) const
Definition NodesPIDs.h:433
Gaudi::cxx::SynchronizedValue< KnownPids > m_pids
Definition NodesPIDs.h:477
Service m_ppSvc
the service :
Definition NodesPIDs.h:468
The trivial node : it match the Charged.
Definition NodesPIDs.h:246
Charged * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:183
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:218
The trivial node : it match any charged lepton.
Definition NodesPIDs.h:151
Ell * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:173
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:222
The trivial node : it match any negative lepton.
Definition NodesPIDs.h:184
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:224
EllMinus * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:177
The trivial node : it match any positive lepton.
Definition NodesPIDs.h:168
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:223
EllPlus * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:175
The trivial node : it match the Hadron.
Definition NodesPIDs.h:201
Hadron * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:181
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:214
The trivial node : it match the quark content.
Definition NodesPIDs.h:321
Gaudi::ParticleID::Quark m_quark
the quark to be tested
Definition NodesPIDs.h:334
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:226
HasQuark * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:193
HasQuark(Gaudi::ParticleID::Quark quark)
constructor from the quark
Definition NodePIDs.cpp:202
simple pid-checker for particle mass
Definition NodesPIDs.h:589
Heavy(const double low, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor from mass-range
Definition NodePIDs.cpp:422
Heavy * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:425
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:427
the most simple node to represent the invalid node it matches to all valid the Gaudi::Particles
Definition Nodes.h:74
The trivial node : it match the 2J+1 spin.
Definition NodesPIDs.h:342
JSpin(const int spin)
constructor from the 2J+1
Definition NodePIDs.cpp:204
bool valid() const override
valid only for positive spin-values
Definition NodePIDs.cpp:134
JSpin * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:195
int m_spin
the j-spin to be tested
Definition NodesPIDs.h:364
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *) const override
MANDATORY: the proper validation of the node.
Definition NodePIDs.cpp:136
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:244
The trivial node : it match the 2L+1 spin.
Definition NodesPIDs.h:389
LSpin * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:199
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:263
LSpin(const int spin)
constructor from the 2L+1
Definition NodePIDs.cpp:208
The trivial node : it match the Lepton.
Definition NodesPIDs.h:119
Lepton * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:169
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:216
simple pid-checker for particle mass
Definition NodesPIDs.h:573
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:419
Light(const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor from mass-range
Definition NodePIDs.cpp:414
Light * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:417
simple pid-checker for particle mass
Definition NodesPIDs.h:555
Mass(const double low, const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor from mass-range
Definition NodePIDs.cpp:324
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodePIDs.cpp:333
Mass * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:327
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:329
The trivial node : it match the meson.
Definition NodesPIDs.h:216
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:213
Meson * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:167
NegID * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:443
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
Definition NodePIDs.cpp:447
bool valid() const override
MANDATORY: check the validity.
Definition NodePIDs.cpp:445
bool operator()(const Gaudi::ParticleID &) const override
MANDATORY: the only one essential method.
Definition NodePIDs.cpp:451
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:453
The trivial node : it match the negatively charged particles.
Definition NodesPIDs.h:276
Negative * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:187
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:220
The trivial node : it match the Neutral.
Definition NodesPIDs.h:291
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:217
Neutral * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:189
The trivial node : it match any neutral lepton.
Definition NodesPIDs.h:134
Nu * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:171
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:221
The trivial node : it match the Nucleus.
Definition NodesPIDs.h:306
Nucleus * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:191
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:225
the rather simple (but powerful) node in the decay tree: it matches .OR.
Definition Nodes.h:227
The simple node in the decay tree: it matches to a certain particle ID.
Definition NodesPIDs.h:54
const Decays::Decay::Item & item() const
get DaVinci Decay item
Definition NodesPIDs.h:79
Pid * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:129
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
Definition NodePIDs.cpp:151
bool valid() const override
MANDATORY: check the validity.
Definition NodePIDs.cpp:149
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:211
Pid(const Decays::Decay::Item &item)
constructor from the decay item
Definition NodePIDs.cpp:141
Decays::Decay::Item m_item
the decay item itself
Definition NodesPIDs.h:85
bool valid() const override
MANDATORY: check the validity.
Definition NodePIDs.cpp:432
PosID * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:430
bool operator()(const Gaudi::ParticleID &) const override
MANDATORY: the only one essential method.
Definition NodePIDs.cpp:438
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:440
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
Definition NodePIDs.cpp:434
The trivial node : it match the positively charged particles.
Definition NodesPIDs.h:261
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:219
Positive * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:185
The trivial node : it match the 2S+1 spin.
Definition NodesPIDs.h:372
SSpin(const int spin)
constructor from the 2S+1
Definition NodePIDs.cpp:206
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:262
SSpin * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:197
represent simple predicate for short-lived particles
Definition NodesPIDs.h:490
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:364
ShortLived_(const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor with high edge and service
Definition NodePIDs.cpp:354
ShortLived_ * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:360
represent simple predicate for Stable+Charged particles
Definition NodesPIDs.h:538
StableCharged(const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor service
Definition NodePIDs.cpp:392
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodePIDs.cpp:401
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:399
StableCharged * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:395
represent simple predicate for Stable particles
Definition NodesPIDs.h:523
Stable * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:387
Stable(const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor service
Definition NodePIDs.cpp:384
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:389
Decays::Node m_symbol
the actual symbol
Definition NodesPIDs.h:662
bool valid() const override
MANDATORY: check the validity.
Definition NodePIDs.cpp:468
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:466
Symbol * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:462
StatusCode validate(const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
MANDATORY: the proper validation of the node.
Definition NodePIDs.cpp:470
Symbol(const std::string &sym)
the constructor from the symbol
Definition NodePIDs.cpp:456
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodePIDs.cpp:464
Helper class to obtain the information about the valid symbols for particles, decay descriptors and N...
Definition Symbols.h:45
static Symbols & instance()
static accessor to teh singleton
Definition Symbols.cpp:39
const std::string & symbol(std::string sym) const
help for the basic primitive special symbol
Definition Symbols.cpp:163
The abstract class which represents the single "node" of decay tree.
Definition iNode.h:35
The abstract interface to Particle Property Service.
Holds PDG + LHCb extension particle code, following the PDG particle numbering scheme (pdg....
Definition ParticleID.h:43
int pid() const
Retrieve the PDG ID.
Definition ParticleID.h:54
Quark
Quark PDG IDs.
Definition ParticleID.h:48
A trivial class to hold information about a single particle properties.
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition StatusCode.h:139
constexpr static const auto SUCCESS
Definition StatusCode.h:99
constexpr static const auto FAILURE
Definition StatusCode.h:100
bool valid(Iterator begin, Iterator end)
check the validness of the trees or nodes
Definition Nodes.h:36
Decays::Nodes::And operator&&(const Decays::iNode &o1, const Decays::iNode &o2)
Create the "AND" of two nodes.
Definition Nodes.h:363
Decays::Nodes::Or operator||(const Decays::iNode &o1, const Decays::iNode &o2)
Create the "OR" of two nodes.
Definition Nodes.h:347
constexpr double micrometer
constexpr double meter
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1
Gaudi::ParticleID abs(const Gaudi::ParticleID &p)
Return the absolute value for a PID.
Definition ParticleID.h:191
represent simple predicate for Long-lived particles
Definition NodesPIDs.h:507
LongLived_(const double high, const Gaudi::Interfaces::IParticlePropertySvc *svc=0)
constructor with high edge and service
Definition NodePIDs.cpp:370
std::ostream & fillStream(std::ostream &s) const override
MANDATORY: the specific printout.
Definition NodePIDs.cpp:378
LongLived_ * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:376