101 if ( Parton[0] !=
nullptr )
return;
105 G4int stringStart, stringEnd;
106 ChooseStringEnds( PDGcode, &stringStart, &stringEnd );
108 Parton[0] =
new G4Parton( stringStart );
109 Parton[1] =
new G4Parton( stringEnd );
132 if ( PartonIndex > 1 || PartonIndex < 0 )
return nullptr;
133 G4int PartonInd( PartonIndex );
134 if ( PartonIndex == 1 ) PartonIndex = -1;
135 return Parton[ PartonInd ];
143 if ( PartonIndex > 1 || PartonIndex < 0 )
return nullptr;
144 G4int PartonInd( PartonIndex );
145 if ( PartonIndex == 1 ) PartonIndex = -1;
146 return Parton[ PartonInd ];
154 Parton[0] =
new G4Parton( PDGcode );
164 Parton[1] =
new G4Parton( PDGcode );
172void G4DiffractiveSplitableHadron::ChooseStringEnds(
G4int PDGcode,
G4int* aEnd,
173 G4int* bEnd )
const {
174 G4int absPDGcode = std::abs( PDGcode );
176 if ( absPDGcode < 1000 ) {
177 G4int heavy(0), light(0);
178 if (!((absPDGcode == 111)||(absPDGcode == 221)||(absPDGcode == 331)))
180 heavy = absPDGcode/100;
181 light = (absPDGcode % 100)/10;
183 G4int anti = 1 - 2*( std::max( heavy, light ) % 2 );
184 if (PDGcode < 0 ) anti *= -1;
191 else {heavy = 2; light = -2;}
201 G4int j1000 = PDGcode/1000;
202 G4int j100 = (PDGcode % 1000)/100;
203 G4int j10 = (PDGcode % 100)/10;
205 if ( absPDGcode > 4000 ) {
208 *bEnd = Diquark( j1000, j100, 0 );
210 *bEnd = Diquark( j1000, j100, 1 );
216 if ((j1000 == j100) && (j1000 == j10)) SuppresUUDDSS=1.;
218 const G4int maxNumberOfLoops = 1000;
219 G4int loopCounter = 0;
224 if (random < 0.33333)
226 if (( j100 == j10 ) && (
G4UniformRand() > SuppresUUDDSS ))
continue;
228 if ( j100 == j10 ) {*bEnd = Diquark( j100, j10, 1 );}
230 if (
G4UniformRand() > 0.25) {*bEnd = Diquark( j100, j10, 0 );}
231 else {*bEnd = Diquark( j100, j10, 1 );}
234 else if (random < 0.66667)
236 if (( j1000 == j10 ) && (
G4UniformRand() > SuppresUUDDSS ))
continue;
238 if ( j1000 == j10 ) {*bEnd = Diquark( j1000, j10, 1 );}
240 if (
G4UniformRand() > 0.25) {*bEnd = Diquark( j1000, j10, 0 );}
241 else {*bEnd = Diquark( j1000, j10, 1 );}
246 if (( j1000 == j100 ) && (
G4UniformRand() > SuppresUUDDSS ))
continue;
248 if ( j1000 == j100 ) {*bEnd = Diquark( j1000, j100, 1 );}
250 if (
G4UniformRand() > 0.25) {*bEnd = Diquark( j1000, j100, 0 );}
251 else {*bEnd = Diquark( j1000, j100, 1 );}
255 ++loopCounter < maxNumberOfLoops );
256 if ( loopCounter >= maxNumberOfLoops ) {
257 *aEnd = j10; *bEnd = Diquark( j1000, j100, 1 );
267 G4int diquarkPDG = std::max( std::abs( aquark ), std::abs( bquark ) ) * 1000 +
268 std::min( std::abs( aquark ), std::abs( bquark ) ) * 100 +
270 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