Import Geant4 9.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:16:48 +02:00
parent 75c7fd177d
commit a8e9364cea
6592 changed files with 84274 additions and 69292 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4FastSimulationManagerProcess.hh,v 1.13 2006/11/03 17:26:04 mverderi Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4FastSimulationManagerProcess.hh,v 1.14 2007/05/11 13:50:20 mverderi Exp $
// GEANT4 tag $Name: geant4-09-00 $
//
//
//---------------------------------------------------------------
@@ -33,8 +33,7 @@
// G4FastSimulationManagerProcess.hh
//
// Description:
// The process that triggers parameterised simulations
// if any.
// The process that triggers parameterised simulations if any.
//
// History:
// Feb 98: Parallel geometry sensitivity. MoraDeFreitas.
@@ -42,146 +41,119 @@
// (release B.00 for parameterisation). MoraDeFreitas.
// Aug 97: First implementation. Verderi && MoraDeFreitas.
// Apr 98: modified for new particle change. H.Kurashige
// Oct 06: Move to parallel geometry scheme. M. Verderi
// Nov 06: name xxx81 is given for this release. "81" will be
// removed @ next maj. rel. so that this process becomes
// the standard one.
// May 07: remove "81" tags, to migrate to 9.0.
//
//---------------------------------------------------------------
#ifndef G4FastSimulationManagerProcess_h
#define G4FastSimulationManagerProcess_h 1
#ifndef G4FastSimulationManagerProcess_hh
#define G4FastSimulationManagerProcess_hh
#include "globals.hh"
#include "G4VProcess.hh"
#include "G4FastSimulationManager.hh"
#include "G4Step.hh"
#include "G4Navigator.hh"
#include "G4PropagatorInField.hh"
#include "G4VTouchable.hh"
#include "G4TouchableHistory.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VParticleChange.hh"
//------------------------------------------
// ---------------------------------------------------------------------
//
// G4FastSimulationManagerProcess class
//
//------------------------------------------
// ---------------------------------------------------------------------
// Class Description:
// This is a G4VProcess. It provides the interface between the tracking and the parameterisation.
// It has to be set in the process list of the particles you want to parameterise.
// -- G4VProcess providing the interface between the tracking and the fast simulation.
//
class G4FastSimulationManagerProcess : public G4VProcess
{
public:
//------------------------
// Constructor/Destructor
//------------------------
G4FastSimulationManagerProcess(const G4String&
processName =
"G4FastSimulationManagerProcess",
G4ProcessType
theType = fParameterisation);
// -------------------------
// Constructor/Destructor:
// -------------------------
// -- Constructor for parameterisation in mass geometry
G4FastSimulationManagerProcess(const G4String& processName = "G4FastSimulationManagerProcess",
G4ProcessType theType = fParameterisation);
// -- Contructors for parameterisation attached a parallel geometry.
// -- Can also be used for the mass geometry, providing world volume name.
// -- World volume specified by name or pointer.
G4FastSimulationManagerProcess(const G4String& processName,
const G4String& worldVolumeName,
G4ProcessType theType = fParameterisation);
G4FastSimulationManagerProcess(const G4String& processName,
G4VPhysicalVolume* worldVolume,
G4ProcessType theType = fParameterisation);
virtual ~G4FastSimulationManagerProcess();
//--------------------------------------------------------------
// Process interface
//--------------------------------------------------------------
// -----------------------
// User access methods:
// -----------------------
G4VPhysicalVolume* GetWorldVolume() const {return fWorldVolume;}
// -- Set new world volume to the process
void SetWorldVolume(G4String );
void SetWorldVolume(G4VPhysicalVolume*);
// --------------------------------------------------------------
// Process interface
// --------------------------------------------------------------
// -- Start/End tracking:
void StartTracking(G4Track*);
void EndTracking();
//---------------------------------------------------
// GetPhysicalInteractionLength() and DoIt() methods:
//---------------------------------------------------
// -- PostStep methods:
G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition);
G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition);
G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step& );
// -- AtRest methods (still there after many years of no use...):
G4double AtRestGetPhysicalInteractionLength(const G4Track&,
G4ForceCondition*);
G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&);
// -- unused:
G4double AlongStepGetPhysicalInteractionLength(const G4Track&, G4double, G4double, G4double&, G4GPILSelection*) {return 0.0;}
G4VParticleChange* AlongStepDoIt(const G4Track& , const G4Step&) {return 0;}
// -- debug:
void Verbose() const;
G4VParticleChange* PostStepDoIt(const G4Track& ,const G4Step& );
//------------------------------------------------------------------------
// GetPhysicalInteractionLength() and DoIt() methods for AtRest particles:
//------------------------------------------------------------------------
G4double AtRestGetPhysicalInteractionLength(
const G4Track& ,
G4ForceCondition*
);
G4VParticleChange* AtRestDoIt(
const G4Track& ,
const G4Step&
);
// -- no operation in AlongStepDoIt --
G4double AlongStepGetPhysicalInteractionLength(
const G4Track&,
G4double ,
G4double ,
G4double&,
G4GPILSelection*
);
G4VParticleChange* AlongStepDoIt(
const G4Track& ,
const G4Step&
);
private:
// When trigged, the *fFastSimulationManager holds
// the pointer used to call the DoIt() method.
//-- would be better to my taste to have "const G4VPhysicalVolume* fWorldVolume;", but clashes at compilation
G4VPhysicalVolume* fWorldVolume;
G4bool fIsTrackingTime;
G4bool fIsFirstStep;
G4Navigator* fNavigator;
G4int fNavigatorIndex;
G4FastSimulationManager* fFastSimulationManager;
G4bool fFastSimulationTrigger;
// this G4VParticleChange is used only when the safety limites the Step.
G4VParticleChange aDummyParticleChange;
G4ParticleChange xParticleChange;
// Flags that the track is starting
G4bool fStartTracking;
// -------------------------------
// Navigation in the Ghost World:
// -------------------------------
// Current parallel "ghost" world, related Navigator
// and touchable history:
G4VPhysicalVolume* fGhostWorld;
G4Navigator fGhostNavigator;
G4TouchableHistory* fGhostTouchable;
G4bool fUpdateGhostTouchable;
G4bool fOutOfGhostWorld;
// Isotropic safety value to the next ghost volume
// and allowed Step length:
G4double fGhostSafety,
fGhostStepLength;
// Navigation with field:
G4PropagatorInField* fGhostFieldPropagator;
G4double fParticleCharge;
G4bool fFieldExertsForce;
// Tracking Navigation used in PostStep, in case of mag-field:
G4Navigator fTrackingNavigator;
G4TouchableHistory fTrackingHistory;
// ******************************************************
// ******************************************************
//
// For TESTS:
//
// ******************************************************
// ******************************************************
public:
G4double GetPreSafety() {return fPreSafety;}
G4double GetPreLinearSafety() {return fPreLinearSafety;}
G4double GetSafety() {return fGhostSafety;}
G4double GetLinearSafety() {return fGhostStepLength;}
void Verbose() const;
private:
G4double fPreSafety, fPreLinearSafety;
};
#endif