Import Geant4 9.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:46:55 +02:00
parent 89a9605df1
commit b1eb5424d2
10957 changed files with 888481 additions and 160139 deletions
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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_ */
@@ -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_ */
@@ -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
@@ -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 */
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 */
@@ -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 */
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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_ */
@@ -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_
@@ -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_ */
@@ -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