Import Geant4 10.1.0 source tree
This commit is contained in:
@@ -47,35 +47,52 @@ class G4HadFinalState
|
||||
public:
|
||||
G4HadFinalState();
|
||||
|
||||
G4int GetNumberOfSecondaries() const;
|
||||
inline
|
||||
G4int GetNumberOfSecondaries() const { return theSecs.size(); }
|
||||
void SetEnergyChange(G4double anEnergy);
|
||||
G4double GetEnergyChange() const;
|
||||
void SetMomentumChange(const G4ThreeVector& aV);
|
||||
void SetMomentumChange(G4double x, G4double y, G4double z) ;
|
||||
const G4ThreeVector& GetMomentumChange() const;
|
||||
void AddSecondary(G4DynamicParticle* aP);
|
||||
void AddSecondary(const G4HadSecondary& aHS) { theSecs.push_back(aHS); }
|
||||
void SetStatusChange(G4HadFinalStateStatus aS);
|
||||
G4HadFinalStateStatus GetStatusChange() const;
|
||||
inline
|
||||
G4double GetEnergyChange() const { return theEnergy; }
|
||||
inline
|
||||
void SetMomentumChange(const G4ThreeVector& aV){ theDirection=aV; }
|
||||
void SetMomentumChange(G4double x, G4double y, G4double z);
|
||||
inline
|
||||
const G4ThreeVector& GetMomentumChange() const { return theDirection; }
|
||||
inline
|
||||
void AddSecondary(G4DynamicParticle* aP, G4int mod=-1) {
|
||||
theSecs.push_back(G4HadSecondary(aP, theW, mod));
|
||||
};
|
||||
inline
|
||||
void AddSecondary(const G4HadSecondary& aHS) { theSecs.push_back(aHS); }
|
||||
inline
|
||||
void SetStatusChange(G4HadFinalStateStatus aS) { theStat=aS; }
|
||||
inline
|
||||
G4HadFinalStateStatus GetStatusChange() const { return theStat; }
|
||||
void Clear();
|
||||
const G4LorentzRotation& GetTrafoToLab() const;
|
||||
void SetTrafoToLab(const G4LorentzRotation & aT);
|
||||
void SetWeightChange(G4double aW);
|
||||
G4double GetWeightChange() const;
|
||||
inline
|
||||
const G4LorentzRotation& GetTrafoToLab() const { return theT; }
|
||||
inline
|
||||
void SetTrafoToLab(const G4LorentzRotation & aT) { theT = aT; }
|
||||
inline
|
||||
void SetWeightChange(G4double aW) { theW=aW; }
|
||||
inline
|
||||
G4double GetWeightChange() const { return theW; }
|
||||
G4HadSecondary* GetSecondary(size_t i);
|
||||
const G4HadSecondary* GetSecondary(size_t i) const;
|
||||
void SetLocalEnergyDeposit(G4double aE);
|
||||
G4double GetLocalEnergyDeposit() const;
|
||||
void SecondariesAreStale(); // Deprecated; not needed for values
|
||||
void ClearSecondaries();
|
||||
inline
|
||||
void SetLocalEnergyDeposit(G4double aE) { theEDep=aE; }
|
||||
inline
|
||||
G4double GetLocalEnergyDeposit() const { return theEDep;}
|
||||
// void SecondariesAreStale(); // Deprecated; not needed for values
|
||||
inline
|
||||
void ClearSecondaries() { theSecs.clear(); }
|
||||
|
||||
// Concatenate lists efficiently
|
||||
void AddSecondaries(const std::vector<G4HadSecondary>& addSecs);
|
||||
|
||||
inline
|
||||
void AddSecondaries(const G4HadFinalState& addHFS) {
|
||||
AddSecondaries(addHFS.theSecs);
|
||||
}
|
||||
|
||||
inline
|
||||
void AddSecondaries(const G4HadFinalState* addHFS) {
|
||||
if (addHFS) AddSecondaries(addHFS->theSecs);
|
||||
}
|
||||
|
||||
@@ -34,23 +34,28 @@ class G4DynamicParticle;
|
||||
|
||||
class G4HadSecondary
|
||||
{
|
||||
public:
|
||||
G4HadSecondary(G4DynamicParticle * aT, G4double aWeight = 1);
|
||||
G4DynamicParticle * GetParticle() {return theP;}
|
||||
const G4DynamicParticle* GetParticle() const {return theP;}
|
||||
G4double GetWeight() const {return theWeight;}
|
||||
void SetWeight(G4double aW){theWeight= aW;}
|
||||
void SetTime(G4double aT) {theTime = aT;}
|
||||
G4double GetTime() const {return theTime;}
|
||||
public:
|
||||
|
||||
G4HadSecondary(G4DynamicParticle * aT, G4double aWeight = 1, G4int mod=-1);
|
||||
~G4HadSecondary();
|
||||
|
||||
inline G4DynamicParticle * GetParticle() {return theP;}
|
||||
inline const G4DynamicParticle* GetParticle() const {return theP;}
|
||||
inline G4double GetWeight() const {return theWeight;}
|
||||
inline void SetWeight(G4double aW) {theWeight= aW;}
|
||||
inline void SetTime(G4double aT) {theTime = aT;}
|
||||
inline G4double GetTime() const {return theTime;}
|
||||
inline void SetCreatorModelType(G4int idx) {theCreatorModel = idx;}
|
||||
inline G4int GetCreatorModelType() const {return theCreatorModel;}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
G4HadSecondary(){};
|
||||
|
||||
G4DynamicParticle * theP;
|
||||
G4double theWeight;
|
||||
G4double theTime;
|
||||
G4int theCreatorModel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@ class G4HadSignalHandler
|
||||
|
||||
~G4HadSignalHandler();
|
||||
|
||||
static G4ThreadLocal std::vector<sighandler_t> *theCache_G4MT_TLS_;
|
||||
static G4ThreadLocal std::vector<sighandler_t> *theCache;
|
||||
static G4ThreadLocal bool registered;
|
||||
};
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class G4HadronicWhiteBoard
|
||||
|
||||
const G4HadProjectile* GetProjectile();
|
||||
const G4Nucleus& GetTargetNucleus();
|
||||
G4ParticleDefinition* GetPDef();
|
||||
const G4ParticleDefinition* GetPDef();
|
||||
G4String GetParticleName();
|
||||
G4double GetEnergy();
|
||||
G4double GetPx();
|
||||
@@ -61,10 +61,12 @@ class G4HadronicWhiteBoard
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4HadProjectile* theProjectile;
|
||||
G4ParticleDefinition* theDef;
|
||||
char* theName;
|
||||
|
||||
static G4ThreadLocal G4HadronicWhiteBoard *theInstance;
|
||||
|
||||
const G4HadProjectile* theProjectile;
|
||||
const G4ParticleDefinition* theDef;
|
||||
const char* theName;
|
||||
G4double theE;
|
||||
G4double thePx;
|
||||
G4double thePy;
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// Hadronic Process: Reaction Dynamics
|
||||
// original by H.P. Wellisch
|
||||
// Modified by J.L.Chuma 19-Nov-96
|
||||
// Modified by J.L.Chuma 27-Mar-97
|
||||
// Modified by J.L.Chuma 30-Apr-97
|
||||
// Modified by J.L.Chuma 06-Aug-97 to include the original incident particle
|
||||
// before Fermi motion and evaporation effects
|
||||
|
||||
#ifndef G4ReactionDynamics_h
|
||||
#define G4ReactionDynamics_h 1
|
||||
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4ReactionProduct.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4FastVector.hh"
|
||||
#include "G4HadProjectile.hh"
|
||||
|
||||
enum{ GHADLISTSIZE=256};
|
||||
|
||||
class G4ReactionDynamics
|
||||
{
|
||||
public:
|
||||
|
||||
G4ReactionDynamics() {}
|
||||
|
||||
virtual ~G4ReactionDynamics() {}
|
||||
|
||||
virtual G4double FindInelasticity()
|
||||
{ return 0.0; }
|
||||
|
||||
virtual G4double FindTimeDelay()
|
||||
{ return 0.0; }
|
||||
|
||||
G4bool GenerateXandPt( // derived from GENXPT
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen,
|
||||
G4ReactionProduct &modifiedOriginal, // Fermi motion & evap. effect included
|
||||
const G4HadProjectile *originalIncident,
|
||||
G4ReactionProduct ¤tParticle,
|
||||
G4ReactionProduct &targetParticle,
|
||||
const G4DynamicParticle* originalTarget,
|
||||
const G4Nucleus &targetNucleus,
|
||||
G4bool &incidentHasChanged,
|
||||
G4bool &targetHasChanged,
|
||||
G4bool leadFlag,
|
||||
G4ReactionProduct &leadingStrangeParticle );
|
||||
|
||||
void SuppressChargedPions(
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen,
|
||||
const G4ReactionProduct &modifiedOriginal,
|
||||
G4ReactionProduct ¤tParticle,
|
||||
G4ReactionProduct &targetParticle,
|
||||
const G4Nucleus &targetNucleus,
|
||||
G4bool &incidentHasChanged,
|
||||
G4bool &targetHasChanged );
|
||||
|
||||
G4bool TwoCluster( // derived from TWOCLU
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen,
|
||||
G4ReactionProduct &modifiedOriginal, // Fermi motion & evap. effect included
|
||||
const G4HadProjectile *originalIncident,
|
||||
G4ReactionProduct ¤tParticle,
|
||||
G4ReactionProduct &targetParticle,
|
||||
const G4DynamicParticle* originalTarget,
|
||||
const G4Nucleus &targetNucleus,
|
||||
G4bool &incidentHasChanged,
|
||||
G4bool &targetHasChanged,
|
||||
G4bool leadFlag,
|
||||
G4ReactionProduct &leadingStrangeParticle );
|
||||
|
||||
void TwoBody( // derived from TWOB
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen,
|
||||
G4ReactionProduct &modifiedOriginal,
|
||||
const G4DynamicParticle *originalTarget,
|
||||
G4ReactionProduct ¤tParticle,
|
||||
G4ReactionProduct &targetParticle,
|
||||
const G4Nucleus &targetNucleus,
|
||||
G4bool &targetHasChanged );
|
||||
|
||||
G4int Factorial( G4int n );
|
||||
|
||||
G4double GenerateNBodyEvent( // derived from PHASP
|
||||
const G4double totalEnergy,
|
||||
const G4bool constantCrossSection,
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen );
|
||||
|
||||
void ProduceStrangeParticlePairs(
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen,
|
||||
const G4ReactionProduct &modifiedOriginal,
|
||||
const G4DynamicParticle *originalTarget,
|
||||
G4ReactionProduct ¤tParticle,
|
||||
G4ReactionProduct &targetParticle,
|
||||
G4bool &incidentHasChanged,
|
||||
G4bool &targetHasChanged );
|
||||
|
||||
void NuclearReaction( // derived from NUCREC
|
||||
G4FastVector<G4ReactionProduct,4> &vec,
|
||||
G4int &vecLen,
|
||||
const G4HadProjectile *originalIncident,
|
||||
const G4Nucleus &aNucleus,
|
||||
const G4double theAtomicMass,
|
||||
const G4double *massVec );
|
||||
|
||||
private:
|
||||
|
||||
void Rotate(
|
||||
const G4double numberofFinalStateNucleons,
|
||||
const G4ThreeVector &temp,
|
||||
const G4ReactionProduct &modifiedOriginal, // Fermi motion & evap. effect included
|
||||
const G4HadProjectile *originalIncident,
|
||||
const G4Nucleus &targetNucleus,
|
||||
G4ReactionProduct ¤tParticle,
|
||||
G4ReactionProduct &targetParticle,
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen );
|
||||
|
||||
void Defs1(
|
||||
const G4ReactionProduct &modifiedOriginal,
|
||||
G4ReactionProduct ¤tParticle,
|
||||
G4ReactionProduct &targetParticle,
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen );
|
||||
|
||||
void AddBlackTrackParticles(
|
||||
const G4double epnb,
|
||||
const G4int npnb,
|
||||
const G4double edta,
|
||||
const G4int ndta,
|
||||
const G4double sprob,
|
||||
const G4double kineticMinimum,
|
||||
const G4double kineticFactor,
|
||||
const G4ReactionProduct &modifiedOriginal,
|
||||
G4int PinNucleus,
|
||||
G4int NinNucleus,
|
||||
const G4Nucleus &aNucleus,
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen );
|
||||
|
||||
std::pair<G4int, G4int> GetFinalStateNucleons(
|
||||
const G4DynamicParticle* originalTarget,
|
||||
const G4FastVector<G4ReactionProduct,GHADLISTSIZE>& vec,
|
||||
const G4int& vecLen );
|
||||
|
||||
void MomentumCheck(
|
||||
const G4ReactionProduct &modifiedOriginal,
|
||||
G4ReactionProduct ¤tParticle,
|
||||
G4ReactionProduct &targetParticle,
|
||||
G4FastVector<G4ReactionProduct,GHADLISTSIZE> &vec,
|
||||
G4int &vecLen );
|
||||
|
||||
G4double normal();
|
||||
|
||||
G4int Poisson( G4double x );
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file --- Copyright CERN 1995
|
||||
// CERN Geneva Switzerland
|
||||
//
|
||||
// ------------ G4ReactionDynamics::TwoBody ------
|
||||
// new inline method BreakupMomentum
|
||||
// new method TwoBodyScattering
|
||||
// by Christian V"olcker (CERN-Munich), August 1997
|
||||
// E-mail: Christian.Volcker@cern.ch
|
||||
// ************************************************************
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef G4ReactionKinematics_h
|
||||
#define G4ReactionKinematics_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VRestProcess.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
|
||||
class G4ReactionKinematics {
|
||||
public:
|
||||
void TwoBodyScattering( const G4DynamicParticle* pIn1, const G4DynamicParticle* pIn2,
|
||||
G4DynamicParticle* pOut1, G4DynamicParticle* pOut2);
|
||||
|
||||
inline G4double BreakupMomentum( G4double totalMass, G4double m1, G4double m2);
|
||||
|
||||
};
|
||||
|
||||
inline G4double G4ReactionKinematics::BreakupMomentum(
|
||||
G4double totalMass, G4double massA, G4double massB){
|
||||
|
||||
// is aequivalent to G4double G4PhaseSpaceDecayChannel::Pmx !!
|
||||
|
||||
G4double m0squared=totalMass*totalMass;
|
||||
G4double breakupMomentumSquared=
|
||||
(m0squared-(massA+massB)*(massA+massB))*
|
||||
(m0squared-(massA-massB)*(massA-massB))/
|
||||
(4*m0squared);
|
||||
if (breakupMomentumSquared>0) return std::sqrt(breakupMomentumSquared);
|
||||
else return -1.;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -40,12 +40,14 @@
|
||||
#include "G4HadProjectile.hh"
|
||||
#include "G4HadronicException.hh"
|
||||
|
||||
// To support better memory management and reduced fragmentation
|
||||
class G4ReactionProduct;
|
||||
|
||||
// To support better memory management and reduced fragmentation
|
||||
//
|
||||
#if defined G4HADRONIC_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4ThreadLocal G4Allocator<G4ReactionProduct> *aRPAllocator_G4MT_TLS_;
|
||||
extern G4DLLEXPORT G4ThreadLocal G4Allocator<G4ReactionProduct> *aRPAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4ThreadLocal G4Allocator<G4ReactionProduct> *aRPAllocator_G4MT_TLS_;
|
||||
extern G4DLLIMPORT G4ThreadLocal G4Allocator<G4ReactionProduct> *aRPAllocator;
|
||||
#endif
|
||||
|
||||
class G4ReactionProduct
|
||||
@@ -58,7 +60,7 @@ class G4ReactionProduct
|
||||
|
||||
friend G4ReactionProduct operator*(
|
||||
const G4double aDouble, const G4ReactionProduct &p2 )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ;
|
||||
{
|
||||
G4ReactionProduct result;
|
||||
result.SetMomentum(aDouble*p2.GetMomentum());
|
||||
result.SetMass(p2.GetMass());
|
||||
@@ -70,23 +72,24 @@ class G4ReactionProduct
|
||||
public:
|
||||
G4ReactionProduct();
|
||||
|
||||
G4ReactionProduct( G4ParticleDefinition *aParticleDefinition );
|
||||
G4ReactionProduct(const G4ParticleDefinition *aParticleDefinition );
|
||||
|
||||
~G4ReactionProduct() { if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ;}
|
||||
~G4ReactionProduct() {}
|
||||
|
||||
G4ReactionProduct( const G4ReactionProduct &right );
|
||||
|
||||
// Override new and delete for use with G4Allocator
|
||||
inline void* operator new(size_t) { ;;; if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; G4Allocator<G4ReactionProduct> &aRPAllocator = *aRPAllocator_G4MT_TLS_; ;;;
|
||||
return (void *)aRPAllocator.MallocSingle();
|
||||
inline void* operator new(size_t) {
|
||||
if (!aRPAllocator) aRPAllocator = new G4Allocator<G4ReactionProduct> ;
|
||||
return (void *)aRPAllocator->MallocSingle();
|
||||
}
|
||||
#ifdef __IBMCPP__
|
||||
inline void* operator new(size_t, void *p) { ;;; if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; G4Allocator<G4ReactionProduct> &aRPAllocator = *aRPAllocator_G4MT_TLS_; ;;;
|
||||
inline void* operator new(size_t, void *p) {
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
inline void operator delete(void* aReactionProduct) { ;;; if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; G4Allocator<G4ReactionProduct> &aRPAllocator = *aRPAllocator_G4MT_TLS_; ;;;
|
||||
aRPAllocator.FreeSingle((G4ReactionProduct*)aReactionProduct);
|
||||
inline void operator delete(void* aReactionProduct) {
|
||||
aRPAllocator->FreeSingle((G4ReactionProduct*)aReactionProduct);
|
||||
}
|
||||
|
||||
G4ReactionProduct &operator= ( const G4ReactionProduct &right );
|
||||
@@ -96,17 +99,17 @@ class G4ReactionProduct
|
||||
G4ReactionProduct &operator= ( const G4HadProjectile &right );
|
||||
|
||||
inline G4bool operator== ( const G4ReactionProduct &right ) const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return ( this == (G4ReactionProduct*) &right ); }
|
||||
{ return ( this == (G4ReactionProduct*) &right ); }
|
||||
|
||||
inline G4bool operator!= ( const G4ReactionProduct &right ) const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return ( this != (G4ReactionProduct*) &right ); }
|
||||
{ return ( this != (G4ReactionProduct*) &right ); }
|
||||
|
||||
inline G4ParticleDefinition *GetDefinition() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return theParticleDefinition; }
|
||||
|
||||
void SetDefinition( G4ParticleDefinition *aParticleDefinition );
|
||||
inline const G4ParticleDefinition* GetDefinition() const
|
||||
{ return theParticleDefinition; }
|
||||
|
||||
void SetDefinition(const G4ParticleDefinition* aParticleDefinition );
|
||||
|
||||
void SetDefinitionAndUpdateE( G4ParticleDefinition *aParticleDefinition );
|
||||
void SetDefinitionAndUpdateE(const G4ParticleDefinition* aParticleDefinition );
|
||||
|
||||
void SetMomentum( const G4double x, const G4double y, const G4double z );
|
||||
|
||||
@@ -115,61 +118,67 @@ class G4ReactionProduct
|
||||
void SetMomentum( const G4double z );
|
||||
|
||||
inline void SetMomentum( const G4ThreeVector &mom )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; momentum = mom; }
|
||||
{ momentum = mom; }
|
||||
|
||||
inline G4ThreeVector GetMomentum() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return momentum; }
|
||||
{ return momentum; }
|
||||
|
||||
inline G4double GetTotalMomentum() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return std::sqrt(std::abs(kineticEnergy*(totalEnergy+mass))); }
|
||||
{ return std::sqrt(std::abs(kineticEnergy*(totalEnergy+mass))); }
|
||||
|
||||
inline G4double GetTotalEnergy() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return totalEnergy; }
|
||||
{ return totalEnergy; }
|
||||
|
||||
inline void SetKineticEnergy( const G4double en )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ;
|
||||
{
|
||||
kineticEnergy = en;
|
||||
totalEnergy = kineticEnergy + mass;
|
||||
}
|
||||
|
||||
inline G4double GetKineticEnergy() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return kineticEnergy; }
|
||||
{ return kineticEnergy; }
|
||||
|
||||
inline void SetTotalEnergy( const G4double en )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ;
|
||||
{
|
||||
totalEnergy = en;
|
||||
kineticEnergy = totalEnergy - mass;
|
||||
}
|
||||
|
||||
inline void SetMass( const G4double mas )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; mass = mas; }
|
||||
{ mass = mas; }
|
||||
|
||||
inline G4double GetMass() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return mass; }
|
||||
{ return mass; }
|
||||
|
||||
inline void SetTOF( const G4double t )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; timeOfFlight = t; }
|
||||
{ timeOfFlight = t; }
|
||||
|
||||
inline G4double GetTOF() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return timeOfFlight; }
|
||||
{ return timeOfFlight; }
|
||||
|
||||
inline void SetSide( const G4int sid )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; side = sid; }
|
||||
{ side = sid; }
|
||||
|
||||
inline G4int GetSide() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return side; }
|
||||
{ return side; }
|
||||
|
||||
inline void SetCreatorModel( const G4int mod )
|
||||
{ theCreatorModel = mod; }
|
||||
|
||||
inline G4int GetCreatorModel() const
|
||||
{ return theCreatorModel; }
|
||||
|
||||
inline void SetNewlyAdded( const G4bool f )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; NewlyAdded = f; }
|
||||
{ NewlyAdded = f; }
|
||||
|
||||
inline G4bool GetNewlyAdded() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return NewlyAdded; }
|
||||
{ return NewlyAdded; }
|
||||
|
||||
inline void SetMayBeKilled( const G4bool f )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; MayBeKilled = f; }
|
||||
{ MayBeKilled = f; }
|
||||
|
||||
inline G4bool GetMayBeKilled() const
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return MayBeKilled; }
|
||||
{ return MayBeKilled; }
|
||||
|
||||
void SetZero();
|
||||
|
||||
@@ -178,38 +187,33 @@ class G4ReactionProduct
|
||||
G4double Angle( const G4ReactionProduct &p ) const;
|
||||
|
||||
inline void SetPositionInNucleus(G4double x, G4double y, G4double z)
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ;
|
||||
{
|
||||
positionInNucleus.setX(x);
|
||||
positionInNucleus.setY(y);
|
||||
positionInNucleus.setZ(z);
|
||||
}
|
||||
|
||||
inline void SetPositionInNucleus( G4ThreeVector & aPosition )
|
||||
{ if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ;
|
||||
{
|
||||
positionInNucleus = aPosition;
|
||||
}
|
||||
|
||||
inline G4ThreeVector GetPositionInNucleus() const { if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ;return positionInNucleus; }
|
||||
inline G4double GetXPositionInNucleus() const { if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return positionInNucleus.x(); }
|
||||
inline G4double GetYPositionInNucleus() const { if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return positionInNucleus.y(); }
|
||||
inline G4double GetZPositionInNucleus() const { if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return positionInNucleus.z(); }
|
||||
inline G4ThreeVector GetPositionInNucleus() const { return positionInNucleus; }
|
||||
inline G4double GetXPositionInNucleus() const { return positionInNucleus.x(); }
|
||||
inline G4double GetYPositionInNucleus() const { return positionInNucleus.y(); }
|
||||
inline G4double GetZPositionInNucleus() const { return positionInNucleus.z(); }
|
||||
|
||||
inline void SetFormationTime(G4double aTime) { if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; formationTime = aTime; }
|
||||
inline void SetFormationTime(G4double aTime) { formationTime = aTime; }
|
||||
|
||||
inline G4double GetFormationTime() const { if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return formationTime; }
|
||||
inline G4double GetFormationTime() const { return formationTime; }
|
||||
|
||||
inline void HasInitialStateParton(G4bool aFlag) { if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; hasInitialStateParton = aFlag; }
|
||||
inline void HasInitialStateParton(G4bool aFlag) { hasInitialStateParton = aFlag; }
|
||||
|
||||
inline G4bool HasInitialStateParton() const { if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; return hasInitialStateParton; }
|
||||
inline G4bool HasInitialStateParton() const { return hasInitialStateParton; }
|
||||
|
||||
#ifdef PRECOMPOUND_TEST
|
||||
void SetCreatorModel(const G4String& aModel) { ;;; if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; G4Allocator<G4ReactionProduct> &aRPAllocator = *aRPAllocator_G4MT_TLS_; ;;; theCreatorModel = aModel; }
|
||||
G4String GetCreatorModel() const { ;;; if (!aRPAllocator_G4MT_TLS_) aRPAllocator_G4MT_TLS_ = new G4Allocator<G4ReactionProduct> ; G4Allocator<G4ReactionProduct> &aRPAllocator = *aRPAllocator_G4MT_TLS_; ;;; return theCreatorModel; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
G4ParticleDefinition *theParticleDefinition;
|
||||
const G4ParticleDefinition *theParticleDefinition;
|
||||
|
||||
// for use with string models and cascade.
|
||||
G4ThreeVector positionInNucleus;
|
||||
@@ -231,14 +235,12 @@ class G4ReactionProduct
|
||||
// forward (+) and backward (-) hemispheres in the center of mass system
|
||||
G4int side;
|
||||
|
||||
G4int theCreatorModel;
|
||||
|
||||
// NewlyAdded refers to particles added by "nuclear excitation", or as
|
||||
// "black track" particles, or as deuterons, tritons, and alphas
|
||||
G4bool NewlyAdded;
|
||||
G4bool MayBeKilled;
|
||||
|
||||
#ifdef PRECOMPOUND_TEST
|
||||
G4String theCreatorModel;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user