44 std::vector<double> scalarMesonMix,
45 std::vector<double> vectorMesonMix)
60 return Barion(black,white,spin);
66 return Meson(black,white,spin);
102 if (std::abs(charge) > 2 || std::abs(3.*charge - 3*
G4int(charge*1.001)) >
perCent )
105 G4cerr <<
" Invalid total charge found for on input: "
107 G4cerr <<
" PGDcode input quark1/quark2 : " <<
117 if ( std::abs(id1) < std::abs(id2) )
124 if (std::abs(id1) > 3 )
125 throw G4HadronicException(__FILE__, __LINE__,
"G4HadronBuilder::Meson : Illegal Quark content as input");
129 if (id1 + id2 == 0) {
131 G4int imix = 2*std::abs(id1) - 1;
142 PDGEncoding = 100 * std::abs(id1) + 10 * std::abs(id2) + theSpin;
143 G4bool IsUp = (std::abs(id1)&1) == 0;
145 if( (IsUp && IsAnti ) || (!IsUp && !IsAnti ) )
146 PDGEncoding = - PDGEncoding;
153 if (MesonDef == 0 ) {
154 G4cerr <<
" G4HadronBuilder - Warning: No particle for PDGcode= "
158 G4cerr <<
" G4HadronBuilder - Warning: Incorrect Charge : "
178 if (std::abs(charge) > 2 || std::abs(3.*charge - 3*
G4int(charge*1.001)) >
perCent )
181 G4cerr <<
" Invalid total charge found for on input: " << charge<<
G4endl;
182 G4cerr <<
" PGDcode input quark1/quark2 : " <<
191 if ( std::abs(id1) < std::abs(id2) )
198 if (std::abs(id1) < 1000 || std::abs(id2) > 3 )
199 throw G4HadronicException(__FILE__, __LINE__,
"G4HadronBuilder::Barion: Illegal quark content as input");
201 G4int ifl1= std::abs(id1)/1000;
202 G4int ifl2 = (std::abs(id1) - ifl1 * 1000)/100;
203 G4int diquarkSpin = std::abs(id1)%10;
211 G4int kfla = std::abs(ifl1);
212 G4int kflb = std::abs(ifl2);
213 G4int kflc = std::abs(ifl3);
220 G4int kfle = kfla + kflb + kflc - kfld - kflf;
223 theSpin = (kfla == kflb && kflb == kflc)?
SpinThreeHalf : theSpin;
226 if(theSpin ==
SpinHalf && kfld > kfle && kfle > kflf) {
231 if(diquarkSpin == 1 ) {
238 if(diquarkSpin == 3 && kfla != kfld)
243 if (kfll == 1) PDGEncoding = 1000 * kfld + 100 * kflf + 10 * kfle + theSpin;
244 else PDGEncoding = 1000 * kfld + 100 * kfle + 10 * kflf + theSpin;
246 if (id1 < 0) PDGEncoding = -PDGEncoding;
252 if (BarionDef == 0 ) {
253 G4cerr <<
" G4HadronBuilder - Warning: No particle for PDGcode= "
257 G4cerr <<
" G4HadronBuilder - Warning: Incorrect Charge : "
258 <<
" DiQuark/Quark = "
G4ParticleDefinition * BuildHighSpin(G4ParticleDefinition *black, G4ParticleDefinition *white)
std::vector< double > scalarMesonMixings
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
std::vector< double > vectorMesonMixings
G4ParticleDefinition * BuildLowSpin(G4ParticleDefinition *black, G4ParticleDefinition *white)
static constexpr double perCent
G4ParticleDefinition * Build(G4ParticleDefinition *black, G4ParticleDefinition *white)
G4ParticleDefinition * Barion(G4ParticleDefinition *black, G4ParticleDefinition *white, Spin spin)
G4int GetPDGEncoding() const
const G4String & GetParticleSubType() const
const G4String & GetParticleName() const
G4ParticleDefinition * Meson(G4ParticleDefinition *black, G4ParticleDefinition *white, Spin spin)
static G4ParticleTable * GetParticleTable()
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
G4double GetPDGCharge() const
G4GLOB_DLL std::ostream G4cerr