Version: SMASH-2.0
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 221 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 (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 (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/6]

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

229  : ProcessBranch(w), process_type_(p_type) {}

◆ CollisionBranch() [2/6]

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

237  : ProcessBranch(w), process_type_(p_type) {
238  particle_types_.reserve(1);
239  particle_types_.push_back(&type);
240  }

◆ CollisionBranch() [3/6]

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

250  : ProcessBranch(w), process_type_(p_type) {
251  particle_types_.reserve(2);
252  particle_types_.push_back(&type_a);
253  particle_types_.push_back(&type_b);
254  }

◆ CollisionBranch() [4/6]

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

266  : ProcessBranch(w), process_type_(p_type) {
267  particle_types_.reserve(3);
268  particle_types_.push_back(&type_a);
269  particle_types_.push_back(&type_b);
270  particle_types_.push_back(&type_c);
271  }

◆ CollisionBranch() [5/6]

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

280  : ProcessBranch(w),
281  particle_types_(std::move(new_types)),
282  process_type_(p_type) {}

◆ CollisionBranch() [6/6]

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

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

Definition at line 284 of file processbranch.h.

285  : ProcessBranch(rhs.branch_weight_),
286  particle_types_(std::move(rhs.particle_types_)),
287  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 288 of file processbranch.h.

288  {
289  return particle_types_;
290  }
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 296 of file processbranch.h.

296 { process_type_ = p_type; }

◆ get_type()

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

Implements smash::ProcessBranch.

Definition at line 298 of file processbranch.h.

298 { return process_type_; }
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 300 of file processbranch.h.

300  {
301  return particle_types_.size();
302  }

Member Data Documentation

◆ particle_types_

ParticleTypePtrList smash::CollisionBranch::particle_types_
private

List of particles appearing in this process outcome.

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


The documentation for this class was generated from the following file:
smash::CollisionBranch::process_type_
ProcessType process_type_
Process type are used to distinguish different types of processes, e.g.
Definition: processbranch.h:312
smash::ProcessBranch::ProcessBranch
ProcessBranch()
Create a ProcessBranch without final states and weight.
Definition: processbranch.h:137
smash::CollisionBranch::particle_types_
ParticleTypePtrList particle_types_
List of particles appearing in this process outcome.
Definition: processbranch.h:306