Import Geant4 10.6.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2019-06-28 11:59:04 +02:00
parent 28a70706e0
commit d0f911957d
1056 changed files with 95168 additions and 78160 deletions
@@ -14,6 +14,14 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
16-May-2019 V.Ivanchenko hadr-pre-V10-05-01
- G4LowEGammaNuclearModel - new model based on pre-compound de-excitation
30-Apr-2019 V.Ivanchenko hadr-pre-V10-05-00
- G4PreCompoundEmission, G4PreCompoundFragment, G4VPreCompoundFragment
setup minimum number of points for probability integration 4;
minor code clean-up
09-Nov-2018 G.Cosmo hadr-pre-V10-04-02
- G4PreCompoundModel: fixed printout typos.
@@ -69,8 +69,8 @@ private:
G4HETCFragment(const G4HETCFragment &right);
const G4HETCFragment&
operator= (const G4HETCFragment &right);
G4int operator==(const G4HETCFragment &right) const;
G4int operator!=(const G4HETCFragment &right) const;
G4bool operator==(const G4HETCFragment &right) const;
G4bool operator!=(const G4HETCFragment &right) const;
G4double r2norm;
};
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Geant4 header : G4LowEGammaNuclearModel
// Created: 15 May 2019
// Author V.Ivanchenko
//
// Class Description
// Sampling of gamma nuclear interaction at low energy
// Class Description - End
//
#ifndef G4LowEGammaNuclearModel_h
#define G4LowEGammaNuclearModel_h 1
#include "globals.hh"
#include "G4HadronicInteraction.hh"
#include "G4HadProjectile.hh"
#include "G4Nucleus.hh"
#include "G4LorentzVector.hh"
class G4PreCompoundModel;
class G4LowEGammaNuclearModel : public G4HadronicInteraction
{
public:
explicit G4LowEGammaNuclearModel();
~G4LowEGammaNuclearModel() override;
G4HadFinalState* ApplyYourself(const G4HadProjectile & aTrack,
G4Nucleus & targetNucleus) final;
void InitialiseModel() final;
private:
G4LowEGammaNuclearModel & operator=
(const G4LowEGammaNuclearModel &right);
G4LowEGammaNuclearModel(const G4LowEGammaNuclearModel&);
G4PreCompoundModel* fPreco;
G4LorentzVector lab4mom;
};
#endif
@@ -60,8 +60,8 @@ private:
G4PreCompoundAlpha(const G4PreCompoundAlpha &right);
const G4PreCompoundAlpha&
operator= (const G4PreCompoundAlpha &right);
G4int operator==(const G4PreCompoundAlpha &right) const;
G4int operator!=(const G4PreCompoundAlpha &right) const;
G4bool operator==(const G4PreCompoundAlpha &right) const;
G4bool operator!=(const G4PreCompoundAlpha &right) const;
G4AlphaCoulombBarrier theAlphaCoulombBarrier;
@@ -60,8 +60,8 @@ private:
G4PreCompoundDeuteron(const G4PreCompoundDeuteron &right);
const G4PreCompoundDeuteron&
operator= (const G4PreCompoundDeuteron &right);
G4int operator==(const G4PreCompoundDeuteron &right) const;
G4int operator!=(const G4PreCompoundDeuteron &right) const;
G4bool operator==(const G4PreCompoundDeuteron &right) const;
G4bool operator!=(const G4PreCompoundDeuteron &right) const;
G4DeuteronCoulombBarrier theDeuteronCoulombBarrier;
};
@@ -83,8 +83,8 @@ private:
G4PreCompoundFragment(const G4PreCompoundFragment &right) = delete;
const G4PreCompoundFragment&
operator= (const G4PreCompoundFragment &right) = delete;
G4int operator==(const G4PreCompoundFragment &right) const = delete;
G4int operator!=(const G4PreCompoundFragment &right) const = delete;
G4bool operator==(const G4PreCompoundFragment &right) const = delete;
G4bool operator!=(const G4PreCompoundFragment &right) const = delete;
G4int index;
@@ -60,8 +60,8 @@ private:
G4PreCompoundHe3(const G4PreCompoundHe3 &right);
const G4PreCompoundHe3&
operator= (const G4PreCompoundHe3 &right);
G4int operator==(const G4PreCompoundHe3 &right) const;
G4int operator!=(const G4PreCompoundHe3 &right) const;
G4bool operator==(const G4PreCompoundHe3 &right) const;
G4bool operator!=(const G4PreCompoundHe3 &right) const;
G4He3CoulombBarrier theHe3CoulombBarrier;
};
@@ -69,8 +69,8 @@ private:
G4PreCompoundIon(const G4PreCompoundIon &right);
const G4PreCompoundIon&
operator= (const G4PreCompoundIon &right);
G4int operator==(const G4PreCompoundIon &right) const;
G4int operator!=(const G4PreCompoundIon &right) const;
G4bool operator==(const G4PreCompoundIon &right) const;
G4bool operator!=(const G4PreCompoundIon &right) const;
G4double fact;
};
@@ -58,8 +58,8 @@ private:
G4PreCompoundNeutron(const G4PreCompoundNeutron &right);
const G4PreCompoundNeutron&
operator= (const G4PreCompoundNeutron &right);
G4int operator==(const G4PreCompoundNeutron &right) const;
G4int operator!=(const G4PreCompoundNeutron &right) const;
G4bool operator==(const G4PreCompoundNeutron &right) const;
G4bool operator!=(const G4PreCompoundNeutron &right) const;
G4NeutronCoulombBarrier theNeutronCoulombBarrier;
};
@@ -61,8 +61,8 @@ private:
G4PreCompoundNucleon(const G4PreCompoundNucleon &right);
const G4PreCompoundNucleon&
operator= (const G4PreCompoundNucleon &right);
G4int operator==(const G4PreCompoundNucleon &right) const;
G4int operator!=(const G4PreCompoundNucleon &right) const;
G4bool operator==(const G4PreCompoundNucleon &right) const;
G4bool operator!=(const G4PreCompoundNucleon &right) const;
};
@@ -58,8 +58,8 @@ private:
G4PreCompoundProton(const G4PreCompoundProton &right);
const G4PreCompoundProton&
operator= (const G4PreCompoundProton &right);
G4int operator==(const G4PreCompoundProton &right) const;
G4int operator!=(const G4PreCompoundProton &right) const;
G4bool operator==(const G4PreCompoundProton &right) const;
G4bool operator!=(const G4PreCompoundProton &right) const;
G4ProtonCoulombBarrier theProtonCoulombBarrier;
};
@@ -60,8 +60,8 @@ private:
G4PreCompoundTriton(const G4PreCompoundTriton &right);
const G4PreCompoundTriton&
operator= (const G4PreCompoundTriton &right);
G4int operator==(const G4PreCompoundTriton &right) const;
G4int operator!=(const G4PreCompoundTriton &right) const;
G4bool operator==(const G4PreCompoundTriton &right) const;
G4bool operator!=(const G4PreCompoundTriton &right) const;
G4TritonCoulombBarrier theTritonCoulombBarrier;
};
@@ -125,8 +125,8 @@ private:
G4VPreCompoundFragment(const G4VPreCompoundFragment &right) = delete;
const G4VPreCompoundFragment&
operator= (const G4VPreCompoundFragment &right) = delete;
G4int operator==(const G4VPreCompoundFragment &right) const = delete;
G4int operator!=(const G4VPreCompoundFragment &right) const = delete;
G4bool operator==(const G4VPreCompoundFragment &right) const = delete;
G4bool operator!=(const G4VPreCompoundFragment &right) const = delete;
// =============
// Data members
@@ -65,6 +65,7 @@ GEANT4_DEFINE_MODULE(NAME G4had_preequ_exciton
G4HETCNeutron.hh
G4HETCProton.hh
G4HETCTriton.hh
G4LowEGammaNuclearModel.hh
G4LowEIonFragmentation.hh
G4PreCompoundAlpha.hh
G4PreCompoundDeuteron.hh
@@ -95,6 +96,7 @@ GEANT4_DEFINE_MODULE(NAME G4had_preequ_exciton
G4HETCNeutron.cc
G4HETCProton.cc
G4HETCTriton.cc
G4LowEGammaNuclearModel.cc
G4LowEIonFragmentation.cc
G4PreCompoundAlpha.cc
G4PreCompoundDeuteron.cc
@@ -0,0 +1,117 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Physics model class G4LowEGammaNuclearModel
// Created: 15 May 2019
// Author V.Ivanchenko
//
//
#include "G4LowEGammaNuclearModel.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4Fragment.hh"
#include "G4NucleiProperties.hh"
#include "G4DynamicParticle.hh"
#include "G4HadSecondary.hh"
#include "G4ReactionProduct.hh"
#include "G4ReactionProductVector.hh"
#include "G4HadronicParameters.hh"
#include "G4HadronicInteractionRegistry.hh"
#include "G4PreCompoundModel.hh"
#include "G4ThreeVector.hh"
G4LowEGammaNuclearModel::G4LowEGammaNuclearModel()
: G4HadronicInteraction("GammaNPreco"),lab4mom(0.,0.,0.,0.)
{
SetMinEnergy( 0.0*CLHEP::GeV );
SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
// reuse existing pre-compound model
G4HadronicInteraction* p =
G4HadronicInteractionRegistry::Instance()->FindModel("PRECO");
fPreco = static_cast<G4PreCompoundModel*>(p);
if(!fPreco) { fPreco = new G4PreCompoundModel(); }
}
G4LowEGammaNuclearModel::~G4LowEGammaNuclearModel()
{}
void G4LowEGammaNuclearModel::InitialiseModel()
{}
G4HadFinalState* G4LowEGammaNuclearModel::ApplyYourself(
const G4HadProjectile& aTrack, G4Nucleus& theNucleus)
{
theParticleChange.Clear();
G4int A = theNucleus.GetA_asInt();
G4int Z = theNucleus.GetZ_asInt();
// Create initial state
lab4mom.set(0.,0.,0.,G4NucleiProperties::GetNuclearMass(A, Z));
lab4mom += aTrack.Get4Momentum();
G4Fragment frag(A, Z, lab4mom);
if (verboseLevel > 1) {
G4cout << "G4LowEGammaNuclearModel::ApplyYourself initial G4Fragmet:"
<< G4endl;
G4cout << frag << G4endl;
}
G4ReactionProductVector* res = fPreco->DeExcite(frag);
// secondaries produced
if(res) {
theParticleChange.SetStatusChange(stopAndKill);
G4int nsec = res->size();
if (verboseLevel > 1) {
G4cout << "G4LowEGammaNuclearModel: " << nsec << " secondaries" << G4endl;
}
for(G4int i=0; i<nsec; ++i) {
if((*res)[i]) {
G4double ekin = (*res)[i]->GetKineticEnergy();
G4ThreeVector dir(0.,0.,1.);
if(ekin > 0.0) { dir = (*res)[i]->GetMomentum().unit(); }
G4HadSecondary* news = new G4HadSecondary(
new G4DynamicParticle((*res)[i]->GetDefinition(), dir, ekin));
news->SetTime((*res)[i]->GetTOF());
news->SetCreatorModelType((*res)[i]->GetCreatorModel());
theParticleChange.AddSecondary(*news);
if (verboseLevel > 1) {
G4cout << i << ". " << (*res)[i]->GetDefinition()->GetParticleName()
<< " Ekin(MeV)= " << ekin/MeV
<< " dir: " << dir << G4endl;
}
delete (*res)[i];
delete news;
}
}
delete res;
}
return &theParticleChange;
}
@@ -167,10 +167,6 @@ G4PreCompoundEmission::PerformEmission(G4Fragment & aFragment)
// Create a G4ReactionProduct
G4ReactionProduct * MyRP = thePreFragment->GetReactionProduct();
// if(kinEnergy < MeV) {
//G4cout << "G4PreCompoundEmission::Fragment emitted" << G4endl;
//G4cout << *thePreFragment << G4endl;
// }
return MyRP;
}
@@ -88,7 +88,7 @@ IntegrateEmissionProbability(G4double low, G4double up,
{
static const G4double den = 1.0/CLHEP::MeV;
G4double del = (up - low);
G4int nbins = std::max(3,(G4int)(del*den));
G4int nbins = std::max(4,(G4int)(del*den));
del /= (G4double)nbins;
G4double e = low + 0.5*del;
probmax = ProbabilityDistributionFunction(e, aFragment);
@@ -92,7 +92,7 @@ G4VPreCompoundFragment::Initialize(const G4Fragment & aFragment)
theCoulombBarrier = theCoulombBarrierPtr->
GetCoulombBarrier(theResA,theResZ,aFragment.GetExcitationEnergy());
theMinKinEnergy = (0 == OPTxs) ? theCoulombBarrier : theCoulombBarrier*0.7;
G4double elim = (0 == OPTxs) ? theCoulombBarrier : theCoulombBarrier*0.5;
// Calculate masses
theResMass = G4NucleiProperties::GetNuclearMass(theResA, theResZ);
@@ -104,7 +104,11 @@ G4VPreCompoundFragment::Initialize(const G4Fragment & aFragment)
// Compute Maximal Kinetic Energy which can be carried by fragments
// after separation - the true assimptotic value
G4double Ecm = aFragment.GetMomentum().m();
theMaxKinEnergy = ((Ecm-theResMass)*(Ecm+theResMass) + theMass*theMass)
/(2.0*Ecm) - theMass;
G4double Ecm = aFragment.GetMomentum().m();
G4double twoEcm = Ecm + Ecm;
theMaxKinEnergy = std::max(((Ecm-theResMass)*(Ecm+theResMass) + theMass*theMass)
/twoEcm - theMass,0.0);
theMinKinEnergy = (elim == 0.0) ? 0.0 :
std::max(((theMass+elim)*(twoEcm-theMass-elim) +
theMass*theMass)/twoEcm - theMass,0.0);
}