Import Geant4 9.5.0 source tree
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4had_inclxx
|
||||
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4had_hetcpp
|
||||
#
|
||||
# Intermediate level CMakeLists.txt - just process subdirectories
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: CMakeLists.txt,v 1.1 2010-09-29 18:56:10 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(incl_physics)
|
||||
add_subdirectory(interface)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for chips library. HPW 20-Nov-99
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := G4had_inclxx
|
||||
|
||||
SUBDIRS = utils
|
||||
SUBDIRS += incl_physics
|
||||
SUBDIRS += interface
|
||||
|
||||
SUBLIBS = G4hadronic_inclxx_utils
|
||||
SUBLIBS += G4hadronic_inclxx_physics
|
||||
SUBLIBS += G4hadronic_inclxx_interface
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../../..
|
||||
endif
|
||||
|
||||
|
||||
include $(G4INSTALL)/config/globlib.gmk
|
||||
@@ -0,0 +1,90 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
==========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Physics Simulation
|
||||
==========================================================
|
||||
$Id: History,v 1.36 2010/11/16 16:30:55 gcosmo Exp $
|
||||
---------------------------------------------------------------------
|
||||
|
||||
History file for the Liege cascade INCL Model
|
||||
---------------------------------------------
|
||||
|
||||
This file should be used to summarize modifications introduced in the
|
||||
code and to keep track of all tags.
|
||||
|
||||
---------------------------------------------------------------
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
21 November 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-11)
|
||||
-----------------------------------------------------------
|
||||
- Fixed local energy logic
|
||||
- Fixed separation energy in cluster emission
|
||||
|
||||
14 November 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-10)
|
||||
-----------------------------------------------------------
|
||||
- Corrected the order in which the INCL++ model and projectile are created in
|
||||
the interface. This actually is a better fix to the FPE problem than tag
|
||||
hadr-inclxx-V09-04-09.
|
||||
|
||||
10 November 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-09)
|
||||
-----------------------------------------------------------
|
||||
- Added safeguard against FPE in G4INCLCrossSections.cc
|
||||
|
||||
07 November 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-08)
|
||||
-----------------------------------------------------------
|
||||
- Don't apply nucleon-nucleon collision energy cut to the first collision
|
||||
- Bugfixes:
|
||||
o Check that the nucleus pointer isn't NULL
|
||||
o G4INCLFinalState memory leaks
|
||||
o Proper use of ion definitions in the INCL++ G4 interface
|
||||
|
||||
04 November 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-07)
|
||||
-----------------------------------------------------------
|
||||
- Set the maximum coalescence cluster mass to 8
|
||||
|
||||
03 November 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-06)
|
||||
-----------------------------------------------------------
|
||||
- Declared G4INCLIFunction, G4INCLIParticleDataSource and
|
||||
G4INCLIClusteringModel destructors as virtual
|
||||
|
||||
01 November 2011 - Gabriele Cosmo (hadr-inclxx-V09-04-05)
|
||||
---------------------------------------------------------
|
||||
- Correction to GNUmakefiles to allow for DLL build on Windows.
|
||||
|
||||
31 October 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-04)
|
||||
----------------------------------------------------------
|
||||
- Fixed Windows/VC++ compiler warning
|
||||
|
||||
24 October 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-03)
|
||||
----------------------------------------------------------
|
||||
- Fixed Mac/Windows compilation problem (incl_physics/include/G4INCL.hh clashed
|
||||
with the G4Incl.hh from INCL4.2 on case-insensitive filesystems)
|
||||
o Solution: Renamed G4INCL.[hh|cc] to G4INCLCascade.[hh|cc]
|
||||
- Fixed icc macro expansion related compilation problems
|
||||
- Renamed Particle.[hh|cc] to G4INCLParticle.[hh|cc]
|
||||
- Renamed IAvatar.[hh|cc] to G4INCLIAvatar.[hh|cc]
|
||||
|
||||
19 October 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-02)
|
||||
----------------------------------------------------------
|
||||
- Fixed type mismatches that caused warnings when compiling with GCC 4.1
|
||||
|
||||
26 September 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-01)
|
||||
------------------------------------------------------------
|
||||
- Added some debugging environment variables to the INCL++ interface:
|
||||
o Goal: Allow the developer to inspect cascade specific quantities (such as
|
||||
mass, charge and excitation energy of the cascade remnant nucleus) before
|
||||
de-excitation to disable de-excitation entirely (useful when we'd like to
|
||||
separate the contributions of cascade and de-excitation)
|
||||
o G4INCLXX_NO_DE_EXCITATION disables de-excitation
|
||||
o G4INCLXX_STORE_RAW_DEBUG_OUTPUT stores the cascade output into file
|
||||
inclDebug.out
|
||||
|
||||
01 September 2011 - Pekka Kaitaniemi (hadr-inclxx-V09-04-00)
|
||||
------------------------------------------------------------
|
||||
- Imported the first version of INCL++ intra-nuclear cascade model into Geant4
|
||||
- INCL++ version: v5.0 alpha1
|
||||
o Based on INCL4.6 cascade model
|
||||
o Supported projectiles: protons, neutrons, pions up to 3 GeV
|
||||
o Uses G4ExcitationHandler for de-excitation
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4hadronic_bert_cascade
|
||||
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4had_hetcpp.G4hadronic_bert_cascade
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: CMakeLists.txt,v 1.1 2010-09-29 18:56:20 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
# $Id: GNUmakefile,v 1.15 2010-09-23 05:02:14 mkelsey Exp $
|
||||
# -----------------------------------------------------------
|
||||
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
|
||||
#
|
||||
# Map user environment/GMake variables onto preprocessor debugging flags
|
||||
#
|
||||
# 20100922 J. Yarba -- Add include directories for pre-compound model
|
||||
# -----------------------------------------------------------
|
||||
|
||||
name := G4hadronic_inclxx_physics
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../../../..
|
||||
endif
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
CPPFLAGS += -DG4HADRONIC_ALLOC_EXPORT
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPNumerics/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/management/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/processes/include \
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/multifragmentation/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/fermi_breakup/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/photon_evaporation/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/management/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/handler/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/util/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/inclxx/incl_physics/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/inclxx/utils/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
-I$(G4BASE)/particles/hadrons/mesons/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/particles/shortlived/include \
|
||||
-I$(G4BASE)/materials/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLAvatarActions_hh
|
||||
#define G4INCLAvatarActions_hh 1
|
||||
|
||||
#include "G4INCLIAvatar.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class AvatarAction {
|
||||
public:
|
||||
AvatarAction();
|
||||
~AvatarAction();
|
||||
void beforeAvatarAction(IAvatar *a, Nucleus *n);
|
||||
void afterAvatarAction(IAvatar *a, Nucleus *n, FinalState *fs);
|
||||
|
||||
private:
|
||||
};
|
||||
}
|
||||
#endif
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* G4INCLBinaryCollisionAvatar.hh
|
||||
*
|
||||
* Created on: Jun 5, 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLBINARYCOLLISIONAVATAR_HH_
|
||||
#define G4INCLBINARYCOLLISIONAVATAR_HH_
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
#include "G4INCLInteractionAvatar.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class BinaryCollisionAvatar: public G4INCL::InteractionAvatar {
|
||||
public:
|
||||
BinaryCollisionAvatar(G4double, G4double, G4INCL::Nucleus*, G4INCL::Particle*, G4INCL::Particle*);
|
||||
virtual ~BinaryCollisionAvatar();
|
||||
G4INCL::IChannel* getChannel() const;
|
||||
ParticleList getParticles() const {
|
||||
ParticleList theParticleList;
|
||||
theParticleList.push_back(particle1);
|
||||
theParticleList.push_back(particle2);
|
||||
return theParticleList;
|
||||
};
|
||||
|
||||
virtual void preInteraction();
|
||||
virtual FinalState *postInteraction(FinalState *);
|
||||
|
||||
std::string dump() const;
|
||||
|
||||
static const G4double cutNN;
|
||||
static const G4double cutNNSquared;
|
||||
private:
|
||||
G4double theCrossSection;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* G4INCLBINARYCOLLISIONAVATAR_HH_ */
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLCDPP_hh
|
||||
#define G4INCLCDPP_hh 1
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLIPauli.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class CDPP : public IPauli {
|
||||
public:
|
||||
CDPP();
|
||||
~CDPP();
|
||||
|
||||
G4bool isBlocked(ParticleList const, Nucleus const * const) const;
|
||||
|
||||
protected:
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLCascade_hh
|
||||
#define G4INCLCascade_hh 1
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLIPropagationModel.hh"
|
||||
#include "G4INCLEventAction.hh"
|
||||
#include "G4INCLPropagationAction.hh"
|
||||
#include "G4INCLAvatarAction.hh"
|
||||
#include "G4INCLEventInfo.hh"
|
||||
#include "G4INCLGlobalInfo.hh"
|
||||
#include "G4INCLLogger.hh"
|
||||
#include "G4INCLConfig.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class INCL {
|
||||
public:
|
||||
INCL(Config const * const config);
|
||||
INCL(IPropagationModel *aPropagationModel);
|
||||
|
||||
~INCL();
|
||||
|
||||
void setTarget(G4int A, G4int Z);
|
||||
G4bool initializeTarget(G4int A, G4int Z);
|
||||
const EventInfo &processEvent(Particle *projectile);
|
||||
|
||||
/** \brief Rescale the energies of the outgoing particles.
|
||||
*
|
||||
* Allow for the remnant recoil energy by rescaling the energy (and
|
||||
* momenta) of the outgoing particles.
|
||||
*/
|
||||
void rescaleOutgoingForRecoil();
|
||||
|
||||
/** \brief Run global conservation checks
|
||||
*
|
||||
* Check that energy and momentum are correctly conserved. If not, issue a
|
||||
* warning.
|
||||
*
|
||||
* Also feeds the balance variables in theEventInfo.
|
||||
*/
|
||||
void globalConservationChecks();
|
||||
|
||||
/** \brief Stopping criterion for the cascade
|
||||
*
|
||||
* Returns true if the cascade should continue, and false if any of the
|
||||
* stopping criteria is satisfied.
|
||||
*/
|
||||
G4bool continueCascade();
|
||||
|
||||
void finaliseGlobalInfo();
|
||||
const GlobalInfo &getGlobalInfo() const { return theGlobalInfo; }
|
||||
|
||||
/** \brief Final calculations before returning the global information */
|
||||
G4bool processEvent() { return false; }
|
||||
|
||||
std::string configToString() { return theConfig->echo(); }
|
||||
|
||||
private:
|
||||
IPropagationModel *propagationModel;
|
||||
G4int theA, theZ;
|
||||
G4double maxImpactParameter;
|
||||
EventAction *eventAction;
|
||||
PropagationAction *propagationAction;
|
||||
AvatarAction *avatarAction;
|
||||
LoggerSlave *theLoggerSlave;
|
||||
Config const * const theConfig;
|
||||
|
||||
EventInfo theEventInfo;
|
||||
GlobalInfo theGlobalInfo;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLClusterDecay.hh
|
||||
* \brief Static class for carrying out cluster decays
|
||||
*
|
||||
* Created on: 6th July 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLCLUSTERDECAY_HH
|
||||
#define G4INCLCLUSTERDECAY_HH
|
||||
|
||||
#include "G4INCLCluster.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* Pauli blocking
|
||||
*
|
||||
*/
|
||||
class ClusterDecay {
|
||||
public:
|
||||
/// \brief True if the cluster is stable.
|
||||
static G4bool isStable(Cluster const * const c) {
|
||||
const G4int Z = c->getZ();
|
||||
const G4int A = c->getA();
|
||||
return (ParticleTable::clusterDecayMode[Z][A]==ParticleTable::StableCluster);
|
||||
}
|
||||
|
||||
/** \brief Carries out a cluster decay
|
||||
*
|
||||
* \param c cluster that should decay
|
||||
* \return list of decay products
|
||||
*/
|
||||
static ParticleList decay(Cluster * const c);
|
||||
|
||||
protected:
|
||||
ClusterDecay() {}
|
||||
~ClusterDecay() {}
|
||||
|
||||
private:
|
||||
/** \brief Recursively decay clusters
|
||||
*
|
||||
* \param c cluster that should decay
|
||||
* \param decayProducts decay products are appended to the end of this list
|
||||
*/
|
||||
static void recursiveDecay(Cluster * const c, ParticleList *decayProducts);
|
||||
|
||||
/// \brief Carries out two-body decays
|
||||
static void twoBodyDecay(Cluster * const c, ParticleTable::ClusterDecayType theDecayMode, ParticleList *decayProducts);
|
||||
|
||||
/// \brief Carries out three-body decays
|
||||
static void threeBodyDecay(Cluster * const c, ParticleTable::ClusterDecayType theDecayMode, ParticleList *decayProducts);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // G4INCLCLUSTERDECAY
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLClusterUtils_hh
|
||||
#define G4INCLClusterUtils_hh 1
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLCluster.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class ClusterUtils {
|
||||
public:
|
||||
static G4int getZ(const ParticleList &);
|
||||
static G4int getZ(const ParticleList &, Particle *);
|
||||
static G4int getA(const ParticleList &);
|
||||
static G4int getA(const ParticleList &, Particle *);
|
||||
static G4double getKineticEnergy(const ParticleList &pl);
|
||||
static G4double getTotalEnergy(const ParticleList &);
|
||||
static G4double getTotalEnergy(const ParticleList &, Particle *);
|
||||
static ThreeVector getNewPositionVector(const ParticleList &pl, Particle *p);
|
||||
static ThreeVector getNewPositionVector(const ParticleList &pl);
|
||||
static ThreeVector getNewPositionVector(const ThreeVector &,
|
||||
const ParticleList &,
|
||||
Particle *);
|
||||
static G4double getPhaseSpace(const ThreeVector &clusterPosition,
|
||||
const ThreeVector &clusterMomentum,
|
||||
G4int clusterA,
|
||||
Particle *p);
|
||||
static G4double getPhaseSpace(const ParticleList &);
|
||||
static G4double getPhaseSpace(const ParticleList &, Particle *);
|
||||
static G4bool isBetterCluster(ParticleList *newCluster, ParticleList *originalCluster);
|
||||
|
||||
protected:
|
||||
ClusterUtils();
|
||||
~ClusterUtils();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLClustering.hh
|
||||
* \brief Static class for cluster formation
|
||||
*
|
||||
* Created on: 13th July 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLCLUSTERING_HH
|
||||
#define G4INCLCLUSTERING_HH
|
||||
|
||||
#include "G4INCLIClusteringModel.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* Cluster formation
|
||||
*
|
||||
*/
|
||||
class Clustering {
|
||||
public:
|
||||
/**
|
||||
* Choose a cluster candidate to be produced. At this poG4int we
|
||||
* don't yet decide if it can pass through the Coulomb barrier or
|
||||
* not.
|
||||
*/
|
||||
static Cluster* getCluster(Nucleus *n, Particle *p) {
|
||||
return theClusteringModel->getCluster(n,p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether cluster can escape or not.
|
||||
*/
|
||||
static G4bool clusterCanEscape(Cluster const * const c) {
|
||||
return theClusteringModel->clusterCanEscape(c);
|
||||
}
|
||||
|
||||
/// \brief Get the clustering model.
|
||||
static IClusteringModel *getClusteringModel() { return theClusteringModel; }
|
||||
|
||||
/// \brief Set the clustering model
|
||||
static void setClusteringModel(IClusteringModel * const model) {
|
||||
theClusteringModel = model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete clustering model
|
||||
*/
|
||||
static void deleteClusteringModel() {
|
||||
delete theClusteringModel;
|
||||
theClusteringModel = 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
Clustering() {}
|
||||
~Clustering() {}
|
||||
|
||||
private:
|
||||
static IClusteringModel *theClusteringModel;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLClusteringModelIntercomparison_hh
|
||||
#define G4INCLClusteringModelIntercomparison_hh 1
|
||||
|
||||
#include "G4INCLIClusteringModel.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLCluster.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class ClusteringModelIntercomparison : public IClusteringModel {
|
||||
public:
|
||||
ClusteringModelIntercomparison() {
|
||||
zeroOut();
|
||||
|
||||
// Set up the maximum charge and neutron number for clusters
|
||||
clusterZMaxAll = 0;
|
||||
clusterNMaxAll = 0;
|
||||
for(G4int A=0; A<=maxClusterAlgorithmMass; ++A) {
|
||||
if(ParticleTable::clusterZMax[A]>clusterZMaxAll)
|
||||
clusterZMaxAll = ParticleTable::clusterZMax[A];
|
||||
if(A-ParticleTable::clusterZMin[A]>clusterNMaxAll)
|
||||
clusterNMaxAll = A-ParticleTable::clusterZMin[A];
|
||||
}
|
||||
}
|
||||
|
||||
void cleanUp() {
|
||||
delete candidateConfiguration;
|
||||
consideredPartners.clear();
|
||||
runningConfiguration.clear();
|
||||
}
|
||||
|
||||
void zeroOut() {
|
||||
candidateConfiguration = 0;
|
||||
}
|
||||
|
||||
virtual ~ClusteringModelIntercomparison() {
|
||||
cleanUp();
|
||||
}
|
||||
|
||||
virtual Cluster* getCluster(Nucleus*, Particle*);
|
||||
virtual G4bool clusterCanEscape(Cluster const * const);
|
||||
|
||||
private:
|
||||
void findClusterStartingFrom(const G4int oldA, const G4int oldZ);
|
||||
G4double getPhaseSpace(G4int oldA, Particle *p);
|
||||
|
||||
Nucleus *theNucleus;
|
||||
Particle *theLeadingParticle;
|
||||
ParticleList consideredPartners;
|
||||
ParticleList* candidateConfiguration;
|
||||
|
||||
G4double runningEnergies[ParticleTable::maxClusterMass];
|
||||
ThreeVector runningMomenta[ParticleTable::maxClusterMass];
|
||||
ThreeVector runningPositions[ParticleTable::maxClusterMass];
|
||||
ParticleList runningConfiguration; // Use deque instead?
|
||||
G4double runningPotentials[ParticleTable::maxClusterMass];
|
||||
|
||||
G4int selectedA, selectedZ;
|
||||
G4double sqtot;
|
||||
|
||||
G4int clusterZMaxAll, clusterNMaxAll;
|
||||
|
||||
G4double participantEnergyPool;
|
||||
|
||||
static const G4double limitCosEscapeAngle;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLClusteringModelNone_hh
|
||||
#define G4INCLClusteringModelNone_hh 1
|
||||
|
||||
#include "G4INCLIClusteringModel.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLCluster.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class ClusteringModelNone : public IClusteringModel {
|
||||
public:
|
||||
ClusteringModelNone() {}
|
||||
~ClusteringModelNone() {}
|
||||
|
||||
virtual Cluster* getCluster(Nucleus*, Particle*) { return 0; }
|
||||
virtual G4bool clusterCanEscape(Cluster const * const) { return false; }
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* G4INCLRanecu.hh
|
||||
*
|
||||
* Created on: 7 June 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLCONSTANT_RANDOM_HH
|
||||
#define G4INCLCONSTANT_RANDOM_HH 1
|
||||
|
||||
#include "G4INCLIRandomGenerator.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class ConstantRandom : public G4INCL::IRandomGenerator {
|
||||
public:
|
||||
ConstantRandom() {};
|
||||
virtual ~ConstantRandom() {};
|
||||
|
||||
SeedVector getSeeds() const {
|
||||
return SeedVector;
|
||||
}
|
||||
|
||||
void setSeeds(const SeedVector &) {};
|
||||
G4double flat() { return 0.4; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLCoulombDistortion.hh
|
||||
* \brief Static class for selecting Coulomb distortion.
|
||||
*
|
||||
* Created on: 14 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLCOULOMBDISTORTION_HH_
|
||||
#define G4INCLCOULOMBDISTORTION_HH_
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLICoulomb.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* Coulomb distortion
|
||||
*/
|
||||
class CoulombDistortion {
|
||||
public:
|
||||
/** \brief Modify the momentum of an incoming particle.
|
||||
*
|
||||
* This method places Particle p on the surface of Nucleus n and modifies
|
||||
* the direction of its momentum to be tangent to the Coulomb trajectory in
|
||||
* that poG4int.
|
||||
*
|
||||
* The input particle has to be prepared with its asymptotic momentum. Its
|
||||
* position is used only for the purpose of computing the asymptotic impact
|
||||
* parameter; in other words, this method only uses the components of the
|
||||
* position that are perpendicular to the momentum. The remaining component
|
||||
* is not used, and can be set to any value.
|
||||
*
|
||||
* \param p incoming particle
|
||||
* \param n distorting nucleus
|
||||
**/
|
||||
static void bringToSurface(Particle *p, Nucleus const * const n) {
|
||||
theCoulomb->bringToSurface(p, n);
|
||||
}
|
||||
|
||||
/** \brief Modify the momentum of an outgoing particle. */
|
||||
static void distortOut(ParticleList const &pL, Nucleus const * const n) {
|
||||
theCoulomb->distortOut(pL, n);
|
||||
}
|
||||
|
||||
/** \brief Return the maximum impact parameter for Coulomb-distorted
|
||||
* trajectories. **/
|
||||
static G4double maxImpactParameter(Particle const * const p, Nucleus const * const n) {
|
||||
return theCoulomb->maxImpactParameter(p, n);
|
||||
}
|
||||
|
||||
/** \brief Set the Coulomb-distortion algorithm. */
|
||||
static void setCoulomb(ICoulomb * const coulomb) { theCoulomb = coulomb; }
|
||||
|
||||
/** \brief Delete the Coulomb-distortion object. */
|
||||
static void deleteCoulomb() {
|
||||
delete theCoulomb;
|
||||
theCoulomb = 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
CoulombDistortion() {}
|
||||
~CoulombDistortion() {}
|
||||
|
||||
private:
|
||||
static ICoulomb *theCoulomb;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* G4INCLCOULOMBDISTORTION_HH_ */
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLCoulombNonRelativistic.hh
|
||||
* \brief Class for non-relativistic Coulomb distortion.
|
||||
*
|
||||
* Created on: 14 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLCOULOMBNONRELATIVISTIC_HH_
|
||||
#define G4INCLCOULOMBNONRELATIVISTIC_HH_
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLICoulomb.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class CoulombNonRelativistic : public ICoulomb {
|
||||
public:
|
||||
CoulombNonRelativistic() {}
|
||||
virtual ~CoulombNonRelativistic() {}
|
||||
|
||||
/** \brief Modify the momentum of the particle and position it on the
|
||||
* surface of the nucleus.
|
||||
*
|
||||
* This method performs non-relativistic distortion.
|
||||
*
|
||||
* \param p incoming particle
|
||||
* \param n distorting nucleus
|
||||
**/
|
||||
void bringToSurface(Particle * const p, Nucleus const * const n) const;
|
||||
|
||||
/** \brief Modify the momenta of the outgoing particles.
|
||||
*
|
||||
* This method performs non-relativistic distortion.
|
||||
*
|
||||
* \param pL list of outgoing particles
|
||||
* \param n distorting nucleus
|
||||
*/
|
||||
void distortOut(ParticleList const &pL, Nucleus const * const n) const;
|
||||
|
||||
/** \brief Return the maximum impact parameter for Coulomb-distorted
|
||||
* trajectories. **/
|
||||
G4double maxImpactParameter(Particle const * const p, Nucleus const *
|
||||
const n) const;
|
||||
|
||||
private:
|
||||
/** \brief Return the "Coulomb factor". */
|
||||
G4double coulombFactor(Particle const * const p, Nucleus const * const n) const {
|
||||
return eSquared * p->getZ() * n->getZ() / p->getKineticEnergy();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* G4INCLCOULOMBNONRELATIVISTIC_HH_ */
|
||||
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLCoulombNone.hh
|
||||
* \brief Placeholder class for no Coulomb distortion.
|
||||
*
|
||||
* Created on: 14 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLCOULOMBNONE_HH_
|
||||
#define G4INCLCOULOMBNONE_HH_
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLICoulomb.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class CoulombNone : public ICoulomb {
|
||||
public:
|
||||
CoulombNone() {}
|
||||
virtual ~CoulombNone() {}
|
||||
|
||||
/** \brief Position the particle on the surface of the nucleus.
|
||||
*
|
||||
* This method does not perform any distortion.
|
||||
*
|
||||
* \param p incoming particle
|
||||
* \param n distorting nucleus
|
||||
**/
|
||||
void bringToSurface(Particle * const p, Nucleus const * const n) const;
|
||||
|
||||
/** \brief Modify the momenta of the outgoing particles.
|
||||
*
|
||||
* This method does not perform any distortion.
|
||||
*
|
||||
* \param pL list of outgoing particles
|
||||
* \param n distorting nucleus
|
||||
*/
|
||||
void distortOut(ParticleList const & /* pL */, Nucleus const * const /* n */) const {}
|
||||
|
||||
/** \brief Return the maximum impact parameter for Coulomb-distorted
|
||||
* trajectories. **/
|
||||
G4double maxImpactParameter(Particle const * const p, Nucleus const *
|
||||
const n) const {
|
||||
return n->getSurfaceRadius(p);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* G4INCLCOULOMBNONE_HH_ */
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLCrossSections_hh
|
||||
#define G4INCLCrossSections_hh 1
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLIAvatar.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class CrossSections {
|
||||
public:
|
||||
static G4double elastic(Particle const * const p1, Particle const * const p2);
|
||||
static G4double total(Particle const * const p1, Particle const * const p2);
|
||||
|
||||
static G4double pionNucleon(Particle const * const p1, Particle const * const p2);
|
||||
static G4double spnPiPlusPHE(const G4double x);
|
||||
static G4double spnPiMinusPHE(const G4double x);
|
||||
|
||||
static G4double recombination(Particle const * const p1, Particle const * const p2);
|
||||
static G4double deltaProduction(Particle const * const p1, Particle const * const p2);
|
||||
/** \brief Calculate the slope of the NN DDXS.
|
||||
*
|
||||
* \param pl absolute value of the momentum in the CM frame, in MeV/c
|
||||
* \param iso total isospin of the system
|
||||
*
|
||||
* \return the slope of the angular distribution
|
||||
*/
|
||||
static G4double calculateNNDiffCrossSection(G4double energyCM, G4int iso);
|
||||
|
||||
private:
|
||||
static G4double elasticNNHighEnergy(const G4double momentum);
|
||||
static G4double elasticProtonNeutron(const G4double momentum);
|
||||
static G4double elasticProtonProtonOrNeutronNeutron(const G4double momentum);
|
||||
static G4double elasticNN(Particle const * const p1, Particle const * const p2);
|
||||
static G4double elasticNNLegacy(Particle const * const p1, Particle const * const p2);
|
||||
|
||||
static G4double deltaProduction(const G4int isospin, const G4double pCM);
|
||||
|
||||
protected:
|
||||
CrossSections() {};
|
||||
~CrossSections() {};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLDECAYAVATAR_HH_
|
||||
#define G4INCLDECAYAVATAR_HH_
|
||||
|
||||
#include "G4INCLInteractionAvatar.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* Decay avatar
|
||||
*
|
||||
* The reflection avatar is created when a particle reaches the boundary of the nucleus.
|
||||
* At this poG4int it can either be reflected from the boundary or exit the nucleus.
|
||||
*/
|
||||
class DecayAvatar: public InteractionAvatar {
|
||||
public:
|
||||
DecayAvatar(G4INCL::Particle *aParticle, G4double time, G4INCL::Nucleus *aNucleus, G4bool force=false);
|
||||
virtual ~DecayAvatar();
|
||||
|
||||
G4INCL::IChannel* getChannel() const;
|
||||
G4INCL::FinalState* getFinalState() const;
|
||||
|
||||
virtual void preInteraction();
|
||||
virtual FinalState *postInteraction(FinalState *);
|
||||
|
||||
ParticleList getParticles() const {
|
||||
ParticleList theParticleList;
|
||||
theParticleList.push_back(particle1);
|
||||
return theParticleList;
|
||||
}
|
||||
|
||||
std::string dump() const;
|
||||
private:
|
||||
G4bool forced;
|
||||
ThreeVector const &incidentDirection;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* G4INCLDECAYAVATAR_HH_ */
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLDeltaDecayChannel_hh
|
||||
#define G4INCLDeltaDecayChannel_hh 1
|
||||
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class DeltaDecayChannel : public IChannel {
|
||||
public:
|
||||
DeltaDecayChannel(Nucleus *n, Particle *, ThreeVector const);
|
||||
virtual ~DeltaDecayChannel();
|
||||
|
||||
static G4double computeDecayTime(Particle *p);
|
||||
FinalState* getFinalState();
|
||||
|
||||
private:
|
||||
void sampleAngles(G4double*, G4double*, G4double*);
|
||||
|
||||
Particle *theParticle;
|
||||
Nucleus *theNucleus;
|
||||
ThreeVector const incidentDirection;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLDeltaProductionChannel_hh
|
||||
#define G4INCLDeltaProductionChannel_hh 1
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class DeltaProductionChannel : public IChannel {
|
||||
public:
|
||||
DeltaProductionChannel(Particle *, Particle *, Nucleus *);
|
||||
virtual ~DeltaProductionChannel();
|
||||
|
||||
FinalState* getFinalState();
|
||||
|
||||
private:
|
||||
G4double sampleDeltaMass(G4double ecm);
|
||||
|
||||
Nucleus *theNucleus;
|
||||
Particle *particle1, *particle2;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
|
||||
#ifndef G4INCLElasticChannel_HH_
|
||||
#define G4INCLElasticChannel_HH_ 1
|
||||
|
||||
namespace G4INCL {
|
||||
class ElasticChannel : public IChannel {
|
||||
|
||||
public:
|
||||
ElasticChannel(Nucleus *n, Particle *p1, Particle *p2);
|
||||
virtual ~ElasticChannel();
|
||||
|
||||
FinalState* getFinalState();
|
||||
|
||||
private:
|
||||
Nucleus *theNucleus;
|
||||
Particle *particle1, *particle2;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLEventAction_hh
|
||||
#define G4INCLEventAction_hh 1
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class EventAction {
|
||||
public:
|
||||
EventAction();
|
||||
~EventAction();
|
||||
void beforeEventAction();
|
||||
void afterEventAction();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLFPEDebug_hh
|
||||
#define G4INCLFPEDebug_hh 1
|
||||
|
||||
#ifdef INCL_FPE_DEBUG
|
||||
|
||||
#ifdef __linux__
|
||||
#ifdef __GNUC__
|
||||
#include <features.h>
|
||||
#include <fenv.h>
|
||||
#include <csignal>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
struct sigaction termaction, oldaction;
|
||||
|
||||
void TerminationSignalHandler(G4int sig)
|
||||
{
|
||||
std::cerr << "ERROR: " << sig;
|
||||
std::string message;
|
||||
switch (SIGFPE)
|
||||
{
|
||||
case FPE_INTDIV:
|
||||
message = "Integer divide by zero.";
|
||||
break;
|
||||
case FPE_INTOVF:
|
||||
message = "Integer overflow.";
|
||||
break;
|
||||
case FPE_FLTDIV:
|
||||
message = "Floating poG4int divide by zero.";
|
||||
break;
|
||||
case FPE_FLTOVF:
|
||||
message = "Floating poG4int overflow.";
|
||||
break;
|
||||
case FPE_FLTUND:
|
||||
message = "Floating poG4int underflow.";
|
||||
break;
|
||||
case FPE_FLTRES:
|
||||
message = "Floating poG4int inexact result.";
|
||||
break;
|
||||
case FPE_FLTINV:
|
||||
message = "Floating poG4int invalid operation.";
|
||||
break;
|
||||
case FPE_FLTSUB:
|
||||
message = "Subscript out of range.";
|
||||
break;
|
||||
default:
|
||||
message = "Unknown error.";
|
||||
break;
|
||||
}
|
||||
std::cerr << " - " << message << std::endl;
|
||||
|
||||
::abort();
|
||||
}
|
||||
|
||||
void enableFPEDetection ()
|
||||
{
|
||||
std::cerr << std::endl
|
||||
<< " "
|
||||
<< "############################################" << std::endl
|
||||
<< " "
|
||||
<< "!!! WARNING - FPE detection is activated !!!" << std::endl
|
||||
<< " "
|
||||
<< "############################################" << std::endl;
|
||||
|
||||
(void) feenableexcept( FE_DIVBYZERO );
|
||||
(void) feenableexcept( FE_INVALID );
|
||||
//(void) feenableexcept( FE_OVERFLOW );
|
||||
//(void) feenableexcept( FE_UNDERFLOW );
|
||||
|
||||
sigset_t *def_set;
|
||||
def_set=&termaction.sa_mask;
|
||||
sigfillset(def_set);
|
||||
sigdelset(def_set,SIGFPE);
|
||||
termaction.sa_handler=TerminationSignalHandler;
|
||||
termaction.sa_flags=0;
|
||||
sigaction(SIGFPE, &termaction,&oldaction);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
void enableFPEDetection() {
|
||||
std::cerr <<"FPE detection is not supported by your platform." << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLGlobalInfo.hh
|
||||
* \brief Simple container for output of calculation-wide results.
|
||||
*
|
||||
* Contains the final results of an INCL calculation.
|
||||
*
|
||||
* Created on: 21 January 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLGLOBALINFO_HH
|
||||
#define G4INCLGLOBALINFO_HH 1
|
||||
|
||||
#ifdef INCL_ROOT_USE
|
||||
#include <Rtypes.h>
|
||||
#endif
|
||||
|
||||
namespace G4INCL {
|
||||
#ifndef INCL_ROOT_USE
|
||||
typedef G4int Int_t;
|
||||
typedef short Short_t;
|
||||
typedef G4float Float_t;
|
||||
#endif
|
||||
|
||||
struct GlobalInfo {
|
||||
GlobalInfo() :
|
||||
nShots(0), nTransparents(0),
|
||||
geometricCrossSection(0.0), reactionCrossSection(0.0),
|
||||
Ap(0), Zp(0), At(0), Zt(0), Ep(0.0)
|
||||
{};
|
||||
|
||||
/** \brief Number of shots */
|
||||
Int_t nShots;
|
||||
/** \brief Number of transparent shots */
|
||||
Int_t nTransparents;
|
||||
/** \brief Geometric cross section */
|
||||
Float_t geometricCrossSection;
|
||||
/** \brief Calculated reaction cross section */
|
||||
Float_t reactionCrossSection;
|
||||
/** \brief Error on the calculated reaction cross section */
|
||||
Float_t errorReactionCrossSection;
|
||||
|
||||
// TODO: echo all the input parameters here
|
||||
/** \brief Projectile mass number given as input */
|
||||
Short_t Ap;
|
||||
/** \brief Projectile charge number given as input */
|
||||
Short_t Zp;
|
||||
/** \brief Target mass number given as input */
|
||||
Short_t At;
|
||||
/** \brief Target charge number given as input */
|
||||
Short_t Zt;
|
||||
/** \brief Projectile kinetic energy given as input */
|
||||
Float_t Ep;
|
||||
|
||||
/** \brief Maximum model name size */
|
||||
static const Short_t maxModelSize = 200;
|
||||
/** \brief Name of the cascade model */
|
||||
char cascadeModel[maxModelSize];
|
||||
/** \brief Name of the de-excitation model */
|
||||
char deexcitationModel[maxModelSize];
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* G4INCLGLOBALINFO_HH */
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLIClusteringModel_hh
|
||||
#define G4INCLIClusteringModel_hh 1
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLCluster.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* An abstract G4interface to cluster formation model(s).
|
||||
*/
|
||||
class IClusteringModel {
|
||||
public:
|
||||
IClusteringModel() {};
|
||||
virtual ~IClusteringModel() {};
|
||||
|
||||
/**
|
||||
* Choose a cluster candidate to be produced. At this poG4int we
|
||||
* don't yet decide if it can pass through the Coulomb barrier or
|
||||
* not.
|
||||
*/
|
||||
virtual Cluster* getCluster(Nucleus*, Particle*) = 0;
|
||||
|
||||
/**
|
||||
* Determine whether cluster can escape or not.
|
||||
*/
|
||||
virtual G4bool clusterCanEscape(Cluster const * const) = 0;
|
||||
|
||||
static G4int maxClusterAlgorithmMass;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLICoulomb.hh
|
||||
* \brief Abstract G4interface for Coulomb distortion.
|
||||
*
|
||||
* Created on: 14 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLICOULOMB_HH_
|
||||
#define G4INCLICOULOMB_HH_
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class ICoulomb {
|
||||
public:
|
||||
ICoulomb() {}
|
||||
virtual ~ICoulomb() {}
|
||||
|
||||
/** \brief Coulomb conversion factor, in MeV*fm.
|
||||
*
|
||||
* \f[ e^2/(4 pi epsilon_0) \f]
|
||||
*/
|
||||
static const G4double eSquared;
|
||||
|
||||
/** \brief Modify the momentum of an incoming particle and position it on
|
||||
* the surface of the nucleus.
|
||||
*
|
||||
* This method places Particle p on the surface of Nucleus n and modifies
|
||||
* the direction of its momentum to be tangent to the Coulomb trajectory in
|
||||
* that poG4int.
|
||||
*
|
||||
* The input particle has to be prepared with its asymptotic momentum. Its
|
||||
* position is used only for the purpose of computing the asymptotic impact
|
||||
* parameter; in other words, this method only uses the components of the
|
||||
* position that are perpendicular to the momentum. The remaining component
|
||||
* is not used, and can be set to any value.
|
||||
*
|
||||
* \param p incoming particle
|
||||
* \param n distorting nucleus
|
||||
**/
|
||||
virtual void bringToSurface(Particle * const p, Nucleus const * const n) const = 0;
|
||||
|
||||
/** \brief Modify the momenta of the outgoing particles. **/
|
||||
virtual void distortOut(ParticleList const &pL, Nucleus const * const n) const = 0;
|
||||
|
||||
/** \brief Return the maximum impact parameter for Coulomb-distorted
|
||||
* trajectories. **/
|
||||
virtual G4double maxImpactParameter(Particle const * const p, Nucleus const * const n) const = 0;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* G4INCLICOULOMB_HH_ */
|
||||
@@ -0,0 +1,176 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLIFunction_hh
|
||||
#define G4INCLIFunction_hh 1
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* 1D function G4interface
|
||||
*/
|
||||
class IFunction1D {
|
||||
public:
|
||||
IFunction1D() {};
|
||||
IFunction1D(G4double, G4double, G4double) {};
|
||||
virtual ~IFunction1D() {};
|
||||
|
||||
/**
|
||||
* Compute the value of the function
|
||||
*/
|
||||
virtual G4double getValue(G4double r) = 0;
|
||||
|
||||
virtual G4double getRadiusParameter() = 0;
|
||||
virtual G4double getMaximumRadius() = 0;
|
||||
virtual G4double getDiffusenessParameter() = 0;
|
||||
virtual void setRadiusParameter(G4double r) = 0;
|
||||
virtual void setMaximumRadius(G4double r) = 0;
|
||||
virtual void setDiffusenessParameter(G4double a) = 0;
|
||||
};
|
||||
|
||||
class WoodsSaxon : public IFunction1D {
|
||||
public:
|
||||
WoodsSaxon(G4double radiusParameter, G4double maximumRadius, G4double diffusenessParameter)
|
||||
:theRadiusParameter(radiusParameter), theMaximumRadius(maximumRadius),
|
||||
theDiffusenessParameter(diffusenessParameter)
|
||||
{};
|
||||
|
||||
virtual ~WoodsSaxon() {};
|
||||
|
||||
/**
|
||||
* r^2 / (1.0 - exp((r-r0)/adif))
|
||||
*/
|
||||
inline G4double getValue(G4double r) {
|
||||
return theRadiusParameter*theRadiusParameter
|
||||
/ (1.0 + std::exp((r - theRadiusParameter)/theDiffusenessParameter));
|
||||
};
|
||||
|
||||
inline G4double getRadiusParameter() { return theRadiusParameter; };
|
||||
inline G4double getMaximumRadius() { return theMaximumRadius; };
|
||||
inline G4double getDiffusenessParameter() { return theDiffusenessParameter; };
|
||||
|
||||
inline void setRadiusParameter(G4double r) { theRadiusParameter = r; };
|
||||
inline void setMaximumRadius(G4double r) { theMaximumRadius = r; };
|
||||
inline void setDiffusenessParameter(G4double a) { theDiffusenessParameter = a; };
|
||||
|
||||
private:
|
||||
G4double theRadiusParameter, theMaximumRadius, theDiffusenessParameter;
|
||||
};
|
||||
|
||||
class DerivWoodsSaxon : public IFunction1D {
|
||||
public:
|
||||
DerivWoodsSaxon(G4double radiusParameter, G4double maximumRadius, G4double diffusenessParameter)
|
||||
:theRadiusParameter(radiusParameter), theMaximumRadius(maximumRadius),
|
||||
theDiffusenessParameter(diffusenessParameter)
|
||||
{};
|
||||
|
||||
virtual ~DerivWoodsSaxon() {};
|
||||
|
||||
inline G4double getValue(G4double r) {
|
||||
G4double derivwsax = std::pow(r,3)
|
||||
*std::exp((r - theRadiusParameter)/theDiffusenessParameter)
|
||||
/std::pow((1.0 + std::exp((r - theRadiusParameter)/theDiffusenessParameter)),2);
|
||||
return derivwsax/theDiffusenessParameter;
|
||||
}
|
||||
|
||||
inline G4double getRadiusParameter() { return theRadiusParameter; };
|
||||
inline G4double getMaximumRadius() { return theMaximumRadius; };
|
||||
inline G4double getDiffusenessParameter() { return theDiffusenessParameter; };
|
||||
|
||||
inline void setRadiusParameter(G4double r) { theRadiusParameter = r; };
|
||||
inline void setMaximumRadius(G4double r) { theMaximumRadius = r; };
|
||||
inline void setDiffusenessParameter(G4double a) { theDiffusenessParameter = a; };
|
||||
|
||||
private:
|
||||
G4double theRadiusParameter, theMaximumRadius, theDiffusenessParameter;
|
||||
};
|
||||
|
||||
class DerivModifiedHarmonicOscillator : public IFunction1D {
|
||||
public:
|
||||
DerivModifiedHarmonicOscillator(G4double radiusParameter, G4double maximumRadius, G4double diffusenessParameter)
|
||||
:theRadiusParameter(radiusParameter), theMaximumRadius(maximumRadius),
|
||||
theDiffusenessParameter(diffusenessParameter)
|
||||
{};
|
||||
|
||||
virtual ~DerivModifiedHarmonicOscillator() {};
|
||||
|
||||
inline G4double getValue(G4double r) {
|
||||
const G4double arg = std::pow((r/theDiffusenessParameter),2);
|
||||
return -2.0* r*r *arg * (theRadiusParameter - 1.0 - theRadiusParameter*arg)*std::exp(-arg);
|
||||
}
|
||||
|
||||
inline G4double getRadiusParameter() { return theRadiusParameter; };
|
||||
inline G4double getMaximumRadius() { return theMaximumRadius; };
|
||||
inline G4double getDiffusenessParameter() { return theDiffusenessParameter; };
|
||||
|
||||
inline void setRadiusParameter(G4double r) { theRadiusParameter = r; };
|
||||
inline void setMaximumRadius(G4double r) { theMaximumRadius = r; };
|
||||
inline void setDiffusenessParameter(G4double a) { theDiffusenessParameter = a; };
|
||||
|
||||
private:
|
||||
G4double theRadiusParameter, theMaximumRadius, theDiffusenessParameter;
|
||||
};
|
||||
|
||||
class DerivGaussian : public IFunction1D {
|
||||
public:
|
||||
DerivGaussian(G4double radiusParameter, G4double maximumRadius, G4double diffusenessParameter)
|
||||
:theRadiusParameter(radiusParameter), theMaximumRadius(maximumRadius),
|
||||
theDiffusenessParameter(diffusenessParameter)
|
||||
{};
|
||||
|
||||
virtual ~DerivGaussian() {};
|
||||
|
||||
inline G4double getValue(G4double r) {
|
||||
const G4double arg = std::pow((r/theDiffusenessParameter),2);
|
||||
return r*r*arg*std::exp(-arg/2.0);
|
||||
}
|
||||
|
||||
inline G4double getRadiusParameter() { return theRadiusParameter; };
|
||||
inline G4double getMaximumRadius() { return theMaximumRadius; };
|
||||
inline G4double getDiffusenessParameter() { return theDiffusenessParameter; };
|
||||
|
||||
inline void setRadiusParameter(G4double r) { theRadiusParameter = r; };
|
||||
inline void setMaximumRadius(G4double r) { theMaximumRadius = r; };
|
||||
inline void setDiffusenessParameter(G4double a) { theDiffusenessParameter = a; };
|
||||
|
||||
private:
|
||||
G4double theRadiusParameter, theMaximumRadius, theDiffusenessParameter;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLINuclearPotential.hh
|
||||
* \brief Abstract G4interface to the nuclear potential.
|
||||
*
|
||||
* NuclearPotential-like classes should provide access to the value of the
|
||||
* potential of a particle in a particular context. For example, an instance of
|
||||
* a NuclearPotential class should be associated to every nucleus.
|
||||
*
|
||||
* Created on: 17 January 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLINUCLEARPOTENTIAL_HH
|
||||
#define G4INCLINUCLEARPOTENTIAL_HH 1
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNuclearDensity.hh"
|
||||
#include <map>
|
||||
// #include <cassert>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
namespace NuclearPotential {
|
||||
|
||||
class INuclearPotential {
|
||||
public:
|
||||
INuclearPotential(NuclearDensity * const nuclearDensity, G4bool pionPot)
|
||||
: theDensity(nuclearDensity), pionPotential(pionPot)
|
||||
{
|
||||
if(pionPotential) {
|
||||
const G4double ZOverA = ((G4double) theDensity->getZ()) / ((G4double) theDensity->getA());
|
||||
// As in INCL4.6, use the r0*A^(1/3) formula to estimate vc
|
||||
const G4double r = 1.12*Math::pow13((G4double)theDensity->getA());
|
||||
|
||||
const G4double xsi = 1. - 2.*ZOverA;
|
||||
const G4double vc = 1.8*theDensity->getZ()/r; // 1.8 = 1.44*1.25
|
||||
vPiPlus = vPionDefault + 71.*xsi - vc;
|
||||
vPiZero = vPionDefault;
|
||||
vPiMinus = vPionDefault - 71.*xsi + vc;
|
||||
} else {
|
||||
vPiPlus = 0.0;
|
||||
vPiZero = 0.0;
|
||||
vPiMinus = 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
virtual ~INuclearPotential() {}
|
||||
|
||||
inline NuclearDensity *getDensity() const {
|
||||
return theDensity;
|
||||
}
|
||||
|
||||
void setDensity(NuclearDensity * const nuclearDensity) {
|
||||
theDensity = nuclearDensity;
|
||||
}
|
||||
|
||||
/// \brief Do we have a pion potential?
|
||||
G4bool hasPionPotential() { return pionPotential; }
|
||||
|
||||
virtual G4double computePotentialEnergy(const Particle * const p) const = 0;
|
||||
|
||||
/** \brief Return the Fermi energy for a particle.
|
||||
*
|
||||
* \param p poG4inter to a Particle
|
||||
* \return Fermi energy for that particle type
|
||||
**/
|
||||
inline G4double getFermiEnergy(const Particle * const p) const { return fermiEnergy.find(p->getType())->second; }
|
||||
|
||||
/** \brief Return the Fermi energy for a particle type.
|
||||
*
|
||||
* \param t particle type
|
||||
* \return Fermi energy for that particle type
|
||||
**/
|
||||
inline G4double getFermiEnergy(const ParticleType t) const { return fermiEnergy.find(t)->second; }
|
||||
|
||||
/** \brief Return the Fermi momentum for a particle.
|
||||
*
|
||||
* \param p poG4inter to a Particle
|
||||
* \return Fermi momentum for that particle type
|
||||
**/
|
||||
inline G4double getFermiMomentum(const Particle * const p) const {
|
||||
if(p->isDelta()) {
|
||||
const G4double Tf = getFermiEnergy(p), m = p->getMass();
|
||||
return std::sqrt(Tf*(Tf+2.*m));
|
||||
} else
|
||||
return fermiMomentum.find(p->getType())->second;
|
||||
}
|
||||
|
||||
/** \brief Return the Fermi momentum for a particle type.
|
||||
*
|
||||
* \param t particle type
|
||||
* \return Fermi momentum for that particle type
|
||||
**/
|
||||
inline G4double getFermiMomentum(const ParticleType t) const {
|
||||
// assert(t!=DeltaPlusPlus && t!=DeltaPlus && t!=DeltaZero && t!=DeltaMinus);
|
||||
return fermiMomentum.find(t)->second;
|
||||
}
|
||||
|
||||
protected:
|
||||
/// \brief Compute the potential energy for the given pion.
|
||||
G4double computePionPotentialEnergy(const Particle * const p) const {
|
||||
// assert(p->getType()==PiPlus || p->getType()==PiZero || p->getType()==PiMinus);
|
||||
if(pionPotential && !p->isOutOfWell()) {
|
||||
switch( p->getType() ) {
|
||||
case PiPlus:
|
||||
return vPiPlus;
|
||||
break;
|
||||
case PiZero:
|
||||
return vPiZero;
|
||||
break;
|
||||
case PiMinus:
|
||||
return vPiMinus;
|
||||
break;
|
||||
default: // Pion potential is defined and non-zero only for pions
|
||||
return 0.0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
NuclearDensity *theDensity;
|
||||
|
||||
/* \brief map of Fermi energies per particle type */
|
||||
std::map<ParticleType,G4double> fermiEnergy;
|
||||
/* \brief map of Fermi momenta per particle type */
|
||||
std::map<ParticleType,G4double> fermiMomentum;
|
||||
|
||||
private:
|
||||
G4bool pionPotential;
|
||||
G4double vPiPlus, vPiZero, vPiMinus;
|
||||
static const G4double vPionDefault;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif /* G4INCLINUCLEARPOTENTIAL_HH_ */
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLIPauli_hh
|
||||
#define G4INCLIPauli_hh 1
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class IPauli {
|
||||
public:
|
||||
IPauli() {};
|
||||
virtual ~IPauli() {};
|
||||
|
||||
virtual G4bool isBlocked(ParticleList const, Nucleus const * const) const = 0;
|
||||
|
||||
protected:
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* IPropagationModel.hh
|
||||
*
|
||||
* Created on: 4 juin 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLIPropagationModel_hh
|
||||
#define G4INCLIPropagationModel_hh
|
||||
|
||||
#include "G4INCLIAvatar.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* Propagation model takes care of transporting the particles until something
|
||||
* G4interesting (i.e. an avatar) happens. This avatar is then returned back to the INCL
|
||||
* kernel for further processing.
|
||||
*
|
||||
* The propagation model idea abstracts the details of propagation. This allows us to
|
||||
* conveniently support multiple propagation models and to compare their results. Some
|
||||
* possible future propagation models are: straight line trajectories by using constant
|
||||
* time step and curved trajectories.
|
||||
*/
|
||||
class IPropagationModel {
|
||||
public:
|
||||
IPropagationModel();
|
||||
virtual ~IPropagationModel();
|
||||
|
||||
/**
|
||||
* Set the nucleus for the propagation model.
|
||||
*
|
||||
* @param nucleus PoG4inter to the nucleus
|
||||
*/
|
||||
virtual void setNucleus(G4INCL::Nucleus *nucleus) = 0;
|
||||
|
||||
/**
|
||||
* Get a poG4inter to the nucleus.
|
||||
*
|
||||
* @return G4INCL::Nuleus*
|
||||
*/
|
||||
virtual G4INCL::Nucleus* getNucleus() = 0;
|
||||
|
||||
virtual G4bool shootProjectile(G4INCL::Particle *p, G4double impactParameter) = 0;
|
||||
virtual G4bool shootProjectile(G4INCL::Nucleus *n, G4double impactParameter) = 0;
|
||||
|
||||
/**
|
||||
* Returns the current global time of the system.
|
||||
*/
|
||||
virtual G4double getCurrentTime() = 0;
|
||||
|
||||
/**
|
||||
* Set new stopping time to the propagation.
|
||||
*/
|
||||
virtual void setStoppingTime(G4double) = 0;
|
||||
|
||||
/**
|
||||
* Get the current stopping time.
|
||||
*/
|
||||
virtual G4double getStoppingTime() = 0;
|
||||
|
||||
/**
|
||||
* Propagate the particles and get the next avatar.
|
||||
*
|
||||
* @return G4INCL::IAvatar the next avatar
|
||||
*/
|
||||
virtual G4INCL::IAvatar* propagate() = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
+241
@@ -0,0 +1,241 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/* \file G4INCLInteractionAvatar.hh
|
||||
* \brief Virtual class for G4interaction avatars.
|
||||
*
|
||||
* This class is inherited by decay and collision avatars. The goal is to
|
||||
* provide a uniform treatment of common physics, such as Pauli blocking,
|
||||
* enforcement of energy conservation, etc.
|
||||
*
|
||||
* Created on: Mar 1st, 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLINTERACTIONAVATAR_HH_
|
||||
#define G4INCLINTERACTIONAVATAR_HH_
|
||||
|
||||
#include "G4INCLIAvatar.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
#include "G4INCLRootFinder.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class InteractionAvatar : public G4INCL::IAvatar {
|
||||
public:
|
||||
InteractionAvatar(G4double, G4INCL::Nucleus*, G4INCL::Particle*);
|
||||
InteractionAvatar(G4double, G4INCL::Nucleus*, G4INCL::Particle*, G4INCL::Particle*);
|
||||
virtual ~InteractionAvatar();
|
||||
|
||||
/// \brief Target accuracy in the determination of the local-energy Q-value
|
||||
static const G4double locEAccuracy;
|
||||
/// \brief Max number of iterations for the determination of the local-energy Q-value
|
||||
static const G4int maxIterLocE;
|
||||
|
||||
protected:
|
||||
virtual G4INCL::IChannel* getChannel() const = 0;
|
||||
|
||||
G4bool bringParticleInside(Particle * const p);
|
||||
|
||||
/** \brief Apply local-energy transformation, if appropriate
|
||||
*
|
||||
* \param p particle to apply the transformation to
|
||||
*/
|
||||
void preInteractionLocalEnergy(Particle * const p);
|
||||
|
||||
/** \brief Store the state of the particles before the G4interaction
|
||||
*
|
||||
* If the G4interaction cannot be realised for any reason, we will need to
|
||||
* restore the particle state as it was before. This is done by calling
|
||||
* the restoreParticles() method.
|
||||
*/
|
||||
void preInteractionBlocking();
|
||||
|
||||
void preInteraction();
|
||||
FinalState *postInteraction(FinalState *);
|
||||
|
||||
/** \brief Restore the state of both particles.
|
||||
*
|
||||
* The state must first be stored by calling preInteractionBlocking().
|
||||
*/
|
||||
void restoreParticles() const;
|
||||
|
||||
/// \brief true if the given avatar should use local energy
|
||||
G4bool shouldUseLocalEnergy() const {
|
||||
if(!theNucleus) return false;
|
||||
LocalEnergyType theLocalEnergyType;
|
||||
if(getType()==DecayAvatarType || isPiN)
|
||||
theLocalEnergyType = theNucleus->getStore()->getConfig()->getLocalEnergyPiType();
|
||||
else
|
||||
theLocalEnergyType = theNucleus->getStore()->getConfig()->getLocalEnergyBBType();
|
||||
|
||||
const G4bool firstAvatar = (theNucleus->getStore()->getBook()->getAcceptedCollisions() == 0);
|
||||
return ((theLocalEnergyType == FirstCollisionLocalEnergy && firstAvatar) ||
|
||||
theLocalEnergyType == AlwaysLocalEnergy);
|
||||
}
|
||||
|
||||
G4INCL::Nucleus *theNucleus;
|
||||
G4INCL::Particle *particle1, *particle2;
|
||||
ThreeVector boostVector;
|
||||
ParticleType oldParticle1Type, oldParticle2Type;
|
||||
G4double oldParticle1Energy, oldParticle2Energy, oldTotalEnergy, oldXSec;
|
||||
G4double oldParticle1Potential, oldParticle2Potential;
|
||||
G4double oldParticle1Mass, oldParticle2Mass;
|
||||
G4double oldParticle1Helicity, oldParticle2Helicity;
|
||||
ThreeVector oldParticle1Momentum, oldParticle2Momentum;
|
||||
ThreeVector oldParticle1Position, oldParticle2Position;
|
||||
G4bool isPiN;
|
||||
|
||||
private:
|
||||
/// \brief RootFunctor-derived object for enforcing energy conservation in N-N.
|
||||
class ViolationEMomentumFunctor : public RootFunctor {
|
||||
public:
|
||||
/** \brief Prepare for calling the () operator and scaleParticleMomenta
|
||||
*
|
||||
* The constructor sets the private class members.
|
||||
*/
|
||||
ViolationEMomentumFunctor(Nucleus * const nucleus, FinalState const * const finalState, ThreeVector const * const boost, const G4bool localE);
|
||||
virtual ~ViolationEMomentumFunctor() { particleMomenta.clear(); }
|
||||
|
||||
/** \brief Compute the energy-conservation violation.
|
||||
*
|
||||
* \param alpha scale factor for the particle momenta
|
||||
* \return the energy-conservation violation
|
||||
*/
|
||||
G4double operator()(const G4double x) const;
|
||||
|
||||
/// \brief Clean up after root finding
|
||||
void cleanUp(const G4bool success) const;
|
||||
|
||||
private:
|
||||
/// \brief List of final-state particles.
|
||||
ParticleList finalParticles;
|
||||
/// \brief CM particle momenta, as determined by the channel.
|
||||
std::list<ThreeVector> particleMomenta;
|
||||
/// \brief Total energy before the G4interaction.
|
||||
G4double initialEnergy;
|
||||
/// \brief PoG4inter to the nucleus
|
||||
Nucleus *theNucleus;
|
||||
/// \brief PoG4inter to the boost vector
|
||||
ThreeVector const *boostVector;
|
||||
/// \brief true if we must apply local energy to nucleons
|
||||
G4bool hasLocalEnergy;
|
||||
/// \brief true if we must apply local energy to deltas
|
||||
G4bool hasLocalEnergyDelta;
|
||||
|
||||
/// \brief True if we should use local energy
|
||||
const G4bool shouldUseLocalEnergy;
|
||||
|
||||
/** \brief Scale the momenta of the modified and created particles.
|
||||
*
|
||||
* Set the momenta of the modified and created particles to alpha times
|
||||
* their original momenta (stored in particleMomenta). You must call
|
||||
* init() before using this method.
|
||||
*
|
||||
* \param alpha scale factor
|
||||
*/
|
||||
void scaleParticleMomenta(const G4double alpha) const;
|
||||
|
||||
};
|
||||
|
||||
/// \brief RootFunctor-derived object for enforcing energy conservation in pi-N.
|
||||
class ViolationEEnergyFunctor : public RootFunctor {
|
||||
public:
|
||||
/** \brief Prepare for calling the () operator and scaleParticleMomenta
|
||||
*
|
||||
* The constructor sets the private class members.
|
||||
*/
|
||||
ViolationEEnergyFunctor(Nucleus * const nucleus, FinalState const * const finalState);
|
||||
virtual ~ViolationEEnergyFunctor() {}
|
||||
|
||||
/** \brief Compute the energy-conservation violation.
|
||||
*
|
||||
* \param alpha scale factor for the particle momenta
|
||||
* \return the energy-conservation violation
|
||||
*/
|
||||
G4double operator()(const G4double x) const;
|
||||
|
||||
/// \brief Clean up after root finding
|
||||
void cleanUp(const G4bool success) const;
|
||||
|
||||
/** \brief Set the energy of the particle.
|
||||
*
|
||||
* \param energy
|
||||
*/
|
||||
void setParticleEnergy(const G4double energy) const;
|
||||
|
||||
private:
|
||||
/// \brief Total energy before the G4interaction.
|
||||
G4double initialEnergy;
|
||||
/// \brief PoG4inter to the nucleus.
|
||||
Nucleus *theNucleus;
|
||||
/// \brief The final-state particle.
|
||||
Particle *theParticle;
|
||||
/// \brief The initial energy of the particle.
|
||||
G4double theEnergy;
|
||||
/// \brief The initial momentum of the particle.
|
||||
ThreeVector theMomentum;
|
||||
/** \brief Threshold for the energy of the particle
|
||||
*
|
||||
* The particle (a delta) cannot have less than this energy.
|
||||
*/
|
||||
G4double energyThreshold;
|
||||
};
|
||||
|
||||
RootFunctor *violationEFunctor;
|
||||
|
||||
protected:
|
||||
/** \brief Enforce energy conservation.
|
||||
*
|
||||
* Final states generated by the channels might violate energy conservation
|
||||
* because of different reasons (energy-dependent potentials, local
|
||||
* energy...). This conservation law must therefore be enforced by hand. We
|
||||
* do so by rescaling the momenta of the final-state particles in the CM
|
||||
* frame. If this turns out to be impossible, this method returns false.
|
||||
*
|
||||
* \return true if the algorithm succeeded
|
||||
*/
|
||||
G4bool enforceEnergyConservation(FinalState * const fs);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* G4INCLINTERACTIONAVATAR_HH_ */
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef KinematicsUtils_hh
|
||||
#define KinematicsUtils_hh 1
|
||||
|
||||
#include "G4INCLThreeVector.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class KinematicsUtils {
|
||||
public:
|
||||
static void transformToLocalEnergyFrame(Nucleus const * const n, Particle * const p);
|
||||
static G4double getLocalEnergy(Nucleus const * const n, Particle * const p);
|
||||
|
||||
static ThreeVector makeBoostVector(Particle const * const p1, Particle const * const p2);
|
||||
static G4double totalEnergyInCM(Particle const * const p1, Particle const * const p2);
|
||||
static G4double squareTotalEnergyInCM(Particle const * const p1, Particle const * const p2);
|
||||
|
||||
/** \brief gives the momentum in the CM frame of two particles.
|
||||
*
|
||||
* The formula is the following:
|
||||
* \f[ p_{CM}^2 = \frac{z^2 - m_1^2 m_2^2}{2 z + m_1^2 + m_2^2} \f]
|
||||
* where \f$z\f$ is the scalar product of the momentum four-vectors:
|
||||
* \f[ z = E_1 E_2 - \vec{p}_1\cdot\vec{p}_2 \f]
|
||||
*
|
||||
* \param p1 poG4inter to particle 1
|
||||
* \param p2 poG4inter to particle 2
|
||||
* \return the absolute value of the momentum of any of the two particles in
|
||||
* the CM frame, in MeV/c.
|
||||
*/
|
||||
static G4double momentumInCM(Particle const * const p1, Particle const * const p2);
|
||||
|
||||
static G4double momentumInCM(const G4double E, const G4double M1, const G4double M2);
|
||||
|
||||
/** \brief gives the momentum in the lab frame of two particles.
|
||||
*
|
||||
* Assumes particle 1 carries all the momentum and particle 2 is at rest.
|
||||
*
|
||||
* The formula is the following:
|
||||
* \f[ p_{lab}^2 = \frac{s^2 - 2 s (m_1^2 + m_2^2) + {(m_1^2 - m_2^2)}^2}{4 m_2^2} \f]
|
||||
*
|
||||
* \param p1 poG4inter to particle 1
|
||||
* \param p2 poG4inter to particle 2
|
||||
* \return the absolute value of the momentum of particle 1 in the lab frame,
|
||||
* in MeV/c
|
||||
*/
|
||||
static G4double momentumInLab(Particle const * const p1, Particle const * const p2);
|
||||
static G4double momentumInLab(const G4double s, const G4double m1, const G4double m2);
|
||||
static G4double sumTotalEnergies(const ParticleList &);
|
||||
static ThreeVector sumMomenta(const ParticleList &);
|
||||
static G4double energy(const ThreeVector &p, const G4double m);
|
||||
static G4double invariantMass(const G4double E, const ThreeVector & p);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLNuclearDensity_hh
|
||||
#define G4INCLNuclearDensity_hh 1
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "G4INCLThreeVector.hh"
|
||||
#include "G4INCLIFunction.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class NuclearDensity {
|
||||
public:
|
||||
NuclearDensity(G4int A, G4int Z, IFunction1D *densityFunction);
|
||||
NuclearDensity(G4int A, G4int Z, IFunction1D *densityFunction,
|
||||
G4double radius, G4double maxRadius, G4double diffuseness);
|
||||
// NuclearDensity(G4int A, G4int Z, IFunction1D *densityFunction,
|
||||
// G4double radius, G4double maxRadius, G4double diffuseness);
|
||||
~NuclearDensity();
|
||||
|
||||
G4double getFirstDerivative(G4int index) const;
|
||||
|
||||
/** \brief Get the maximum allowed radius for a given momentum.
|
||||
* \param p Absolute value of the particle momentum, divided by the
|
||||
* relevant Fermi momentum.
|
||||
* \return Maximum allowed radius.
|
||||
*/
|
||||
G4double getMaxRFromP(G4double p) const;
|
||||
G4double getMaxRFromPLegacy(G4double p) const;
|
||||
G4double getMaxRFromPNew(G4double p) const;
|
||||
|
||||
G4double getMaxTFromR(G4double r) const;
|
||||
|
||||
G4double getMaximumRadius() const { return theMaximumRadius; };
|
||||
|
||||
/** \brief Initialize the transmission radius. */
|
||||
void initializeTransmissionRadii();
|
||||
|
||||
/** \brief The radius used for calculating the transmission coefficient.
|
||||
*
|
||||
* \return the radius
|
||||
*/
|
||||
G4double getTransmissionRadius(Particle const * const p) const {
|
||||
if(p->getType()==Composite) {
|
||||
return transmissionRadius.find(p->getType())->second +
|
||||
ParticleTable::getClusterRMS(p->getA(), p->getZ());
|
||||
} else
|
||||
return transmissionRadius.find(p->getType())->second;
|
||||
};
|
||||
|
||||
/** \brief The radius used for calculating the transmission coefficient.
|
||||
*
|
||||
* \return the radius
|
||||
*/
|
||||
G4double getTransmissionRadius(ParticleType type) {
|
||||
return transmissionRadius[type];
|
||||
};
|
||||
|
||||
/// \brief Get the mass number.
|
||||
G4int getA() const { return theA; }
|
||||
|
||||
/// \brief Get the charge number.
|
||||
G4int getZ() const { return theZ; }
|
||||
|
||||
G4double getCentralRadius() { return theCentralRadius; }
|
||||
|
||||
private:
|
||||
/**
|
||||
* New implementation of the density G4interpolation function
|
||||
* without gotos.
|
||||
*/
|
||||
G4double getDensityNew(G4double) const;
|
||||
|
||||
/**
|
||||
* Direct translation of the FORTRAN version of the density
|
||||
* G4interpolation routine.
|
||||
*/
|
||||
G4double getDensityLegacy(G4double) const;
|
||||
|
||||
void initializeDensity();
|
||||
void initializeFirstDerivative();
|
||||
G4double G4integrate(G4double ami, G4double ama, G4double step) const;
|
||||
void initMaterial(G4int iamat, G4int izmat);
|
||||
|
||||
G4int theA, theZ;
|
||||
IFunction1D *densityFunction;
|
||||
G4double theRadiusParameter, theMaximumRadius, theDiffusenessParameter;
|
||||
/// \brief Represents INCL4.5's R0 variable
|
||||
G4double theCentralRadius;
|
||||
|
||||
void computeCentralRadius() {
|
||||
if(theA>=6 && theA<19)
|
||||
theCentralRadius = 1.581*theDiffusenessParameter*
|
||||
(2.+5.*theRadiusParameter)/(2.+3.*theRadiusParameter);
|
||||
else
|
||||
theCentralRadius = theRadiusParameter;
|
||||
}
|
||||
|
||||
/* \brief map of transmission radii per particle type */
|
||||
std::map<ParticleType,G4double> transmissionRadius;
|
||||
|
||||
std::vector<G4double> x, y, s;
|
||||
std::vector<G4double> r_t, tmin, s_loce;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLNuclearDensityFactory_hh
|
||||
#define G4INCLNuclearDensityFactory_hh 1
|
||||
|
||||
#include "G4INCLNuclearDensity.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class NuclearDensityFactory {
|
||||
public:
|
||||
static NuclearDensity* createDensity(G4int A, G4int Z);
|
||||
static IFunction1D* createDensityFunction(G4int A, G4int Z);
|
||||
|
||||
// protected:
|
||||
NuclearDensityFactory();
|
||||
~NuclearDensityFactory();
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLNuclearPotentialConstant.hh
|
||||
* \brief Isospin- and energy-independent nuclear potential.
|
||||
*
|
||||
* Provides a constant nuclear potential (V0).
|
||||
*
|
||||
* Created on: 17 January 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLNUCLEARPOTENTIALCONSTANT_HH
|
||||
#define G4INCLNUCLEARPOTENTIALCONSTANT_HH 1
|
||||
|
||||
#include "G4INCLINuclearPotential.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
namespace NuclearPotential {
|
||||
|
||||
class NuclearPotentialConstant : public INuclearPotential {
|
||||
|
||||
public:
|
||||
NuclearPotentialConstant(NuclearDensity *density, G4bool pionPotential);
|
||||
NuclearPotentialConstant(NuclearDensity *density, G4bool pionPotential, G4double nucleon, G4double delta);
|
||||
virtual ~NuclearPotentialConstant();
|
||||
|
||||
G4double getNucleonPotential() const { return vNucleon; }
|
||||
G4double getDeltaPotential() const { return vDelta; }
|
||||
|
||||
virtual G4double computePotentialEnergy(const Particle * const p) const;
|
||||
|
||||
private:
|
||||
G4double vNucleon, vDelta;
|
||||
|
||||
void initialize();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* G4INCLNUCLEARPOTENTIALCONSTANT_HH */
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLNuclearPotentialEnergyIsospin.hh
|
||||
* \brief Isospin- and energy-dependent nuclear potential.
|
||||
*
|
||||
* Provides an isospin- and energy-dependent nuclear potential.
|
||||
*
|
||||
* Created on: 21 March 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLNUCLEARPOTENTIALENERGYISOSPIN_HH
|
||||
#define G4INCLNUCLEARPOTENTIALENERGYISOSPIN_HH 1
|
||||
|
||||
#include "G4INCLNuclearPotentialIsospin.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
namespace NuclearPotential {
|
||||
|
||||
class NuclearPotentialEnergyIsospin : public NuclearPotentialIsospin {
|
||||
|
||||
public:
|
||||
NuclearPotentialEnergyIsospin(NuclearDensity *density, G4bool pionPotential);
|
||||
virtual ~NuclearPotentialEnergyIsospin();
|
||||
|
||||
virtual G4double computePotentialEnergy(const Particle * const p) const;
|
||||
|
||||
private:
|
||||
/// Slope of the V(T) curve
|
||||
static const G4double alpha;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* G4INCLNUCLEARPOTENTIALENERGYISOSPIN_HH */
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLNuclearPotentialIsospin.hh
|
||||
* \brief Isospin-dependent nuclear potential.
|
||||
*
|
||||
* Provides an isospin-dependent nuclear potential.
|
||||
*
|
||||
* Created on: 28 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLNUCLEARPOTENTIALISOSPIN_HH
|
||||
#define G4INCLNUCLEARPOTENTIALISOSPIN_HH 1
|
||||
|
||||
#include "G4INCLINuclearPotential.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
namespace NuclearPotential {
|
||||
|
||||
class NuclearPotentialIsospin : public INuclearPotential {
|
||||
|
||||
public:
|
||||
NuclearPotentialIsospin(NuclearDensity *density, G4bool pionPotential);
|
||||
virtual ~NuclearPotentialIsospin();
|
||||
|
||||
virtual G4double computePotentialEnergy(const Particle * const p) const;
|
||||
|
||||
private:
|
||||
G4double vProton, vNeutron;
|
||||
G4double vDeltaPlusPlus, vDeltaPlus, vDeltaZero, vDeltaMinus;
|
||||
|
||||
void initialize();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* G4INCLNUCLEARPOTENTIALISOSPIN_HH */
|
||||
@@ -0,0 +1,381 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* G4INCLNucleus.hh
|
||||
*
|
||||
* Created on: Jun 5, 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLNUCLEUS_HH_
|
||||
#define G4INCLNUCLEUS_HH_
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLEventInfo.hh"
|
||||
#include "G4INCLCluster.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
#include "G4INCLStore.hh"
|
||||
#include "G4INCLNuclearDensity.hh"
|
||||
#include "G4INCLINuclearPotential.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLConfig.hh"
|
||||
#include "G4INCLConfigEnums.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class Nucleus {
|
||||
public:
|
||||
Nucleus(G4int mass, G4int charge, Config const * const conf);
|
||||
virtual ~Nucleus();
|
||||
|
||||
/**
|
||||
* Generate the initial distribution of particles. At the beginning
|
||||
* all particles are assigned as spectators.
|
||||
*/
|
||||
void initializeParticles();
|
||||
|
||||
/**
|
||||
* Insert a new participant (e.g. a projectile) to the nucleus.
|
||||
*/
|
||||
void insertParticipant(Particle *p) {
|
||||
p->makeParticipant(); // The projectile particle is a participant
|
||||
theZ += p->getZ();
|
||||
theA += p->getA();
|
||||
theStore->particleHasEntered(p);
|
||||
if(p->isNucleon()) {
|
||||
theNpInitial += Math::heaviside(ParticleTable::getIsospin(p->getType()));
|
||||
theNnInitial += Math::heaviside(-ParticleTable::getIsospin(p->getType()));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Calculate the transmission probability for particle p
|
||||
*/
|
||||
G4double getTransmissionProbability(Particle const * const p);
|
||||
|
||||
/**
|
||||
* Apply reaction final state information to the nucleus.
|
||||
*/
|
||||
void applyFinalState(FinalState *);
|
||||
|
||||
G4int getA() const { return theA; };
|
||||
G4int getZ() const { return theZ; };
|
||||
|
||||
G4int getInitialA() const { return theInitialA; };
|
||||
G4int getInitialZ() const { return theInitialZ; };
|
||||
|
||||
/**
|
||||
* Get the list of particles that were created by the last applied final state
|
||||
*/
|
||||
ParticleList const &getCreatedParticles() const { return justCreated; }
|
||||
|
||||
/**
|
||||
* Get the list of particles that were updated by the last applied final state
|
||||
*/
|
||||
ParticleList const &getUpdatedParticles() const { return toBeUpdated; }
|
||||
|
||||
/// \brief Get the delta that could not decay
|
||||
Particle *getBlockedDelta() const { return blockedDelta; }
|
||||
|
||||
/**
|
||||
* Propagate the particles one time step.
|
||||
*
|
||||
* @param step length of the time step
|
||||
*/
|
||||
void propagateParticles(G4double step);
|
||||
|
||||
G4int getNumberOfProjectileProtons() const { return theNpInitial; };
|
||||
G4int getNumberOfProjectileNeutrons() const { return theNnInitial; };
|
||||
|
||||
/** \brief Outgoing - incoming separation energies.
|
||||
*
|
||||
* Used by CDPP.
|
||||
*/
|
||||
G4double computeSeparationEnergyBalance() const {
|
||||
G4double S = 0.0;
|
||||
ParticleList outgoing = theStore->getOutgoingParticles();
|
||||
for(ParticleIter i = outgoing.begin(); i != outgoing.end(); ++i)
|
||||
if((*i)->isNucleon() || (*i)->isResonance())
|
||||
S += ParticleTable::getSeparationEnergy((*i)->getType());
|
||||
else if((*i)->isCluster()) {
|
||||
S += (*i)->getZ() * ParticleTable::getSeparationEnergy(Proton)
|
||||
+ ((*i)->getA() - (*i)->getZ()) * ParticleTable::getSeparationEnergy(Neutron);
|
||||
}
|
||||
|
||||
S -= theNpInitial * ParticleTable::getSeparationEnergy(Proton);
|
||||
S -= theNnInitial * ParticleTable::getSeparationEnergy(Neutron);
|
||||
return S;
|
||||
}
|
||||
|
||||
/** \brief Force the decay of outgoing deltas.
|
||||
*
|
||||
* \return true if any delta was forced to decay.
|
||||
*/
|
||||
G4bool decayOutgoingDeltas();
|
||||
|
||||
/** \brief Force the decay of deltas inside the nucleus.
|
||||
*
|
||||
* \return true if any delta was forced to decay.
|
||||
*/
|
||||
G4bool decayInsideDeltas();
|
||||
|
||||
/** \brief Force the decay of unstable outgoing clusters.
|
||||
*
|
||||
* \return true if any cluster was forced to decay.
|
||||
*/
|
||||
G4bool decayOutgoingClusters();
|
||||
|
||||
/// \brief Force emission of all pions inside the nucleus.
|
||||
void emitInsidePions();
|
||||
|
||||
/** \brief Compute the recoil momentum and spin of the nucleus. */
|
||||
void computeRecoilKinematics();
|
||||
|
||||
/** \brief Compute the current center-of-mass position.
|
||||
*
|
||||
* \return the center-of-mass position vector [fm].
|
||||
*/
|
||||
ThreeVector computeCenterOfMass() const;
|
||||
|
||||
/** \brief Compute the current total energy.
|
||||
*
|
||||
* \return the total energy [MeV]
|
||||
*/
|
||||
G4double computeTotalEnergy() const;
|
||||
|
||||
/** \brief Compute the current excitation energy.
|
||||
*
|
||||
* \return the excitation energy [MeV]
|
||||
*/
|
||||
G4double computeExcitationEnergy() const;
|
||||
|
||||
/** \brief Set the incoming angular-momentum vector. */
|
||||
void setIncomingAngularMomentum(const ThreeVector &j) {
|
||||
incomingAngularMomentum = j;
|
||||
}
|
||||
|
||||
/** \brief Set the incoming momentum vector. */
|
||||
void setIncomingMomentum(const ThreeVector &p) {
|
||||
incomingMomentum = p;
|
||||
}
|
||||
|
||||
/** \brief Get the incoming momentum vector. */
|
||||
const ThreeVector &getIncomingMomentum() const {
|
||||
return incomingMomentum;
|
||||
}
|
||||
|
||||
/** \brief Set the initial energy. */
|
||||
void setInitialEnergy(const G4double e) { initialEnergy = e; }
|
||||
|
||||
/** \brief Get the initial energy. */
|
||||
G4double getInitialEnergy() const { return initialEnergy; }
|
||||
|
||||
/** \brief Get the recoil energy of the nucleus.
|
||||
*
|
||||
* Method computeRecoilKinematics() should be called first.
|
||||
*/
|
||||
G4double getRecoilEnergy() const { return theRecoilEnergy; }
|
||||
|
||||
/** \brief Get the excitation energy of the nucleus.
|
||||
*
|
||||
* Method computeRecoilKinematics() should be called first.
|
||||
*/
|
||||
G4double getExcitationEnergy() const { return theExcitationEnergy; }
|
||||
|
||||
/** \brief Get the spin of the nucleus.
|
||||
*
|
||||
* Method computeRecoilKinematics() should be called first.
|
||||
*/
|
||||
ThreeVector const &getSpin() const { return theSpin; }
|
||||
|
||||
/** \brief Get the recoil momentum of the nucleus.
|
||||
*
|
||||
* Method computeRecoilKinematics() should be called first.
|
||||
*/
|
||||
ThreeVector const &getRecoilMomentum() const { return theRecoilMomentum; }
|
||||
|
||||
/** \brief Set the recoil momentum of the nucleus
|
||||
*
|
||||
* Can be used to override the recoil momentum computed by
|
||||
* computeRecoilKinematics();
|
||||
* */
|
||||
void setRecoilMomentum(const ThreeVector &p) { theRecoilMomentum = p; }
|
||||
|
||||
/** \brief Set the recoil energy of the nucleus
|
||||
*
|
||||
* Can be used to override the recoil energy computed by
|
||||
* computeRecoilKinematics();
|
||||
* */
|
||||
void setRecoilEnergy(G4double energy) { theRecoilEnergy = energy; }
|
||||
|
||||
/**
|
||||
* Mark a particle as a participant.
|
||||
*
|
||||
* @param p poG4inter to a particle
|
||||
*/
|
||||
void participate(G4INCL::Particle *p);
|
||||
|
||||
NuclearDensity* getDensity() const { return theDensity; };
|
||||
NuclearPotential::INuclearPotential* getPotential() const { return thePotential; };
|
||||
|
||||
/// \brief Update the particle potential energy.
|
||||
inline void updatePotentialEnergy(G4INCL::Particle *p) {
|
||||
p->setPotentialEnergy(thePotential->computePotentialEnergy(p));
|
||||
}
|
||||
|
||||
///\brief Returns true if the nucleus contains any deltas.
|
||||
inline G4bool containsDeltas() {
|
||||
ParticleList inside = theStore->getParticles();
|
||||
for(ParticleIter i=inside.begin(); i!=inside.end(); ++i)
|
||||
if((*i)->isDelta()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** \brief Modify particle that enters the nucleus.
|
||||
*
|
||||
* Modify the particle momentum and/or position when the particle enters
|
||||
* the nucleus.
|
||||
*
|
||||
* \param particle poG4inter to entering particle
|
||||
* \return poG4inter to modified particle
|
||||
*/
|
||||
Particle *particleEnters(Particle *particle);
|
||||
|
||||
/** \brief Modify particle that leaves the nucleus.
|
||||
*
|
||||
* Modify the particle momentum and/or position when the particle leaves
|
||||
* the nucleus.
|
||||
*
|
||||
* \param particle poG4inter to leaving particle
|
||||
* \return poG4inter to modified particle
|
||||
*/
|
||||
Particle *particleLeaves(Particle *particle);
|
||||
|
||||
/** \brief Get the maximum allowed radius for a given particle.
|
||||
*
|
||||
* Calls the NuclearDensity::getMaxRFromP() method for nucleons and deltas,
|
||||
* and the NuclearDensity::getTrasmissionRadius() method for pions.
|
||||
*
|
||||
* \param particle poG4inter to a particle
|
||||
* \return surface radius
|
||||
*/
|
||||
G4double getSurfaceRadius(Particle const * const particle) const {
|
||||
if(particle->isPion())
|
||||
// Temporarily set RPION = RMAX
|
||||
return theDensity->getMaximumRadius();
|
||||
//return 0.5*(theDensity->getTransmissionRadius(particle)+theDensity->getMaximumRadius());
|
||||
else {
|
||||
const G4double pr = particle->getMomentum().mag()/thePotential->getFermiMomentum(particle);
|
||||
return theDensity->getMaxRFromP(pr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* PrG4int the nucleus info
|
||||
*/
|
||||
std::string prG4int();
|
||||
|
||||
std::string dump();
|
||||
|
||||
Store* getStore() const {return theStore; };
|
||||
void setStore(Store *s) {
|
||||
delete theStore;
|
||||
theStore = s;
|
||||
};
|
||||
|
||||
G4double getInitialInternalEnergy() const { return initialInternalEnergy; };
|
||||
|
||||
/** \brief Is the event transparent?
|
||||
*
|
||||
* To be called at the end of the cascade.
|
||||
**/
|
||||
G4bool isEventTransparent() const;
|
||||
|
||||
/** \brief Does the nucleus give a cascade remnant?
|
||||
*
|
||||
* To be called after computeRecoilKinematics().
|
||||
**/
|
||||
G4bool hasRemnant() const { return remnant; }
|
||||
|
||||
void forceTransparent() { forcedTransparent=true; }
|
||||
G4bool isForcedTransparent() const { return forcedTransparent; }
|
||||
|
||||
/**
|
||||
* Fill the event info which contains INCL output data
|
||||
*/
|
||||
// void fillEventInfo(Results::EventInfo *eventInfo);
|
||||
void fillEventInfo(EventInfo *eventInfo);
|
||||
|
||||
private:
|
||||
/** \brief Compute the recoil kinematics for a 1-nucleon remnant.
|
||||
*
|
||||
* Puts the remnant nucleon on mass shell and tries to enforce approximate
|
||||
* energy conservation by modifying the masses of the outgoing particles.
|
||||
*/
|
||||
void computeOneNucleonRecoilKinematics();
|
||||
|
||||
private:
|
||||
G4int theZ, theA;
|
||||
G4int theInitialZ, theInitialA;
|
||||
G4bool forcedTransparent;
|
||||
G4int theNpInitial, theNnInitial;
|
||||
G4double theExcitationEnergy;
|
||||
G4double initialInternalEnergy;
|
||||
ThreeVector incomingAngularMomentum, incomingMomentum;
|
||||
ThreeVector theSpin, theRecoilMomentum, theCenterOfMass;
|
||||
ThreeVector initialCenterOfMass;
|
||||
G4bool remnant;
|
||||
|
||||
ParticleList toBeUpdated;
|
||||
ParticleList justCreated;
|
||||
Particle *blockedDelta;
|
||||
NuclearDensity *theDensity;
|
||||
NuclearPotential::INuclearPotential *thePotential;
|
||||
G4double theRecoilEnergy;
|
||||
G4double initialEnergy;
|
||||
Store *theStore;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* G4INCLNUCLEUS_HH_ */
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLPauliBlocking__hh
|
||||
#define G4INCLPauliBlocking__hh 1
|
||||
|
||||
#include "G4INCLIPauli.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* Pauli blocking
|
||||
*
|
||||
*/
|
||||
class Pauli {
|
||||
public:
|
||||
/** \brief Check Pauli blocking.
|
||||
*
|
||||
* Note: This is a "pure" function: it doesn't retain or modify
|
||||
* any state at all and thus only depends on its arguments.
|
||||
*
|
||||
* \param p list of modified and created particles
|
||||
* \param n the nucleus
|
||||
*/
|
||||
static G4bool isBlocked(ParticleList const p, Nucleus const * const n);
|
||||
|
||||
/** \brief Check CDPP blocking.
|
||||
*
|
||||
* Note: This is a "pure" function: it doesn't retain or modify
|
||||
* any state at all and thus only depends on its arguments.
|
||||
*
|
||||
* \param p list of created particles
|
||||
* \param n the nucleus
|
||||
*/
|
||||
static G4bool isCDPPBlocked(ParticleList const p, Nucleus const * const n);
|
||||
|
||||
/**
|
||||
* Get the Pauli blocker algorithm.
|
||||
*/
|
||||
static IPauli const * getBlocker() { return thePauliBlocker; }
|
||||
|
||||
/**
|
||||
* Get the CDPP blocker algorithm.
|
||||
*/
|
||||
static IPauli const * getCDPP() { return theCDPP; }
|
||||
|
||||
/**
|
||||
* Set the Pauli blocker algorithm.
|
||||
*/
|
||||
static void setBlocker(IPauli const * const);
|
||||
|
||||
/**
|
||||
* Set the CDPP blocker algorithm.
|
||||
*/
|
||||
static void setCDPP(IPauli const * const);
|
||||
|
||||
/**
|
||||
* Delete blockers
|
||||
*/
|
||||
static void deleteBlockers() {
|
||||
delete thePauliBlocker;
|
||||
delete theCDPP;
|
||||
}
|
||||
|
||||
protected:
|
||||
Pauli() {}
|
||||
~Pauli() {}
|
||||
|
||||
private:
|
||||
static IPauli const * thePauliBlocker;
|
||||
static IPauli const * theCDPP;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLPauliGlobal_hh
|
||||
#define G4INCLPauliGlobal_hh 1
|
||||
|
||||
#include "G4INCLIPauli.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class PauliGlobal : public IPauli {
|
||||
public:
|
||||
PauliGlobal();
|
||||
~PauliGlobal();
|
||||
|
||||
G4bool isBlocked(ParticleList const, Nucleus const * const) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLPauliStandard_hh
|
||||
#define G4INCLPauliStandard_hh 1
|
||||
|
||||
#include "G4INCLIPauli.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class PauliStandard : public IPauli {
|
||||
public:
|
||||
PauliStandard();
|
||||
~PauliStandard();
|
||||
|
||||
G4bool isBlocked(ParticleList const, Nucleus const * const) const;
|
||||
G4double getBlockingProbability(Particle const * const, Nucleus const * const) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLPauliStrict_hh
|
||||
#define G4INCLPauliStrict_hh 1
|
||||
|
||||
#include "G4INCLIPauli.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class PauliStrict : public IPauli {
|
||||
public:
|
||||
PauliStrict();
|
||||
~PauliStrict();
|
||||
|
||||
G4bool isBlocked(ParticleList const, Nucleus const * const) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLPauliStrictStandard_hh
|
||||
#define G4INCLPauliStrictStandard_hh 1
|
||||
|
||||
#include "G4INCLIPauli.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class PauliStrictStandard : public IPauli {
|
||||
public:
|
||||
PauliStrictStandard();
|
||||
~PauliStrictStandard();
|
||||
|
||||
G4bool isBlocked(ParticleList const, Nucleus const * const) const;
|
||||
|
||||
private:
|
||||
IPauli const *theStrictBlocker, *theStandardBlocker;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLPionNucleonChannel_hh
|
||||
#define G4INCLPionNucleonChannel_hh 1
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
class PionNucleonChannel : public IChannel {
|
||||
public:
|
||||
PionNucleonChannel(Particle *, Particle *, Nucleus *, const G4bool localE=false);
|
||||
virtual ~PionNucleonChannel();
|
||||
|
||||
FinalState* getFinalState();
|
||||
|
||||
private:
|
||||
Nucleus *theNucleus;
|
||||
Particle *particle1, *particle2;
|
||||
const G4bool locE;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLPropagationAction_hh
|
||||
#define G4INCLPropagationAction_hh 1
|
||||
|
||||
#include "G4INCLIPropagationModel.hh"
|
||||
#include "G4INCLIAvatar.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
class PropagationAction {
|
||||
public:
|
||||
PropagationAction();
|
||||
~PropagationAction();
|
||||
|
||||
void beforePropagationAction(IPropagationModel *pm);
|
||||
void afterPropagationAction(IPropagationModel *pm,
|
||||
IAvatar *avatar);
|
||||
|
||||
private:
|
||||
long stepCounter;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
+70
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLRecombinationChannel.hh
|
||||
* \brief Delta-nucleon recombination channel.
|
||||
*
|
||||
* Created on: 25 March 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
|
||||
#ifndef G4INCLRECOMBINATIONCHANNEL_HH_
|
||||
#define G4INCLRECOMBINATIONCHANNEL_HH_
|
||||
|
||||
namespace G4INCL {
|
||||
class RecombinationChannel : public IChannel {
|
||||
|
||||
public:
|
||||
RecombinationChannel(Nucleus *n, Particle *p1, Particle *p2);
|
||||
virtual ~RecombinationChannel();
|
||||
|
||||
FinalState* getFinalState();
|
||||
|
||||
private:
|
||||
Nucleus *theNucleus;
|
||||
Particle *theNucleon, *theDelta;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* G4INCLRECOMBINATIONCHANNEL_HH_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
#ifndef REFLECTIONCHANNEL_HH_
|
||||
#define REFLECTIONCHANNEL_HH_
|
||||
namespace G4INCL {
|
||||
class FinalState;
|
||||
|
||||
class ReflectionChannel : public IChannel {
|
||||
public:
|
||||
ReflectionChannel(Nucleus *n, Particle *p);
|
||||
virtual ~ReflectionChannel();
|
||||
|
||||
FinalState* getFinalState();
|
||||
|
||||
private:
|
||||
Nucleus *theNucleus;
|
||||
Particle *theParticle;
|
||||
};
|
||||
}
|
||||
#endif //REFLECTIONCHANNEL_HH_
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* StandardPropagationModel.hh
|
||||
*
|
||||
* Created on: 4 June 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLStandardPropagationModel_hh
|
||||
#define G4INCLStandardPropagationModel_hh 1
|
||||
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLIPropagationModel.hh"
|
||||
#include "G4INCLIAvatar.hh"
|
||||
#include "G4INCLConfigEnums.hh"
|
||||
|
||||
#include <iterator>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* Standard INCL4 particle propagation and avatar prediction
|
||||
*
|
||||
* This class implements the standard INCL4 avatar prediction and particle
|
||||
* propagation logic. The main idea is to predict all collisions between particles
|
||||
* and their reflections from the potential wall. After this we select the avatar
|
||||
* with the smallest time, propagate all particles to their positions at that time
|
||||
* and return the avatar to the INCL kernel @see G4INCL::Kernel.
|
||||
*
|
||||
* The particle trajectories in this propagation model are straight lines and all
|
||||
* particles are assumed to move with constant velocity.
|
||||
*/
|
||||
class StandardPropagationModel: public G4INCL::IPropagationModel {
|
||||
public:
|
||||
StandardPropagationModel(LocalEnergyType localEnergyType, LocalEnergyType localEnergyDeltaType);
|
||||
virtual ~StandardPropagationModel();
|
||||
|
||||
G4double getCurrentTime();
|
||||
/**
|
||||
* Set the nucleus for this propagation model.
|
||||
*/
|
||||
void setNucleus(G4INCL::Nucleus *nucleus);
|
||||
|
||||
/**
|
||||
* Get the nucleus.
|
||||
*/
|
||||
G4INCL::Nucleus* getNucleus();
|
||||
|
||||
G4bool shootProjectile(G4INCL::Particle *p, G4double impactParameter);
|
||||
G4bool shootProjectile(G4INCL::Nucleus *n, G4double impactParameter);
|
||||
|
||||
/**
|
||||
* Set the stopping time of the simulation.
|
||||
*/
|
||||
void setStoppingTime(G4double);
|
||||
|
||||
/**
|
||||
* Get the current stopping time.
|
||||
*/
|
||||
G4double getStoppingTime();
|
||||
|
||||
/**
|
||||
* Add an avatar to the storage.
|
||||
*/
|
||||
void registerAvatar(G4INCL::IAvatar *anAvatar);
|
||||
|
||||
/** \brief Generate a two-particle avatar.
|
||||
*
|
||||
* Generate a two-particle avatar, if all the appropriate conditions are
|
||||
* met.
|
||||
*/
|
||||
IAvatar *generateBinaryCollisionAvatar(Particle * const p1, Particle * const p2) const;
|
||||
|
||||
/** \brief Get the reflection time.
|
||||
*
|
||||
* Returns the reflection time of a particle on the potential wall.
|
||||
*
|
||||
* \param aParticle poG4inter to the particle
|
||||
*/
|
||||
G4double getReflectionTime(G4INCL::Particle const * const aParticle);
|
||||
|
||||
/**
|
||||
* Get the predicted time of the collision between two particles.
|
||||
*/
|
||||
G4double getTime(G4INCL::Particle const * const particleA,
|
||||
G4INCL::Particle const * const particleB, G4double *minDistOfApproach) const;
|
||||
|
||||
/**
|
||||
* Create avatars between participants and all other particles.
|
||||
*/
|
||||
void checkCollisions(const ParticleList &participants,
|
||||
const ParticleList &particles);
|
||||
|
||||
/** \brief Generate and register collisions between a list of updated particles and all the other particles.
|
||||
*
|
||||
* This method does not generate collisions among the particles in
|
||||
* updatedParticles; in other words, it generates a collision between one
|
||||
* of the updatedParticles and one of the particles ONLY IF the latter
|
||||
* does not belong to updatedParticles.
|
||||
*
|
||||
* If you G4intend to generate all possible collisions among particles in a
|
||||
* list, use generateCollisions().
|
||||
*
|
||||
* \param updatedParticles list of updated particles
|
||||
* \param particles list of particles
|
||||
*/
|
||||
void generateUpdatedCollisions(const ParticleList &updatedParticles, const ParticleList &particles);
|
||||
|
||||
/** \brief Generate and register collisions among particles in a list, except between those in another list.
|
||||
*
|
||||
* This method generates all possible collisions among the particles.
|
||||
* Each collision is generated only once. The collision is NOT generated
|
||||
* if BOTH collision partners belong to the except list.
|
||||
*
|
||||
* You should pass an empty list as the except parameter if you want to
|
||||
* generate all possible collisions among particles.
|
||||
*
|
||||
* \param particles list of particles
|
||||
* \param except list of excluded particles
|
||||
*/
|
||||
void generateCollisions(const ParticleList &particles, const ParticleList &except);
|
||||
|
||||
/** \brief Generate decays for particles that can decay.
|
||||
*
|
||||
* The list of particles given as an argument is allowed to contain also
|
||||
* stable particles.
|
||||
*
|
||||
* \param particles list of particles to (possibly) generate decays for
|
||||
*/
|
||||
void generateDecays(const ParticleList &particles);
|
||||
|
||||
/**
|
||||
* Update all avatars related to a particle.
|
||||
*/
|
||||
void updateAvatars(const ParticleList &particles);
|
||||
|
||||
/** \brief (Re)Generate all possible avatars.
|
||||
*
|
||||
* \param excludeUpdated exclude collisions between updated particles.
|
||||
*/
|
||||
void generateAllAvatars(G4bool excludeUpdated=false);
|
||||
|
||||
/**
|
||||
* Propagate all particles and return the first avatar.
|
||||
*/
|
||||
G4INCL::IAvatar* propagate();
|
||||
|
||||
G4double calculateParticlePositionAtSurface(ThreeVector pos, Particle *p);
|
||||
|
||||
private:
|
||||
G4INCL::Nucleus *theNucleus;
|
||||
G4double maximumTime;
|
||||
G4double currentTime;
|
||||
G4bool firstAvatar;
|
||||
LocalEnergyType theLocalEnergyType, theLocalEnergyDeltaType;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* G4INCLSurfaceAvatar.hh
|
||||
*
|
||||
* Created on: Jun 8, 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLSURFACEAVATAR_HH_
|
||||
#define G4INCLSURFACEAVATAR_HH_
|
||||
|
||||
#include "G4INCLIAvatar.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
/**
|
||||
* Surface avatar
|
||||
*
|
||||
* The reflection avatar is created when a particle reaches the boundary of the nucleus.
|
||||
* At this poG4int it can either be reflected from the boundary or exit the nucleus.
|
||||
*/
|
||||
class SurfaceAvatar: public G4INCL::IAvatar {
|
||||
public:
|
||||
SurfaceAvatar(G4INCL::Particle *aParticle, G4double time, G4INCL::Nucleus *aNucleus);
|
||||
virtual ~SurfaceAvatar();
|
||||
|
||||
G4INCL::IChannel* getChannel() const;
|
||||
G4INCL::FinalState* getFinalState() const;
|
||||
|
||||
virtual void preInteraction();
|
||||
virtual FinalState *postInteraction(FinalState *);
|
||||
|
||||
ParticleList getParticles() const {
|
||||
ParticleList theParticleList;
|
||||
theParticleList.push_back(theParticle);
|
||||
return theParticleList;
|
||||
}
|
||||
|
||||
std::string dump() const;
|
||||
|
||||
private:
|
||||
G4INCL::Particle *theParticle;
|
||||
G4INCL::Nucleus *theNucleus;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* G4INCLSURFACEAVATAR_HH_ */
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLIChannel.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
|
||||
#ifndef TransmissionChannel_hh
|
||||
#define TransmissionChannel_hh 1
|
||||
namespace G4INCL {
|
||||
class FinalState;
|
||||
|
||||
class TransmissionChannel : public IChannel {
|
||||
public:
|
||||
TransmissionChannel(Nucleus *n, Particle *p);
|
||||
virtual ~TransmissionChannel();
|
||||
|
||||
FinalState* getFinalState();
|
||||
|
||||
private:
|
||||
Nucleus *theNucleus;
|
||||
Particle *theParticle;
|
||||
};
|
||||
}
|
||||
#endif // TransmissionChannel_hh
|
||||
@@ -0,0 +1,191 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4hadronic_bert_cascade
|
||||
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4had_hetcpp.G4hadronic_bert_cascade
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 30/9/2010
|
||||
#
|
||||
# $Id: sources.cmake,v 1.4 2010-09-30 12:02:28 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/shortlived/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/cross_sections/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/cascade/cascade/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/cascade/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/evaporation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/fermi_breakup/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/handler/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/multifragmentation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/photon_evaporation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/pre_equilibrium/exciton_model/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/processes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4hadronic_inclxx_physics
|
||||
HEADERS
|
||||
G4INCLAvatarAction.hh
|
||||
G4INCLBinaryCollisionAvatar.hh
|
||||
G4INCLCDPP.hh
|
||||
G4INCLClusterDecay.hh
|
||||
G4INCLClustering.hh
|
||||
G4INCLClusteringModelIntercomparison.hh
|
||||
G4INCLClusteringModelNone.hh
|
||||
G4INCLClusterUtils.hh
|
||||
G4INCLConstantRandom.hh
|
||||
G4INCLCoulombDistortion.hh
|
||||
G4INCLCoulombNone.hh
|
||||
G4INCLCoulombNonRelativistic.hh
|
||||
G4INCLCrossSections.hh
|
||||
G4INCLDecayAvatar.hh
|
||||
G4INCLDeltaDecayChannel.hh
|
||||
G4INCLDeltaProductionChannel.hh
|
||||
G4INCLElasticChannel.hh
|
||||
G4INCLEventAction.hh
|
||||
G4INCLFPEDebug.hh
|
||||
G4INCLGlobalInfo.hh
|
||||
G4INCLCascade.hh
|
||||
G4INCLIClusteringModel.hh
|
||||
G4INCLICoulomb.hh
|
||||
G4INCLIFunction.hh
|
||||
G4INCLInteractionAvatar.hh
|
||||
G4INCLINuclearPotential.hh
|
||||
G4INCLIPauli.hh
|
||||
G4INCLIPropagationModel.hh
|
||||
G4INCLKinematicsUtils.hh
|
||||
G4INCLNuclearDensityFactory.hh
|
||||
G4INCLNuclearDensity.hh
|
||||
G4INCLNuclearPotentialConstant.hh
|
||||
G4INCLNuclearPotentialEnergyIsospin.hh
|
||||
G4INCLNuclearPotentialIsospin.hh
|
||||
G4INCLNucleus.hh
|
||||
G4INCLPauliBlocking.hh
|
||||
G4INCLPauliGlobal.hh
|
||||
G4INCLPauliStandard.hh
|
||||
G4INCLPauliStrict.hh
|
||||
G4INCLPauliStrictStandard.hh
|
||||
G4INCLPionNucleonChannel.hh
|
||||
G4INCLPropagationAction.hh
|
||||
G4INCLRecombinationChannel.hh
|
||||
G4INCLReflectionChannel.hh
|
||||
G4INCLStandardPropagationModel.hh
|
||||
G4INCLSurfaceAvatar.hh
|
||||
G4INCLTransmissionChannel.hh
|
||||
SOURCES
|
||||
G4INCLAvatarAction.cc
|
||||
G4INCLBinaryCollisionAvatar.cc
|
||||
G4INCLCascade.cc
|
||||
G4INCLCDPP.cc
|
||||
G4INCLClusterDecay.cc
|
||||
G4INCLClustering.cc
|
||||
G4INCLClusteringModelIntercomparison.cc
|
||||
G4INCLClusterUtils.cc
|
||||
G4INCLCoulombDistortion.cc
|
||||
G4INCLCoulombNone.cc
|
||||
G4INCLCoulombNonRelativistic.cc
|
||||
G4INCLCrossSections.cc
|
||||
G4INCLDecayAvatar.cc
|
||||
G4INCLDeltaDecayChannel.cc
|
||||
G4INCLDeltaProductionChannel.cc
|
||||
G4INCLElasticChannel.cc
|
||||
G4INCLEventAction.cc
|
||||
G4INCLIClusteringModel.cc
|
||||
G4INCLICoulomb.cc
|
||||
G4INCLInteractionAvatar.cc
|
||||
G4INCLINuclearPotential.cc
|
||||
G4INCLIPropagationModel.cc
|
||||
G4INCLKinematicsUtils.cc
|
||||
G4INCLNuclearDensity.cc
|
||||
G4INCLNuclearDensityFactory.cc
|
||||
G4INCLNuclearPotentialConstant.cc
|
||||
G4INCLNuclearPotentialEnergyIsospin.cc
|
||||
G4INCLNuclearPotentialIsospin.cc
|
||||
G4INCLNucleus.cc
|
||||
G4INCLPauliBlocking.cc
|
||||
G4INCLPauliGlobal.cc
|
||||
G4INCLPauliStandard.cc
|
||||
G4INCLPauliStrict.cc
|
||||
G4INCLPauliStrictStandard.cc
|
||||
G4INCLPionNucleonChannel.cc
|
||||
G4INCLPropagationAction.cc
|
||||
G4INCLRecombinationChannel.cc
|
||||
G4INCLReflectionChannel.cc
|
||||
G4INCLStandardPropagationModel.cc
|
||||
G4INCLSurfaceAvatar.cc
|
||||
G4INCLTransmissionChannel.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4baryons
|
||||
G4bosons
|
||||
G4geometrymng
|
||||
G4globman
|
||||
G4had_mod_man
|
||||
G4had_mod_util
|
||||
G4had_preequ_exciton
|
||||
G4hadronic_inclxx_utils
|
||||
G4hadronic_deex_evaporation
|
||||
G4hadronic_deex_fermi_breakup
|
||||
G4hadronic_deex_handler
|
||||
G4hadronic_deex_management
|
||||
G4hadronic_deex_multifragmentation
|
||||
G4hadronic_deex_photon_evaporation
|
||||
G4hadronic_deex_util
|
||||
G4hadronic_hetcpp_utils
|
||||
G4hadronic_mgt
|
||||
G4hadronic_proc
|
||||
G4hadronic_util
|
||||
G4hadronic_xsect
|
||||
G4hepnumerics
|
||||
G4ions
|
||||
G4leptons
|
||||
G4materials
|
||||
G4mesons
|
||||
G4partman
|
||||
G4procman
|
||||
G4shortlived
|
||||
G4track
|
||||
G4volumes
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4geometry
|
||||
G4global
|
||||
G4materials
|
||||
G4particles
|
||||
G4track
|
||||
LINK_LIBRARIES
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLAvatarAction.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
AvatarAction::AvatarAction() {
|
||||
|
||||
}
|
||||
|
||||
AvatarAction::~AvatarAction() {
|
||||
|
||||
}
|
||||
|
||||
void AvatarAction::beforeAvatarAction(IAvatar *a, Nucleus *n) {
|
||||
n->getStore()->getBook()->incrementAvatars(a->getType());
|
||||
}
|
||||
|
||||
void AvatarAction::afterAvatarAction(IAvatar *a, Nucleus * /*n*/, FinalState *fs) {
|
||||
|
||||
ParticleList modified = fs->getModifiedParticles();
|
||||
for( ParticleIter p = modified.begin(); p != modified.end(); ++p )
|
||||
if(a->isACollision())
|
||||
(*p)->incrementNumberOfCollisions();
|
||||
else if(a->isADecay())
|
||||
(*p)->incrementNumberOfDecays();
|
||||
|
||||
ParticleList created = fs->getCreatedParticles();
|
||||
for( ParticleIter p = created.begin(); p != created.end(); ++p )
|
||||
if(a->isACollision())
|
||||
(*p)->incrementNumberOfCollisions();
|
||||
else if(a->isADecay())
|
||||
(*p)->incrementNumberOfDecays();
|
||||
|
||||
}
|
||||
}
|
||||
+212
@@ -0,0 +1,212 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* G4INCLBinaryCollisionAvatar.cc
|
||||
*
|
||||
* Created on: Jun 5, 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#include "G4INCLBinaryCollisionAvatar.hh"
|
||||
#include "G4INCLElasticChannel.hh"
|
||||
#include "G4INCLRecombinationChannel.hh"
|
||||
#include "G4INCLDeltaProductionChannel.hh"
|
||||
#include "G4INCLCrossSections.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLPauliBlocking.hh"
|
||||
#include "G4INCLPionNucleonChannel.hh"
|
||||
#include "G4INCLStore.hh"
|
||||
#include "G4INCLBook.hh"
|
||||
#include "G4INCLLogger.hh"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
//#include <cassert>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
const G4double BinaryCollisionAvatar::cutNN = 1910;
|
||||
const G4double BinaryCollisionAvatar::cutNNSquared = cutNN*cutNN;
|
||||
|
||||
BinaryCollisionAvatar::BinaryCollisionAvatar(G4double time, G4double crossSection,
|
||||
G4INCL::Nucleus *n, G4INCL::Particle *p1, G4INCL::Particle *p2)
|
||||
: InteractionAvatar(time, n, p1, p2), theCrossSection(crossSection)
|
||||
{
|
||||
setType(CollisionAvatarType);
|
||||
}
|
||||
|
||||
BinaryCollisionAvatar::~BinaryCollisionAvatar() {
|
||||
}
|
||||
|
||||
G4INCL::IChannel* BinaryCollisionAvatar::getChannel() const {
|
||||
// Commenting out the following block... we don't really need it here, do
|
||||
// we? We already check cutNN at avatar creation time.
|
||||
/*const G4double energyCM2 = KinematicsUtils::totalEnergyInCM(particle1, particle2);
|
||||
// Below a certain cut value we don't do anything:
|
||||
if(energyCM < cutNN) {
|
||||
//return new DummyChannel(particle1, particle2, theNucleus);
|
||||
return NULL;
|
||||
} */
|
||||
|
||||
/** Check again the distance of approach. In order for the avatar to be
|
||||
* realised, we have to perform a check in the CM system. We define a
|
||||
* distance four-vector as
|
||||
* \f[ (0, \Delta\vec{x}), \f]
|
||||
* where \f$\Delta\vec{x}\f$ is the distance vector of the particles at
|
||||
* their minimum distance of approach (i.e. at the avatar time). By
|
||||
* boosting this four-vector to the CM frame of the two particles and we
|
||||
* obtain a new four vector
|
||||
* \f[ (\Delta t', \Delta\vec{x}'), \f]
|
||||
* with a non-zero time component (the collision happens simultaneously for
|
||||
* the two particles in the lab system, but not in the CM system). In order
|
||||
* for the avatar to be realised, we require that
|
||||
* \f[ |\Delta\vec{x}'| \leq \sqrt{\sigma/\pi}.\f]
|
||||
* Note that \f$|\Delta\vec{x}'|\leq|\Delta\vec{x}|\f$; thus, the condition
|
||||
* above is more restrictive than the check that we perform in
|
||||
* G4INCL::Propagation::StandardPropagationModel::generateBinaryCollisionAvatar.
|
||||
* In other words, the avatar generation cannot miss any physical collision
|
||||
* avatars.
|
||||
*/
|
||||
ThreeVector minimumDistance = particle1->getPosition();
|
||||
minimumDistance -= particle2->getPosition();
|
||||
const G4double betaDotX = boostVector.dot(minimumDistance);
|
||||
const G4double minDist = Math::tenPi*(minimumDistance.mag2() + betaDotX*betaDotX / (1.-boostVector.mag2()));
|
||||
if(minDist > theCrossSection) {
|
||||
DEBUG("CM distance of approach is too small: " << minDist << ">" <<
|
||||
theCrossSection <<"; returning a NULL channel" << std::endl);
|
||||
InteractionAvatar::restoreParticles();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(particle1->isNucleon() && particle2->isNucleon()) { // NN->NN
|
||||
G4double elasticCX = CrossSections::elastic(particle1,
|
||||
particle2);
|
||||
G4double deltaProductionCX = CrossSections::deltaProduction(particle1,
|
||||
particle2);
|
||||
|
||||
G4bool isElastic = true;
|
||||
if(elasticCX/(elasticCX + deltaProductionCX) < Random::shoot()) {
|
||||
// NN -> N Delta channel is chosen
|
||||
isElastic = false;
|
||||
}
|
||||
|
||||
if(isElastic) { // Elastic NN channel
|
||||
DEBUG("NN G4interaction: elastic channel chosen" << std::endl);
|
||||
return new ElasticChannel(theNucleus, particle1, particle2);
|
||||
} else { // Delta production
|
||||
// Inelastic NN channel
|
||||
DEBUG("NN G4interaction: inelastic channel chosen" << std::endl);
|
||||
return new DeltaProductionChannel(particle1, particle2, theNucleus);
|
||||
}
|
||||
} else if((particle1->isNucleon() && particle2->isDelta()) ||
|
||||
(particle1->isDelta() && particle2->isNucleon())) {
|
||||
G4double elasticCX = CrossSections::elastic(particle1,
|
||||
particle2);
|
||||
G4double recombinationCX = CrossSections::recombination(particle1,
|
||||
particle2);
|
||||
|
||||
G4bool isElastic = true;
|
||||
if(elasticCX/(elasticCX + recombinationCX) < Random::shoot()) {
|
||||
// N Delta -> NN channel is chosen
|
||||
isElastic = false;
|
||||
}
|
||||
|
||||
if(isElastic) { // Elastic N Delta channel
|
||||
DEBUG("NDelta G4interaction: elastic channel chosen" << std::endl);
|
||||
return new ElasticChannel(theNucleus, particle1, particle2);
|
||||
} else { // Recombination
|
||||
DEBUG("NDelta G4interaction: recombination channel chosen" << std::endl);
|
||||
return new RecombinationChannel(theNucleus, particle1, particle2);
|
||||
}
|
||||
} else if(particle1->isDelta() && particle2->isDelta()) {
|
||||
DEBUG("DeltaDelta G4interaction: elastic channel chosen" << std::endl);
|
||||
return new ElasticChannel(theNucleus, particle1, particle2);
|
||||
} else if((particle1->isNucleon() && particle2->isPion()) ||
|
||||
(particle1->isPion() && particle2->isNucleon())) {
|
||||
return new PionNucleonChannel(particle1, particle2, theNucleus, shouldUseLocalEnergy());
|
||||
} else {
|
||||
DEBUG("BinaryCollisionAvatar can only handle nucleons (for the moment)."
|
||||
<< std::endl
|
||||
<< particle1->prG4int()
|
||||
<< std::endl
|
||||
<< particle2->prG4int()
|
||||
<< std::endl);
|
||||
InteractionAvatar::restoreParticles();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void BinaryCollisionAvatar::preInteraction() {
|
||||
InteractionAvatar::preInteraction();
|
||||
}
|
||||
|
||||
FinalState *BinaryCollisionAvatar::postInteraction(FinalState *fs) {
|
||||
// Call the postInteraction method of the parent class
|
||||
// (provides Pauli blocking and enforces energy conservation)
|
||||
fs = InteractionAvatar::postInteraction(fs);
|
||||
|
||||
switch(fs->getValidity()) {
|
||||
case PauliBlockedFS:
|
||||
theNucleus->getStore()->getBook()->incrementBlockedCollisions();
|
||||
break;
|
||||
case NoEnergyConservationFS:
|
||||
break;
|
||||
case ValidFS:
|
||||
theNucleus->getStore()->getBook()->incrementAcceptedCollisions();
|
||||
if(theNucleus->getStore()->getBook()->getAcceptedCollisions() == 1) {
|
||||
G4double t = theNucleus->getStore()->getBook()->getCurrentTime();
|
||||
theNucleus->getStore()->getBook()->setFirstCollisionTime(t);
|
||||
theNucleus->getStore()->getBook()->setFirstCollisionXSec(oldXSec);
|
||||
}
|
||||
}
|
||||
return fs;
|
||||
}
|
||||
|
||||
std::string BinaryCollisionAvatar::dump() const {
|
||||
std::stringstream ss;
|
||||
ss << "(avatar " << theTime <<" 'nn-collision" << std::endl
|
||||
<< "(list " << std::endl
|
||||
<< particle1->dump()
|
||||
<< particle2->dump()
|
||||
<< "))" << std::endl;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLCDPP.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
CDPP::CDPP() {}
|
||||
|
||||
CDPP::~CDPP() {}
|
||||
|
||||
G4bool CDPP::isBlocked(ParticleList const created, Nucleus const * const nucleus) const {
|
||||
G4double S = nucleus->computeSeparationEnergyBalance();
|
||||
|
||||
const G4double Sp = ParticleTable::getSeparationEnergy(Proton);
|
||||
const G4double Sn = ParticleTable::getSeparationEnergy(Neutron);
|
||||
|
||||
ParticleList remnantParticles = nucleus->getStore()->getParticles();
|
||||
remnantParticles.insert(remnantParticles.end(), created.begin(), created.end());
|
||||
|
||||
G4double Sk = 0.0;
|
||||
G4double TbelowTf = 0.0;
|
||||
for(ParticleIter i = remnantParticles.begin(); i != remnantParticles.end();
|
||||
++i) {
|
||||
|
||||
if((*i)->isNucleon()) {
|
||||
const G4double Tf = nucleus->getPotential()->getFermiEnergy(*i);
|
||||
const G4double T = (*i)->getKineticEnergy();
|
||||
|
||||
if(T > Tf) {
|
||||
const G4double sep = ParticleTable::getSeparationEnergy((*i)->getType());
|
||||
Sk += sep;
|
||||
} else {
|
||||
TbelowTf += T - (*i)->getPotentialEnergy();
|
||||
}
|
||||
} else if((*i)->isResonance()) {
|
||||
const G4double Tf = nucleus->getPotential()->getFermiEnergy(*i);
|
||||
const G4double T = (*i)->getKineticEnergy();
|
||||
|
||||
if(T > Tf) {
|
||||
const G4double sep = ParticleTable::getSeparationEnergy((*i)->getType());
|
||||
Sk += sep;
|
||||
} else { // Ugly! We should use total energies everywhere! FIXME
|
||||
TbelowTf += (*i)->getEnergy() - ParticleTable::getMass(Proton) - (*i)->getPotentialEnergy();
|
||||
}
|
||||
} else if((*i)->getType() == PiPlus)
|
||||
Sk += Sn - Sp;
|
||||
else if((*i)->getType() == PiMinus)
|
||||
Sk += Sp - Sn;
|
||||
|
||||
}
|
||||
G4double Tinitial = nucleus->getInitialInternalEnergy();
|
||||
G4double Eblock = TbelowTf - Tinitial - Sk - S;
|
||||
|
||||
return (Eblock < 0.0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,513 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLCascade.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLRanecu.hh"
|
||||
#include "G4INCLGeant4Random.hh"
|
||||
#include "G4INCLStandardPropagationModel.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLGlobalInfo.hh"
|
||||
|
||||
#include "G4INCLPauliBlocking.hh"
|
||||
#include "G4INCLIPauli.hh"
|
||||
#include "G4INCLPauliStrict.hh"
|
||||
#include "G4INCLPauliStandard.hh"
|
||||
#include "G4INCLPauliStrictStandard.hh"
|
||||
#include "G4INCLPauliGlobal.hh"
|
||||
#include "G4INCLCDPP.hh"
|
||||
|
||||
#include "G4INCLLogger.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
#include "G4INCLNuclearDensityFactory.hh"
|
||||
|
||||
#include "G4INCLCoulombDistortion.hh"
|
||||
#include "G4INCLICoulomb.hh"
|
||||
#include "G4INCLCoulombNone.hh"
|
||||
#include "G4INCLCoulombNonRelativistic.hh"
|
||||
|
||||
#include "G4INCLClustering.hh"
|
||||
#include "G4INCLClusteringModelIntercomparison.hh"
|
||||
#include "G4INCLClusteringModelNone.hh"
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
INCL::INCL(G4INCL::Config const * const config)
|
||||
:propagationModel(0), theA(208), theZ(82), maxImpactParameter(0.),
|
||||
theConfig(config)
|
||||
{
|
||||
// Set the logger object.
|
||||
G4INCL::Logger::setLoggerSlave(new G4INCL::LoggerSlave(theConfig->getLogFileName()));
|
||||
G4INCL::Logger::setVerbosityLevel(theConfig->getVerbosity());
|
||||
|
||||
// Set the random number generator algorithm. The system can support
|
||||
// multiple different generator algorithms in a completely
|
||||
// transparent way.
|
||||
#ifdef INCLXX_IN_GEANT4_MODE
|
||||
G4INCL::Random::setGenerator(new G4INCL::Geant4RandomGenerator());
|
||||
#else
|
||||
G4INCL::Random::setGenerator(new G4INCL::Ranecu(theConfig->getRandomSeeds()));
|
||||
#endif // INCLXX_IN_GEANT4_MODE
|
||||
|
||||
// Select the Pauli blocking algorithm:
|
||||
G4INCL::PauliType pauli = theConfig->getPauliType();
|
||||
if(pauli == G4INCL::StrictStatisticalPauli)
|
||||
G4INCL::Pauli::setBlocker(new G4INCL::PauliStrictStandard);
|
||||
else if(pauli == G4INCL::StatisticalPauli)
|
||||
G4INCL::Pauli::setBlocker(new G4INCL::PauliStandard);
|
||||
else if(pauli == G4INCL::StrictPauli)
|
||||
G4INCL::Pauli::setBlocker(new G4INCL::PauliStrict);
|
||||
else if(pauli == G4INCL::GlobalPauli)
|
||||
G4INCL::Pauli::setBlocker(new G4INCL::PauliGlobal);
|
||||
else if(pauli == G4INCL::NoPauli)
|
||||
G4INCL::Pauli::setBlocker(NULL);
|
||||
|
||||
if(theConfig->getCDPP())
|
||||
G4INCL::Pauli::setCDPP(new G4INCL::CDPP);
|
||||
else
|
||||
G4INCL::Pauli::setCDPP(NULL);
|
||||
|
||||
// Select the Coulomb-distortion algorithm:
|
||||
G4INCL::CoulombType coulombType = theConfig->getCoulombType();
|
||||
if(coulombType == G4INCL::NonRelativisticCoulomb)
|
||||
G4INCL::CoulombDistortion::setCoulomb(new G4INCL::CoulombNonRelativistic);
|
||||
else // if(coulombType == G4INCL::NoCoulomb)
|
||||
G4INCL::CoulombDistortion::setCoulomb(new G4INCL::CoulombNone);
|
||||
|
||||
// Select the clustering algorithm:
|
||||
G4INCL::ClusterAlgorithmType clusterAlgorithm = theConfig->getClusterAlgorithm();
|
||||
if(clusterAlgorithm == G4INCL::IntercomparisonClusterAlgorithm) {
|
||||
G4INCL::Clustering::setClusteringModel(new G4INCL::ClusteringModelIntercomparison);
|
||||
// Set the maximum mass for the clustering algorithm
|
||||
G4INCL::IClusteringModel::maxClusterAlgorithmMass = theConfig->getClusterMaxMass();
|
||||
}
|
||||
else // if(clusterAlgorithm == G4INCL::NoClusterAlgorithm)
|
||||
G4INCL::Clustering::setClusteringModel(new G4INCL::ClusteringModelNone);
|
||||
|
||||
// Initialize the INCL particle table:
|
||||
G4INCL::ParticleTable::initialize();
|
||||
|
||||
// Propagation model is responsible for finding avatars and
|
||||
// transporting the particles. In principle this step is "hidden"
|
||||
// behind an abstract G4interface and the rest of the system does not
|
||||
// care how the transportation and avatar finding is done. This
|
||||
// should allow us to "easily" experiment with different avatar
|
||||
// finding schemes and even to support things like curved
|
||||
// trajectories in the future.
|
||||
propagationModel = new G4INCL::StandardPropagationModel(theConfig->getLocalEnergyBBType(),theConfig->getLocalEnergyPiType());
|
||||
eventAction = new EventAction();
|
||||
propagationAction = new PropagationAction();
|
||||
avatarAction = new AvatarAction();
|
||||
|
||||
std::strcpy(theGlobalInfo.cascadeModel, theConfig->getVersionID().c_str());
|
||||
std::strcpy(theGlobalInfo.deexcitationModel, "none");
|
||||
|
||||
// Set the target
|
||||
if(!theConfig->isNaturalTarget()) {
|
||||
setTarget(theConfig->getTargetA(), theConfig->getTargetZ());
|
||||
// Fill in the global information
|
||||
theGlobalInfo.At = theConfig->getTargetA();
|
||||
theGlobalInfo.Zt = theConfig->getTargetZ();
|
||||
} else {
|
||||
// TODO: support for natural targets
|
||||
FATAL("Fatal: natural targets are not supported yet." << std::endl);
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#ifndef INCLXX_IN_GEANT4_MODE
|
||||
// Echo the input parameters to the log file
|
||||
INFO(theConfig->echo() << std::endl);
|
||||
#endif
|
||||
}
|
||||
|
||||
INCL::INCL(IPropagationModel *aPropagationModel)
|
||||
:propagationModel(aPropagationModel), theA(208), theZ(82), maxImpactParameter(0.), theConfig(NULL)
|
||||
{
|
||||
// Set the random number generator algorithm. The system can support
|
||||
// multiple different generator algorithms in a completely
|
||||
// transparent way.
|
||||
G4INCL::Random::setGenerator(new G4INCL::Ranecu());
|
||||
}
|
||||
|
||||
INCL::~INCL() {
|
||||
G4INCL::Pauli::deleteBlockers();
|
||||
G4INCL::CoulombDistortion::deleteCoulomb();
|
||||
G4INCL::Random::deleteGenerator();
|
||||
G4INCL::ParticleTable::deletePDS();
|
||||
G4INCL::Clustering::deleteClusteringModel();
|
||||
G4INCL::Logger::deleteLoggerSlave();
|
||||
delete avatarAction;
|
||||
delete propagationAction;
|
||||
delete eventAction;
|
||||
delete propagationModel;
|
||||
}
|
||||
|
||||
void INCL::setTarget(G4int A, G4int Z) {
|
||||
if(A > 0 && A < 300 && Z > 0 && Z < 200) {
|
||||
theA = A;
|
||||
theZ = Z;
|
||||
} else {
|
||||
ERROR("Unsupported target: A = " << A << " Z = " << Z << std::endl);
|
||||
ERROR("Target configuration rejected." << std::endl);
|
||||
}
|
||||
|
||||
// Set the maximum impact parameter
|
||||
// TODO: for natural target abundances, make this the largest impact
|
||||
// parameter for all the isotopes.
|
||||
// TODO: reduce the maximum impact parameter for Coulomb-distorted
|
||||
// trajectories. Make this dependent on the configuration choice for
|
||||
// Coulomb distortion.
|
||||
NuclearDensity const * const density = NuclearDensityFactory::createDensity(A,Z);
|
||||
maxImpactParameter = density->getMaximumRadius();
|
||||
delete density;
|
||||
|
||||
// Set the geometric cross section
|
||||
theGlobalInfo.geometricCrossSection =
|
||||
Math::tenPi*std::pow(maxImpactParameter,2);
|
||||
|
||||
}
|
||||
|
||||
G4bool INCL::initializeTarget(G4int A, G4int Z) {
|
||||
Nucleus *previousNucleus = propagationModel->getNucleus();
|
||||
delete previousNucleus;
|
||||
|
||||
Nucleus *aNucleus = new Nucleus(A, Z, theConfig);
|
||||
aNucleus->getStore()->getBook()->reset();
|
||||
aNucleus->initializeParticles();
|
||||
|
||||
propagationModel->setNucleus(aNucleus);
|
||||
return true;
|
||||
}
|
||||
|
||||
const EventInfo &INCL::processEvent(Particle *projectile) {
|
||||
initializeTarget(theA, theZ);
|
||||
// Usage of the projectile API:
|
||||
|
||||
// Test projectile:
|
||||
// G4INCL::ThreeVector position(0.0, 0.0, 0.0);
|
||||
// G4INCL::ThreeVector momentum(0.0, 0.0, 2000.0);
|
||||
// G4double energy = std::sqrt(momentum.mag2() + G4INCL::ProtonMass * G4INCL::ProtonMass);
|
||||
// G4INCL::Particle *projectile = new G4INCL::Particle(G4INCL::Proton, energy,
|
||||
// momentum, position);
|
||||
|
||||
// composite
|
||||
// G4INCL::Nucleus *projectileNucleus = new G4INCL::Nucleus(6, 12);
|
||||
//projectileNucleus->initializeParticles();
|
||||
|
||||
// Create a nucleus of Z = 82 and A = 208
|
||||
// G4INCL::Nucleus *theNucleus = new G4INCL::Nucleus(6, 12);
|
||||
|
||||
// Generate the initial distribution of particles
|
||||
// theNucleus->initializeParticles();
|
||||
|
||||
// theNucleus->shootMe(projectile);
|
||||
// theNucleus->shootMe(projectileNucleus);
|
||||
|
||||
// Manually set the stopping time of the simulation.
|
||||
// propagationModel->setStoppingTime(70.0);
|
||||
|
||||
// Assign the nucleus to the propagation model
|
||||
// propagationModel->setNucleus(theNucleus);
|
||||
|
||||
// Shortcut poG4inter
|
||||
Nucleus *nucleus = propagationModel->getNucleus();
|
||||
|
||||
// Reset theEventInfo
|
||||
theEventInfo.reset();
|
||||
|
||||
EventInfo::eventNumber++;
|
||||
|
||||
// Increment the global counter for the number of shots
|
||||
theGlobalInfo.nShots++;
|
||||
|
||||
// Fill in the global information
|
||||
// TODO: should be moved to the input processing
|
||||
theGlobalInfo.Ap = projectile->getA();
|
||||
theGlobalInfo.Zp = projectile->getZ();
|
||||
theGlobalInfo.Ep = projectile->getKineticEnergy();
|
||||
|
||||
// Fill in the event information
|
||||
theEventInfo.projectileType = projectile->getType();
|
||||
theEventInfo.Ap = projectile->getA();
|
||||
theEventInfo.Zp = projectile->getZ();
|
||||
theEventInfo.Ep = projectile->getKineticEnergy();
|
||||
theEventInfo.At = nucleus->getA();
|
||||
theEventInfo.Zt = nucleus->getZ();
|
||||
|
||||
// Randomly draw an impact parameter
|
||||
G4double impactParameter = maxImpactParameter * std::sqrt(Random::shoot());
|
||||
// Fill in the event information
|
||||
theEventInfo.impactParameter = impactParameter;
|
||||
|
||||
G4bool projectileHitsTarget = propagationModel->shootProjectile(projectile, impactParameter);
|
||||
if(projectileHitsTarget == false) {
|
||||
// Increment the global counter for the number of transparents
|
||||
theGlobalInfo.nTransparents++;
|
||||
|
||||
// Fill in the event information
|
||||
theEventInfo.transparent = true;
|
||||
|
||||
// Delete the projectile!
|
||||
delete projectile;
|
||||
|
||||
return theEventInfo;
|
||||
}
|
||||
|
||||
// Fill in the event information
|
||||
const G4double effectiveImpactParameter =
|
||||
projectile->getTransversePosition().mag();
|
||||
theEventInfo.effectiveImpactParameter = effectiveImpactParameter;
|
||||
|
||||
do {
|
||||
// Run book keeping actions that should take place before propagation:
|
||||
propagationAction->beforePropagationAction(propagationModel);
|
||||
|
||||
// Get the avatar with the smallest time and propagate particles
|
||||
// to that poG4int in time.
|
||||
G4INCL::IAvatar *avatar = propagationModel->propagate();
|
||||
|
||||
// Run book keeping actions that should take place after propagation:
|
||||
propagationAction->afterPropagationAction(propagationModel, avatar);
|
||||
|
||||
if(avatar == 0) break; // No more avatars in the avatar list.
|
||||
|
||||
// Run book keeping actions that should take place before avatar:
|
||||
avatarAction->beforeAvatarAction(avatar, nucleus);
|
||||
|
||||
// Channel is responsible for calculating the outcome of the
|
||||
// selected avatar. There are different kinds of channels. The
|
||||
// class IChannel is, again, an abstract G4interface that defines
|
||||
// the externally observable behavior of all G4interaction
|
||||
// channels.
|
||||
// The handling of the channel is transparent to the API.
|
||||
// Final state tells what changed...
|
||||
G4INCL::FinalState *finalState = avatar->getFinalState();
|
||||
|
||||
// Run book keeping actions that should take place after avatar:
|
||||
avatarAction->afterAvatarAction(avatar, nucleus, finalState);
|
||||
|
||||
// So now we must give this information to the nucleus
|
||||
nucleus->applyFinalState(finalState);
|
||||
// and now we are ready to process the next avatar!
|
||||
|
||||
delete avatar;
|
||||
delete finalState;
|
||||
} while(continueCascade());
|
||||
|
||||
// Fill in the event information
|
||||
theEventInfo.transparent = nucleus->isEventTransparent();
|
||||
|
||||
if(theEventInfo.transparent) {
|
||||
// Increment the global counter for the number of transparents
|
||||
theGlobalInfo.nTransparents++;
|
||||
} else {
|
||||
// Check if the nucleus contains deltas
|
||||
theEventInfo.deltasInside = nucleus->containsDeltas();
|
||||
|
||||
// Take care of any remaining deltas
|
||||
theEventInfo.forcedDeltasOutside = nucleus->decayOutgoingDeltas();
|
||||
theEventInfo.forcedDeltasInside = nucleus->decayInsideDeltas();
|
||||
|
||||
// Cluster decay
|
||||
theEventInfo.clusterDecay = nucleus->decayOutgoingClusters();
|
||||
|
||||
// Apply Coulomb distortion, if appropriate
|
||||
// Note that this will apply Coulomb distortion also on pions emitted by
|
||||
// unphysical remnants (see decayInsideDeltas). This is at variance with
|
||||
// what INCL4.6 does, but these events are (should be!) so rare that
|
||||
// whatever we do doesn't (shouldn't!) make any noticeable difference.
|
||||
G4INCL::CoulombDistortion::distortOut(nucleus->getStore()->getOutgoingParticles(), nucleus);
|
||||
|
||||
// Compute recoil momentum, energy and spin of the nucleus
|
||||
nucleus->computeRecoilKinematics();
|
||||
|
||||
// Make room for the remnant recoil by rescaling the energies of the
|
||||
// outgoing particles.
|
||||
if(nucleus->hasRemnant()) rescaleOutgoingForRecoil();
|
||||
|
||||
// Global checks of conservation laws
|
||||
globalConservationChecks();
|
||||
|
||||
// Fill the EventInfo structure
|
||||
nucleus->fillEventInfo(&theEventInfo);
|
||||
// theEventInfo.fillFromNucleus(nucleus);
|
||||
theEventInfo.stoppingTime = propagationModel->getCurrentTime();
|
||||
}
|
||||
|
||||
return theEventInfo;
|
||||
}
|
||||
|
||||
void INCL::rescaleOutgoingForRecoil() {
|
||||
Nucleus *nucleus = propagationModel->getNucleus();
|
||||
|
||||
G4double sumKineticEnergies = 0.0;
|
||||
// Sum up the kinetic energies of the outgoing particles
|
||||
ParticleList outgoingParticles = nucleus->getStore()->getOutgoingParticles();
|
||||
for( ParticleIter i = outgoingParticles.begin(); i != outgoingParticles.end(); ++i )
|
||||
sumKineticEnergies += (*i)->getKineticEnergy();
|
||||
|
||||
// If there is too little outgoing energy, we stop here.
|
||||
if(sumKineticEnergies <= 0.001) return;
|
||||
// The rescaling factor
|
||||
G4double rescale = 1. - nucleus->getRecoilEnergy()/sumKineticEnergies;
|
||||
if(rescale < 0.0) {
|
||||
WARN("Cannot accommodate remnant recoil by scaling outgoing energies. rescale = " << rescale << std::endl);
|
||||
rescale = 0.0;
|
||||
}
|
||||
|
||||
// Rescale the energies (and the momenta) of the outgoing particles.
|
||||
ThreeVector pBalance = nucleus->getIncomingMomentum();
|
||||
for( ParticleIter i = outgoingParticles.begin(); i != outgoingParticles.end(); ++i )
|
||||
{
|
||||
const G4double mass = (*i)->getMass();
|
||||
const G4double newKineticEnergy = (*i)->getKineticEnergy() * rescale;
|
||||
|
||||
(*i)->setEnergy(mass + newKineticEnergy);
|
||||
(*i)->adjustMomentumFromEnergy();
|
||||
//nucleus->updatePotentialEnergy(*i);
|
||||
|
||||
pBalance -= (*i)->getMomentum();
|
||||
}
|
||||
|
||||
nucleus->setRecoilMomentum(pBalance);
|
||||
const G4double remnantMass = ParticleTable::getMass(nucleus->getA(),nucleus->getZ()) + nucleus->getExcitationEnergy();
|
||||
const G4double pRem2 = pBalance.mag2();
|
||||
const G4double recoilEnergy = pRem2/
|
||||
(std::sqrt(pRem2+remnantMass*remnantMass) + remnantMass);
|
||||
nucleus->setRecoilEnergy(recoilEnergy);
|
||||
}
|
||||
|
||||
void INCL::globalConservationChecks() {
|
||||
const Nucleus *nucleus = propagationModel->getNucleus();
|
||||
|
||||
/* FIXME: This version of the energy-conservation check only uses kinetic
|
||||
energies, to mimic what INCL4.5 does. This is unsatisfactory because it
|
||||
does not take G4into account the particle masses. At some poG4int, it would
|
||||
be nice to have real energy conservation, with real masses. When ready
|
||||
to do so, have a look at the status of the code at commit
|
||||
aad75d09b8a52d28b8eb1bd38bdf347e63b802db (or possibly simply revert the
|
||||
following commit). */
|
||||
|
||||
// Initialise balance variables with the incoming values
|
||||
G4int ZBalance = theEventInfo.Zp + theEventInfo.Zt;
|
||||
G4int ABalance = theEventInfo.Ap + theEventInfo.At;
|
||||
|
||||
G4double projectileMass = 0.0;
|
||||
// FIXME: since we are not using total energies, we must set the projectile
|
||||
// mass to zero if the projectile is a pion.
|
||||
if(theEventInfo.projectileType != PiPlus &&
|
||||
theEventInfo.projectileType != PiZero &&
|
||||
theEventInfo.projectileType != PiMinus)
|
||||
projectileMass = ParticleTable::getMass(theEventInfo.projectileType);
|
||||
|
||||
G4double EBalance = nucleus->getInitialEnergy() - ParticleTable::getMass(theEventInfo.At, theEventInfo.Zt) - projectileMass;
|
||||
ThreeVector pBalance = nucleus->getIncomingMomentum();
|
||||
|
||||
// Process outgoing particles
|
||||
ParticleList outgoingParticles = nucleus->getStore()->getOutgoingParticles();
|
||||
for( ParticleIter i = outgoingParticles.begin(); i != outgoingParticles.end(); ++i ) {
|
||||
ZBalance -= (*i)->getZ();
|
||||
ABalance -= (*i)->getA();
|
||||
if((*i)->isPion()) // Ugly: we should calculate everything using total energies! (FIXME)
|
||||
EBalance -= (*i)->getEnergy();
|
||||
else
|
||||
EBalance -= (*i)->getKineticEnergy();
|
||||
pBalance -= (*i)->getMomentum();
|
||||
}
|
||||
|
||||
EBalance -= nucleus->computeSeparationEnergyBalance();
|
||||
|
||||
// Remnant contribution, if present
|
||||
if(nucleus->hasRemnant()) {
|
||||
ZBalance -= nucleus->getZ();
|
||||
ABalance -= nucleus->getA();
|
||||
EBalance -= //ParticleTable::getMass(nucleus->getA(),nucleus->getZ()) +
|
||||
nucleus->getExcitationEnergy() + nucleus->getRecoilEnergy();
|
||||
pBalance -= nucleus->getRecoilMomentum();
|
||||
}
|
||||
|
||||
// Global conservation checks
|
||||
const G4double pLongBalance = pBalance.getZ();
|
||||
const G4double pTransBalance = pBalance.perp();
|
||||
if(ZBalance != 0) {
|
||||
ERROR("Violation of charge conservation! ZBalance = " << ZBalance << std::endl);
|
||||
}
|
||||
if(ABalance != 0) {
|
||||
ERROR("Violation of baryon-number conservation! ABalance = " << ABalance << std::endl);
|
||||
}
|
||||
if(std::abs(EBalance)>10.0) {
|
||||
WARN("Violation of energy conservation > 10 MeV. EBalance = " << EBalance << std::endl);
|
||||
}
|
||||
if(std::abs(pLongBalance)>5.0) {
|
||||
WARN("Violation of longitudinal momentum conservation > 5.0 MeV. pLongBalance = " << pLongBalance << std::endl);
|
||||
}
|
||||
if(std::abs(pTransBalance)>5.0) {
|
||||
WARN("Violation of transverse momentum conservation > 5.0 MeV. pTransBalance = " << pTransBalance << std::endl);
|
||||
}
|
||||
|
||||
// Feed the EventInfo variables
|
||||
theEventInfo.EBalance = EBalance;
|
||||
theEventInfo.pLongBalance = pLongBalance;
|
||||
theEventInfo.pTransBalance = pTransBalance;
|
||||
}
|
||||
|
||||
G4bool INCL::continueCascade() {
|
||||
Nucleus *nucleus = propagationModel->getNucleus();
|
||||
// Stop if we have passed the stopping time
|
||||
if(propagationModel->getCurrentTime() > propagationModel->getStoppingTime()) return false;
|
||||
// Stop if there are no participants and no pions inside the nucleus
|
||||
if(nucleus->getStore()->getBook()->getParticipants()==0 &&
|
||||
nucleus->getStore()->getIncomingParticles().empty()) return false;
|
||||
// Stop if the remnant has only one nucleon
|
||||
if(nucleus->getA() <= 1) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void INCL::finaliseGlobalInfo() {
|
||||
theGlobalInfo.reactionCrossSection = theGlobalInfo.geometricCrossSection *
|
||||
((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents)) /
|
||||
((G4double) theGlobalInfo.nShots);
|
||||
theGlobalInfo.errorReactionCrossSection = theGlobalInfo.geometricCrossSection *
|
||||
std::sqrt((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents)) /
|
||||
((G4double) theGlobalInfo.nShots);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLClusterDecay.cc
|
||||
* \brief Static class for carrying out cluster decays
|
||||
*
|
||||
* Created on: 6th July 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLClusterDecay.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
//#include <cassert>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
ParticleList ClusterDecay::decay(Cluster * const c) {
|
||||
ParticleList decayProducts;
|
||||
recursiveDecay(c, &decayProducts);
|
||||
return decayProducts;
|
||||
}
|
||||
|
||||
void ClusterDecay::recursiveDecay(Cluster * const c, ParticleList *decayProducts) {
|
||||
const G4int Z = c->getZ();
|
||||
const G4int A = c->getA();
|
||||
|
||||
ParticleTable::ClusterDecayType theDecayMode = ParticleTable::clusterDecayMode[Z][A];
|
||||
|
||||
switch(theDecayMode) {
|
||||
default:
|
||||
ERROR("Unrecognized cluster-decay mode: " << theDecayMode << std::endl
|
||||
<< c->prG4int());
|
||||
case ParticleTable::StableCluster:
|
||||
// For stable clusters, just return
|
||||
return;
|
||||
break;
|
||||
case ParticleTable::ProtonDecay:
|
||||
case ParticleTable::NeutronDecay:
|
||||
case ParticleTable::AlphaDecay:
|
||||
// Two-body decays
|
||||
twoBodyDecay(c, theDecayMode, decayProducts);
|
||||
break;
|
||||
case ParticleTable::TwoProtonDecay:
|
||||
case ParticleTable::TwoNeutronDecay:
|
||||
// Three-body decays
|
||||
threeBodyDecay(c, theDecayMode, decayProducts);
|
||||
break;
|
||||
}
|
||||
|
||||
// Calls itself recursively in case the produced remnant is still unstable.
|
||||
// Sneaky, isn't it.
|
||||
recursiveDecay(c,decayProducts);
|
||||
}
|
||||
|
||||
void ClusterDecay::twoBodyDecay(Cluster * const c, ParticleTable::ClusterDecayType theDecayMode, ParticleList *decayProducts) {
|
||||
Particle *decayParticle = 0;
|
||||
const ThreeVector mom(0.0, 0.0, 0.0);
|
||||
const ThreeVector pos = c->getPosition();
|
||||
|
||||
// Create the emitted particle
|
||||
switch(theDecayMode) {
|
||||
case ParticleTable::ProtonDecay:
|
||||
decayParticle = new Particle(Proton, mom, pos);
|
||||
break;
|
||||
case ParticleTable::NeutronDecay:
|
||||
decayParticle = new Particle(Neutron, mom, pos);
|
||||
break;
|
||||
case ParticleTable::AlphaDecay:
|
||||
decayParticle = new Cluster(2,4);
|
||||
break;
|
||||
default:
|
||||
ERROR("Unrecognized cluster-decay mode in two-body decay: " << theDecayMode << std::endl
|
||||
<< c->prG4int());
|
||||
return;
|
||||
}
|
||||
decayParticle->makeParticipant();
|
||||
decayParticle->setNumberOfDecays(1);
|
||||
decayParticle->setPosition(c->getPosition());
|
||||
decayParticle->setEmissionTime(c->getEmissionTime());
|
||||
|
||||
// Save some variables of the mother cluster
|
||||
const G4double motherMass = c->getMass();
|
||||
const ThreeVector velocity = -c->boostVector();
|
||||
|
||||
// Characteristics of the daughter particle
|
||||
const G4int daughterZ = c->getZ() - decayParticle->getZ();
|
||||
const G4int daughterA = c->getA() - decayParticle->getA();
|
||||
const G4double daughterMass = ParticleTable::getMass(daughterA,daughterZ);
|
||||
|
||||
// The mother cluster becomes the daughter
|
||||
c->setZ(daughterZ);
|
||||
c->setA(daughterA);
|
||||
c->setMass(daughterMass);
|
||||
|
||||
const G4double decayMass = decayParticle->getMass();
|
||||
// assert(motherMass > daughterMass + decayMass); // Q-value should be >0
|
||||
|
||||
// Decay kinematics in the mother rest frame
|
||||
const G4double pCM = KinematicsUtils::momentumInCM(motherMass, daughterMass, decayMass);
|
||||
const ThreeVector momentum = Random::normVector(pCM);
|
||||
c->setMomentum(momentum);
|
||||
c->adjustEnergyFromMomentum();
|
||||
decayParticle->setMomentum(-momentum);
|
||||
decayParticle->adjustEnergyFromMomentum();
|
||||
|
||||
// Boost to the lab frame
|
||||
decayParticle->boost(velocity);
|
||||
c->boost(velocity);
|
||||
|
||||
// Add the decay particle to the list of decay products
|
||||
decayProducts->push_back(decayParticle);
|
||||
}
|
||||
|
||||
void ClusterDecay::threeBodyDecay(Cluster * const c, ParticleTable::ClusterDecayType theDecayMode, ParticleList *decayProducts) {
|
||||
Particle *decayParticle1 = 0;
|
||||
Particle *decayParticle2 = 0;
|
||||
const ThreeVector mom(0.0, 0.0, 0.0);
|
||||
const ThreeVector pos = c->getPosition();
|
||||
|
||||
// Create the emitted particles
|
||||
switch(theDecayMode) {
|
||||
case ParticleTable::TwoProtonDecay:
|
||||
decayParticle1 = new Particle(Proton, mom, pos);
|
||||
decayParticle2 = new Particle(Proton, mom, pos);
|
||||
break;
|
||||
case ParticleTable::TwoNeutronDecay:
|
||||
decayParticle1 = new Particle(Neutron, mom, pos);
|
||||
decayParticle2 = new Particle(Neutron, mom, pos);
|
||||
break;
|
||||
default:
|
||||
ERROR("Unrecognized cluster-decay mode in three-body decay: " << theDecayMode << std::endl
|
||||
<< c->prG4int());
|
||||
return;
|
||||
}
|
||||
decayParticle1->makeParticipant();
|
||||
decayParticle2->makeParticipant();
|
||||
decayParticle1->setNumberOfDecays(1);
|
||||
decayParticle2->setNumberOfDecays(1);
|
||||
|
||||
// Save some variables of the mother cluster
|
||||
const G4double motherMass = c->getMass();
|
||||
const ThreeVector velocity = -c->boostVector();
|
||||
|
||||
// Masses and charges of the daughter particle and of the decay products
|
||||
const G4int decayZ1 = decayParticle1->getZ();
|
||||
const G4int decayA1 = decayParticle1->getA();
|
||||
const G4int decayZ2 = decayParticle2->getZ();
|
||||
const G4int decayA2 = decayParticle2->getA();
|
||||
const G4int decayZ = decayZ1 + decayZ2;
|
||||
const G4int decayA = decayA1 + decayA2;
|
||||
const G4int daughterZ = c->getZ() - decayZ;
|
||||
const G4int daughterA = c->getA() - decayA;
|
||||
const G4double decayMass1 = decayParticle1->getMass();
|
||||
const G4double decayMass2 = decayParticle2->getMass();
|
||||
const G4double daughterMass = ParticleTable::getMass(daughterA,daughterZ);
|
||||
|
||||
// Q-values
|
||||
const G4double qValue = motherMass - daughterMass - decayMass1 - decayMass2;
|
||||
// assert(qValue > 0.); // Q-value should be >0
|
||||
const G4double qValueB = qValue * Random::shoot();
|
||||
|
||||
// The decay particles behave as if they had more mass until the second
|
||||
// decay
|
||||
const G4double decayMass = decayMass1 + decayMass2 + qValueB;
|
||||
|
||||
/* Stage A: mother --> daughter + (decay1+decay2) */
|
||||
|
||||
// The mother cluster becomes the daughter
|
||||
c->setZ(daughterZ);
|
||||
c->setA(daughterA);
|
||||
c->setMass(daughterMass);
|
||||
|
||||
// Decay kinematics in the mother rest frame
|
||||
const G4double pCMA = KinematicsUtils::momentumInCM(motherMass, daughterMass, decayMass);
|
||||
const ThreeVector momentumA = Random::normVector(pCMA);
|
||||
c->setMomentum(momentumA);
|
||||
c->adjustEnergyFromMomentum();
|
||||
const ThreeVector decayBoostVector = momentumA/std::sqrt(decayMass*decayMass + momentumA.mag2());
|
||||
|
||||
/* Stage B: (decay1+decay2) --> decay1 + decay2 */
|
||||
|
||||
// Decay kinematics in the (decay1+decay2) rest frame
|
||||
const G4double pCMB = KinematicsUtils::momentumInCM(decayMass, decayMass1, decayMass2);
|
||||
const ThreeVector momentumB = Random::normVector(pCMB);
|
||||
decayParticle1->setMomentum(momentumB);
|
||||
decayParticle2->setMomentum(-momentumB);
|
||||
decayParticle1->adjustEnergyFromMomentum();
|
||||
decayParticle2->adjustEnergyFromMomentum();
|
||||
|
||||
// Boost decay1 and decay2 to the Stage-A decay frame
|
||||
decayParticle1->boost(decayBoostVector);
|
||||
decayParticle2->boost(decayBoostVector);
|
||||
|
||||
// Boost all particles to the lab frame
|
||||
decayParticle1->boost(velocity);
|
||||
decayParticle2->boost(velocity);
|
||||
c->boost(velocity);
|
||||
|
||||
// Add the decay particles to the list of decay products
|
||||
decayProducts->push_back(decayParticle1);
|
||||
decayProducts->push_back(decayParticle2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLClusterUtils.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
G4double ClusterUtils::getTotalEnergy(const ParticleList &pl) {
|
||||
G4double E = 0.0;
|
||||
for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
|
||||
E += (*i)->getEnergy();
|
||||
}
|
||||
return E;
|
||||
}
|
||||
|
||||
G4double ClusterUtils::getKineticEnergy(const ParticleList &pl) {
|
||||
G4double Ekin = 0.0;
|
||||
for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
|
||||
Ekin += std::sqrt(std::pow((*i)->getEnergy(), 2) - std::pow((*i)->getMass(), 2));;
|
||||
}
|
||||
return Ekin;
|
||||
}
|
||||
|
||||
G4int ClusterUtils::getZ(const ParticleList &pl) {
|
||||
G4int Z = 0;
|
||||
for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
|
||||
Z += (*i)->getZ();
|
||||
}
|
||||
return Z;
|
||||
}
|
||||
|
||||
G4int ClusterUtils::getZ(const ParticleList &pl, Particle *p) {
|
||||
return (ClusterUtils::getZ(pl) + p->getZ());
|
||||
}
|
||||
|
||||
G4int ClusterUtils::getA(const ParticleList &pl) {
|
||||
G4int A = 0;
|
||||
for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
|
||||
A += (*i)->getA();
|
||||
}
|
||||
return A;
|
||||
}
|
||||
|
||||
G4int ClusterUtils::getA(const ParticleList &pl, Particle *p) {
|
||||
return (ClusterUtils::getA(pl) + p->getA());
|
||||
}
|
||||
|
||||
ThreeVector ClusterUtils::getNewPositionVector(const ParticleList &pl)
|
||||
{
|
||||
ThreeVector pos(0.0, 0.0, 0.0);
|
||||
G4int A = 1;
|
||||
for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
|
||||
pos += (pos * A)*ParticleTable::clusterPosFact[A];
|
||||
++A;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
ThreeVector ClusterUtils::getNewPositionVector(const ParticleList &pl, Particle *p)
|
||||
{
|
||||
ThreeVector pos = ClusterUtils::getNewPositionVector(pl);
|
||||
return ((pos * pl.size()) + p->getPosition()) * ParticleTable::clusterPosFact[pl.size() + 1];
|
||||
}
|
||||
|
||||
ThreeVector ClusterUtils::getNewPositionVector(const ThreeVector &oldPosition, const ParticleList &pl, Particle *p) {
|
||||
ThreeVector newPosition = oldPosition;
|
||||
newPosition *= pl.size();
|
||||
newPosition += p->getPosition();
|
||||
newPosition *= ParticleTable::clusterPosFact[pl.size() + 1];
|
||||
return newPosition;
|
||||
}
|
||||
|
||||
G4double ClusterUtils::getPhaseSpace(const ThreeVector &clusterPosition,
|
||||
const ThreeVector &clusterMomentum,
|
||||
G4int clusterA,
|
||||
Particle *p) {
|
||||
G4double psSpace = (p->getPosition() - clusterPosition).mag2();
|
||||
G4double psMomentum = (p->getMomentum() - clusterMomentum).mag2();
|
||||
return psSpace * psMomentum * ParticleTable::clusterPosFact2[clusterA + p->getA()];
|
||||
}
|
||||
|
||||
G4bool ClusterUtils::isBetterCluster(ParticleList *, ParticleList *) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLClustering.cc
|
||||
* \brief Static class for cluster formation
|
||||
*
|
||||
* Created on: 13th July 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLIClusteringModel.hh"
|
||||
#include "G4INCLClustering.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
G4INCL::IClusteringModel *Clustering::theClusteringModel = 0;
|
||||
|
||||
}
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLClusteringModelIntercomparison.hh"
|
||||
#include "G4INCLCluster.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
const G4double ClusteringModelIntercomparison::limitCosEscapeAngle = 0.7;
|
||||
|
||||
static G4bool participantsFirstPredicate(Particle *lhs, Particle * /*rhs*/) {
|
||||
return lhs->isParticipant();
|
||||
}
|
||||
|
||||
Cluster* ClusteringModelIntercomparison::getCluster(Nucleus *nucleus, Particle *particle) {
|
||||
theNucleus = nucleus;
|
||||
theLeadingParticle = particle;
|
||||
|
||||
sqtot = 50000.0;
|
||||
selectedA = 0;
|
||||
selectedZ = 0;
|
||||
|
||||
const G4double transp = 1.0;
|
||||
const G4double rmaxws = theNucleus->getDensity()->getMaximumRadius();
|
||||
|
||||
const G4double Rprime = theNucleus->getDensity()->getCentralRadius() + transp;
|
||||
const G4double pk = theLeadingParticle->getMomentum().mag();
|
||||
|
||||
const G4double cospr = theLeadingParticle->getPosition().dot(theLeadingParticle->getMomentum())/(theNucleus->getDensity()->getMaximumRadius() * pk);
|
||||
const G4double arg = rmaxws*rmaxws - Rprime*Rprime;
|
||||
G4double translat = 0.0;
|
||||
|
||||
if(arg > 0.0) {
|
||||
const G4double cosmin = std::sqrt(arg)/rmaxws;
|
||||
if(cospr <= cosmin) {
|
||||
translat = rmaxws * cospr;
|
||||
} else {
|
||||
translat = rmaxws * (cospr - std::sqrt(cospr*cospr - cosmin*cosmin));
|
||||
}
|
||||
} else {
|
||||
translat = rmaxws * cospr - std::sqrt(Rprime*Rprime - rmaxws*rmaxws*(1.0 - cospr*cospr));
|
||||
}
|
||||
|
||||
const ThreeVector oldLeadingParticlePosition = theLeadingParticle->getPosition();
|
||||
const ThreeVector leadingParticlePosition = oldLeadingParticlePosition - theLeadingParticle->getMomentum() * (translat/pk);
|
||||
const ThreeVector leadingParticleMomentum = theLeadingParticle->getMomentum();
|
||||
theLeadingParticle->setPosition(leadingParticlePosition);
|
||||
|
||||
// Select the subset of nucleons that will be considered in the
|
||||
// cluster production:
|
||||
participantEnergyPool = 0.;
|
||||
const ParticleList particles = theNucleus->getStore()->getParticles();
|
||||
for(ParticleIter i = particles.begin(); i != particles.end(); ++i) {
|
||||
if (!(*i)->isNucleon()) continue; // Only nucleons are allowed in clusters
|
||||
if ((*i)->getID() == theLeadingParticle->getID()) continue; // Don't count the leading particle
|
||||
|
||||
G4double space = ((*i)->getPosition() - leadingParticlePosition).mag2();
|
||||
G4double momentum = ((*i)->getMomentum() - leadingParticleMomentum).mag2();
|
||||
G4double size = space*momentum*ParticleTable::clusterPosFact2[IClusteringModel::maxClusterAlgorithmMass];
|
||||
if(size < ParticleTable::clusterPhaseSpaceCut[IClusteringModel::maxClusterAlgorithmMass]) {
|
||||
consideredPartners.push_back((*i));
|
||||
if((*i)->isParticipant())
|
||||
participantEnergyPool += (*i)->getEnergy() - (*i)->getPotentialEnergy() - 931.3;
|
||||
}
|
||||
}
|
||||
// Sort the list of considered partners so that we give priority
|
||||
// to participants. As soon as we encounter the first spectator in
|
||||
// the list we know that all the remaining nucleons will be
|
||||
// spectators too.
|
||||
consideredPartners.sort(participantsFirstPredicate);
|
||||
|
||||
runningConfiguration.push_back(theLeadingParticle);
|
||||
runningPositions[1] = theLeadingParticle->getPosition();
|
||||
runningMomenta[1] = theLeadingParticle->getMomentum();
|
||||
runningEnergies[1] = theLeadingParticle->getEnergy();
|
||||
runningPotentials[1] = theLeadingParticle->getPotentialEnergy();
|
||||
|
||||
// Start the cluster search!
|
||||
findClusterStartingFrom(1, theLeadingParticle->getZ());
|
||||
|
||||
Cluster *chosenCluster = 0;
|
||||
if(selectedA!=0) { // A cluster was found!
|
||||
chosenCluster = new Cluster(candidateConfiguration);
|
||||
}
|
||||
|
||||
// Restore the original position of the leading particle
|
||||
theLeadingParticle->setPosition(oldLeadingParticlePosition);
|
||||
|
||||
cleanUp();
|
||||
zeroOut();
|
||||
return chosenCluster;
|
||||
}
|
||||
|
||||
G4double ClusteringModelIntercomparison::getPhaseSpace(G4int oldA, Particle *p) {
|
||||
const G4double psSpace = (p->getPosition() - runningPositions[oldA]).mag2();
|
||||
const G4double psMomentum = (p->getMomentum()*oldA - runningMomenta[oldA]).mag2();
|
||||
return psSpace * psMomentum * ParticleTable::clusterPosFact2[oldA + 1];
|
||||
}
|
||||
|
||||
void ClusteringModelIntercomparison::findClusterStartingFrom(const G4int oldA, const G4int oldZ) {
|
||||
const G4int newA = oldA + 1;
|
||||
G4int newZ = 0;
|
||||
G4int newN = 0;
|
||||
|
||||
for(ParticleIter i = consideredPartners.begin(); i != consideredPartners.end();
|
||||
++i) {
|
||||
// Only accept particles that are not already part of the cluster
|
||||
if((*i)->isInList(runningConfiguration)) continue;
|
||||
|
||||
newZ = oldZ + (*i)->getZ();
|
||||
newN = newA - newZ;
|
||||
|
||||
// Skip this nucleon if we already have too many protons or neutrons
|
||||
if(newZ > clusterZMaxAll || newN > clusterNMaxAll)
|
||||
continue;
|
||||
|
||||
// Compute the phase space factor for a new cluster which
|
||||
// consists of the previous running cluster and the new
|
||||
// candidate nucleon:
|
||||
const G4double phaseSpace = getPhaseSpace(oldA, (*i));
|
||||
if(phaseSpace > ParticleTable::clusterPhaseSpaceCut[newA]) continue;
|
||||
|
||||
// eclst:
|
||||
runningEnergies[newA] = runningEnergies[oldA] + (*i)->getEnergy();
|
||||
// vcl:
|
||||
runningPotentials[newA] = runningPotentials[oldA] + (*i)->getPotentialEnergy();
|
||||
|
||||
// Update the available participant kinetic energy
|
||||
G4double oldParticipantEnergyPool = participantEnergyPool;
|
||||
if((*i)->isParticipant())
|
||||
participantEnergyPool -= (*i)->getEnergy() - (*i)->getPotentialEnergy() - 931.3;
|
||||
|
||||
// Check an approximate Coulomb barrier
|
||||
const G4double halfB = 0.72 * newZ * theNucleus->getZ()/(theNucleus->getDensity()->getCentralRadius()+1.7);
|
||||
const G4double tout = runningEnergies[newA] - runningPotentials[newA] - 931.3*newA;
|
||||
if(tout<=halfB && tout+participantEnergyPool<=halfB) {
|
||||
participantEnergyPool = oldParticipantEnergyPool;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Accept the nucleon in the cluster
|
||||
runningConfiguration.push_back((*i));
|
||||
runningPositions[newA] = (runningPositions[oldA] * oldA + (*i)->getPosition())*ParticleTable::clusterPosFact[newA];
|
||||
runningMomenta[newA] = runningMomenta[oldA] + (*i)->getMomentum();
|
||||
|
||||
// Keep track of the best physical cluster
|
||||
if(newZ >= ParticleTable::clusterZMin[newA] && newZ <= ParticleTable::clusterZMax[newA]) {
|
||||
// Note: sqc is real kinetic energy, not the square of the kinetic energy!
|
||||
G4double sqc = KinematicsUtils::invariantMass(runningEnergies[newA], runningMomenta[newA]);
|
||||
G4double sqct = (sqc - newZ * 938.27
|
||||
- (newA - newZ) * 939.57
|
||||
- ParticleTable::binding[newZ][newA])
|
||||
*ParticleTable::clusterPosFact[newA];
|
||||
|
||||
if(sqct < sqtot) {
|
||||
sqtot = sqct;
|
||||
selectedA = newA;
|
||||
selectedZ = newZ;
|
||||
delete candidateConfiguration;
|
||||
candidateConfiguration = new ParticleList(runningConfiguration);
|
||||
}
|
||||
}
|
||||
|
||||
if(newA < IClusteringModel::maxClusterAlgorithmMass && newA+1 < theNucleus->getA()) {
|
||||
findClusterStartingFrom(newA, newZ);
|
||||
}
|
||||
|
||||
runningConfiguration.pop_back();
|
||||
participantEnergyPool = oldParticipantEnergyPool;
|
||||
}
|
||||
}
|
||||
|
||||
G4bool ClusteringModelIntercomparison::clusterCanEscape(Cluster const * const c) {
|
||||
// Check the escape angle of the cluster
|
||||
const ThreeVector &pos = c->getPosition();
|
||||
const ThreeVector &mom = c->getMomentum();
|
||||
const G4double cosEscapeAngle = pos.dot(mom) / std::sqrt(pos.mag2()*mom.mag2());
|
||||
if(cosEscapeAngle < limitCosEscapeAngle)
|
||||
return false;
|
||||
|
||||
// Check if the cluster can penetrate the Coulomb barrier
|
||||
const G4double transmissionProbability = theNucleus->getTransmissionProbability(c);
|
||||
const G4double x = Random::shoot();
|
||||
|
||||
return (x <= transmissionProbability);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLCoulombDistortion.cc
|
||||
* \brief Static class for selecting Coulomb distortion.
|
||||
*
|
||||
* Created on: 14 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLCoulombDistortion.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
G4INCL::ICoulomb* CoulombDistortion::theCoulomb = 0;
|
||||
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLCoulombNonRelativistic.cc
|
||||
* \brief Class for non-relativistic Coulomb distortion.
|
||||
*
|
||||
* Created on: 14 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLCoulombNonRelativistic.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
void CoulombNonRelativistic::bringToSurface(Particle * const p, Nucleus const * const n) const {
|
||||
ThreeVector momentumUnitVector = p->getMomentum();
|
||||
momentumUnitVector /= momentumUnitVector.mag();
|
||||
|
||||
ThreeVector positionTransverse = p->getTransversePosition();
|
||||
const G4double impactParameter = positionTransverse.mag();
|
||||
|
||||
const G4double radius = n->getSurfaceRadius(p);
|
||||
|
||||
// No distortion for neutral particles
|
||||
G4double newImpactParameter;
|
||||
G4double alpha;
|
||||
if(p->getZ()==0) {
|
||||
newImpactParameter = impactParameter;
|
||||
alpha = 0.;
|
||||
} else {
|
||||
const G4double theCoulombFactor = coulombFactor(p, n);
|
||||
const G4double thrs2 = std::atan(theCoulombFactor/(2*impactParameter));
|
||||
const G4double eccentricity = -1./std::sin(thrs2);
|
||||
const G4double bMin = 0.5 * (
|
||||
theCoulombFactor +
|
||||
std::sqrt(theCoulombFactor*theCoulombFactor +
|
||||
4*impactParameter*impactParameter)
|
||||
);
|
||||
const G4double phyp = (1.+eccentricity) * bMin;
|
||||
const G4double thetaMax = std::acos((phyp/radius - 1.)/eccentricity);
|
||||
newImpactParameter = radius * std::cos(thrs2 + thetaMax);
|
||||
const G4double psi = std::atan( (1.+eccentricity*std::cos(thetaMax)) /
|
||||
(eccentricity*std::sin(thetaMax)));
|
||||
alpha = psi - Math::piOverTwo + thrs2 + thetaMax;
|
||||
}
|
||||
const G4double distanceZ2 = radius*radius - newImpactParameter*newImpactParameter;
|
||||
const G4double distanceZ = (distanceZ2>0. ? std::sqrt(distanceZ2) : 0.);
|
||||
|
||||
positionTransverse *= newImpactParameter/impactParameter;
|
||||
|
||||
const ThreeVector position = positionTransverse - momentumUnitVector *
|
||||
distanceZ;
|
||||
p->setPosition(position);
|
||||
|
||||
positionTransverse /= positionTransverse.mag();
|
||||
const G4double momentum = p->getMomentum().mag();
|
||||
const ThreeVector newMomentum = p->getMomentum() * std::cos(alpha) +
|
||||
positionTransverse * (std::sin(alpha) * momentum);
|
||||
|
||||
p->setMomentum(newMomentum);
|
||||
|
||||
}
|
||||
|
||||
void CoulombNonRelativistic::distortOut(ParticleList const &pL,
|
||||
Nucleus const * const nucleus) const {
|
||||
|
||||
for(ParticleIter particle=pL.begin(); particle!=pL.end(); ++particle) {
|
||||
|
||||
const G4int Z = (*particle)->getZ();
|
||||
if(Z == 0) continue;
|
||||
|
||||
const G4double tcos=1.-0.000001;
|
||||
|
||||
const G4double et1 = eSquared * nucleus->getZ();
|
||||
const G4double transmissionRadius =
|
||||
nucleus->getDensity()->getTransmissionRadius(*particle);
|
||||
|
||||
const ThreeVector position = (*particle)->getPosition();
|
||||
ThreeVector momentum = (*particle)->getMomentum();
|
||||
const G4double r = position.mag();
|
||||
const G4double p = momentum.mag();
|
||||
const G4double cosTheta = position.dot(momentum)/(r*p);
|
||||
if(cosTheta < 0.999999) {
|
||||
const G4double sinTheta = std::sqrt(1.-cosTheta*cosTheta);
|
||||
const G4double eta = et1 * Z / (*particle)->getKineticEnergy();
|
||||
if(eta > transmissionRadius-0.0001) {
|
||||
// If below the Coulomb barrier, radial emission:
|
||||
momentum = position * (p/r);
|
||||
(*particle)->setMomentum(momentum);
|
||||
} else {
|
||||
const G4double b0 = 0.5 * (eta + std::sqrt(eta*eta +
|
||||
4. * std::pow(transmissionRadius*sinTheta,2)
|
||||
* (1.-eta/transmissionRadius)));
|
||||
const G4double bInf = std::sqrt(b0*(b0-eta));
|
||||
const G4double thr = std::atan(eta/(2.*bInf));
|
||||
G4double uTemp = (1.-b0/transmissionRadius) * std::sin(thr) +
|
||||
b0/transmissionRadius;
|
||||
if(uTemp>tcos) uTemp=tcos;
|
||||
const G4double thd = std::acos(cosTheta)-Math::piOverTwo + thr +
|
||||
std::acos(uTemp);
|
||||
const G4double c1 = std::sin(thd)*cosTheta/sinTheta + std::cos(thd);
|
||||
const G4double c2 = -p*std::sin(thd)/(r*sinTheta);
|
||||
const ThreeVector newMomentum = momentum*c1 + position*c2;
|
||||
(*particle)->setMomentum(newMomentum);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G4double CoulombNonRelativistic::maxImpactParameter(Particle const * const p,
|
||||
Nucleus const * const n) const {
|
||||
const G4double theCoulombFactor = coulombFactor(p, n);
|
||||
const G4double rMax = n->getSurfaceRadius(p);
|
||||
const G4double theMaxImpactParameterSquared = rMax*(rMax-theCoulombFactor);
|
||||
return (theMaxImpactParameterSquared>0. ?
|
||||
std::sqrt(theMaxImpactParameterSquared) : 0.);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLCoulombNone.cc
|
||||
* \brief Placeholder class for no Coulomb distortion.
|
||||
*
|
||||
* Created on: 14 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLCoulombNone.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
void CoulombNone::bringToSurface(Particle * const p, Nucleus const * const n) const {
|
||||
ThreeVector momentumUnitVector = p->getMomentum();
|
||||
momentumUnitVector /= momentumUnitVector.mag();
|
||||
|
||||
ThreeVector positionTransverse = p->getTransversePosition();
|
||||
const G4double impactParameter = positionTransverse.mag();
|
||||
|
||||
G4double radius = n->getSurfaceRadius(p);
|
||||
const G4double radius2 = radius*radius;
|
||||
G4double distanceZ2 = radius2 - impactParameter * impactParameter;
|
||||
if(distanceZ2 < 0.0) distanceZ2 = 0.0;
|
||||
const G4double distanceZ = std::sqrt(distanceZ2);
|
||||
|
||||
ThreeVector position = positionTransverse - momentumUnitVector *
|
||||
distanceZ;
|
||||
p->setPosition(position);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,365 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLCrossSections.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLLogger.hh"
|
||||
//#include <cassert>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
G4double CrossSections::total(Particle const * const p1, Particle const * const p2) {
|
||||
G4double inelastic = 0.0;
|
||||
if(p1->isNucleon() && p2->isNucleon()) {
|
||||
inelastic = CrossSections::deltaProduction(p1, p2);
|
||||
} else if((p1->isNucleon() && p2->isDelta()) ||
|
||||
(p1->isDelta() && p2->isNucleon())) {
|
||||
inelastic = CrossSections::recombination(p1, p2);
|
||||
} else if((p1->isNucleon() && p2->isPion()) ||
|
||||
(p1->isPion() && p2->isNucleon())) {
|
||||
inelastic = CrossSections::pionNucleon(p1, p2);
|
||||
} else {
|
||||
inelastic = 0.0;
|
||||
}
|
||||
|
||||
return inelastic + CrossSections::elastic(p1, p2);
|
||||
}
|
||||
|
||||
G4double CrossSections::pionNucleon(Particle const * const particle1, Particle const * const particle2) {
|
||||
// FUNCTION SPN(X,IND2T3,IPIT3,f17)
|
||||
// SIGMA(PI+ + P) IN THE (3,3) REGION
|
||||
// NEW FIT BY J.VANDERMEULEN + FIT BY Th AOUST ABOVE (3,3) RES
|
||||
// CONST AT LOW AND VERY HIGH ENERGY
|
||||
// COMMON/BL8/RATHR,RAMASS REL21800
|
||||
// G4integer f17
|
||||
// RATHR and RAMASS are always 0.0!!!
|
||||
|
||||
G4double x = KinematicsUtils::totalEnergyInCM(particle1, particle2);
|
||||
if(x>10000.) return 0.0; // no cross section above this value
|
||||
|
||||
G4int ipit3 = 0;
|
||||
G4int ind2t3 = 0;
|
||||
G4double ramass = 0.0;
|
||||
|
||||
if(particle1->isPion()) {
|
||||
ipit3 = ParticleTable::getIsospin(particle1->getType());
|
||||
} else if(particle2->isPion()) {
|
||||
ipit3 = ParticleTable::getIsospin(particle2->getType());
|
||||
}
|
||||
|
||||
if(particle1->isNucleon()) {
|
||||
ind2t3 = ParticleTable::getIsospin(particle1->getType());
|
||||
} else if(particle2->isNucleon()) {
|
||||
ind2t3 = ParticleTable::getIsospin(particle2->getType());
|
||||
}
|
||||
|
||||
G4double y=x*x;
|
||||
G4double q2=(y-1076.0*1076.0)*(y-800.0*800.0)/y/4.0;
|
||||
if (q2 <= 0.) {
|
||||
return 0.0;
|
||||
}
|
||||
G4double q3 = std::pow(std::sqrt(q2),3);
|
||||
G4double f3 = q3/(q3 + 5832000.); // 5832000 = 180^3
|
||||
G4double spnResult = 326.5/(std::pow((x-1215.0-ramass)*2.0/(110.0-ramass), 2)+1.0);
|
||||
spnResult = spnResult*(1.0-5.0*ramass/1215.0);
|
||||
G4double cg = 4.0 + G4double(ind2t3)*G4double(ipit3);
|
||||
spnResult = spnResult*f3*cg/6.0;
|
||||
|
||||
if(x < 1200.0 && spnResult < 5.0) {
|
||||
spnResult = 5.0;
|
||||
}
|
||||
|
||||
// HE pi+ p and pi- n
|
||||
if(x > 1290.0) {
|
||||
if((ind2t3 == 1 && ipit3 == 2) || (ind2t3 == -1 && ipit3 == -2))
|
||||
spnResult=CrossSections::spnPiPlusPHE(x);
|
||||
else if((ind2t3 == 1 && ipit3 == -2) || (ind2t3 == -1 && ipit3 == 2))
|
||||
spnResult=CrossSections::spnPiMinusPHE(x);
|
||||
else if(ipit3 == 0) spnResult = (CrossSections::spnPiPlusPHE(x) + CrossSections::spnPiMinusPHE(x))/2.0; // (spnpipphe(x)+spnpimphe(x))/2.0
|
||||
else {
|
||||
ERROR("Unknown configuration!" << std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
return spnResult;
|
||||
}
|
||||
|
||||
G4double CrossSections::spnPiPlusPHE(const G4double x) {
|
||||
// HE and LE pi- p and pi+ n
|
||||
if(x <= 1750.0) {
|
||||
return -2.33730e-06*std::pow(x, 3)+1.13819e-02*std::pow(x,2)
|
||||
-1.83993e+01*x+9893.4;
|
||||
} else if(x > 1750.0 && x <= 2175.0) {
|
||||
return 1.13531e-06*std::pow(x, 3)-6.91694e-03*std::pow(x, 2)
|
||||
+1.39907e+01*x-9360.76;
|
||||
} else {
|
||||
return -3.18087*std::log(x)+52.9784;
|
||||
}
|
||||
}
|
||||
|
||||
G4double CrossSections::spnPiMinusPHE(const G4double x) {
|
||||
// HE pi- p and pi+ n
|
||||
if(x <= 1475.0) {
|
||||
return 0.00120683*(x-1372.52)*(x-1372.52)+26.2058;
|
||||
} else if(x > 1475.0 && x <= 1565.0) {
|
||||
return 1.15873e-05*x*x+49965.6/((x-1519.59)*(x-1519.59)+2372.55);
|
||||
} else if(x > 1565.0 && x <= 2400.0) {
|
||||
return 34.0248+43262.2/((x-1681.65)*(x-1681.65)+1689.35);
|
||||
} else if(x > 2400.0 && x <= 7500.0) {
|
||||
return 3.3e-7*(x-7500.0)*(x-7500.0)+24.5;
|
||||
} else {
|
||||
return 24.5;
|
||||
}
|
||||
}
|
||||
|
||||
G4double CrossSections::recombination(Particle const * const p1, Particle const * const p2) {
|
||||
const G4int isospin = ParticleTable::getIsospin(p1->getType()) + ParticleTable::getIsospin(p2->getType());
|
||||
if(isospin==4 || isospin==-4) return 0.0;
|
||||
|
||||
G4double s = KinematicsUtils::squareTotalEnergyInCM(p1, p2);
|
||||
G4double Ecm = std::sqrt(s);
|
||||
G4int deltaIsospin;
|
||||
G4double deltaMass;
|
||||
if(p1->isDelta()) {
|
||||
deltaIsospin = ParticleTable::getIsospin(p1->getType());
|
||||
deltaMass = p1->getMass();
|
||||
} else {
|
||||
deltaIsospin = ParticleTable::getIsospin(p2->getType());
|
||||
deltaMass = p2->getMass();
|
||||
}
|
||||
|
||||
if(Ecm <= 938.3 + deltaMass) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
if(Ecm < 938.3 + deltaMass + 2.0) {
|
||||
Ecm = 938.3 + deltaMass + 2.0;
|
||||
s = Ecm*Ecm;
|
||||
}
|
||||
|
||||
const G4double x = (s - 4.*ParticleTable::effectiveNucleonMass2) /
|
||||
(s - std::pow(ParticleTable::effectiveNucleonMass + deltaMass, 2));
|
||||
const G4double y = s/(s - std::pow(deltaMass - ParticleTable::effectiveNucleonMass, 2));
|
||||
/* Concerning the way we calculate the lab momentum, see the considerations
|
||||
* in CrossSections::elasticNNLegacy().
|
||||
*/
|
||||
const G4double pLab = KinematicsUtils::momentumInLab(s, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
|
||||
G4double result = 0.5 * x * y * deltaProduction(isospin, pLab);
|
||||
result *= 3.*(32.0 + isospin * isospin * (deltaIsospin * deltaIsospin - 5))/64.0;
|
||||
result /= 1.0 + 0.25 * isospin * isospin;
|
||||
return result;
|
||||
}
|
||||
|
||||
G4double CrossSections::deltaProduction(Particle const * const p1, Particle const * const p2) {
|
||||
// assert(p1->isNucleon() && p2->isNucleon());
|
||||
const G4double sqrts = KinematicsUtils::totalEnergyInCM(p1,p2);
|
||||
if(sqrts < ParticleTable::effectivePionMass + 2*ParticleTable::effectiveNucleonMass + 50.) { // approximately yields INCL4.6's hard-coded threshold in collis, 2065 MeV
|
||||
return 0.0;
|
||||
} else {
|
||||
const G4double pLab = KinematicsUtils::momentumInLab(p1,p2);
|
||||
const G4int isospin = ParticleTable::getIsospin(p1->getType()) + ParticleTable::getIsospin(p2->getType());
|
||||
return deltaProduction(isospin, pLab);
|
||||
}
|
||||
}
|
||||
|
||||
G4double CrossSections::deltaProduction(const G4int isospin, const G4double pLab) {
|
||||
G4double xs = 0.0;
|
||||
// assert(isospin==-2 || isospin==0 || isospin==2);
|
||||
|
||||
const G4double momentumGeV = 0.001 * pLab;
|
||||
if(pLab < 800.0) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
if(isospin==2 || isospin==-2) { // pp, nn
|
||||
if(pLab >= 2000.0) {
|
||||
xs = (41.0 + (60.0*momentumGeV - 54.0)*std::exp(-1.2*momentumGeV) - 77.0/(momentumGeV + 1.5));
|
||||
} else if(pLab >= 1500.0 && pLab < 2000.0) {
|
||||
xs = (41.0 + 60.0*(momentumGeV - 0.9)*std::exp(-1.2*momentumGeV) - 1250.0/(momentumGeV+50.0)+ 4.0*std::pow(momentumGeV - 1.3, 2));
|
||||
} else if(pLab < 1500.0) {
|
||||
xs = (23.5 + 24.6/(1.0 + std::exp(-10.0*momentumGeV + 12.0))
|
||||
-1250.0/(momentumGeV +50.0)+4.0*std::pow(momentumGeV - 1.3,2));
|
||||
}
|
||||
} else if(isospin==0) { // pn
|
||||
if(pLab >= 2000.0) {
|
||||
xs = (42.0 - 77.0/(momentumGeV + 1.5));
|
||||
} else if(pLab >= 1000.0 && pLab < 2000.0) {
|
||||
xs = (24.2 + 8.9*momentumGeV - 31.1/std::sqrt(momentumGeV));
|
||||
} else if(pLab < 1000.0) {
|
||||
xs = (33.0 + 196.0*std::sqrt(std::pow(std::abs(momentumGeV - 0.95),5))
|
||||
-31.1/std::sqrt(momentumGeV));
|
||||
}
|
||||
}
|
||||
|
||||
if(xs < 0.0) return 0.0;
|
||||
else return xs;
|
||||
}
|
||||
|
||||
G4double CrossSections::elasticNNHighEnergy(const G4double momentum) {
|
||||
return 77.0/(momentum + 1.5);
|
||||
}
|
||||
|
||||
G4double CrossSections::elasticProtonNeutron(const G4double momentum) {
|
||||
if(momentum < 0.450) {
|
||||
const G4double alp = std::log(momentum);
|
||||
return 6.3555*std::exp(-3.2481*alp-0.377*alp*alp);
|
||||
} else if(momentum >= 0.450 && momentum < 0.8) {
|
||||
return (33.0 + 196.0 * std::sqrt(std::pow(std::abs(momentum - 0.95), 5)));
|
||||
} else if(momentum > 2.0) {
|
||||
return CrossSections::elasticNNHighEnergy(momentum);
|
||||
} else {
|
||||
return 31.0/std::sqrt(momentum);
|
||||
}
|
||||
}
|
||||
|
||||
G4double CrossSections::elasticProtonProtonOrNeutronNeutron(const G4double momentum)
|
||||
{
|
||||
if(momentum < 0.440) {
|
||||
return 34.0*std::pow(momentum/0.4, -2.104);
|
||||
} else if(momentum < 0.8 && momentum >= 0.440) {
|
||||
return (23.5 + 1000.0*std::pow(momentum-0.7, 4));
|
||||
} else if(momentum < 2.0) {
|
||||
return (1250.0/(50.0 + momentum) - 4.0*std::pow(momentum-1.3, 2));
|
||||
} else {
|
||||
return CrossSections::elasticNNHighEnergy(momentum);
|
||||
}
|
||||
}
|
||||
|
||||
G4double CrossSections::elasticNN(Particle const * const p1, Particle const * const p2) {
|
||||
G4double momentum = 0.0;
|
||||
momentum = 0.001 * KinematicsUtils::momentumInLab(p1, p2);
|
||||
if((p1->getType() == Proton && p2->getType() == Proton) ||
|
||||
(p1->getType() == Neutron && p2->getType() == Neutron)) {
|
||||
return CrossSections::elasticProtonProtonOrNeutronNeutron(momentum);
|
||||
} else if((p1->getType() == Proton && p2->getType() == Neutron) ||
|
||||
(p1->getType() == Neutron && p2->getType() == Proton)) {
|
||||
return CrossSections::elasticProtonNeutron(momentum);
|
||||
} else {
|
||||
ERROR("G4INCL::CrossSections::elasticNN: Bad input!" << std::endl
|
||||
<< p1->prG4int() << p2->prG4int() << std::endl);
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
G4double CrossSections::elasticNNLegacy(Particle const * const part1, Particle const * const part2) {
|
||||
G4double scale = 1.0;
|
||||
|
||||
|
||||
G4int i = ParticleTable::getIsospin(part1->getType())
|
||||
+ ParticleTable::getIsospin(part2->getType());
|
||||
G4double sel = 0.0;
|
||||
|
||||
/* The NN cross section is parametrised as a function of the lab momentum
|
||||
* of one of the nucleons. For NDelta or DeltaDelta, the physical
|
||||
* assumption is that the cross section is the same as NN *for the same
|
||||
* total CM energy*. Thus, we calculate s from the particles involved, and
|
||||
* we convert this value to the lab momentum of a nucleon *as if this were
|
||||
* an NN collision*.
|
||||
*/
|
||||
const G4double s = KinematicsUtils::squareTotalEnergyInCM(part1, part2);
|
||||
G4double plab = KinematicsUtils::momentumInLab(s, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
|
||||
|
||||
G4double p1=0.001*plab;
|
||||
if(plab > 2000.) goto sel13;
|
||||
if(part1->isNucleon() && part2->isNucleon())
|
||||
goto sel1;
|
||||
else
|
||||
goto sel3;
|
||||
sel1: if (i == 0) goto sel2;
|
||||
sel3: if (plab < 800.) goto sel4;
|
||||
if (plab > 2000.) goto sel13;
|
||||
sel=(1250./(50.+p1)-4.*std::pow(p1-1.3, 2))*scale;
|
||||
goto sel100;
|
||||
return sel;
|
||||
sel4: if (plab < 440.) {
|
||||
sel=34.*std::pow(p1/0.4, (-2.104))*scale;
|
||||
} else {
|
||||
sel=(23.5+1000.*std::pow(p1-0.7, 4))*scale;
|
||||
}
|
||||
goto sel100;
|
||||
return sel;
|
||||
sel13: sel=77./(p1+1.5)*scale;
|
||||
goto sel100;
|
||||
return sel;
|
||||
sel2: if (plab < 800.) goto sel11;
|
||||
if (plab > 2000.) goto sel13;
|
||||
sel=31./std::sqrt(p1)*scale;
|
||||
goto sel100;
|
||||
return sel;
|
||||
sel11: if (plab < 450.) {
|
||||
G4double alp=std::log(p1);
|
||||
sel=6.3555*std::exp(-3.2481*alp-0.377*alp*alp)*scale;
|
||||
} else {
|
||||
sel=(33.+196.*std::sqrt(std::pow(std::abs(p1-0.95),5)))*scale;
|
||||
}
|
||||
|
||||
sel100: return sel;
|
||||
}
|
||||
|
||||
G4double CrossSections::elastic(Particle const * const p1, Particle const * const p2) {
|
||||
if(!p1->isPion() && !p2->isPion())
|
||||
// return elasticNN(p1, p2); // New implementation
|
||||
return elasticNNLegacy(p1, p2); // Translated from INCL4.6 FORTRAN
|
||||
else
|
||||
return 0.0; // No pion-nucleon elastic scattering
|
||||
}
|
||||
|
||||
G4double CrossSections::calculateNNDiffCrossSection(G4double pl, G4int iso) {
|
||||
G4double x = 0.001 * pl; // Change to GeV
|
||||
if(iso != 0) {
|
||||
if(pl <= 2000.0) {
|
||||
x = std::pow(x, 8);
|
||||
return 5.5e-6 * x/(7.7 + x);
|
||||
} else {
|
||||
return (5.34 + 0.67*(x - 2.0)) * 1.0e-6;
|
||||
}
|
||||
} else {
|
||||
if(pl < 800.0) {
|
||||
G4double b = (7.16 - 1.63*x) * 1.0e-6;
|
||||
return b/(1.0 + std::exp(-(x - 0.45)/0.05));
|
||||
} else if(pl < 1100.0) {
|
||||
return (9.87 - 4.88 * x) * 1.0e-6;
|
||||
} else {
|
||||
return (3.68 + 0.76*x) * 1.0e-6;
|
||||
}
|
||||
}
|
||||
return 0.0; // Should never reach this poG4int
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLDecayAvatar.hh"
|
||||
|
||||
#include "G4INCLDeltaDecayChannel.hh"
|
||||
#include "G4INCLPauliBlocking.hh"
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
//#include <cassert>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
DecayAvatar::DecayAvatar(G4INCL::Particle *aParticle, G4double time, G4INCL::Nucleus *n, G4bool force)
|
||||
: InteractionAvatar(time, n, aParticle), forced(force),
|
||||
incidentDirection(aParticle->getMomentum())
|
||||
{
|
||||
setType(DecayAvatarType);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
DecayAvatar::~DecayAvatar() {
|
||||
|
||||
}
|
||||
|
||||
G4INCL::IChannel* DecayAvatar::getChannel() const
|
||||
{
|
||||
if(particle1->isDelta()) {
|
||||
DEBUG("DeltaDecayChannel chosen." << std::endl);
|
||||
return new DeltaDecayChannel(theNucleus, particle1, incidentDirection);
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DecayAvatar::preInteraction() {
|
||||
InteractionAvatar::preInteraction();
|
||||
}
|
||||
|
||||
FinalState *DecayAvatar::postInteraction(FinalState *fs) {
|
||||
// Make sure we have at least two particles in the final state
|
||||
// assert(fs->getModifiedParticles().size() + fs->getCreatedParticles().size() - fs->getDestroyedParticles().size() >= 2);
|
||||
|
||||
if(!forced) { // Normal decay
|
||||
|
||||
// Call the postInteraction method of the parent class
|
||||
// (provides Pauli blocking and enforces energy conservation)
|
||||
fs = InteractionAvatar::postInteraction(fs);
|
||||
|
||||
if(fs->getValidity() == PauliBlockedFS)
|
||||
/* If the decay was Pauli-blocked, make sure the propagation model
|
||||
* generates a new decay avatar on the next call to propagate().
|
||||
*
|
||||
* Note that we don't generate new decay avatars for deltas that could
|
||||
* not satisfy energy conservation. This is in keeping with INCL4.6,
|
||||
* but doesn't seem to make much sense to me (DM), as energy
|
||||
* conservation can be impossible to satisfy due to weird local-energy
|
||||
* conditions, for example, that evolve with time. Therefore, FIXME.
|
||||
*/
|
||||
fs->setBlockedDelta(particle1);
|
||||
|
||||
} else { // Forced decay
|
||||
ParticleList created = fs->getCreatedParticles();
|
||||
|
||||
// Try to enforce energy conservation
|
||||
fs->setTotalEnergyBeforeInteraction(oldTotalEnergy);
|
||||
const G4bool success = enforceEnergyConservation(fs);
|
||||
if(!success) {
|
||||
DEBUG("Enforcing energy conservation: failed!" << std::endl);
|
||||
|
||||
if(theNucleus) {
|
||||
// Restore the state of the initial particles
|
||||
restoreParticles();
|
||||
|
||||
// Delete newly created particles
|
||||
for( ParticleIter i = created.begin(); i != created.end(); ++i )
|
||||
delete *i;
|
||||
|
||||
FinalState *fsBlocked = new FinalState;
|
||||
delete fs;
|
||||
fsBlocked->makeNoEnergyConservation();
|
||||
fsBlocked->setTotalEnergyBeforeInteraction(0.0);
|
||||
|
||||
return fsBlocked; // Interaction is blocked. Return an empty final state.
|
||||
} else {
|
||||
// If there is no nucleus we have to continue anyway, even if energy
|
||||
// conservation failed. We cannot afford producing unphysical
|
||||
// remnants.
|
||||
DEBUG("No nucleus, continuing anyway." << std::endl);
|
||||
}
|
||||
} else {
|
||||
DEBUG("Enforcing energy conservation: success!" << std::endl);
|
||||
}
|
||||
|
||||
if(theNucleus) {
|
||||
ParticleList modified = fs->getModifiedParticles();
|
||||
|
||||
// Copy the final state, but don't include the pion (as if it had been
|
||||
// emitted right away).
|
||||
FinalState *emissionFS = new FinalState;
|
||||
for(ParticleIter i=modified.begin(); i!=modified.end(); ++i)
|
||||
emissionFS->addModifiedParticle(*i);
|
||||
|
||||
// Test CDPP blocking
|
||||
G4bool isCDPPBlocked = Pauli::isCDPPBlocked(created, theNucleus);
|
||||
|
||||
if(isCDPPBlocked) {
|
||||
DEBUG("CDPP: Blocked!" << std::endl);
|
||||
|
||||
// Restore the state of both particles
|
||||
restoreParticles();
|
||||
|
||||
// Delete newly created particles
|
||||
for( ParticleIter i = created.begin(); i != created.end(); ++i )
|
||||
delete *i;
|
||||
|
||||
FinalState *fsBlocked = new FinalState;
|
||||
delete fs;
|
||||
delete emissionFS;
|
||||
|
||||
fsBlocked->makePauliBlocked();
|
||||
fsBlocked->setTotalEnergyBeforeInteraction(0.0);
|
||||
|
||||
return fsBlocked; // Interaction is blocked. Return an empty final state.
|
||||
}
|
||||
DEBUG("CDPP: Allowed!" << std::endl);
|
||||
|
||||
// If all went well (energy conservation enforced and CDPP satisfied),
|
||||
// delete the auxiliary final state
|
||||
delete emissionFS;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// If there is a nucleus, increment the counters
|
||||
if(theNucleus) {
|
||||
switch(fs->getValidity()) {
|
||||
case PauliBlockedFS:
|
||||
theNucleus->getStore()->getBook()->incrementBlockedDecays();
|
||||
break;
|
||||
case NoEnergyConservationFS:
|
||||
break;
|
||||
case ValidFS:
|
||||
theNucleus->getStore()->getBook()->incrementAcceptedDecays();
|
||||
}
|
||||
}
|
||||
return fs;
|
||||
}
|
||||
|
||||
std::string DecayAvatar::dump() const {
|
||||
std::stringstream ss;
|
||||
ss << "(avatar " << theTime << " 'decay" << std::endl
|
||||
<< "(list " << std::endl
|
||||
<< particle1->dump()
|
||||
<< "))" << std::endl;
|
||||
return ss.str();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLDeltaDecayChannel.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLBinaryCollisionAvatar.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
DeltaDecayChannel::DeltaDecayChannel(Nucleus *n, Particle *p, ThreeVector const dir)
|
||||
:theParticle(p), theNucleus(n), incidentDirection(dir)
|
||||
{ }
|
||||
|
||||
DeltaDecayChannel::~DeltaDecayChannel() {}
|
||||
|
||||
G4double DeltaDecayChannel::computeDecayTime(Particle *p) {
|
||||
const G4double m = p->getMass();
|
||||
const G4double g0 = 115.0;
|
||||
G4double gg = g0;
|
||||
if(m > 1500.0) gg = 200.0;
|
||||
const G4double geff = p->getEnergy()/m;
|
||||
const G4double qqq = KinematicsUtils::momentumInCM(m, ParticleTable::effectiveNucleonMass, ParticleTable::effectivePionMass);
|
||||
const G4double psf = std::pow(qqq, 3)/(std::pow(qqq, 3) + 5832000.0);
|
||||
const G4double tdel = -G4INCL::hc/(gg*psf)*std::log(Random::shoot())*geff;
|
||||
return tdel;
|
||||
}
|
||||
|
||||
void DeltaDecayChannel::sampleAngles(G4double *ctet_par, G4double *stet_par, G4double *phi_par) {
|
||||
const G4double hel = theParticle->getHelicity();
|
||||
do {
|
||||
(*ctet_par) = -1.0 + 2.0*Random::shoot();
|
||||
if(std::abs(*ctet_par) > 1.0) (*ctet_par) = Math::sign(*ctet_par);
|
||||
} while(Random::shoot() > ((1.0 + 3.0 * hel * (*ctet_par) * (*ctet_par))
|
||||
/(1.0 + 3.0 * hel)));
|
||||
(*stet_par) = std::sqrt(1.-(*ctet_par)*(*ctet_par));
|
||||
(*phi_par) = Math::twoPi * Random::shoot();
|
||||
}
|
||||
|
||||
FinalState* DeltaDecayChannel::getFinalState() {
|
||||
// SUBROUTINE DECAY2(P1,P2,P3,WP,ij,
|
||||
// s X1,X2,hel,B1,B2,B3)
|
||||
|
||||
// This routine describes the anisotropic decay of a particle of mass
|
||||
// xi G4into 2 particles of masses x1,x2.
|
||||
// The anisotropy is supposed to follow a 1+3*hel*(cos(theta))**2
|
||||
// law with respect to the direction of the incoming particle.
|
||||
// In the input, p1,p2,p3 is the momentum of particle xi.
|
||||
// In the output, p1,p2,p3 is the momentum of particle x1 , while
|
||||
// q1,q2,q3 is the momentum of particle x2.
|
||||
|
||||
// COMMON/bl12/QQ1(200),QQ2(200),QQ3(200),QQ4(200),
|
||||
// s YY1(200),YY2(200),YY3(200),YM(200),IPI(200)
|
||||
// common/hazard/ial,IY1,IY2,IY3,IY4,IY5,IY6,IY7,IY8,IY9,IY10,
|
||||
// s IY11,IY12,IY13,IY14,IY15,IY16,IY17,IY18,IY19
|
||||
|
||||
// DATA IY8,IY9,IY10/82345,92345,45681/
|
||||
// PCM(E,A,C)=0.5*SQRT((E**2-(A+C)**2)*(E**2-(A-C)**2))/E P-N20800
|
||||
// XI=YM(ij)
|
||||
|
||||
// XE=WP P-N20810
|
||||
// B1=P1/XE P-N20820
|
||||
// B2=P2/XE P-N20830
|
||||
// B3=P3/XE
|
||||
// XQ=PCM(XI,X1,X2)
|
||||
|
||||
const G4double deltaMass = theParticle->getMass();
|
||||
|
||||
G4double fi, ctet, stet;
|
||||
sampleAngles(&ctet, &stet, &fi);
|
||||
|
||||
G4double cfi = std::cos(fi);
|
||||
G4double sfi = std::sin(fi);
|
||||
G4double beta = incidentDirection.mag();
|
||||
|
||||
G4double q1, q2, q3;
|
||||
G4double sal=0.0;
|
||||
if (beta >= 1.0e-10)
|
||||
sal = incidentDirection.perp()/beta;
|
||||
if (sal >= 1.0e-6) {
|
||||
G4double b1 = incidentDirection.getX();
|
||||
G4double b2 = incidentDirection.getY();
|
||||
G4double b3 = incidentDirection.getZ();
|
||||
G4double cal = b3/beta;
|
||||
G4double t1 = ctet+cal*stet*sfi/sal;
|
||||
G4double t2 = stet/sal;
|
||||
q1=(b1*t1+b2*t2*cfi)/beta;
|
||||
q2=(b2*t1-b1*t2*cfi)/beta;
|
||||
q3=(b3*t1/beta-t2*sfi);
|
||||
} else {
|
||||
q1 = stet*cfi;
|
||||
q2 = stet*sfi;
|
||||
q3 = ctet;
|
||||
}
|
||||
theParticle->setHelicity(0.0);
|
||||
|
||||
ParticleType pionType;
|
||||
switch(theParticle->getType()) {
|
||||
case DeltaPlusPlus:
|
||||
theParticle->setType(Proton);
|
||||
pionType = PiPlus;
|
||||
break;
|
||||
case DeltaPlus:
|
||||
if(Random::shoot() < 1.0/3.0) {
|
||||
theParticle->setType(Neutron);
|
||||
pionType = PiPlus;
|
||||
} else {
|
||||
theParticle->setType(Proton);
|
||||
pionType = PiZero;
|
||||
}
|
||||
break;
|
||||
case DeltaZero:
|
||||
if(Random::shoot() < 1.0/3.0) {
|
||||
theParticle->setType(Proton);
|
||||
pionType = PiMinus;
|
||||
} else {
|
||||
theParticle->setType(Neutron);
|
||||
pionType = PiZero;
|
||||
}
|
||||
break;
|
||||
case DeltaMinus:
|
||||
theParticle->setType(Neutron);
|
||||
pionType = PiMinus;
|
||||
break;
|
||||
default:
|
||||
FATAL("Unrecognized delta type; type=" << theParticle->getType() << std::endl);
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
|
||||
G4double xq = KinematicsUtils::momentumInCM(deltaMass,
|
||||
theParticle->getMass(),
|
||||
ParticleTable::getMass(pionType));
|
||||
|
||||
q1 *= xq;
|
||||
q2 *= xq;
|
||||
q3 *= xq;
|
||||
|
||||
ThreeVector pionMomentum(q1, q2, q3);
|
||||
ThreeVector pionPosition(theParticle->getPosition());
|
||||
Particle *pion = new Particle(pionType, pionMomentum, pionPosition);
|
||||
theParticle->setMomentum(-pionMomentum);
|
||||
theParticle->adjustEnergyFromMomentum();
|
||||
|
||||
FinalState *fs = new FinalState;
|
||||
fs->addModifiedParticle(theParticle);
|
||||
fs->addCreatedParticle(pion);
|
||||
// call loren(q1,q2,q3,b1,b2,b3,wq)
|
||||
// call loren(p1,p2,p3,b1,b2,b3,wp)
|
||||
// qq1(ij)=q1
|
||||
// qq2(ij)=q2
|
||||
// qq3(ij)=q3
|
||||
// qq4(ij)=wq
|
||||
// ym(ij)=xi
|
||||
// RETURN P-N21120
|
||||
// END P-N21130
|
||||
return fs;
|
||||
}
|
||||
}
|
||||
+249
@@ -0,0 +1,249 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLDeltaProductionChannel.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLBinaryCollisionAvatar.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
#include "G4INCLLogger.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
DeltaProductionChannel::DeltaProductionChannel(Particle *p1,
|
||||
Particle *p2,
|
||||
Nucleus *n)
|
||||
:theNucleus(n), particle1(p1), particle2(p2)
|
||||
{}
|
||||
|
||||
DeltaProductionChannel::~DeltaProductionChannel() {}
|
||||
|
||||
G4double DeltaProductionChannel::sampleDeltaMass(G4double ecm) {
|
||||
const G4double ramass = 0.0;
|
||||
const G4int maxTries = 100000;
|
||||
G4int nTries = 0;
|
||||
deltaProd101: G4double rndm = Random::shoot();
|
||||
nTries++;
|
||||
G4double y = std::tan(Math::pi*(rndm-0.5));
|
||||
G4double x = 1232.+0.5*130.*y+ramass;
|
||||
if (x < ParticleTable::effectiveDeltaDecayThreshold && (nTries < maxTries))
|
||||
goto deltaProd101;
|
||||
if (ecm < x + ParticleTable::effectiveNucleonMass + 1.0 && (nTries < maxTries)) goto deltaProd101;
|
||||
|
||||
// generation of the delta mass with the penetration factor
|
||||
// (see prc56(1997)2431)
|
||||
y=ecm*ecm;
|
||||
G4double q2=(y-1.157776E6)*(y-6.4E5)/y/4.0; // 1.157776E6 = 1076^2, 6.4E5 = 800^2
|
||||
G4double q3=std::pow(std::sqrt(q2), 3.);
|
||||
G4double f3max=q3/(q3+5.832E6); // 5.832E6 = 180^3
|
||||
y=x*x;
|
||||
q2=(y-1.157776E6)*(y-6.4E5)/y/4.0; // 1.157776E6 = 1076^2, 6.4E5 = 800^2
|
||||
q3=std::pow(std::sqrt(q2), 3.);
|
||||
G4double f3=q3/(q3+5.832E6); // 5.832E6 = 180^3
|
||||
rndm = Random::shoot();
|
||||
if (rndm > f3/f3max && (nTries < maxTries)) goto deltaProd101;
|
||||
if(nTries >= maxTries) {
|
||||
WARN("DeltaProductionChannel::sampleDeltaMass loop was stopped because maximum number of tries was reached. Delta mass " << x << " MeV with CM energy " << ecm << " MeV may be unphysical." << std::endl);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
FinalState* DeltaProductionChannel::getFinalState() {
|
||||
/**
|
||||
* Delta production
|
||||
*
|
||||
* The production is not isotropic in this version it has the same
|
||||
* exp(b*t) structure as the nn elastic scattering (formula 2.3 of
|
||||
* j.cugnon et al, nucl phys a352(1981)505) parametrization of b
|
||||
* taken from ref. prc56(1997)2431
|
||||
*/
|
||||
// 100 IF (K4.NE.1) GO TO 101 // ThA K4 = 2 by default
|
||||
// ParticleType p1TypeOld = particle1->getType();
|
||||
// ParticleType p2TypeOld = particle2->getType();
|
||||
G4double ecm = KinematicsUtils::totalEnergyInCM(particle1, particle2);
|
||||
|
||||
const G4int isospin = ParticleTable::getIsospin(particle1->getType()) +
|
||||
ParticleTable::getIsospin(particle2->getType());
|
||||
|
||||
// Calculate the outcome of the channel:
|
||||
G4double pin = particle1->getMomentum().mag();
|
||||
G4double rndm = 0.0, b = 0.0;
|
||||
|
||||
G4double xmdel = sampleDeltaMass(ecm);
|
||||
// deltaProduction103: // This label is not used
|
||||
G4double pnorm = KinematicsUtils::momentumInCM(ecm, ParticleTable::effectiveNucleonMass, xmdel);
|
||||
if (pnorm <= 0.0) pnorm=0.000001;
|
||||
G4int index=0;
|
||||
G4int index2=0;
|
||||
rndm = Random::shoot();
|
||||
if (rndm < 0.5) index=1;
|
||||
if (isospin == 0) { // pn case
|
||||
rndm = Random::shoot();
|
||||
if (rndm < 0.5) index2=1;
|
||||
}
|
||||
|
||||
// G4double x=0.001*0.5*ecm*std::sqrt(ecm*ecm-4.*ParticleTable::effectiveNucleonMass2)
|
||||
// / ParticleTable::effectiveNucleonMass;
|
||||
G4double x = 0.001 * KinematicsUtils::momentumInLab(ecm*ecm, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
|
||||
if(x < 1.4) {
|
||||
b=(5.287/(1.+std::exp((1.3-x)/0.05)))*1.e-6;
|
||||
} else {
|
||||
b=(4.65+0.706*(x-1.4))*1.e-6;
|
||||
}
|
||||
G4double xkh = 2.*b*pin*pnorm;
|
||||
rndm = Random::shoot();
|
||||
G4double ctet=1.0+std::log(1.-rndm*(1.-std::exp(-2.*xkh)))/xkh;
|
||||
if(std::abs(ctet) > 1.0) ctet = Math::sign(ctet);
|
||||
G4double stet = std::sqrt(1.-ctet*ctet);
|
||||
|
||||
rndm = Random::shoot();
|
||||
G4double fi = Math::twoPi*rndm;
|
||||
G4double cfi = std::cos(fi);
|
||||
G4double sfi = std::sin(fi);
|
||||
// delta production: correction of the angular distribution 02/09/02
|
||||
|
||||
G4double xx = particle1->getMomentum().perp2();
|
||||
G4double zz = std::pow(particle1->getMomentum().getZ(), 2);
|
||||
G4double xp1, xp2, xp3;
|
||||
if (xx >= zz*1.e-8) {
|
||||
G4double yn = std::sqrt(xx);
|
||||
G4double zn = yn*pin;
|
||||
G4double ex[3], ey[3], ez[3];
|
||||
G4double p1 = particle1->getMomentum().getX();
|
||||
G4double p2 = particle1->getMomentum().getY();
|
||||
G4double p3 = particle1->getMomentum().getZ();
|
||||
ez[0] = p1/pin;
|
||||
ez[1] = p2/pin;
|
||||
ez[2] = p3/pin;
|
||||
ex[0] = p2/yn;
|
||||
ex[1] = -p1/yn;
|
||||
ex[2] = 0.0;
|
||||
ey[0] = p1*p3/zn;
|
||||
ey[1] = p2*p3/zn;
|
||||
ey[2] = -xx/zn;
|
||||
xp1 = (ex[0]*cfi*stet+ey[0]*sfi*stet+ez[0]*ctet)*pnorm;
|
||||
xp2 = (ex[1]*cfi*stet+ey[1]*sfi*stet+ez[1]*ctet)*pnorm;
|
||||
xp3 = (ex[2]*cfi*stet+ey[2]*sfi*stet+ez[2]*ctet)*pnorm;
|
||||
}else {
|
||||
xp1=pnorm*stet*cfi;
|
||||
xp2=pnorm*stet*sfi;
|
||||
xp3=pnorm*ctet;
|
||||
}
|
||||
// end of correction angular distribution of delta production
|
||||
G4double e3 = std::sqrt(xp1*xp1+xp2*xp2+xp3*xp3
|
||||
+ParticleTable::effectiveNucleonMass2);
|
||||
// if(k4.ne.0) go to 161
|
||||
|
||||
// long-lived delta
|
||||
G4int m1 = 0;
|
||||
G4int m2 = 0;
|
||||
if (index != 1) {
|
||||
ThreeVector mom(xp1, xp2, xp3);
|
||||
particle1->setMomentum(mom);
|
||||
// e1=ecm-eout1
|
||||
m1=1;
|
||||
} else {
|
||||
ThreeVector mom(-xp1, -xp2, -xp3);
|
||||
particle1->setMomentum(mom);
|
||||
// e1=ecm-eout1
|
||||
m1=1;
|
||||
}
|
||||
|
||||
particle1->setEnergy(ecm - e3);
|
||||
particle2->setEnergy(e3);
|
||||
particle2->setMomentum(-particle1->getMomentum());
|
||||
|
||||
// SYMMETRIZATION OF CHARGES IN pn -> N DELTA
|
||||
// THE TEST ON "INDEX" ABOVE SYMETRIZES THE EXCITATION OF ONE
|
||||
// OF THE NUCLEONS WITH RESPECT TO THE DELTA EXCITATION
|
||||
// (SEE NOTE 16/10/97)
|
||||
G4int is1 = ParticleTable::getIsospin(particle1->getType());
|
||||
G4int is2 = ParticleTable::getIsospin(particle2->getType());
|
||||
if (isospin == 0) {
|
||||
if(index2 == 1) {
|
||||
G4int isi=is1;
|
||||
is1=is2;
|
||||
is2=isi;
|
||||
}
|
||||
particle1->setHelicity(0.0);
|
||||
} else {
|
||||
rndm = Random::shoot();
|
||||
if (rndm >= 0.25) {
|
||||
is1=3*is1*m1-(1-m1)*is1;
|
||||
is2=3*is2*m2-(1-m2)*is2;
|
||||
}
|
||||
particle1->setHelicity(ctet*ctet);
|
||||
}
|
||||
|
||||
if(is1 == ParticleTable::getIsospin(Proton) && m1 == 0) {
|
||||
particle1->setType(Proton);
|
||||
} else if(is1 == ParticleTable::getIsospin(Neutron) && m1 == 0) {
|
||||
particle1->setType(Neutron);
|
||||
} else if(is1 == ParticleTable::getIsospin(DeltaMinus) && m1 == 1) {
|
||||
particle1->setType(DeltaMinus);
|
||||
} else if(is1 == ParticleTable::getIsospin(DeltaZero) && m1 == 1) {
|
||||
particle1->setType(DeltaZero);
|
||||
} else if(is1 == ParticleTable::getIsospin(DeltaPlus) && m1 == 1) {
|
||||
particle1->setType(DeltaPlus);
|
||||
} else if(is1 == ParticleTable::getIsospin(DeltaPlusPlus) && m1 == 1) {
|
||||
particle1->setType(DeltaPlusPlus);
|
||||
}
|
||||
|
||||
if(is2 == ParticleTable::getIsospin(Proton) && m2 == 0) {
|
||||
particle2->setType(Proton);
|
||||
} else if(is2 == ParticleTable::getIsospin(Neutron) && m2 == 0) {
|
||||
particle2->setType(Neutron);
|
||||
} else if(is2 == ParticleTable::getIsospin(DeltaMinus) && m2 == 1) {
|
||||
particle2->setType(DeltaMinus);
|
||||
} else if(is2 == ParticleTable::getIsospin(DeltaZero) && m2 == 1) {
|
||||
particle2->setType(DeltaZero);
|
||||
} else if(is2 == ParticleTable::getIsospin(DeltaPlus) && m2 == 1) {
|
||||
particle2->setType(DeltaPlus);
|
||||
} else if(is2 == ParticleTable::getIsospin(DeltaPlusPlus) && m2 == 1) {
|
||||
particle2->setType(DeltaPlusPlus);
|
||||
}
|
||||
|
||||
if(particle1->isDelta()) particle1->setMass(xmdel);
|
||||
if(particle2->isDelta()) particle2->setMass(xmdel);
|
||||
|
||||
FinalState *fs = new FinalState;
|
||||
fs->addModifiedParticle(particle1);
|
||||
fs->addModifiedParticle(particle2);
|
||||
return fs;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLElasticChannel.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLCrossSections.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
ElasticChannel::ElasticChannel(Nucleus *n, Particle *p1, Particle *p2)
|
||||
:theNucleus(n), particle1(p1), particle2(p2)
|
||||
{
|
||||
}
|
||||
|
||||
ElasticChannel::~ElasticChannel()
|
||||
{
|
||||
}
|
||||
|
||||
FinalState* ElasticChannel::getFinalState()
|
||||
{
|
||||
ParticleType p1TypeOld = particle1->getType();
|
||||
ParticleType p2TypeOld = particle2->getType();
|
||||
|
||||
/* Concerning the way we calculate the lab momentum, see the considerations
|
||||
* in CrossSections::elasticNNLegacy().
|
||||
*/
|
||||
const G4double s = KinematicsUtils::squareTotalEnergyInCM(particle1, particle2);
|
||||
const G4double pl = KinematicsUtils::momentumInLab(s, ParticleTable::effectiveNucleonMass, ParticleTable::effectiveNucleonMass);
|
||||
|
||||
const G4int isospin = ParticleTable::getIsospin(particle1->getType()) +
|
||||
ParticleTable::getIsospin(particle2->getType());
|
||||
|
||||
// Calculate the outcome of the channel:
|
||||
G4double psq = particle1->getMomentum().mag2();
|
||||
G4double pnorm = std::sqrt(psq);
|
||||
G4double b = CrossSections::calculateNNDiffCrossSection(pl, isospin);
|
||||
G4double btmax = 4.0 * psq * b;
|
||||
G4double z = std::exp(-btmax);
|
||||
G4double ranres = Random::shoot();
|
||||
G4double y = 1.0 - ranres * (1.0 - z);
|
||||
G4double T = std::log(y)/b;
|
||||
G4int iexpi = 0;
|
||||
G4double apt = 1.0;
|
||||
|
||||
// Handle np case
|
||||
if((particle1->getType() == Proton && particle2->getType() == Neutron) ||
|
||||
(particle1->getType() == Neutron && particle2->getType() == Proton)) {
|
||||
if(pl > 800.0) {
|
||||
const G4double x = 0.001 * pl; // Transform to GeV
|
||||
apt = (800.0/pl)*(800.0/pl);
|
||||
G4double cpt = std::max(6.23 * std::exp(-1.79*x), 0.3);
|
||||
G4double alphac = 100.0 * 1.0e-6;
|
||||
G4double aaa = (1 + apt) * (1 - std::exp(-btmax))/b;
|
||||
G4double argu = psq * alphac;
|
||||
|
||||
if(argu >= 8) {
|
||||
argu = 0.0;
|
||||
} else {
|
||||
argu = std::exp(-4.0 * argu);
|
||||
}
|
||||
|
||||
G4double aac = cpt * (1.0 - argu)/alphac;
|
||||
G4double fracpn = aaa/(aac + aaa);
|
||||
if(Random::shoot() > fracpn) {
|
||||
z = std::exp(-4.0 * psq *alphac);
|
||||
iexpi = 1;
|
||||
y = 1.0 - ranres*(1.0 - z);
|
||||
T = std::log(y)/alphac;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G4double ctet = 1.0 + 0.5*T/psq;
|
||||
if(std::abs(ctet) > 1.0) ctet = Math::sign(ctet);
|
||||
G4double stet = std::sqrt(1.0 - ctet*ctet);
|
||||
G4double rndm = Random::shoot();
|
||||
|
||||
G4double fi = Math::twoPi * rndm;
|
||||
G4double cfi = std::cos(fi);
|
||||
G4double sfi = std::sin(fi);
|
||||
|
||||
G4double xx = particle1->getMomentum().perp2();
|
||||
G4double zz = std::pow(particle1->getMomentum().getZ(), 2);
|
||||
|
||||
if(xx >= (zz * 1.0e-8)) {
|
||||
ThreeVector p = particle1->getMomentum();
|
||||
G4double yn = std::sqrt(xx);
|
||||
G4double zn = yn * pnorm;
|
||||
G4double ex[3], ey[3], ez[3];
|
||||
ez[0] = p.getX() / pnorm;
|
||||
ez[1] = p.getY() / pnorm;
|
||||
ez[2] = p.getZ() / pnorm;
|
||||
|
||||
// Vector Ex is chosen arbitrarily:
|
||||
ex[0] = p.getY() / yn;
|
||||
ex[1] = -p.getX() / yn;
|
||||
ex[2] = 0.0;
|
||||
|
||||
ey[0] = p.getX() * p.getZ() / zn;
|
||||
ey[1] = p.getY() * p.getZ() / zn;
|
||||
ey[2] = -xx/zn;
|
||||
|
||||
G4double pX = (ex[0]*cfi*stet + ey[0]*sfi*stet + ez[0]*ctet) * pnorm;
|
||||
G4double pY = (ex[1]*cfi*stet + ey[1]*sfi*stet + ez[1]*ctet) * pnorm;
|
||||
G4double pZ = (ex[2]*cfi*stet + ey[2]*sfi*stet + ez[2]*ctet) * pnorm;
|
||||
|
||||
ThreeVector p1momentum = ThreeVector(pX, pY, pZ);
|
||||
particle1->setMomentum(p1momentum);
|
||||
particle2->setMomentum(-p1momentum);
|
||||
} else { // if(xx < (zz * 1.0e-8)) {
|
||||
G4double momZ = particle1->getMomentum().getZ();
|
||||
G4double pX = momZ * cfi * stet;
|
||||
G4double pY = momZ * sfi * stet;
|
||||
G4double pZ = momZ * ctet;
|
||||
|
||||
ThreeVector p1momentum(pX, pY, pZ);
|
||||
particle1->setMomentum(p1momentum);
|
||||
particle2->setMomentum(-p1momentum);
|
||||
}
|
||||
|
||||
// Handle backward scattering here.
|
||||
|
||||
if((particle1->getType() == Proton && particle2->getType() == Neutron) ||
|
||||
(particle1->getType() == Neutron && particle2->getType() == Proton)) {
|
||||
rndm = Random::shoot();
|
||||
apt = 1.0;
|
||||
if(pl > 800.0) {
|
||||
apt = std::pow(800.0/pl, 2);
|
||||
}
|
||||
if(iexpi == 1 || rndm > 1.0/(1.0 + apt)) {
|
||||
particle1->setType(p2TypeOld);
|
||||
particle2->setType(p1TypeOld);
|
||||
}
|
||||
}
|
||||
|
||||
// Note: there is no need to update the kinetic energies of the particles,
|
||||
// as this is elastic scattering.
|
||||
|
||||
FinalState *fs = new FinalState();
|
||||
fs->addModifiedParticle(particle1);
|
||||
fs->addModifiedParticle(particle2);
|
||||
|
||||
return fs;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLEventAction.hh"
|
||||
#include "G4INCLLogger.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
EventAction::EventAction() {
|
||||
}
|
||||
|
||||
EventAction::~EventAction() {
|
||||
}
|
||||
|
||||
void EventAction::beforeEventAction() {
|
||||
INFO("Beginning of event" << std::endl);
|
||||
}
|
||||
|
||||
void EventAction::afterEventAction() {
|
||||
INFO("End of event" << std::endl);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLIClusteringModel.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
G4int IClusteringModel::maxClusterAlgorithmMass = 5;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLICoulomb.cc
|
||||
* \brief Abstract G4interface for Coulomb distortion.
|
||||
*
|
||||
* Created on: 14 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLICoulomb.hh"
|
||||
|
||||
const G4double G4INCL::ICoulomb::eSquared = 1.439964; // e^2/(4 pi epsilon_0) [MeV fm]
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLINuclearPotential.cc
|
||||
* \brief Abstract G4interface to the nuclear potential.
|
||||
*
|
||||
* NuclearPotential-like classes should provide access to the value of the
|
||||
* potential of a particle in a particular context. For example, an instance of
|
||||
* a NuclearPotential class should be associated to every nucleus.
|
||||
*
|
||||
* Created on: 31 March 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLINuclearPotential.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
namespace NuclearPotential {
|
||||
|
||||
const G4double INuclearPotential::vPionDefault = 30.6; // MeV
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* IPropagationModel.cc
|
||||
*
|
||||
* Created on: 4 juin 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#include "G4INCLIPropagationModel.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
IPropagationModel::IPropagationModel() {
|
||||
// TODO Auto-generated constructor stub
|
||||
|
||||
}
|
||||
|
||||
IPropagationModel::~IPropagationModel() {
|
||||
// TODO Auto-generated destructor stub
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,481 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/* \file G4INCLInteractionAvatar.cc
|
||||
* \brief Virtual class for G4interaction avatars.
|
||||
*
|
||||
* This class is inherited by decay and collision avatars. The goal is to
|
||||
* provide a uniform treatment of common physics, such as Pauli blocking,
|
||||
* enforcement of energy conservation, etc.
|
||||
*
|
||||
* Created on: Mar 1st, 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLInteractionAvatar.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLCrossSections.hh"
|
||||
#include "G4INCLPauliBlocking.hh"
|
||||
#include "G4INCLRootFinder.hh"
|
||||
#include "G4INCLLogger.hh"
|
||||
#include "G4INCLConfigEnums.hh"
|
||||
// #include <cassert>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
const G4double InteractionAvatar::locEAccuracy = 1.E-4;
|
||||
const G4int InteractionAvatar::maxIterLocE = 50;
|
||||
|
||||
InteractionAvatar::InteractionAvatar(G4double time, G4INCL::Nucleus *n, G4INCL::Particle *p1)
|
||||
: IAvatar(time), theNucleus(n),
|
||||
particle1(p1), particle2(NULL), isPiN(false)
|
||||
{
|
||||
}
|
||||
|
||||
InteractionAvatar::InteractionAvatar(G4double time, G4INCL::Nucleus *n, G4INCL::Particle *p1,
|
||||
G4INCL::Particle *p2)
|
||||
: IAvatar(time), theNucleus(n),
|
||||
particle1(p1), particle2(p2),
|
||||
isPiN((p1->isPion() && p2->isNucleon()) || (p2->isPion() && p1->isNucleon()))
|
||||
{
|
||||
}
|
||||
|
||||
InteractionAvatar::~InteractionAvatar() {
|
||||
}
|
||||
|
||||
void InteractionAvatar::preInteractionBlocking() {
|
||||
oldParticle1Type = particle1->getType();
|
||||
oldParticle1Energy = particle1->getEnergy();
|
||||
oldParticle1Potential = particle1->getPotentialEnergy();
|
||||
oldParticle1Momentum = particle1->getMomentum();
|
||||
oldParticle1Position = particle1->getPosition();
|
||||
oldParticle1Mass = particle1->getMass();
|
||||
oldParticle1Helicity = particle1->getHelicity();
|
||||
|
||||
if(particle2) {
|
||||
oldParticle2Type = particle2->getType();
|
||||
oldParticle2Energy = particle2->getEnergy();
|
||||
oldParticle2Potential = particle2->getPotentialEnergy();
|
||||
oldParticle2Momentum = particle2->getMomentum();
|
||||
oldParticle2Position = particle2->getPosition();
|
||||
oldParticle2Mass = particle2->getMass();
|
||||
oldParticle2Helicity = particle2->getHelicity();
|
||||
oldTotalEnergy = oldParticle1Energy + oldParticle2Energy
|
||||
- particle1->getPotentialEnergy() - particle2->getPotentialEnergy();
|
||||
oldXSec = CrossSections::total(particle1, particle2);
|
||||
} else {
|
||||
oldTotalEnergy = oldParticle1Energy - particle1->getPotentialEnergy();
|
||||
}
|
||||
}
|
||||
|
||||
void InteractionAvatar::preInteractionLocalEnergy(Particle * const p) {
|
||||
if(!theNucleus || p->isPion()) return; // Local energy does not make any sense without a nucleus
|
||||
|
||||
if(shouldUseLocalEnergy())
|
||||
KinematicsUtils::transformToLocalEnergyFrame(theNucleus, p);
|
||||
}
|
||||
|
||||
void InteractionAvatar::preInteraction() {
|
||||
preInteractionBlocking();
|
||||
|
||||
preInteractionLocalEnergy(particle1);
|
||||
|
||||
if(particle2) {
|
||||
preInteractionLocalEnergy(particle2);
|
||||
if(!isPiN) {
|
||||
boostVector = KinematicsUtils::makeBoostVector(particle1, particle2);
|
||||
particle2->boost(boostVector);
|
||||
}
|
||||
} else {
|
||||
boostVector = particle1->getMomentum()/particle1->getEnergy();
|
||||
}
|
||||
if(!isPiN)
|
||||
particle1->boost(boostVector);
|
||||
}
|
||||
|
||||
G4bool InteractionAvatar::bringParticleInside(Particle * const p) {
|
||||
ThreeVector pos = p->getPosition();
|
||||
G4double pos2 = pos.mag2();
|
||||
const G4double r = theNucleus->getSurfaceRadius(p);
|
||||
short iterations=0;
|
||||
const short maxIterations=50;
|
||||
|
||||
if(pos2 < r*r) return true;
|
||||
|
||||
while( pos2 >= r*r && iterations<maxIterations )
|
||||
{
|
||||
pos *= std::sqrt(r*r*0.99/pos2);
|
||||
pos2 = pos.mag2();
|
||||
iterations++;
|
||||
}
|
||||
if( iterations < maxIterations)
|
||||
{
|
||||
DEBUG("Particle position vector length was : " << p->getPosition().mag() << ", rescaled to: " << pos.mag() << std::endl);
|
||||
p->setPosition(pos);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
FinalState *InteractionAvatar::postInteraction(FinalState *fs) {
|
||||
ParticleList modified = fs->getModifiedParticles();
|
||||
ParticleList modifiedAndCreated = modified;
|
||||
ParticleList created = fs->getCreatedParticles();
|
||||
modifiedAndCreated.insert(modifiedAndCreated.end(), created.begin(), created.end());
|
||||
|
||||
if(!isPiN) {
|
||||
// Boost back to lab
|
||||
for( ParticleIter i = modifiedAndCreated.begin(); i != modifiedAndCreated.end(); ++i )
|
||||
(*i)->boost(-boostVector);
|
||||
}
|
||||
|
||||
// If there is no Nucleus, just return
|
||||
if(!theNucleus) return fs;
|
||||
|
||||
// Mark pions that have been created outside their well (we will force them
|
||||
// to be emitted later).
|
||||
for( ParticleIter i = created.begin(); i != created.end(); ++i )
|
||||
if((*i)->isPion() && (*i)->getPosition().mag() > theNucleus->getSurfaceRadius(*i)) {
|
||||
(*i)->makeParticipant();
|
||||
(*i)->setOutOfWell();
|
||||
fs->addOutgoingParticle(*i);
|
||||
DEBUG("Pion was created outside its potential well." << std::endl
|
||||
<< (*i)->prG4int());
|
||||
}
|
||||
|
||||
// Try to enforce energy conservation
|
||||
fs->setTotalEnergyBeforeInteraction(oldTotalEnergy);
|
||||
G4bool success = true;
|
||||
if(!isPiN || shouldUseLocalEnergy())
|
||||
success = enforceEnergyConservation(fs);
|
||||
if(!success) {
|
||||
DEBUG("Enforcing energy conservation: failed!" << std::endl);
|
||||
|
||||
// Restore the state of the initial particles
|
||||
restoreParticles();
|
||||
|
||||
// Delete newly created particles
|
||||
for( ParticleIter i = created.begin(); i != created.end(); ++i )
|
||||
delete *i;
|
||||
|
||||
FinalState *fsBlocked = new FinalState;
|
||||
delete fs;
|
||||
fsBlocked->makeNoEnergyConservation();
|
||||
fsBlocked->setTotalEnergyBeforeInteraction(0.0);
|
||||
|
||||
return fsBlocked; // Interaction is blocked. Return an empty final state.
|
||||
}
|
||||
DEBUG("Enforcing energy conservation: success!" << std::endl);
|
||||
|
||||
// Check that outgoing delta resonances can decay to pi-N
|
||||
for( ParticleIter i = modified.begin(); i != modified.end(); ++i )
|
||||
if((*i)->isDelta() &&
|
||||
(*i)->getMass() < ParticleTable::effectiveDeltaDecayThreshold) {
|
||||
DEBUG("Mass of the produced delta below decay threshold; forbidding collision. deltaMass=" <<
|
||||
(*i)->getMass() << std::endl);
|
||||
|
||||
// Restore the state of the initial particles
|
||||
restoreParticles();
|
||||
|
||||
// Delete newly created particles
|
||||
for( ParticleIter i = created.begin(); i != created.end(); ++i )
|
||||
delete *i;
|
||||
|
||||
FinalState *fsBlocked = new FinalState;
|
||||
delete fs;
|
||||
fsBlocked->makeNoEnergyConservation();
|
||||
fsBlocked->setTotalEnergyBeforeInteraction(0.0);
|
||||
|
||||
return fsBlocked; // Interaction is blocked. Return an empty final state.
|
||||
}
|
||||
|
||||
// Test Pauli blocking
|
||||
G4bool isBlocked = Pauli::isBlocked(modifiedAndCreated, theNucleus);
|
||||
|
||||
if(isBlocked) {
|
||||
DEBUG("Pauli: Blocked!" << std::endl);
|
||||
|
||||
// Restore the state of the initial particles
|
||||
restoreParticles();
|
||||
|
||||
// Delete newly created particles
|
||||
for( ParticleIter i = created.begin(); i != created.end(); ++i )
|
||||
delete *i;
|
||||
|
||||
FinalState *fsBlocked = new FinalState;
|
||||
delete fs;
|
||||
fsBlocked->makePauliBlocked();
|
||||
fsBlocked->setTotalEnergyBeforeInteraction(0.0);
|
||||
|
||||
return fsBlocked; // Interaction is blocked. Return an empty final state.
|
||||
}
|
||||
DEBUG("Pauli: Allowed!" << std::endl);
|
||||
|
||||
// Test CDPP blocking
|
||||
G4bool isCDPPBlocked = Pauli::isCDPPBlocked(created, theNucleus);
|
||||
|
||||
if(isCDPPBlocked) {
|
||||
DEBUG("CDPP: Blocked!" << std::endl);
|
||||
|
||||
// Restore the state of the initial particles
|
||||
restoreParticles();
|
||||
|
||||
// Delete newly created particles
|
||||
for( ParticleIter i = created.begin(); i != created.end(); ++i )
|
||||
delete *i;
|
||||
|
||||
FinalState *fsBlocked = new FinalState;
|
||||
delete fs;
|
||||
fsBlocked->makePauliBlocked();
|
||||
fsBlocked->setTotalEnergyBeforeInteraction(0.0);
|
||||
|
||||
return fsBlocked; // Interaction is blocked. Return an empty final state.
|
||||
}
|
||||
DEBUG("CDPP: Allowed!" << std::endl);
|
||||
|
||||
// If all went well, try to bring particles inside the nucleus...
|
||||
for( ParticleIter i = modifiedAndCreated.begin(); i != modifiedAndCreated.end(); ++i )
|
||||
{
|
||||
// ...except for pions beyond their surface radius.
|
||||
if((*i)->isOutOfWell()) continue;
|
||||
|
||||
const G4bool success = bringParticleInside(*i);
|
||||
if( !success ) {
|
||||
ERROR("Failed to bring particle inside the nucleus!" << std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
// Collision accepted!
|
||||
for( ParticleIter i = modifiedAndCreated.begin(); i != modifiedAndCreated.end(); ++i ) {
|
||||
if(!(*i)->isOutOfWell()) {
|
||||
// Decide if the particle should be made G4into a spectator
|
||||
G4bool goesBackToSpectator = false;
|
||||
if((*i)->isNucleon() && theNucleus->getStore()->getConfig()->getBackToSpectator()) {
|
||||
const G4double threshold = (*i)->getPotentialEnergy()
|
||||
- ParticleTable::getSeparationEnergy((*i)->getType())
|
||||
+ theNucleus->getStore()->getConfig()->getBackToSpectatorThreshold();
|
||||
if((*i)->getKineticEnergy() < threshold)
|
||||
goesBackToSpectator = true;
|
||||
}
|
||||
// Increment or decrement the participant counters
|
||||
if(goesBackToSpectator) {
|
||||
if((*i)->isParticipant()) {
|
||||
theNucleus->getStore()->getBook()->decrementParticipants();
|
||||
(*i)->makeSpectator();
|
||||
}
|
||||
} else {
|
||||
if(!(*i)->isParticipant()) {
|
||||
theNucleus->getStore()->getBook()->incrementParticipants();
|
||||
(*i)->makeParticipant();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ParticleList destroyed = fs->getDestroyedParticles();
|
||||
for( ParticleIter i = destroyed.begin(); i != destroyed.end(); ++i )
|
||||
if((*i)->isParticipant())
|
||||
theNucleus->getStore()->getBook()->decrementParticipants();
|
||||
|
||||
return fs;
|
||||
}
|
||||
|
||||
void InteractionAvatar::restoreParticles() const {
|
||||
particle1->setType(oldParticle1Type);
|
||||
particle1->setEnergy(oldParticle1Energy);
|
||||
particle1->setPotentialEnergy(oldParticle1Potential);
|
||||
particle1->setMomentum(oldParticle1Momentum);
|
||||
particle1->setPosition(oldParticle1Position);
|
||||
particle1->setMass(oldParticle1Mass);
|
||||
particle1->setHelicity(oldParticle1Helicity);
|
||||
|
||||
if(particle2) {
|
||||
particle2->setType(oldParticle2Type);
|
||||
particle2->setEnergy(oldParticle2Energy);
|
||||
particle2->setPotentialEnergy(oldParticle2Potential);
|
||||
particle2->setMomentum(oldParticle2Momentum);
|
||||
particle2->setPosition(oldParticle2Position);
|
||||
particle2->setMass(oldParticle2Mass);
|
||||
particle2->setHelicity(oldParticle2Helicity);
|
||||
}
|
||||
}
|
||||
|
||||
G4bool InteractionAvatar::enforceEnergyConservation(FinalState * const fs) {
|
||||
// Set up the violationE calculation
|
||||
ParticleList modified = fs->getModifiedParticles();
|
||||
const G4bool manyBodyFinalState = (modified.size() + fs->getCreatedParticles().size() > 1);
|
||||
if(manyBodyFinalState)
|
||||
violationEFunctor = new ViolationEMomentumFunctor(theNucleus, fs, &boostVector, shouldUseLocalEnergy());
|
||||
else {
|
||||
Particle const * const p = modified.front();
|
||||
// The following condition is necessary for the functor to work
|
||||
// correctly. A similar condition exists in INCL4.6.
|
||||
if(p->getMass() < ParticleTable::effectiveDeltaDecayThreshold)
|
||||
return false;
|
||||
violationEFunctor = new ViolationEEnergyFunctor(theNucleus, fs);
|
||||
}
|
||||
|
||||
// Apply the root-finding algorithm
|
||||
const G4bool success = RootFinder::solve(violationEFunctor, 1.0);
|
||||
if(!success) {
|
||||
WARN("Couldn't enforce energy conservation after an G4interaction, root-finding algorithm failed." << std::endl);
|
||||
}
|
||||
delete violationEFunctor;
|
||||
return success;
|
||||
}
|
||||
|
||||
/* *** ***
|
||||
* *** InteractionAvatar::ViolationEMomentumFunctor methods ***
|
||||
* *** ***/
|
||||
|
||||
InteractionAvatar::ViolationEMomentumFunctor::ViolationEMomentumFunctor(Nucleus * const nucleus, FinalState const * const finalState, ThreeVector const * const boost, const G4bool localE)
|
||||
: initialEnergy(finalState->getTotalEnergyBeforeInteraction()),
|
||||
theNucleus(nucleus),
|
||||
boostVector(boost),
|
||||
shouldUseLocalEnergy(localE)
|
||||
{
|
||||
// Set up the finalParticles list
|
||||
finalParticles = finalState->getModifiedParticles();
|
||||
ParticleList created = finalState->getCreatedParticles();
|
||||
finalParticles.splice(finalParticles.end(), created);
|
||||
|
||||
// Store the particle momenta (necessary for the calls to
|
||||
// scaleParticleMomenta() to work)
|
||||
particleMomenta.clear();
|
||||
for(ParticleIter i=finalParticles.begin(); i!=finalParticles.end(); ++i) {
|
||||
(*i)->boost(*boostVector);
|
||||
particleMomenta.push_back((*i)->getMomentum());
|
||||
}
|
||||
}
|
||||
|
||||
G4double InteractionAvatar::ViolationEMomentumFunctor::operator()(const G4double alpha) const {
|
||||
scaleParticleMomenta(alpha);
|
||||
|
||||
G4double deltaE = 0.0;
|
||||
for(ParticleIter i=finalParticles.begin(); i!=finalParticles.end(); ++i)
|
||||
deltaE += (*i)->getEnergy() - (*i)->getPotentialEnergy();
|
||||
deltaE -= initialEnergy;
|
||||
return deltaE;
|
||||
}
|
||||
|
||||
void InteractionAvatar::ViolationEMomentumFunctor::scaleParticleMomenta(const G4double alpha) const {
|
||||
|
||||
std::list<ThreeVector>::const_iterator iP = particleMomenta.begin();
|
||||
for(ParticleIter i=finalParticles.begin(); i!=finalParticles.end(); ++i, ++iP) {
|
||||
(*i)->setMomentum((*iP)*alpha);
|
||||
(*i)->adjustEnergyFromMomentum();
|
||||
(*i)->boost(-(*boostVector));
|
||||
if(theNucleus)
|
||||
theNucleus->updatePotentialEnergy(*i);
|
||||
else
|
||||
(*i)->setPotentialEnergy(0.);
|
||||
|
||||
if(shouldUseLocalEnergy && !(*i)->isPion() && theNucleus) { // This translates AECSVT's loops 1, 3 and 4
|
||||
// assert(theNucleus); // Local energy without a nucleus doesn't make sense
|
||||
const G4double energy = (*i)->getEnergy(); // Store the energy of the particle
|
||||
G4double locE = KinematicsUtils::getLocalEnergy(theNucleus, *i); // Initial value of local energy
|
||||
G4double locEOld;
|
||||
G4double deltaLocE = InteractionAvatar::locEAccuracy + 1E3;
|
||||
for(G4int iterLocE=0;
|
||||
deltaLocE>InteractionAvatar::locEAccuracy && iterLocE<InteractionAvatar::maxIterLocE;
|
||||
++iterLocE) {
|
||||
locEOld = locE;
|
||||
(*i)->setEnergy(energy + locE); // Update the energy of the particle...
|
||||
(*i)->adjustMomentumFromEnergy();
|
||||
theNucleus->updatePotentialEnergy(*i); // ...update its potential energy...
|
||||
locE = KinematicsUtils::getLocalEnergy(theNucleus, *i); // ...and recompute locE.
|
||||
deltaLocE = std::abs(locE-locEOld);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void InteractionAvatar::ViolationEMomentumFunctor::cleanUp(const G4bool success) const {
|
||||
if(!success)
|
||||
scaleParticleMomenta(1.);
|
||||
}
|
||||
|
||||
/* *** ***
|
||||
* *** InteractionAvatar::ViolationEEnergyFunctor methods ***
|
||||
* *** ***/
|
||||
|
||||
InteractionAvatar::ViolationEEnergyFunctor::ViolationEEnergyFunctor(Nucleus * const nucleus, FinalState const * const finalState)
|
||||
: initialEnergy(finalState->getTotalEnergyBeforeInteraction()),
|
||||
theNucleus(nucleus),
|
||||
theParticle(finalState->getModifiedParticles().front()),
|
||||
theEnergy(theParticle->getEnergy()),
|
||||
theMomentum(theParticle->getMomentum()),
|
||||
energyThreshold(KinematicsUtils::energy(theMomentum,ParticleTable::effectiveDeltaDecayThreshold))
|
||||
{
|
||||
// assert(theNucleus);
|
||||
// assert(finalState->getModifiedParticles().size()==1);
|
||||
// assert(theParticle->isDelta());
|
||||
}
|
||||
|
||||
G4double InteractionAvatar::ViolationEEnergyFunctor::operator()(const G4double alpha) const {
|
||||
setParticleEnergy(alpha);
|
||||
return theParticle->getEnergy() - theParticle->getPotentialEnergy() - initialEnergy;
|
||||
}
|
||||
|
||||
void InteractionAvatar::ViolationEEnergyFunctor::setParticleEnergy(const G4double alpha) const {
|
||||
|
||||
G4double locE = KinematicsUtils::getLocalEnergy(theNucleus, theParticle); // Initial value of local energy
|
||||
G4double locEOld;
|
||||
G4double deltaLocE = InteractionAvatar::locEAccuracy + 1E3;
|
||||
for(G4int iterLocE=0;
|
||||
deltaLocE>InteractionAvatar::locEAccuracy && iterLocE<InteractionAvatar::maxIterLocE;
|
||||
++iterLocE) {
|
||||
locEOld = locE;
|
||||
const G4double particleEnergy = energyThreshold + alpha*(theEnergy-energyThreshold);
|
||||
const G4double theMass = std::sqrt(std::pow(particleEnergy,2.)-theMomentum.mag2());
|
||||
theParticle->setMass(theMass);
|
||||
theParticle->setEnergy(particleEnergy + locE); // Update the energy of the particle...
|
||||
theParticle->adjustMomentumFromEnergy();
|
||||
theNucleus->updatePotentialEnergy(theParticle); // ...update its potential energy...
|
||||
locE = KinematicsUtils::getLocalEnergy(theNucleus, theParticle); // ...and recompute locE.
|
||||
deltaLocE = std::abs(locE-locEOld);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void InteractionAvatar::ViolationEEnergyFunctor::cleanUp(const G4bool success) const {
|
||||
if(!success)
|
||||
setParticleEnergy(1.);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
void KinematicsUtils::transformToLocalEnergyFrame(Nucleus const * const n, Particle * const p) {
|
||||
const G4double localEnergy = KinematicsUtils::getLocalEnergy(n, p);
|
||||
const G4double localTotalEnergy = p->getEnergy() - localEnergy;
|
||||
p->setEnergy(localTotalEnergy);
|
||||
p->adjustMomentumFromEnergy();
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::getLocalEnergy(Nucleus const * const n, Particle * const p) {
|
||||
// assert(!p->isPion()); // No local energy for pions
|
||||
|
||||
G4double vloc = 0.0;
|
||||
const G4double r = p->getPosition().mag();
|
||||
const G4double mass = p->getMass();
|
||||
|
||||
// Local energy is constant outside the surface
|
||||
if(r > n->getDensity()->getMaximumRadius()) {
|
||||
WARN("Tried to evaluate local energy for a particle outside the maximum radius."
|
||||
<< std::endl << p->prG4int() << std::endl
|
||||
<< "Maximum radius = " << n->getDensity()->getMaximumRadius() << std::endl);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
G4double pfl0 = 0.0;
|
||||
const G4double kinE = p->getKineticEnergy();
|
||||
if(kinE <= n->getPotential()->getFermiEnergy(p->getType())) {
|
||||
pfl0 = n->getPotential()->getFermiMomentum(p);
|
||||
} else {
|
||||
const G4double tf0 = p->getPotentialEnergy() - ParticleTable::getSeparationEnergy(p->getType());
|
||||
if(tf0<0.0) return 0.0;
|
||||
pfl0 = std::sqrt(tf0*(tf0 + 2.0*mass));
|
||||
}
|
||||
const G4double pl = pfl0*n->getDensity()->getMaxTFromR(r);
|
||||
vloc = std::sqrt(pl*pl + mass*mass) - mass;
|
||||
|
||||
return vloc;
|
||||
}
|
||||
|
||||
ThreeVector KinematicsUtils::makeBoostVector(Particle const * const p1, Particle const * const p2){
|
||||
const G4double totalEnergy = p1->getEnergy() + p2->getEnergy();
|
||||
return ((p1->getMomentum() + p2->getMomentum())/totalEnergy);
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::totalEnergyInCM(Particle const * const p1, Particle const * const p2){
|
||||
return std::sqrt(squareTotalEnergyInCM(p1,p2));
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::squareTotalEnergyInCM(Particle const * const p1, Particle const * const p2) {
|
||||
G4double beta2 = KinematicsUtils::makeBoostVector(p1, p2).mag2();
|
||||
if(beta2 > 1.0) {
|
||||
ERROR("KinematicsUtils::squareTotalEnergyInCM: beta2 == " << beta2 << " > 1.0" << std::endl);
|
||||
beta2 = 0.0;
|
||||
}
|
||||
return (1.0 - beta2)*std::pow(p1->getEnergy() + p2->getEnergy(), 2);
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::momentumInCM(Particle const * const p1, Particle const * const p2) {
|
||||
const G4double m1sq = std::pow(p1->getMass(),2);
|
||||
const G4double m2sq = std::pow(p2->getMass(),2);
|
||||
const G4double z = p1->getEnergy()*p2->getEnergy() - p1->getMomentum().dot(p2->getMomentum());
|
||||
G4double pcm2 = (z*z-m1sq*m2sq)/(2*z+m1sq+m2sq);
|
||||
if(pcm2 < 0.0) {
|
||||
ERROR("KinematicsUtils::momentumInCM: pcm2 == " << pcm2 << " < 0.0" << std::endl);
|
||||
pcm2 = 0.0;
|
||||
}
|
||||
return std::sqrt(pcm2);
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::momentumInCM(const G4double E, const G4double M1, const G4double M2) {
|
||||
return 0.5*std::sqrt((E*E - std::pow(M1 + M2, 2))
|
||||
*(E*E - std::pow(M1 - M2, 2)))/E;
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::momentumInLab(const G4double s, const G4double m1, const G4double m2) {
|
||||
const G4double m1sq = m1*m1;
|
||||
const G4double m2sq = m2*m2;
|
||||
G4double plab2 = (s*s-2*s*(m1sq+m2sq)+(m1sq-m2sq)*(m1sq-m2sq))/(4*m2sq);
|
||||
if(plab2 < 0.0) {
|
||||
ERROR("KinematicsUtils::momentumInLab: plab2 == " << plab2 << " < 0.0; m1sq == " << m1sq << "; m2sq == " << m2sq << "; s == " << s << std::endl);
|
||||
plab2 = 0.0;
|
||||
}
|
||||
return std::sqrt(plab2);
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::momentumInLab(Particle const * const p1, Particle const * const p2) {
|
||||
const G4double m1 = p1->getMass();
|
||||
const G4double m2 = p2->getMass();
|
||||
const G4double s = squareTotalEnergyInCM(p1, p2);
|
||||
return KinematicsUtils::momentumInLab(s, m1, m2);
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::sumTotalEnergies(const ParticleList &pl) {
|
||||
G4double E = 0.0;
|
||||
for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
|
||||
E += (*i)->getEnergy();
|
||||
}
|
||||
return E;
|
||||
}
|
||||
|
||||
ThreeVector KinematicsUtils::sumMomenta(const ParticleList &pl) {
|
||||
ThreeVector p(0.0, 0.0, 0.0);
|
||||
for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
|
||||
p += (*i)->getMomentum();
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::energy(const ThreeVector &p, const G4double m) {
|
||||
return std::sqrt(p.mag2() + m*m);
|
||||
}
|
||||
|
||||
G4double KinematicsUtils::invariantMass(const G4double E, const ThreeVector & p) {
|
||||
return std::sqrt(E*E - p.mag2());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,367 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLNuclearDensity.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
NuclearDensity::NuclearDensity(G4int A, G4int Z, IFunction1D *densityF)
|
||||
:theA(A), theZ(Z)
|
||||
{
|
||||
densityFunction = densityF;
|
||||
theRadiusParameter = densityFunction->getRadiusParameter();
|
||||
theMaximumRadius = densityFunction->getMaximumRadius();
|
||||
theDiffusenessParameter = densityFunction->getDiffusenessParameter();
|
||||
computeCentralRadius();
|
||||
|
||||
initializeDensity();
|
||||
initializeFirstDerivative();
|
||||
initializeTransmissionRadii();
|
||||
}
|
||||
|
||||
NuclearDensity::NuclearDensity(G4int A, G4int Z, IFunction1D *densityF,
|
||||
G4double radius,
|
||||
G4double maximumRadius,
|
||||
G4double diffuseness)
|
||||
:theA(A), theZ(Z),
|
||||
densityFunction(densityF),
|
||||
theRadiusParameter(radius), theMaximumRadius(maximumRadius),
|
||||
theDiffusenessParameter(diffuseness)
|
||||
{
|
||||
computeCentralRadius();
|
||||
initializeDensity();
|
||||
initializeFirstDerivative();
|
||||
initializeTransmissionRadii();
|
||||
}
|
||||
|
||||
NuclearDensity::~NuclearDensity() {
|
||||
delete densityFunction;
|
||||
}
|
||||
|
||||
void NuclearDensity::initMaterial(G4int iamat, G4int izmat)
|
||||
{
|
||||
G4double res_dws = 0.0;
|
||||
G4double fnor = 0.0;
|
||||
|
||||
G4double rcour = 0.0;
|
||||
G4int nbr = 0;
|
||||
|
||||
G4double f_r = 0.0;
|
||||
|
||||
G4double drws = 0.0;
|
||||
|
||||
// parametres moyens de densite de la cible (fermi 2 parametres)
|
||||
densityFunction->setRadiusParameter(ParticleTable::getNuclearRadius(iamat,izmat));
|
||||
densityFunction->setDiffusenessParameter(ParticleTable::getSurfaceDiffuseness(iamat,izmat));
|
||||
densityFunction->setMaximumRadius(ParticleTable::getMaximumNuclearRadius(iamat,izmat));
|
||||
|
||||
drws = densityFunction->getMaximumRadius()/29.0;
|
||||
|
||||
// preparation de la distribution w.s.:
|
||||
G4double step = 0.2;
|
||||
if (iamat >= 19) {
|
||||
step = 0.2;
|
||||
res_dws = G4integrate(0.0, 13.5, step);
|
||||
}
|
||||
else {
|
||||
// preparation de la distribution m.h.o.:
|
||||
if(iamat >= 6) {
|
||||
step=0.1;
|
||||
res_dws = G4integrate(0.0, 10.0, step);
|
||||
}
|
||||
else {
|
||||
// preparation de la distribution gaussienne:
|
||||
// G4double cte = std::pow(ws->adif,3)*std::sqrt(2.*3.141592654);
|
||||
res_dws = 3.0*(std::pow(densityFunction->getDiffusenessParameter(), 3)
|
||||
*std::sqrt(Math::twoPi))/2.0;
|
||||
}
|
||||
}
|
||||
fnor = res_dws;
|
||||
|
||||
// calcul de q/pf=f(r)
|
||||
nbr = G4int(std::floor((densityFunction->getMaximumRadius())/drws + 1.5));
|
||||
rcour = -1*(drws);
|
||||
|
||||
G4int j = 0;
|
||||
for(G4int i = 0; i < nbr; i++) { // do i=1,nbr
|
||||
rcour = rcour + drws;
|
||||
if(i == 0) { // 1->0
|
||||
j++;
|
||||
f_r = 0.0;
|
||||
x.push_back(f_r);
|
||||
y.push_back(0.0);
|
||||
r_t.push_back(0.0);
|
||||
tmin.push_back(f_r);
|
||||
res_dws = 0.0;
|
||||
} else {
|
||||
step = rcour/20.;
|
||||
if(step >= 0.05) {
|
||||
step = 0.05;
|
||||
}
|
||||
res_dws = G4integrate(0.0, rcour, step);
|
||||
f_r = res_dws/fnor;
|
||||
|
||||
if(f_r >= 0.0) { // Safeguard against negative f_r
|
||||
f_r = std::pow(f_r,(1./3.));
|
||||
j++;
|
||||
x.push_back(f_r);
|
||||
y.push_back(rcour);
|
||||
r_t.push_back(rcour);
|
||||
tmin.push_back(f_r);
|
||||
} else {
|
||||
// x.push_back(0.0);
|
||||
// y.push_back(rcour);
|
||||
if(std::abs(f_r) > 0.01) {
|
||||
ERROR("i = " << i << " f_r " << f_r
|
||||
<< " poG4int has been skipped." << std::endl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// numberOfPoG4ints = j;
|
||||
x[x.size() - 1] = 1.0; // Set the last value to 1.0 (y = rmax)
|
||||
}
|
||||
|
||||
G4double NuclearDensity::G4integrate(G4double ami, G4double ama, G4double step) const {
|
||||
G4double res = 0.0;
|
||||
G4double x1[5];
|
||||
for(G4int init_i = 0; init_i < 5; init_i++) {
|
||||
x1[init_i] = 0.0;
|
||||
}
|
||||
G4double ri = ami;
|
||||
G4double ra = ama;
|
||||
G4int nb = 0;
|
||||
G4double acont = 1.0;
|
||||
G4double dr = step;
|
||||
|
||||
if(ama <= ami) {
|
||||
acont = -1.0;
|
||||
ri = ama;
|
||||
ra = ami;
|
||||
}
|
||||
|
||||
x1[0] = 95.0/288.0;
|
||||
x1[1] = 317.0/240.0;
|
||||
x1[2] = 23.0/30.0;
|
||||
x1[3] = 793.0/720.0;
|
||||
x1[4] = 157.0/160.0;
|
||||
nb = G4int(std::floor(((ra - ri)/dr + 1.0000000001))); // 1.0000000001 -> 0.0
|
||||
dr = (ra - ri)/(G4double(nb - 1));
|
||||
res = 0.0;
|
||||
|
||||
if(nb < 10) {
|
||||
ERROR("Not enough G4integration poG4ints" << std::endl);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
for(G4int i = 0; i < 5; i++) {
|
||||
res = res + (densityFunction->getValue(ri)
|
||||
+ densityFunction->getValue(ra)) * x1[i];
|
||||
ri = ri + dr;
|
||||
ra = ra - dr;
|
||||
}
|
||||
|
||||
nb = nb - 10;
|
||||
|
||||
if(nb == 0) {
|
||||
return (res*dr*acont);
|
||||
}
|
||||
|
||||
for(G4int i = 0; i < nb; i++) {
|
||||
res = res + densityFunction->getValue(ri);
|
||||
ri = ri + dr;
|
||||
}
|
||||
|
||||
return(res*dr*acont);
|
||||
}
|
||||
|
||||
void NuclearDensity::initializeDensity() {
|
||||
initMaterial(theA, theZ);
|
||||
}
|
||||
|
||||
void NuclearDensity::initializeFirstDerivative() {
|
||||
if(x.empty()) {
|
||||
ERROR("INCL::NuclearDensity: No datapoG4ints in the nuclear density"
|
||||
<< std::endl);
|
||||
return;
|
||||
}
|
||||
|
||||
for(unsigned int i = 0; i != (x.size() - 1); ++i) { // For nuclear density r(p)
|
||||
if((x[i+1] - x[i]) == 0.0) { // Safeguard against division by zero
|
||||
s.push_back(0.0);
|
||||
continue;
|
||||
}
|
||||
s.push_back((y[i+1] - y[i])/(x[i+1] - x[i]));
|
||||
}
|
||||
s.push_back(s[x.size() - 2]);
|
||||
|
||||
for(unsigned int i = 0; i != (x.size() - 1); ++i) { // For local energy
|
||||
if((r_t[i+1] - r_t[i]) == 0.0) { // Safeguard against division by zero
|
||||
s_loce.push_back(0.0);
|
||||
continue;
|
||||
}
|
||||
s_loce.push_back((tmin[i+1] - tmin[i])/(r_t[i+1] - r_t[i]));
|
||||
}
|
||||
s_loce.push_back(s_loce[r_t.size() - 2]);
|
||||
}
|
||||
|
||||
void NuclearDensity::initializeTransmissionRadii() {
|
||||
const G4double r0 = 1.12;
|
||||
const G4double theNucleonTransmissionRadius = r0*Math::pow13((G4double)theA) + 0.88;
|
||||
|
||||
transmissionRadius[Proton] = theNucleonTransmissionRadius;
|
||||
transmissionRadius[Neutron] = theNucleonTransmissionRadius;
|
||||
transmissionRadius[PiPlus] = theCentralRadius;
|
||||
transmissionRadius[PiZero] = theCentralRadius;
|
||||
transmissionRadius[PiMinus] = theCentralRadius;
|
||||
transmissionRadius[DeltaPlusPlus] = theNucleonTransmissionRadius;
|
||||
transmissionRadius[DeltaPlus] = theNucleonTransmissionRadius;
|
||||
transmissionRadius[DeltaZero] = theNucleonTransmissionRadius;
|
||||
transmissionRadius[DeltaMinus] = theNucleonTransmissionRadius;
|
||||
transmissionRadius[Composite] = theCentralRadius;
|
||||
}
|
||||
|
||||
G4double NuclearDensity::getMaxRFromPLegacy(G4double p) const {
|
||||
G4double flin = 0.0;
|
||||
G4double xv = p;
|
||||
G4double dgx = 0.0;
|
||||
G4int j = 0;
|
||||
G4double tz= xv - x[0];
|
||||
if(tz < 0.0) {
|
||||
goto flin1;
|
||||
} else if(tz == 0.0) {
|
||||
goto flin2;
|
||||
} else {
|
||||
goto flin3;
|
||||
}
|
||||
flin1:
|
||||
flin = y[0]+s[0]*tz;
|
||||
return flin;
|
||||
flin2:
|
||||
flin = y[0];
|
||||
return flin;
|
||||
flin3:
|
||||
|
||||
for(unsigned int i=1; i < x.size(); ++i) {
|
||||
j=i;
|
||||
tz=xv-x[i];
|
||||
if(tz < 0.0) {
|
||||
goto flin8;
|
||||
} else if(tz == 0.0) {
|
||||
goto flin9;
|
||||
} else {
|
||||
// goto 10
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
goto flin8;
|
||||
|
||||
flin9:
|
||||
flin=y[j];
|
||||
return flin;
|
||||
|
||||
flin8:
|
||||
j=j-1;
|
||||
dgx=xv-x[j];
|
||||
flin=y[j]+s[j]*dgx;
|
||||
return flin;
|
||||
}
|
||||
|
||||
G4double NuclearDensity::getMaxRFromPNew(G4double p) const {
|
||||
G4double tz = p - x[0];
|
||||
G4int j = 0;
|
||||
|
||||
if(tz < 0) {
|
||||
return (y[0] + s[0]*tz);
|
||||
} else if(tz == 0) {
|
||||
return y[0];
|
||||
} else { // tz > 0
|
||||
for(unsigned int i = 1; i < x.size(); ++i) {
|
||||
j = i;
|
||||
tz = p - x[j];
|
||||
if(tz <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(tz >= 0) {
|
||||
return y[j];
|
||||
} else if(tz < 0.0) {
|
||||
j = j - 1;
|
||||
G4double dgx = p - x[j];
|
||||
return(y[j] + s[j]*dgx);
|
||||
}
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
G4double NuclearDensity::getMaxRFromP(G4double p) const {
|
||||
//return getMaxRFromPLegacy(p);
|
||||
return getMaxRFromPNew(p);
|
||||
}
|
||||
|
||||
G4double NuclearDensity::getMaxTFromR(G4double r) const {
|
||||
G4double tz = r - r_t[0];
|
||||
G4int j = 0;
|
||||
|
||||
if(tz < 0) {
|
||||
return (tmin[0] + s_loce[0]*tz);
|
||||
} else if(tz == 0) {
|
||||
return tmin[0];
|
||||
} else { // tz > 0
|
||||
for(unsigned int i = 1; i < r_t.size(); ++i) {
|
||||
j = i;
|
||||
tz = r - r_t[j];
|
||||
if(tz <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(tz >= 0) {
|
||||
return tmin[j];
|
||||
} else if(tz < 0.0) {
|
||||
j = j - 1;
|
||||
G4double dgx = r - r_t[j];
|
||||
return(tmin[j] + s_loce[j]*dgx);
|
||||
}
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLNuclearDensityFactory.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
NuclearDensity* NuclearDensityFactory::createDensity(G4int A, G4int Z) {
|
||||
IFunction1D *densityFunction = NuclearDensityFactory::createDensityFunction(A, Z);
|
||||
NuclearDensity *density = new NuclearDensity(A, Z, densityFunction);
|
||||
return density;
|
||||
}
|
||||
|
||||
IFunction1D* NuclearDensityFactory::createDensityFunction(G4int A, G4int Z) {
|
||||
G4double radius = ParticleTable::getNuclearRadius(A, Z);
|
||||
G4double diffuseness = ParticleTable::getSurfaceDiffuseness(A, Z);
|
||||
G4double maximumRadius = ParticleTable::getMaximumNuclearRadius(A, Z);
|
||||
|
||||
if(A > 19) {
|
||||
return new DerivWoodsSaxon(radius, maximumRadius, diffuseness);
|
||||
} else if(A <= 19 && A > 6) {
|
||||
return new DerivModifiedHarmonicOscillator(radius, maximumRadius, diffuseness);
|
||||
} else if(A >= 2 && A <= 6) { // Gaussian distribution for light nuclei
|
||||
return new DerivGaussian(radius, maximumRadius, diffuseness);
|
||||
} else {
|
||||
ERROR("No nuclear density function for target A = "
|
||||
<< A << " Z = " << Z << std::endl);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// We will not construct any instances of this class
|
||||
NuclearDensityFactory::NuclearDensityFactory() {}
|
||||
NuclearDensityFactory::~NuclearDensityFactory() {}
|
||||
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLNuclearPotentialConstant.cc
|
||||
* \brief Isospin- and energy-independent nuclear potential.
|
||||
*
|
||||
* Provides a constant nuclear potential (V0).
|
||||
*
|
||||
* Created on: 17 January 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLNuclearPotentialConstant.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
namespace NuclearPotential {
|
||||
|
||||
// Constructors
|
||||
NuclearPotentialConstant::NuclearPotentialConstant(NuclearDensity *density, G4bool pionPotential)
|
||||
: INuclearPotential(density, pionPotential)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
NuclearPotentialConstant::NuclearPotentialConstant(NuclearDensity *density, G4bool pionPotential, G4double /* nucleon */, G4double /* delta */)
|
||||
: INuclearPotential(density, pionPotential)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
// Destructor
|
||||
NuclearPotentialConstant::~NuclearPotentialConstant() {
|
||||
}
|
||||
|
||||
void NuclearPotentialConstant::initialize() {
|
||||
const G4double mp = ParticleTable::getMass(Proton);
|
||||
fermiMomentum[Proton] = Pf;
|
||||
fermiEnergy[Proton] = std::sqrt(PfSquared + mp*mp) - mp;
|
||||
|
||||
const G4double mn = ParticleTable::getMass(Neutron);
|
||||
fermiMomentum[Neutron] = Pf;
|
||||
fermiEnergy[Neutron] = std::sqrt(PfSquared + mn*mn) - mn;
|
||||
|
||||
fermiEnergy[DeltaPlusPlus] = fermiEnergy.find(Proton)->second;
|
||||
fermiEnergy[DeltaPlus] = fermiEnergy.find(Proton)->second;
|
||||
fermiEnergy[DeltaZero] = fermiEnergy.find(Neutron)->second;
|
||||
fermiEnergy[DeltaMinus] = fermiEnergy.find(Neutron)->second;
|
||||
|
||||
vNucleon = 0.5*(fermiEnergy[Proton]+fermiEnergy[Neutron])
|
||||
+ 0.5*(ParticleTable::getSeparationEnergy(Proton)+ParticleTable::getSeparationEnergy(Neutron));
|
||||
vDelta = vNucleon;
|
||||
}
|
||||
|
||||
G4double NuclearPotentialConstant::computePotentialEnergy(const Particle *particle) const {
|
||||
|
||||
switch( particle->getType() )
|
||||
{
|
||||
case Proton:
|
||||
case Neutron:
|
||||
return vNucleon;
|
||||
break;
|
||||
|
||||
case PiPlus:
|
||||
case PiZero:
|
||||
case PiMinus:
|
||||
return computePionPotentialEnergy(particle);
|
||||
break;
|
||||
|
||||
case DeltaPlusPlus:
|
||||
case DeltaPlus:
|
||||
case DeltaZero:
|
||||
case DeltaMinus:
|
||||
return vDelta;
|
||||
break;
|
||||
case UnknownParticle:
|
||||
ERROR("Trying to compute potential energy of an unknown particle.");
|
||||
return 0.0;
|
||||
break;
|
||||
default:
|
||||
ERROR("Trying to compute potential energy of a malformed particle.");
|
||||
return 0.0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLNuclearPotentialEnergyIsospin.cc
|
||||
* \brief Isospin- and energy-dependent nuclear potential.
|
||||
*
|
||||
* Provides an isospin- and energy-dependent nuclear potential.
|
||||
*
|
||||
* Created on: 21 March 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLNuclearPotentialEnergyIsospin.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
namespace NuclearPotential {
|
||||
|
||||
const G4double NuclearPotentialEnergyIsospin::alpha= 0.223;
|
||||
|
||||
// Constructors
|
||||
NuclearPotentialEnergyIsospin::NuclearPotentialEnergyIsospin(NuclearDensity *density, G4bool pionPotential)
|
||||
: NuclearPotentialIsospin(density,pionPotential)
|
||||
{}
|
||||
|
||||
// Destructor
|
||||
NuclearPotentialEnergyIsospin::~NuclearPotentialEnergyIsospin() {}
|
||||
|
||||
G4double NuclearPotentialEnergyIsospin::computePotentialEnergy(const Particle *particle) const {
|
||||
|
||||
const G4double v0 = NuclearPotentialIsospin::computePotentialEnergy(particle);
|
||||
|
||||
if(particle->isNucleon()) {
|
||||
const G4double t = particle->getKineticEnergy();
|
||||
const G4double tf = getFermiEnergy(particle);
|
||||
// Constant potential for T<Tf
|
||||
if(t < tf)
|
||||
return v0;
|
||||
|
||||
// Linear function for T>Tf
|
||||
const G4double v = v0 - alpha*(t-tf)/(1-alpha);
|
||||
return (v>0.0) ? v : 0.0; // return 0.0 if v is negative
|
||||
} else
|
||||
return v0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLNuclearPotentialIsospin.cc
|
||||
* \brief Isospin-dependent nuclear potential.
|
||||
*
|
||||
* Provides an isospin-dependent nuclear potential.
|
||||
*
|
||||
* Created on: 28 February 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLNuclearPotentialIsospin.hh"
|
||||
#include "G4INCLNuclearPotentialConstant.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
namespace NuclearPotential {
|
||||
|
||||
// Constructors
|
||||
NuclearPotentialIsospin::NuclearPotentialIsospin(NuclearDensity *density, G4bool pionPotential)
|
||||
: INuclearPotential(density, pionPotential)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
// Destructor
|
||||
NuclearPotentialIsospin::~NuclearPotentialIsospin() {}
|
||||
|
||||
void NuclearPotentialIsospin::initialize() {
|
||||
const G4double ZOverA = ((G4double) theDensity->getZ()) / ((G4double) theDensity->getA());
|
||||
|
||||
const G4double mp = ParticleTable::getMass(Proton);
|
||||
fermiMomentum[Proton] = Pf * Math::pow13(2.*ZOverA);
|
||||
fermiEnergy[Proton] = std::sqrt(fermiMomentum[Proton]*fermiMomentum[Proton] + mp*mp) - mp;
|
||||
vProton = fermiEnergy[Proton] + ParticleTable::getSeparationEnergy(Proton);
|
||||
|
||||
const G4double mn = ParticleTable::getMass(Neutron);
|
||||
fermiMomentum[Neutron] = Pf * Math::pow13(2.*(1.-ZOverA));
|
||||
fermiEnergy[Neutron] = std::sqrt(fermiMomentum[Neutron]*fermiMomentum[Neutron] + mn*mn) - mn;
|
||||
vNeutron = fermiEnergy[Neutron] + ParticleTable::getSeparationEnergy(Neutron);
|
||||
|
||||
vDeltaPlus = vProton;
|
||||
vDeltaZero = vNeutron;
|
||||
vDeltaPlusPlus = 2*vDeltaPlus - vDeltaZero;
|
||||
vDeltaMinus = 2*vDeltaZero - vDeltaPlus;
|
||||
|
||||
const G4double Tfpp = vDeltaPlusPlus - vProton + fermiEnergy.find(Proton)->second;
|
||||
const G4double Tfp = fermiEnergy.find(Proton)->second;
|
||||
const G4double Tf0 = fermiEnergy.find(Neutron)->second;
|
||||
const G4double Tfm = vDeltaMinus - vNeutron + fermiEnergy.find(Neutron)->second;
|
||||
fermiEnergy[DeltaPlusPlus] = Tfpp;
|
||||
fermiEnergy[DeltaPlus] = Tfp;
|
||||
fermiEnergy[DeltaZero] = Tf0;
|
||||
fermiEnergy[DeltaMinus] = Tfm;
|
||||
}
|
||||
|
||||
G4double NuclearPotentialIsospin::computePotentialEnergy(const Particle *particle) const {
|
||||
|
||||
switch( particle->getType() )
|
||||
{
|
||||
case Proton:
|
||||
return vProton;
|
||||
break;
|
||||
case Neutron:
|
||||
return vNeutron;
|
||||
break;
|
||||
|
||||
case PiPlus:
|
||||
case PiZero:
|
||||
case PiMinus:
|
||||
return computePionPotentialEnergy(particle);
|
||||
break;
|
||||
|
||||
case DeltaPlusPlus:
|
||||
return vDeltaPlusPlus;
|
||||
break;
|
||||
case DeltaPlus:
|
||||
return vDeltaPlus;
|
||||
break;
|
||||
case DeltaZero:
|
||||
return vDeltaZero;
|
||||
break;
|
||||
case DeltaMinus:
|
||||
return vDeltaMinus;
|
||||
break;
|
||||
case Composite:
|
||||
ERROR("No potential computed for particle of type Cluster.");
|
||||
return 0.0;
|
||||
break;
|
||||
case UnknownParticle:
|
||||
ERROR("Trying to compute potential energy for an unknown particle.");
|
||||
return 0.0;
|
||||
break;
|
||||
}
|
||||
|
||||
ERROR("There is no potential for this type of particle.");
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,820 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* G4INCLNucleus.cc
|
||||
*
|
||||
* Created on: Jun 5, 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#ifndef G4INCLNucleus_hh
|
||||
#define G4INCLNucleus_hh 1
|
||||
|
||||
#include "G4INCLGlobals.hh"
|
||||
#include "G4INCLLogger.hh"
|
||||
#include "G4INCLParticle.hh"
|
||||
#include "G4INCLIAvatar.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLNucleus.hh"
|
||||
#include "G4INCLNuclearDensityFactory.hh"
|
||||
#include "G4INCLNuclearPotentialConstant.hh"
|
||||
#include "G4INCLNuclearPotentialIsospin.hh"
|
||||
#include "G4INCLNuclearPotentialEnergyIsospin.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLDecayAvatar.hh"
|
||||
#include "G4INCLRootFinder.hh"
|
||||
#include "G4INCLCluster.hh"
|
||||
#include "G4INCLClusterDecay.hh"
|
||||
#include <iterator>
|
||||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
// #include <cassert>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
Nucleus::Nucleus(G4int mass, G4int charge, Config const * const conf)
|
||||
:theZ(charge), theA(mass),
|
||||
theInitialZ(charge), theInitialA(mass),
|
||||
forcedTransparent(false),
|
||||
theNpInitial(0), theNnInitial(0),
|
||||
theExcitationEnergy(0.),
|
||||
initialInternalEnergy(0.),
|
||||
incomingAngularMomentum(0.,0.,0.), incomingMomentum(0.,0.,0.),
|
||||
theSpin(0.,0.,0.), theRecoilMomentum(0.,0.,0.),
|
||||
initialCenterOfMass(0.,0.,0.),
|
||||
remnant(true)
|
||||
{
|
||||
theDensity = NuclearDensityFactory::createDensity(mass, charge);
|
||||
|
||||
PotentialType potentialType;
|
||||
G4bool pionPotential;
|
||||
if(conf) {
|
||||
potentialType = conf->getPotentialType();
|
||||
pionPotential = conf->getPionPotential();
|
||||
} else { // By default we don't use energy dependent
|
||||
// potential. This is convenient for some tests.
|
||||
potentialType = IsospinPotential;
|
||||
pionPotential = true;
|
||||
}
|
||||
switch(potentialType) {
|
||||
case IsospinEnergyPotential:
|
||||
thePotential = new NuclearPotential::NuclearPotentialEnergyIsospin(theDensity, pionPotential);
|
||||
break;
|
||||
case IsospinPotential:
|
||||
thePotential = new NuclearPotential::NuclearPotentialIsospin(theDensity, pionPotential);
|
||||
break;
|
||||
case ConstantPotential:
|
||||
thePotential = new NuclearPotential::NuclearPotentialConstant(theDensity, pionPotential);
|
||||
break;
|
||||
default:
|
||||
FATAL("Unrecognized potential type at Nucleus creation." << std::endl);
|
||||
std::exit(EXIT_FAILURE);
|
||||
break;
|
||||
}
|
||||
|
||||
theStore = new Store(conf);
|
||||
toBeUpdated.clear();
|
||||
blockedDelta = NULL;
|
||||
}
|
||||
|
||||
Nucleus::~Nucleus() {
|
||||
delete theStore;
|
||||
delete thePotential;
|
||||
delete theDensity;
|
||||
}
|
||||
|
||||
void Nucleus::initializeParticles()
|
||||
{
|
||||
G4INCL::ParticleType type = G4INCL::Proton;
|
||||
for(G4int i = 1; i <= theA; ++i) {
|
||||
// DEBUG("Creating particle " << i << std::endl);
|
||||
if(i == (theZ + 1)) { // Nucleons [Z+1..A] are neutrons
|
||||
type = G4INCL::Neutron;
|
||||
}
|
||||
|
||||
const G4double pFermi = thePotential->getFermiMomentum(type);
|
||||
ThreeVector momentum = Random::sphereVector(pFermi);
|
||||
G4double P = momentum.mag()/pFermi;
|
||||
ThreeVector position = Random::sphereVector(theDensity->getMaxRFromP(P));
|
||||
Particle *p = new Particle(type, momentum, position);
|
||||
updatePotentialEnergy(p);
|
||||
// p->makeParticipant(); // Force the particle to become a participant immediately (for testing)
|
||||
theStore->add(p);
|
||||
}
|
||||
initialInternalEnergy = computeTotalEnergy();
|
||||
initialCenterOfMass = computeCenterOfMass();
|
||||
}
|
||||
|
||||
G4double Nucleus::getTransmissionProbability(Particle const * const particle) {
|
||||
// NOUVEAU BARR RELATIVISTE ATTENTION AUX ENTREES SORTIES!
|
||||
// (06/2005)
|
||||
//
|
||||
// ATTENTION ICI BARR de version AB different de version TA ...et l'appel est
|
||||
// probablement version TA!
|
||||
// BARR=TRANSMISSION PROBABILITY FOR A PARTICLE (Nucleon, cluster or
|
||||
// pion) of kinetic energy E on the edge of the (attractive) well of
|
||||
// depth V0 felt by the particle.
|
||||
// IZ is the isospin of the particle,
|
||||
// IZN the instantaneous charge of the nucleus and R the radius of
|
||||
// the well.
|
||||
// IA is the mass number of the particle, and MRE its mass energy.
|
||||
//
|
||||
// Modified 9/10/2002 for clusters (d,t,3He,4He) (IZ=isospin,IA=A)
|
||||
// IZ must be correct so that charge Q=(IA+IZ)/2.
|
||||
// Modified 4/2004 for relativistic expressions and pions.
|
||||
|
||||
G4double E = particle->getKineticEnergy();
|
||||
|
||||
G4int izn = theZ;
|
||||
G4int iq = particle->getZ();
|
||||
|
||||
G4double v0ia = particle->getPotentialEnergy();
|
||||
/* This isn't really a radius, it's the poG4int where we wish to compute the
|
||||
* value of the barrier. */
|
||||
G4double r = theDensity->getTransmissionRadius(particle);
|
||||
|
||||
G4double barr = 0.0;
|
||||
G4double b = 0.0, px = 0.0, g = 0.0;
|
||||
G4double x = 0.0;
|
||||
|
||||
G4double mre = particle->getMass();
|
||||
|
||||
if (E > v0ia) goto barr12;
|
||||
return 0.0;
|
||||
|
||||
barr12:
|
||||
x=std::sqrt((2.*mre*E+E*E)*(2.*mre*(E-v0ia)+std::pow(E-v0ia, 2)));
|
||||
barr=4.*x/(2.*mre*(2.*E-v0ia)+E*E+std::pow(E-v0ia, 2)+2.*x);
|
||||
if (iq > 0 && iq < izn) goto barr22;
|
||||
return barr;
|
||||
|
||||
barr22:
|
||||
b=iq*(izn-iq)*1.44/r;
|
||||
px=std::sqrt((E-v0ia)/b);
|
||||
|
||||
if (px < 1.0) goto barr32;
|
||||
return barr;
|
||||
|
||||
barr32:
|
||||
g=iq*(izn-iq)/137.03*std::sqrt(2.*mre/(E-v0ia)/(1.+(E-v0ia)/2./mre))
|
||||
*(std::acos(px)-px*std::sqrt(1.-px*px));
|
||||
if (g > 35.) {
|
||||
barr=0.;
|
||||
} else {
|
||||
barr=barr*std::exp(-2.*g);
|
||||
}
|
||||
return barr;
|
||||
}
|
||||
|
||||
/*
|
||||
G4double Nucleus::getTransmissionProbability(Particle *p) {
|
||||
// const G4double energy = p->getEnergy() - p->getMass();
|
||||
const G4double energy = p->getKineticEnergy();
|
||||
const G4double V0 = 45.0; // FIXME:
|
||||
|
||||
|
||||
if(energy <= V0) return 0.0;
|
||||
|
||||
const G4double x = std::sqrt(energy * (energy - V0));
|
||||
const G4double barr = (4.0*x/(energy + energy - V0 + x + x));
|
||||
|
||||
if(p->getZ() <= 0) return barr;
|
||||
|
||||
const G4double b = theZ*1.44/(getRadius() * getRadius());
|
||||
const G4double px = std::sqrt((energy - V0)/b);
|
||||
|
||||
if(px >= 1.0) return barr;
|
||||
|
||||
const G4double g = theZ/137.03 * std::sqrt(2.0*ProtonMass/(energy - V0))
|
||||
* (std::acos(px) - px*std::sqrt(1.0 - px*px));
|
||||
|
||||
if(g > 35.0) {
|
||||
return 0.0;
|
||||
} else {
|
||||
return barr * std::exp(-2.0*g);
|
||||
}
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
*/
|
||||
|
||||
std::string Nucleus::dump() {
|
||||
std::stringstream ss;
|
||||
ss <<"(list ;; List of participants " << std::endl;
|
||||
ParticleList participants = theStore->getParticipants();
|
||||
for(ParticleIter i = participants.begin(); i != participants.end(); ++i) {
|
||||
ss <<"(make-particle-avatar-map " << std::endl
|
||||
<< (*i)->dump()
|
||||
<< "(list ;; List of avatars in this particle" << std::endl
|
||||
<< ")) ;; Close the list of avatars and the particle-avatar-map" << std::endl;
|
||||
}
|
||||
ss << ")" << std::endl;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
void Nucleus::applyFinalState(FinalState *finalstate) {
|
||||
justCreated.clear();
|
||||
toBeUpdated.clear(); // Clear the list of particles to be updated by the propagation model.
|
||||
blockedDelta = NULL;
|
||||
G4double totalEnergy = 0.0;
|
||||
|
||||
FinalStateValidity const validity = finalstate->getValidity();
|
||||
if(validity == ValidFS) {
|
||||
|
||||
ParticleList created = finalstate->getCreatedParticles();
|
||||
for(ParticleIter iter = created.begin(); iter != created.end(); ++iter) {
|
||||
theStore->add((*iter));
|
||||
if(!(*iter)->isOutOfWell()) {
|
||||
totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
|
||||
justCreated.push_back((*iter)); // New particle, so we must create avatars for it
|
||||
}
|
||||
}
|
||||
|
||||
ParticleList deleted = finalstate->getDestroyedParticles();
|
||||
for(ParticleIter iter = deleted.begin(); iter != deleted.end(); ++iter) {
|
||||
theStore->particleHasBeenDestroyed((*iter)->getID());
|
||||
}
|
||||
|
||||
ParticleList modified = finalstate->getModifiedParticles();
|
||||
for(ParticleIter iter = modified.begin(); iter != modified.end(); ++iter) {
|
||||
theStore->particleHasBeenUpdated((*iter)->getID());
|
||||
totalEnergy += (*iter)->getEnergy() - (*iter)->getPotentialEnergy();
|
||||
toBeUpdated.push_back((*iter)); // Particle is modified so we have to create new avatars for it.
|
||||
}
|
||||
|
||||
ParticleList out = finalstate->getOutgoingParticles();
|
||||
for(ParticleIter iter = out.begin(); iter != out.end(); ++iter) {
|
||||
if((*iter)->isCluster()) {
|
||||
Cluster *clusterOut = dynamic_cast<Cluster*>((*iter));
|
||||
ParticleList const *components = clusterOut->getParticles();
|
||||
for(ParticleIter in = components->begin(); in != components->end(); ++in)
|
||||
theStore->particleHasBeenEjected((*in)->getID());
|
||||
} else {
|
||||
theStore->particleHasBeenEjected((*iter)->getID());
|
||||
}
|
||||
totalEnergy += (*iter)->getEnergy(); // No potential here because the particle is gone
|
||||
theA -= (*iter)->getA();
|
||||
theZ -= (*iter)->getZ();
|
||||
theStore->addToOutgoing(*iter);
|
||||
(*iter)->setEmissionTime(theStore->getBook()->getCurrentTime());
|
||||
}
|
||||
|
||||
if(std::abs(totalEnergy - finalstate->getTotalEnergyBeforeInteraction()) > 0.1) {
|
||||
ERROR("Energy nonconservation! Energy at the beginning of the event = "
|
||||
<< finalstate->getTotalEnergyBeforeInteraction()
|
||||
<<" and after G4interaction = "
|
||||
<< totalEnergy << std::endl
|
||||
<< finalstate->prG4int());
|
||||
}
|
||||
} else if(validity == PauliBlockedFS) {
|
||||
blockedDelta = finalstate->getBlockedDelta();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Nucleus::propagateParticles(G4double /*step*/) {
|
||||
WARN("Useless Nucleus::propagateParticles -method called." << std::endl);
|
||||
}
|
||||
|
||||
G4double Nucleus::computeTotalEnergy() const {
|
||||
G4double totalEnergy = 0.0;
|
||||
ParticleList inside = theStore->getParticles();
|
||||
for(ParticleIter p=inside.begin(); p!=inside.end(); ++p) {
|
||||
if((*p)->isNucleon()) // Ugly: we should calculate everything using total energies! (FIXME)
|
||||
totalEnergy += (*p)->getKineticEnergy() - (*p)->getPotentialEnergy();
|
||||
else if((*p)->isResonance()) // This is even uglier (why Proton, for instance?!)
|
||||
totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::getMass(Proton);
|
||||
else
|
||||
totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy();
|
||||
}
|
||||
return totalEnergy;
|
||||
}
|
||||
|
||||
void Nucleus::computeRecoilKinematics() {
|
||||
// If the remnant consists of only one nucleon, we need to apply a special
|
||||
// procedure to put it on mass shell.
|
||||
if(theA==1) {
|
||||
emitInsidePions();
|
||||
computeOneNucleonRecoilKinematics();
|
||||
remnant=false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Compute the recoil momentum and angular momentum
|
||||
theRecoilMomentum = incomingMomentum;
|
||||
theSpin = incomingAngularMomentum;
|
||||
|
||||
ParticleList outgoing = theStore->getOutgoingParticles();
|
||||
for(ParticleIter p=outgoing.begin(); p!=outgoing.end(); ++p)
|
||||
{
|
||||
theRecoilMomentum -= (*p)->getMomentum();
|
||||
theSpin -= (*p)->getAngularMomentum();
|
||||
}
|
||||
|
||||
// Subtract orbital angular momentum
|
||||
theCenterOfMass = computeCenterOfMass();
|
||||
theSpin -= (theCenterOfMass-initialCenterOfMass).vector(theRecoilMomentum);
|
||||
|
||||
theExcitationEnergy = computeExcitationEnergy();
|
||||
|
||||
G4double remnantMass = ParticleTable::getMass(theA,theZ) + theExcitationEnergy;
|
||||
theRecoilEnergy = KinematicsUtils::energy(theRecoilMomentum, remnantMass) - remnantMass;
|
||||
remnant=true;
|
||||
}
|
||||
|
||||
ThreeVector Nucleus::computeCenterOfMass() const {
|
||||
ThreeVector cm(0.,0.,0.);
|
||||
G4double totalMass = 0.0;
|
||||
ParticleList inside = theStore->getParticles();
|
||||
for(ParticleIter p=inside.begin(); p!=inside.end(); ++p) {
|
||||
const G4double mass = (*p)->getMass();
|
||||
cm += (*p)->getPosition() * mass;
|
||||
totalMass += mass;
|
||||
}
|
||||
cm /= totalMass;
|
||||
return cm;
|
||||
}
|
||||
|
||||
G4double Nucleus::computeExcitationEnergy() const {
|
||||
const G4double totalEnergy = computeTotalEnergy();
|
||||
const G4double separationEnergies = computeSeparationEnergyBalance();
|
||||
|
||||
return totalEnergy - initialInternalEnergy - separationEnergies;
|
||||
}
|
||||
|
||||
std::string Nucleus::prG4int()
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Particles in the nucleus:" << std::endl
|
||||
<< "Participants:" << std::endl;
|
||||
G4int counter = 1;
|
||||
ParticleList participants = theStore->getParticipants();
|
||||
for(ParticleIter p = participants.begin(); p != participants.end(); ++p) {
|
||||
ss << "index = " << counter << std::endl
|
||||
<< (*p)->prG4int();
|
||||
counter++;
|
||||
}
|
||||
ss <<"Spectators:" << std::endl;
|
||||
ParticleList spectators = theStore->getSpectators();
|
||||
for(ParticleIter p = spectators.begin(); p != spectators.end(); ++p)
|
||||
ss << (*p)->prG4int();
|
||||
ss <<"Outgoing:" << std::endl;
|
||||
ParticleList outgoing = theStore->getOutgoingParticles();
|
||||
for(ParticleIter p = outgoing.begin(); p != outgoing.end(); ++p)
|
||||
ss << (*p)->prG4int();
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
Particle *Nucleus::particleEnters(Particle *particle) {
|
||||
|
||||
// TODO: this is the place to add refraction
|
||||
|
||||
// Add the nuclear potential to the kinetic energy when entering the
|
||||
// nucleus
|
||||
|
||||
class IncomingEFunctor : public RootFunctor {
|
||||
public:
|
||||
IncomingEFunctor(Particle * const p, NuclearPotential::INuclearPotential const * const np) :
|
||||
theParticle(p), thePotential(np) {
|
||||
theEnergy=theParticle->getEnergy();
|
||||
}
|
||||
~IncomingEFunctor() {}
|
||||
G4double operator()(const G4double v) const {
|
||||
theParticle->setEnergy(theEnergy + v);
|
||||
theParticle->setPotentialEnergy(v);
|
||||
// Scale the particle momentum
|
||||
theParticle->adjustMomentumFromEnergy();
|
||||
return v - thePotential->computePotentialEnergy(theParticle);
|
||||
}
|
||||
void cleanUp(const G4bool /*success*/) const {}
|
||||
private:
|
||||
Particle *theParticle;
|
||||
NuclearPotential::INuclearPotential const *thePotential;
|
||||
G4double theEnergy;
|
||||
} theIncomingEFunctor(particle,thePotential);
|
||||
|
||||
G4double v = thePotential->computePotentialEnergy(particle);
|
||||
G4bool success = RootFinder::solve(&theIncomingEFunctor, v);
|
||||
if(!success) {
|
||||
WARN("Couldn't compute the potential for incoming particle, root-finding algorithm failed." << std::endl);
|
||||
}
|
||||
|
||||
return particle;
|
||||
}
|
||||
|
||||
G4bool Nucleus::decayOutgoingDeltas() {
|
||||
ParticleList out = theStore->getOutgoingParticles();
|
||||
ParticleList deltas;
|
||||
for(ParticleIter i = out.begin(); i != out.end(); ++i) {
|
||||
if((*i)->isDelta()) deltas.push_back((*i));
|
||||
}
|
||||
if(deltas.empty()) return false;
|
||||
|
||||
for(ParticleIter i = deltas.begin(); i != deltas.end(); ++i) {
|
||||
IAvatar *decay = new DecayAvatar((*i), 0.0, NULL);
|
||||
FinalState *fs = decay->getFinalState();
|
||||
ParticleList created = fs->getCreatedParticles();
|
||||
for(ParticleIter j = created.begin(); j != created.end(); ++j) {
|
||||
theStore->addToOutgoing(*j);
|
||||
(*j)->setEmissionTime(theStore->getBook()->getCurrentTime());
|
||||
}
|
||||
delete fs;
|
||||
delete decay;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
G4bool Nucleus::decayInsideDeltas() {
|
||||
/* If there is a pion potential, do nothing (deltas will be counted as
|
||||
* excitation energy).
|
||||
* If, however, the remnant is unphysical (Z<0 or Z>A), force the deltas to
|
||||
* decay and get rid of all the pions. In case you're wondering, you can
|
||||
* end up with Z<0 or Z>A if the remnant contains more pi- than protons or
|
||||
* more pi+ than neutrons, respectively.
|
||||
*/
|
||||
const G4bool unphysicalRemnant = (theZ<0 || theZ>theA);
|
||||
if(thePotential->hasPionPotential() && !unphysicalRemnant)
|
||||
return false;
|
||||
|
||||
// Build a list of deltas (avoid modifying the list you are iterating on).
|
||||
ParticleList inside = theStore->getParticles();
|
||||
ParticleList deltas;
|
||||
for(ParticleIter i = inside.begin(); i != inside.end(); ++i)
|
||||
if((*i)->isDelta()) deltas.push_back((*i));
|
||||
|
||||
// Loop over the deltas, make them decay
|
||||
for(ParticleIter i = deltas.begin(); i != deltas.end(); ++i) {
|
||||
// Create a forced-decay avatar. Note the last G4boolean parameter. Note
|
||||
// also that if the remnant is unphysical we more or less explicitly give
|
||||
// up energy conservation and CDPP by passing a NULL poG4inter for the
|
||||
// nucleus.
|
||||
IAvatar *decay;
|
||||
if(unphysicalRemnant)
|
||||
decay = new DecayAvatar((*i), 0.0, NULL, true);
|
||||
else
|
||||
decay = new DecayAvatar((*i), 0.0, this, true);
|
||||
FinalState *fs = decay->getFinalState();
|
||||
|
||||
// The pion can be ejected only if we managed to satisfy energy
|
||||
// conservation and if pion emission does not lead to negative excitation
|
||||
// energies.
|
||||
if(fs->getValidity()==ValidFS) {
|
||||
// Apply the final state to the nucleus
|
||||
applyFinalState(fs);
|
||||
}
|
||||
delete fs;
|
||||
delete decay;
|
||||
}
|
||||
|
||||
// If the remnant is unphysical, emit all the pions
|
||||
if(unphysicalRemnant) {
|
||||
DEBUG("Remnant is unphysical: Z=" << theZ << ", A=" << theA << std::endl);
|
||||
emitInsidePions();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
G4bool Nucleus::decayOutgoingClusters() {
|
||||
ParticleList out = theStore->getOutgoingParticles();
|
||||
ParticleList clusters;
|
||||
for(ParticleIter i = out.begin(); i != out.end(); ++i) {
|
||||
if((*i)->isCluster()) clusters.push_back((*i));
|
||||
}
|
||||
if(clusters.empty()) return false;
|
||||
|
||||
for(ParticleIter i = clusters.begin(); i != clusters.end(); ++i) {
|
||||
Cluster *cluster = dynamic_cast<Cluster*>(*i); // Can't avoid using a cast here
|
||||
ParticleList decayProducts = ClusterDecay::decay(cluster);
|
||||
for(ParticleIter j = decayProducts.begin(); j!=decayProducts.end(); ++j)
|
||||
theStore->addToOutgoing(*j);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Nucleus::emitInsidePions() {
|
||||
DEBUG("Forcing emissions of all pions in the nucleus. This probably violates energy"
|
||||
<< std::endl << "conservation (although the computation of the recoil kinematics might sweep this"
|
||||
<< std::endl << "under the carpet)." << std::endl);
|
||||
|
||||
// Emit the pions with this kinetic energy
|
||||
const G4double tinyPionEnergy = 0.1; // MeV
|
||||
|
||||
// Push out the emitted pions
|
||||
ParticleList inside = theStore->getParticles();
|
||||
for(ParticleIter i = inside.begin(); i != inside.end(); ++i) {
|
||||
if((*i)->isPion()) {
|
||||
theZ -= (*i)->getZ();
|
||||
(*i)->setEmissionTime(theStore->getBook()->getCurrentTime());
|
||||
if((*i)->getKineticEnergy() - (*i)->getPotentialEnergy() > 0.0)
|
||||
(*i)->setEnergy((*i)->getEnergy() - (*i)->getPotentialEnergy());
|
||||
else
|
||||
(*i)->setEnergy((*i)->getMass()+tinyPionEnergy);
|
||||
(*i)->adjustMomentumFromEnergy();
|
||||
(*i)->setPotentialEnergy(0.);
|
||||
theStore->particleHasBeenEjected((*i)->getID());
|
||||
theStore->addToOutgoing(*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Particle *Nucleus::particleLeaves(Particle *particle) {
|
||||
|
||||
// TODO: this is the place to add refraction
|
||||
|
||||
// Subtract the nuclear potential from the kinetic energy when leaving the
|
||||
// nucleus
|
||||
const G4double v = particle->getPotentialEnergy();
|
||||
|
||||
// Scaling factor for the particle momentum
|
||||
const G4double gpsg = std::sqrt((std::pow(particle->getEnergy() - v, 2)
|
||||
- particle->getMass() * particle->getMass())
|
||||
/ particle->getMomentum().mag2());
|
||||
particle->setMomentum(particle->getMomentum() * gpsg);
|
||||
particle->setEnergy(particle->getEnergy() - v);
|
||||
particle->setPotentialEnergy(0.);
|
||||
|
||||
return particle;
|
||||
|
||||
}
|
||||
|
||||
G4bool Nucleus::isEventTransparent() const {
|
||||
|
||||
if(isForcedTransparent()) return true;
|
||||
|
||||
ParticleList pL = theStore->getOutgoingParticles();
|
||||
unsigned int nIncoming = theStore->getNumberOfIncomingParticles();
|
||||
|
||||
// If the number of outgoing particles is not equal to the number of
|
||||
// incoming particles, the event is not a transparent.
|
||||
if( pL.size() != nIncoming ) return false;
|
||||
|
||||
// If any of the particles has undergone a collision, the event is not a
|
||||
// transparent.
|
||||
for(ParticleIter p = pL.begin(); p != pL.end(); ++p ) {
|
||||
if( (*p)->getNumberOfCollisions() != 0 ) return false;
|
||||
if( (*p)->getNumberOfDecays() != 0 ) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
void Nucleus::computeOneNucleonRecoilKinematics() {
|
||||
// We should be here only if the nucleus contains only one nucleon
|
||||
// assert(theStore->getParticles().size()==1);
|
||||
|
||||
DEBUG("Computing one-nucleon recoil kinematics" << std::endl);
|
||||
|
||||
// No excitation energy!
|
||||
theExcitationEnergy = 0.0;
|
||||
|
||||
// Move the nucleon to the outgoing list
|
||||
Particle *remN = theStore->getParticles().front();
|
||||
theA -= remN->getA();
|
||||
theZ -= remN->getZ();
|
||||
theStore->particleHasBeenEjected(remN->getID());
|
||||
theStore->addToOutgoing(remN);
|
||||
remN->setEmissionTime(theStore->getBook()->getCurrentTime());
|
||||
|
||||
// Treat the special case of a remaining delta
|
||||
if(remN->isDelta()) {
|
||||
IAvatar *decay = new DecayAvatar(remN, 0.0, NULL);
|
||||
FinalState *fs = decay->getFinalState();
|
||||
// Eject the pion
|
||||
ParticleList created = fs->getCreatedParticles();
|
||||
for(ParticleIter j = created.begin(); j != created.end(); ++j)
|
||||
theStore->addToOutgoing(*j);
|
||||
delete fs;
|
||||
delete decay;
|
||||
}
|
||||
|
||||
// Do different things depending on how many outgoing particles we have
|
||||
ParticleList outgoing = theStore->getOutgoingParticles();
|
||||
if(outgoing.size() == 2) {
|
||||
|
||||
DEBUG("Two particles in the outgoing channel, applying exact two-body kinematics" << std::endl);
|
||||
|
||||
// Can apply exact 2-body kinematics here. Keep the CM emission angle of
|
||||
// the first particle.
|
||||
Particle *p1 = outgoing.front(), *p2 = outgoing.back();
|
||||
const ThreeVector boostVector = incomingMomentum / initialEnergy;
|
||||
// Boost to the initial CM
|
||||
p1->boost(boostVector);
|
||||
const G4double sqrts = std::sqrt(initialEnergy*initialEnergy - incomingMomentum.mag2());
|
||||
const G4double pcm = KinematicsUtils::momentumInCM(sqrts, p1->getMass(), p2->getMass());
|
||||
const G4double scale = pcm/(p1->getMomentum().mag());
|
||||
// Reset the momenta
|
||||
p1->setMomentum(p1->getMomentum()*scale);
|
||||
p2->setMomentum(-p1->getMomentum());
|
||||
p1->adjustEnergyFromMomentum();
|
||||
p2->adjustEnergyFromMomentum();
|
||||
// Unboost
|
||||
p1->boost(-boostVector);
|
||||
p2->boost(-boostVector);
|
||||
|
||||
} else {
|
||||
|
||||
DEBUG("Trying to adjust final-state momenta to achieve energy and momentum conservation" << std::endl);
|
||||
|
||||
const G4int maxIterations=8;
|
||||
G4double totalEnergy, energyScale;
|
||||
G4double val=1.E+6, oldVal=1.E+6, oldOldVal=1.E+6, oldOldOldVal;
|
||||
ThreeVector totalMomentum, deltaP;
|
||||
std::vector<ThreeVector> minMomenta; // use it to store the particle momenta that minimize the merit function
|
||||
|
||||
// Reserve the vector size
|
||||
minMomenta.reserve(outgoing.size());
|
||||
|
||||
// Compute the initial total momentum
|
||||
totalMomentum.setX(0.0);
|
||||
totalMomentum.setY(0.0);
|
||||
totalMomentum.setZ(0.0);
|
||||
for(ParticleIter i=outgoing.begin(); i!=outgoing.end(); ++i)
|
||||
totalMomentum += (*i)->getMomentum();
|
||||
|
||||
// Compute the initial total energy
|
||||
totalEnergy = 0.0;
|
||||
for(ParticleIter i=outgoing.begin(); i!=outgoing.end(); ++i)
|
||||
totalEnergy += (*i)->getEnergy();
|
||||
|
||||
// Iterative algorithm starts here:
|
||||
for(G4int iterations=0; iterations < maxIterations; ++iterations) {
|
||||
|
||||
// Save the old merit-function values
|
||||
oldOldOldVal = oldOldVal;
|
||||
oldOldVal = oldVal;
|
||||
oldVal = val;
|
||||
|
||||
if(iterations%2 == 0) {
|
||||
DEBUG("Momentum step" << std::endl);
|
||||
// Momentum step: modify all the particle momenta
|
||||
deltaP = incomingMomentum - totalMomentum;
|
||||
G4double pOldTot = 0.0;
|
||||
for(ParticleIter i=outgoing.begin(); i!=outgoing.end(); ++i)
|
||||
pOldTot += (*i)->getMomentum().mag();
|
||||
for(ParticleIter i=outgoing.begin(); i!=outgoing.end(); ++i) {
|
||||
const ThreeVector mom = (*i)->getMomentum();
|
||||
(*i)->setMomentum(mom + deltaP*mom.mag()/pOldTot);
|
||||
(*i)->adjustEnergyFromMomentum();
|
||||
}
|
||||
} else {
|
||||
DEBUG("Energy step" << std::endl);
|
||||
// Energy step: modify all the particle momenta
|
||||
energyScale = initialEnergy/totalEnergy;
|
||||
for(ParticleIter i=outgoing.begin(); i!=outgoing.end(); ++i) {
|
||||
const ThreeVector mom = (*i)->getMomentum();
|
||||
G4double pScale = ((*i)->getEnergy()*energyScale - std::pow((*i)->getMass(),2))/mom.mag2();
|
||||
if(pScale>0) {
|
||||
(*i)->setEnergy((*i)->getEnergy()*energyScale);
|
||||
(*i)->adjustMomentumFromEnergy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Compute the current total momentum and energy
|
||||
totalMomentum.setX(0.0);
|
||||
totalMomentum.setY(0.0);
|
||||
totalMomentum.setZ(0.0);
|
||||
totalEnergy = 0.0;
|
||||
for(ParticleIter i=outgoing.begin(); i!=outgoing.end(); ++i) {
|
||||
totalMomentum += (*i)->getMomentum();
|
||||
totalEnergy += (*i)->getEnergy();
|
||||
}
|
||||
|
||||
// Merit factor
|
||||
val = std::pow(totalEnergy - initialEnergy,2) +
|
||||
0.25*(totalMomentum - incomingMomentum).mag2();
|
||||
DEBUG("Merit function: val=" << val << ", oldVal=" << oldVal << ", oldOldVal=" << oldOldVal << ", oldOldOldVal=" << oldOldOldVal << std::endl);
|
||||
|
||||
// Store the minimum
|
||||
if(val < oldVal) {
|
||||
DEBUG("New minimum found, storing the particle momenta" << std::endl);
|
||||
minMomenta.clear();
|
||||
for(ParticleIter i=outgoing.begin(); i!=outgoing.end(); ++i)
|
||||
minMomenta.push_back((*i)->getMomentum());
|
||||
}
|
||||
|
||||
// Stop the algorithm if the search diverges
|
||||
if(val > oldOldVal && oldVal > oldOldOldVal) {
|
||||
DEBUG("Search is diverging, breaking out of the iteration loop: val=" << val << ", oldVal=" << oldVal << ", oldOldVal=" << oldOldVal << ", oldOldOldVal=" << oldOldOldVal << std::endl);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// We should have made at least one successful iteration here
|
||||
// assert(minMomenta.size()==outgoing.size());
|
||||
|
||||
// Apply the optimal momenta
|
||||
DEBUG("Applying the solution" << std::endl);
|
||||
std::vector<ThreeVector>::const_iterator v = minMomenta.begin();
|
||||
for(ParticleIter i=outgoing.begin(); i!=outgoing.end(); ++i, ++v) {
|
||||
(*i)->setMomentum(*v);
|
||||
(*i)->adjustEnergyFromMomentum();
|
||||
DATABLOCK((*i)->prG4int());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Nucleus::fillEventInfo(EventInfo *eventInfo) {
|
||||
eventInfo->nParticles = 0;
|
||||
|
||||
// Outgoing particles
|
||||
ParticleList outgoingParticles = getStore()->getOutgoingParticles();
|
||||
for( ParticleIter i = outgoingParticles.begin(); i != outgoingParticles.end(); ++i ) {
|
||||
eventInfo->A[eventInfo->nParticles] = (*i)->getA();
|
||||
eventInfo->Z[eventInfo->nParticles] = (*i)->getZ();
|
||||
eventInfo->emissionTime[eventInfo->nParticles] = (*i)->getEmissionTime();
|
||||
eventInfo->EKin[eventInfo->nParticles] = (*i)->getKineticEnergy();
|
||||
ThreeVector mom = (*i)->getMomentum();
|
||||
eventInfo->px[eventInfo->nParticles] = mom.getX();
|
||||
eventInfo->py[eventInfo->nParticles] = mom.getY();
|
||||
eventInfo->pz[eventInfo->nParticles] = mom.getZ();
|
||||
eventInfo->theta[eventInfo->nParticles] = Math::toDegrees(mom.theta());
|
||||
eventInfo->phi[eventInfo->nParticles] = Math::toDegrees(mom.phi());
|
||||
eventInfo->origin[eventInfo->nParticles] = -1;
|
||||
// std::strcpy(eventInfo->history[eventInfo->nParticles],"");
|
||||
eventInfo->nParticles++;
|
||||
}
|
||||
|
||||
eventInfo->nCascadeParticles = eventInfo->nParticles;
|
||||
|
||||
// Remnant characteristics
|
||||
if(hasRemnant()) {
|
||||
eventInfo->nRemnants = 1;
|
||||
eventInfo->ARem[0] = getA();
|
||||
eventInfo->ZRem[0] = getZ();
|
||||
eventInfo->EStarRem[0] = getExcitationEnergy();
|
||||
if(eventInfo->EStarRem[0]<0.) {
|
||||
WARN("Negative excitation energy! EStarRem = " << eventInfo->EStarRem[0] << std::endl);
|
||||
}
|
||||
if(eventInfo->ARem[0]%2==0) { // even-A nucleus
|
||||
eventInfo->JRem[0] = (G4int) (getSpin().mag()/hc + 0.5);
|
||||
} else { // odd-A nucleus
|
||||
eventInfo->JRem[0] = ((G4int) (getSpin().mag()/hc)) + 0.5;
|
||||
}
|
||||
eventInfo->EKinRem[0] = getRecoilEnergy();
|
||||
ThreeVector mom = getRecoilMomentum();
|
||||
eventInfo->pxRem[0] = mom.getX();
|
||||
eventInfo->pyRem[0] = mom.getY();
|
||||
eventInfo->pzRem[0] = mom.getZ();
|
||||
eventInfo->thetaRem[0] = Math::toDegrees(mom.theta());
|
||||
eventInfo->phiRem[0] = Math::toDegrees(mom.phi());
|
||||
} else {
|
||||
eventInfo->nRemnants = 0;
|
||||
}
|
||||
|
||||
// Global counters, flags, etc.
|
||||
eventInfo->nCollisions = getStore()->getBook()->getAcceptedCollisions();
|
||||
eventInfo->nBlockedCollisions = getStore()->getBook()->getBlockedCollisions();
|
||||
eventInfo->nDecays = getStore()->getBook()->getAcceptedDecays();
|
||||
eventInfo->nBlockedDecays = getStore()->getBook()->getBlockedDecays();
|
||||
eventInfo->firstCollisionTime = getStore()->getBook()->getFirstCollisionTime();
|
||||
eventInfo->firstCollisionXSec = getStore()->getBook()->getFirstCollisionXSec();
|
||||
eventInfo->nReflectionAvatars = getStore()->getBook()->getAvatars(SurfaceAvatarType);
|
||||
eventInfo->nCollisionAvatars = getStore()->getBook()->getAvatars(CollisionAvatarType);
|
||||
eventInfo->nDecayAvatars = getStore()->getBook()->getAvatars(DecayAvatarType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLPauliBlocking.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
G4INCL::IPauli const * Pauli::thePauliBlocker = 0;
|
||||
G4INCL::IPauli const * Pauli::theCDPP = 0;
|
||||
|
||||
void Pauli::setBlocker(IPauli const * pauliBlocker) {
|
||||
thePauliBlocker = pauliBlocker;
|
||||
}
|
||||
|
||||
void Pauli::setCDPP(IPauli const * cdpp) {
|
||||
theCDPP = cdpp;
|
||||
}
|
||||
|
||||
G4bool Pauli::isBlocked(ParticleList const modifiedAndCreated, Nucleus const * const nucleus) {
|
||||
G4bool isPauliBlocked = false;
|
||||
if(thePauliBlocker != 0) {
|
||||
isPauliBlocked = thePauliBlocker->isBlocked(modifiedAndCreated, nucleus);
|
||||
}
|
||||
|
||||
return isPauliBlocked;
|
||||
}
|
||||
|
||||
G4bool Pauli::isCDPPBlocked(ParticleList const created, Nucleus const * const nucleus) {
|
||||
G4bool isCDPPBlocked = false;
|
||||
if(theCDPP != 0) {
|
||||
isCDPPBlocked = theCDPP->isBlocked(created, nucleus);
|
||||
}
|
||||
|
||||
return isCDPPBlocked;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLPauliGlobal.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
PauliGlobal::PauliGlobal() {}
|
||||
PauliGlobal::~PauliGlobal() {}
|
||||
|
||||
G4bool PauliGlobal::isBlocked(ParticleList const pL, Nucleus const * const n) const {
|
||||
for(ParticleIter p=pL.begin(); p!=pL.end(); ++p) {
|
||||
// Pauli blocking only applies to nucleons
|
||||
if(!(*p)->isNucleon()) continue;
|
||||
|
||||
// If the particle is above T_F, it is never blocked
|
||||
const ParticleType t = (*p)->getType();
|
||||
const G4double pFermi = n->getPotential()->getFermiMomentum(t);
|
||||
const G4double pFermiSquared = pFermi*pFermi;
|
||||
if((*p)->getMomentum().mag2() > pFermiSquared) continue;
|
||||
|
||||
// Count particles of the same type as p below the Fermi sea
|
||||
const ParticleList particles = n->getStore()->getParticles();
|
||||
G4int nSea = 0;
|
||||
for(ParticleIter i=particles.begin(); i!=particles.end(); ++i) {
|
||||
if((*i)->getType() != t) continue;
|
||||
const G4double pmod2 = (*i)->getMomentum().mag2();
|
||||
if(pmod2<pFermiSquared) nSea++;
|
||||
}
|
||||
|
||||
// Compute the blocking probability
|
||||
G4double probBlocking;
|
||||
if(t==Proton)
|
||||
probBlocking = ((G4double) nSea)/((G4double) n->getInitialZ());
|
||||
else
|
||||
probBlocking = ((G4double) nSea)/((G4double) (n->getInitialA() - n->getInitialZ()));
|
||||
|
||||
// The avatar is blocked if any particle is blocked
|
||||
if(Random::shoot() < probBlocking) return true;
|
||||
|
||||
}
|
||||
|
||||
// Not blocked
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLPauliStandard.hh"
|
||||
#include "G4INCLPauliBlocking.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
PauliStandard::PauliStandard() {}
|
||||
PauliStandard::~PauliStandard() {}
|
||||
|
||||
G4bool PauliStandard::isBlocked(ParticleList const pL, Nucleus const * const n) const {
|
||||
for(ParticleIter p = pL.begin(); p != pL.end(); ++p) {
|
||||
if( !(*p)->isNucleon() ) continue;
|
||||
if(getBlockingProbability(*p, n) > Random::shoot()) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
G4double PauliStandard::getBlockingProbability(Particle const * const particle, Nucleus const * const nucleus) const {
|
||||
const G4double rbl = 3.1848;
|
||||
const G4double pbl = 200.0;
|
||||
const G4double maxVolR = rbl;
|
||||
const G4double maxVolP = pbl;
|
||||
G4double vol = std::pow(4.*Math::pi/3.0, 2)
|
||||
* std::pow(maxVolR*maxVolP/(Math::twoPi*hc), 3);
|
||||
|
||||
const G4double rdeq = nucleus->getDensity()->getMaximumRadius();
|
||||
const G4double rs = particle->getPosition().mag();
|
||||
|
||||
if(rs - maxVolR > rdeq) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
if(rs + maxVolR > rdeq) {
|
||||
vol = vol * 0.5 * (rdeq - rs + maxVolR) / maxVolR;
|
||||
}
|
||||
|
||||
// Get the list of particles that are currently inside the
|
||||
// nucleus.
|
||||
ParticleList particles = nucleus->getStore()->getParticles();
|
||||
|
||||
G4int nl = 0;
|
||||
for(ParticleIter it = particles.begin(); it != particles.end(); ++it) {
|
||||
// Skip comparing with the same particle
|
||||
if( (*it)->getID() == particle->getID() ) continue;
|
||||
|
||||
if((*it)->getType() == particle->getType()) {
|
||||
const ThreeVector dx2v = particle->getPosition() - (*it)->getPosition();
|
||||
const G4double dx2 = dx2v.mag2();
|
||||
if(dx2 > maxVolR * maxVolR) continue;
|
||||
|
||||
const ThreeVector dp2v = particle->getMomentum() - (*it)->getMomentum();
|
||||
const G4double dp2 = dp2v.mag2();
|
||||
if(dp2 > maxVolP * maxVolP) continue;
|
||||
|
||||
nl++;
|
||||
}
|
||||
}
|
||||
const G4double blockingProbability = ((G4double) nl) / vol / 2.0;
|
||||
|
||||
if(blockingProbability > 1.0) return 1.0;
|
||||
else if(blockingProbability < 0.0) return 0.0;
|
||||
else return blockingProbability;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLPauliStrict.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
PauliStrict::PauliStrict() {}
|
||||
PauliStrict::~PauliStrict() {}
|
||||
|
||||
G4bool PauliStrict::isBlocked(ParticleList const pL, Nucleus const * const n) const {
|
||||
for(ParticleIter p=pL.begin(); p!=pL.end(); ++p) {
|
||||
if(!(*p)->isNucleon()) continue;
|
||||
const G4double pmod2 = (*p)->getMomentum().mag2();
|
||||
const G4double pFermi = n->getPotential()->getFermiMomentum(*p);
|
||||
if(pmod2<pFermi*pFermi) return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLPauliStrictStandard.hh"
|
||||
#include "G4INCLPauliStrict.hh"
|
||||
#include "G4INCLPauliStandard.hh"
|
||||
#include "G4INCLStore.hh"
|
||||
#include "G4INCLBook.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
PauliStrictStandard::PauliStrictStandard() {
|
||||
theStrictBlocker = new PauliStrict();
|
||||
theStandardBlocker = new PauliStandard();
|
||||
}
|
||||
|
||||
PauliStrictStandard::~PauliStrictStandard() {
|
||||
delete theStrictBlocker;
|
||||
delete theStandardBlocker;
|
||||
}
|
||||
|
||||
G4bool PauliStrictStandard::isBlocked(ParticleList const particleList, Nucleus const * const nucleus) const {
|
||||
if(nucleus->getStore()->getBook()->getAcceptedCollisions() == 0) {
|
||||
return theStrictBlocker->isBlocked(particleList, nucleus);
|
||||
} else {
|
||||
return theStandardBlocker->isBlocked(particleList, nucleus);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLPionNucleonChannel.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLBinaryCollisionAvatar.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
#include "G4INCLLogger.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
PionNucleonChannel::PionNucleonChannel(Particle *p1, Particle *p2, Nucleus *nucleus, const G4bool localE)
|
||||
: theNucleus(nucleus), particle1(p1), particle2(p2), locE(localE)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PionNucleonChannel::~PionNucleonChannel(){
|
||||
|
||||
}
|
||||
|
||||
FinalState* PionNucleonChannel::getFinalState() {
|
||||
FinalState *fs = new FinalState;
|
||||
|
||||
Particle * nucleon;
|
||||
Particle * pion;
|
||||
if(particle1->isNucleon()) {
|
||||
nucleon = particle1;
|
||||
pion = particle2;
|
||||
} else {
|
||||
nucleon = particle2;
|
||||
pion = particle1;
|
||||
}
|
||||
|
||||
ParticleType deltaType = DeltaZero;
|
||||
if(ParticleConfig::isPair(particle1, particle2, Proton, PiPlus)) {
|
||||
deltaType = DeltaPlusPlus;
|
||||
} else if(ParticleConfig::isPair(particle1, particle2, Neutron, PiPlus)) {
|
||||
deltaType = DeltaPlus;
|
||||
} else if(ParticleConfig::isPair(particle1, particle2, Proton, PiZero)) {
|
||||
deltaType = DeltaPlus;
|
||||
} else if(ParticleConfig::isPair(particle1, particle2, Neutron, PiZero)) {
|
||||
deltaType = DeltaZero;
|
||||
} else if(ParticleConfig::isPair(particle1, particle2, Proton, PiMinus)) {
|
||||
deltaType = DeltaZero;
|
||||
} else if(ParticleConfig::isPair(particle1, particle2, Neutron, PiMinus)) {
|
||||
deltaType = DeltaMinus;
|
||||
} else {
|
||||
ERROR("Unknown particle pair in Pi-N collision." << std::endl);
|
||||
}
|
||||
|
||||
G4double deltaEnergy = nucleon->getEnergy() - nucleon->getPotentialEnergy()
|
||||
+ pion->getEnergy() - pion->getPotentialEnergy();
|
||||
|
||||
nucleon->setType(deltaType); // nucleon becomes the delta
|
||||
deltaEnergy += theNucleus->getPotential()->computePotentialEnergy(nucleon);
|
||||
nucleon->setEnergy(deltaEnergy); // set the energy of the delta
|
||||
|
||||
ThreeVector deltaMomentum = nucleon->getMomentum() + pion->getMomentum();
|
||||
nucleon->setMomentum(deltaMomentum);
|
||||
|
||||
const G4double deltaMass = std::sqrt(deltaEnergy*deltaEnergy - deltaMomentum.mag2());
|
||||
nucleon->setMass(deltaMass);
|
||||
theNucleus->updatePotentialEnergy(nucleon);
|
||||
|
||||
fs->addModifiedParticle(nucleon); // nucleon became a delta
|
||||
fs->addDestroyedParticle(pion); // pion was removed
|
||||
return fs;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLPropagationAction.hh"
|
||||
#include "G4INCLLogger.hh"
|
||||
//#include <cassert>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
PropagationAction::PropagationAction()
|
||||
:stepCounter(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PropagationAction::~PropagationAction() {
|
||||
}
|
||||
|
||||
void PropagationAction::beforePropagationAction(IPropagationModel * /*pm*/) {
|
||||
// assert(pm->getNucleus()->getStore()->getBook()->getParticipants() == pm->getNucleus()->getStore()->countParticipants());
|
||||
}
|
||||
|
||||
void PropagationAction::afterPropagationAction(IPropagationModel * /* pm */,
|
||||
IAvatar * /*avatar */) {
|
||||
++stepCounter; // Increment the step counter
|
||||
|
||||
#ifdef INCL_DEBUG_LOG
|
||||
// DATABLOCK(pm->getNucleus()->getStore()->prG4intParticleConfiguration());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/** \file G4INCLRecombinationChannel.cc
|
||||
* \brief Delta-nucleon recombination channel.
|
||||
*
|
||||
* Created on: 25 March 2011
|
||||
* Author: Davide Mancusi
|
||||
*/
|
||||
|
||||
#include "G4INCLRecombinationChannel.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLParticleTable.hh"
|
||||
#include "G4INCLBinaryCollisionAvatar.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
|
||||
// #include <cassert>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
RecombinationChannel::RecombinationChannel(Nucleus *n, Particle *p1, Particle *p2)
|
||||
:theNucleus(n)
|
||||
{
|
||||
if(p1->isDelta()) {
|
||||
// assert(p2->isNucleon());
|
||||
theDelta = p1;
|
||||
theNucleon = p2;
|
||||
} else {
|
||||
// assert(p1->isNucleon());
|
||||
theDelta = p2;
|
||||
theNucleon = p1;
|
||||
}
|
||||
}
|
||||
|
||||
RecombinationChannel::~RecombinationChannel()
|
||||
{
|
||||
}
|
||||
|
||||
FinalState* RecombinationChannel::getFinalState()
|
||||
{
|
||||
// Compute the total available energy in the CM
|
||||
const G4double sqrts = KinematicsUtils::totalEnergyInCM(theDelta, theNucleon);
|
||||
|
||||
// Assign the types of the final-state particles
|
||||
switch(theDelta->getType()) {
|
||||
case DeltaPlusPlus:
|
||||
// assert(theNucleon->getType()!=Proton);
|
||||
theDelta->setType(Proton);
|
||||
theNucleon->setType(Proton);
|
||||
break;
|
||||
case DeltaPlus:
|
||||
theDelta->setType(Proton);
|
||||
break;
|
||||
case DeltaZero:
|
||||
theDelta->setType(Neutron);
|
||||
break;
|
||||
case DeltaMinus:
|
||||
// assert(theNucleon->getType()!=Neutron);
|
||||
theDelta->setType(Neutron);
|
||||
theNucleon->setType(Neutron);
|
||||
break;
|
||||
default:
|
||||
ERROR("Unknown particle type in RecombinationChannel" << std::endl);
|
||||
break;
|
||||
}
|
||||
|
||||
// Calculate the momenta of the nucleons in the final state
|
||||
const G4double pCM = KinematicsUtils::momentumInCM(sqrts, theDelta->getMass(), theNucleon->getMass());
|
||||
|
||||
// The angular distribution of final-state nucleons is isotropic
|
||||
ThreeVector momentum = Random::normVector(pCM);
|
||||
|
||||
// Assign the momenta
|
||||
theDelta->setMomentum(momentum);
|
||||
theNucleon->setMomentum(-momentum);
|
||||
|
||||
// Update the kinetic energies
|
||||
theDelta->adjustEnergyFromMomentum();
|
||||
theNucleon->adjustEnergyFromMomentum();
|
||||
|
||||
// Create the final state
|
||||
FinalState *fs = new FinalState();
|
||||
fs->addModifiedParticle(theDelta);
|
||||
fs->addModifiedParticle(theNucleon);
|
||||
|
||||
return fs;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLReflectionChannel.hh"
|
||||
#include "G4INCLFinalState.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLINuclearPotential.hh"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace G4INCL {
|
||||
ReflectionChannel::ReflectionChannel(Nucleus *n, Particle *p)
|
||||
:theNucleus(n),theParticle(p)
|
||||
{
|
||||
}
|
||||
|
||||
ReflectionChannel::~ReflectionChannel()
|
||||
{
|
||||
}
|
||||
|
||||
FinalState* ReflectionChannel::getFinalState()
|
||||
{
|
||||
FinalState *fs = new FinalState(); // Create final state for the output
|
||||
fs->setTotalEnergyBeforeInteraction(theParticle->getEnergy() - theParticle->getPotentialEnergy());
|
||||
|
||||
G4double pspr = theParticle->getPosition().dot(theParticle->getMomentum());
|
||||
G4double x2cour = theParticle->getPosition().mag2();
|
||||
ThreeVector newMomentum = theParticle->getMomentum() - (theParticle->getPosition() * (2.0 * pspr/x2cour));
|
||||
//ThreeVector newMomentum = -theParticle->getMomentum(); // For debugging
|
||||
theParticle->setMomentum(newMomentum);
|
||||
theNucleus->updatePotentialEnergy(theParticle);
|
||||
fs->addModifiedParticle(theParticle);
|
||||
|
||||
return fs;
|
||||
}
|
||||
}
|
||||
|
||||
+437
@@ -0,0 +1,437 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* StandardPropagationModel.cpp
|
||||
*
|
||||
* Created on: 4 juin 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#include "G4INCLStandardPropagationModel.hh"
|
||||
#include "G4INCLSurfaceAvatar.hh"
|
||||
#include "G4INCLBinaryCollisionAvatar.hh"
|
||||
#include "G4INCLDecayAvatar.hh"
|
||||
#include "G4INCLCrossSections.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include <iostream>
|
||||
#include "G4INCLLogger.hh"
|
||||
#include "G4INCLGlobals.hh"
|
||||
#include "G4INCLKinematicsUtils.hh"
|
||||
#include "G4INCLCoulombDistortion.hh"
|
||||
#include "G4INCLDeltaDecayChannel.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
StandardPropagationModel::StandardPropagationModel(LocalEnergyType localEnergyType, LocalEnergyType localEnergyDeltaType)
|
||||
:theNucleus(0), maximumTime(70.0), currentTime(0.0), firstAvatar(true),
|
||||
theLocalEnergyType(localEnergyType),
|
||||
theLocalEnergyDeltaType(localEnergyDeltaType)
|
||||
{
|
||||
}
|
||||
|
||||
StandardPropagationModel::~StandardPropagationModel()
|
||||
{
|
||||
delete theNucleus;
|
||||
}
|
||||
|
||||
G4INCL::Nucleus* StandardPropagationModel::getNucleus()
|
||||
{
|
||||
return theNucleus;
|
||||
}
|
||||
|
||||
G4bool StandardPropagationModel::shootProjectile(G4INCL::Particle *p, G4double impactParameter) {
|
||||
firstAvatar = true;
|
||||
currentTime = 0.0;
|
||||
|
||||
G4double temfin = 0.0;
|
||||
if( p->isNucleon() )
|
||||
temfin = 29.8 * std::pow(theNucleus->getA(), 0.16);
|
||||
else {
|
||||
const G4double tlab = p->getEnergy() - p->getMass();
|
||||
temfin = 30.18 * std::pow(theNucleus->getA(), 0.17*(1.0 - 5.7E-5*tlab));
|
||||
}
|
||||
|
||||
maximumTime = temfin;
|
||||
|
||||
// If Coulomb is activated, do not process events with impact
|
||||
// parameter larger than the maximum impact parameter, taking G4into
|
||||
// account Coulomb distortion.
|
||||
if(impactParameter>CoulombDistortion::maxImpactParameter(p,theNucleus))
|
||||
return false;
|
||||
|
||||
const G4double tbid = Random::shoot() * Math::twoPi;
|
||||
ThreeVector position(impactParameter * std::cos(tbid),
|
||||
impactParameter * std::sin(tbid),
|
||||
-1.E3);
|
||||
p->setPosition(position);
|
||||
|
||||
theNucleus->setIncomingAngularMomentum(p->getAngularMomentum());
|
||||
theNucleus->setIncomingMomentum(p->getMomentum());
|
||||
theNucleus->setInitialEnergy(p->getEnergy() + ParticleTable::getMass(theNucleus->getA(),theNucleus->getZ()));
|
||||
|
||||
CoulombDistortion::bringToSurface(p, theNucleus);
|
||||
|
||||
theNucleus->getStore()->addIncomingParticle(p); // puts the particle in the waiting list
|
||||
theNucleus->particleEnters(p); // removes the particle from the waiting list and changes its kinetic energy
|
||||
theNucleus->insertParticipant(p);
|
||||
return true;
|
||||
}
|
||||
|
||||
G4bool StandardPropagationModel::shootProjectile(G4INCL::Nucleus * /* p */, G4double /* impactParameter */) {
|
||||
firstAvatar = true;
|
||||
currentTime = 0.0;
|
||||
return true;
|
||||
}
|
||||
|
||||
G4double StandardPropagationModel::getStoppingTime() {
|
||||
return maximumTime;
|
||||
}
|
||||
|
||||
void StandardPropagationModel::setStoppingTime(G4double time) {
|
||||
if(time > 0.0) {
|
||||
maximumTime = time;
|
||||
} else {
|
||||
ERROR("new stopping time is smaller than 0!" << std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
G4double StandardPropagationModel::getCurrentTime() {
|
||||
return currentTime;
|
||||
}
|
||||
|
||||
void StandardPropagationModel::setNucleus(G4INCL::Nucleus *nucleus)
|
||||
{
|
||||
theNucleus = nucleus;
|
||||
}
|
||||
|
||||
void StandardPropagationModel::registerAvatar(G4INCL::IAvatar *anAvatar)
|
||||
{
|
||||
if(anAvatar) theNucleus->getStore()->add(anAvatar);
|
||||
}
|
||||
|
||||
IAvatar *StandardPropagationModel::generateBinaryCollisionAvatar(Particle * const p1, Particle * const p2) const {
|
||||
// Is either particle a participant?
|
||||
if(!p1->isParticipant() && !p2->isParticipant()) return NULL;
|
||||
|
||||
// Is it a pi-resonance collision (we don't treat them)?
|
||||
if((p1->isResonance() && p2->isPion()) || (p1->isPion() && p2->isResonance()))
|
||||
return NULL;
|
||||
|
||||
// 2N < Tf
|
||||
if(
|
||||
(p1->isNucleon() && p1->getKineticEnergy()<theNucleus->getPotential()->getFermiEnergy(p1->getType())) &&
|
||||
(p2->isNucleon() && p2->getKineticEnergy()<theNucleus->getPotential()->getFermiEnergy(p2->getType()))
|
||||
)
|
||||
return NULL;
|
||||
|
||||
// Is the CM energy > cutNN? (no cutNN on the first collision)
|
||||
if(theNucleus->getStore()->getBook()->getAcceptedCollisions()>0
|
||||
&& p1->isNucleon() && p2->isNucleon()
|
||||
&& KinematicsUtils::squareTotalEnergyInCM(p1,p2) < BinaryCollisionAvatar::cutNNSquared) return NULL;
|
||||
|
||||
// Will the avatar take place between now and the end of the cascade?
|
||||
G4double minDistOfApproachSquared = 0.0;
|
||||
G4double t = getTime(p1, p2, &minDistOfApproachSquared);
|
||||
if(t>maximumTime || t<currentTime) return NULL;
|
||||
|
||||
// Local energy. Jump through some hoops to calculate the cross section
|
||||
// at the collision poG4int, and clean up after yourself afterwards.
|
||||
ThreeVector mom1, mom2, pos1, pos2;
|
||||
G4double energy1 = 0.0, energy2 = 0.0;
|
||||
G4bool hasLocalEnergy;
|
||||
if(p1->isPion() || p2->isPion())
|
||||
hasLocalEnergy = ((theLocalEnergyDeltaType == FirstCollisionLocalEnergy &&
|
||||
theNucleus->getStore()->getBook()->getAcceptedCollisions()==0) ||
|
||||
theLocalEnergyDeltaType == AlwaysLocalEnergy);
|
||||
else
|
||||
hasLocalEnergy = ((theLocalEnergyType == FirstCollisionLocalEnergy &&
|
||||
theNucleus->getStore()->getBook()->getAcceptedCollisions()==0) ||
|
||||
theLocalEnergyType == AlwaysLocalEnergy);
|
||||
const G4bool p1HasLocalEnergy = (hasLocalEnergy && !p1->isPion());
|
||||
const G4bool p2HasLocalEnergy = (hasLocalEnergy && !p2->isPion());
|
||||
|
||||
if(p1HasLocalEnergy) {
|
||||
mom1 = p1->getMomentum();
|
||||
pos1 = p1->getPosition();
|
||||
energy1 = p1->getEnergy();
|
||||
p1->propagate(t - currentTime);
|
||||
if(p1->getPosition().mag() > theNucleus->getSurfaceRadius(p1)) {
|
||||
p1->setPosition(pos1);
|
||||
p1->setMomentum(mom1);
|
||||
p1->setEnergy(energy1);
|
||||
return NULL;
|
||||
}
|
||||
KinematicsUtils::transformToLocalEnergyFrame(theNucleus, p1);
|
||||
}
|
||||
if(p2HasLocalEnergy) {
|
||||
energy2 = p2->getEnergy();
|
||||
mom2 = p2->getMomentum();
|
||||
pos2 = p2->getPosition();
|
||||
p2->propagate(t - currentTime);
|
||||
if(p2->getPosition().mag() > theNucleus->getSurfaceRadius(p2)) {
|
||||
p2->setPosition(pos2);
|
||||
p2->setMomentum(mom2);
|
||||
p2->setEnergy(energy2);
|
||||
if(p1HasLocalEnergy) {
|
||||
p1->setPosition(pos1);
|
||||
p1->setMomentum(mom1);
|
||||
p1->setEnergy(energy1);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
KinematicsUtils::transformToLocalEnergyFrame(theNucleus, p2);
|
||||
}
|
||||
|
||||
// Compute the total cross section
|
||||
const G4double totalCrossSection = CrossSections::total(p1, p2);
|
||||
|
||||
// Restore particles to their state before the local-energy tweak
|
||||
if(p1HasLocalEnergy) {
|
||||
p1->setPosition(pos1);
|
||||
p1->setMomentum(mom1);
|
||||
p1->setEnergy(energy1);
|
||||
}
|
||||
if(p2HasLocalEnergy) {
|
||||
p2->setPosition(pos2);
|
||||
p2->setMomentum(mom2);
|
||||
p2->setEnergy(energy2);
|
||||
}
|
||||
|
||||
// Do the particles come close enough to each other?
|
||||
if(Math::tenPi*minDistOfApproachSquared > totalCrossSection) return NULL;
|
||||
|
||||
// Warn if the two collision partners are the same particle
|
||||
if(p1->getID() == p2->getID()) {
|
||||
ERROR("At BinaryCollisonAvatar generation, ID1 (" << p1->getID()
|
||||
<< ") == ID2 (" << p2->getID() <<")." << std::endl);
|
||||
}
|
||||
|
||||
// Return a new avatar, then!
|
||||
return new G4INCL::BinaryCollisionAvatar(t, totalCrossSection, theNucleus, p1, p2);
|
||||
}
|
||||
|
||||
G4double StandardPropagationModel::getReflectionTime(G4INCL::Particle const * const aParticle) {
|
||||
G4double time = 0.0;
|
||||
const G4double T2 = aParticle->getMomentum().mag2();
|
||||
const G4double T4 = aParticle->getPosition().mag2();
|
||||
|
||||
const G4double r = theNucleus->getSurfaceRadius(aParticle);
|
||||
const G4double T1 = aParticle->getMomentum().dot(aParticle->getPosition());
|
||||
const G4double T3 = T1/T2;
|
||||
const G4double T5 = T3*T3 + (r*r-T4)/T2;
|
||||
if(T5 < 0.0) {
|
||||
ERROR("Imaginary reflection time! Delta = " << T5 << " for particle: " << std::endl
|
||||
<< aParticle->prG4int());
|
||||
time = 10000.0;
|
||||
} else {
|
||||
time = currentTime + (-T3 + std::sqrt(T5)) * aParticle->getEnergy();
|
||||
}
|
||||
return time;
|
||||
}
|
||||
|
||||
G4double StandardPropagationModel::getTime(G4INCL::Particle const * const particleA,
|
||||
G4INCL::Particle const * const particleB, G4double *minDistOfApproach) const
|
||||
{
|
||||
G4double time;
|
||||
G4INCL::ThreeVector t13 = particleA->getMomentum()/particleA->getEnergy();
|
||||
t13 -= particleB->getMomentum()/particleB->getEnergy();
|
||||
G4INCL::ThreeVector distance = particleA->getPosition();
|
||||
distance -= particleB->getPosition();
|
||||
const G4double t7 = t13.dot(distance);
|
||||
const G4double dt = t13.mag2();
|
||||
if(dt <= 1.0e-10) {
|
||||
(*minDistOfApproach) = 100000.0;
|
||||
return currentTime + 100000.0;
|
||||
} else {
|
||||
time = -t7/dt;
|
||||
}
|
||||
(*minDistOfApproach) = distance.mag2() + time * t7;
|
||||
return currentTime + time;
|
||||
}
|
||||
|
||||
void StandardPropagationModel::checkCollisions(const ParticleList &participants,
|
||||
const ParticleList &particles)
|
||||
{
|
||||
G4int iind = 1, jind = 1;
|
||||
for(ParticleIter i = participants.begin(); i != participants.end(); ++i) {
|
||||
jind = 0;
|
||||
for(ParticleIter j = particles.begin(); j != particles.end(); ++j) {
|
||||
if( (*j)->isParticipant() )
|
||||
{
|
||||
++jind;
|
||||
if(jind >= iind) continue;
|
||||
}
|
||||
if((*i)->getID() == (*j)->getID()) continue; // Do not process the collision of a particle with itself
|
||||
|
||||
registerAvatar(generateBinaryCollisionAvatar(*i,*j));
|
||||
}
|
||||
++iind;
|
||||
}
|
||||
}
|
||||
|
||||
void StandardPropagationModel::generateUpdatedCollisions(const ParticleList &updatedParticles, const ParticleList &particles) {
|
||||
|
||||
// Loop over all the updated particles
|
||||
for(ParticleIter updated = updatedParticles.begin(); updated != updatedParticles.end(); ++updated)
|
||||
{
|
||||
// Loop over all the particles
|
||||
for(ParticleIter particle = particles.begin(); particle != particles.end(); ++particle)
|
||||
{
|
||||
/* Consider the generation of a collision avatar only if (*particle)
|
||||
* is not one of the updated particles.
|
||||
* The criterion makes sure that you don't generate avatars between
|
||||
* updated particles. */
|
||||
if((*particle)->isInList(updatedParticles)) continue;
|
||||
|
||||
registerAvatar(generateBinaryCollisionAvatar(*particle,*updated));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StandardPropagationModel::generateCollisions(const ParticleList &particles, const ParticleList &except) {
|
||||
|
||||
G4bool haveExcept;
|
||||
haveExcept=(except.size()!=0);
|
||||
|
||||
// Loop over all the particles
|
||||
for(ParticleIter p1 = particles.begin(); p1 != particles.end(); ++p1)
|
||||
{
|
||||
// Loop over the rest of the particles
|
||||
ParticleIter p2 = p1;
|
||||
for(++p2; p2 != particles.end(); ++p2)
|
||||
{
|
||||
// Skip the collision if both particles must be excluded
|
||||
if(haveExcept && (*p1)->isInList(except) && (*p2)->isInList(except)) continue;
|
||||
|
||||
registerAvatar(generateBinaryCollisionAvatar(*p1,*p2));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void StandardPropagationModel::updateAvatars(const ParticleList &particles) {
|
||||
|
||||
for(ParticleIter iter = particles.begin(); iter != particles.end(); ++iter) {
|
||||
G4double time = this->getReflectionTime(*iter);
|
||||
if(time <= maximumTime) registerAvatar(new SurfaceAvatar(*iter, time, theNucleus));
|
||||
}
|
||||
ParticleList p = theNucleus->getStore()->getParticles();
|
||||
generateUpdatedCollisions(particles, p); // Predict collisions with spectators and participants
|
||||
}
|
||||
|
||||
void StandardPropagationModel::generateAllAvatars(G4bool excludeUpdated) {
|
||||
ParticleList particles = theNucleus->getStore()->getParticles();
|
||||
if(particles.empty()) { ERROR("No particles inside the nucleus!" << std::endl); }
|
||||
for(ParticleIter i = particles.begin(); i != particles.end(); ++i) {
|
||||
G4double time = this->getReflectionTime(*i);
|
||||
if(time <= maximumTime) registerAvatar(new SurfaceAvatar(*i, time, theNucleus));
|
||||
}
|
||||
ParticleList except;
|
||||
if(excludeUpdated)
|
||||
except = theNucleus->getUpdatedParticles();
|
||||
generateCollisions(particles,except);
|
||||
generateDecays(particles);
|
||||
}
|
||||
|
||||
void StandardPropagationModel::generateDecays(const ParticleList &particles) {
|
||||
for(ParticleIter i = particles.begin(); i != particles.end(); ++i) {
|
||||
if((*i)->isDelta()) {
|
||||
G4double decayTime = DeltaDecayChannel::computeDecayTime((*i));
|
||||
G4double time = currentTime + decayTime;
|
||||
if(time <= maximumTime) {
|
||||
registerAvatar(new DecayAvatar((*i), time, theNucleus));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G4INCL::IAvatar* StandardPropagationModel::propagate()
|
||||
{
|
||||
if(firstAvatar) { // When we propagate particles for the first time we create the full list of avatars.
|
||||
generateAllAvatars();
|
||||
/* if(!theNucleus->getStore()->containsCollisions()) {
|
||||
theNucleus->forceTransparent();
|
||||
return NULL;
|
||||
}*/
|
||||
firstAvatar = false;
|
||||
} else { // For subsequent avatars we update only the
|
||||
// information related to particles that were updated
|
||||
// by the previous avatar.
|
||||
#ifdef INCL_REGENERATE_AVATARS
|
||||
#warning "The INCL_REGENERATE_AVATARS code has not been tested in a while. Use it at your peril."
|
||||
// Regenerates the entire avatar list, skipping collisions between
|
||||
// updated particles
|
||||
if(theNucleus->getUpdatedParticles().size()!=0 || theNucleus->getCreatedParticles().size()!=0) {
|
||||
theNucleus->getStore()->clearAvatars();
|
||||
theNucleus->getStore()->initialiseParticleAvatarConnections();
|
||||
generateAllAvatars(true);
|
||||
}
|
||||
#else
|
||||
// Deltas are created by transforming nucleon G4into a delta for
|
||||
// efficiency reasons
|
||||
Particle * const blockedDelta = theNucleus->getBlockedDelta();
|
||||
ParticleList updatedParticles = theNucleus->getUpdatedParticles();
|
||||
if(blockedDelta)
|
||||
updatedParticles.push_back(blockedDelta);
|
||||
generateDecays(updatedParticles);
|
||||
|
||||
ParticleList needNewAvatars = theNucleus->getUpdatedParticles();
|
||||
ParticleList created = theNucleus->getCreatedParticles();
|
||||
needNewAvatars.splice(needNewAvatars.end(), created);
|
||||
updateAvatars(needNewAvatars);
|
||||
#endif
|
||||
}
|
||||
|
||||
G4INCL::IAvatar *theAvatar = theNucleus->getStore()->findSmallestTime();
|
||||
if(theAvatar == 0) return 0; // Avatar list is empty
|
||||
// theAvatar->dispose();
|
||||
|
||||
theNucleus->getStore()->timeStep(theAvatar->getTime() - currentTime);
|
||||
|
||||
if(theAvatar->getTime() <= currentTime) {
|
||||
ERROR("Avatar time = " << theAvatar->getTime() << ", currentTime = " << currentTime << std::endl);
|
||||
return 0;
|
||||
} else {
|
||||
currentTime = theAvatar->getTime();
|
||||
theNucleus->getStore()->getBook()->setCurrentTime(currentTime);
|
||||
}
|
||||
|
||||
return theAvatar;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/*
|
||||
* G4INCLReflectionAvatar.cc
|
||||
*
|
||||
* Created on: Jun 8, 2009
|
||||
* Author: Pekka Kaitaniemi
|
||||
*/
|
||||
|
||||
#include "G4INCLSurfaceAvatar.hh"
|
||||
#include "G4INCLRandom.hh"
|
||||
#include "G4INCLReflectionChannel.hh"
|
||||
#include "G4INCLTransmissionChannel.hh"
|
||||
#include "G4INCLClustering.hh"
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
SurfaceAvatar::SurfaceAvatar(G4INCL::Particle *aParticle, G4double time, G4INCL::Nucleus *n)
|
||||
:IAvatar(time), theParticle(aParticle), theNucleus(n)
|
||||
{
|
||||
setType(SurfaceAvatarType);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
SurfaceAvatar::~SurfaceAvatar() {
|
||||
|
||||
}
|
||||
|
||||
G4INCL::IChannel* SurfaceAvatar::getChannel() const
|
||||
{
|
||||
if(!theParticle->isParticipant()) {
|
||||
return new ReflectionChannel(theNucleus, theParticle);
|
||||
}
|
||||
|
||||
// Don't try to make a cluster if the leading particle is too slow
|
||||
const G4double transmissionProbability = theNucleus->getTransmissionProbability(theParticle);
|
||||
|
||||
if(theParticle->isNucleon() && transmissionProbability>1.E-4) {
|
||||
Cluster *candidateCluster = 0;
|
||||
|
||||
candidateCluster = Clustering::getCluster(theNucleus, theParticle);
|
||||
if(candidateCluster != 0 &&
|
||||
Clustering::clusterCanEscape(candidateCluster)) {
|
||||
return new TransmissionChannel(theNucleus, candidateCluster);
|
||||
} else {
|
||||
delete candidateCluster;
|
||||
}
|
||||
}
|
||||
|
||||
// If we haven't transmitted a cluster (maybe cluster feature was
|
||||
// disabled or maybe we just can't produce an acceptable cluster):
|
||||
const G4double x = Random::shoot();
|
||||
|
||||
if(x <= transmissionProbability) { // Transmission
|
||||
return new TransmissionChannel(theNucleus, theParticle);
|
||||
} else { // Reflection
|
||||
return new ReflectionChannel(theNucleus, theParticle);
|
||||
}
|
||||
}
|
||||
|
||||
G4INCL::FinalState* SurfaceAvatar::getFinalState() const
|
||||
{
|
||||
return getChannel()->getFinalState();
|
||||
}
|
||||
|
||||
void SurfaceAvatar::preInteraction() {}
|
||||
FinalState *SurfaceAvatar::postInteraction(FinalState *fs) {
|
||||
ParticleList outgoing = fs->getOutgoingParticles();
|
||||
if(!outgoing.empty()) { // Transmission
|
||||
// assert(outgoing.size()==1);
|
||||
Particle *out = outgoing.front();
|
||||
if(out->isCluster()) {
|
||||
Cluster *clusterOut = dynamic_cast<Cluster*>(out);
|
||||
ParticleList const *components = clusterOut->getParticles();
|
||||
for(ParticleIter i=components->begin(); i!=components->end(); ++i) {
|
||||
if((*i)->isParticipant())
|
||||
theNucleus->getStore()->getBook()->decrementParticipants();
|
||||
}
|
||||
} else if(theParticle->isParticipant()) {
|
||||
// assert(out==theParticle);
|
||||
theNucleus->getStore()->getBook()->decrementParticipants();
|
||||
}
|
||||
}
|
||||
return fs;
|
||||
}
|
||||
|
||||
std::string SurfaceAvatar::dump() const {
|
||||
std::stringstream ss;
|
||||
ss << "(avatar " << theTime << " 'reflection" << std::endl
|
||||
<< "(list " << std::endl
|
||||
<< theParticle->dump()
|
||||
<< "))" << std::endl;
|
||||
return ss.str();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLTransmissionChannel.hh"
|
||||
|
||||
namespace G4INCL {
|
||||
|
||||
TransmissionChannel::TransmissionChannel(Nucleus *nucleus, Particle *particle)
|
||||
: theNucleus(nucleus), theParticle(particle)
|
||||
{}
|
||||
|
||||
TransmissionChannel::~TransmissionChannel() {}
|
||||
|
||||
FinalState* TransmissionChannel::getFinalState() {
|
||||
FinalState *fs = new FinalState;
|
||||
G4double initialEnergy = 0.0;
|
||||
if(theParticle->isCluster()) {
|
||||
Cluster *clusterOut = dynamic_cast<Cluster*>(theParticle);
|
||||
ParticleList const *components = clusterOut->getParticles();
|
||||
for(ParticleIter in = components->begin(); in != components->end(); ++in)
|
||||
initialEnergy += (*in)->getEnergy() - (*in)->getPotentialEnergy();
|
||||
} else {
|
||||
initialEnergy = theParticle->getEnergy() - theParticle->getPotentialEnergy();
|
||||
}
|
||||
fs->setTotalEnergyBeforeInteraction(initialEnergy);
|
||||
theNucleus->particleLeaves(theParticle);
|
||||
fs->addOutgoingParticle(theParticle); // We write the particle down as outgoing
|
||||
return fs;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4hadronic_inclxx_utils
|
||||
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4had_inclxx.G4hadronic_inclxx_utils
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: CMakeLists.txt,v 1.1 2010-09-29 18:56:53 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
# $Id: GNUmakefile,v 1.15 2010-09-23 05:02:14 mkelsey Exp $
|
||||
# -----------------------------------------------------------
|
||||
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
|
||||
#
|
||||
# Map user environment/GMake variables onto preprocessor debugging flags
|
||||
#
|
||||
# 20100922 J. Yarba -- Add include directories for pre-compound model
|
||||
# -----------------------------------------------------------
|
||||
|
||||
name := G4hadronic_inclxx_interface
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../../../..
|
||||
endif
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
CPPFLAGS += -DG4HADRONIC_ALLOC_EXPORT
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPNumerics/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/management/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/processes/include \
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/multifragmentation/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/fermi_breakup/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/photon_evaporation/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/management/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/handler/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/util/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/models/inclxx/incl_physics/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/inclxx/utils/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
-I$(G4BASE)/particles/hadrons/mesons/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/particles/shortlived/include \
|
||||
-I$(G4BASE)/materials/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLXXFactory_hh
|
||||
#define G4INCLXXFactory_hh 1
|
||||
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4HadProjectile.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
#include "G4INCLConfig.hh"
|
||||
#include "G4INCLCascade.hh"
|
||||
|
||||
/**
|
||||
* Build a new INCL++ instance with correct configuration and input information.
|
||||
*/
|
||||
class G4INCLXXFactory {
|
||||
public:
|
||||
/**
|
||||
* Convert G4ParticleDefinition to corresponding INCL particle type
|
||||
*/
|
||||
static G4INCL::ParticleType toINCLParticleType(const G4ParticleDefinition*);
|
||||
|
||||
/**
|
||||
* Convert INCL particle type to corresponding G4ParticleDefinition
|
||||
*/
|
||||
static const G4ParticleDefinition* fromINCLParticleType(G4INCL::ParticleType);
|
||||
|
||||
/**
|
||||
* Create INCL projectile particle
|
||||
*/
|
||||
static G4INCL::Particle* createProjectile(const G4HadProjectile &);
|
||||
|
||||
/**
|
||||
* Create the INCL model initialized with the target information
|
||||
*/
|
||||
static G4INCL::INCL* createModel(const G4Nucleus &);
|
||||
|
||||
static G4DynamicParticle* toG4Particle(G4int A, G4int Z , G4double kinE, G4double px, G4double py, G4double pz);
|
||||
|
||||
static G4ParticleDefinition* toG4ParticleDefinition (G4int A,
|
||||
G4int Z);
|
||||
|
||||
static G4double remnant4MomentumScaling(G4double mass,
|
||||
G4double kineticE,
|
||||
G4double px, G4double py, G4double pz);
|
||||
protected:
|
||||
G4INCLXXFactory() {};
|
||||
~G4INCLXXFactory() {};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INCLXXInterface_hh
|
||||
#define G4INCLXXInterface_hh 1
|
||||
|
||||
#include "G4Nucleon.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4HadronicInteraction.hh"
|
||||
#include "G4VIntraNuclearTransportModel.hh"
|
||||
#include "G4KineticTrackVector.hh"
|
||||
#include "G4FragmentVector.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
#include "G4ReactionProductVector.hh"
|
||||
#include "G4ReactionProduct.hh"
|
||||
|
||||
// INCL++
|
||||
#include "G4INCLCascade.hh"
|
||||
|
||||
// Geant4 de-excitation
|
||||
#include "G4ExcitationHandler.hh"
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* <h1>INCL G4intra-nuclear cascade with G4ExcitationHandler for de-excitation</h1>
|
||||
*
|
||||
* Interface for INCL. This G4interface handles basic hadron
|
||||
* bullet particles (protons, neutrons, pions).
|
||||
*
|
||||
* Example usage in case of protons:
|
||||
* @code
|
||||
* G4InclCascadeInterface* inclModel = new G4InclCascadeInterface;
|
||||
* inclModel -> SetMinEnergy(0.0 * MeV); // Set the energy limits
|
||||
* inclModel -> SetMaxEnergy(3.0 * GeV);
|
||||
*
|
||||
* G4ProtonInelasticProcess* protonInelasticProcess = new G4ProtonInelasticProcess();
|
||||
* G4ProtonInelasticCrossSection* protonInelasticCrossSection = new G4ProtonInelasticCrossSection();
|
||||
*
|
||||
* protonInelasticProcess -> RegisterMe(inclModel);
|
||||
* protonInelasticProcess -> AddDataSet(protonInelasticCrossSection);
|
||||
*
|
||||
* particle = G4Proton::Proton();
|
||||
* processManager = particle -> GetProcessManager();
|
||||
* processManager -> AddDiscreteProcess(protonInelasticProcess);
|
||||
* @endcode
|
||||
* The same setup procedure is needed for neutron and pion inelastic processes
|
||||
* as well.
|
||||
*
|
||||
* @see G4InclLightIonInterface
|
||||
*/
|
||||
class G4INCLXXInterface : public G4VIntraNuclearTransportModel {
|
||||
public:
|
||||
G4INCLXXInterface(const G4String& name = "INCL++ Cascade with G4ExcitationHandler");
|
||||
|
||||
G4int operator==(G4INCLXXInterface& right) {
|
||||
return (this == &right);
|
||||
}
|
||||
|
||||
G4int operator!=(G4INCLXXInterface& right) {
|
||||
return (this != &right);
|
||||
}
|
||||
|
||||
~G4INCLXXInterface(); // Destructor
|
||||
|
||||
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus); // Idle
|
||||
|
||||
/**
|
||||
* Main method to apply the INCL physics model.
|
||||
* @param aTrack the projectile particle
|
||||
* @param theNucleus target nucleus
|
||||
* @return the output of the INCL physics model
|
||||
*/
|
||||
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus);
|
||||
|
||||
private:
|
||||
G4INCL::INCL *theINCLModel;
|
||||
G4HadFinalState theResult;
|
||||
|
||||
G4ExcitationHandler *theExcitationHandler;
|
||||
G4bool storeDebugOutput;
|
||||
std::ofstream *debugOutputFile;
|
||||
G4bool dumpInput;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,77 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4hadronic_hetcpp_utils
|
||||
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4had_hetcpp.G4hadronic_hetcpp_utils
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake,v 1.1 2010-09-29 18:57:01 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/cross_sections/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4hadronic_inclxx_interface
|
||||
HEADERS
|
||||
G4INCLXXFactory.hh
|
||||
G4INCLXXInterface.hh
|
||||
SOURCES
|
||||
G4INCLXXFactory.cc
|
||||
G4INCLXXInterface.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4baryons
|
||||
G4bosons
|
||||
G4geometrymng
|
||||
G4globman
|
||||
G4hadronic_mgt
|
||||
G4hadronic_util
|
||||
G4hadronic_xsect
|
||||
G4ions
|
||||
G4leptons
|
||||
G4materials
|
||||
G4mesons
|
||||
G4partman
|
||||
G4procman
|
||||
G4track
|
||||
G4volumes
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4geometry
|
||||
G4global
|
||||
G4materials
|
||||
G4particles
|
||||
G4track
|
||||
LINK_LIBRARIES
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// INCL++ intra-nuclear cascade model
|
||||
// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
|
||||
// Davide Mancusi, CEA
|
||||
// Alain Boudard, CEA
|
||||
// Sylvie Leray, CEA
|
||||
// Joseph Cugnon, University of Liege
|
||||
//
|
||||
// INCL++ revision: v5.0_rc3
|
||||
//
|
||||
#define INCLXX_IN_GEANT4_MODE 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4INCLXXFactory.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
G4INCL::ParticleType G4INCLXXFactory::toINCLParticleType(const G4ParticleDefinition *pdef) {
|
||||
if( pdef == G4Proton::Proton()) return G4INCL::Proton;
|
||||
else if(pdef == G4Neutron::Neutron()) return G4INCL::Neutron;
|
||||
else if(pdef == G4PionPlus::PionPlus()) return G4INCL::PiPlus;
|
||||
else if(pdef == G4PionMinus::PionMinus()) return G4INCL::PiMinus;
|
||||
else if(pdef == G4PionZero::PionZero()) return G4INCL::PiZero;
|
||||
else return G4INCL::UnknownParticle;
|
||||
}
|
||||
|
||||
const G4ParticleDefinition* G4INCLXXFactory::fromINCLParticleType(G4INCL::ParticleType ptype) {
|
||||
if( ptype == G4INCL::Proton) return G4Proton::Proton();
|
||||
else if(ptype == G4INCL::Neutron) return G4Neutron::Neutron();
|
||||
else if(ptype == G4INCL::PiPlus) return G4PionPlus::PionPlus();
|
||||
else if(ptype == G4INCL::PiMinus) return G4PionMinus::PionMinus();
|
||||
else if(ptype == G4INCL::PiZero) return G4PionZero::PionZero();
|
||||
else if(ptype == G4INCL::UnknownParticle) return 0;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
G4INCL::Particle* G4INCLXXFactory::createProjectile(const G4HadProjectile &aTrack) {
|
||||
const G4ParticleDefinition *pdef = aTrack.GetDefinition();
|
||||
G4INCL::ParticleType projectileType = G4INCLXXFactory::toINCLParticleType(pdef);
|
||||
const G4double kineticEnergy = aTrack.GetKineticEnergy();
|
||||
const G4double mass = G4INCL::ParticleTable::getMass(projectileType);
|
||||
const G4double energy = kineticEnergy + mass;
|
||||
const G4double pz = std::sqrt(energy*energy - mass*mass);
|
||||
G4INCL::ThreeVector momentum(0.0, 0.0, pz);
|
||||
G4INCL::ThreeVector position(0.0, 0.0, 0.0); // Projectile position
|
||||
// doesn't actually
|
||||
// matter.
|
||||
|
||||
G4INCL::Particle *projectile = new G4INCL::Particle(projectileType, energy,
|
||||
momentum, position);
|
||||
return projectile;
|
||||
}
|
||||
|
||||
G4INCL::INCL* G4INCLXXFactory::createModel(const G4Nucleus &theNucleus) {
|
||||
G4int A = theNucleus.GetA_asInt();
|
||||
G4int Z = theNucleus.GetZ_asInt();
|
||||
G4INCL::Config *theConfig = new G4INCL::Config(A, Z, G4INCL::Proton, 1200.0);
|
||||
theConfig->setTargetA(A);
|
||||
theConfig->setTargetZ(Z);
|
||||
|
||||
G4INCL::INCL *theINCLModel = new G4INCL::INCL(theConfig);
|
||||
|
||||
return theINCLModel;
|
||||
}
|
||||
|
||||
G4ParticleDefinition* G4INCLXXFactory::toG4ParticleDefinition(G4int A,
|
||||
G4int Z) {
|
||||
if (A == 1 && Z == 1) return G4Proton::Proton();
|
||||
else if(A == 1 && Z == 0) return G4Neutron::Neutron();
|
||||
else if(A == 0 && Z == 1) return G4PionPlus::PionPlus();
|
||||
else if(A == 0 && Z == -1) return G4PionMinus::PionMinus();
|
||||
else if(A == 0 && Z == 0) return G4PionZero::PionZero();
|
||||
else if(A == 2 && Z == 1) return G4Deuteron::Deuteron();
|
||||
else if(A == 3 && Z == 1) return G4Triton::Triton();
|
||||
else if(A == 3 && Z == 2) return G4He3::He3();
|
||||
else if(A == 4 && Z == 2) return G4Alpha::Alpha();
|
||||
else if(A > 0 && Z > 0 && A > Z) { // Returns ground state ion definition
|
||||
return G4ParticleTable::GetParticleTable()->GetIon(Z, A, 0.0);
|
||||
} else { // Error, unrecognized particle
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
G4DynamicParticle* G4INCLXXFactory::toG4Particle(G4int A, G4int Z,
|
||||
G4double kinE,
|
||||
G4double px,
|
||||
G4double py, G4double pz) {
|
||||
const G4ParticleDefinition *def = toG4ParticleDefinition(A, Z);
|
||||
if(def == 0) { // Check if we have a valid particle definition
|
||||
return 0;
|
||||
}
|
||||
const G4double energy = kinE / MeV;
|
||||
const G4ThreeVector momentum(px, py, pz);
|
||||
const G4ThreeVector momentumDirection = momentum.unit();
|
||||
G4DynamicParticle *p = new G4DynamicParticle(def, momentumDirection, energy);
|
||||
return p;
|
||||
}
|
||||
|
||||
G4double G4INCLXXFactory::remnant4MomentumScaling(G4double mass,
|
||||
G4double kineticE,
|
||||
G4double px, G4double py,
|
||||
G4double pz) {
|
||||
const G4double p2 = px*px + py*py + pz*pz;
|
||||
if(p2 > 0.0) {
|
||||
const G4double pnew2 = kineticE*kineticE + 2.0*kineticE*mass;
|
||||
return std::sqrt(pnew2)/std::sqrt(p2);
|
||||
} else {
|
||||
return 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user