Version: SMASH-3.1
smash::CollisionBranch Class Reference

#include <processbranch.h>

CollisionBranch is a derivative of ProcessBranch, which is used to represent particular final-state channels in a collision.

Definition at line 216 of file processbranch.h.

Inheritance diagram for smash::CollisionBranch:
smash::ProcessBranch

Public Member Functions

 CollisionBranch (double w, ProcessType p_type)
 Construct collision branch with empty final state. More...
 
 CollisionBranch (const ParticleType &type, double w, ProcessType p_type)
 Construct collision branch with 1 particle in final state. More...
 
 CollisionBranch (const ParticleType &type_a, const ParticleType &type_b, double w, ProcessType p_type)
 Construct collision branch with 2 particles in final state. More...
 
 CollisionBranch (const ParticleType &type_a, const ParticleType &type_b, const ParticleType &type_c, double w, ProcessType p_type)
 Construct collision branch with 3 particles in final state. More...
 
 CollisionBranch (const ParticleType &type_a, const ParticleType &type_b, const ParticleType &type_c, const ParticleType &type_d, double w, ProcessType p_type)
 Construct collision branch with 4 particles in final state. More...
 
 CollisionBranch (const ParticleType &type_a, const ParticleType &type_b, const ParticleType &type_c, const ParticleType &type_d, const ParticleType &type_e, double w, ProcessType p_type)
 Construct collision branch with 5 particles in final state. More...
 
 CollisionBranch (ParticleTypePtrList new_types, double w, ProcessType p_type)
 Construct collision branch with a list of particles in final state. More...
 
 CollisionBranch (CollisionBranch &&rhs)
 The move constructor efficiently moves the particle-type list member. More...
 
const ParticleTypePtrList & particle_types () const override
 
void set_type (ProcessType p_type)
 Set the process type. More...
 
ProcessType get_type () const override
 
unsigned int particle_number () const override
 
- Public Member Functions inherited from smash::ProcessBranch
 ProcessBranch ()
 Create a ProcessBranch without final states and weight. More...
 
 ProcessBranch (double w)
 Create a ProcessBranch with with weight but without final states. More...
 
 ProcessBranch (const ProcessBranch &)=delete
 Copying is disabled. Use std::move or create a new object. More...
 
virtual ~ProcessBranch ()=default
 Virtual Destructor. More...
 
void set_weight (double process_weight)
 Set the weight of the branch. More...
 
ParticleList particle_list () const
 
double weight () const
 
double threshold () const
 

Private Attributes

ParticleTypePtrList particle_types_
 List of particles appearing in this process outcome. More...
 
ProcessType process_type_
 Process type are used to distinguish different types of processes, e.g. More...
 

Additional Inherited Members

- Protected Attributes inherited from smash::ProcessBranch
double branch_weight_
 Weight of the branch, typically a cross section or a branching ratio. More...
 
double threshold_ = -1.
 Threshold of the branch. More...
 

Constructor & Destructor Documentation

◆ CollisionBranch() [1/8]

smash::CollisionBranch::CollisionBranch ( double  w,
ProcessType  p_type 
)
inline

Construct collision branch with empty final state.

Parameters
[in]wWeight of created branch.
[in]p_typeProcess type of created branch.

Definition at line 223 of file processbranch.h.

224  : ProcessBranch(w), process_type_(p_type) {}
ProcessType process_type_
Process type are used to distinguish different types of processes, e.g.
ProcessBranch()
Create a ProcessBranch without final states and weight.

◆ CollisionBranch() [2/8]

smash::CollisionBranch::CollisionBranch ( const ParticleType type,
double  w,
ProcessType  p_type 
)
inline

Construct collision branch with 1 particle in final state.

Parameters
[in]typeParticle type of final state particle.
[in]wWeight of created branch.
[in]p_typeProcess type of created branch.

Definition at line 231 of file processbranch.h.

232  : ProcessBranch(w), process_type_(p_type) {
233  particle_types_.reserve(1);
234  particle_types_.push_back(&type);
235  }
ParticleTypePtrList particle_types_
List of particles appearing in this process outcome.

◆ CollisionBranch() [3/8]

smash::CollisionBranch::CollisionBranch ( const ParticleType type_a,
const ParticleType type_b,
double  w,
ProcessType  p_type 
)
inline

Construct collision branch with 2 particles in final state.

Parameters
[in]type_aParticle types of one final state particle.
[in]type_bParticle types of other final state particle.
[in]wWeight of created branch.
[in]p_typeProcess type of created branch.

Definition at line 243 of file processbranch.h.

245  : ProcessBranch(w), process_type_(p_type) {
246  particle_types_.reserve(2);
247  particle_types_.push_back(&type_a);
248  particle_types_.push_back(&type_b);
249  }

◆ CollisionBranch() [4/8]

smash::CollisionBranch::CollisionBranch ( const ParticleType type_a,
const ParticleType type_b,
const ParticleType type_c,
double  w,
ProcessType  p_type 
)
inline

