98 if ( Parton[0] != NULL )
return;
102 G4int stringStart, stringEnd;
103 ChooseStringEnds( PDGcode, &stringStart, &stringEnd );
105 Parton[0] =
new G4Parton( stringStart );
106 Parton[1] =
new G4Parton( stringEnd );
129 if ( PartonIndex > 1 || PartonIndex < 0 )
return NULL;
130 G4int PartonInd( PartonIndex );
131 if ( PartonIndex == 1 ) PartonIndex = -1;
132 return Parton[ PartonInd ];
140 if ( PartonIndex > 1 || PartonIndex < 0 )
return NULL;
141 G4int PartonInd( PartonIndex );
142 if ( PartonIndex == 1 ) PartonIndex = -1;
143 return Parton[ PartonInd ];
151 Parton[0] =
new G4Parton( PDGcode );
161 Parton[1] =
new G4Parton( PDGcode );
169void G4DiffractiveSplitableHadron::ChooseStringEnds(
G4int PDGcode,
G4int* aEnd,
170 G4int* bEnd )
const {
171 G4int absPDGcode = std::abs( PDGcode );
173 if ( absPDGcode < 1000 ) {
174 G4int heavy(0), light(0);
175 if (!((absPDGcode == 111)||(absPDGcode == 221)||(absPDGcode == 331)))
177 heavy = absPDGcode/100;
178 light = (absPDGcode % 100)/10;
180 G4int anti = 1 - 2*( std::max( heavy, light ) % 2 );
181 if (PDGcode < 0 ) anti *= -1;
188 else {heavy = 2; light = -2;}
198 G4int j1000 = PDGcode/1000;
199 G4int j100 = (PDGcode % 1000)/100;
200 G4int j10 = (PDGcode % 100)/10;
203 if ((j1000 == j100) && (j1000 == j10)) SuppresUUDDSS=1.;
205 const G4int maxNumberOfLoops = 1000;
206 G4int loopCounter = 0;
211 if (random < 0.33333)
213 if (( j100 == j10 ) && (
G4UniformRand() > SuppresUUDDSS ))
continue;
215 if ( j100 == j10 ) {*bEnd = Diquark( j100, j10, 1 );}
217 if (
G4UniformRand() > 0.25) {*bEnd = Diquark( j100, j10, 0 );}
218 else {*bEnd = Diquark( j100, j10, 1 );}
221 else if (random < 0.66667)
223 if (( j1000 == j10 ) && (
G4UniformRand() > SuppresUUDDSS ))
continue;
225 if ( j1000 == j10 ) {*bEnd = Diquark( j1000, j10, 1 );}
227 if (
G4UniformRand() > 0.25) {*bEnd = Diquark( j1000, j10, 0 );}
228 else {*bEnd = Diquark( j1000, j10, 1 );}
233 if (( j1000 == j100 ) && (
G4UniformRand() > SuppresUUDDSS ))
continue;
235 if ( j1000 == j100 ) {*bEnd = Diquark( j1000, j100, 1 );}
237 if (
G4UniformRand() > 0.25) {*bEnd = Diquark( j1000, j100, 0 );}
238 else {*bEnd = Diquark( j1000, j100, 1 );}
242 ++loopCounter < maxNumberOfLoops );
243 if ( loopCounter >= maxNumberOfLoops ) {
244 *aEnd = j10; *bEnd = Diquark( j1000, j100, 1 );
254 G4int diquarkPDG = std::max( std::abs( aquark ), std::abs( bquark ) ) * 1000 +
255 std::min( std::abs( aquark ), std::abs( bquark ) ) * 100 +
257 return ( aquark > 0 && bquark > 0 ) ? diquarkPDG : -1*diquarkPDG;
CLHEP::HepLorentzVector G4LorentzVector
void SetFirstParton(G4int PDGcode)
G4Parton * GetNextAntiParton()
G4DiffractiveSplitableHadron()
G4Parton * GetNextParton()
~G4DiffractiveSplitableHadron()
void SetSecondParton(G4int PDGcode)
G4int GetPDGEncoding() const
void Set4Momentum(const G4LorentzVector &aMomentum)
const G4ParticleDefinition * GetDefinition() const