Version: SMASH-1.5
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 208 of file processbranch.h.

Inheritance diagram for smash::CollisionBranch:
[legend]
Collaboration diagram for smash::CollisionBranch:
[legend]

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 (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/5]

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 215 of file processbranch.h.

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

◆ CollisionBranch() [2/5]

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 223 of file processbranch.h.

224  : ProcessBranch(w), process_type_(p_type) {
225  particle_types_.reserve(1);
226  particle_types_.push_back(&type);
227  }
ProcessBranch()
Create a ProcessBranch without final states and weight.
ProcessType process_type_
Process type are used to distinguish different types of processes, e.g.
ParticleTypePtrList particle_types_
List of particles appearing in this process outcome.

◆ CollisionBranch() [3/5]

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 235 of file processbranch.h.

237  : ProcessBranch(w), process_type_(p_type) {
238  particle_types_.reserve(2);
239  particle_types_.push_back(&type_a);
240  particle_types_.push_back(&type_b);
241  }
ProcessBranch()
Create a ProcessBranch without final states and weight.
ProcessType process_type_
Process type are used to distinguish different types of processes, e.g.
ParticleTypePtrList particle_types_
List of particles appearing in this process outcome.

◆ CollisionBranch() [4/5]

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 248 of file processbranch.h.

249  : ProcessBranch(w),
250  particle_types_(std::move(new_types)),
251  process_type_(p_type) {}
ProcessBranch()
Create a ProcessBranch without final states and weight.
ProcessType process_type_
Process type are used to distinguish different types of processes, e.g.
ParticleTypePtrList particle_types_
List of particles appearing in this process outcome.

◆ CollisionBranch() [5/5]

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

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

Definition at line 253 of file processbranch.h.

254  : ProcessBranch(rhs.branch_weight_),
255  particle_types_(std::move(rhs.particle_types_)),
256  process_type_(rhs.process_type_) {}
ProcessBranch()
Create a ProcessBranch without final states and weight.
ProcessType process_type_
Process type are used to distinguish different types of processes, e.g.
ParticleTypePtrList particle_types_
List of particles appearing in this process outcome.

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 257 of file processbranch.h.

257  {
258  return particle_types_;
259  }
ParticleTypePtrList particle_types_
List of particles appearing in this process outcome.
Here is the caller graph for this function:

◆ 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 265 of file processbranch.h.

265 { process_type_ = p_type; }
ProcessType process_type_
Process type are used to distinguish different types of processes, e.g.

◆ get_type()

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

Implements smash::ProcessBranch.

Definition at line 267 of file processbranch.h.

267 { return process_type_; }
ProcessType process_type_
Process type are used to distinguish different types of processes, e.g.
Here is the caller graph for this function:

◆ particle_number()

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

Implements smash::ProcessBranch.

Definition at line 269 of file processbranch.h.

269  {
270  return particle_types_.size();
271  }
ParticleTypePtrList particle_types_
List of particles appearing in this process outcome.

Member Data Documentation

◆ particle_types_

ParticleTypePtrList smash::CollisionBranch::particle_types_
private

List of particles appearing in this process outcome.

Note
This currently uses a std::vector and thus works for any number of particles. But this number is bounded (4?) and a std::array may therefore be more efficient.

Definition at line 281 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 286 of file processbranch.h.


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