Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronBuilder Class Reference

#include <G4HadronBuilder.hh>

Public Member Functions

G4ParticleDefinitionBuild (G4ParticleDefinition *black, G4ParticleDefinition *white)
 
G4ParticleDefinitionBuildLowSpin (G4ParticleDefinition *black, G4ParticleDefinition *white)
 
G4ParticleDefinitionBuildHighSpin (G4ParticleDefinition *black, G4ParticleDefinition *white)
 
 G4HadronBuilder (G4double mesonMix, G4double barionMix, std::vector< double > scalarMesonMix, std::vector< double > vectorMesonMix)
 

Detailed Description

Definition at line 46 of file G4HadronBuilder.hh.

Constructor & Destructor Documentation

◆ G4HadronBuilder()

G4HadronBuilder::G4HadronBuilder ( G4double  mesonMix,
G4double  barionMix,
std::vector< double >  scalarMesonMix,
std::vector< double >  vectorMesonMix 
)

Definition at line 43 of file G4HadronBuilder.cc.

46{
47 mesonSpinMix=mesonMix;
48 barionSpinMix=barionMix;
49 scalarMesonMixings=scalarMesonMix;
50 vectorMesonMixings=vectorMesonMix;
51}

Referenced by G4HadronBuilder().

Member Function Documentation

◆ Build()

G4ParticleDefinition * G4HadronBuilder::Build ( G4ParticleDefinition black,
G4ParticleDefinition white 
)

Definition at line 53 of file G4HadronBuilder.cc.

54{
55
56 if (black->GetParticleSubType()== "di_quark" || white->GetParticleSubType()== "di_quark" ) {
57
58// Barion
59 Spin spin = (G4UniformRand() < barionSpinMix) ? SpinHalf : SpinThreeHalf;
60 return Barion(black,white,spin);
61
62 } else {
63
64// Meson
65 Spin spin = (G4UniformRand() < mesonSpinMix) ? SpinZero : SpinOne;
66 return Meson(black,white,spin);
67
68 }
69}
#define G4UniformRand()
Definition: Randomize.hh:53
const G4String & GetParticleSubType() const

Referenced by G4VLongitudinalStringDecay::DiQuarkSplitup(), and G4VLongitudinalStringDecay::QuarkSplitup().

◆ BuildHighSpin()

G4ParticleDefinition * G4HadronBuilder::BuildHighSpin ( G4ParticleDefinition black,
G4ParticleDefinition white 
)

Definition at line 85 of file G4HadronBuilder.cc.

86{
87 if ( black->GetParticleSubType()== "quark" && white->GetParticleSubType()== "quark" ) {
88 return Meson(black,white, SpinOne);
89 } else {
90 return Barion(black,white,SpinThreeHalf);
91 }
92}

◆ BuildLowSpin()

G4ParticleDefinition * G4HadronBuilder::BuildLowSpin ( G4ParticleDefinition black,
G4ParticleDefinition white 
)

Definition at line 73 of file G4HadronBuilder.cc.

74{
75 if ( black->GetParticleSubType()== "quark" && white->GetParticleSubType()== "quark" ) {
76 return Meson(black,white, SpinZero);
77 } else {
78// will return a SpinThreeHalf Barion if all quarks the same
79 return Barion(black,white, SpinHalf);
80 }
81}

Referenced by G4VLongitudinalStringDecay::FragmentationMass().


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