The Gaudi Framework  master (594c33fa)
Gaudi::Decays::Nodes::JSpin Class Reference

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

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

Public Types

enum  { InvalidSpin = 501 }
 

Public Member Functions

 JSpin (const int spin)
 constructor from the 2J+1 More...
 
JSpinclone () const override
 MANDATORY: clone method ("virtual constructor") More...
 
bool operator() (const Gaudi::ParticleID &pid) const override
 MANDATORY: the only one essential method. More...
 
std::ostreamfillStream (std::ostream &s) const override
 MANDATORY: the specific printout. More...
 
bool valid () const override
 valid only for positive spin-values More...
 
StatusCode validate (const Gaudi::Interfaces::IParticlePropertySvc *) const override
 MANDATORY: the proper validation of the node. More...
 
int spin () const
 
- Public Member Functions inherited from Gaudi::Decays::iNode
virtual bool operator! () const
 invalid node? More...
 
virtual std::string toString () const
 the string representation of the node More...
 
virtual ~iNode ()=default
 virtual destructor More...
 

Private Attributes

int m_spin
 the j-spin to be tested More...
 

Detailed Description

The trivial node : it match the 2J+1 spin

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2008-04-12

Definition at line 342 of file NodesPIDs.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
InvalidSpin 

Definition at line 344 of file NodesPIDs.h.

344 { InvalidSpin = 501 };

Constructor & Destructor Documentation

◆ JSpin()

Gaudi::Decays::Nodes::JSpin::JSpin ( const int  spin)

constructor from the 2J+1

Definition at line 204 of file NodePIDs.cpp.

204 : Decays::Nodes::Any(), m_spin( spin ) {}

Member Function Documentation

◆ clone()

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

MANDATORY: clone method ("virtual constructor")

Reimplemented from Gaudi::Decays::Nodes::Any.

Reimplemented in Gaudi::Decays::Nodes::LSpin, and Gaudi::Decays::Nodes::SSpin.

Definition at line 195 of file NodePIDs.cpp.

195 { return new JSpin( *this ); }

◆ fillStream()

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

MANDATORY: the specific printout.

Reimplemented from Gaudi::Decays::Nodes::Any.

Reimplemented in Gaudi::Decays::Nodes::LSpin, and Gaudi::Decays::Nodes::SSpin.

Definition at line 244 of file NodePIDs.cpp.

244  {
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 }

◆ operator()()

bool Gaudi::Decays::Nodes::JSpin::operator() ( const Gaudi::ParticleID pid) const
inlineoverridevirtual

MANDATORY: the only one essential method.

Reimplemented from Gaudi::Decays::Nodes::Any.

Reimplemented in Gaudi::Decays::Nodes::LSpin, and Gaudi::Decays::Nodes::SSpin.

Definition at line 351 of file NodesPIDs.h.

351 { return spin() == pid.jSpin(); }

◆ spin()

int Gaudi::Decays::Nodes::JSpin::spin ( ) const
inline

Definition at line 360 of file NodesPIDs.h.

360 { return m_spin; }

◆ valid()

bool Gaudi::Decays::Nodes::JSpin::valid ( ) const
overridevirtual

valid only for positive spin-values

Reimplemented from Gaudi::Decays::Nodes::Any.

Definition at line 134 of file NodePIDs.cpp.

134 { return 0 < spin(); }

◆ validate()

StatusCode Gaudi::Decays::Nodes::JSpin::validate ( const Gaudi::Interfaces::IParticlePropertySvc ) const
overridevirtual

MANDATORY: the proper validation of the node.

Reimplemented from Gaudi::Decays::Nodes::Any.

Definition at line 136 of file NodePIDs.cpp.

136  {
138 }

Member Data Documentation

◆ m_spin

int Gaudi::Decays::Nodes::JSpin::m_spin
private

the j-spin to be tested

Definition at line 364 of file NodesPIDs.h.


The documentation for this class was generated from the following files:
Gaudi::Decays::Nodes::JSpin::m_spin
int m_spin
the j-spin to be tested
Definition: NodesPIDs.h:364
gaudirun.s
string s
Definition: gaudirun.py:346
Gaudi::Decays::Nodes::JSpin::InvalidSpin
@ InvalidSpin
Definition: NodesPIDs.h:344
StatusCode
Definition: StatusCode.h:65
Gaudi::Decays::Nodes::JSpin::valid
bool valid() const override
valid only for positive spin-values
Definition: NodePIDs.cpp:134
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
GaudiPartProp.Nodes.Any
Any
Definition: Nodes.py:249
Gaudi::ParticleID::jSpin
int jSpin() const
Return 2J+1, where J is the total spin, valid for all particles.
Definition: ParticleID.cpp:313
Gaudi::Decays::Nodes::JSpin::JSpin
JSpin(const int spin)
constructor from the 2J+1
Definition: NodePIDs.cpp:204
Gaudi::Decays::Nodes::JSpin::spin
int spin() const
Definition: NodesPIDs.h:360