Construct collision branch with 3 particles in final state.

Parameters
[in]type_aParticle type of first final state particle.
[in]type_bParticle type of second final state particle.
[in]type_cParticle type of third final state particle.
[in]wWeight of created branch.
[in]p_typeProcess type of created branch.

Definition at line 259 of file processbranch.h.

261  : ProcessBranch(w), process_type_(p_type) {
262  particle_types_.reserve(3);
263  particle_types_.push_back(&type_a);
264  particle_types_.push_back(&type_b);
265  particle_types_.push_back(&type_c);
266  }

◆ CollisionBranch() [5/8]

smash::CollisionBranch::CollisionBranch ( const ParticleType type_a,
const ParticleType type_b,
const ParticleType type_c,
const ParticleType type_d,
double  w,
ProcessType  p_type 
)
inline

Construct collision branch with 4 particles in final state.

Parameters
[in]type_aParticle type of first final state particle.
[in]type_bParticle type of second final state particle.
[in]type_cParticle type of third final state particle.
[in]type_dParticle type of fourth final state particle.
[in]wWeight of created branch.
[in]p_typeProcess type of created branch.

Definition at line 277 of file processbranch.h.

280  : ProcessBranch(w), process_type_(p_type) {
281  particle_types_.reserve(4);
282  particle_types_.push_back(&type_a);
283  particle_types_.push_back(&type_b);
284  particle_types_.push_back(&type_c);
285  particle_types_.push_back(&type_d);
286  }

◆ CollisionBranch() [6/8]

smash::CollisionBranch::CollisionBranch ( const ParticleType type_a,
const ParticleType type_b,
const ParticleType type_c,
const ParticleType type_d,
const ParticleType type_e,
double  w,
ProcessType  p_type 
)
inline

Construct collision branch with 5 particles in final state.

Parameters
[in]type_aParticle type of first final state particle.
[in]type_bParticle type of second final state particle.
[in]type_cParticle type of third final state particle.
[in]type_dParticle type of fourth final state particle.
[in]type_eParticle type of fith final state particle.
[in]wWeight of created branch.
[in]p_typeProcess type of created branch.

Definition at line 298 of file processbranch.h.

301  : ProcessBranch(w), process_type_(p_type) {
302  particle_types_.reserve(5);
303  particle_types_.push_back(&type_a);
304  particle_types_.push_back(&type_b);
305  particle_types_.push_back(&type_c);
306  particle_types_.push_back(&type_d);
307  particle_types_.push_back(&type_e);
308  }

◆ CollisionBranch() [7/8]

smash::CollisionBranch::CollisionBranch ( ParticleTypePtrList  new_types,
double  w,
ProcessType  p_type 
)
inline

Construct collision branch with a list of particles in final state.

Parameters
[in]new_typesList of particle types of final state particles.
[in]wWeight of created branch.
[in]p_typeProcess type of created branch.

Definition at line 316 of file processbranch.h.

317  : ProcessBranch(w),
318  particle_types_(std::move(new_types)),
319  process_type_(p_type) {}

◆ CollisionBranch() [8/8]

smash::CollisionBranch::CollisionBranch ( CollisionBranch &&  rhs)
inline

The move constructor efficiently moves the particle-type list member.

Definition at line 321 of file processbranch.h.

322  : ProcessBranch(rhs.branch_weight_),
323  particle_types_(std::move(rhs.particle_types_)),
324  process_type_(rhs.process_type_) {}

Member Function Documentation

◆ particle_types()

const ParticleTypePtrList& smash::CollisionBranch::particle_types ( ) const
inlineoverridevirtual
Returns
the particle types associated with this branch.

Implements smash::ProcessBranch.

Definition at line 325 of file processbranch.h.

325  {
326  return particle_types_;
327  }

◆ set_type()

void smash::CollisionBranch::set_type ( ProcessType  p_type)
inline

Set the process type.

Parameters
[in]p_typeThe new value of the process type

Definition at line 333 of file processbranch.h.

333 { process_type_ = p_type; }

◆ get_type()

ProcessType smash::CollisionBranch::get_type ( ) const
inlineoverridevirtual
Returns
type of the process

Implements smash::ProcessBranch.

Definition at line 335 of file processbranch.h.

335 { return process_type_; }

◆ particle_number()

unsigned int smash::CollisionBranch::particle_number ( ) const
inlineoverridevirtual
Returns
number of particles involved in the process

Implements smash::ProcessBranch.

Definition at line 337 of file processbranch.h.

337  {
338  return particle_types_.size();
339  }

Member Data Documentation

◆ particle_types_

ParticleTypePtrList smash::CollisionBranch::particle_types_
private

List of particles appearing in this process outcome.

Definition at line 343 of file processbranch.h.

◆ process_type_

ProcessType smash::CollisionBranch::process_type_
private

Process type are used to distinguish different types of processes, e.g.

string formation, resonance formation, elastic scattering and so on.

Definition at line 349 of file processbranch.h.


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