Import Geant4 6.0.0 source tree
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# $Id: GNUmakefile,v 1.4 2003/11/26 09:19:20 gcosmo Exp $
|
||||
# -----------------------------------------------------------
|
||||
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
|
||||
# -----------------------------------------------------------
|
||||
|
||||
name := G4hadronic_binary
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../../..
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPNumerics/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/geometry/magneticfield/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/management/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/processes/include \
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/im_r_matrix/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/fermi_breakup/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/photon_evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/multifragmentation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/handler/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
-I$(G4BASE)/particles/hadrons/mesons/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/particles/shortlived/include \
|
||||
-I$(G4BASE)/materials/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
13-june-03: Gunter
|
||||
Tag: binary_cascade_ion_baseline_01
|
||||
Can run >= 10k light ions, spectator peak clear. Requires generator/util with
|
||||
this tag.
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4Absorber_hh
|
||||
#define G4Absorber_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4KineticTrackVector.hh"
|
||||
|
||||
class G4KineticTrack;
|
||||
|
||||
class G4Absorber
|
||||
{
|
||||
public:
|
||||
G4Absorber(G4double cutOnP);
|
||||
~G4Absorber();
|
||||
|
||||
G4bool WillBeAbsorbed(const G4KineticTrack & kt);
|
||||
G4bool Absorb(G4KineticTrack & kt, G4KineticTrackVector & tgt);
|
||||
G4KineticTrackVector * GetAbsorbers();
|
||||
G4KineticTrackVector * GetProducts();
|
||||
G4bool FindAbsorbers(G4KineticTrack & kt, G4KineticTrackVector & tgt);
|
||||
G4bool FindProducts(G4KineticTrack & kt);
|
||||
|
||||
|
||||
private:
|
||||
G4double theCutOnP;
|
||||
G4KineticTrackVector * theAbsorbers;
|
||||
G4KineticTrackVector * theProducts;
|
||||
|
||||
G4ThreeVector GetRandomDirection();
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
inline G4KineticTrackVector * G4Absorber::GetAbsorbers()
|
||||
{
|
||||
return theAbsorbers;
|
||||
}
|
||||
|
||||
inline G4KineticTrackVector * G4Absorber::GetProducts()
|
||||
{
|
||||
return theProducts;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4AntiProtonField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4AntiProtonField_h
|
||||
#define G4AntiProtonField_h 1
|
||||
|
||||
//#include "globals.hh"
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
class G4AntiProtonField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4AntiProtonField(G4V3DNucleus * nucleus, G4double coeff = 1.53*fermi);
|
||||
virtual ~G4AntiProtonField();
|
||||
|
||||
private:
|
||||
G4AntiProtonField(const G4AntiProtonField &right);
|
||||
const G4AntiProtonField & operator=(const G4AntiProtonField & right);
|
||||
int operator==(const G4AntiProtonField & right) const;
|
||||
int operator!=(const G4AntiProtonField & right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4BinaryCascade.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 8 June 2000
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#ifndef G4BinaryCascade_hh
|
||||
#define G4BinaryCascade_hh
|
||||
|
||||
#include "G4VIntraNuclearTransportModel.hh"
|
||||
#include "G4ReactionProductVector.hh"
|
||||
#include "G4KineticTrackVector.hh"
|
||||
#include "G4ListOfCollisions.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
#include "G4Fancy3DNucleus.hh"
|
||||
#include "G4Fragment.hh"
|
||||
#include "G4VFieldPropagation.hh"
|
||||
#include "G4VScatterer.hh"
|
||||
#include "G4LorentzVector.hh"
|
||||
#include "G4LorentzRotation.hh"
|
||||
|
||||
#include "G4BCDecay.hh"
|
||||
#include "G4BCAction.hh"
|
||||
|
||||
class G4CollisionManager;
|
||||
|
||||
class G4Track;
|
||||
class G4KineticTrack;
|
||||
class G43DNucleus;
|
||||
|
||||
class G4BinaryCascade : public G4VIntraNuclearTransportModel
|
||||
{
|
||||
public:
|
||||
|
||||
G4BinaryCascade();
|
||||
G4BinaryCascade(const G4BinaryCascade & right);
|
||||
|
||||
virtual ~G4BinaryCascade();
|
||||
|
||||
const G4BinaryCascade& operator=(G4BinaryCascade & right);
|
||||
G4int operator==(G4BinaryCascade& right) {return (this == &right);}
|
||||
G4int operator!=(G4BinaryCascade& right) {return (this != &right);}
|
||||
|
||||
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
|
||||
G4Nucleus& theNucleus);
|
||||
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector * secondaries,
|
||||
G4V3DNucleus * nucleus);
|
||||
|
||||
private:
|
||||
|
||||
G4int GetTotalCharge(std::vector<G4KineticTrack *> & aV)
|
||||
{
|
||||
G4int result = 0;
|
||||
std::vector<G4KineticTrack *>::iterator i;
|
||||
for(i = aV.begin(); i != aV.end(); ++i)
|
||||
{
|
||||
if((*i)->GetDefinition() == G4Proton::Proton())
|
||||
{
|
||||
++result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
void PrintWelcomeMessage();
|
||||
void BuildTargetList();
|
||||
void FindCollisions(G4KineticTrackVector * secondaries);
|
||||
G4bool ApplyCollision(G4CollisionInitialState * collision);
|
||||
G4bool Capture(G4bool verbose=false);
|
||||
G4bool Absorb();
|
||||
G4bool CheckPauliPrinciple(G4KineticTrackVector * products);
|
||||
G4double GetExcitationEnergy();
|
||||
G4bool CheckDecay(G4KineticTrackVector * products);
|
||||
void CorrectFinalPandE();
|
||||
void UpdateTracksAndCollisions(G4KineticTrackVector * oldSecondaries,
|
||||
G4KineticTrackVector * oldTarget,
|
||||
G4KineticTrackVector * newSecondaries);
|
||||
G4bool DoTimeStep(G4double timeStep);
|
||||
G4KineticTrackVector* CorrectBarionsOnBoundary(G4KineticTrackVector *in,
|
||||
G4KineticTrackVector *out);
|
||||
G4Fragment * FindFragments();
|
||||
void StepParticlesOut();
|
||||
G4LorentzVector GetFinal4Momentum();
|
||||
G4LorentzVector GetFinalNucleusMomentum();
|
||||
G4ReactionProductVector * Propagate1H1(G4KineticTrackVector * secondaries,
|
||||
G4V3DNucleus * nucleus);
|
||||
G4double GetIonMass(G4int Z, G4int A);
|
||||
|
||||
// utility methods
|
||||
G4ThreeVector GetSpherePoint(G4double r, const G4LorentzVector & momentumdirection);
|
||||
void ClearAndDestroy(G4KineticTrackVector * ktv);
|
||||
void ClearAndDestroy(G4ReactionProductVector * rpv);
|
||||
|
||||
// for debugging purpose
|
||||
void PrintKTVector(G4KineticTrackVector * ktv, std::string comment=std::string(""));
|
||||
|
||||
private:
|
||||
G4KineticTrackVector theProjectileList;
|
||||
G4KineticTrackVector theTargetList;
|
||||
G4KineticTrackVector theSecondaryList;
|
||||
G4KineticTrackVector theCapturedList;
|
||||
G4KineticTrackVector theFinalState;
|
||||
|
||||
G4ExcitationHandler * theExcitationHandler;
|
||||
G4CollisionManager * theCollisionMgr;
|
||||
|
||||
std::vector<G4BCAction *> theImR;
|
||||
G4VFieldPropagation * thePropagator;
|
||||
G4double theCurrentTime;
|
||||
G4double theCutOnP;
|
||||
G4double theCutOnPAbsorb;
|
||||
G4LorentzVector theInitial4Mom;
|
||||
G4int currentA, currentZ;
|
||||
G4double massInNucleus;
|
||||
G4LorentzRotation precompoundLorentzboost;
|
||||
G4double theOuterRadius;
|
||||
G4bool thePrimaryEscape;
|
||||
G4ParticleDefinition * thePrimaryType;
|
||||
G4ThreeVector theMomentumTransfer;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4BinaryLightIonReaction_h
|
||||
#define G4BinaryLightIonReaction_h
|
||||
|
||||
#include "G4BinaryCascade.hh"
|
||||
#include "G4PreCompoundModel.hh"
|
||||
#include "G4HadFinalState.hh"
|
||||
#include "G4ExcitationHandler.hh"
|
||||
|
||||
class G4BinaryLightIonReaction : public G4HadronicInteraction
|
||||
{
|
||||
public:
|
||||
G4BinaryLightIonReaction();
|
||||
virtual ~G4BinaryLightIonReaction(){}
|
||||
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
|
||||
G4Nucleus& theNucleus);
|
||||
|
||||
private:
|
||||
G4BinaryCascade theModel;
|
||||
G4ExcitationHandler theHandler;
|
||||
G4PreCompoundModel theProjectileFragmentation;
|
||||
G4HadFinalState theResult;
|
||||
G4bool EnergyAndMomentumCorrector(G4ReactionProductVector* products,
|
||||
G4LorentzVector& TotalCollisionMom);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4FieldPropagation_h
|
||||
#define G4FieldPropagation_h 1
|
||||
|
||||
#include "G4KineticTrackVector.hh"
|
||||
|
||||
class G4FieldPropagation
|
||||
{
|
||||
public:
|
||||
G4FieldPropagation() {}
|
||||
G4FieldPropagation(const G4FieldPropagation &) {}
|
||||
|
||||
virtual ~G4FieldPropagation() {}
|
||||
|
||||
// Operators
|
||||
const G4FieldPropagation & operator=(const G4FieldPropagation &right);
|
||||
|
||||
int operator==(const G4FieldPropagation &right) const;
|
||||
int operator!=(const G4FieldPropagation &right) const;
|
||||
|
||||
// Methods
|
||||
|
||||
// only theActive are propagated, nothing else
|
||||
// only theSpectators define the field, nothing else
|
||||
virtual void Transport(G4KineticTrackVector &theActive, const G4KineticTrackVector &theSpectators, G4double theTimeStep) = 0;
|
||||
|
||||
virtual G4double GetExcitationEnergy(G4int nHit, const G4KineticTrackVector &theParticles) = 0;
|
||||
|
||||
// methods for calculating potentials for different types of particles
|
||||
virtual void Init(G4int z, G4int a) = 0; // prepare potentials' functions
|
||||
|
||||
// aPosition is relative to the nucleus center
|
||||
virtual G4double GetNeutronPotential(G4double radius) = 0;
|
||||
virtual G4double GetNeutronPotential(G4ThreeVector &aPosition) = 0;
|
||||
|
||||
virtual G4double GetProtonPotential(G4double radius) = 0;
|
||||
virtual G4double GetProtonPotential(G4ThreeVector &aPosition) = 0;
|
||||
|
||||
virtual G4double GetAntiprotonPotential(G4double radius) = 0;
|
||||
virtual G4double GetAntiprotonPotential(G4ThreeVector &aPosition) = 0;
|
||||
|
||||
virtual G4double GetKaonPotential(G4double radius) = 0;
|
||||
virtual G4double GetKaonPotential(G4ThreeVector &aPosition) = 0;
|
||||
|
||||
virtual G4double GetPionPotential(G4double radius) = 0;
|
||||
virtual G4double GetPionPotential(G4ThreeVector &aPosition) = 0;
|
||||
};
|
||||
|
||||
#endif // G4FieldPropagation_h
|
||||
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
#ifndef G4GeneratorPrecompoundInterface_h
|
||||
#define G4GeneratorPrecompoundInterface_h 1
|
||||
|
||||
#include "G4Fancy3DNucleus.hh"
|
||||
#include "G4Nucleon.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4VIntraNuclearTransportModel.hh"
|
||||
#include "G4KineticTrackVector.hh"
|
||||
#include "G4FragmentVector.hh"
|
||||
#include "G4ReactionProductVector.hh"
|
||||
#include "G4ReactionProduct.hh"
|
||||
|
||||
// Class Description
|
||||
// Trivial implementation of an intra-nuclear transport. It pworvides coupling
|
||||
// of high energy generators with pre equilibrium decay models.
|
||||
// To be used in your physics list in case you need this physics.
|
||||
// Class Description - End
|
||||
|
||||
class G4GeneratorPrecompoundInterface : public G4VIntraNuclearTransportModel
|
||||
{
|
||||
public:
|
||||
G4GeneratorPrecompoundInterface(){}
|
||||
~G4GeneratorPrecompoundInterface(){}
|
||||
|
||||
private:
|
||||
G4int operator==(G4GeneratorPrecompoundInterface& right) {return (this == &right);}
|
||||
G4int operator!=(G4GeneratorPrecompoundInterface& right) {return (this != &right);}
|
||||
|
||||
public:
|
||||
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus );
|
||||
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
|
||||
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif // G4GeneratorPrecompoundInterface_h
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KM_DummyField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4KM_DummyField_hh
|
||||
#define G4KM_DummyField_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4MagneticField.hh"
|
||||
|
||||
class G4KM_DummyField : public G4MagneticField
|
||||
{
|
||||
public:
|
||||
|
||||
G4KM_DummyField() { }
|
||||
~G4KM_DummyField() { }
|
||||
|
||||
virtual void GetFieldValue(const G4double [], G4double * ) const { }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KM_NucleonEqRhs.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4KM_NucleonEqRhs_hh
|
||||
#define G4KM_NucleonEqRhs_hh
|
||||
|
||||
#include "globals.hh"
|
||||
//#include "G4EquationOfMotion.hh"
|
||||
#include "G4Mag_EqRhs.hh"
|
||||
#include "G4KM_DummyField.hh" // needed by G4Mag_EqRhs constructor.
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
//class G4KM_NucleonEqRhs : public G4EquationOfMotion // I'd like
|
||||
class G4KM_NucleonEqRhs : public G4Mag_EqRhs
|
||||
{
|
||||
|
||||
public:
|
||||
G4KM_NucleonEqRhs(G4KM_DummyField *field, G4V3DNucleus * nucleus);
|
||||
~G4KM_NucleonEqRhs();
|
||||
|
||||
virtual void EvaluateRhsGivenB(const G4double y[], const G4double B[3],
|
||||
G4double dydx[]) const;
|
||||
virtual void SetChargeMomentumMass(G4double particleCharge,
|
||||
G4double MomentumXc,
|
||||
G4double MassXc2);
|
||||
void SetMass(G4double aMass);
|
||||
|
||||
private:
|
||||
|
||||
// use G4VKM_NuclearDensity as it needs a GetDeriv() method.
|
||||
G4V3DNucleus * theNucleus;
|
||||
G4double factor;
|
||||
G4int A;
|
||||
G4double theMass;
|
||||
};
|
||||
|
||||
|
||||
|
||||
inline void G4KM_NucleonEqRhs::SetMass(G4double aMass)
|
||||
{
|
||||
theMass = aMass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline G4KM_NucleonEqRhs::~G4KM_NucleonEqRhs()
|
||||
{ }
|
||||
|
||||
|
||||
// Here by design, but it is unnecessary for nuclear fields
|
||||
inline void
|
||||
G4KM_NucleonEqRhs::SetChargeMomentumMass(G4double ,G4double ,G4double )
|
||||
{ }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KM_OpticalEqRhs.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4KM_OpticalEqRhs_hh
|
||||
#define G4KM_OpticalEqRhs_hh
|
||||
|
||||
#include "globals.hh"
|
||||
//#include "G4EquationOfMotion.hh"
|
||||
#include "G4Mag_EqRhs.hh"
|
||||
#include "G4KM_DummyField.hh" // needed by G4Mag_EqRhs constructor.
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
//class G4KM_OpticalEqRhs : public G4EquationOfMotion
|
||||
class G4KM_OpticalEqRhs : public G4Mag_EqRhs
|
||||
{
|
||||
|
||||
public:
|
||||
G4KM_OpticalEqRhs(G4KM_DummyField *field, G4V3DNucleus * nucleus);
|
||||
~G4KM_OpticalEqRhs();
|
||||
|
||||
virtual void EvaluateRhsGivenB(const G4double y[], const G4double B[3],
|
||||
G4double dydx[]) const;
|
||||
virtual void SetChargeMomentumMass(G4double particleCharge,
|
||||
G4double MomentumXc,
|
||||
G4double MassXc2);
|
||||
void SetFactor(G4double mass, G4double opticalParameter);
|
||||
|
||||
private:
|
||||
G4V3DNucleus * theNucleus;
|
||||
G4double theFactor;
|
||||
G4double theMass;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
inline G4KM_OpticalEqRhs::~G4KM_OpticalEqRhs()
|
||||
{ }
|
||||
|
||||
|
||||
// Here by design, but it is unnecessary for nuclear fields
|
||||
inline void G4KM_OpticalEqRhs::SetChargeMomentumMass(G4double ,G4double ,G4double )
|
||||
{ }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KaonMinusField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4KaonMinusField_h
|
||||
#define G4KaonMinusField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
class G4KaonMinusField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4KaonMinusField(G4V3DNucleus * nucleus, G4double coeff = 0.35*fermi);
|
||||
virtual ~G4KaonMinusField();
|
||||
|
||||
private:
|
||||
G4KaonMinusField(const G4KaonMinusField &right);
|
||||
const G4KaonMinusField & operator=(const G4KaonMinusField & right);
|
||||
int operator==(const G4KaonMinusField & right) const;
|
||||
int operator!=(const G4KaonMinusField & right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KaonPlusField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4KaonPlusField_h
|
||||
#define G4KaonPlusField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
class G4KaonPlusField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4KaonPlusField(G4V3DNucleus * nucleus, G4double coeff = 0.35*fermi);
|
||||
virtual ~G4KaonPlusField();
|
||||
|
||||
private:
|
||||
G4KaonPlusField(const G4KaonPlusField &right);
|
||||
const G4KaonPlusField & operator=(const G4KaonPlusField & right);
|
||||
int operator==(const G4KaonPlusField & right) const;
|
||||
int operator!=(const G4KaonPlusField & right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KaonZeroField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4KaonZeroField_h
|
||||
#define G4KaonZeroField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
|
||||
class G4KaonZeroField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4KaonZeroField(G4V3DNucleus * nucleus, G4double coeff = 0.35*fermi);
|
||||
virtual ~G4KaonZeroField();
|
||||
|
||||
private:
|
||||
G4KaonZeroField(const G4KaonZeroField &right);
|
||||
const G4KaonZeroField & operator=(const G4KaonZeroField & right);
|
||||
int operator==(const G4KaonZeroField & right) const;
|
||||
int operator!=(const G4KaonZeroField & right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4NeutronField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4NeutronField_h
|
||||
#define G4NeutronField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4NeutronField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4NeutronField(G4V3DNucleus * nucleus);
|
||||
virtual ~G4NeutronField();
|
||||
|
||||
private:
|
||||
|
||||
G4NeutronField(const G4NeutronField &right);
|
||||
const G4NeutronField & operator=(const G4NeutronField & right);
|
||||
int operator==(const G4NeutronField & right) const;
|
||||
int operator!=(const G4NeutronField & right) const;
|
||||
|
||||
public:
|
||||
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
|
||||
private:
|
||||
|
||||
G4double GetDensity(const G4ThreeVector & aPosition)
|
||||
{
|
||||
return theDensity->GetDensity(aPosition);
|
||||
}
|
||||
|
||||
G4double GetFermiMomentum(const G4double aDensity)
|
||||
{
|
||||
return theFermi.GetFermiMomentum(aDensity);
|
||||
}
|
||||
|
||||
G4FermiMomentum theFermi;
|
||||
G4double theA;
|
||||
G4double theZ;
|
||||
const G4VNuclearDensity * theDensity;
|
||||
G4double theR;
|
||||
|
||||
std::vector<G4double> theFermiMomBuffer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4PionMinusField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4PionMinusField_h
|
||||
#define G4PionMinusField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
class G4PionMinusField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
|
||||
G4PionMinusField(G4V3DNucleus * nucleus, G4double coeff = 0.042*fermi);
|
||||
virtual ~G4PionMinusField();
|
||||
|
||||
private:
|
||||
|
||||
G4PionMinusField(const G4PionMinusField &right);
|
||||
const G4PionMinusField & operator=(const G4PionMinusField & right);
|
||||
int operator==(const G4PionMinusField & right) const;
|
||||
int operator!=(const G4PionMinusField & right) const;
|
||||
|
||||
public:
|
||||
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4PionPlusField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4PionPlusField_hh
|
||||
#define G4PionPlusField_hh
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
class G4PionPlusField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4PionPlusField(G4V3DNucleus * nucleus, G4double coeff = 0.042*fermi);
|
||||
virtual ~G4PionPlusField();
|
||||
|
||||
private:
|
||||
G4PionPlusField(const G4PionPlusField &right);
|
||||
const G4PionPlusField & operator=(const G4PionPlusField & right);
|
||||
int operator==(const G4PionPlusField & right) const;
|
||||
int operator!=(const G4PionPlusField & right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4PionZeroField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4PionZeroField_h
|
||||
#define G4PionZeroField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
class G4PionZeroField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4PionZeroField(G4V3DNucleus * nucleus, G4double coeff = 0.042*fermi);
|
||||
virtual ~G4PionZeroField();
|
||||
|
||||
private:
|
||||
G4PionZeroField(const G4PionZeroField &right);
|
||||
const G4PionZeroField & operator=(const G4PionZeroField & right);
|
||||
int operator==(const G4PionZeroField & right) const;
|
||||
int operator!=(const G4PionZeroField & right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4ProtonField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4ProtonField_h
|
||||
#define G4ProtonField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4ProtonField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
|
||||
G4ProtonField(G4V3DNucleus * nucleus);
|
||||
virtual ~G4ProtonField();
|
||||
|
||||
private:
|
||||
|
||||
G4ProtonField(const G4ProtonField &right);
|
||||
const G4ProtonField & operator=(const G4ProtonField & right);
|
||||
int operator==(const G4ProtonField & right) const;
|
||||
int operator!=(const G4ProtonField & right) const;
|
||||
|
||||
public:
|
||||
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
|
||||
private:
|
||||
|
||||
G4double GetDensity(const G4ThreeVector & aPosition)
|
||||
{
|
||||
return theDensity->GetDensity(aPosition);
|
||||
}
|
||||
G4double GetFermiMomentum(const G4double aDensity)
|
||||
{
|
||||
return theFermi.GetFermiMomentum(aDensity);
|
||||
}
|
||||
|
||||
G4double theA;
|
||||
G4double theZ;
|
||||
G4double theBarrier;
|
||||
G4double theRadius;
|
||||
G4FermiMomentum theFermi;
|
||||
const G4VNuclearDensity * theDensity;
|
||||
|
||||
std::vector<G4double> theFermiMomBuffer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4RKFieldIntegrator_h
|
||||
#define G4RKFieldIntegrator_h 1
|
||||
|
||||
#include "G4FieldPropagation.hh"
|
||||
|
||||
class G4RKFieldIntegrator : public G4FieldPropagation
|
||||
{
|
||||
public:
|
||||
G4RKFieldIntegrator() {}
|
||||
G4RKFieldIntegrator(const G4RKFieldIntegrator &):G4FieldPropagation() {}
|
||||
|
||||
~G4RKFieldIntegrator() {}
|
||||
|
||||
//Operators
|
||||
const G4RKFieldIntegrator & operator=(const G4RKFieldIntegrator &) {return *this;}
|
||||
|
||||
int operator==(const G4RKFieldIntegrator &) const {return 1;}
|
||||
int operator!=(const G4RKFieldIntegrator &) const {return 1;}
|
||||
|
||||
// only theActive are propagated, nothing else
|
||||
// only theSpectators define the field, nothing else
|
||||
void Transport(G4KineticTrackVector &theActive, const G4KineticTrackVector &theSpectators, G4double theTimeStep);
|
||||
G4double GetExcitationEnergy(G4int nHitNucleons, const G4KineticTrackVector &theParticles);
|
||||
|
||||
// methods for calculating potentials for different types of particles
|
||||
void Init(G4int z, G4int a) {theZ = z; theA = a;} // prepare potentials' functions
|
||||
|
||||
// aPosition is relative to the nucleus center
|
||||
G4double GetNeutronPotential(G4double radius);
|
||||
G4double GetNeutronPotential(G4ThreeVector &aPosition) {return GetNeutronPotential(aPosition.mag());}
|
||||
|
||||
G4double GetProtonPotential(G4double radius);
|
||||
G4double GetProtonPotential(G4ThreeVector &aPosition) {return GetProtonPotential(aPosition.mag());}
|
||||
|
||||
G4double GetAntiprotonPotential(G4double radius);
|
||||
G4double GetAntiprotonPotential(G4ThreeVector &aPosition) {return GetAntiprotonPotential(aPosition.mag());};
|
||||
|
||||
G4double GetKaonPotential(G4double radius);
|
||||
G4double GetKaonPotential(G4ThreeVector &aPosition) {return GetKaonPotential(aPosition.mag());}
|
||||
|
||||
G4double GetPionPotential(G4double radius);
|
||||
G4double GetPionPotential(G4ThreeVector &aPosition) {return GetPionPotential(aPosition.mag());}
|
||||
|
||||
private:
|
||||
void Integrate(const G4KineticTrackVector & theActive, G4double theTimeStep);
|
||||
G4double CalculateTotalEnergy(const G4KineticTrackVector& Barions);
|
||||
G4double Erf(G4double X);
|
||||
|
||||
// parameters to calculate potentials
|
||||
G4int theA;
|
||||
G4int theZ;
|
||||
|
||||
// Vc(A, Z) = 1.44 * Z /(r0*(1 + pow(A, 1/3)))
|
||||
// = colomb * Z / (1 + pow(A, 1/3))
|
||||
static const G4double coulomb; // coulomb barier constant
|
||||
static const G4double a_kaon; // kaon's potential constant
|
||||
static const G4double a_pion; // pion's potential constant
|
||||
static const G4double a_antiproton; // antiproton's potential constant
|
||||
};
|
||||
|
||||
#endif // G4RKFieldIntegrator_h
|
||||
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
#ifndef G4RKPropagation_h
|
||||
#define G4RKPropagation_h 1
|
||||
|
||||
#include "G4VFieldPropagation.hh"
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
#include "G4KM_DummyField.hh"
|
||||
#include "G4Mag_EqRhs.hh"
|
||||
#include <map>
|
||||
|
||||
|
||||
class G4RKPropagation: public G4VFieldPropagation
|
||||
{
|
||||
|
||||
public:
|
||||
G4RKPropagation();
|
||||
virtual ~G4RKPropagation();
|
||||
|
||||
private:
|
||||
G4RKPropagation(const G4RKPropagation &right);
|
||||
const G4RKPropagation & operator=(const G4RKPropagation & right);
|
||||
G4int operator==(const G4RKPropagation & right) const;
|
||||
G4int operator!=(const G4RKPropagation & right) const;
|
||||
|
||||
public:
|
||||
|
||||
virtual void Init(G4V3DNucleus * nucleus);
|
||||
virtual void Transport(G4KineticTrackVector &theActive,
|
||||
const G4KineticTrackVector &theSpectators,
|
||||
G4double theTimeStep);
|
||||
G4bool GetSphereIntersectionTimes(const G4KineticTrack * track,
|
||||
G4double & t1, G4double & t2);
|
||||
G4ThreeVector GetMomentumTransfer() const;
|
||||
private:
|
||||
G4double theOuterRadius;
|
||||
G4V3DNucleus * theNucleus;
|
||||
std::map <G4int, G4VNuclearField *, std::less<G4int> > * theFieldMap;
|
||||
std::map <G4int, G4Mag_EqRhs *, std::less<G4int> > * theEquationMap;
|
||||
G4KM_DummyField * theField;
|
||||
|
||||
G4ThreeVector theMomentumTranfer;
|
||||
|
||||
G4bool GetSphereIntersectionTimes(const G4double radius,
|
||||
const G4ThreeVector & currentPos,
|
||||
const G4LorentzVector & momentum,
|
||||
G4double & t1, G4double & t2);
|
||||
// implementation
|
||||
|
||||
G4bool FieldTransport(G4KineticTrack * track, const G4double timestep);
|
||||
G4bool FreeTransport(G4KineticTrack * track, const G4double timestep);
|
||||
|
||||
void delete_FieldsAndMap(
|
||||
std::map <G4int, G4VNuclearField *, std::less<G4int> > * aMap);
|
||||
void delete_EquationsAndMap(
|
||||
std::map <G4int, G4Mag_EqRhs *, std::less<G4int> > * aMap);
|
||||
|
||||
public:
|
||||
inline G4double GetBarrier(G4int encoding)
|
||||
{
|
||||
std::map <G4int, G4VNuclearField *, std::less<G4int> >::iterator iter;
|
||||
iter = theFieldMap->find(encoding);
|
||||
if(iter == theFieldMap->end()) return 0;
|
||||
return (*theFieldMap)[encoding]->GetBarrier();
|
||||
}
|
||||
|
||||
inline G4double GetField(G4int encoding,G4ThreeVector pos)
|
||||
{
|
||||
std::map <G4int, G4VNuclearField *, std::less<G4int> >::iterator iter;
|
||||
iter = theFieldMap->find(encoding);
|
||||
if(iter == theFieldMap->end()) return 0;
|
||||
return (*theFieldMap)[encoding]->GetField(pos);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4SigmaMinusField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4SigmaMinusField_h
|
||||
#define G4SigmaMinusField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
|
||||
class G4SigmaMinusField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4SigmaMinusField(G4V3DNucleus * nucleus, G4double coeff = 0.36*fermi);
|
||||
virtual ~G4SigmaMinusField();
|
||||
|
||||
private:
|
||||
G4SigmaMinusField(const G4SigmaMinusField &right);
|
||||
const G4SigmaMinusField & operator=(const G4SigmaMinusField & right);
|
||||
int operator==(const G4SigmaMinusField & right) const;
|
||||
int operator!=(const G4SigmaMinusField & right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef G4SigmaPlusField_h
|
||||
#define G4SigmaPlusField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
|
||||
class G4SigmaPlusField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4SigmaPlusField(G4V3DNucleus * nucleus, G4double coeff = 0.36*fermi);
|
||||
virtual ~G4SigmaPlusField();
|
||||
|
||||
private:
|
||||
G4SigmaPlusField(const G4SigmaPlusField &right);
|
||||
const G4SigmaPlusField & operator=(const G4SigmaPlusField & right);
|
||||
int operator==(const G4SigmaPlusField & right) const;
|
||||
int operator!=(const G4SigmaPlusField & right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4SigmaZeroField.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4SigmaZeroField_h
|
||||
#define G4SigmaZeroField_h 1
|
||||
|
||||
#include "G4VNuclearField.hh"
|
||||
|
||||
class G4SigmaZeroField: public G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4SigmaZeroField(G4V3DNucleus * nucleus, G4double coeff = 0.36*fermi);
|
||||
virtual ~G4SigmaZeroField();
|
||||
|
||||
private:
|
||||
G4SigmaZeroField(const G4SigmaZeroField &right);
|
||||
const G4SigmaZeroField & operator=(const G4SigmaZeroField & right);
|
||||
int operator==(const G4SigmaZeroField & right) const;
|
||||
int operator!=(const G4SigmaZeroField & right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition);
|
||||
virtual G4double GetBarrier();
|
||||
virtual G4double GetCoeff() { return theCoeff; }
|
||||
|
||||
private:
|
||||
G4double theCoeff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef G4VFieldPropagation_h
|
||||
#define G4VFieldPropagation_h 1
|
||||
|
||||
#include "G4KineticTrackVector.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
class G4VFieldPropagation
|
||||
{
|
||||
public:
|
||||
G4VFieldPropagation();
|
||||
virtual ~G4VFieldPropagation();
|
||||
|
||||
private:
|
||||
G4VFieldPropagation(const G4VFieldPropagation &right);
|
||||
const G4VFieldPropagation & operator=(const G4VFieldPropagation & right);
|
||||
G4int operator==(const G4VFieldPropagation & right) const;
|
||||
G4int operator!=(const G4VFieldPropagation & right) const;
|
||||
|
||||
public:
|
||||
virtual void Init(G4V3DNucleus * theNucleus) = 0;
|
||||
virtual void Transport(G4KineticTrackVector &theActive,
|
||||
const G4KineticTrackVector &theSpectators,
|
||||
G4double theTimeStep) = 0;
|
||||
virtual G4ThreeVector GetMomentumTransfer() const =0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4VKM_NuclearDensity.hh
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4VKM_NuclearDensity_hh
|
||||
#define G4VKM_NuclearDensity_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
class G4VKM_NuclearDensity
|
||||
{
|
||||
|
||||
public:
|
||||
G4VKM_NuclearDensity();
|
||||
virtual ~G4VKM_NuclearDensity();
|
||||
|
||||
virtual G4double GetDensity(const G4ThreeVector & point) = 0;
|
||||
virtual G4double GetDeriv(const G4ThreeVector & point) = 0;
|
||||
};
|
||||
|
||||
inline G4VKM_NuclearDensity::G4VKM_NuclearDensity()
|
||||
{ }
|
||||
|
||||
inline G4VKM_NuclearDensity::~G4VKM_NuclearDensity()
|
||||
{ }
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
#ifndef G4VNuclearField_h
|
||||
#define G4VNuclearField_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
#include "G4HadronicException.hh"
|
||||
|
||||
class G4VNuclearField
|
||||
{
|
||||
public:
|
||||
G4VNuclearField(G4V3DNucleus * aNucleus = 0);
|
||||
virtual ~G4VNuclearField();
|
||||
|
||||
void SetNucleus(G4V3DNucleus * aNucleus);
|
||||
virtual G4double GetField(const G4ThreeVector & aPosition) = 0;
|
||||
virtual G4double GetBarrier() = 0;
|
||||
virtual G4double GetCoeff() { return 0; }
|
||||
|
||||
protected:
|
||||
G4V3DNucleus * theNucleus;
|
||||
const G4double radius;
|
||||
|
||||
private:
|
||||
|
||||
G4VNuclearField(const G4VNuclearField &right);
|
||||
const G4VNuclearField & operator=(const G4VNuclearField & right);
|
||||
G4int operator==(const G4VNuclearField & right) const;
|
||||
G4int operator!=(const G4VNuclearField & right) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
inline void G4VNuclearField::SetNucleus(G4V3DNucleus * aNucleus)
|
||||
{
|
||||
theNucleus = aNucleus;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "G4Absorber.hh"
|
||||
#include "G4KineticTrack.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
|
||||
#include "G4LorentzRotation.hh"
|
||||
|
||||
G4Absorber::G4Absorber(G4double cutOnP)
|
||||
{
|
||||
theCutOnP = cutOnP;
|
||||
theAbsorbers = new G4KineticTrackVector;
|
||||
theProducts = new G4KineticTrackVector;
|
||||
}
|
||||
|
||||
|
||||
G4Absorber::~G4Absorber()
|
||||
{
|
||||
delete theAbsorbers;
|
||||
delete theProducts;
|
||||
}
|
||||
|
||||
|
||||
bool G4Absorber::WillBeAbsorbed(const G4KineticTrack & kt)
|
||||
{
|
||||
// FixMe: actually only for pions
|
||||
// if(kt.Get4Momentum().vect().mag() < theCutOnP)
|
||||
// Cut on kinetic Energy...
|
||||
if (kt.Get4Momentum().e() - kt.GetActualMass() < theCutOnP)
|
||||
{
|
||||
if(kt.GetDefinition() == G4PionPlus::PionPlus() ||
|
||||
kt.GetDefinition() == G4PionZero::PionZero() ||
|
||||
kt.GetDefinition() == G4PionMinus::PionMinus())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4bool G4Absorber::Absorb(G4KineticTrack & kt, G4KineticTrackVector & tgt)
|
||||
{
|
||||
if(!FindAbsorbers(kt, tgt))
|
||||
return false;
|
||||
return FindProducts(kt);
|
||||
}
|
||||
|
||||
|
||||
G4bool G4Absorber::FindAbsorbers(G4KineticTrack & kt,
|
||||
G4KineticTrackVector & tgt)
|
||||
{
|
||||
G4KineticTrack * kt1 = NULL;
|
||||
G4KineticTrack * kt2 = NULL;
|
||||
G4double dist1 = DBL_MAX;
|
||||
G4double dist2 = DBL_MAX;
|
||||
G4double charge1 = 0;
|
||||
G4double charge2 = 0;
|
||||
G4double charge0 = kt.GetDefinition()->GetPDGCharge();
|
||||
G4ThreeVector pos = kt.GetPosition();
|
||||
|
||||
std::vector<G4KineticTrack *>::iterator iter;
|
||||
for(iter = tgt.begin(); iter != tgt.end(); ++iter)
|
||||
{
|
||||
G4KineticTrack * curr = *iter;
|
||||
G4double dist = (pos-curr->GetPosition()).mag();
|
||||
if(dist >= dist2)
|
||||
continue;
|
||||
if(dist < dist1)
|
||||
{
|
||||
if(dist1 == DBL_MAX) // accept the candidate
|
||||
{
|
||||
kt1 = curr;
|
||||
charge1 = kt1->GetDefinition()->GetPDGCharge();
|
||||
dist1 = dist;
|
||||
continue;
|
||||
}
|
||||
if(dist2 == DBL_MAX) // accept the candidate put kt1 in kt2
|
||||
{
|
||||
kt2 = kt1;
|
||||
charge2 = charge1;
|
||||
dist2 = dist1;
|
||||
kt1 = curr;
|
||||
charge1 = kt1->GetDefinition()->GetPDGCharge();
|
||||
dist1 = dist;
|
||||
continue;
|
||||
}
|
||||
// test the compatibility with charge conservation
|
||||
G4double charge = curr->GetDefinition()->GetPDGCharge();
|
||||
if((charge0+charge1+charge < 0.) ||
|
||||
(charge0+charge1+charge) > 2*eplus)
|
||||
{ // incomatible: change kt1 with curr.
|
||||
kt1 = curr;
|
||||
charge1 = charge;
|
||||
dist1 = dist;
|
||||
}
|
||||
else
|
||||
{ // compatible: change kt1 with curr and kt2 with kt1
|
||||
kt2 = kt1;
|
||||
charge2 = charge1;
|
||||
dist2 = dist1;
|
||||
kt1 = curr;
|
||||
charge1 = charge;
|
||||
dist1 = dist;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// here if dist1 < dist < dist2
|
||||
if(dist2 == DBL_MAX) // accept the candidate
|
||||
{
|
||||
kt2 = curr;
|
||||
charge2 = kt2->GetDefinition()->GetPDGCharge();
|
||||
dist2 = dist;
|
||||
continue;
|
||||
}
|
||||
// test the compatibility with charge conservation
|
||||
G4double charge = curr->GetDefinition()->GetPDGCharge();
|
||||
if((charge0+charge1+charge < 0.) ||
|
||||
(charge0+charge1+charge) > 2*eplus)
|
||||
continue; // incomatible: do nothing
|
||||
// compatible: change kt2 with curr
|
||||
kt2 = curr;
|
||||
charge2 = charge;
|
||||
dist2 = dist;
|
||||
}
|
||||
|
||||
theAbsorbers->clear(); // do not delete tracks in theAbsorbers vector!
|
||||
if((kt1 == NULL) || (kt2 == NULL))
|
||||
return false;
|
||||
|
||||
theAbsorbers->push_back(kt1);
|
||||
theAbsorbers->push_back(kt2);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4bool G4Absorber::FindProducts(G4KineticTrack & kt)
|
||||
{
|
||||
// Choose the products type
|
||||
G4ParticleDefinition * prod1;
|
||||
G4ParticleDefinition * prod2;
|
||||
G4KineticTrack * abs1 = (*theAbsorbers)[0];
|
||||
G4KineticTrack * abs2 = (*theAbsorbers)[1];
|
||||
|
||||
G4double charge = kt.GetDefinition()->GetPDGCharge();
|
||||
if(charge == eplus)
|
||||
{ // a neutron become proton
|
||||
prod1 = G4Proton::Proton();
|
||||
if(abs1->GetDefinition() == G4Neutron::Neutron())
|
||||
prod2 = abs2->GetDefinition();
|
||||
else
|
||||
prod2 = G4Proton::Proton();
|
||||
}
|
||||
else if(charge == -eplus)
|
||||
{ // a proton become neutron
|
||||
prod1 = G4Neutron::Neutron();
|
||||
if(abs1->GetDefinition() == G4Proton::Proton())
|
||||
prod2 = abs2->GetDefinition();
|
||||
else
|
||||
prod2 = G4Neutron::Neutron();
|
||||
}
|
||||
else // charge = 0: leave particle types unchenged
|
||||
{
|
||||
prod1 = abs1->GetDefinition();
|
||||
prod2 = abs2->GetDefinition();
|
||||
}
|
||||
|
||||
// Translate to the CMS frame
|
||||
G4LorentzVector momLab = kt.Get4Momentum()+abs1->Get4Momentum()+
|
||||
abs2->Get4Momentum();
|
||||
G4LorentzRotation toCMSFrame((-1)*momLab.boostVector());
|
||||
G4LorentzRotation toLabFrame(momLab.boostVector());
|
||||
G4LorentzVector momCMS = toCMSFrame*momLab;
|
||||
|
||||
// Evaluate the final momentum of products
|
||||
G4double m1 = prod1->GetPDGMass();
|
||||
G4double m2 = prod2->GetPDGMass();
|
||||
G4double e0 = momCMS.e();
|
||||
G4double squareP = (e0*e0*e0*e0-2*e0*e0*(m1*m1+m2*m2)+
|
||||
(m2*m2-m1*m1)*(m2*m2-m1*m1))/(4*e0*e0);
|
||||
// if(squareP < 0) // should never happen
|
||||
// squareP = 0;
|
||||
G4ThreeVector mom1CMS = GetRandomDirection();
|
||||
mom1CMS = sqrt(squareP)*mom1CMS;
|
||||
G4LorentzVector final4Mom1CMS(mom1CMS, sqrt(squareP+m1*m1));
|
||||
G4LorentzVector final4Mom2CMS((-1)*mom1CMS, sqrt(squareP+m2*m2));
|
||||
|
||||
// Go back to the lab frame
|
||||
G4LorentzVector mom1 = toLabFrame*final4Mom1CMS;
|
||||
G4LorentzVector mom2 = toLabFrame*final4Mom2CMS;
|
||||
|
||||
// ------ debug
|
||||
/*
|
||||
G4LorentzVector temp = mom1+mom2;
|
||||
|
||||
cout << (1/MeV)*momLab.x() << " " << (1/MeV)*momLab.y() << " "
|
||||
<< (1/MeV)*momLab.z() << " " << (1/MeV)*momLab.t() << " "
|
||||
<< (1/MeV)*momLab.vect().mag() << " " << (1/MeV)*momLab.mag() << " "
|
||||
<< (1/MeV)*temp.x() << " " << (1/MeV)*temp.y() << " "
|
||||
<< (1/MeV)*temp.z() << " " << (1/MeV)*temp.t() << " "
|
||||
<< (1/MeV)*temp.vect().mag() << " " << (1/MeV)*temp.mag() << " "
|
||||
<< (1/MeV)*sqrt(squareP) << endl;
|
||||
|
||||
*/
|
||||
// ------ end debug
|
||||
|
||||
// Build two new kinetic tracks and add to products
|
||||
G4KineticTrack * kt1 = new G4KineticTrack(prod1, 0., abs1->GetPosition(),
|
||||
mom1);
|
||||
G4KineticTrack * kt2 = new G4KineticTrack(prod2, 0., abs2->GetPosition(),
|
||||
mom2);
|
||||
// ------ debug
|
||||
/*
|
||||
G4LorentzVector initialMom1 = abs1->Get4Momentum();
|
||||
G4LorentzVector initialMom2 = abs2->Get4Momentum();
|
||||
G4LorentzVector pion4MomCMS = toCMSFrame*kt.Get4Momentum();
|
||||
cout << (1/MeV)*initialMom1.x() << " " << (1/MeV)*initialMom1.y() << " "
|
||||
<< (1/MeV)*initialMom1.z() << " " << (1/MeV)*initialMom1.e() << " "
|
||||
<< (1/MeV)*initialMom1.vect().mag() << " "
|
||||
<< (1/MeV)*initialMom2.x() << " " << (1/MeV)*initialMom2.y() << " "
|
||||
<< (1/MeV)*initialMom2.z() << " " << (1/MeV)*initialMom2.e() << " "
|
||||
<< (1/MeV)*initialMom2.vect().mag() << " "
|
||||
<< (1/MeV)*mom1.x() << " " << (1/MeV)*mom1.y() << " "
|
||||
<< (1/MeV)*mom1.z() << " " << (1/MeV)*mom1.e() << " "
|
||||
<< (1/MeV)*mom1.vect().mag() << " "
|
||||
<< (1/MeV)*mom2.x() << " " << (1/MeV)*mom2.y() << " "
|
||||
<< (1/MeV)*mom2.z() << " " << (1/MeV)*mom2.e() << " "
|
||||
<< (1/MeV)*mom2.vect().mag() << " "
|
||||
<< (1/MeV)*pion4MomCMS.x() << " " << (1/MeV)*pion4MomCMS.y() << " "
|
||||
<< (1/MeV)*pion4MomCMS.z() << " " << (1/MeV)*pion4MomCMS.e() << " "
|
||||
<< (1/MeV)*pion4MomCMS.vect().mag() << " "
|
||||
<< (1/MeV)*final4Mom1CMS.x() << " " << (1/MeV)*final4Mom1CMS.y() << " "
|
||||
<< (1/MeV)*final4Mom1CMS.z() << " " << (1/MeV)*final4Mom1CMS.e() << " "
|
||||
<< (1/MeV)*final4Mom1CMS.vect().mag() << " "
|
||||
<< (1/MeV)*final4Mom2CMS.x() << " " << (1/MeV)*final4Mom2CMS.y() << " "
|
||||
<< (1/MeV)*final4Mom2CMS.z() << " " << (1/MeV)*final4Mom2CMS.e() << " "
|
||||
<< (1/MeV)*final4Mom2CMS.vect().mag() << endl;
|
||||
*/
|
||||
// ------ end debug
|
||||
|
||||
theProducts->clear();
|
||||
theProducts->push_back(kt1);
|
||||
theProducts->push_back(kt2);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4ThreeVector G4Absorber::GetRandomDirection()
|
||||
{
|
||||
G4double theta = 2.0*G4UniformRand()-1.0;
|
||||
theta = acos(theta);
|
||||
G4double phi = G4UniformRand()*2*pi;
|
||||
G4ThreeVector direction(sin(theta)*cos(phi), sin(theta)*sin(phi), cos(theta));
|
||||
return direction;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4AntiProtonField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4AntiProtonField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4AntiProtonField::G4AntiProtonField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
|
||||
G4AntiProtonField::~G4AntiProtonField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4AntiProtonField & G4AntiProtonField::operator=(const G4AntiProtonField & )
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4AntiProtonField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4AntiProtonField::operator==(const G4AntiProtonField & ) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4AntiProtonField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4AntiProtonField::operator!=(const G4AntiProtonField & ) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4AntiProtonField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4AntiProtonField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4ParticleDefinition *anAntiProton = G4AntiProton::AntiProtonDefinition();
|
||||
G4double antiProtonMass = anAntiProton->GetPDGMass();
|
||||
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = antiProtonMass*nucleusMass/(antiProtonMass+nucleusMass);
|
||||
|
||||
G4double density = theNucleus->GetNuclearDensity()->GetDensity(aPosition);
|
||||
|
||||
return -2.*pi*hbarc*hbarc/reducedMass*(2.0)*theCoeff*density+GetBarrier();
|
||||
}
|
||||
|
||||
|
||||
G4double G4AntiProtonField::GetBarrier()
|
||||
{
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + pow(A,1./3.));
|
||||
return -coulombBarrier;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,575 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "G4BinaryLightIonReaction.hh"
|
||||
#include "G4LorentzVector.hh"
|
||||
#include "G4LorentzRotation.hh"
|
||||
#include <algorithm>
|
||||
#include "G4ReactionProductVector.hh"
|
||||
#include <vector>
|
||||
#include "G4ping.hh"
|
||||
#include "G4Delete.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4BinaryLightIonReaction::G4BinaryLightIonReaction()
|
||||
: theModel(), theHandler(), theProjectileFragmentation(&theHandler) {}
|
||||
|
||||
G4HadFinalState *G4BinaryLightIonReaction::
|
||||
ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus & targetNucleus )
|
||||
{
|
||||
static G4int eventcounter=0;
|
||||
eventcounter++;
|
||||
if(getenv("BLICDEBUG") ) G4cerr << " ######### Binary Light Ion Reaction number starts ######### "<<eventcounter<<G4endl;
|
||||
G4ping debug("debug_G4BinaryLightIonReaction");
|
||||
G4double a1=aTrack.GetDefinition()->GetBaryonNumber();
|
||||
G4double z1=aTrack.GetDefinition()->GetPDGCharge();
|
||||
G4double a2=targetNucleus.GetN();
|
||||
G4double z2=targetNucleus.GetZ();
|
||||
debug.push_back(a1);
|
||||
debug.push_back(z1);
|
||||
debug.push_back(a2);
|
||||
debug.push_back(z2);
|
||||
// debug.push_back(m2);
|
||||
G4LorentzVector mom(aTrack.Get4Momentum());
|
||||
debug.push_back(mom);
|
||||
debug.dump();
|
||||
G4LorentzRotation toBreit(mom.boostVector());
|
||||
|
||||
G4bool swapped = false;
|
||||
if(a2<a1)
|
||||
{
|
||||
debug.push_back("swapping....");
|
||||
swapped = true;
|
||||
G4double tmp(0);
|
||||
tmp = a2; a2=a1; a1=tmp;
|
||||
tmp = z2; z2=z1; z1=tmp;
|
||||
G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4lrint(z1),G4lrint(a1));
|
||||
G4LorentzVector it(m1, G4ThreeVector(0,0,0));
|
||||
mom = toBreit*it;
|
||||
}
|
||||
debug.push_back("After swap");
|
||||
debug.push_back(a1);
|
||||
debug.push_back(z1);
|
||||
debug.push_back(a2);
|
||||
debug.push_back(z2);
|
||||
debug.push_back(mom);
|
||||
debug.dump();
|
||||
|
||||
G4ReactionProductVector * result = NULL;
|
||||
G4ReactionProductVector * cascaders= new G4ReactionProductVector;
|
||||
G4double m_nucl(0); // to check energy balance
|
||||
|
||||
|
||||
// G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4lrint(z1),G4lrint(a1));
|
||||
// G4cout << "Entering the decision point "
|
||||
// << (mom.t()-mom.mag())/a1 << " "
|
||||
// << a1<<" "<< z1<<" "
|
||||
// << a2<<" "<< z2<<G4endl
|
||||
// << " "<<mom.t()-mom.mag()<<" "
|
||||
// << mom.t()- m1<<G4endl;
|
||||
if( (mom.t()-mom.mag())/a1 < 50*MeV )
|
||||
{
|
||||
// G4cout << "Using pre-compound only, E= "<<mom.t()-mom.mag()<<G4endl;
|
||||
// m_nucl = mom.mag();
|
||||
G4Fragment aPreFrag;
|
||||
aPreFrag.SetA(a1+a2);
|
||||
aPreFrag.SetZ(z1+z2);
|
||||
aPreFrag.SetNumberOfParticles(G4lrint(a1));
|
||||
aPreFrag.SetNumberOfCharged(G4lrint(z1));
|
||||
aPreFrag.SetNumberOfHoles(0);
|
||||
G4ThreeVector plop(0.,0., mom.vect().mag());
|
||||
G4double m2=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4lrint(z2),G4lrint(a2));
|
||||
m_nucl=m2;
|
||||
G4LorentzVector aL(mom.t()+m2, plop);
|
||||
aPreFrag.SetMomentum(aL);
|
||||
G4ParticleDefinition * preFragDef;
|
||||
preFragDef = G4ParticleTable::GetParticleTable()
|
||||
->FindIon(G4lrint(z1+z2),G4lrint(a1+a2),0,G4lrint(z1+z2));
|
||||
aPreFrag.SetParticleDefinition(preFragDef);
|
||||
|
||||
// G4cout << "Fragment INFO "<< a1+a2 <<" "<<z1+z2<<" "
|
||||
// << aL <<" "<<preFragDef->GetParticleName()<<G4endl;
|
||||
cascaders = theProjectileFragmentation.DeExcite(aPreFrag);
|
||||
G4double tSum = 0;
|
||||
for(size_t count = 0; count<cascaders->size(); count++)
|
||||
{
|
||||
cascaders->operator[](count)->SetNewlyAdded(true);
|
||||
tSum += cascaders->operator[](count)->GetKineticEnergy();
|
||||
}
|
||||
// G4cout << "Exiting pre-compound only, E= "<<tSum<<G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
G4V3DNucleus * fancyNucleus = NULL;
|
||||
G4V3DNucleus * projectile = NULL;
|
||||
G4double m1(0) ,m2(0);
|
||||
G4LorentzVector it;
|
||||
|
||||
G4FermiMomentum theFermi;
|
||||
while(!result)
|
||||
{
|
||||
projectile = new G4Fancy3DNucleus;
|
||||
projectile->Init(a1, z1);
|
||||
m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(
|
||||
projectile->GetCharge(),projectile->GetMassNumber());
|
||||
it=toBreit * G4LorentzVector(m1,G4ThreeVector(0,0,0));
|
||||
fancyNucleus = new G4Fancy3DNucleus;
|
||||
fancyNucleus->Init(a2, z2);
|
||||
m2=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(
|
||||
fancyNucleus->GetCharge(),fancyNucleus->GetMassNumber());
|
||||
m_nucl = ( swapped ) ? m1 : m2;
|
||||
// G4cout << " mass table, nucleus, delta : " << m2 <<" "<< fancyNucleus->GetMass()
|
||||
// <<" "<<m2-fancyNucleus->GetMass() << G4endl;
|
||||
G4double impactMax = fancyNucleus->GetOuterRadius()+projectile->GetOuterRadius();
|
||||
G4double aX=(2.*G4UniformRand()-1.)*impactMax;
|
||||
G4double aY=(2.*G4UniformRand()-1.)*impactMax;
|
||||
G4ThreeVector pos(aX, aY, -2.*impactMax-5.*fermi);
|
||||
debug.push_back("Impact parameter");
|
||||
debug.push_back(aX);
|
||||
debug.push_back(aY);
|
||||
debug.push_back(-2.*impactMax);
|
||||
debug.dump();
|
||||
|
||||
G4KineticTrackVector * initalState = new G4KineticTrackVector;
|
||||
projectile->StartLoop();
|
||||
G4Nucleon * aNuc;
|
||||
G4LorentzVector tmpV(0,0,0,0);
|
||||
G4LorentzVector nucleonMom(1./a1*mom);
|
||||
nucleonMom.setZ(nucleonMom.vect().mag());
|
||||
nucleonMom.setX(0);
|
||||
nucleonMom.setY(0);
|
||||
debug.push_back(" projectile nucleon momentum");
|
||||
debug.push_back(nucleonMom);
|
||||
debug.dump();
|
||||
theFermi.Init(a1,z1);
|
||||
while( (aNuc=projectile->GetNextNucleon()) )
|
||||
{
|
||||
G4LorentzVector p4 = aNuc->GetMomentum();
|
||||
tmpV+=p4;
|
||||
G4ThreeVector nucleonPosition(aNuc->GetPosition());
|
||||
G4double density=(projectile->GetNuclearDensity())->GetDensity(nucleonPosition);
|
||||
nucleonPosition += pos;
|
||||
G4KineticTrack * it = new G4KineticTrack(aNuc, nucleonPosition, nucleonMom );
|
||||
it->SetState(G4KineticTrack::outside);
|
||||
G4double pfermi= theFermi.GetFermiMomentum(density);
|
||||
G4double mass = aNuc->GetDefinition()->GetPDGMass();
|
||||
G4double Efermi= sqrt( sqr(mass) + sqr(pfermi)) - mass;
|
||||
it->SetProjectilePotential(-Efermi);
|
||||
initalState->push_back(it);
|
||||
}
|
||||
debug.push_back(tmpV);
|
||||
debug.dump();
|
||||
|
||||
result=theModel.Propagate(initalState, fancyNucleus);
|
||||
debug.push_back("################# Result size");
|
||||
debug.push_back(result->size());
|
||||
debug.dump();
|
||||
std::for_each(initalState->begin(), initalState->end(), Delete<G4KineticTrack>());
|
||||
delete initalState;
|
||||
|
||||
if(result->size()==0)
|
||||
{
|
||||
delete result; result=0;
|
||||
delete fancyNucleus;
|
||||
delete projectile;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
debug.push_back("################# Through the loop ? "); debug.dump();
|
||||
//inverse transformation in case we swapped.
|
||||
G4int resA(0), resZ(0);
|
||||
G4Nucleon * aNuc;
|
||||
// fancyNucleus->StartLoop();
|
||||
// while( (aNuc=fancyNucleus->GetNextNucleon()) )
|
||||
// {
|
||||
// G4cout << " tgt Nucleon : " << aNuc->GetDefinition()->GetParticleName() <<" "<< aNuc->AreYouHit() <<" "<<aNuc->GetMomentum()<<G4endl;
|
||||
// }
|
||||
G4ReactionProductVector * spectators= new G4ReactionProductVector;
|
||||
debug.push_back("getting at the hits"); debug.dump();
|
||||
// the projectile excitation energy estimate...
|
||||
G4double theStatisticalExEnergy = 0;
|
||||
projectile->StartLoop();
|
||||
while( (aNuc=projectile->GetNextNucleon()) )
|
||||
{
|
||||
// G4cout << " Nucleon : " << aNuc->GetDefinition()->GetParticleName() <<" "<< aNuc->AreYouHit() <<" "<<aNuc->GetMomentum()<<G4endl;
|
||||
debug.push_back("getting the hits"); debug.dump();
|
||||
if(!aNuc->AreYouHit())
|
||||
{
|
||||
resA++;
|
||||
resZ+=G4lrint(aNuc->GetDefinition()->GetPDGCharge());
|
||||
}
|
||||
else
|
||||
{
|
||||
debug.push_back(" ##### a hit ##### "); debug.dump();
|
||||
G4ThreeVector aPosition(aNuc->GetPosition());
|
||||
G4double localDensity = projectile->GetNuclearDensity()->GetDensity(aPosition);
|
||||
G4double localPfermi = theFermi.GetFermiMomentum(localDensity);
|
||||
G4double nucMass = aNuc->GetDefinition()->GetPDGMass();
|
||||
G4double localFermiEnergy = sqrt(nucMass*nucMass + localPfermi*localPfermi) - nucMass;
|
||||
G4double deltaE = localFermiEnergy - (aNuc->GetMomentum().t()-aNuc->GetMomentum().mag());
|
||||
theStatisticalExEnergy += deltaE;
|
||||
}
|
||||
debug.push_back("collected a hit"); debug.dump();
|
||||
}
|
||||
delete fancyNucleus;
|
||||
delete projectile;
|
||||
G4ping debug("debug_G4BinaryLightIonReaction_1");
|
||||
debug.push_back("have the hits. A,Z, excitE");
|
||||
debug.push_back(resA);
|
||||
debug.push_back(resZ);
|
||||
debug.push_back(theStatisticalExEnergy);
|
||||
debug.dump();
|
||||
// Calculate excitation energy
|
||||
G4LorentzVector iState = mom;
|
||||
iState.setT(iState.getT()+m2);
|
||||
|
||||
G4LorentzVector fState(0,0,0,0);
|
||||
G4LorentzVector pspectators(0,0,0,0);
|
||||
unsigned int i(0);
|
||||
for(i=0; i<result->size(); i++)
|
||||
{
|
||||
if( (*result)[i]->GetNewlyAdded() )
|
||||
{
|
||||
fState += G4LorentzVector( (*result)[i]->GetMomentum(), (*result)[i]->GetTotalEnergy() );
|
||||
cascaders->push_back((*result)[i]);
|
||||
// G4cout <<" secondary ... ";
|
||||
}
|
||||
else {
|
||||
// G4cout <<" spectator ... ";
|
||||
pspectators += G4LorentzVector( (*result)[i]->GetMomentum(), (*result)[i]->GetTotalEnergy() );
|
||||
spectators->push_back((*result)[i]);
|
||||
}
|
||||
|
||||
// G4cout << (*result)[i]<< " "
|
||||
// << (*result)[i]->GetDefinition()->GetParticleName() << " "
|
||||
// << (*result)[i]->GetMomentum()<< " "
|
||||
// << (*result)[i]->GetTotalEnergy() << G4endl;
|
||||
}
|
||||
delete result;
|
||||
debug.push_back(" iState - (fState+pspectators) ");
|
||||
debug.push_back(iState-fState-pspectators);
|
||||
debug.dump();
|
||||
G4LorentzVector momentum(iState-fState);
|
||||
G4int loopcount(0);
|
||||
while (abs(momentum-pspectators.e()) > 10*MeV)
|
||||
{
|
||||
debug.push_back("the momentum balance");
|
||||
debug.push_back(iState);
|
||||
debug.push_back(fState);
|
||||
debug.push_back(momentum-pspectators);
|
||||
debug.push_back(momentum);
|
||||
debug.dump();
|
||||
G4LorentzVector pCorrect(iState-pspectators);
|
||||
G4bool EnergyIsCorrect=EnergyAndMomentumCorrector(cascaders, pCorrect);
|
||||
if ( ! EnergyIsCorrect && getenv("debug_G4BinaryLightIonReactionResults"))
|
||||
{
|
||||
G4cout << "Warning - G4BinaryLightIonReaction E/P correction for cascaders failed" << G4endl;
|
||||
}
|
||||
fState=G4LorentzVector();
|
||||
for(i=0; i<cascaders->size(); i++)
|
||||
{
|
||||
fState += G4LorentzVector( (*cascaders)[i]->GetMomentum(), (*cascaders)[i]->GetTotalEnergy() );
|
||||
}
|
||||
momentum=iState-fState;
|
||||
debug.push_back("the momentum balance after correction");
|
||||
debug.push_back(iState);
|
||||
debug.push_back(fState);
|
||||
debug.push_back(momentum-pspectators);
|
||||
debug.push_back(momentum);
|
||||
debug.dump();
|
||||
if (++loopcount > 10 )
|
||||
{
|
||||
if ( momentum.vect().mag() > momentum.e() )
|
||||
{
|
||||
G4cerr << "G4BinaryLightIonReaction.cc: Cannot correct 4-momentum of cascade particles" << G4endl;
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCasacde::ApplyCollision()");
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// call precompound model
|
||||
G4ReactionProductVector * proFrag = NULL;
|
||||
G4LorentzVector pFragment;
|
||||
// G4cout << " == pre boost 1 "<< momentum.e()<< " "<< momentum.mag()<<G4endl;
|
||||
G4LorentzRotation boost_fragments;
|
||||
// G4cout << " == post boost 1 "<< momentum.e()<< " "<< momentum.mag()<<G4endl;
|
||||
// G4LorentzRotation boost_spectator_mom(-momentum.boostVector());
|
||||
// G4cout << "- momentum " << boost_spectator_mom * momentum << G4endl;
|
||||
if(resZ>0 && resA>1)
|
||||
{
|
||||
// Make the fragment
|
||||
G4Fragment aProRes;
|
||||
aProRes.SetA(resA);
|
||||
aProRes.SetZ(resZ);
|
||||
aProRes.SetNumberOfParticles(0);
|
||||
aProRes.SetNumberOfCharged(0);
|
||||
aProRes.SetNumberOfHoles(G4lrint(a1)-resA);
|
||||
G4double mFragment=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(resZ,resA);
|
||||
G4LorentzVector pFragment(0,0,0,mFragment+std::max(0.,theStatisticalExEnergy) );
|
||||
aProRes.SetMomentum(pFragment);
|
||||
G4ParticleDefinition * resDef;
|
||||
resDef = G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ);
|
||||
aProRes.SetParticleDefinition(resDef);
|
||||
proFrag = theHandler.BreakItUp(aProRes);
|
||||
if ( momentum.vect().mag() > momentum.e() )
|
||||
{
|
||||
G4cout << "mom check: " << momentum
|
||||
<< " 3.mag "<< momentum.vect().mag() << G4endl
|
||||
<< " .. iState/fState/spectators " << iState <<" "
|
||||
<< fState << " " << pspectators << G4endl
|
||||
<< " .. A,Z " << resA <<" "<< resZ << G4endl;
|
||||
}
|
||||
|
||||
G4LorentzRotation boost_fragments_here(momentum.boostVector());
|
||||
boost_fragments = boost_fragments_here;
|
||||
|
||||
// G4cout << " Fragment a,z, Mass Fragment, mass spect-mom, exitationE "
|
||||
// << resA <<" "<< resZ <<" "<< mFragment <<" "
|
||||
// << momentum.mag() <<" "<< momentum.mag() - mFragment
|
||||
// << " "<<theStatisticalExEnergy
|
||||
// << " "<< boost_fragments*pFragment<< G4endl;
|
||||
}
|
||||
else if(resA!=0)
|
||||
{
|
||||
G4ReactionProductVector::iterator ispectator;
|
||||
for (ispectator=spectators->begin();ispectator!=spectators->end();ispectator++)
|
||||
{
|
||||
(*ispectator)->SetNewlyAdded(true);
|
||||
// G4cout << "from spectator "
|
||||
// << (*ispectator)->GetDefinition()->GetParticleName() << " "
|
||||
// << (*ispectator)->GetMomentum()<< " "
|
||||
// << (*ispectator)->GetTotalEnergy() << G4endl;
|
||||
}
|
||||
}
|
||||
if (spectators) delete spectators;
|
||||
|
||||
// collect the evaporation part
|
||||
debug.push_back("the nucleon count balance");
|
||||
debug.push_back(resA);
|
||||
debug.push_back(resZ);
|
||||
if(proFrag) debug.push_back(proFrag->size());
|
||||
debug.dump();
|
||||
G4ReactionProductVector::iterator ii;
|
||||
G4LorentzVector pFragments(0);
|
||||
if(proFrag) for(ii=proFrag->begin(); ii!=proFrag->end(); ii++)
|
||||
{
|
||||
(*ii)->SetNewlyAdded(true);
|
||||
G4LorentzVector tmp((*ii)->GetMomentum(),(*ii)->GetTotalEnergy());
|
||||
tmp *= boost_fragments;
|
||||
(*ii)->SetMomentum(tmp.vect());
|
||||
(*ii)->SetTotalEnergy(tmp.e());
|
||||
// result->push_back(*ii);
|
||||
pFragments += tmp;
|
||||
}
|
||||
|
||||
// G4cout << "Fragmented p, momentum, delta " << pFragments <<" "<<momentum
|
||||
// <<" "<< pFragments-momentum << G4endl;
|
||||
debug.push_back("################# done with evaporation"); debug.dump();
|
||||
|
||||
// correct p/E of Cascade secondaries
|
||||
G4LorentzVector pCas=iState - pFragments;
|
||||
// G4cout <<" Going to correct from " << fState << " to " << pCas << G4endl;
|
||||
G4bool EnergyIsCorrect=EnergyAndMomentumCorrector(cascaders, pCas);
|
||||
if ( ! EnergyIsCorrect )
|
||||
{
|
||||
if(getenv("debug_G4BinaryLightIonReactionResults"))
|
||||
G4cout << "G4BinaryLightIonReaction E/P correction for nucleus failed, will try to correct overall" << G4endl;
|
||||
}
|
||||
|
||||
// Add deexcitation secondaries
|
||||
if(proFrag) for(ii=proFrag->begin(); ii!=proFrag->end(); ii++)
|
||||
{
|
||||
cascaders->push_back(*ii);
|
||||
}
|
||||
if ( ! EnergyIsCorrect )
|
||||
{
|
||||
if (! EnergyAndMomentumCorrector(cascaders,iState))
|
||||
{
|
||||
if(getenv("debug_G4BinaryLightIonReactionResults"))
|
||||
G4cout << "G4BinaryLightIonReaction E/P corrections failed" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Rotate to lab
|
||||
G4LorentzRotation toZ;
|
||||
toZ.rotateZ(-1*mom.phi());
|
||||
toZ.rotateY(-1*mom.theta());
|
||||
G4LorentzRotation toLab(toZ.inverse());
|
||||
|
||||
// Fill the particle change, while rotating. Boost from projectile breit-frame in case we swapped.
|
||||
// theResult.Clear();
|
||||
theResult.Clear();
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
G4double Etot(0);
|
||||
size_t i=0;
|
||||
for(i=0; i<cascaders->size(); i++)
|
||||
{
|
||||
if((*cascaders)[i]->GetNewlyAdded())
|
||||
{
|
||||
G4DynamicParticle * aNew =
|
||||
new G4DynamicParticle((*cascaders)[i]->GetDefinition(),
|
||||
(*cascaders)[i]->GetTotalEnergy(),
|
||||
(*cascaders)[i]->GetMomentum() );
|
||||
G4LorentzVector tmp = aNew->Get4Momentum();
|
||||
if(swapped)
|
||||
{
|
||||
tmp*=toBreit.inverse();
|
||||
}
|
||||
tmp *= toLab;
|
||||
aNew->Set4Momentum(tmp);
|
||||
theResult.AddSecondary(aNew);
|
||||
Etot += tmp.e();
|
||||
// G4cout << "LIBIC: Secondary " << aNew->GetDefinition()->GetParticleName()
|
||||
// <<" "<< aNew->GetMomentum()
|
||||
// <<" "<< aNew->GetTotalEnergy()
|
||||
// << G4endl;
|
||||
}
|
||||
}
|
||||
if(cascaders) delete cascaders;
|
||||
|
||||
G4ping debug1("debug_G4BinaryLightIonReactionResults");
|
||||
debug1.push_back("Result analysis, secondaries");
|
||||
debug1.push_back(theResult.GetNumberOfSecondaries());
|
||||
debug1.dump();
|
||||
debug1.push_back(" Energy conservation initial/final/delta(init-final) ");
|
||||
debug1.push_back(aTrack.GetTotalEnergy() + m_nucl);
|
||||
debug1.push_back(aTrack.GetTotalEnergy());
|
||||
debug1.push_back(m_nucl);
|
||||
debug1.push_back(Etot);
|
||||
debug1.push_back(aTrack.GetTotalEnergy() + m_nucl - Etot);
|
||||
debug1.dump();
|
||||
|
||||
if(getenv("BLICDEBUG") ) G4cerr << " ######### Binary Light Ion Reaction number ends ######### "<<eventcounter<<G4endl;
|
||||
|
||||
return &theResult;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
G4bool G4BinaryLightIonReaction::EnergyAndMomentumCorrector(
|
||||
G4ReactionProductVector* Output, G4LorentzVector& TotalCollisionMom)
|
||||
//****************************************************************************
|
||||
{
|
||||
const int nAttemptScale = 2500;
|
||||
const double ErrLimit = 1.E-6;
|
||||
if (Output->empty())
|
||||
return TRUE;
|
||||
G4LorentzVector SumMom(0);
|
||||
G4double SumMass = 0;
|
||||
G4double TotalCollisionMass = TotalCollisionMom.m();
|
||||
size_t i = 0;
|
||||
// Calculate sum hadron 4-momenta and summing hadron mass
|
||||
for(i = 0; i < Output->size(); i++)
|
||||
{
|
||||
SumMom += G4LorentzVector((*Output)[i]->GetMomentum(),(*Output)[i]->GetTotalEnergy());
|
||||
SumMass += (*Output)[i]->GetDefinition()->GetPDGMass();
|
||||
}
|
||||
// G4cout << " E/P corrector, SumMass, SumMom.m2, TotalMass "
|
||||
// << SumMass <<" "<< SumMom.m2() <<" "<<TotalCollisionMass<< G4endl;
|
||||
if (SumMass > TotalCollisionMass) return FALSE;
|
||||
SumMass = SumMom.m2();
|
||||
if (SumMass < 0) return FALSE;
|
||||
SumMass = sqrt(SumMass);
|
||||
|
||||
// Compute c.m.s. hadron velocity and boost KTV to hadron c.m.s.
|
||||
G4ThreeVector Beta = -SumMom.boostVector();
|
||||
// G4cout << " == pre boost 2 "<< SumMom.e()<< " "<< SumMom.mag()<<" "<< Beta <<G4endl;
|
||||
//--old Output->Boost(Beta);
|
||||
for(i = 0; i < Output->size(); i++)
|
||||
{
|
||||
G4LorentzVector mom = G4LorentzVector((*Output)[i]->GetMomentum(),(*Output)[i]->GetTotalEnergy());
|
||||
mom *= Beta;
|
||||
(*Output)[i]->SetMomentum(mom.vect());
|
||||
(*Output)[i]->SetTotalEnergy(mom.e());
|
||||
}
|
||||
|
||||
// Scale total c.m.s. hadron energy (hadron system mass).
|
||||
// It should be equal interaction mass
|
||||
G4double Scale = 0,OldScale=0;
|
||||
G4double factor = 1.;
|
||||
G4int cAttempt = 0;
|
||||
G4double Sum = 0;
|
||||
G4bool success = false;
|
||||
for(cAttempt = 0; cAttempt < nAttemptScale; cAttempt++)
|
||||
{
|
||||
Sum = 0;
|
||||
for(i = 0; i < Output->size(); i++)
|
||||
{
|
||||
G4LorentzVector HadronMom = G4LorentzVector((*Output)[i]->GetMomentum(),(*Output)[i]->GetTotalEnergy());
|
||||
HadronMom.setVect(HadronMom.vect()+ factor*Scale*HadronMom.vect());
|
||||
G4double E = sqrt(HadronMom.vect().mag2() + sqr((*Output)[i]->GetDefinition()->GetPDGMass()));
|
||||
HadronMom.setE(E);
|
||||
(*Output)[i]->SetMomentum(HadronMom.vect());
|
||||
(*Output)[i]->SetTotalEnergy(HadronMom.e());
|
||||
Sum += E;
|
||||
}
|
||||
OldScale=Scale;
|
||||
Scale = TotalCollisionMass/Sum - 1;
|
||||
if ( cAttempt > 10 )
|
||||
{
|
||||
// G4cout << " speed it up? " << abs(OldScale/(OldScale-Scale)) << G4endl;
|
||||
factor=std::max(1.,log(abs(OldScale/(OldScale-Scale))));
|
||||
// G4cout << " ? factor ? " << factor << G4endl;
|
||||
}
|
||||
// G4cout << "E/P corr - " << cAttempt << " " << Scale << G4endl;
|
||||
if (abs(Scale) <= ErrLimit)
|
||||
{
|
||||
if (getenv("debug_G4BinaryLightIonReactionResults")) G4cout << "E/p corrector: " << cAttempt << G4endl;
|
||||
success = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( (!success) && getenv("debug_G4BinaryLightIonReactionResults"))
|
||||
{
|
||||
G4cout << "G4G4BinaryLightIonReaction::EnergyAndMomentumCorrector - Warning"<<G4endl;
|
||||
G4cout << " Scale not unity at end of iteration loop: "<<TotalCollisionMass<<" "<<Sum<<" "<<Scale<<G4endl;
|
||||
G4cout << " Increase number of attempts or increase ERRLIMIT"<<G4endl;
|
||||
}
|
||||
|
||||
// Compute c.m.s. interaction velocity and KTV back boost
|
||||
Beta = TotalCollisionMom.boostVector();
|
||||
//--old Output->Boost(Beta);
|
||||
for(i = 0; i < Output->size(); i++)
|
||||
{
|
||||
G4LorentzVector mom = G4LorentzVector((*Output)[i]->GetMomentum(),(*Output)[i]->GetTotalEnergy());
|
||||
mom *= Beta;
|
||||
(*Output)[i]->SetMomentum(mom.vect());
|
||||
(*Output)[i]->SetTotalEnergy(mom.e());
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "G4FieldPropagation.hh"
|
||||
#include "G4HadronicException.hh"
|
||||
|
||||
const G4FieldPropagation & G4FieldPropagation::operator=(const G4FieldPropagation &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4FieldPropagation::operator= meant to be private");
|
||||
return *this;
|
||||
}
|
||||
|
||||
int G4FieldPropagation::operator==(const G4FieldPropagation &) const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int G4FieldPropagation::operator!=(const G4FieldPropagation &) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "G4GeneratorPrecompoundInterface.hh"
|
||||
#include "G4DynamicParticleVector.hh"
|
||||
#include "G4IonTable.hh"
|
||||
|
||||
//
|
||||
// HPW, 10DEC 98, the decay part originally written by Gunter Folger in his FTF-test-program.
|
||||
//
|
||||
|
||||
G4HadFinalState* G4GeneratorPrecompoundInterface::
|
||||
ApplyYourself(const G4HadProjectile &, G4Nucleus & )
|
||||
{
|
||||
std::cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."<< G4endl;
|
||||
std::cout << "This class is only a mediator between generator and precompound"<<G4endl;
|
||||
std::cout << "Please remove from your physics list."<<G4endl;
|
||||
throw G4HadronicException(__FILE__, __LINE__, "SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
|
||||
return new G4HadFinalState;
|
||||
}
|
||||
|
||||
G4ReactionProductVector* G4GeneratorPrecompoundInterface::
|
||||
Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
|
||||
{
|
||||
G4ReactionProductVector * theTotalResult = new G4ReactionProductVector;
|
||||
|
||||
// decay the strong resonances
|
||||
G4KineticTrackVector *result1, *secondaries, *result;
|
||||
result1=theSecondaries;
|
||||
result=new G4KineticTrackVector();
|
||||
|
||||
for (unsigned int aResult=0; aResult < result1->size(); aResult++)
|
||||
{
|
||||
G4ParticleDefinition * pdef;
|
||||
pdef=result1->operator[](aResult)->GetDefinition();
|
||||
secondaries=NULL;
|
||||
if ( pdef->IsShortLived() )
|
||||
{
|
||||
secondaries = result1->operator[](aResult)->Decay();
|
||||
}
|
||||
if ( secondaries == NULL )
|
||||
{
|
||||
result->push_back(result1->operator[](aResult));
|
||||
result1->operator[](aResult)=NULL; //protect for clearAndDestroy
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int aSecondary=0; aSecondary<secondaries->size(); aSecondary++)
|
||||
{
|
||||
result1->push_back(secondaries->operator[](aSecondary));
|
||||
}
|
||||
delete secondaries;
|
||||
}
|
||||
}
|
||||
std::for_each(result1->begin(), result1->end(), DeleteKineticTrack());
|
||||
delete result1;
|
||||
|
||||
|
||||
|
||||
// prepare the fragment
|
||||
G4Fragment anInitialState;
|
||||
G4int anA=theNucleus->GetMassNumber();
|
||||
G4int aZ=theNucleus->GetCharge();
|
||||
G4int numberOfEx = 0;
|
||||
G4int numberOfCh = 0;
|
||||
G4int numberOfHoles = 0;
|
||||
G4double exEnergy = 0;
|
||||
G4ThreeVector exciton3Momentum(0,0,0);
|
||||
// loop over secondaries
|
||||
for(unsigned int list=0; list < result->size(); list++)
|
||||
{
|
||||
G4KineticTrack *aTrack = result->operator[](list);
|
||||
if(aTrack->GetDefinition() != G4Proton::Proton() &&
|
||||
aTrack->GetDefinition() != G4Neutron::Neutron())
|
||||
{
|
||||
G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
|
||||
theNew->SetMomentum(aTrack->Get4Momentum().vect());
|
||||
theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
|
||||
theTotalResult->push_back(theNew);
|
||||
}
|
||||
else if(aTrack->Get4Momentum().t() - aTrack->Get4Momentum().mag()>80*MeV)
|
||||
{
|
||||
G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
|
||||
theNew->SetMomentum(aTrack->Get4Momentum().vect());
|
||||
theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
|
||||
theTotalResult->push_back(theNew);
|
||||
}
|
||||
else if(aTrack->GetPosition().mag() > theNucleus->GetNuclearRadius())
|
||||
{
|
||||
G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
|
||||
theNew->SetMomentum(aTrack->Get4Momentum().vect());
|
||||
theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
|
||||
theTotalResult->push_back(theNew);
|
||||
}
|
||||
else
|
||||
{
|
||||
// within the nucleus, neutron or proton
|
||||
// now calculate A, Z of the fragment, momentum, number of exciton states
|
||||
anA++;;
|
||||
numberOfEx++;
|
||||
aZ += G4int(aTrack->GetDefinition()->GetPDGCharge());
|
||||
numberOfCh += G4int(aTrack->GetDefinition()->GetPDGCharge());
|
||||
exciton3Momentum += aTrack->Get4Momentum().vect();
|
||||
exEnergy += (aTrack->Get4Momentum().t()-aTrack->Get4Momentum().m());
|
||||
}
|
||||
}
|
||||
|
||||
// loop over wounded nucleus
|
||||
G4Nucleon * theCurrentNucleon = theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : NULL;
|
||||
while(theCurrentNucleon != NULL)
|
||||
{
|
||||
if(theCurrentNucleon->AreYouHit())
|
||||
{
|
||||
numberOfHoles++;
|
||||
numberOfEx++;
|
||||
anA--;
|
||||
aZ -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge());
|
||||
exciton3Momentum -= theCurrentNucleon->Get4Momentum().vect();
|
||||
exEnergy+=theCurrentNucleon->GetBindingEnergy();
|
||||
}
|
||||
theCurrentNucleon = theNucleus->GetNextNucleon();
|
||||
}
|
||||
|
||||
if(!theDeExcitation)
|
||||
{
|
||||
// throw G4HadronicException(__FILE__, __LINE__, "Please register an evaporation phase with G4GeneratorPrecompoundInterface.");
|
||||
}
|
||||
else if(0!=anA && 0!=aZ)
|
||||
{
|
||||
G4double residualMass =
|
||||
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(aZ ,anA);
|
||||
residualMass += exEnergy;
|
||||
G4LorentzVector exciton4Momentum(exciton3Momentum,
|
||||
sqrt(exciton3Momentum.mag2()+residualMass*residualMass));
|
||||
|
||||
anInitialState.SetA(anA);
|
||||
anInitialState.SetZ(aZ);
|
||||
anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
|
||||
anInitialState.SetNumberOfCharged(numberOfCh);
|
||||
anInitialState.SetNumberOfHoles(numberOfHoles);
|
||||
anInitialState.SetMomentum(exciton4Momentum);
|
||||
// anInitialState.SetExcitationEnergy(exEnergy); // now a redundant call.
|
||||
|
||||
// call pre-compound
|
||||
const G4Fragment aFragment(anInitialState);
|
||||
G4ReactionProductVector * aPreResult = theDeExcitation->DeExcite(aFragment);
|
||||
// G4ReactionProductVector * aPreResult = new G4ReactionProductVector;
|
||||
// fill pre-compound part into the result, and return
|
||||
for(unsigned int ll=0; ll<aPreResult->size(); ll++)
|
||||
{
|
||||
theTotalResult->push_back(aPreResult->operator[](ll));
|
||||
}
|
||||
delete aPreResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
// throw G4HadronicException(__FILE__, __LINE__, "Please register an evaporation phase with G4GeneratorPrecompoundInterface.");
|
||||
}
|
||||
// now return
|
||||
|
||||
std::for_each(result->begin(), result->end(), DeleteKineticTrack());
|
||||
delete result;
|
||||
return theTotalResult;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KM_NucleonEqRhs.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#include "G4KM_NucleonEqRhs.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
|
||||
|
||||
G4KM_NucleonEqRhs::G4KM_NucleonEqRhs(G4KM_DummyField *field,
|
||||
G4V3DNucleus * nucleus) :
|
||||
G4Mag_EqRhs(field), theNucleus(nucleus)
|
||||
{
|
||||
theMass = 0.;
|
||||
A = theNucleus->GetMassNumber();
|
||||
factor = hbarc*hbarc*pow(3.*pi2*A,2./3.)/3.;
|
||||
}
|
||||
|
||||
|
||||
void G4KM_NucleonEqRhs::EvaluateRhsGivenB(const G4double y[],
|
||||
const G4double *,
|
||||
G4double dydx[]) const
|
||||
{
|
||||
G4double yMod = sqrt(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]);
|
||||
G4double e = sqrt(theMass*theMass+y[3]*y[3]+y[4]*y[4]+y[5]*y[5]);
|
||||
|
||||
// y[0..2] is position
|
||||
// y[3..5] is momentum (and not mom.direction)
|
||||
|
||||
dydx[0] = c_light*y[3]/e; //
|
||||
dydx[1] = c_light*y[4]/e; // dq/dt=dH/dp = c*p/e
|
||||
dydx[2] = c_light*y[5]/e; //
|
||||
|
||||
/*
|
||||
* // debug
|
||||
* G4cout << " Nucleon RHS : 0..2(dpos/dt) " <<
|
||||
* dydx[0] << " " <<
|
||||
* dydx[1] << " " <<
|
||||
* dydx[2] << " " << G4endl;
|
||||
*/
|
||||
|
||||
|
||||
// V=K*rho(r) ==> dydx[3] = -dV/dr*dr/dx = -K*d(rho)/dr*dr/dx.
|
||||
// GF should be V=K*rho(r) ==> dydx[3] = -dV/dr*dr/dx = -K*d(rho)/dr*dr/dt
|
||||
// GF and dV/dt = dE/dt ==> dp/dt = dE/dt * dp/dE = dE/dt *e/p
|
||||
// Idem for dydx[4] and dydx[5]
|
||||
|
||||
G4ThreeVector pos(y[0],y[1],y[2]);
|
||||
|
||||
const G4VNuclearDensity * nuclearDensity=theNucleus->GetNuclearDensity();
|
||||
|
||||
// do not check for theMass != 0 : it is an error and core dump will signal it
|
||||
|
||||
G4double density= nuclearDensity->GetDensity(pos);
|
||||
G4double deriv(0);
|
||||
if (density > 0 ) deriv = (factor/theMass)*
|
||||
pow(density, -1./3.)*nuclearDensity->GetDeriv(pos);
|
||||
|
||||
// dydx[3] = yMod == 0 ? 0 : -deriv*y[0]/yMod;
|
||||
// dydx[4] = yMod == 0 ? 0 : -deriv*y[1]/yMod;
|
||||
// dydx[5] = yMod == 0 ? 0 : -deriv*y[2]/yMod;
|
||||
dydx[3] = yMod == 0 ? 0 : deriv*y[0]/yMod*c_light;
|
||||
dydx[4] = yMod == 0 ? 0 : deriv*y[1]/yMod*c_light;
|
||||
dydx[5] = yMod == 0 ? 0 : deriv*y[2]/yMod*c_light;
|
||||
|
||||
|
||||
/*
|
||||
* // debug
|
||||
* G4cout << " Nucleon RHS : 3..5(dE/dt) " <<
|
||||
* dydx[3] << " " <<
|
||||
* dydx[4] << " " <<
|
||||
* dydx[5] << " " << G4endl;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KM_OpticalEqRhs.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#include "G4KM_OpticalEqRhs.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
|
||||
G4KM_OpticalEqRhs::G4KM_OpticalEqRhs(G4KM_DummyField *field,
|
||||
G4V3DNucleus * nucleus) :
|
||||
G4Mag_EqRhs(field), theNucleus(nucleus)
|
||||
{
|
||||
theFactor = 0;
|
||||
theMass = 0;
|
||||
}
|
||||
|
||||
|
||||
void G4KM_OpticalEqRhs::SetFactor(G4double mass, G4double opticalParameter)
|
||||
{
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = mass*nucleusMass/(mass+nucleusMass);
|
||||
|
||||
G4double nucleonMass = (proton_mass_c2+neutron_mass_c2)/2;
|
||||
|
||||
// _factor in (MeV*fermi)*fermi/MeV = fermi*fermi -- need to have A as density normalized to 1
|
||||
theFactor = 2*pi*hbarc*hbarc*(1+mass/nucleonMass)* opticalParameter/reducedMass * A;
|
||||
|
||||
theMass = mass;
|
||||
}
|
||||
|
||||
|
||||
void G4KM_OpticalEqRhs::EvaluateRhsGivenB(const G4double y[], const G4double *,
|
||||
G4double dydx[]) const
|
||||
{
|
||||
G4double yMod = sqrt(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]);
|
||||
G4double e = sqrt(theMass*theMass+y[3]*y[3]+y[4]*y[4]+y[5]*y[5]);
|
||||
dydx[0] = c_light*y[3]/e; //
|
||||
dydx[1] = c_light*y[4]/e; // dq/dt=dH/dp = c*p/e
|
||||
dydx[2] = c_light*y[5]/e; //
|
||||
|
||||
// V=K*rho(r) ==> dydx[3] = -dV/dr*dr/dx = -K*d(rho)/dr*dr/dx.
|
||||
// Idem for dydx[4] and dydx[5]
|
||||
|
||||
const G4VNuclearDensity * nuclearDensity=theNucleus->GetNuclearDensity();
|
||||
|
||||
G4ThreeVector pos(y[0],y[1],y[2]);
|
||||
G4double deriv = theFactor*nuclearDensity->GetDeriv(pos);
|
||||
|
||||
dydx[3] = yMod == 0 ? 0 : -deriv*y[0]/yMod*c_light;
|
||||
dydx[4] = yMod == 0 ? 0 : -deriv*y[1]/yMod*c_light;
|
||||
dydx[5] = yMod == 0 ? 0 : -deriv*y[2]/yMod*c_light;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KaonMinusField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4KaonMinusField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4KaonMinusField::G4KaonMinusField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
|
||||
G4KaonMinusField::~G4KaonMinusField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4KaonMinusField & G4KaonMinusField::operator=(const G4KaonMinusField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4KaonMinusField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4KaonMinusField::operator==(const G4KaonMinusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4KaonMinusField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4KaonMinusField::operator!=(const G4KaonMinusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4KaonMinusField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4KaonMinusField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4double kaonMass = G4KaonMinus::KaonMinus()->GetPDGMass();
|
||||
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
|
||||
|
||||
G4double density = theNucleus->GetNuclearDensity()->GetDensity(aPosition);
|
||||
|
||||
return -2.*pi*hbarc*hbarc/reducedMass*(2.0)*theCoeff*density+GetBarrier();
|
||||
}
|
||||
|
||||
|
||||
G4double G4KaonMinusField::GetBarrier()
|
||||
{
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + pow(A,1./3.));
|
||||
return -coulombBarrier;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KaonPlusField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4KaonPlusField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4KaonPlusField::G4KaonPlusField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
|
||||
G4KaonPlusField::~G4KaonPlusField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4KaonPlusField & G4KaonPlusField::operator=(const G4KaonPlusField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4KaonPlusField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4KaonPlusField::operator==(const G4KaonPlusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4KaonPlusField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4KaonPlusField::operator!=(const G4KaonPlusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4KaonPlusField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4KaonPlusField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4double kaonMass = G4KaonPlus::KaonPlus()->GetPDGMass();
|
||||
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
|
||||
|
||||
G4double density = theNucleus->GetNuclearDensity()->GetDensity(aPosition);
|
||||
|
||||
return -2.*pi*hbarc*hbarc/reducedMass*(2.0)*theCoeff*density+GetBarrier();
|
||||
}
|
||||
|
||||
G4double G4KaonPlusField::GetBarrier()
|
||||
{
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + pow(A,1./3.));
|
||||
return coulombBarrier;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4KaonZeroField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4KaonZeroField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4KaonZero.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4KaonZeroField::G4KaonZeroField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
|
||||
G4KaonZeroField::~G4KaonZeroField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4KaonZeroField & G4KaonZeroField::operator=(const G4KaonZeroField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4KaonZeroField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4KaonZeroField::operator==(const G4KaonZeroField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4KaonZeroField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4KaonZeroField::operator!=(const G4KaonZeroField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4KaonZeroField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4KaonZeroField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4double kaonMass = G4KaonZero::KaonZero()->GetPDGMass();
|
||||
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
|
||||
|
||||
G4double density = theNucleus->GetNuclearDensity()->GetDensity(aPosition);
|
||||
|
||||
return -2.*pi*hbarc*hbarc/reducedMass*(2.0)*theCoeff*density;
|
||||
}
|
||||
|
||||
G4double G4KaonZeroField::GetBarrier()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4NeutronField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4NeutronField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
|
||||
|
||||
G4NeutronField::G4NeutronField(G4V3DNucleus * aNucleus) :
|
||||
G4VNuclearField(aNucleus), theDensity(theNucleus->GetNuclearDensity())
|
||||
{
|
||||
theA = theNucleus->GetMassNumber();
|
||||
theZ = theNucleus->GetCharge();
|
||||
theFermi.Init(theA, theZ);
|
||||
theR = 2.*theNucleus->GetOuterRadius();
|
||||
G4double aR=0;
|
||||
while(aR<theR)
|
||||
{
|
||||
G4ThreeVector aPosition(0,0,aR);
|
||||
G4double density = GetDensity(aPosition);
|
||||
G4double fermiMom = GetFermiMomentum(density);
|
||||
theFermiMomBuffer.push_back(fermiMom);
|
||||
aR+=0.3*fermi;
|
||||
}
|
||||
{
|
||||
G4ThreeVector aPosition(0,0,theR);
|
||||
G4double density = GetDensity(aPosition);
|
||||
G4double fermiMom = GetFermiMomentum(density);
|
||||
theFermiMomBuffer.push_back(fermiMom);
|
||||
}
|
||||
{
|
||||
G4ThreeVector aPosition(0,0,theR+0.001*fermi);
|
||||
theFermiMomBuffer.push_back(0);
|
||||
}
|
||||
{
|
||||
G4ThreeVector aPosition(0,0,1.*m);
|
||||
theFermiMomBuffer.push_back(0);
|
||||
}
|
||||
}
|
||||
|
||||
G4NeutronField::~G4NeutronField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4NeutronField & G4NeutronField::operator=(const G4NeutronField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4NeutronField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4NeutronField::operator==(const G4NeutronField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4NeutronField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4NeutronField::operator!=(const G4NeutronField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4NeutronField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
G4double G4NeutronField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
G4double x = aPosition.mag();
|
||||
G4int index = static_cast<G4int>(x/(0.3*fermi) );
|
||||
if(index+2> static_cast<G4int>(theFermiMomBuffer.size())) return theFermiMomBuffer.back();
|
||||
G4double y1 = theFermiMomBuffer[index];
|
||||
G4double y2 = theFermiMomBuffer[index+1];
|
||||
G4double x1 = (0.3*fermi)*index;
|
||||
G4double x2 = (0.3*fermi)*(index+1);
|
||||
G4double fermiMom = y1 + (x-x1)*(y2-y1)/(x2-x1);
|
||||
return -1*(fermiMom*fermiMom)/(2*neutron_mass_c2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4NeutronField::GetBarrier()
|
||||
{
|
||||
/*
|
||||
* G4double A = theNucleus->GetMassNumber();
|
||||
* G4double Z = theNucleus->GetCharge();
|
||||
*
|
||||
* return G4NucleiPropertiesTable::GetBindingEnergy(Z, A)/A;
|
||||
*/
|
||||
return 0.;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4PionMinusField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4PionMinusField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4PionMinusField::G4PionMinusField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
|
||||
G4PionMinusField::~G4PionMinusField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4PionMinusField & G4PionMinusField::operator=(const G4PionMinusField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4PionMinusField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4PionMinusField::operator==(const G4PionMinusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4PionMinusField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4PionMinusField::operator!=(const G4PionMinusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4PionMinusField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
G4double G4PionMinusField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double pionMinusMass = G4PionMinus::PionMinus()->GetPDGMass();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = pionMinusMass*nucleusMass/(pionMinusMass+nucleusMass);
|
||||
|
||||
G4double density = A*theNucleus->GetNuclearDensity()->GetDensity(aPosition);
|
||||
G4double nucleonMass = (proton_mass_c2+neutron_mass_c2)/2;
|
||||
|
||||
return 2.*pi*hbarc*hbarc/reducedMass*(1+pionMinusMass/nucleonMass)*theCoeff*density + GetBarrier();
|
||||
}
|
||||
|
||||
|
||||
G4double G4PionMinusField::GetBarrier()
|
||||
{
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + pow(A,1./3.));
|
||||
return -coulombBarrier;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4PionPlusField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4PionPlusField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
|
||||
G4PionPlusField::G4PionPlusField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
|
||||
G4PionPlusField::~G4PionPlusField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4PionPlusField & G4PionPlusField::operator=(const G4PionPlusField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4PionPlusField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4PionPlusField::operator==(const G4PionPlusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4PionPlusField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4PionPlusField::operator!=(const G4PionPlusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4PionPlusField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
G4double G4PionPlusField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4double pionPlusMass = G4PionPlus::PionPlus()->GetPDGMass();
|
||||
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = pionPlusMass*nucleusMass/(pionPlusMass+nucleusMass);
|
||||
|
||||
G4double density = A*theNucleus->GetNuclearDensity()->GetDensity(aPosition);
|
||||
G4double nucleonMass = (proton_mass_c2+neutron_mass_c2)/2;
|
||||
|
||||
return 2.*pi*hbarc*hbarc/reducedMass*(1+pionPlusMass/nucleonMass)*theCoeff*density + GetBarrier();
|
||||
}
|
||||
|
||||
|
||||
G4double G4PionPlusField::GetBarrier()
|
||||
{
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + pow(A,1./3.));
|
||||
return coulombBarrier;
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4PionZeroField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4PionZeroField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
|
||||
G4PionZeroField::G4PionZeroField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
|
||||
G4PionZeroField::~G4PionZeroField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4PionZeroField & G4PionZeroField::operator=(const G4PionZeroField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4PionZeroField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4PionZeroField::operator==(const G4PionZeroField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4PionZeroField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4PionZeroField::operator!=(const G4PionZeroField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4PionZeroField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
G4double G4PionZeroField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4double pionZeroMass = G4PionZero::PionZero()->GetPDGMass();
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = pionZeroMass*nucleusMass/(pionZeroMass+nucleusMass);
|
||||
|
||||
|
||||
G4double density = A*theNucleus->GetNuclearDensity()->GetDensity(aPosition);
|
||||
G4double nucleonMass = (proton_mass_c2+neutron_mass_c2)/2;
|
||||
|
||||
return 2.*pi*hbarc*hbarc/reducedMass*(1+pionZeroMass/nucleonMass)*theCoeff*density;
|
||||
}
|
||||
|
||||
G4double G4PionZeroField::GetBarrier()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4ProtonField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4ProtonField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
G4ProtonField::G4ProtonField(G4V3DNucleus * aNucleus) :
|
||||
G4VNuclearField(aNucleus), theDensity(theNucleus->GetNuclearDensity())
|
||||
{
|
||||
theA = theNucleus->GetMassNumber();
|
||||
theZ = theNucleus->GetCharge();
|
||||
theBarrier = GetBarrier();
|
||||
theRadius = 2.*theNucleus->GetOuterRadius();
|
||||
theFermi.Init(theA, theZ);
|
||||
G4double aR=0;
|
||||
while(aR<theRadius)
|
||||
{
|
||||
G4ThreeVector aPosition(0,0,aR);
|
||||
G4double density = GetDensity(aPosition);
|
||||
G4double fermiMom = GetFermiMomentum(density);
|
||||
theFermiMomBuffer.push_back(fermiMom);
|
||||
aR+=0.3*fermi;
|
||||
}
|
||||
{
|
||||
G4ThreeVector aPosition(0,0,theRadius);
|
||||
G4double density = GetDensity(aPosition);
|
||||
G4double fermiMom = GetFermiMomentum(density);
|
||||
theFermiMomBuffer.push_back(fermiMom);
|
||||
}
|
||||
{
|
||||
G4ThreeVector aPosition(0,0,theRadius+0.001*fermi);
|
||||
theFermiMomBuffer.push_back(0);
|
||||
}
|
||||
{
|
||||
G4ThreeVector aPosition(0,0,1.*m);
|
||||
theFermiMomBuffer.push_back(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
G4ProtonField::~G4ProtonField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4ProtonField & G4ProtonField::operator=(const G4ProtonField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4ProtonField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4ProtonField::operator==(const G4ProtonField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4ProtonField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4ProtonField::operator!=(const G4ProtonField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4ProtonField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
G4double G4ProtonField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
//G4cout << " Fermi Potential " << (fermiMom*fermiMom)/(2*proton_mass_c2) <<G4endl;
|
||||
G4double x = aPosition.mag();
|
||||
G4int index = static_cast<G4int>(x/(0.3*fermi) );
|
||||
if(index+2>static_cast<G4int>(theFermiMomBuffer.size())) return theFermiMomBuffer.back();
|
||||
G4double y1 = theFermiMomBuffer[index];
|
||||
G4double y2 = theFermiMomBuffer[index+1];
|
||||
G4double x1 = (0.3*fermi)*index;
|
||||
G4double x2 = (0.3*fermi)*(index+1);
|
||||
G4double fermiMom = y1 + (x-x1)*(y2-y1)/(x2-x1);
|
||||
G4double y = -1*(fermiMom*fermiMom)/(2*proton_mass_c2)+theBarrier;
|
||||
// G4cout <<" Protonfield test "<<index<<" "<< x1<<" "<<y1<<" "<<x2<<" "<<y2<<" "<<x<<" "<<y<<" "<<theBarrier<<G4endl;
|
||||
return y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4ProtonField::GetBarrier()
|
||||
{
|
||||
G4double coulombBarrier = (1.44/1.14) * MeV * theZ / (1.0 + pow(theA,1./3.));
|
||||
//GF G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
|
||||
G4double bindingEnergy =0;
|
||||
/*
|
||||
* G4cout << " coulombBarrier/bindingEnergy : "
|
||||
* << coulombBarrier << " /" << bindingEnergy << G4endl;
|
||||
*/
|
||||
return bindingEnergy/theA+coulombBarrier;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,376 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4RKFieldIntegrator
|
||||
#include "G4RKFieldIntegrator.hh"
|
||||
#include "G4NucleiProperties.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4NuclearFermiDensity.hh"
|
||||
#include "G4NuclearShellModelDensity.hh"
|
||||
#include "G4Nucleon.hh"
|
||||
|
||||
// Class G4RKFieldIntegrator
|
||||
//*************************************************************************************************************************************
|
||||
|
||||
// only theActive are propagated, nothing else
|
||||
// only theSpectators define the field, nothing else
|
||||
|
||||
void G4RKFieldIntegrator::Transport(G4KineticTrackVector &theActive, const G4KineticTrackVector &theSpectators, G4double theTimeStep)
|
||||
{
|
||||
(void)theActive;
|
||||
(void)theSpectators;
|
||||
(void)theTimeStep;
|
||||
}
|
||||
|
||||
|
||||
G4double G4RKFieldIntegrator::CalculateTotalEnergy(const G4KineticTrackVector& Barions)
|
||||
{
|
||||
const G4double Alpha = 0.25/fermi/fermi;
|
||||
const G4double t1 = -7264.04*fermi*fermi*fermi;
|
||||
const G4double tGamma = 87.65*fermi*fermi*fermi*fermi*fermi*fermi;
|
||||
// const G4double Gamma = 1.676;
|
||||
const G4double Vo = -0.498*fermi;
|
||||
const G4double GammaY = 1.4*fermi;
|
||||
|
||||
G4double Etot = 0;
|
||||
G4int nBarion = Barions.size();
|
||||
for(G4int c1 = 0; c1 < nBarion; c1++)
|
||||
{
|
||||
G4KineticTrack* p1 = Barions.operator[](c1);
|
||||
// Ekin
|
||||
Etot += p1->Get4Momentum().e();
|
||||
for(G4int c2 = c1 + 1; c2 < nBarion; c2++)
|
||||
{
|
||||
G4KineticTrack* p2 = Barions.operator[](c2);
|
||||
G4ThreeVector rv = p1->GetPosition() - p2->GetPosition();
|
||||
G4double r12 = sqrt(rv*rv)*fermi;
|
||||
|
||||
// Esk2
|
||||
Etot += t1*pow(Alpha/pi, 3/2)*exp(-Alpha*r12*r12);
|
||||
|
||||
// Eyuk
|
||||
Etot += Vo*0.5/r12*exp(1/(4*Alpha*GammaY*GammaY))*
|
||||
(exp(-r12/GammaY)*(1 - Erf(0.5/GammaY/sqrt(Alpha) - sqrt(Alpha)*r12)) -
|
||||
exp( r12/GammaY)*(1 - Erf(0.5/GammaY/sqrt(Alpha) + sqrt(Alpha)*r12)));
|
||||
|
||||
// Ecoul
|
||||
Etot += 1.44*p1->GetDefinition()->GetPDGCharge()*p2->GetDefinition()->GetPDGCharge()/r12*Erf(sqrt(Alpha)*r12);
|
||||
|
||||
// Epaul
|
||||
Etot = 0;
|
||||
|
||||
for(G4int c3 = c2 + 1; c3 < nBarion; c3++)
|
||||
{
|
||||
G4KineticTrack* p3 = Barions.operator[](c3);
|
||||
G4ThreeVector rv = p1->GetPosition() - p3->GetPosition();
|
||||
G4double r13 = sqrt(rv*rv)*fermi;
|
||||
|
||||
// Esk3
|
||||
Etot = tGamma*pow(4*Alpha*Alpha/3/pi/pi, 1.5)*exp(-Alpha*(r12*r12 + r13*r13));
|
||||
}
|
||||
}
|
||||
}
|
||||
return Etot;
|
||||
}
|
||||
|
||||
//************************************************************************************************
|
||||
// originated from the Numerical recipes error function
|
||||
G4double G4RKFieldIntegrator::Erf(G4double X)
|
||||
{
|
||||
const G4double Z1 = 1;
|
||||
const G4double HF = Z1/2;
|
||||
const G4double C1 = 0.56418958;
|
||||
|
||||
const G4double P10 = +3.6767877;
|
||||
const G4double Q10 = +3.2584593;
|
||||
const G4double P11 = -9.7970465E-2;
|
||||
|
||||
static G4double P2[5] = { 7.3738883, 6.8650185, 3.0317993, 0.56316962, 4.3187787e-5 };
|
||||
static G4double Q2[5] = { 7.3739609, 15.184908, 12.79553, 5.3542168, 1. };
|
||||
|
||||
const G4double P30 = -1.2436854E-1;
|
||||
const G4double Q30 = +4.4091706E-1;
|
||||
const G4double P31 = -9.6821036E-2;
|
||||
|
||||
G4double V = abs(X);
|
||||
G4double H;
|
||||
G4double Y;
|
||||
G4int c1;
|
||||
|
||||
if(V < HF)
|
||||
{
|
||||
Y = V*V;
|
||||
H = X*(P10 + P11*Y)/(Q10+Y);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(V < 4)
|
||||
{
|
||||
G4double AP = P2[4];
|
||||
G4double AQ = Q2[4];
|
||||
for(c1 = 3; c1 >= 0; c1--)
|
||||
{
|
||||
AP = P2[c1] + V*AP;
|
||||
AQ = Q2[c1] + V*AQ;
|
||||
}
|
||||
H = 1 - exp(-V*V)*AP/AQ;
|
||||
}
|
||||
else
|
||||
{
|
||||
Y = 1./V*V;
|
||||
H = 1 - exp(-V*V)*(C1+Y*(P30 + P31*Y)/(Q30 + Y))/V;
|
||||
}
|
||||
if (X < 0)
|
||||
H =- H;
|
||||
}
|
||||
return H;
|
||||
}
|
||||
|
||||
//************************************************************************************************
|
||||
//This is a QMD version to calculate excitation energy of a fragment,
|
||||
//which consists from G4KTV &the Particles
|
||||
/*
|
||||
G4double G4RKFieldIntegrator::GetExcitationEnergy(const G4KineticTrackVector &theParticles)
|
||||
{
|
||||
// Excitation energy of a fragment consisting from A nucleons and Z protons
|
||||
// is Etot - Z*Mp - (A - Z)*Mn - B(A, Z), where B(A,Z) is the binding energy of fragment
|
||||
// and Mp, Mn are proton and neutron mass, respectively.
|
||||
G4int NZ = 0;
|
||||
G4int NA = 0;
|
||||
G4double Etot = CalculateTotalEnergy(theParticles);
|
||||
for(G4int cParticle = 0; cParticle < theParticles.length(); cParticle++)
|
||||
{
|
||||
G4KineticTrack* pKineticTrack = theParticles.at(cParticle);
|
||||
G4int Encoding = abs(pKineticTrack->GetDefinition()->GetPDGEncoding());
|
||||
if (Encoding == 2212)
|
||||
NZ++, NA++;
|
||||
if (Encoding == 2112)
|
||||
NA++;
|
||||
Etot -= pKineticTrack->GetDefinition()->GetPDGMass();
|
||||
}
|
||||
return Etot - G4NucleiProperties::GetBindingEnergy(NZ, NA);
|
||||
}
|
||||
*/
|
||||
|
||||
//*************************************************************************************************************************************
|
||||
//This is a simplified method to get excitation energy of a residual
|
||||
// nucleus with nHitNucleons.
|
||||
G4double G4RKFieldIntegrator::GetExcitationEnergy(G4int nHitNucleons, const G4KineticTrackVector &)
|
||||
{
|
||||
const G4double MeanE = 50;
|
||||
G4double Sum = 0;
|
||||
for(G4int c1 = 0; c1 < nHitNucleons; c1++)
|
||||
{
|
||||
Sum += -MeanE*log(G4UniformRand());
|
||||
}
|
||||
return Sum;
|
||||
}
|
||||
//*************************************************************************************************************************************
|
||||
|
||||
/*
|
||||
//This is free propagation of particles for CASCADE mode. Target nucleons should be frozen
|
||||
void G4RKFieldIntegrator::Integrate(G4KineticTrackVector& theParticles)
|
||||
{
|
||||
for(G4int cParticle = 0; cParticle < theParticles.length(); cParticle++)
|
||||
{
|
||||
G4KineticTrack* pKineticTrack = theParticles.at(cParticle);
|
||||
pKineticTrack->SetPosition(pKineticTrack->GetPosition() + theTimeStep*pKineticTrack->Get4Momentum().boostVector());
|
||||
}
|
||||
}
|
||||
*/
|
||||
//*************************************************************************************************************************************
|
||||
|
||||
void G4RKFieldIntegrator::Integrate(const G4KineticTrackVector& theBarions, G4double theTimeStep)
|
||||
{
|
||||
for(size_t cParticle = 0; cParticle < theBarions.size(); cParticle++)
|
||||
{
|
||||
G4KineticTrack* pKineticTrack = theBarions[cParticle];
|
||||
pKineticTrack->SetPosition(pKineticTrack->GetPosition() + theTimeStep*pKineticTrack->Get4Momentum().boostVector());
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************************************************************************
|
||||
|
||||
// constant to calculate theCoulomb barrier
|
||||
const G4double G4RKFieldIntegrator::coulomb = 1.44 / 1.14 * MeV;
|
||||
|
||||
// kaon's potential constant (real part only)
|
||||
// 0.35 + i0.82 or 0.63 + i0.89 fermi
|
||||
const G4double G4RKFieldIntegrator::a_kaon = 0.35;
|
||||
|
||||
// pion's potential constant (real part only)
|
||||
//!! for pions it has todiffer from kaons
|
||||
// 0.35 + i0.82 or 0.63 + i0.89 fermi
|
||||
const G4double G4RKFieldIntegrator::a_pion = 0.35;
|
||||
|
||||
// antiproton's potential constant (real part only)
|
||||
// 1.53 + i2.50 fermi
|
||||
const G4double G4RKFieldIntegrator::a_antiproton = 1.53;
|
||||
|
||||
// methods for calculating potentials for different types of particles
|
||||
// aPosition is relative to the nucleus center
|
||||
G4double G4RKFieldIntegrator::GetNeutronPotential(G4double )
|
||||
{
|
||||
/*
|
||||
const G4double Mn = 939.56563 * MeV; // mass of nuetron
|
||||
|
||||
G4VNuclearDensity *theDencity;
|
||||
if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
|
||||
else theDencity = new G4NuclearFermiDensity(theA, theZ);
|
||||
|
||||
// GetDencity() accepts only G4ThreeVector so build it:
|
||||
G4ThreeVector aPosition(0.0, 0.0, radius);
|
||||
G4double density = theDencity->GetDensity(aPosition);
|
||||
delete theDencity;
|
||||
|
||||
G4FermiMomentum *fm = new G4FermiMomentum();
|
||||
fm->Init(theA, theZ);
|
||||
G4double fermiMomentum = fm->GetFermiMomentum(density);
|
||||
delete fm;
|
||||
|
||||
return sqr(fermiMomentum)/(2 * Mn)
|
||||
+ G4CreateNucleus::GetBindingEnergy(theZ, theA)/theA;
|
||||
//+ G4NucleiProperties::GetBindingEnergy(theZ, theA)/theA;
|
||||
*/
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
G4double G4RKFieldIntegrator::GetProtonPotential(G4double )
|
||||
{
|
||||
/*
|
||||
// calculate Coulomb barrier value
|
||||
G4double theCoulombBarrier = coulomb * theZ/(1. + pow(theA, 1./3.));
|
||||
const G4double Mp = 938.27231 * MeV; // mass of proton
|
||||
|
||||
G4VNuclearDensity *theDencity;
|
||||
if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
|
||||
else theDencity = new G4NuclearFermiDensity(theA, theZ);
|
||||
|
||||
// GetDencity() accepts only G4ThreeVector so build it:
|
||||
G4ThreeVector aPosition(0.0, 0.0, radius);
|
||||
G4double density = theDencity->GetDensity(aPosition);
|
||||
delete theDencity;
|
||||
|
||||
G4FermiMomentum *fm = new G4FermiMomentum();
|
||||
fm->Init(theA, theZ);
|
||||
G4double fermiMomentum = fm->GetFermiMomentum(density);
|
||||
delete fm;
|
||||
|
||||
return sqr(fermiMomentum)/ (2 * Mp)
|
||||
+ G4CreateNucleus::GetBindingEnergy(theZ, theA)/theA;
|
||||
//+ G4NucleiProperties::GetBindingEnergy(theZ, theA)/theA
|
||||
+ theCoulombBarrier;
|
||||
*/
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
G4double G4RKFieldIntegrator::GetAntiprotonPotential(G4double )
|
||||
{
|
||||
/*
|
||||
//G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
|
||||
G4double theM = theZ * G4Proton::Proton()->GetPDGMass()
|
||||
+ (theA - theZ) * G4Neutron::Neutron()->GetPDGMass()
|
||||
+ G4CreateNucleus::GetBindingEnergy(theZ, theA);
|
||||
|
||||
const G4double Mp = 938.27231 * MeV; // mass of proton
|
||||
G4double mu = (theM * Mp)/(theM + Mp);
|
||||
|
||||
// antiproton's potential coefficient
|
||||
// V = coeff_antiproton * nucleus_density
|
||||
G4double coeff_antiproton = -2.*pi/mu * (1. + Mp) * a_antiproton;
|
||||
|
||||
G4VNuclearDensity *theDencity;
|
||||
if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
|
||||
else theDencity = new G4NuclearFermiDensity(theA, theZ);
|
||||
|
||||
// GetDencity() accepts only G4ThreeVector so build it:
|
||||
G4ThreeVector aPosition(0.0, 0.0, radius);
|
||||
G4double density = theDencity->GetDensity(aPosition);
|
||||
delete theDencity;
|
||||
|
||||
return coeff_antiproton * density;
|
||||
*/
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
G4double G4RKFieldIntegrator::GetKaonPotential(G4double )
|
||||
{
|
||||
/*
|
||||
//G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
|
||||
G4double theM = theZ * G4Proton::Proton()->GetPDGMass()
|
||||
+ (theA - theZ) * G4Neutron::Neutron()->GetPDGMass()
|
||||
+ G4CreateNucleus::GetBindingEnergy(theZ, theA);
|
||||
|
||||
const G4double Mk = 496. * MeV; // mass of "kaon"
|
||||
G4double mu = (theM * Mk)/(theM + Mk);
|
||||
|
||||
// kaon's potential coefficient
|
||||
// V = coeff_kaon * nucleus_density
|
||||
G4double coeff_kaon = -2.*pi/mu * (1. + Mk/theM) * a_kaon;
|
||||
|
||||
G4VNuclearDensity *theDencity;
|
||||
if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
|
||||
else theDencity = new G4NuclearFermiDensity(theA, theZ);
|
||||
|
||||
// GetDencity() accepts only G4ThreeVector so build it:
|
||||
G4ThreeVector aPosition(0.0, 0.0, radius);
|
||||
G4double density = theDencity->GetDensity(aPosition);
|
||||
delete theDencity;
|
||||
|
||||
return coeff_kaon * density;
|
||||
*/
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
G4double G4RKFieldIntegrator::GetPionPotential(G4double )
|
||||
{
|
||||
/*
|
||||
//G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
|
||||
G4double theM = theZ * G4Proton::Proton()->GetPDGMass()
|
||||
+ (theA - theZ) * G4Neutron::Neutron()->GetPDGMass()
|
||||
+ G4CreateNucleus::GetBindingEnergy(theZ, theA);
|
||||
|
||||
const G4double Mpi = 139. * MeV; // mass of "pion"
|
||||
G4double mu = (theM * Mpi)/(theM + Mpi);
|
||||
|
||||
// pion's potential coefficient
|
||||
// V = coeff_pion * nucleus_density
|
||||
G4double coeff_pion = -2.*pi/mu * (1. + Mpi) * a_pion;
|
||||
|
||||
G4VNuclearDensity *theDencity;
|
||||
if(theA < 17) theDencity = new G4NuclearShellModelDensity(theA, theZ);
|
||||
else theDencity = new G4NuclearFermiDensity(theA, theZ);
|
||||
|
||||
// GetDencity() accepts only G4ThreeVector so build it:
|
||||
G4ThreeVector aPosition(0.0, 0.0, radius);
|
||||
G4double density = theDencity->GetDensity(aPosition);
|
||||
delete theDencity;
|
||||
|
||||
return coeff_pion * density;
|
||||
*/
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
@@ -0,0 +1,669 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4RKPropagation.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 6 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4RKPropagation.hh"
|
||||
// nuclear fields
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "G4ProtonField.hh"
|
||||
#include "G4NeutronField.hh"
|
||||
#include "G4AntiProtonField.hh"
|
||||
#include "G4KaonPlusField.hh"
|
||||
#include "G4KaonMinusField.hh"
|
||||
#include "G4KaonZeroField.hh"
|
||||
#include "G4PionPlusField.hh"
|
||||
#include "G4PionMinusField.hh"
|
||||
#include "G4PionZeroField.hh"
|
||||
#include "G4SigmaPlusField.hh"
|
||||
#include "G4SigmaMinusField.hh"
|
||||
#include "G4SigmaZeroField.hh"
|
||||
// particles properties
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4KaonZero.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4SigmaPlus.hh"
|
||||
#include "G4SigmaMinus.hh"
|
||||
#include "G4SigmaZero.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4KM_OpticalEqRhs.hh"
|
||||
#include "G4KM_NucleonEqRhs.hh"
|
||||
#include "G4ClassicalRK4.hh"
|
||||
#include "G4MagIntegratorDriver.hh"
|
||||
|
||||
#include "G4LorentzRotation.hh"
|
||||
|
||||
// unsigned EncodingHashFun(const G4int& aEncoding);
|
||||
|
||||
G4RKPropagation::G4RKPropagation() : theNucleus(0),
|
||||
theFieldMap(0), theEquationMap(0),
|
||||
theField(0)
|
||||
{ }
|
||||
|
||||
|
||||
G4RKPropagation::G4RKPropagation(const G4RKPropagation &) :
|
||||
G4VFieldPropagation()
|
||||
{ }
|
||||
|
||||
|
||||
G4RKPropagation::~G4RKPropagation()
|
||||
{
|
||||
// free theFieldMap memory
|
||||
if(theFieldMap) delete_FieldsAndMap(theFieldMap);
|
||||
|
||||
// free theEquationMap memory
|
||||
if(theEquationMap) delete_EquationsAndMap(theEquationMap);
|
||||
|
||||
if (theField) delete theField;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const G4RKPropagation & G4RKPropagation::operator=(const G4RKPropagation &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4RKPropagation::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4int G4RKPropagation::operator==(const G4RKPropagation &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4RKPropagation::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4int G4RKPropagation::operator!=(const G4RKPropagation &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4RKPropagation::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void G4RKPropagation::Init(G4V3DNucleus * nucleus)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
// free theFieldMap memory
|
||||
if(theFieldMap) delete_FieldsAndMap(theFieldMap);
|
||||
|
||||
// free theEquationMap memory
|
||||
if(theEquationMap) delete_EquationsAndMap(theEquationMap);
|
||||
|
||||
if (theField) delete theField;
|
||||
|
||||
// Initialize the nuclear field map.
|
||||
theNucleus = nucleus;
|
||||
theOuterRadius = theNucleus->GetOuterRadius();
|
||||
|
||||
theFieldMap = new std::map <G4int, G4VNuclearField*, std::less<G4int> >;
|
||||
|
||||
(*theFieldMap)[G4Proton::Proton()->GetPDGEncoding()] = new G4ProtonField(theNucleus);
|
||||
(*theFieldMap)[G4Neutron::Neutron()->GetPDGEncoding()] = new G4NeutronField(theNucleus);
|
||||
(*theFieldMap)[G4AntiProton::AntiProton()->GetPDGEncoding()] = new G4AntiProtonField(theNucleus);
|
||||
(*theFieldMap)[G4KaonPlus::KaonPlus()->GetPDGEncoding()] = new G4KaonPlusField(theNucleus);
|
||||
(*theFieldMap)[G4KaonMinus::KaonMinus()->GetPDGEncoding()] = new G4KaonMinusField(theNucleus);
|
||||
(*theFieldMap)[G4KaonZero::KaonZero()->GetPDGEncoding()] = new G4KaonZeroField(theNucleus);
|
||||
(*theFieldMap)[G4PionPlus::PionPlus()->GetPDGEncoding()] = new G4PionPlusField(theNucleus);
|
||||
(*theFieldMap)[G4PionMinus::PionMinus()->GetPDGEncoding()] = new G4PionMinusField(theNucleus);
|
||||
(*theFieldMap)[G4PionZero::PionZero()->GetPDGEncoding()] = new G4PionZeroField(theNucleus);
|
||||
(*theFieldMap)[G4SigmaPlus::SigmaPlus()->GetPDGEncoding()] = new G4SigmaPlusField(theNucleus);
|
||||
(*theFieldMap)[G4SigmaMinus::SigmaMinus()->GetPDGEncoding()] = new G4SigmaMinusField(theNucleus);
|
||||
(*theFieldMap)[G4SigmaZero::SigmaZero()->GetPDGEncoding()] = new G4SigmaZeroField(theNucleus);
|
||||
|
||||
theEquationMap = new std::map <G4int, G4Mag_EqRhs*, std::less<G4int> >;
|
||||
|
||||
// theField needed by the design of G4Mag_eqRhs
|
||||
theField = new G4KM_DummyField; //Field not needed for integration
|
||||
G4KM_OpticalEqRhs * opticalEq;
|
||||
G4KM_NucleonEqRhs * nucleonEq;
|
||||
G4double mass;
|
||||
G4double opticalCoeff;
|
||||
|
||||
nucleonEq = new G4KM_NucleonEqRhs(theField, theNucleus);
|
||||
mass = G4Proton::Proton()->GetPDGMass();
|
||||
nucleonEq->SetMass(mass);
|
||||
(*theEquationMap)[G4Proton::Proton()->GetPDGEncoding()] = nucleonEq;
|
||||
|
||||
nucleonEq = new G4KM_NucleonEqRhs(theField, theNucleus);
|
||||
mass = G4Neutron::Neutron()->GetPDGMass();
|
||||
nucleonEq->SetMass(mass);
|
||||
(*theEquationMap)[G4Neutron::Neutron()->GetPDGEncoding()] = nucleonEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4AntiProton::AntiProton()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4AntiProton::AntiProton()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4AntiProton::AntiProton()->GetPDGEncoding()] = opticalEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4KaonPlus::KaonPlus()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4KaonPlus::KaonPlus()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4KaonPlus::KaonPlus()->GetPDGEncoding()] = opticalEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4KaonMinus::KaonMinus()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4KaonMinus::KaonMinus()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4KaonMinus::KaonMinus()->GetPDGEncoding()] = opticalEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4KaonZero::KaonZero()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4KaonZero::KaonZero()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4KaonZero::KaonZero()->GetPDGEncoding()] = opticalEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4PionPlus::PionPlus()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4PionPlus::PionPlus()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4PionPlus::PionPlus()->GetPDGEncoding()] = opticalEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4PionMinus::PionMinus()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4PionMinus::PionMinus()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4PionMinus::PionMinus()->GetPDGEncoding()] = opticalEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4PionZero::PionZero()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4PionZero::PionZero()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4PionZero::PionZero()->GetPDGEncoding()] = opticalEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4SigmaPlus::SigmaPlus()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4SigmaPlus::SigmaPlus()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4SigmaPlus::SigmaPlus()->GetPDGEncoding()] = opticalEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4SigmaMinus::SigmaMinus()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4SigmaMinus::SigmaMinus()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4SigmaMinus::SigmaMinus()->GetPDGEncoding()] = opticalEq;
|
||||
|
||||
opticalEq = new G4KM_OpticalEqRhs(theField, theNucleus);
|
||||
mass = G4SigmaZero::SigmaZero()->GetPDGMass();
|
||||
opticalCoeff =
|
||||
(*theFieldMap)[G4SigmaZero::SigmaZero()->GetPDGEncoding()]->GetCoeff();
|
||||
opticalEq->SetFactor(mass,opticalCoeff);
|
||||
(*theEquationMap)[G4SigmaZero::SigmaZero()->GetPDGEncoding()] = opticalEq;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void G4RKPropagation::Transport(G4KineticTrackVector & active,
|
||||
//----------------------------------------------------------------------------
|
||||
const G4KineticTrackVector &,
|
||||
G4double timeStep)
|
||||
{
|
||||
// reset momentum transfer to field
|
||||
theMomentumTranfer=0;
|
||||
|
||||
// Loop over tracks
|
||||
|
||||
std::vector<G4KineticTrack *>::iterator i;
|
||||
for(i = active.begin(); i != active.end(); ++i)
|
||||
{
|
||||
G4double currTimeStep = timeStep;
|
||||
G4KineticTrack * kt = *i;
|
||||
G4int encoding = kt->GetDefinition()->GetPDGEncoding();
|
||||
std::map <G4int, G4VNuclearField*, std::less<G4int> >::iterator fieldIter= theFieldMap->find(encoding);
|
||||
|
||||
G4VNuclearField* currentField=0;
|
||||
if ( fieldIter != theFieldMap->end() ) currentField=fieldIter->second;
|
||||
|
||||
// debug
|
||||
// if ( timeStep > 1e30 ) {
|
||||
// G4cout << " Name :" << kt->GetDefinition()->GetParticleName() << G4endl;
|
||||
// }
|
||||
|
||||
// Get the time of intersections with the nucleus surface.
|
||||
G4double t_enter, t_leave;
|
||||
// if the particle does not intersecate with the nucleus go to next particle
|
||||
if(!GetSphereIntersectionTimes(kt, t_enter, t_leave))
|
||||
{
|
||||
kt->SetState(G4KineticTrack::miss_nucleus);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
#ifdef debug_1_RKPropagation
|
||||
G4cout <<" kt,timeStep, Intersection times tenter, tleave "
|
||||
<<kt<<" "<< currTimeStep << " / " << t_enter << " / " << t_leave <<G4endl;
|
||||
#endif
|
||||
|
||||
// if the particle is already outside nucleus go to next @@GF should never happen? check!
|
||||
if(t_leave < 0)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4RKPropagation:: Attempt to track particle past a nucleus");
|
||||
continue;
|
||||
}
|
||||
|
||||
// Apply a straight line propagation for particle types
|
||||
// not included in the model
|
||||
if( ! currentField )
|
||||
{
|
||||
if(currTimeStep == DBL_MAX)currTimeStep = t_leave*1.05;
|
||||
FreeTransport(kt, currTimeStep);
|
||||
if ( currTimeStep >= t_leave )
|
||||
{
|
||||
if ( kt->GetState() == G4KineticTrack::inside )
|
||||
{ kt->SetState(G4KineticTrack::gone_out); }
|
||||
else
|
||||
{ kt->SetState(G4KineticTrack::miss_nucleus);}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if(t_enter > 0) // the particle is out. Transport free to the surface
|
||||
{
|
||||
if(t_enter > currTimeStep) // the particle won't enter the nucleus
|
||||
{
|
||||
FreeTransport(kt, currTimeStep);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
FreeTransport(kt, t_enter); // go to surface
|
||||
currTimeStep -= t_enter;
|
||||
t_leave -= t_enter; // time left to leave nucleus
|
||||
// on the surface the particle loose the barrier energy
|
||||
// G4double newE = mom.e()-(*theFieldMap)[encoding]->GetBarrier();
|
||||
// GetField = Barrier + FermiPotential
|
||||
G4double newE = kt->GetTrackingMomentum().e()-currentField->GetField(kt->GetPosition());
|
||||
// G4cout << " enter nucleus, E out/in: " << kt->GetTrackingMomentum().e() << " / " << newE <<G4endl;
|
||||
// G4cout << " the Field "<< currentField->GetField(kt->GetPosition()) << " "<< kt->GetPosition()<<G4endl;
|
||||
// G4cout << " the particle "<<kt->GetDefinition()->GetParticleName()<<G4endl;
|
||||
if(newE <= kt->GetActualMass()) // the particle cannot enter the nucleus
|
||||
{
|
||||
// FixMe: should be "pushed back?"
|
||||
// for the moment take it past teh nucleus, so we'll not worry next time..
|
||||
FreeTransport(kt, 1.1*t_leave); // take past nucleus
|
||||
kt->SetState(G4KineticTrack::miss_nucleus);
|
||||
continue;
|
||||
}
|
||||
//
|
||||
G4double newP = sqrt(newE*newE- sqr(kt->GetActualMass()));
|
||||
G4LorentzVector new4Mom(newP*kt->GetTrackingMomentum().vect().unit(), newE);
|
||||
G4ThreeVector transfer(kt->GetTrackingMomentum().vect()-new4Mom.vect());
|
||||
G4ThreeVector boost= transfer / sqrt(transfer.mag2() + sqr(theNucleus->GetMass()));
|
||||
new4Mom*=G4LorentzRotation(boost);
|
||||
kt->SetTrackingMomentum(new4Mom);
|
||||
kt->SetState(G4KineticTrack::inside);
|
||||
// G4cout <<" Enter Nucleus - E/Field/Sum: " <<kt->GetTrackingMomentum().e() << " / "
|
||||
// << (*theFieldMap)[encoding]->GetField(kt->GetPosition()) << " / "
|
||||
// << kt->GetTrackingMomentum().e()-currentField->GetField(kt->GetPosition())
|
||||
// << G4endl
|
||||
// << " Barrier / field just inside nucleus (0.9999*kt->GetPosition())"
|
||||
// << (*theFieldMap)[encoding]->GetBarrier() << " / "
|
||||
// << (*theFieldMap)[encoding]->GetField(0.9999*kt->GetPosition())
|
||||
// << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
// FixMe: should I add a control on theCutOnP here?
|
||||
// Transport the particle into the nucleus
|
||||
// G4cerr << "RKPropagation t_leave, curTimeStep " <<t_leave << " " <<currTimeStep<<G4endl;
|
||||
G4bool is_exiting=false;
|
||||
if(currTimeStep > t_leave) // particle will exit from the nucleus
|
||||
{
|
||||
currTimeStep = t_leave;
|
||||
is_exiting=true;
|
||||
}
|
||||
|
||||
#ifdef debug_1_RKPropagation
|
||||
G4cerr << "RKPropagation is_exiting?, t_leave, curTimeStep " <<is_exiting<<" "<<t_leave << " " <<currTimeStep<<G4endl;
|
||||
G4cout << "RKPropagation Ekin, field, projectile potential, p "
|
||||
<< kt->GetTrackingMomentum().e() - kt->GetTrackingMomentum().mag() << " "
|
||||
<< kt->GetPosition()<<" "
|
||||
<< G4endl << currentField->GetField(kt->GetPosition()) << " "
|
||||
<< kt->GetProjectilePotential()<< G4endl
|
||||
<< kt->GetTrackingMomentum()
|
||||
<< G4endl;
|
||||
#endif
|
||||
|
||||
G4LorentzVector momold=kt->GetTrackingMomentum();
|
||||
G4ThreeVector posold=kt->GetPosition();
|
||||
|
||||
// if (currentField->GetField(kt->GetPosition()) > kt->GetProjectilePotential() ||
|
||||
if (! FieldTransport(kt, currTimeStep)) {
|
||||
FreeTransport(kt,currTimeStep);
|
||||
}
|
||||
|
||||
#ifdef debug_1_RKPropagation
|
||||
G4cout << "RKPropagation Ekin, field, p "
|
||||
<< kt->GetTrackingMomentum().e() - kt->GetTrackingMomentum().mag() << " "
|
||||
<< G4endl << currentField->GetField(kt->GetPosition())<< G4endl
|
||||
<< kt->GetTrackingMomentum()
|
||||
// << G4endl;
|
||||
<< "delta p " << momold-kt->GetTrackingMomentum() << G4endl
|
||||
<< "del pos " << posold-kt->GetPosition()
|
||||
<< G4endl;
|
||||
#endif
|
||||
|
||||
// complete the transport
|
||||
// FixMe: in some cases there could be a significant
|
||||
// part to do still in the nucleus, or we stepped to far... depending on
|
||||
// slope of potential
|
||||
G4double t_in=-1, t_out=0; // set onto boundary.
|
||||
|
||||
// should go out, or are already out by a too long step..
|
||||
if(is_exiting ||
|
||||
(GetSphereIntersectionTimes(kt, t_in, t_out) &&t_in<0 && t_out<=0 )) // particle is exiting
|
||||
{
|
||||
if(t_in < 0 && t_out >= 0) //still inside, transport safely out.
|
||||
{
|
||||
// transport free to a position that is surely out of the nucleus, to avoid
|
||||
// a new transportation and a new adding the barrier next loop.
|
||||
G4ThreeVector savePos = kt->GetPosition();
|
||||
FreeTransport(kt, t_out);
|
||||
// and evaluate the right the energy
|
||||
G4double newE=kt->GetTrackingMomentum().e();
|
||||
|
||||
// G4cout << " V pos/savePos << "
|
||||
// << (*theFieldMap)[encoding]->GetField(kt->GetPosition())<< " / "
|
||||
// << (*theFieldMap)[encoding]->GetField(savePos)
|
||||
// << G4endl;
|
||||
|
||||
if ( abs(currentField->GetField(savePos)) > 0. &&
|
||||
abs(currentField->GetField(kt->GetPosition())) > 0.)
|
||||
{ // FixMe GF: savePos/pos may be out of nucleus, where GetField(..)=0
|
||||
// This wrongly adds or subtracts the Barrier here while
|
||||
// this is done later.
|
||||
newE += currentField->GetField(savePos)
|
||||
- currentField->GetField(kt->GetPosition());
|
||||
}
|
||||
|
||||
// G4cout << " go border nucleus, E in/border: " << kt->GetTrackingMomentum() << " / " << newE <<G4endl;
|
||||
|
||||
if(newE < kt->GetActualMass())
|
||||
{
|
||||
#ifdef debug_1_RKPropagation
|
||||
G4cout << "RKPropagation-Transport: problem with particle exiting - ignored" << G4endl;
|
||||
G4cout << " cannot leave nucleus, E in/out: " << kt->GetTrackingMomentum() << " / " << newE <<G4endl;
|
||||
#endif
|
||||
if (kt->GetDefinition() == G4Proton::Proton() ||
|
||||
kt->GetDefinition() == G4Neutron::Neutron() ) {
|
||||
kt->SetState(G4KineticTrack::captured);
|
||||
} else {
|
||||
kt->SetState(G4KineticTrack::gone_out); //@@GF tofix
|
||||
}
|
||||
continue; // the particle cannot exit the nucleus
|
||||
}
|
||||
G4double newP = sqrt(newE*newE- sqr(kt->GetActualMass()));
|
||||
G4LorentzVector new4Mom(newP*kt->GetTrackingMomentum().vect().unit(), newE);
|
||||
G4ThreeVector transfer(kt->GetTrackingMomentum().vect()-new4Mom.vect());
|
||||
G4ThreeVector boost= transfer / sqrt(transfer.mag2() + sqr(theNucleus->GetMass()));
|
||||
new4Mom*=G4LorentzRotation(boost);
|
||||
kt->SetTrackingMomentum(new4Mom);
|
||||
}
|
||||
// add the potential barrier
|
||||
// FixMe the Coulomb field is not parallel to mom, this is simple approximation
|
||||
G4double newE = kt->GetTrackingMomentum().e()+currentField->GetField(kt->GetPosition());
|
||||
if(newE < kt->GetActualMass())
|
||||
{ // the particle cannot exit the nucleus @@@ GF check.
|
||||
#ifdef debug_1_RKPropagation
|
||||
G4cout << " cannot leave nucleus, E in/out: " << kt->GetTrackingMomentum() << " / " << newE <<G4endl;
|
||||
#endif
|
||||
if (kt->GetDefinition() == G4Proton::Proton() ||
|
||||
kt->GetDefinition() == G4Neutron::Neutron() ) {
|
||||
kt->SetState(G4KineticTrack::captured);
|
||||
} else {
|
||||
kt->SetState(G4KineticTrack::gone_out); //@@GF tofix
|
||||
}
|
||||
continue;
|
||||
}
|
||||
G4double newP = sqrt(newE*newE- sqr(kt->GetActualMass()));
|
||||
G4LorentzVector new4Mom(newP*kt->GetTrackingMomentum().vect().unit(), newE);
|
||||
G4ThreeVector transfer(kt->GetTrackingMomentum().vect()-new4Mom.vect());
|
||||
G4ThreeVector boost= transfer / sqrt(transfer.mag2() + sqr(theNucleus->GetMass()));
|
||||
new4Mom*=G4LorentzRotation(boost);
|
||||
kt->SetTrackingMomentum(new4Mom);
|
||||
kt->SetState(G4KineticTrack::gone_out);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
G4ThreeVector G4RKPropagation::GetMomentumTransfer() const
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
return theMomentumTranfer;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
G4bool G4RKPropagation::FieldTransport(G4KineticTrack * kt, const G4double timeStep)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
theMomentumTranfer=0;
|
||||
// G4cout <<"Stepper input"<<kt->GetTrackingMomentum()<<G4endl;
|
||||
// create the integrator stepper
|
||||
// G4Mag_EqRhs * equation = mapIter->second;
|
||||
G4Mag_EqRhs * equation = (*theEquationMap)[kt->GetDefinition()->GetPDGEncoding()];
|
||||
G4MagIntegratorStepper * stepper = new G4ClassicalRK4(equation);
|
||||
|
||||
// create the integrator driver
|
||||
G4double hMin = 1.0e-25*second; // arbitrary choice. Means 0.03 fm at c
|
||||
G4MagInt_Driver * driver = new G4MagInt_Driver(hMin, stepper);
|
||||
|
||||
// Temporary: use driver->AccurateAdvance()
|
||||
// create the G4FieldTrack needed by AccurateAdvance
|
||||
G4double curveLength = 0;
|
||||
G4FieldTrack track(kt->GetPosition(),
|
||||
kt->GetTrackingMomentum().vect().unit(), // momentum direction
|
||||
curveLength, // curvelength
|
||||
kt->GetTrackingMomentum().e()-kt->GetActualMass(), // kinetic energy
|
||||
kt->GetActualMass(), // restmass
|
||||
kt->GetTrackingMomentum().beta()*c_light); // velocity
|
||||
// integrate
|
||||
G4double eps = 0.01;
|
||||
// G4cout << "currTimeStep = " << currTimeStep << G4endl;
|
||||
if(!driver->AccurateAdvance(track, timeStep, eps))
|
||||
{ // cannot track this particle
|
||||
std::cerr << "G4RKPropagation::FieldTransport() warning: integration error."
|
||||
<< G4endl << "position " << kt->GetPosition() << " 4mom " <<kt->GetTrackingMomentum()
|
||||
<<G4endl << " timestep " <<timeStep
|
||||
<< G4endl;
|
||||
delete driver;
|
||||
delete stepper;
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* G4cout <<" E/Field/Sum be4 : " <<mom.e() << " / "
|
||||
* << (*theFieldMap)[encoding]->GetField(pos) << " / "
|
||||
* << mom.e()+(*theFieldMap)[encoding]->GetField(pos)
|
||||
* << G4endl;
|
||||
*/
|
||||
|
||||
// Correct for momentum ( thus energy) transfered to nucleus, boost particle into moving nuclues frame.
|
||||
G4ThreeVector MomentumTranfer = kt->GetTrackingMomentum().vect() - track.GetMomentum();
|
||||
G4ThreeVector boost= MomentumTranfer / sqrt (MomentumTranfer.mag2() +sqr(theNucleus->GetMass()));
|
||||
|
||||
// update the kt
|
||||
kt->SetPosition(track.GetPosition());
|
||||
G4LorentzVector mom(track.GetMomentum(),sqrt(track.GetMomentum().mag2() + sqr(kt->GetActualMass())));
|
||||
mom *= G4LorentzRotation( boost );
|
||||
theMomentumTranfer += ( kt->GetTrackingMomentum() - mom ).vect();
|
||||
kt->SetTrackingMomentum(mom);
|
||||
|
||||
// G4cout <<"Stepper output"<<kt<<" "<<kt->GetTrackingMomentum()<<" "<<kt->GetPosition()<<G4endl;
|
||||
/*
|
||||
* G4ThreeVector MomentumTranfer2=kt->GetTrackingMomentum().vect() - mom.vect();
|
||||
* G4cout << " MomentumTransfer/corrected" << MomentumTranfer << " " << MomentumTranfer.mag()
|
||||
* << " " << MomentumTranfer2 << " " << MomentumTranfer2.mag() << " "
|
||||
* << MomentumTranfer-MomentumTranfer2 << " "<<
|
||||
* MomentumTranfer-MomentumTranfer2.mag() << " " << G4endl;
|
||||
* G4cout <<" E/Field/Sum aft : " <<mom.e() << " / "
|
||||
* << " / " << (*theFieldMap)[encoding]->GetField(pos)<< " / "
|
||||
* << mom.e()+(*theFieldMap)[encoding]->GetField(pos)
|
||||
* << G4endl;
|
||||
*/
|
||||
|
||||
delete driver;
|
||||
delete stepper;
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
G4bool G4RKPropagation::FreeTransport(G4KineticTrack * kt, const G4double timeStep)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
G4ThreeVector newpos = kt->GetPosition() +
|
||||
timeStep*c_light/kt->GetTrackingMomentum().e() * kt->GetTrackingMomentum().vect();
|
||||
kt->SetPosition(newpos);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
G4bool G4RKPropagation::WillBeCaptured(const G4KineticTrack * kt)
|
||||
{
|
||||
G4double radius = theOuterRadius;
|
||||
|
||||
// evaluate the final energy. Il will be captured if newE or newP < 0
|
||||
G4ParticleDefinition * definition = kt->GetDefinition();
|
||||
G4double mass = definition->GetPDGMass();
|
||||
G4ThreeVector pos = kt->GetPosition();
|
||||
G4LorentzVector mom = kt->GetTrackingMomentum();
|
||||
G4VNuclearField * field = (*theFieldMap)[definition->GetPDGEncoding()];
|
||||
G4ThreeVector newPos(0, 0, radius); // to get the field on the surface
|
||||
|
||||
G4double newE = mom.e()+field->GetField(pos)-field->GetField(newPos);
|
||||
|
||||
return ((newE < mass) ? false : true);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
G4bool G4RKPropagation::GetSphereIntersectionTimes(const G4double radius,
|
||||
//----------------------------------------------------------------------------
|
||||
const G4ThreeVector & currentPos,
|
||||
const G4LorentzVector & momentum,
|
||||
G4double & t1, G4double & t2)
|
||||
{
|
||||
G4ThreeVector speed = momentum.vect()/momentum.e(); // boost vector
|
||||
G4double scalarProd = currentPos.dot(speed);
|
||||
G4double speedMag = speed.mag();
|
||||
G4double sqrtArg = scalarProd*scalarProd -
|
||||
speedMag*speedMag*(currentPos.mag2()-radius*radius);
|
||||
if(sqrtArg <= 0.) // particle will not intersect the sphere
|
||||
{
|
||||
// G4cout << " GetSphereIntersectionTimes sqrtArg negative: " << sqrtArg << G4endl;
|
||||
return false;
|
||||
}
|
||||
t1 = (-scalarProd - sqrt(sqrtArg))/speedMag/speedMag/c_light;
|
||||
t2 = (-scalarProd + sqrt(sqrtArg))/speedMag/speedMag/c_light;
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
G4bool G4RKPropagation::GetSphereIntersectionTimes(const G4KineticTrack * kt,
|
||||
G4double & t1, G4double & t2)
|
||||
{
|
||||
G4double radius = theOuterRadius + 3*fermi; // "safety" of 3 fermi
|
||||
G4ThreeVector speed = kt->GetTrackingMomentum().vect()/kt->GetTrackingMomentum().e(); // bost vector
|
||||
G4double scalarProd = kt->GetPosition().dot(speed);
|
||||
G4double speedMag = speed.mag();
|
||||
G4double sqrtArg = scalarProd*scalarProd -
|
||||
speedMag*speedMag*(kt->GetPosition().mag2()-radius*radius);
|
||||
if(sqrtArg <= 0.) // particle will not intersect the sphere
|
||||
{
|
||||
return false;
|
||||
}
|
||||
t1 = (-scalarProd - sqrt(sqrtArg))/speedMag/speedMag/c_light;
|
||||
t2 = (-scalarProd + sqrt(sqrtArg))/speedMag/speedMag/c_light;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Implementation methods
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void G4RKPropagation::delete_FieldsAndMap(
|
||||
//----------------------------------------------------------------------------
|
||||
std::map <G4int, G4VNuclearField *, std::less<G4int> > * aMap)
|
||||
{
|
||||
if(aMap)
|
||||
{
|
||||
std::map <G4int, G4VNuclearField *, std::less<G4int> >::iterator cur;
|
||||
for(cur = aMap->begin(); cur != aMap->end(); ++cur)
|
||||
delete (*cur).second;
|
||||
|
||||
aMap->clear();
|
||||
delete aMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void G4RKPropagation::delete_EquationsAndMap(
|
||||
//----------------------------------------------------------------------------
|
||||
std::map <G4int, G4Mag_EqRhs *, std::less<G4int> > * aMap)
|
||||
{
|
||||
if(aMap)
|
||||
{
|
||||
std::map <G4int, G4Mag_EqRhs *, std::less<G4int> >::iterator cur;
|
||||
for(cur = aMap->begin(); cur != aMap->end(); ++cur)
|
||||
delete (*cur).second;
|
||||
|
||||
aMap->clear();
|
||||
delete aMap;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4SigmaMinusField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4SigmaMinusField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4SigmaMinus.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4SigmaMinusField::G4SigmaMinusField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
G4SigmaMinusField::~G4SigmaMinusField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4SigmaMinusField & G4SigmaMinusField::operator=(const G4SigmaMinusField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaMinusField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4SigmaMinusField::operator==(const G4SigmaMinusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaMinusField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4SigmaMinusField::operator!=(const G4SigmaMinusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaMinusField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4SigmaMinusField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4double sigmaMinusMass = G4SigmaMinus::SigmaMinus()->GetPDGMass();
|
||||
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = sigmaMinusMass*nucleusMass/(sigmaMinusMass+nucleusMass);
|
||||
|
||||
const G4VNuclearDensity * nuclearDensity=theNucleus->GetNuclearDensity();
|
||||
G4double density = nuclearDensity->GetDensity(aPosition);
|
||||
|
||||
return -2.*pi*hbarc*hbarc/reducedMass*(2.0)*theCoeff*density+GetBarrier();
|
||||
}
|
||||
|
||||
|
||||
G4double G4SigmaMinusField::GetBarrier()
|
||||
{
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + pow(A,1./3.));
|
||||
return -coulombBarrier;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4SigmaPlusField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4SigmaPlusField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4SigmaPlus.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4SigmaPlusField::G4SigmaPlusField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
|
||||
G4SigmaPlusField::~G4SigmaPlusField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4SigmaPlusField & G4SigmaPlusField::operator=(const G4SigmaPlusField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaPlusField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4SigmaPlusField::operator==(const G4SigmaPlusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaPlusField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4SigmaPlusField::operator!=(const G4SigmaPlusField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaPlusField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4SigmaPlusField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4double sigmaPlusMass = G4SigmaPlus::SigmaPlus()->GetPDGMass();
|
||||
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = sigmaPlusMass*nucleusMass/(sigmaPlusMass+nucleusMass);
|
||||
|
||||
const G4VNuclearDensity * nuclearDensity=theNucleus->GetNuclearDensity();
|
||||
G4double density = nuclearDensity->GetDensity(aPosition);
|
||||
|
||||
return -2.*pi*hbarc*hbarc/reducedMass*(2.0)*theCoeff*density+GetBarrier();
|
||||
}
|
||||
|
||||
|
||||
G4double G4SigmaPlusField::GetBarrier()
|
||||
{
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + pow(A,1./3.));
|
||||
return coulombBarrier;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4SigmaZeroField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4SigmaZeroField.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
#include "G4SigmaZero.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4SigmaZeroField::G4SigmaZeroField(G4V3DNucleus * nucleus, G4double coeff)
|
||||
: G4VNuclearField(nucleus)
|
||||
{
|
||||
theCoeff = coeff;
|
||||
}
|
||||
|
||||
|
||||
G4SigmaZeroField::~G4SigmaZeroField()
|
||||
{ }
|
||||
|
||||
|
||||
const G4SigmaZeroField & G4SigmaZeroField::operator=(const G4SigmaZeroField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaZeroField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
G4int G4SigmaZeroField::operator==(const G4SigmaZeroField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaZeroField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4int G4SigmaZeroField::operator!=(const G4SigmaZeroField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaZeroField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4SigmaZeroField::GetField(const G4ThreeVector & aPosition)
|
||||
{
|
||||
// Field is 0 out of the nucleus!
|
||||
if(aPosition.mag() >= radius) return 0.0;
|
||||
|
||||
G4double sigmaZeroMass = G4SigmaZero::SigmaZero()->GetPDGMass();
|
||||
|
||||
G4double A = theNucleus->GetMassNumber();
|
||||
G4double Z = theNucleus->GetCharge();
|
||||
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4lrint(Z), G4lrint(A));
|
||||
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
|
||||
G4double reducedMass = sigmaZeroMass*nucleusMass/(sigmaZeroMass+nucleusMass);
|
||||
|
||||
const G4VNuclearDensity * nuclearDensity=theNucleus->GetNuclearDensity();
|
||||
G4double density = nuclearDensity->GetDensity(aPosition);
|
||||
|
||||
return -2.*pi*hbarc*hbarc/reducedMass*(2.0)*theCoeff*density;
|
||||
}
|
||||
|
||||
|
||||
G4double G4SigmaZeroField::GetBarrier()
|
||||
{
|
||||
return 0.;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4VFieldPropagation.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 6 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4VFieldPropagation.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4HadronicException.hh"
|
||||
|
||||
G4VFieldPropagation::G4VFieldPropagation()
|
||||
{ }
|
||||
|
||||
G4VFieldPropagation::G4VFieldPropagation(const G4VFieldPropagation &)
|
||||
{ }
|
||||
|
||||
G4VFieldPropagation::~G4VFieldPropagation()
|
||||
{ }
|
||||
|
||||
const G4VFieldPropagation & G4VFieldPropagation::operator=(const G4VFieldPropagation &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VFieldPropagation::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4int G4VFieldPropagation::operator==(const G4VFieldPropagation &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VFieldPropagation::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4int G4VFieldPropagation::operator!=(const G4VFieldPropagation &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VFieldPropagation::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4VNuclearField.cc
|
||||
//
|
||||
// Author: Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
|
||||
//
|
||||
// Creation date: 5 June 2000
|
||||
// -------------------------------------------------------------------
|
||||
#include "G4VNuclearField.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
G4VNuclearField::G4VNuclearField(G4V3DNucleus * aNucleus) :
|
||||
theNucleus(aNucleus),
|
||||
radius(aNucleus->GetOuterRadius() + 4*fermi)
|
||||
{
|
||||
}
|
||||
|
||||
G4VNuclearField::G4VNuclearField(const G4VNuclearField &right) :
|
||||
theNucleus(right.theNucleus),
|
||||
radius(right.radius)
|
||||
{
|
||||
}
|
||||
|
||||
G4VNuclearField::~G4VNuclearField()
|
||||
{
|
||||
}
|
||||
|
||||
const G4VNuclearField & G4VNuclearField::operator=(const G4VNuclearField &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VNuclearField::operator= meant not to be accessible");
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4int G4VNuclearField::operator==(const G4VNuclearField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VNuclearField::operator== meant not to be accessible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4int G4VNuclearField::operator!=(const G4VNuclearField &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VNuclearField::operator!= meant not to be accessible");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user