Import Geant4 10.6.2 source tree

This commit is contained in:
Gabriele Cosmo
2020-05-29 14:54:29 +02:00
parent 8c87fe78c4
commit c02c370437
448 changed files with 23779 additions and 31516 deletions
@@ -787,14 +787,10 @@ Diquark_AntiDiquark_belowThreshold_lastSplitting(G4FragmentingString * & string,
{
G4double StringMass = string->Mass();
G4int cClusterInterrupt = 0;
G4bool isOK = false;
G4int cClusterInterrupt = 0;
do
{
if (cClusterInterrupt++ >= ClusterLoopInterrupt)
{
return false;
}
G4int LeftQuark1= string->GetLeftParton()->GetPDGEncoding()/1000;
G4int LeftQuark2=(string->GetLeftParton()->GetPDGEncoding()/100)%10;
@@ -805,24 +801,27 @@ Diquark_AntiDiquark_belowThreshold_lastSplitting(G4FragmentingString * & string,
{
LeftHadron =hadronizer->Build(FindParticle( LeftQuark1),
FindParticle(RightQuark1));
RightHadron=hadronizer->Build(FindParticle( LeftQuark2),
FindParticle(RightQuark2));
} else
{
LeftHadron =hadronizer->Build(FindParticle( LeftQuark1),
FindParticle(RightQuark2));
RightHadron=hadronizer->Build(FindParticle( LeftQuark2),
FindParticle(RightQuark1));
}
RightHadron= (LeftHadron == nullptr) ? nullptr :
hadronizer->Build(FindParticle( LeftQuark2),
FindParticle(RightQuark2));
} else
{
LeftHadron =hadronizer->Build(FindParticle( LeftQuark1),
FindParticle(RightQuark2));
RightHadron=(LeftHadron == nullptr) ? nullptr :
hadronizer->Build(FindParticle( LeftQuark2),
FindParticle(RightQuark1));
}
if ( (LeftHadron == NULL) || (RightHadron == NULL) ) continue;
//... repeat procedure, if mass of cluster is too low to produce hadrons
//... ClusterMassCut = 0.15*GeV model parameter
}
while ((StringMass <= LeftHadron->GetPDGMass() + RightHadron->GetPDGMass()));
return true;
isOK = (LeftHadron != nullptr) && (RightHadron != nullptr);
if(isOK) { isOK = (StringMass > LeftHadron->GetPDGMass() + RightHadron->GetPDGMass()); }
++cClusterInterrupt;
//... repeat procedure, if mass of cluster is too low to produce hadrons
//... ClusterMassCut = 0.15*GeV model parameter
}
while (isOK == false || cClusterInterrupt < ClusterLoopInterrupt);
/* Loop checking, 07.08.2015, A.Ribon */
return isOK;
}
//----------------------------------------------------------------------------------------
@@ -615,22 +615,18 @@ G4bool G4QGSMFragmentation::SplitLast(G4FragmentingString * string,
<<string->GetRightParton()->GetParticleName()<<G4endl;
#endif
G4int cClusterInterrupt = 0;
G4ParticleDefinition *LeftHadron = nullptr;
G4ParticleDefinition *RightHadron = nullptr;
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = 0;
G4bool isOK = false;
G4double LeftHadronMass(0.); G4double RightHadronMass(0.);
do
{
if (cClusterInterrupt++ >= ClusterLoopInterrupt)
{
return false;
}
LeftHadronMass = -MaxMass; RightHadronMass = -MaxMass;
G4ParticleDefinition * quark = NULL;
G4ParticleDefinition * quark = nullptr;
string->SetLeftPartonStable(); // to query quark contents..
if (string->DecayIsQuark() && string->StableIsQuark() )
@@ -663,20 +659,25 @@ G4bool G4QGSMFragmentation::SplitLast(G4FragmentingString * string,
LeftHadron=hadronizer->BuildLowSpin(QuarkPair.first, string->GetLeftParton());
}
if ( LeftHadron == NULL ) continue;
if ( LeftHadron != nullptr ) {
RightHadron = hadronizer->BuildLowSpin(string->GetRightParton(), quark);
RightHadron = hadronizer->BuildLowSpin(string->GetRightParton(), quark);
if ( RightHadron != nullptr ) {
if ( RightHadron == NULL ) continue;
LeftHadronMass = LeftHadron->GetPDGMass();
RightHadronMass = RightHadron->GetPDGMass();
} while ( ( ResidualMass <= LeftHadronMass + RightHadronMass )
&& ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return false;
LeftHadronMass = LeftHadron->GetPDGMass();
RightHadronMass = RightHadron->GetPDGMass();
isOK = (ResidualMass > LeftHadronMass + RightHadronMass);
}
}
++loopCounter;
if ( loopCounter >= maxNumberOfLoops ) {
return false;
}
//... repeat procedure, if mass of cluster is too low to produce hadrons
//... ClusterMassCut = 0.15*GeV model parameter
}
while (isOK == false);
/* Loop checking, 07.08.2015, A.Ribon */
//... compute hadron momenta and energies
G4LorentzVector LeftMom, RightMom;