Import Geant4 10.6.1 source tree
This commit is contained in:
@@ -14,6 +14,26 @@ code and to keep track of all tags.
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
06 February 2019 Vladimir Ivanchenko (hadr-casc-V10-05-03)
|
||||
-----------------------------------------------------------
|
||||
13 January 2020 Dennis Wright
|
||||
----------------------------------------------------
|
||||
- G4CascadeInterface.cc: fix memory leak by deleting ltcollider in class
|
||||
dtor
|
||||
|
||||
10 January 2020 Michael Kelsey
|
||||
-----------------------------------------------------
|
||||
- G4CascadeParamMessenger.cc: Ensure that Bertini-specific commands get
|
||||
added to /process/had/cascade/ directory, instead of /process/had.
|
||||
Requires resetting cmdDir=0 between CreateDirectory() calls.
|
||||
|
||||
16 December 2019 Vladimir Ivanchenko
|
||||
-----------------------------------------------------------
|
||||
- G4CascadeCheckBalance: fixed outstanding problem of the interface
|
||||
with native pre-compound model, which happens since in the
|
||||
default de-excitation internal electron conversion become
|
||||
enabled
|
||||
|
||||
7 November 2019 Dennis Wright (hadr-casc-V10-05-02)
|
||||
-----------------------------------------------------
|
||||
- G4LightTargetCollider: fix crash when gamma energy below deuteron
|
||||
|
||||
@@ -118,6 +118,21 @@ void G4CascadeCheckBalance::collide(G4InuclParticle* bullet,
|
||||
if (pbullet) initialStrange += pbullet->getStrangeness();
|
||||
if (ptarget) initialStrange += ptarget->getStrangeness();
|
||||
|
||||
G4int nelec = 0;
|
||||
G4double elMass = 0.;
|
||||
std::vector<G4InuclElementaryParticle>& outParts =
|
||||
output.getOutgoingParticles();
|
||||
for (G4int i = 0; i < output.numberOfOutgoingParticles(); i++) {
|
||||
if (outParts[i].getDefinition() == G4Electron::Electron() ) {
|
||||
elMass += outParts[i].getDefinition()->GetPDGMass();
|
||||
++nelec;
|
||||
}
|
||||
}
|
||||
if(nelec > 0) {
|
||||
initial += G4LorentzVector(0.,0.,0.,elMass/GeV);
|
||||
initialCharge -= nelec;
|
||||
}
|
||||
|
||||
// Final state totals are computed for us
|
||||
final = output.getTotalOutputMomentum();
|
||||
finalBaryon = output.getTotalBaryonNumber();
|
||||
@@ -155,13 +170,20 @@ void G4CascadeCheckBalance::collide(const G4Fragment& fragment,
|
||||
|
||||
// Remove electron masses when internal conversion occurs
|
||||
G4double elMass = 0.;
|
||||
std::vector<G4InuclElementaryParticle> outParts = output.getOutgoingParticles();
|
||||
std::vector<G4InuclElementaryParticle>& outParts =
|
||||
output.getOutgoingParticles();
|
||||
G4int nelec = 0;
|
||||
for (G4int i = 0; i < output.numberOfOutgoingParticles(); i++) {
|
||||
if (outParts[i].getDefinition() == G4Electron::Electron() )
|
||||
elMass += outParts[i].getDefinition()->GetPDGMass();
|
||||
if (outParts[i].getDefinition() == G4Electron::Electron() ) {
|
||||
elMass += outParts[i].getDefinition()->GetPDGMass();
|
||||
++nelec;
|
||||
}
|
||||
}
|
||||
if(nelec > 0) {
|
||||
initial += G4LorentzVector(0.,0.,0.,elMass/GeV);
|
||||
initialCharge -= nelec;
|
||||
}
|
||||
|
||||
final.setE(final.e() - elMass/GeV);
|
||||
finalBaryon = output.getTotalBaryonNumber();
|
||||
finalCharge = output.getTotalCharge();
|
||||
finalStrange = output.getTotalStrangeness();
|
||||
|
||||
@@ -167,6 +167,7 @@ G4CascadeInterface::G4CascadeInterface(const G4String& name)
|
||||
G4CascadeInterface::~G4CascadeInterface() {
|
||||
clear();
|
||||
delete collider; collider=0;
|
||||
delete ltcollider; ltcollider = 0;
|
||||
delete balance; balance=0;
|
||||
delete output; output=0;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// 20130703 M. Kelsey -- Add flag for USE_PHASESPACE
|
||||
// 20141030 M. Kelsey -- Add flag to enable direct pi-N absorption
|
||||
// 20141211 M. Kelsey -- Change PIN_ABSORPTION flag to double, for energy cut
|
||||
// 20200110 M. Kelsey -- Reset cmdDir to 0 before .../cascade/ directory.
|
||||
|
||||
#include "G4CascadeParamMessenger.hh"
|
||||
#include "G4CascadeParameters.hh"
|
||||
@@ -50,7 +51,7 @@
|
||||
G4CascadeParamMessenger::G4CascadeParamMessenger(G4CascadeParameters* params)
|
||||
: G4UImessenger(), theParams(params), cmdDir(0), localCmdDir(false) {
|
||||
// NOTE: Put under same top-level tree as EM
|
||||
CreateDirectory("/process/had/","Hadronic processes");
|
||||
CreateDirectory("/process/had/","Hadronic processes"); cmdDir=0;
|
||||
CreateDirectory("/process/had/cascade/","Bertini-esque cascade parameters");
|
||||
|
||||
verboseCmd = CreateCommand<G4UIcmdWithAnInteger>("verbose",
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
|
||||
#include "G4CollisionOutput.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4CascadParticle.hh"
|
||||
#include "G4CascadeParameters.hh"
|
||||
#include "G4Electron.hh"
|
||||
@@ -254,15 +255,8 @@ G4int G4CollisionOutput::getTotalCharge() const {
|
||||
G4int charge = 0;
|
||||
G4int i(0);
|
||||
|
||||
if (G4CascadeParameters::usePreCompound() ) {
|
||||
// Possible to have internal conversion electron
|
||||
for (i = 0; i < numberOfOutgoingParticles(); i++)
|
||||
if (outgoingParticles[i].getDefinition() != G4Electron::Electron() )
|
||||
charge += G4int(outgoingParticles[i].getCharge());
|
||||
} else {
|
||||
for (i = 0; i < numberOfOutgoingParticles(); i++)
|
||||
charge += G4int(outgoingParticles[i].getCharge());
|
||||
}
|
||||
for (i = 0; i < numberOfOutgoingParticles(); i++)
|
||||
charge += G4int(outgoingParticles[i].getCharge());
|
||||
|
||||
for (i = 0; i < numberOfOutgoingNuclei(); i++)
|
||||
charge += G4int(outgoingNuclei[i].getCharge());
|
||||
@@ -426,6 +420,12 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
G4cout << " target momentum = " << momt.e()<<", "<< momt.x()<<", "<< momt.y()<<", "<< momt.z()<<G4endl;
|
||||
G4cout << " Fstate momentum = " << out_mom.e()<<", "<< out_mom.x()<<", "<< out_mom.y()<<", "<< out_mom.z()<<G4endl;
|
||||
}
|
||||
// correction for internal conversion
|
||||
G4LorentzVector el4mom(0.,0.,0.,electron_mass_c2/GeV);
|
||||
for(G4int i=0; i < numberOfOutgoingParticles(); ++i) {
|
||||
if (outgoingParticles[i].getDefinition() == G4Electron::Electron())
|
||||
momt += el4mom;
|
||||
}
|
||||
|
||||
ini_mom += momt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user