The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
NodesPIDs.h
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\***********************************************************************************/
11#pragma once
12
13#include <Gaudi/Decays/Nodes.h>
18#include <algorithm>
19
26namespace Gaudi::Decays {
27 namespace Nodes {
34 class GAUDI_API Any : public Decays::iNode {
35 public:
37 Any* clone() const override;
39 bool operator()( const Gaudi::ParticleID& /* p */ ) const override;
41 std::ostream& fillStream( std::ostream& s ) const override;
43 bool valid() const override;
46 };
47
54 class GAUDI_API Pid : public Decays::iNode {
55 public:
61 Pid( const Gaudi::ParticleID& item );
63 Pid( const std::string& item );
65 Pid* clone() const override;
67 bool operator()( const Gaudi::ParticleID& pid ) const override { return check( pid ); }
69 std::ostream& fillStream( std::ostream& s ) const override;
71 bool valid() const override;
74
75 public:
76 bool check( Gaudi::ParticleID pid ) const { return pid == m_item.pid(); }
77
79 const Decays::Decay::Item& item() const { return m_item; }
81 operator const Decays::Decay::Item&() const { return item(); }
82
83 private:
86 };
87
94 class GAUDI_API CC : public Pid {
95 public:
97 CC( const Decays::Decay::Item& item );
103 CC( const std::string& item );
105 CC( const Decays::Nodes::Pid& pid );
107 CC* clone() const override;
109 bool operator()( const Gaudi::ParticleID& pid ) const override { return pid.abspid() == item().pid().abspid(); }
111 std::ostream& fillStream( std::ostream& s ) const override;
112 };
113
119 class GAUDI_API Lepton : public Any {
120 public:
122 Lepton* clone() const override;
124 bool operator()( const Gaudi::ParticleID& pid ) const override { return pid.isLepton(); }
126 std::ostream& fillStream( std::ostream& s ) const override;
127 };
128
134 class GAUDI_API Nu : public Lepton {
135 public:
137 Nu* clone() const override;
139 bool operator()( const Gaudi::ParticleID& pid ) const override {
140 return pid.isLepton() && ( 0 == pid.threeCharge() );
141 }
142
143 std::ostream& fillStream( std::ostream& s ) const override;
144 };
145
151 class GAUDI_API Ell : public Lepton {
152 public:
154 Ell* clone() const override;
156 bool operator()( const Gaudi::ParticleID& pid ) const override {
157 return pid.isLepton() && ( 0 != pid.threeCharge() );
158 }
159
160 std::ostream& fillStream( std::ostream& s ) const override;
161 };
162
168 class GAUDI_API EllPlus : public Ell {
169 public:
171 EllPlus* clone() const override;
173 bool operator()( const Gaudi::ParticleID& pid ) const override {
174 return pid.isLepton() && ( 0 < pid.threeCharge() );
175 }
176
177 std::ostream& fillStream( std::ostream& s ) const override;
178 };
179
184 class GAUDI_API EllMinus : public Ell {
185 public:
187 EllMinus* clone() const override;
189 bool operator()( const Gaudi::ParticleID& pid ) const override {
190 return pid.isLepton() && ( 0 > pid.threeCharge() );
191 }
192
193 std::ostream& fillStream( std::ostream& s ) const override;
194 };
195
201 class GAUDI_API Hadron : public Any {
202 public:
204 Hadron* clone() const override;
206 bool operator()( const Gaudi::ParticleID& pid ) const override { return pid.isHadron(); }
208 std::ostream& fillStream( std::ostream& s ) const override;
209 };
210
216 class GAUDI_API Meson : public Hadron {
217 public:
219 Meson* clone() const override;
221 bool operator()( const Gaudi::ParticleID& pid ) const override { return pid.isMeson(); }
223 std::ostream& fillStream( std::ostream& s ) const override;
224 };
225
231 class GAUDI_API Baryon : public Hadron {
232 public:
234 Baryon* clone() const override;
236 bool operator()( const Gaudi::ParticleID& pid ) const override { return pid.isBaryon(); }
238 std::ostream& fillStream( std::ostream& s ) const override;
239 };
240
246 class GAUDI_API Charged : public Any {
247 public:
249 Charged* clone() const override;
251 bool operator()( const Gaudi::ParticleID& pid ) const override { return 0 != pid.threeCharge(); }
253 std::ostream& fillStream( std::ostream& s ) const override;
254 };
255
261 class GAUDI_API Positive : public Charged {
262 public:
264 Positive* clone() const override;
266 bool operator()( const Gaudi::ParticleID& pid ) const override { return 0 < pid.threeCharge(); }
268 std::ostream& fillStream( std::ostream& s ) const override;
269 };
270
276 class GAUDI_API Negative : public Charged {
277 public:
279 Negative* clone() const override;
281 bool operator()( const Gaudi::ParticleID& pid ) const override { return 0 > pid.threeCharge(); }
283 std::ostream& fillStream( std::ostream& s ) const override;
284 };
285
291 class GAUDI_API Neutral : public Charged {
292 public:
294 Neutral* clone() const override;
296 bool operator()( const Gaudi::ParticleID& pid ) const override { return 0 == pid.threeCharge(); }
298 std::ostream& fillStream( std::ostream& s ) const override;
299 };
300
306 class GAUDI_API Nucleus : public Any {
307 public:
309 Nucleus* clone() const override;
311 bool operator()( const Gaudi::ParticleID& pid ) const override { return pid.isNucleus(); }
313 std::ostream& fillStream( std::ostream& s ) const override;
314 };
315
321 class GAUDI_API HasQuark : public Any {
322 public:
326 HasQuark* clone() const override;
328 bool operator()( const Gaudi::ParticleID& pid ) const override { return pid.hasQuark( m_quark ); }
330 std::ostream& fillStream( std::ostream& s ) const override;
331
332 private:
334 Gaudi::ParticleID::Quark m_quark; // the quark to be tested
335 };
336
342 class GAUDI_API JSpin : public Any {
343 public:
344 enum { InvalidSpin = 501 };
345
347 JSpin( const int spin );
349 JSpin* clone() const override;
351 bool operator()( const Gaudi::ParticleID& pid ) const override { return spin() == pid.jSpin(); }
353 std::ostream& fillStream( std::ostream& s ) const override;
354
356 bool valid() const override;
358 StatusCode validate( const Gaudi::Interfaces::IParticlePropertySvc* /* svc */ ) const override;
359
360 int spin() const { return m_spin; }
361
362 private:
365 };
366
372 class GAUDI_API SSpin : public JSpin {
373 public:
375 SSpin( const int spin );
377 SSpin* clone() const override;
379 bool operator()( const Gaudi::ParticleID& pid ) const override { return spin() == pid.sSpin(); }
381 std::ostream& fillStream( std::ostream& s ) const override;
382 };
383
389 class GAUDI_API LSpin : public SSpin {
390 public:
392 LSpin( const int spin );
394 LSpin* clone() const override;
396 bool operator()( const Gaudi::ParticleID& pid ) const override { return spin() == pid.lSpin(); }
398 std::ostream& fillStream( std::ostream& s ) const override;
399 };
400
406 class GAUDI_API CTau : public Decays::iNode {
407 public:
409 CTau( const double low, const double high, const Gaudi::Interfaces::IParticlePropertySvc* svc = nullptr );
411 CTau* clone() const override;
412
414 bool operator()( const Gaudi::ParticleID& pid ) const override;
416 std::ostream& fillStream( std::ostream& s ) const override;
418 bool valid() const override;
421
423
425 double low() const { return m_low; }
427 double high() const { return m_high; }
428
429 StatusCode setService( const Gaudi::Interfaces::IParticlePropertySvc* svc ) const;
430
431 protected:
432 template <typename F, typename = std::is_invocable_r<bool, F, Gaudi::ParticleID>>
433 bool classify( Gaudi::ParticleID pid, F&& f ) const {
434 enum struct Classification { Accepted = +1, Rejected = -1, Unknown = 0 };
435 auto r = m_pids.with_lock(
436 []( const auto& pids, Gaudi::ParticleID pid ) {
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;
440 },
441 pid );
442 switch ( r ) {
443 case Classification::Accepted:
444 return true;
445 case Classification::Rejected:
446 return false;
447 case Classification::Unknown:
448 return add_( pid, std::invoke( std::forward<F>( f ), pid ) );
449 }
450 __builtin_unreachable();
451 }
452
453 private:
454 bool add_( Gaudi::ParticleID pid, bool acc ) const;
455
456 public:
458 return m_pids.with_lock(
459 [&]( const KnownPids& pids, MsgStream& s, auto const& ppSvc ) -> decltype( auto ) {
460 return Gaudi::ParticleProperties::printAsTable( pids.accepted, s, ppSvc );
461 },
462 s, m_ppSvc );
463 }
464
465 private:
469
470 public:
471 struct KnownPids {
472 std::vector<Gaudi::ParticleID> accepted;
473 std::vector<Gaudi::ParticleID> rejected;
474 };
475
476 private:
478
480 double m_low;
482 double m_high;
483 };
484
490 class GAUDI_API ShortLived_ : public CTau {
491 public:
493 ShortLived_( const double high, const Gaudi::Interfaces::IParticlePropertySvc* svc = 0 );
497 ShortLived_* clone() const override;
499 std::ostream& fillStream( std::ostream& s ) const override;
500 };
501
509 LongLived_( const double high, const Gaudi::Interfaces::IParticlePropertySvc* svc = 0 );
513 LongLived_* clone() const override;
515 std::ostream& fillStream( std::ostream& s ) const override;
516 };
517
523 class GAUDI_API Stable : public LongLived_ {
524 public:
528 Stable* clone() const override;
530 std::ostream& fillStream( std::ostream& s ) const override;
531 };
532
539 public:
543 StableCharged* clone() const override;
545 bool operator()( const Gaudi::ParticleID& pid ) const override;
547 std::ostream& fillStream( std::ostream& s ) const override;
548 };
549
555 class GAUDI_API Mass : public CTau {
556 public:
558 Mass( const double low, const double high, const Gaudi::Interfaces::IParticlePropertySvc* svc = 0 );
560 Mass* clone() const override;
561
563 bool operator()( const Gaudi::ParticleID& pid ) const override;
565 std::ostream& fillStream( std::ostream& s ) const override;
566 };
567
573 class GAUDI_API Light : public Mass {
574 public:
576 Light( const double high, const Gaudi::Interfaces::IParticlePropertySvc* svc = 0 );
578 Light* clone() const override;
579
581 std::ostream& fillStream( std::ostream& s ) const override;
582 };
583
589 class GAUDI_API Heavy : public Mass {
590 public:
592 Heavy( const double low, const Gaudi::Interfaces::IParticlePropertySvc* svc = 0 );
594 Heavy* clone() const override;
595
597 std::ostream& fillStream( std::ostream& s ) const override;
598 };
599
609 public:
611 PosID* clone() const override;
613 bool operator()( const Gaudi::ParticleID& /* p */ ) const override;
615 std::ostream& fillStream( std::ostream& s ) const override;
617 bool valid() const override;
620 };
621
631 public:
633 NegID* clone() const override;
635 bool operator()( const Gaudi::ParticleID& /* p */ ) const override;
637 std::ostream& fillStream( std::ostream& s ) const override;
639 bool valid() const override;
642 };
643
645 public:
647 Symbol( const std::string& sym );
649 Symbol* clone() const override;
650
652 bool operator()( const Gaudi::ParticleID& pid ) const override;
654 std::ostream& fillStream( std::ostream& s ) const override;
656 bool valid() const override;
659
660 private:
663 };
664 } // namespace Nodes
665} // namespace Gaudi::Decays
#define GAUDI_API
Definition Kernel.h:49
Helper general purpose utilities to deal with decay nodes.
the helper representation of the item in the decay chain
Definition Decay.h:39
The generic class to hold the pointer to other node.
Definition iNode.h:74
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:236
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:109
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
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
MsgStream & printAcceptedAsTable(MsgStream &s) const
Definition NodesPIDs.h:457
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
bool add_(Gaudi::ParticleID pid, bool acc) const
Definition NodePIDs.cpp:295
SmartIF< Gaudi::Interfaces::IParticlePropertySvc > Service
Definition NodesPIDs.h:466
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:251
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:156
The trivial node : it match any negative lepton.
Definition NodesPIDs.h:184
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:189
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:173
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:206
Gaudi::ParticleID::Quark m_quark
the quark to be tested
Definition NodesPIDs.h:334
HasQuark * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:193
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:328
HasQuark(Gaudi::ParticleID::Quark quark)
constructor from the quark
Definition NodePIDs.cpp:202
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 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
int m_spin
the j-spin to be tested
Definition NodesPIDs.h:364
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:351
LSpin * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:199
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:396
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:124
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
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:221
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:281
Negative * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:187
The trivial node : it match the Neutral.
Definition NodesPIDs.h:291
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:296
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:139
Nu * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:171
The trivial node : it match the Nucleus.
Definition NodesPIDs.h:306
Nucleus * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:191
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:311
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:67
Pid * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:129
bool check(Gaudi::ParticleID pid) const
Definition NodesPIDs.h:76
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
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:266
Positive * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:185
SSpin(const int spin)
constructor from the 2S+1
Definition NodePIDs.cpp:206
SSpin * clone() const override
MANDATORY: clone method ("virtual constructor")
Definition NodePIDs.cpp:197
bool operator()(const Gaudi::ParticleID &pid) const override
MANDATORY: the only one essential method.
Definition NodesPIDs.h:379
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
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
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
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
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.
Definition ParticleID.h:56
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.
Quark
Quark PDG IDs.
Definition ParticleID.h:48
A trivial class to hold information about a single particle properties.
Definition of the MsgStream class used to transmit messages.
Definition MsgStream.h:29
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
bool valid(Iterator begin, Iterator end)
check the validness of the trees or nodes
Definition Nodes.h:36
StatusCode validate(Iterator begin, Iterator end, const Gaudi::Interfaces::IParticlePropertySvc *svc)
validate trees/nodes
Definition Nodes.h:53
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
Definition NodesPIDs.h:472
std::vector< Gaudi::ParticleID > rejected
Definition NodesPIDs.h:473
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