Geant4 10.7.0
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 ()
 
virtual void SplitUp ()=0
 
virtual void SetFirstParton (G4int PDGcode)=0
 
virtual void SetSecondParton (G4int PDGcode)=0
 
virtual G4PartonGetNextParton ()=0
 
virtual G4PartonGetNextAntiParton ()=0
 
G4bool IsSplit ()
 
G4int GetSoftCollisionCount ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VSplitableHadron
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 = -2;
62 Parton[0] = NULL;
63}

◆ G4DiffractiveSplitableHadron() [3/4]

G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( const G4Nucleon aNucleon)

Definition at line 68 of file G4DiffractiveSplitableHadron.cc.

68 :
69 G4VSplitableHadron( aNucleon )
70{
71 PartonIndex = -2;
72 Parton[0] = NULL;
73}

◆ G4DiffractiveSplitableHadron() [4/4]

G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron ( const G4VKineticNucleon aNucleon)

Definition at line 78 of file G4DiffractiveSplitableHadron.cc.

78 :
79 G4VSplitableHadron( aNucleon )
80{
81 PartonIndex = -2;
82 Parton[0] = NULL;
83}

◆ ~G4DiffractiveSplitableHadron()

G4DiffractiveSplitableHadron::~G4DiffractiveSplitableHadron ( )

Definition at line 88 of file G4DiffractiveSplitableHadron.cc.

88{}

Member Function Documentation

◆ GetNextAntiParton()

G4Parton * G4DiffractiveSplitableHadron::GetNextAntiParton ( )
virtual

Implements G4VSplitableHadron.

Definition at line 138 of file G4DiffractiveSplitableHadron.cc.

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

◆ GetNextParton()

G4Parton * G4DiffractiveSplitableHadron::GetNextParton ( )
virtual

Implements G4VSplitableHadron.

Definition at line 127 of file G4DiffractiveSplitableHadron.cc.

127 {
128 ++PartonIndex;
129 if ( PartonIndex > 1 || PartonIndex < 0 ) return NULL;
130 G4int PartonInd( PartonIndex );
131 if ( PartonIndex == 1 ) PartonIndex = -1;
132 return Parton[ PartonInd ];
133}

◆ SetFirstParton()

void G4DiffractiveSplitableHadron::SetFirstParton ( G4int  PDGcode)
virtual

Implements G4VSplitableHadron.

Definition at line 149 of file G4DiffractiveSplitableHadron.cc.

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

◆ SetSecondParton()

void G4DiffractiveSplitableHadron::SetSecondParton ( G4int  PDGcode)
virtual

Implements G4VSplitableHadron.

Definition at line 159 of file G4DiffractiveSplitableHadron.cc.

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

◆ SplitUp()

void G4DiffractiveSplitableHadron::SplitUp ( )
virtual

Implements G4VSplitableHadron.

Definition at line 93 of file G4DiffractiveSplitableHadron.cc.

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

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