Version: SMASH-3.1
smash::I_tot_range Class Reference

#include <clebschgordan.h>

Range of total isospin for reaction of particle a with particle b.

Definition at line 68 of file clebschgordan.h.

Classes

class  iterator
 Iterator class for determination of total isospin. More...
 

Public Member Functions

 I_tot_range (const ParticleType &p_a, const ParticleType &p_b)
 Get the allowed range of total isospin for a collision a + b. More...
 
 I_tot_range (const ParticleType &p_a, const ParticleType &p_b, const ParticleType &p_c, const ParticleType &p_d)
 Get the allowed range of total isospin for a collision a + b <-> c + d. More...
 
iterator begin ()
 
iterator end ()
 

Private Attributes

int I_min_
 Value of minimum total isospin. More...
 
int I_max_
 Value of maximum total isospin. More...
 

Constructor & Destructor Documentation

◆ I_tot_range() [1/2]

smash::I_tot_range::I_tot_range ( const ParticleType p_a,
const ParticleType p_b 
)
inline

Get the allowed range of total isospin for a collision a + b.

Parameters
p_aParticle a.
p_bParticle b.
Returns
Maximum and minimum of allowed values.

Definition at line 82 of file clebschgordan.h.

82  {
83  // Compute total isospin range with given particles.
84  const int I_z_abs = std::abs(p_a.isospin3() + p_b.isospin3());
85  I_max_ = p_a.isospin() + p_b.isospin();
86  I_min_ = std::max(std::abs(p_a.isospin() - p_b.isospin()), I_z_abs);
87  }
int I_min_
Value of minimum total isospin.
Definition: clebschgordan.h:71
int I_max_
Value of maximum total isospin.
Definition: clebschgordan.h:73

◆ I_tot_range() [2/2]

smash::I_tot_range::I_tot_range ( const ParticleType p_a,
const ParticleType p_b,
const ParticleType p_c,
const ParticleType p_d 
)
inline

Get the allowed range of total isospin for a collision a + b <-> c + d.

Parameters
p_aParticle a.
p_bParticle b.
p_cParticle c.
p_dParticle d.
Returns
Maximum and minimum of allowed values or empty range, if reaction is forbidden due to isospin.

Definition at line 98 of file clebschgordan.h.

99  {
100  // Compute total isospin range with given initial and final particles.
101  const int I_z = p_a.isospin3() + p_b.isospin3();
102  if (I_z != p_c.isospin3() + p_d.isospin3()) {
103  /* This reaction is forbidden by isospin conservation.
104  * Set impossible values to make sure an empty range is returned. */
105  I_min_ = 1;
106  I_max_ = 0;
107  return;
108  }
109  I_max_ =
110  std::min(p_a.isospin() + p_b.isospin(), p_c.isospin() + p_d.isospin());
111  I_min_ = std::max(std::abs(p_a.isospin() - p_b.isospin()),
112  std::abs(p_c.isospin() - p_d.isospin()));
113  I_min_ = std::max(I_min_, std::abs(I_z));
114  }

Member Function Documentation

◆ begin()

iterator smash::I_tot_range::begin ( )
inline
Returns
Beginning of iterator.

Definition at line 172 of file clebschgordan.h.

172 { return iterator(I_max_, *this); }

◆ end()

iterator smash::I_tot_range::end ( )
inline
Returns
End of iterator.

Definition at line 174 of file clebschgordan.h.

174  {
175  if (I_min_ > I_max_) {
176  return begin();
177  }
178  return iterator(I_min_ - 2, *this);
179  }

Member Data Documentation

◆ I_min_

int smash::I_tot_range::I_min_
private

Value of minimum total isospin.

Definition at line 71 of file clebschgordan.h.

◆ I_max_

int smash::I_tot_range::I_max_
private

Value of maximum total isospin.

Definition at line 73 of file clebschgordan.h.


The documentation for this class was generated from the following file: