Geant4 11.2.2
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 (const std::vector< G4double > &mesonMix, const G4double barionMix, const std::vector< G4double > &scalarMesonMix, const std::vector< G4double > &vectorMesonMix, const G4double Eta_cProb, const G4double Eta_bProb)
 

Detailed Description

Definition at line 45 of file G4HadronBuilder.hh.

Constructor & Destructor Documentation

◆ G4HadronBuilder()

G4HadronBuilder::G4HadronBuilder ( const std::vector< G4double > & mesonMix,
const G4double barionMix,
const std::vector< G4double > & scalarMesonMix,
const std::vector< G4double > & vectorMesonMix,
const G4double Eta_cProb,
const G4double Eta_bProb )

Definition at line 45 of file G4HadronBuilder.cc.

49{
50 mesonSpinMix = mesonMix;
51 barionSpinMix = barionMix;
52 scalarMesonMixings = scalarMesonMix;
53 vectorMesonMixings = vectorMesonMix;
54 ProbEta_c = Eta_cProb;
55 ProbEta_b = Eta_bProb;
56}

Referenced by G4HadronBuilder().

Member Function Documentation

◆ Build()

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

Definition at line 60 of file G4HadronBuilder.cc.

61{
62 if (black->GetParticleSubType()== "di_quark" || white->GetParticleSubType()== "di_quark" ) {
63 // Barion
64 Spin spin = (G4UniformRand() < barionSpinMix) ? SpinHalf : SpinThreeHalf;
65 return Barion(black,white,spin);
66 } else {
67 // Meson
68 G4int StrangeQ = 0;
69 if( std::abs(black->GetPDGEncoding()) >= 3 ) StrangeQ++;
70 if( std::abs(white->GetPDGEncoding()) >= 3 ) StrangeQ++;
71 Spin spin = (G4UniformRand() < mesonSpinMix[StrangeQ]) ? SpinZero : SpinOne;
72 return Meson(black,white,spin);
73 }
74}
int G4int
Definition G4Types.hh:85
#define G4UniformRand()
Definition Randomize.hh:52
const G4String & GetParticleSubType() const

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

◆ BuildHighSpin()

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

Definition at line 90 of file G4HadronBuilder.cc.

91{
92 if ( black->GetParticleSubType()== "quark" && white->GetParticleSubType()== "quark" ) {
93 return Meson(black,white, SpinOne);
94 } else {
95 return Barion(black,white,SpinThreeHalf);
96 }
97}

◆ BuildLowSpin()

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

Definition at line 78 of file G4HadronBuilder.cc.

79{
80 if ( black->GetParticleSubType()== "quark" && white->GetParticleSubType()== "quark" ) {
81 return Meson(black,white, SpinZero);
82 } else {
83 // will return a SpinThreeHalf Barion if all quarks the same
84 return Barion(black,white, SpinHalf);
85 }
86}

Referenced by G4VLongitudinalStringDecay::PossibleHadronMass().


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