99 if ( Parton[0] != NULL )
return;
103 G4int stringStart, stringEnd;
104 ChooseStringEnds( PDGcode, &stringStart, &stringEnd );
106 Parton[0] =
new G4Parton( stringStart );
107 Parton[1] =
new G4Parton( stringEnd );
116 if ( PartonIndex > 1 || PartonIndex < 0 )
return NULL;
117 G4int PartonInd( PartonIndex );
118 if ( PartonIndex == 1 ) PartonIndex = -1;
119 return Parton[ PartonInd ];
127 if ( PartonIndex > 1 || PartonIndex < 0 )
return NULL;
128 G4int PartonInd( PartonIndex );
129 if ( PartonIndex == 1 ) PartonIndex = -1;
130 return Parton[ PartonInd ];
138 Parton[0] =
new G4Parton( PDGcode );
146 Parton[1] =
new G4Parton( PDGcode );
152 void G4DiffractiveSplitableHadron::ChooseStringEnds(
G4int PDGcode,
G4int* aEnd,
153 G4int* bEnd )
const {
158 G4int absPDGcode = std::abs( PDGcode );
160 if ( absPDGcode < 1000 ) {
161 G4int heavy = absPDGcode/100;
162 G4int light = (absPDGcode % 100)/10;
165 if (PDGcode < 0 ) anti *= -1;
176 G4int j1000 = PDGcode/1000;
177 G4int j100 = (PDGcode % 1000)/100;
178 G4int j10 = (PDGcode % 100)/10;
180 if ( std::abs( j100 ) >= std::abs( j10 ) ) {
181 if ( random < udspin1 ) {
183 *bEnd = Diquark( j100, j10, 1 );
184 }
else if ( random < udspin1 + uuspin1 ) {
186 *bEnd = Diquark( j1000, j100, 1 );
190 *bEnd = Diquark( j1000, j10, j1000 != j100 ? 0 : 1 );
194 if ( random < udspin1 ) {
197 *bEnd = Diquark( j100, j10, j100 != j10 ? 0 : 10 );
198 }
else if ( random < udspin1 + uuspin1 ) {
200 *bEnd = Diquark( j1000, j100, 1 );
203 *bEnd = Diquark( j1000, j10, 1 );
214 G4int diquarkPDG =
std::max( std::abs( aquark ), std::abs( bquark ) ) * 1000 +
215 std::min( std::abs( aquark ), std::abs( bquark ) ) * 100 +
217 return ( aquark > 0 && bquark > 0 ) ? diquarkPDG : -1*diquarkPDG;
G4Parton * GetNextParton()
G4DiffractiveSplitableHadron()
G4int GetPDGEncoding() const
G4Parton * GetNextAntiParton()
G4ParticleDefinition * GetDefinition() const
void SetFirstParton(G4int PDGcode)
void SetSecondParton(G4int PDGcode)
~G4DiffractiveSplitableHadron()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments