Import Geant4 10.7.1 source tree

This commit is contained in:
Gabriele Cosmo
2021-02-05 15:10:05 +01:00
parent dab42d2018
commit 3dfcdb544e
281 changed files with 37738 additions and 47638 deletions
@@ -84,7 +84,6 @@ G4MuonicAtomDecay::G4MuonicAtomDecay(G4HadronicInteraction* hiptr,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4MuonicAtomDecay::~G4MuonicAtomDecay()
//{delete theTotalResult;}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -176,7 +175,7 @@ G4VParticleChange* G4MuonicAtomDecay::DecayIt(const G4Track& aTrack,
G4ForceCondition* condition = nullptr; // it is unused in the following call anyway
G4double meanlife = GetMeanLifeTime(aTrack, condition);
G4HadFinalState* result = nullptr; // result before converting to G4VParticleChange*
G4HadFinalState* result = nullptr; // result before converting to G4VParticleChange*
// G4int nSecondaries = 0;
// save track time and start from zero time
// G4double time0 = aTrack.GetGlobalTime(); FillResult does it
@@ -220,7 +219,7 @@ G4VParticleChange* G4MuonicAtomDecay::DecayIt(const G4Track& aTrack,
G4VDecayChannel* decaychannel = nullptr;
G4double massParent = aParticle->GetMass();
decaychannel = decaytable->SelectADecayChannel(massParent);
if ( decaychannel ==0) {
if (decaychannel == nullptr) {
// decay channel not found
G4ExceptionDescription ed;
ed << "Can not determine decay channel for "
@@ -256,17 +255,18 @@ G4VParticleChange* G4MuonicAtomDecay::DecayIt(const G4Track& aTrack,
}
#endif
products = decaychannel->DecayIt(aParticle->GetMass());
if(!products) {
if(products == nullptr) {
G4ExceptionDescription ed;
ed << "No products are generated for "
<< aParticleDef->GetParticleName();
G4Exception("G4MuonicAtomDecay::DecayIt","DECAY003",FatalException,ed);
return &theTotalResult;
}
#ifdef G4VERBOSE
if (GetVerboseLevel()>1) {
decaychannel->SetVerboseLevel(temp);
}
if (GetVerboseLevel()>2 && products) {
if (GetVerboseLevel()>2) {
if (! products->IsChecked() ) products->DumpInfo();
}
#endif
@@ -304,11 +304,11 @@ G4VParticleChange* G4MuonicAtomDecay::DecayIt(const G4Track& aTrack,
// PostStep case
products->Boost( ParentEnergy, ParentDirection);
}
// G4ParticleChangeForDecay fParticleChangeForDecay; // is it equivalent to G4ParticleChange* theTotalResult;
//add products in theTotalResult
G4int numberOfSecondaries = products->entries();
G4int numberOfSecondaries = (nullptr != products) ? products->entries() : 0;
theTotalResult.SetNumberOfSecondaries(numberOfSecondaries);
#ifdef G4VERBOSE
if (GetVerboseLevel()>1) {
G4cout << "G4MuonicAtomDecay::DecayIt : Decay vertex :";
@@ -414,7 +414,7 @@ G4VParticleChange* G4MuonicAtomDecay::DecayIt(const G4Track& aTrack,
FatalException, ed);
}
// Loop checking, 06-Aug-2015, Vladimir Ivanchenko
} while(!result);
} while(result == nullptr);
// add delay time of capture (inter + intra)
G4int nsec = result->GetNumberOfSecondaries();
@@ -432,8 +432,6 @@ G4VParticleChange* G4MuonicAtomDecay::DecayIt(const G4Track& aTrack,
FillResult(result,aTrack);
// delete result;// causes bad free check fixme; move to the class members?
ClearNumberOfInteractionLengthLeft();
return &theTotalResult;