Version: SMASH-2.0
smash::I_tot_range Class Reference

#include <clebschgordan.h>

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

Definition at line 84 of file clebschgordan.h.

Collaboration diagram for smash::I_tot_range:
[legend]

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 98 of file clebschgordan.h.

98  {
99  // Compute total isospin range with given particles.
100  const int I_z_abs = std::abs(p_a.isospin3() + p_b.isospin3());
101  I_max_ = p_a.isospin() + p_b.isospin();
102  I_min_ = std::max(std::abs(p_a.isospin() - p_b.isospin()), I_z_abs);
103  }
Here is the call graph for this function:

◆ 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 114 of file clebschgordan.h.

115  {
116  // Compute total isospin range with given initial and final particles.
117  const int I_z = p_a.isospin3() + p_b.isospin3();
118  if (I_z != p_c.isospin3() + p_d.isospin3()) {
119  /* This reaction is forbidden by isospin conservation.
120  * Set impossible values to make sure an empty range is returned. */
121  I_min_ = 1;
122  I_max_ = 0;
123  return;
124  }
125  I_max_ =
126  std::min(p_a.isospin() + p_b.isospin(), p_c.isospin() + p_d.isospin());
127  I_min_ = std::max(std::abs(p_a.isospin() - p_b.isospin()),
128  std::abs(p_c.isospin() - p_d.isospin()));
129  I_min_ = std::max(I_min_, std::abs(I_z));
130  }
Here is the call graph for this function:

Member Function Documentation

◆ begin()

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

Definition at line 173 of file clebschgordan.h.

173 { return iterator(I_max_, *this); }
Here is the caller graph for this function:

◆ end()

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

Definition at line 175 of file clebschgordan.h.

175  {
176  if (I_min_ > I_max_) {
177  return begin();
178  }
179  return iterator(I_min_ - 2, *this);
180  }
Here is the call graph for this function:

Member Data Documentation

◆ I_min_

int smash::I_tot_range::I_min_
private

Value of minimum total isospin.

Definition at line 87 of file clebschgordan.h.

◆ I_max_

int smash::I_tot_range::I_max_
private

Value of maximum total isospin.

Definition at line 89 of file clebschgordan.h.


The documentation for this class was generated from the following file:
smash::I_tot_range::begin
iterator begin()
Definition: clebschgordan.h:173
smash::I_tot_range::I_max_
int I_max_
Value of maximum total isospin.
Definition: clebschgordan.h:89
smash::I_tot_range::I_min_
int I_min_
Value of minimum total isospin.
Definition: clebschgordan.h:87