Skip to content
Snippets Groups Projects
Commit 413768ed authored by Marco Clemencic's avatar Marco Clemencic
Browse files

v83r2

parent 68fe2aff
No related branches found
No related tags found
No related merge requests found
Showing
with 121 additions and 573 deletions
package G4config
version v83r1p2
version v83r2
branches cmt doc
......@@ -12,15 +12,15 @@ use CLHEP v* LCG_Interfaces
#==============================================================================
# set versions of Geant4
#==============================================================================
set G4_native_version "geant4.8.3.p01"
set G4VERS v83r1p2
set G4_native_version "8.3.p02"
set G4VERS v83r2
# =============================================================================
# set Geant4 environment variables
#=============================================================================
set G4PATH "${SITEROOT}/sw/geant4/releases"
set G4PATH "${SITEROOT}/sw/lcg/external/geant4"
set G4SHARE "${G4PATH}/share/${G4_native_version}"
set G4SHARE "${G4PATH}/${G4_native_version}/share"
set G4SRC "${G4SHARE}/source"
......@@ -28,7 +28,7 @@ set G4SRC "${G4SHARE}/source"
# ============ general macros =================================================
# =============================================================================
macro G4config_pp_cppflags " -DG4_STORE_TRAJECTORY" \
macro G4config_pp_cppflags " -DG4_STORE_TRAJECTORY " \
WIN32 ' /D"G4_STORE_TRAJECTORY" /D"G4VERBOSE" /D"XPNET" /D"G4LIB_BUILD_DLL"'\
Unix&debug " -DG4_STORE_TRAJECTORY -DG4VERBOSE "
......
v83r1p2
v83r2
......@@ -4,6 +4,12 @@
! Purpose : Configuration package for Geant4 build
!-----------------------------------------------------------------------------
!======================== G4config v83r2 2008-06-09 ==========================
! 2008-06-09 - Gloria CORTI
- Build based on geant4.8.3.p02
- Take source from $SITEROOT/sw/lcg/external rather then $SITEROOT/sw/geant4
- Compile with Gaudi v19r9
!====================== G4config v83r1p2 2008-03-20 ==========================
! 2008-03-20 - Gloria CORTI
- Compile with Gaudi v19r8
......
package G4digits_hits
version v5r0
version v6r0
branches cmt doc G4digits_hits
......@@ -14,7 +14,8 @@ use G4track v* Geant4
library G4digits_hits $(G4LibraryFlags) \
../detector/src/*.cc \
../digits/src/*.cc \
../hits/src/*.cc
../hits/src/*.cc \
../utils/src/*.cc
# =============================================================================
# ============ mandatory patterns =============================================
......
v5r0
v6r0
......@@ -4,8 +4,15 @@
! Purpose :
!-----------------------------------------------------------------------------
!=========================== G4digits_hits v6r0 =============================
! 2008-02-19 - Gloria CORTI
- add compilation of code in utils directory introduced in Geant4 8.0.
It contains some primitive scorers implementations. Not used in Gauss
but made available. It is necessary for Geant4 9.1 where code otherwise
has undefined symbols for parallel navigation
!=========================== G4digits_hits v5r0 =============================
! 2004-10-11 - Florence RANJARD
- add G4digits_hits_pp_cppflag setting to build dynamic library on WIN32
!===========================================================================
\ No newline at end of file
!===========================================================================
package G4geometry
version v6r0
version v6r1
branches cmt doc G4geometry
......@@ -24,7 +24,7 @@ library G4geometry $(G4LibraryFlags) \
../magneticfield/src/*.cc \
../navigation/src/*.cc \
../biasing/src/*.cc \
../divisions/*src/*.cc
../divisions/src/*.cc
# =============================================================================
# ============ mandatory pattersn =============================================
......
v6r0
v6r1
......@@ -4,6 +4,10 @@
! Purpose :
!-----------------------------------------------------------------------------
!======================== G4geometry v6r1 2008-06-09 =========================
! 2008-06-09 - Gloria CORTI
- Fix requirements to pick code from divisions subdirectory
!=================== G4geometry v6r0 ==================================
! 2004-07-07 - Florence RANJARD
- requirements - set /D"G4GEOM_ALLOC_EXPORT" on WIN32
......@@ -17,4 +21,4 @@
- requirements - add navigation/ directory in compilation
remove STEP/ directory
!==========================================================================
\ No newline at end of file
!==========================================================================
package G4particles
version v5r0
version v6r0
branches cmt doc G4particles
# =============================================================================
......@@ -19,7 +19,8 @@ library G4particles $(G4LibraryFlags) \
../shortlived/src/*.cc \
../hadrons/mesons/src/*.cc \
../hadrons/barions/src/*.cc \
../hadrons/ions/src/*.cc
../hadrons/ions/src/*.cc \
../utils/src/*.cc
# =============================================================================
# ============ apply all nesessary patterns ===================================
......
v5r0
v6r0
......@@ -4,6 +4,10 @@
! Purpose :
!-----------------------------------------------------------------------------
!======================== G4particles v6r0 2008-06-09 ========================
! 2008-06-09 - Gloria CORTI
- Include sources from utils subdirectory
!==================== G4particles v5r0 =================================
! 2004-07-07 - Florence RANJARD
- requirements - set /D"G4PARTICLES_ALLOC_EXPORT" on WIN32
......
package G4physics_lists
version v1r0
#============================================================================
# Created : 2007-01-15
# Maintainer : Gloria CORTI
#============================================================================
package G4physics_lists
version v1r1
branches cmt doc G4physics_lists
# Structure, i.e. directories to process.
#============================================================================
branches cmt doc G4physics_lists
use G4processes v* Geant4
# Used packages.
#============================================================================
use G4processes v* Geant4
# Library building rule
#============================================================================
library G4physics_lists $(G4LibraryFlags) \
../lists/src/*.cc \
../builders/src/*.cc \
../srcnew/*.cc
../builders/src/*.cc
# Apply Geant4 patterns
#============================================================================
apply_pattern G4AllCMTpatterns
private
......
v1r0
v1r1
......@@ -4,6 +4,10 @@
! Purpose :
!-----------------------------------------------------------------------------
!====================== G4physics_lists v1r1 2008-06-09 ======================
! 2008-06-09 - Gloria CORTI
- remove from library srcnew that does not exist
!===================== G4physics_lists v1r0 2007-01-15 =====================
! 2007-01-15 - Florence Ranjard
- replace G4hadlists
......
package G4processes
version v4r3p1
branches cmt doc G4processes
#============================================================================
# Created : 2008-02-20
# Maintainer : Gloria CORTI
#============================================================================
package G4processes
version v5r0
# =============================================================================
# ============ dependencies ===================================================
# =============================================================================
use G4track v* Geant4
# Structure, i.e. directories to process.
#============================================================================
branches cmt doc G4processes
# =============================================================================
# ============ the library ====================================================
# =============================================================================
# Dependencies
#============================================================================
use G4digits_hits v* Geant4
# Library
#============================================================================
library G4processes $(G4LibraryFlags) \
../management/src/*.cc \
../optical/src/*.cc \
../decay/src/*.cc \
../transportation/src/*.cc \
../parameterisation/src/*.cc \
../photolepton_hadron/src/*.cc \
../cuts/src/*.cc \
../scoring/src/*.cc \
-s=../electromagnetic \
muons/src/*.cc \
standard/src/*.cc \
utils/src/*.cc \
xrays/src/*.cc \
lowenergy/src/*.cc \
highenergy/src/*.cc \
polarisation/src/*.cc \
# the library had to be split in 2 parts: there is too many symbols
# exported for the windows linker otherwise (>32768)
......@@ -35,8 +42,10 @@ library G4processeshad $(G4LibraryFlags) \
../hadronic/cross_sections/src/*.cc \
../hadronic/stopping/src/*.cc \
-s=../hadronic/models \
abrasion/src/*.cc \
binary_cascade/src/*.cc \
coherent_elastic/src/*.cc \
em_dissociation/src/*.cc \
high_energy/src/*.cc \
im_r_matrix/src/*.cc \
isotope_production/src/*.cc \
......@@ -48,6 +57,7 @@ library G4processeshad $(G4LibraryFlags) \
theo_high_energy/src/*.cc \
util/src/*.cc \
-s=../hadronic/models/de_excitation \
ablation/src/*.cc \
evaporation/src/*.cc \
fermi_breakup/src/*.cc \
fission/src/*.cc \
......@@ -76,13 +86,12 @@ library G4processeshad $(G4LibraryFlags) \
# =============================================================================
# ============ apply all mandatory patterns ===================================
# =============================================================================
# Patterns
#============================================================================
apply_pattern G4AllCMTpatterns
# apply complement patterns for the second library
apply_pattern library_Softlinks library=G4processeshad
apply_pattern library_Softlinks library=G4processeshad
apply_pattern library_Llinkopts library=G4processeshad
apply_pattern library_Lshlibflags library=G4processeshad
......@@ -91,9 +100,8 @@ macro_append G4processeshad_use_linkopts " -lG4processes" \
macro_append G4processeshad_dependencies G4processes
# =============================================================================
# ============ the end ========================================================
# =============================================================================
#============================================================================
private
macro G4processes_source "$(G4CONFIGROOT)/cmt/copy_source"
setup_script $(G4processes_source)
v4r3p1
v5r0
......@@ -4,6 +4,26 @@
! Purpose :
!-----------------------------------------------------------------------------
!======================== G4processes v5r0 2008-06-09 ========================
! 2008-06-09 - Gloria CORTI
- Remove code G4CascadeInterface.cc from srcnew since no longer used beacuase
fix was introduced in Geant4 itself
- Add in library some more source subdirectories even if not used in our
physics lists:
. scoring (new in 8.2)
. electromagnetic/highenergy (new 7.0)
. electromagnetic/polarization (new in 8.2)
. hadronic/models/abrasion (new in 6.2)
. hadronic/models/em_dissociation (new in 6.2)
. hadronic/models/de_excitation/ablation (new in 6.2)
Remove from library subdirectory em/photolepton_hadron (empty since 6.0)
and use G4digits_hits
!========================== G4processes v4r3p1 ===============================
! 2007-07-25 - Hubert DEGAUDENZI
- Split the library in 2 parts: otherwise there are too many symbols
exported for the windows linker (>32768)
!======================= G4processes v4r3 =================================
! 2007-03-23 - Florence RANJARD
- remove srcnew nolonger necessary with geant4.8.2.p01
......
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#include "G4CascadeInterface.hh"
#include "globals.hh"
#include "G4DynamicParticleVector.hh"
#include "G4IonTable.hh"
#include "G4InuclCollider.hh"
#include "G4IntraNucleiCascader.hh"
#include "G4ElementaryParticleCollider.hh"
#include "G4NonEquilibriumEvaporator.hh"
#include "G4EquilibriumEvaporator.hh"
#include "G4Fissioner.hh"
#include "G4BigBanger.hh"
#include "G4InuclElementaryParticle.hh"
#include "G4InuclNuclei.hh"
#include "G4InuclParticle.hh"
#include "G4CollisionOutput.hh"
#include "G4V3DNucleus.hh"
#include "G4Track.hh"
#include "G4Nucleus.hh"
#include "G4NucleiModel.hh"
#include "G4LorentzRotation.hh"
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
typedef std::vector<G4InuclNuclei>::iterator nucleiIterator;
G4CascadeInterface::G4CascadeInterface()
:verboseLevel(0) {
if (verboseLevel > 3) {
G4cout << " >>> G4CascadeInterface::G4CascadeInterface - LHCb modified"
<< G4endl;
}
}
G4ReactionProductVector* G4CascadeInterface::Propagate(G4KineticTrackVector* ,
G4V3DNucleus* ) {
return 0;
}
// #define debug_G4CascadeInterface
G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& theNucleus) {
#ifdef debug_G4CascadeInterface
static G4int counter(0);
counter++;
G4cerr << "Reaction number "<< counter << " "<<aTrack.GetDynamicParticle()->GetDefinition()->GetParticleName()<<" "<< aTrack.GetDynamicParticle()->GetKineticEnergy()<<G4endl;
#endif
theResult.Clear();
if (verboseLevel > 3) {
G4cout << " >>> G4CascadeInterface::ApplyYourself" << G4endl;
};
G4double eInit = 0.0;
G4double eTot = 0.0;
G4double sumBaryon = 0.0;
G4double sumEnergy = 0.0;
// Make conversion between native Geant4 and Bertini cascade classes.
// NOTE: Geant4 units are MeV = 1 and GeV = 1000. Cascade code by default use GeV = 1.
#ifdef G4BERTINI_KAON
enum particleType { nuclei = 0, proton = 1, neutron = 2, pionPlus = 3,
pionMinus = 5, pionZero = 7, photon = 10,
kaonPlus = 11, kaonMinus = 13, kaonZero = 15,
kaonZeroBar = 17, lambda = 21, sigmaPlus = 23,
sigmaZero = 25, sigmaMinus = 27, xiZero = 29, xiMinus = 31 };
#else
enum particleType { nuclei = 0, proton = 1, neutron = 2, pionPlus = 3, pionMinus = 5, pionZero = 7, photon = 10 };
#endif
G4int bulletType = 0;
// Coding particles
if (aTrack.GetDefinition() == G4Proton::Proton() ) bulletType = proton;
if (aTrack.GetDefinition() == G4Neutron::Neutron() ) bulletType = neutron;
if (aTrack.GetDefinition() == G4PionPlus::PionPlus() ) bulletType = pionPlus;
if (aTrack.GetDefinition() == G4PionMinus::PionMinus() ) bulletType = pionMinus;
if (aTrack.GetDefinition() == G4PionZero::PionZero() ) bulletType = pionZero;
if (aTrack.GetDefinition() == G4Gamma::Gamma() ) bulletType = photon;
#ifdef G4BERTINI_KAON
if (aTrack.GetDefinition() == G4KaonPlus::KaonPlus() ) bulletType = kaonPlus;
if (aTrack.GetDefinition() == G4KaonMinus::KaonMinus() ) bulletType = kaonMinus;
if (aTrack.GetDefinition() == G4Lambda::Lambda() ) bulletType = lambda;
if (aTrack.GetDefinition() == G4SigmaPlus::SigmaPlus() ) bulletType = sigmaPlus;
if (aTrack.GetDefinition() == G4SigmaZero::SigmaZero() ) bulletType = sigmaZero;
if (aTrack.GetDefinition() == G4SigmaMinus::SigmaMinus() ) bulletType = sigmaMinus;
if (aTrack.GetDefinition() == G4XiZero::XiZero() ) bulletType = xiZero;
if (aTrack.GetDefinition() == G4XiMinus::XiMinus() ) bulletType = xiMinus;
if (aTrack.GetDefinition() == G4KaonZeroLong::KaonZeroLong() ||
aTrack.GetDefinition() == G4KaonZeroShort::KaonZeroShort() ) {
if (G4UniformRand() > 0.5) {
bulletType = kaonZero;
} else {
bulletType = kaonZeroBar;
}
}
#endif
// Code momentum and energy.
G4double px,py,pz;
px=aTrack.Get4Momentum().px() / GeV;
py=aTrack.Get4Momentum().py() / GeV;
pz=aTrack.Get4Momentum().pz() / GeV;
G4LorentzVector projectileMomentum = aTrack.Get4Momentum();
G4LorentzRotation toZ;
toZ.rotateZ(-projectileMomentum.phi());
toZ.rotateY(-projectileMomentum.theta());
G4LorentzRotation toLabFrame = toZ.inverse();
std::vector<G4double> momentumBullet(4);
momentumBullet[0] =0.;
momentumBullet[1] =0;
momentumBullet[2] =0;
momentumBullet[3] =std::sqrt(px*px+py*py+pz*pz);
G4InuclElementaryParticle * bullet = new G4InuclElementaryParticle(momentumBullet, bulletType);
sumEnergy = bullet->getKineticEnergy(); // In GeV
#ifdef G4BERTINI_KAON
if (bulletType == proton || bulletType == neutron || bulletType == lambda ||
bulletType == sigmaPlus || bulletType == sigmaZero || bulletType == sigmaMinus ||
bulletType == xiZero || bulletType == xiMinus) {
#else
if (bulletType == proton || bulletType == neutron) {
#endif
sumBaryon += 1;
}
// Set target
G4InuclNuclei* target = 0;
G4InuclParticle* targetH = 0;
// and outcoming particles
G4DynamicParticle* cascadeParticle = 0;
std::vector<G4double> targetMomentum(4, 0.0);
G4double theNucleusA = theNucleus.GetN();
if ( !(G4int(theNucleusA) == 1) ) {
target = new G4InuclNuclei(targetMomentum,
theNucleusA,
G4int(theNucleus.GetZ()+0.5));
target->setEnergy();
std::vector<G4double> bmom = bullet->getMomentum();
eInit = std::sqrt(bmom[0] * bmom[0]);
std::vector<G4double> tmom = target->getMomentum();
eInit += std::sqrt(tmom[0] * tmom[0]);
sumBaryon += theNucleusA;
if (verboseLevel > 2) {
G4cout << "Bullet: " << G4endl;
bullet->printParticle();
}
if (verboseLevel > 2) {
G4cout << "Target: " << G4endl;
target->printParticle();
}
}
G4CollisionOutput output;
// Colliders initialisation
G4ElementaryParticleCollider* colep = new G4ElementaryParticleCollider;
G4IntraNucleiCascader* inc = new G4IntraNucleiCascader; // the actual cascade
inc->setInteractionCase(1); // Interaction type is particle with nuclei.
G4NonEquilibriumEvaporator* noneq = new G4NonEquilibriumEvaporator;
G4EquilibriumEvaporator* eqil = new G4EquilibriumEvaporator;
G4Fissioner* fiss = new G4Fissioner;
G4BigBanger* bigb = new G4BigBanger;
G4InuclCollider* collider = new G4InuclCollider(colep, inc, noneq, eqil, fiss, bigb);
G4int maxTries = 10; // maximum tries for inelastic collision to avoid infinite loop
G4int nTries = 0; // try counter
if (G4int(theNucleusA) == 1) { // special treatment for target H(1,1) (proton)
targetH = new G4InuclElementaryParticle(targetMomentum, 1);
#ifdef G4BERTINI_KAON
G4float cutElastic[32];
#else
G4float cutElastic[8];
#endif
cutElastic[proton ] = 1.0; // GeV
cutElastic[neutron ] = 1.0;
cutElastic[pionPlus ] = 0.6;
cutElastic[pionMinus] = 0.2;
cutElastic[pionZero ] = 0.2;
#ifdef G4BERTINI_KAON
cutElastic[kaonPlus ] = 0.5;
cutElastic[kaonMinus] = 0.5;
cutElastic[kaonMinus] = 0.5;
cutElastic[kaonZero] = 0.5;
cutElastic[kaonZeroBar] = 0.5;
cutElastic[lambda] = 1.0;
cutElastic[sigmaPlus] = 1.0;
cutElastic[sigmaZero] = 1.0;
cutElastic[sigmaMinus] = 1.0;
cutElastic[xiZero] = 1.0;
cutElastic[xiMinus] = 1.0;
#endif
if (momentumBullet[3] > cutElastic[bulletType]) { // inelastic collision possible
do { // we try to create inelastic interaction
output = collider->collide(bullet, targetH);
nTries++;
} while(
(nTries < maxTries) &&
(output.getOutgoingParticles().size() == 2 && // elastic: bullet + p = H(1,1) coming out
(output.getOutgoingParticles().begin()->type() == bulletType ||
output.getOutgoingParticles().begin()->type() == proton)
)
);
} else { // only elastic collision is energetically possible
output = collider->collide(bullet, targetH);
}
sumBaryon += 1;
std::vector<G4double> bmom = bullet->getMomentum();
eInit = std::sqrt(bmom[0] * bmom[0]);
std::vector<G4double> tmom = targetH->getMomentum();
eInit += std::sqrt(tmom[0] * tmom[0]);
if (verboseLevel > 2) {
G4cout << "Target: " << G4endl;
targetH->printParticle();
}
} else { // treat all other targets excepet H(1,1)
do // we try to create inelastic interaction
{
output = collider->collide(bullet, target );
nTries++;
} while(
(nTries < maxTries) &&
(output.getOutgoingParticles().size() + output.getNucleiFragments().size() < 2.5) &&
(output.getOutgoingParticles().size()!=0) &&
(output.getOutgoingParticles().begin()->type()==bullet->type())
);
}
if (verboseLevel > 1)
{
G4cout << " Cascade output: " << G4endl;
output.printCollisionOutput();
}
// Convert cascade data to use hadronics interface
std::vector<G4InuclNuclei> nucleiFragments = output.getNucleiFragments();
std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
theResult.SetStatusChange(stopAndKill);
if (!particles.empty()) {
particleIterator ipart;
G4int outgoingParticle;
for (ipart = particles.begin(); ipart != particles.end(); ipart++) {
outgoingParticle = ipart->type();
std::vector<G4double> mom = ipart->getMomentum();
eTot += std::sqrt(mom[0] * mom[0]);
G4double ekin = ipart->getKineticEnergy() * GeV;
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
aMom = aMom.unit();
#ifdef G4BERTINI_KAON
if (ipart->baryon() ) {
#else
if (outgoingParticle == proton || outgoingParticle == neutron) {
#endif
sumBaryon -= 1;
}
sumEnergy -= ekin / GeV;
switch(outgoingParticle) {
case proton:
#ifdef debug_G4CascadeInterface
G4cerr << "proton " << counter << " " << aMom << " " << ekin << G4endl;
#endif
cascadeParticle =
new G4DynamicParticle(G4Proton::ProtonDefinition(), aMom, ekin);
break;
case neutron:
#ifdef debug_G4CascadeInterface
G4cerr << "neutron "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
cascadeParticle =
new G4DynamicParticle(G4Neutron::NeutronDefinition(), aMom, ekin);
break;
case pionPlus:
cascadeParticle =
new G4DynamicParticle(G4PionPlus::PionPlusDefinition(), aMom, ekin);
#ifdef debug_G4CascadeInterface
G4cerr << "pionPlus "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
break;
case pionMinus:
cascadeParticle =
new G4DynamicParticle(G4PionMinus::PionMinusDefinition(), aMom, ekin);
#ifdef debug_G4CascadeInterface
G4cerr << "pionMinus "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
break;
case pionZero:
cascadeParticle =
new G4DynamicParticle(G4PionZero::PionZeroDefinition(), aMom, ekin);
#ifdef debug_G4CascadeInterface
G4cerr << "pionZero "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
break;
case photon:
cascadeParticle =
new G4DynamicParticle(G4Gamma::Gamma(), aMom, ekin);
#ifdef debug_G4CascadeInterface
G4cerr << "photon "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
break;
#ifdef G4BERTINI_KAON
case kaonPlus:
cascadeParticle =
new G4DynamicParticle(G4KaonPlus::KaonPlusDefinition(), aMom, ekin);
break;
case kaonMinus:
cascadeParticle =
new G4DynamicParticle(G4KaonMinus::KaonMinusDefinition(), aMom, ekin);
break;
case kaonZero:
if (G4UniformRand() > 0.5) {
cascadeParticle = new G4DynamicParticle(
G4KaonZeroLong::KaonZeroLongDefinition(),
aMom, ekin);
} else {
cascadeParticle = new G4DynamicParticle(
G4KaonZeroShort::KaonZeroShortDefinition(),
aMom, ekin);
}
break;
case kaonZeroBar:
if (G4UniformRand() > 0.5) {
cascadeParticle = new G4DynamicParticle(
G4KaonZeroLong::KaonZeroLongDefinition(),
aMom, ekin);
} else {
cascadeParticle = new G4DynamicParticle(
G4KaonZeroShort::KaonZeroShortDefinition(),
aMom, ekin);
}
break;
case lambda:
cascadeParticle =
new G4DynamicParticle(G4Lambda::LambdaDefinition(), aMom, ekin);
break;
case sigmaPlus:
cascadeParticle =
new G4DynamicParticle(G4SigmaPlus::SigmaPlusDefinition(), aMom, ekin);
break;
case sigmaZero:
cascadeParticle =
new G4DynamicParticle(G4SigmaZero::SigmaZeroDefinition(), aMom, ekin);
break;
case sigmaMinus:
cascadeParticle =
new G4DynamicParticle(G4SigmaMinus::SigmaMinusDefinition(), aMom, ekin);
break;
case xiZero:
cascadeParticle =
new G4DynamicParticle(G4XiZero::XiZeroDefinition(), aMom, ekin);
break;
case xiMinus:
cascadeParticle =
new G4DynamicParticle(G4XiMinus::XiMinusDefinition(), aMom, ekin);
break;
#endif
default:
G4cout << " ERROR: G4CascadeInterface::Propagate undefined particle type"
<< G4endl;
}
cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame);
theResult.AddSecondary(cascadeParticle);
}
}
// get nuclei fragments
G4DynamicParticle * aFragment = 0;
G4ParticleDefinition * aIonDef = 0;
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
if (!nucleiFragments.empty()) {
nucleiIterator ifrag;
for (ifrag = nucleiFragments.begin(); ifrag != nucleiFragments.end(); ifrag++)
{
G4double eKin = ifrag->getKineticEnergy() * GeV;
std::vector<G4double> mom = ifrag->getMomentum();
eTot += std::sqrt(mom[0] * mom[0]);
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
aMom = aMom.unit();
// hpw @@@ ==> Should be zero: G4double fragmentExitation = ifrag->getExitationEnergyInGeV();
if (verboseLevel > 2) {
G4cout << " Nuclei fragment: " << G4endl;
ifrag->printParticle();
}
G4int A = G4int(ifrag->getA());
G4int Z = G4int(ifrag->getZ());
aIonDef = theTableOfParticles->FindIon(Z, A, 0, Z);
aFragment = new G4DynamicParticle(aIonDef, aMom, eKin);
sumBaryon -= A;
sumEnergy -= eKin / GeV;
aFragment->Set4Momentum(aFragment->Get4Momentum()*=toLabFrame);
theResult.AddSecondary(aFragment);
}
}
if (verboseLevel > 2) {
if (sumBaryon != 0) {
G4cout << "ERROR: no baryon number conservation, sum of baryons = "
<< sumBaryon << G4endl;
}
if (sumEnergy > 0.01 ) {
G4cout << "Kinetic energy conservation violated by "
<< sumEnergy << " GeV" << G4endl;
}
G4cout << "Total energy conservation at level ~"
<< (eInit - eTot) * GeV << " MeV" << G4endl;
if (sumEnergy < -5.0e-5 ) { // 0.05 MeV
G4cout << "FATAL ERROR: energy created "
<< sumEnergy * GeV << " MeV" << G4endl;
}
}
delete bullet;
delete colep;
delete inc;
delete noneq;
delete fiss;
delete eqil;
delete bigb;
delete collider;
if(target != 0) delete target;
if(targetH != 0) delete targetH;
// if(cascadeParticle != 0) delete cascadeParticle;
// if(aFragment != 0) delete aFragment;
return &theResult;
}
package Geant4Sys
version v83r1p2
version v83r2
branches cmt doc
use G4config v83r1p2 Geant4
use G4config v83r2 Geant4
# =============================================================================
# =========== global libraries ================================================
# =============================================================================
use G4event v5r0 Geant4
use G4intercoms v4r0 Geant4
use G4particles v5r0 Geant4
use G4particles v6r0 Geant4
use G4track v5r0 Geant4
use G4geometry v6r0 Geant4
use G4processes v4r3p1 Geant4
use G4physics_lists v1r0 Geant4
use G4geometry v6r1 Geant4
use G4processes v5r0 Geant4
use G4physics_lists v1r1 Geant4
use G4tracking v6r0 Geant4
use G4global v5r0 Geant4
use G4materials v4r0 Geant4
use G4readout v4r0 Geant4
use G4digits_hits v5r0 Geant4
use G4digits_hits v6r0 Geant4
use G4graphics_reps v4r0 Geant4
use G4run v5r0 Geant4
use G4parmodels v6r1 Geant4
......@@ -54,3 +54,7 @@ use ${G4UIGAG_use}
# =============================================================================
private
setup_script copy_include
# Allow the generation of QMTest summary
apply_pattern QMTestSummarize
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment