The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::Decays::Nodes::JSpin Class Reference

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

#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
JSpin * 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.
bool valid () const override
 valid only for positive spin-values
StatusCode validate (const Gaudi::Interfaces::IParticlePropertySvc *) const override
 MANDATORY: the proper validation of the node.
int spin () const
Public Member Functions inherited from Gaudi::Decays::iNode
virtual bool operator! () const
 invalid node?
virtual std::string toString () const
 the string representation of the node
virtual ~iNode ()=default
 virtual destructor

Private Attributes

int m_spin
 the j-spin to be tested

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.

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 ) {}
int m_spin
the j-spin to be tested
Definition NodesPIDs.h:364

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 ); }
JSpin(const int spin)
constructor from the 2J+1
Definition NodePIDs.cpp:204

◆ 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(); }
int jSpin() const
Return 2J+1, where J is the total spin, valid for all particles.

◆ 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 {
137 return valid() ? StatusCode::SUCCESS : StatusCode{ InvalidSpin };
138}
bool valid() const override
valid only for positive spin-values
Definition NodePIDs.cpp:134
constexpr static const auto SUCCESS
Definition StatusCode.h:99

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: