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

#include <G4DiffractiveSplitableHadron.hh>

+ Inheritance diagram for G4DiffractiveSplitableHadron:

Public Member Functions

 G4DiffractiveSplitableHadron ()
 
 G4DiffractiveSplitableHadron (const G4ReactionProduct &aPrimary)
 
 G4DiffractiveSplitableHadron (const G4Nucleon &aNucleon)
 
 G4DiffractiveSplitableHadron (const G4VKineticNucleon *aNucleon)
 
 ~G4DiffractiveSplitableHadron ()
 
void SplitUp ()
 
G4PartonGetNextParton ()
 
G4PartonGetNextAntiParton ()
 
void SetFirstParton (G4int PDGcode)
 
void SetSecondParton (G4int PDGcode)
 
- Public Member Functions inherited from G4VSplitableHadron
 G4VSplitableHadron ()
 
 G4VSplitableHadron (const G4ReactionProduct &aPrimary)
 
 G4VSplitableHadron (const G4Nucleon &aNucleon)
 
 G4VSplitableHadron (const G4VKineticNucleon *aNucleon)
 
virtual ~G4VSplitableHadron ()
 
G4bool operator== (const G4VSplitableHadron &right) const
 
G4bool operator!= (const G4VSplitableHadron &right) const
 
void Set4Momentum (const G4LorentzVector &a4Momentum)
 
const G4LorentzVectorGet4Momentum () const
 
void SetDefinition (const G4ParticleDefinition *aDefinition)
 
const G4ParticleDefinitionGetDefinition () const
 
void IncrementCollisionCount (G4int aCount)
 
void SetCollisionCount (G4int aCount)
 
void SetTimeOfCreation (G4double aTime)
 
G4double GetTimeOfCreation ()
 
void SetPosition (const G4ThreeVector &aPosition)
 
const G4ThreeVectorGetPosition () const
 
void SetStatus (const G4int aStatus)
 
G4int GetStatus ()
 
G4bool IsSplit ()
 
G4int GetSoftCollisionCount ()
 
void Splitting ()
 

Detailed Description

Definition at line 45 of file G4DiffractiveSplitableHadron.hh.

Constructor & Destructor Documentation

◆ G4DiffractiveSplitableHadron() [1/4]

G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( )

Definition at line 45 of file G4DiffractiveSplitableHadron.cc.

46{
47 PartonIndex = -1;
48 G4LorentzVector tmp=G4LorentzVector(0.,0.,0.,0.);
49 Parton[0] = new G4Parton( 1 );
50 Parton[1] = new G4Parton(-1 );
51
52 Parton[0]->Set4Momentum(tmp); Parton[1]->Set4Momentum(tmp);
53}
CLHEP::HepLorentzVector G4LorentzVector
void Set4Momentum(const G4LorentzVector &aMomentum)
Definition G4Parton.hh:148

◆ G4DiffractiveSplitableHadron() [2/4]

G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( const G4ReactionProduct & aPrimary)

Definition at line 58 of file G4DiffractiveSplitableHadron.cc.

58 :
59 G4VSplitableHadron( aPrimary )
60{
61 PartonIndex = -1;
62 Parton[0] = nullptr;
63 Parton[1] = nullptr;
64}

◆ G4DiffractiveSplitableHadron() [3/4]

G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( const G4Nucleon & aNucleon)

Definition at line 69 of file G4DiffractiveSplitableHadron.cc.

69 :
70 G4VSplitableHadron( aNucleon )
71{
72 PartonIndex = -1;
73 Parton[0] = nullptr;
74 Parton[1] = nullptr;
75}

◆ G4DiffractiveSplitableHadron() [4/4]

G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( const G4VKineticNucleon * aNucleon)

Definition at line 80 of file G4DiffractiveSplitableHadron.cc.

80 :
81 G4VSplitableHadron( aNucleon )
82{
83 PartonIndex = -1;
84 Parton[0] = nullptr;
85 Parton[1] = nullptr;
86}

◆ ~G4DiffractiveSplitableHadron()

G4DiffractiveSplitableHadron::~G4DiffractiveSplitableHadron ( )

Definition at line 91 of file G4DiffractiveSplitableHadron.cc.

91{}

Member Function Documentation

◆ GetNextAntiParton()

G4Parton * G4DiffractiveSplitableHadron::GetNextAntiParton ( )
virtual

Implements G4VSplitableHadron.

Definition at line 141 of file G4DiffractiveSplitableHadron.cc.

141 {
142 ++PartonIndex;
143 if ( PartonIndex > 1 || PartonIndex < 0 ) return nullptr;
144 G4int PartonInd( PartonIndex );
145 if ( PartonIndex == 1 ) PartonIndex = -1;
146 return Parton[ PartonInd ];
147}
int G4int
Definition G4Types.hh:85

◆ GetNextParton()

G4Parton * G4DiffractiveSplitableHadron::GetNextParton ( )
virtual

Implements G4VSplitableHadron.

Definition at line 130 of file G4DiffractiveSplitableHadron.cc.

130 {
131 ++PartonIndex;
132 if ( PartonIndex > 1 || PartonIndex < 0 ) return nullptr;
133 G4int PartonInd( PartonIndex );
134 if ( PartonIndex == 1 ) PartonIndex = -1;
135 return Parton[ PartonInd ];
136}

◆ SetFirstParton()

void G4DiffractiveSplitableHadron::SetFirstParton ( G4int PDGcode)
virtual

Implements G4VSplitableHadron.

Definition at line 152 of file G4DiffractiveSplitableHadron.cc.

152 {
153 delete Parton[0];
154 Parton[0] = new G4Parton( PDGcode );
155 G4LorentzVector tmp=G4LorentzVector(0.,0.,0.,0.);
156 Parton[0]->Set4Momentum(tmp);
157}

◆ SetSecondParton()

void G4DiffractiveSplitableHadron::SetSecondParton ( G4int PDGcode)
virtual

Implements G4VSplitableHadron.

Definition at line 162 of file G4DiffractiveSplitableHadron.cc.

162 {
163 delete Parton[1];
164 Parton[1] = new G4Parton( PDGcode );
165 G4LorentzVector tmp=G4LorentzVector(0.,0.,0.,0.);
166 Parton[1]->Set4Momentum(tmp);
167}

◆ SplitUp()

void G4DiffractiveSplitableHadron::SplitUp ( )
virtual

Implements G4VSplitableHadron.

Definition at line 96 of file G4DiffractiveSplitableHadron.cc.

96 {
97
98 if ( IsSplit() ) return;
99 Splitting();
100 // Split once only...
101 if ( Parton[0] != nullptr ) return;
102
103 // flavours of quark ends
104 G4int PDGcode = GetDefinition()->GetPDGEncoding();
105 G4int stringStart, stringEnd;
106 ChooseStringEnds( PDGcode, &stringStart, &stringEnd );
107
108 Parton[0] = new G4Parton( stringStart );
109 Parton[1] = new G4Parton( stringEnd );
110
111 G4LorentzVector tmp=G4LorentzVector(0.,0.,0.,0.);
112 Parton[0]->Set4Momentum(tmp); Parton[1]->Set4Momentum(tmp);
113
114 /* // Inversion of a string
115 if ( G4UniformRand() < 1.75 ) { //0.75
116 Parton[0] = new G4Parton( stringStart );
117 Parton[1] = new G4Parton( stringEnd );
118 } else {
119 Parton[0] = new G4Parton( stringEnd );
120 Parton[1] = new G4Parton( stringStart );
121 }
122 */
123
124 PartonIndex = -1;
125}
const G4ParticleDefinition * GetDefinition() const

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