Import Geant4 8.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:55:03 +02:00
parent 216a75eeb1
commit fe73f43734
6714 changed files with 118229 additions and 68144 deletions
@@ -23,7 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4MuMinusCaptureCascade.hh,v 1.8 2006/11/15 12:17:15 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file --- Copyright CERN 1998
@@ -36,6 +37,9 @@
// E-mail: Vladimir.Ivantchenko@cern.ch
// April 2000
//
// Modified:
// 14.11.06 Add inline functions (V.Ivanchenko)
//
//-----------------------------------------------------------------------------
#ifndef G4MuMinusCaptureCascade_h
@@ -43,20 +47,12 @@
#include "globals.hh"
#include "Randomize.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4MuonMinus.hh"
#include "G4Electron.hh"
#include "G4Gamma.hh"
#include "G4VParticleChange.hh"
#include "G4ParticleDefinition.hh"
#include "G4GHEKinematicsVector.hh"
#include "G4ParticleTypes.hh"
#include "G4DynamicParticle.hh"
#include "G4ThreeVector.hh"
class G4MuMinusCaptureCascade
class G4GHEKinematicsVector;
class G4MuMinusCaptureCascade
{
public:
@@ -64,39 +60,72 @@ public:
~G4MuMinusCaptureCascade();
G4int DoCascade(const G4double Z, const G4double massA,
G4GHEKinematicsVector* Cascade);
G4int DoCascade(G4double Z, G4double A, G4GHEKinematicsVector* Cascade);
void DoBoundMuonMinusDecay(G4double Z, G4double massA,
void DoBoundMuonMinusDecay(G4double Z,
G4int* nCascade, G4GHEKinematicsVector* Cascade);
private:
G4double GetKShellEnergy(G4double Z);
G4double GetLinApprox(const size_t N, const G4double X[], const G4double Y[],
G4double Xuser);
G4ThreeVector GetRandomVec();
G4ThreeVector& GetRandomVec();
private:
G4double GetLinApprox(G4int N, const G4double* X, const G4double* Y,
G4double Xuser);
void AddNewParticle(G4ParticleDefinition* aParticle,
G4ThreeVector& Momentum,
G4double mass,
G4int* nParticle,
G4GHEKinematicsVector* Cascade);
// hide assignment operator as private
G4MuMinusCaptureCascade& operator=(const G4MuMinusCaptureCascade &right);
G4MuMinusCaptureCascade(const G4MuMinusCaptureCascade& );
void AddNewParticle(G4ParticleDefinition* aParticle,
G4ThreeVector Momentum,
G4double mass,
G4int* nParticle,
G4GHEKinematicsVector* Cascade);
G4double Emass, MuMass;
G4ParticleDefinition* theElectron;
G4ParticleDefinition* theGamma;
G4ThreeVector randomVect;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuMinusCaptureCascade::GetLinApprox(G4int N,
const G4double* X,
const G4double* Y,
G4double Xuser)
{
G4double Yuser;
if(Xuser <= X[0]) Yuser = Y[0];
else if(Xuser >= X[N-1]) Yuser = Y[N-1];
else {
G4int i;
for (i=1; i<N; i++){
if(Xuser <= X[i]) break;
}
if(Xuser == X[i]) Yuser = Y[i];
else Yuser = Y[i-1] + (Y[i] - Y[i-1])*(Xuser - X[i-1])/(X[i] - X[i-1]);
}
return Yuser;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4ThreeVector& G4MuMinusCaptureCascade::GetRandomVec()
{
//
// generate uniform vector
//
G4double cost = 2.0 * G4UniformRand() - 1.0;
G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
G4double Phi = twopi * G4UniformRand();
randomVect = G4ThreeVector(sint * std::cos(Phi), sint * std::sin(Phi), cost);
return randomVect;
}
#endif
@@ -23,6 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuonMinusCaptureAtRest.hh,v 1.17 2006/11/15 12:17:15 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// ------------------------------------------------------------
// GEANT 4 class header file --- Copyright CERN 1998
// CERN Geneva Switzerland
@@ -47,13 +50,14 @@
//
// Modifications:
// 18/08/2000 V.Ivanchenko Update description, new method to simulate capture
// 12/12/2003 H.P.Wellisch Completly rewrite mu-nuclear part
// 17/05/2006 V.Ivanchenko Cleanup
// 14/11/2006 V.Ivanchenko Remove implementation of GetPhysicsInteractionLength
//
//-----------------------------------------------------------------------------
#ifndef G4MuonMinusCaptureAtRest_h
#define G4MuonMinusCaptureAtRest_h 1
#include "globals.hh"
#include "G4VRestProcess.hh"
@@ -65,6 +69,8 @@
#include "G4Fancy3DNucleus.hh"
#include "G4ExcitationHandler.hh"
class G4GHEKinematicsVector;
class G4MuonMinusCaptureAtRest : public G4VRestProcess
{
@@ -73,16 +79,13 @@ public:
G4MuonMinusCaptureAtRest(const G4String& processName ="muMinusCaptureAtRest",
G4ProcessType aType = fHadronic );
~G4MuonMinusCaptureAtRest();
virtual ~G4MuonMinusCaptureAtRest();
G4bool IsApplicable(const G4ParticleDefinition&);
void BuildPhysicsTable(const G4ParticleDefinition&)
{};
G4double AtRestGetPhysicalInteractionLength(const G4Track&, G4ForceCondition*)
{return 0;};
G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&);
G4double GetMeanLifeTime(const G4Track&, G4ForceCondition*)
@@ -90,12 +93,12 @@ public:
private:
G4ReactionProductVector* DoMuCapture();
// hide assignment operator as private
G4MuonMinusCaptureAtRest& operator=(const G4MuonMinusCaptureAtRest &right);
G4MuonMinusCaptureAtRest(const G4MuonMinusCaptureAtRest& );
G4ReactionProductVector * DoMuCapture();
G4int nCascade;
G4double targetZ;
G4double targetA;
@@ -23,7 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4StopElementSelector.hh,v 1.9 2006/11/15 12:17:15 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file --- Copyright CERN 1998
@@ -70,8 +71,8 @@ public:
~G4StopElementSelector();
G4Element* GetElement(const G4Material* aMaterial);
G4double GetMuonCaptureRate(G4double Z, G4double A);
G4double GetMuonDecayRate(G4double Z, G4double A);
G4double GetMuonCaptureRate(G4double Z, G4double A);
G4double GetMuonDecayRate(G4double Z, G4double A);
private:
// hide assignment operator as private