Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.4 1999/04/19 14:52:30 mora Exp $
|
||||
$Id: History,v 1.5.4.1 1999/11/11 14:31:32 gunter Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,10 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
September 16, 1999 M. Verderi & P. Mora de Freitas
|
||||
|
||||
- Fixed bug in G4FastStep::CheckIt() method.
|
||||
|
||||
April 19, 1999 M. Verderi & P. Mora de Freitas
|
||||
|
||||
Changes in G4FastStep to co-work with track-01-00-04:
|
||||
@@ -343,7 +347,7 @@ October 8, 1998 P.Mora de Freitas
|
||||
- G4FastSimulationManager optimisation:
|
||||
- New G4ParticleDefinition* fLastCrossedParticle data member, keeps
|
||||
the last particle type with touched the envelope;
|
||||
- New RWTPtrOrderedVector<G4VFastSimulationModel> fApplicableModelList
|
||||
- New G4RWTPtrOrderedVector<G4VFastSimulationModel> fApplicableModelList
|
||||
data member, keeps the model list of the applicable models for
|
||||
the actual fLastCrossedParticle particle type;
|
||||
- Changes in the PostStepGetFastSimulationManagerTrigger() and
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastSimulationManager.hh,v 1.2 1999/04/14 14:25:23 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastSimulationManager.hh,v 1.3.2.1.2.1 1999/12/07 20:52:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef G4FastSimulationManager_h
|
||||
#define G4FastSimulationManager_h 1
|
||||
|
||||
#include <rw/tpordvec.h>
|
||||
#include "g4rw/tpordvec.h"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
@@ -52,9 +52,16 @@ typedef G4LogicalVolume G4Envelope;
|
||||
// G4FastSimulationManager class
|
||||
//
|
||||
//-------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
// The G4VFastSimulationModel objects are attached to the envelope through a G4FastSimulationManager.
|
||||
// This object will manage the list of models and will message them at tracking time.
|
||||
//
|
||||
|
||||
|
||||
class G4FastSimulationManager
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
//------------------------
|
||||
// Constructor/Destructor
|
||||
//------------------------
|
||||
@@ -64,33 +71,58 @@ public:
|
||||
// the IsUnique flag should be set TRUE to avoid the
|
||||
// G4AffineTransform re-calculations each time we reach
|
||||
// the envelope.
|
||||
|
||||
G4FastSimulationManager(G4Envelope *anEnvelope,
|
||||
G4bool IsUnique=FALSE);
|
||||
// This is the only constructor. In this constructor you specify the envelope by giving the
|
||||
// G4LogicalVolume pointer. The G4FastSimulationManager object will bind itself to this envelope
|
||||
// and will notify this G4LogicalVolume to become an envelope. If you know that this volume is
|
||||
// placed only once, you can turn the IsUnique boolean to "true" to allow some optimization.
|
||||
//
|
||||
// Note that if you choose to use the G4VFastSimulationModel(const G4String&, G4LogicalVolume*,
|
||||
// G4bool) constructor for you model, the G4FastSimulationManager will be constructed using the
|
||||
// given G4LogicalVolume* and G4bool values of the model constructor.
|
||||
//
|
||||
|
||||
public: // without description
|
||||
~G4FastSimulationManager();
|
||||
|
||||
|
||||
public: // with description
|
||||
// Methods to add/remove models to/from the Model
|
||||
// List.
|
||||
//
|
||||
void AddFastSimulationModel(G4VFastSimulationModel*);
|
||||
// Add a model to the Model List.
|
||||
|
||||
void RemoveFastSimulationModel(G4VFastSimulationModel*);
|
||||
// Remove a model from the Model List.
|
||||
|
||||
// Methods to activate/inactivate models from the Model
|
||||
// List.
|
||||
|
||||
G4bool ActivateFastSimulationModel(const G4String&);
|
||||
// Activate a model in the Model List.
|
||||
|
||||
G4bool InActivateFastSimulationModel(const G4String&);
|
||||
// Inactivate a model in the Model List.
|
||||
|
||||
// Methods to add/remove GhostPlacements to/from the
|
||||
// GhostPlacements List.
|
||||
//
|
||||
G4Transform3D* AddGhostPlacement(G4RotationMatrix*,
|
||||
const G4ThreeVector&);
|
||||
|
||||
// Flag that the envelope is a ghost volume giving its global placement, where the rotation matrix
|
||||
// and the translatation vector of 3D transformation describe the placement relative to the world
|
||||
// coordinates.
|
||||
|
||||
G4Transform3D* AddGhostPlacement(G4Transform3D*);
|
||||
// The same but using a G4Transform3D.
|
||||
|
||||
G4bool RemoveGhostPlacement(const G4Transform3D*);
|
||||
|
||||
|
||||
// Removes a Ghost placement.
|
||||
|
||||
public: // without description
|
||||
// Methods for print/control commands
|
||||
void ListTitle() const;
|
||||
void ListModels() const;
|
||||
@@ -131,12 +163,12 @@ private:
|
||||
G4FastTrack fFastTrack;
|
||||
G4FastStep fFastStep;
|
||||
G4VFastSimulationModel* fTriggedFastSimulationModel;
|
||||
RWTPtrOrderedVector<G4VFastSimulationModel> ModelList;
|
||||
RWTPtrOrderedVector<G4VFastSimulationModel> fInactivatedModels;
|
||||
RWTPtrOrderedVector<G4Transform3D> GhostPlacements;
|
||||
G4RWTPtrOrderedVector<G4VFastSimulationModel> ModelList;
|
||||
G4RWTPtrOrderedVector<G4VFastSimulationModel> fInactivatedModels;
|
||||
G4RWTPtrOrderedVector<G4Transform3D> GhostPlacements;
|
||||
|
||||
G4ParticleDefinition* fLastCrossedParticle;
|
||||
RWTPtrOrderedVector<G4VFastSimulationModel> fApplicableModelList;
|
||||
G4RWTPtrOrderedVector<G4VFastSimulationModel> fApplicableModelList;
|
||||
};
|
||||
|
||||
inline void
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastSimulationManagerProcess.hh,v 1.3 1999/04/28 10:06:39 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastSimulationManagerProcess.hh,v 1.4.2.1.2.1 1999/12/07 20:52:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef G4FastSimulationManagerProcess_h
|
||||
#define G4FastSimulationManagerProcess_h 1
|
||||
|
||||
#include <rw/tpordvec.h>
|
||||
#include "g4rw/tpordvec.h"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VProcess.hh"
|
||||
@@ -48,6 +48,13 @@
|
||||
// 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.
|
||||
//
|
||||
|
||||
class G4FastSimulationManagerProcess : public G4VProcess
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastSimulationMessenger.hh,v 1.2 1999/04/14 14:25:24 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastSimulationMessenger.hh,v 1.2.8.1 1999/12/07 20:52:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastStep.hh,v 1.3 1999/04/19 14:27:44 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastStep.hh,v 1.4.4.1 1999/12/07 20:52:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -56,61 +56,64 @@ class G4DynamicParticle;
|
||||
// G4FastStep class
|
||||
//
|
||||
//-------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
// The final state of the particles after parameterisation has to be returned through a G4FastStep
|
||||
// reference. This final state is described has "requests" the tracking will apply after your
|
||||
// parameterisation has been invoked.
|
||||
//
|
||||
// To facilitate the developers work, changes of position/normalized direction of the
|
||||
// momentum/polarization can be specified in the local coordinate system of the envelope or in the
|
||||
// global one.
|
||||
//
|
||||
// The default is local system coordinates.
|
||||
//
|
||||
|
||||
class G4FastStep: public G4VParticleChange
|
||||
{
|
||||
public:
|
||||
//===================================================
|
||||
//Fast Simulation Model Interface (section for users)
|
||||
//===================================================
|
||||
//
|
||||
// Particle management
|
||||
// -------------------
|
||||
//
|
||||
// The methods here provide an implementation of the
|
||||
// G4VParticleChange class for parameterisations.
|
||||
// They have to be filled to describe the FINAL STATE
|
||||
// of the particles.
|
||||
//
|
||||
// To facilitate the developers work, changes of
|
||||
// position/normalized direction of the momentum/polarization
|
||||
// can be specified in the local coordinate system of the envelope
|
||||
// or in the global one.
|
||||
//
|
||||
// The default is local system coordinates.
|
||||
|
||||
|
||||
// -- The KillPrimaryTrack() set the kinetic energy of the
|
||||
// -- primary to zero, and set the "fStopAndKill" signal
|
||||
// -- used by the stepping.
|
||||
public: // with Description
|
||||
void KillPrimaryTrack();
|
||||
// Set the kinetic energy of the primary to zero, and set the "fStopAndKill" signal
|
||||
// used by the stepping.
|
||||
|
||||
// -- Methods used to change the position, normalized direction of
|
||||
// the momentum, time etc... of the primary.
|
||||
// .. space and time:
|
||||
void SetPrimaryTrackFinalPosition (const G4ThreeVector &,
|
||||
G4bool localCoordinates = true);
|
||||
// Set the primary position.
|
||||
|
||||
void SetPrimaryTrackFinalTime (G4double);
|
||||
// Set the primary final time.
|
||||
|
||||
void SetPrimaryTrackFinalProperTime (G4double);
|
||||
// Set the primary final Proper Time.
|
||||
|
||||
// .. dynamics:
|
||||
// Be careful: the Track Final Momentum means the normalized direction
|
||||
// of the momentum!
|
||||
void SetPrimaryTrackFinalMomentum (const G4ThreeVector &,
|
||||
G4bool localCoordinates = true);
|
||||
// Set the primary final momentum.
|
||||
|
||||
void SetPrimaryTrackFinalKineticEnergy (G4double);
|
||||
// Set the primary final kinetic energy.
|
||||
|
||||
void SetPrimaryTrackFinalKineticEnergyAndDirection(G4double,
|
||||
const G4ThreeVector &,
|
||||
G4bool localCoordinates
|
||||
= true);
|
||||
// Set the primary final kinetic energy and direction.
|
||||
|
||||
void SetPrimaryTrackFinalPolarization(const G4ThreeVector &,
|
||||
G4bool localCoordinates = true);
|
||||
// Set the primary final polarization.
|
||||
|
||||
// .. true path length of the primary during the FastStep:
|
||||
void SetPrimaryTrackPathLength (G4double);
|
||||
// Set the true path length of the primary during the step.
|
||||
|
||||
// Weight applied for event biasing mechanism:
|
||||
void SetPrimaryTrackFinalEventBiasingWeight (G4double);
|
||||
|
||||
// Set the weight applied for event biasing mechanism.
|
||||
|
||||
// ------------------------------
|
||||
// -- Management of secondaries:
|
||||
@@ -130,11 +133,13 @@ public:
|
||||
// -- Total Number of secondaries to be created,
|
||||
// -- (to be called first)
|
||||
void SetNumberOfSecondaryTracks(G4int);
|
||||
// Set the total number of secondaries that will be created.
|
||||
|
||||
// -- Number of secondaries effectively stored:
|
||||
// -- (incremented at each CreateSecondaryTrack()
|
||||
// -- call)
|
||||
G4int GetNumberOfSecondaryTracks();
|
||||
// Returns the number of secondaries effectively stored.
|
||||
|
||||
// -- Create a secondary: the arguments are:
|
||||
// -- * G4DynamicsParticle: see header file, many constructors exist
|
||||
@@ -151,6 +156,19 @@ public:
|
||||
G4ThreeVector,
|
||||
G4double,
|
||||
G4bool localCoordinates=true);
|
||||
// Create a secondary. The arguments are:
|
||||
//
|
||||
// G4DynamicsParticle: see the G4DynamicsParticle reference, many constructors exist
|
||||
// (allow to set particle type + energy + the normalized direction of
|
||||
// momentum...);
|
||||
// G4ThreeVector : Polarization;
|
||||
// G4ThreeVector : Position;
|
||||
// G4double : Time;
|
||||
// G4bool : says if Position/Momentum are given in the local envelope coordinate
|
||||
// system (true by default).
|
||||
//
|
||||
// Returned value: pointer to the track created.
|
||||
//
|
||||
|
||||
//-- Create a secondary: the difference with he above declaration
|
||||
//-- is that the Polarization is not given and is assumed already set
|
||||
@@ -160,9 +178,15 @@ public:
|
||||
G4ThreeVector,
|
||||
G4double,
|
||||
G4bool localCoordinates=true);
|
||||
// Create a secondary. The difference with he above declaration is that the Polarization is not
|
||||
// given and is assumed already set in the G4DynamicParticle.
|
||||
//
|
||||
// Returned value: pointer to the track created
|
||||
|
||||
|
||||
// -- Gives a pointer on the i-th secondary track created:
|
||||
|
||||
G4Track* GetSecondaryTrack(G4int);
|
||||
// Returns a pointer on the i-th secondary track created.
|
||||
|
||||
//------------------------------------------------
|
||||
//
|
||||
@@ -176,35 +200,29 @@ public:
|
||||
//
|
||||
//------------------------------------------------
|
||||
void SetTotalEnergyDeposited(G4double anEnergyPart);
|
||||
// Set the total energy deposited.
|
||||
// It should be the delta energy of primary less the energy of the secondaries.
|
||||
|
||||
G4double GetTotalEnergyDeposited() const;
|
||||
// Returns the total energy deposited.
|
||||
|
||||
//----------------------------------------------------
|
||||
//
|
||||
// Control of the stepping manager Hit invocation:
|
||||
// -----------------------------------------------
|
||||
//
|
||||
// In a usual parameterisation, the control of
|
||||
// the hits production is under the user
|
||||
// responsability in his G4VFastSimulationModel
|
||||
// (he generally produces several hits at once.)
|
||||
//
|
||||
// However, in the particular case the G4Fast-
|
||||
// Simulation user's model acts as the physics
|
||||
// replacement only (ie replaces all the ***DoIt()
|
||||
// and leads to the construction of a meaningful
|
||||
// G4Step), the user can delegate to the
|
||||
// G4SteppingManager the responsability to invoke
|
||||
// the Hit()method of the current sensitive if any.
|
||||
//
|
||||
// By default, the G4SteppingManager is asked to
|
||||
// NOT invoke this Hit() method when parameterisation
|
||||
// is invoked. (See Initialize() method of G4FastStep)
|
||||
//
|
||||
//----------------------------------------------------
|
||||
void ForceSteppingHitInvocation();
|
||||
// Control of the stepping manager Hit invocation.
|
||||
//
|
||||
// In a usual parameterisation, the control of the hits production is under the user
|
||||
// responsability in his G4VFastSimulationModel (he generally produces several hits at once.)
|
||||
//
|
||||
// However, in the particular case the G4FastSimulation user's model acts as the physics
|
||||
// replacement only (ie replaces all the ***DoIt() and leads to the construction of a meaningful
|
||||
// G4Step), the user can delegate to the G4SteppingManager the responsability to invoke
|
||||
// the Hit()method of the current sensitive if any.
|
||||
//
|
||||
// By default, the G4SteppingManager is asked to NOT invoke this Hit() method when parameterisation
|
||||
// is invoked.
|
||||
//
|
||||
|
||||
|
||||
|
||||
public: // Without description
|
||||
//=======================================================
|
||||
// Implementation section and kernel interfaces.
|
||||
//=======================================================
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastStep.icc,v 1.1 1999/01/07 16:14:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastStep.icc,v 1.1.10.1 1999/12/07 20:52:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// $id: G4ParticleChange.icc,v 1.6 1998/04/14 02:25:54 kurasige Exp $
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastTrack.hh,v 1.2 1999/04/14 14:25:27 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastTrack.hh,v 1.3.4.1 1999/12/07 20:52:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// $Id:
|
||||
//---------------------------------------------------------------
|
||||
@@ -43,9 +43,19 @@ typedef G4LogicalVolume G4Envelope;
|
||||
// G4FastTrack class
|
||||
//
|
||||
//-------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
// The G4FastTrack provides you access to the current G4Track, gives simple access to envelope
|
||||
// related features (G4LogicalVolume, G4VSolid, G4AffineTransform references between the global
|
||||
// and the envelope local coordinates systems) and simple access to the position, momentum
|
||||
// expressed in the envelope coordinate system. Using those quantities and the G4VSolid methods,
|
||||
// you can for example easily check how far you are from the envelope boundary.
|
||||
//
|
||||
|
||||
|
||||
class G4FastTrack
|
||||
{
|
||||
public:
|
||||
public: // without description
|
||||
//------------------------
|
||||
// Constructor/Destructor
|
||||
//------------------------
|
||||
@@ -74,27 +84,49 @@ public:
|
||||
// Informations useful to the user :
|
||||
// General public get functions.
|
||||
//----------------------------------
|
||||
|
||||
public: // with Description
|
||||
|
||||
const G4Track* GetPrimaryTrack() const;
|
||||
// Returns the current G4Track.
|
||||
|
||||
G4Envelope* GetEnvelope() const;
|
||||
// Returns the Envelope G4LogicalVolume pointer.
|
||||
|
||||
G4VPhysicalVolume* GetEnvelopePhysicalVolume() const;
|
||||
// Returns the Envelope G4VPhysicalVolume pointer.
|
||||
|
||||
G4VSolid* GetEnvelopeSolid() const;
|
||||
// Returns the Envelope G4VSolid pointer.
|
||||
|
||||
//-----------------------------------
|
||||
// Primary track informations in the
|
||||
// Envelope coordinate system.
|
||||
//-----------------------------------
|
||||
|
||||
G4ThreeVector GetPrimaryTrackLocalPosition() const;
|
||||
// Returns the particle position in envelope coordinates.
|
||||
|
||||
G4ThreeVector GetPrimaryTrackLocalMomentum() const;
|
||||
// Returns the particle momentum in envelope coordinates.
|
||||
|
||||
G4ThreeVector GetPrimaryTrackLocalDirection() const;
|
||||
// Returns the particle direction in envelope coordinates.
|
||||
|
||||
G4ThreeVector GetPrimaryTrackLocalPolarization() const;
|
||||
// Returns the particle polarization in envelope coordinates.
|
||||
|
||||
//------------------------------------
|
||||
// 3D transformation of the envelope:
|
||||
//------------------------------------
|
||||
// Global -> Local
|
||||
|
||||
const G4AffineTransform* GetAffineTransformation() const;
|
||||
// Returns the envelope Global -> Local G4AffineTransform
|
||||
|
||||
// Local -> Global
|
||||
const G4AffineTransform* GetInverseAffineTransformation() const;
|
||||
// Returns the envelope Local -> Global G4AffineTransform
|
||||
|
||||
//-----------------
|
||||
// Private members
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FlavoredParallelWorld.hh,v 1.3 1999/04/15 17:17:20 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FlavoredParallelWorld.hh,v 1.3.8.1 1999/12/07 20:52:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4GlobalFastSimulationManager.hh,v 1.3 1999/04/28 10:06:39 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4GlobalFastSimulationManager.hh,v 1.4.2.1.2.1 1999/12/07 20:52:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -29,7 +29,7 @@
|
||||
#ifndef G4GlobalFastSimulationManager_hh
|
||||
#define G4GlobalFastSimulationManager_hh
|
||||
|
||||
#include <rw/tpordvec.h>
|
||||
#include "g4rw/tpordvec.h"
|
||||
|
||||
#include "G4VGlobalFastSimulationManager.hh"
|
||||
#include "G4FastSimulationManager.hh"
|
||||
@@ -46,13 +46,34 @@ enum listType {
|
||||
|
||||
class G4FastSimulationMessenger;
|
||||
|
||||
// Class Description:
|
||||
// This a singleton class which provides the management of the G4FastSimulationManager
|
||||
// objects and some ghost facilities.
|
||||
//
|
||||
// You can get access to it by:
|
||||
//
|
||||
// #include "G4GlobalFastSimulationManager.hh"
|
||||
// ...
|
||||
// ...
|
||||
// G4GlobalFastSimulationManager* globalFSM;
|
||||
// globalFSM = G4GlobalFastSimulationManager::getGlobalFastSimulationManager();
|
||||
// ...
|
||||
// ...
|
||||
//
|
||||
// Presently, you will mainly need to use the GlobalFastSimulationManager if you use ghost
|
||||
// geometries.
|
||||
//
|
||||
|
||||
class G4GlobalFastSimulationManager : public G4VStateDependent,
|
||||
public G4VGlobalFastSimulationManager
|
||||
{
|
||||
public:
|
||||
// Global access to the GlobalFastSimulationManager
|
||||
public: // With description
|
||||
|
||||
static G4GlobalFastSimulationManager* GetGlobalFastSimulationManager();
|
||||
|
||||
// Provides a global access to the GlobalFastSimulationManager
|
||||
|
||||
public: // Without description
|
||||
|
||||
// Destructor
|
||||
~G4GlobalFastSimulationManager();
|
||||
|
||||
@@ -63,10 +84,18 @@ public:
|
||||
void AddFastSimulationManager(G4FastSimulationManager*);
|
||||
void RemoveFastSimulationManager(G4FastSimulationManager*);
|
||||
|
||||
// Open/Close Parameterisation
|
||||
// Flag that the Parameterisation must be closed.
|
||||
void FastSimulationNeedsToBeClosed();
|
||||
void CloseFastSimulation();
|
||||
|
||||
|
||||
public: // With description
|
||||
void CloseFastSimulation();
|
||||
// Build the parallel worlds when you are using ghost volumes. In this case the Parameterisation
|
||||
// MUST be closed BEFORE closing the geometry. It's enough to call this method just before
|
||||
// closing the geometry.
|
||||
//
|
||||
|
||||
public: // Without description
|
||||
// print/control commands
|
||||
void ListEnvelopes(const G4String& aName = "all",
|
||||
listType aListType = NAMES_ONLY);
|
||||
@@ -92,13 +121,13 @@ private:
|
||||
G4FastSimulationMessenger* fTheFastSimulationMessenger;
|
||||
|
||||
// List of G4FastSimulationManagers
|
||||
RWTPtrOrderedVector<G4FastSimulationManager> ManagedManagers;
|
||||
G4RWTPtrOrderedVector<G4FastSimulationManager> ManagedManagers;
|
||||
|
||||
// fClosed flags if the NeededFlavoredWorlds List was Build.
|
||||
G4bool fClosed;
|
||||
|
||||
// List of needed ParallelWorlds after close
|
||||
RWTPtrOrderedVector<G4FlavoredParallelWorld> NeededFlavoredWorlds;
|
||||
G4RWTPtrOrderedVector<G4FlavoredParallelWorld> NeededFlavoredWorlds;
|
||||
|
||||
// Internal fonction to Build world volume clones.
|
||||
G4VPhysicalVolume* GiveMeAWorldVolumeClone();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4VFastSimulationModel.hh,v 1.1 1999/01/07 16:14:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4VFastSimulationModel.hh,v 1.2.4.1 1999/12/07 20:52:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -38,55 +38,88 @@ typedef G4LogicalVolume G4Envelope;
|
||||
// G4VFastSimulationModel class
|
||||
//
|
||||
//-------------------------------------------
|
||||
class G4VFastSimulationModel
|
||||
{
|
||||
public:
|
||||
//------------------------
|
||||
// Constructor/Destructor
|
||||
//------------------------
|
||||
// constructors require at least the model name.
|
||||
G4VFastSimulationModel(const G4String& aName);
|
||||
|
||||
// About the IsUnique flag, by default the envelope can
|
||||
// be placed n-Times. If the user is sure that it'll be
|
||||
// placed just one time the IsUnique flag should be set
|
||||
// TRUE to avoid the G4AffineTransform re-calculations each
|
||||
// time we reach the envelope.
|
||||
// Class Description:
|
||||
// This is the abstract class for the implementation of parameterisations.
|
||||
// You have to inherit from it to implement your concrete parameterisation
|
||||
// model.
|
||||
//
|
||||
|
||||
class G4VFastSimulationModel
|
||||
{
|
||||
public: // With description
|
||||
|
||||
G4VFastSimulationModel(const G4String& aName);
|
||||
// aName identifies the parameterisation model.
|
||||
|
||||
G4VFastSimulationModel(const G4String& aName, G4Envelope*,
|
||||
G4bool IsUnique=FALSE);
|
||||
// This constructor allows you to get a quick "getting started".
|
||||
// In addition to the model name, this constructor accepts a G4LogicalVolume
|
||||
// pointer. This volume will automatically becomes the envelope, and the
|
||||
// needed G4FastSimulationManager object is constructed if necessary giving
|
||||
// it the G4LogicalVolume pointer and the boolean value. If it already
|
||||
// exists, the model is simply added to this manager. However the
|
||||
// G4VFastSimulationModel object will not keep track of the envelope given
|
||||
// in the constructor.
|
||||
// The boolean argument is there for optimization purpose: if you know that
|
||||
// the G4LogicalVolume envelope is placed only once you can turn this
|
||||
// boolean value to "true" (an automated mechanism is foreseen here.)
|
||||
|
||||
~G4VFastSimulationModel() {};
|
||||
public: // Without description
|
||||
virtual ~G4VFastSimulationModel() {};
|
||||
|
||||
public: // With description
|
||||
|
||||
//
|
||||
//----------------------------------------------
|
||||
// Interface IsApplicable virtual method for the
|
||||
// G4FastSimulationManager
|
||||
//----------------------------------------------
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition&) = 0;
|
||||
// In your implementation, you have to return "true" when your model is
|
||||
// applicable to the G4ParticleDefinition passed to this method. The
|
||||
// G4ParticleDefinition provides all intrisic particle informations (mass,
|
||||
// charge, spin, name ...).
|
||||
|
||||
//
|
||||
//----------------------------------------------
|
||||
// Interface trigger virtual method for the
|
||||
// G4FastSimulationManager
|
||||
//----------------------------------------------
|
||||
virtual G4bool ModelTrigger(const G4FastTrack &) = 0;
|
||||
// You have to return "true" when the dynamics conditions to trigger your
|
||||
// parameterisation are fulfiled. The G4FastTrack provides you access to
|
||||
// the current G4Track, gives simple access to envelope related features
|
||||
// (G4LogicalVolume, G4VSolid, G4AffineTransform references between the
|
||||
// global and the envelope local coordinates systems) and simple access to
|
||||
// the position, momentum expressed in the envelope coordinate system.
|
||||
// Using those quantities and the G4VSolid methods, you can for example
|
||||
// easily check how far you are from the envelope boundary.
|
||||
|
||||
// -- Pure virtual DoIt() method : the FastSimulationModel
|
||||
// properly said. The user has to compute the detector
|
||||
// response and to manage the particle changes state:
|
||||
// -- * change position/momentum or kill the primary
|
||||
// -- * create secondaries
|
||||
virtual void DoIt(const G4FastTrack&, G4FastStep&) = 0;
|
||||
// Your parameterisation properly said. The G4FastTrack reference provides
|
||||
// input informations. The final state of the particles after parameterisation
|
||||
// has to be returned through the G4FastStep reference. This final state is
|
||||
// described has "requests" the tracking will apply after your
|
||||
// parameterisation has been invoked.
|
||||
|
||||
// ---------------------------
|
||||
// -- Idem for AtRest methods:
|
||||
// ---------------------------
|
||||
// -- A default dummy implementation is provided.
|
||||
|
||||
virtual
|
||||
G4bool AtRestModelTrigger(const G4FastTrack& fastTrack) {return false;}
|
||||
// You have to return "true" when the dynamics conditions to trigger your
|
||||
// parameterisation are fulfiled. The G4FastTrack provides you access to
|
||||
// the current G4Track, gives simple access to envelope related features
|
||||
// (G4LogicalVolume, G4VSolid, G4AffineTransform references between the
|
||||
// global and the envelope local coordinates systems) and simple access to
|
||||
// the position, momentum expressed in the envelope coordinate system.
|
||||
// Using those quantities and the G4VSolid methods, you can for example
|
||||
// easily check how far you are from the envelope boundary.
|
||||
|
||||
virtual
|
||||
void AtRestDoIt (const G4FastTrack& fastTrack, G4FastStep& fastStep) {}
|
||||
// Your parameterisation properly said. The G4FastTrack reference provides
|
||||
// input informations. The final state of the particles after parameterisation
|
||||
// has to be returned through the G4FastStep reference. This final state is
|
||||
// described has "requests" the tracking will apply after your
|
||||
// parameterisation has been invoked.
|
||||
|
||||
public: // Without description
|
||||
|
||||
// Useful public methods :
|
||||
const G4String GetName() const;
|
||||
G4bool operator == ( const G4VFastSimulationModel&) const;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastSimulationManager.cc,v 1.2 1999/04/14 14:25:31 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastSimulationManager.cc,v 1.2.8.1 1999/12/07 20:52:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//$Id:
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastSimulationManagerProcess.cc,v 1.3 1999/04/28 10:06:43 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastSimulationManagerProcess.cc,v 1.3.8.1 1999/12/07 20:52:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastSimulationMessenger.cc,v 1.2 1999/04/14 14:25:35 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastSimulationMessenger.cc,v 1.2.8.1 1999/12/07 20:52:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#include "G4FastSimulationMessenger.hh"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastStep.cc,v 1.4 1999/05/11 14:29:38 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastStep.cc,v 1.5.6.1 1999/12/07 20:52:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//$Id:
|
||||
//---------------------------------------------------------------
|
||||
@@ -438,12 +438,14 @@ G4bool G4FastStep::CheckIt(const G4Track& aTrack)
|
||||
G4bool exitWithError = false;
|
||||
G4double accuracy;
|
||||
|
||||
if (theEnergyChange > aTrack.GetKineticEnergy() * (1.0 - accuracyForWarning)) {
|
||||
// Energy should not be larger than the initial value
|
||||
accuracy = ( theEnergyChange - aTrack.GetKineticEnergy())/MeV;
|
||||
if (accuracy > accuracyForWarning) {
|
||||
G4cout << " G4FastStep::CheckIt : ";
|
||||
G4cout << "the energy becomes larger than the initial energy !!"
|
||||
<< " Difference : " << (theEnergyChange -aTrack.GetKineticEnergy())/MeV
|
||||
<< "[MeV] " <<endl;
|
||||
G4cout << "the energy becomes larger than the initial value !!" << endl;
|
||||
G4cout << " Difference: " << accuracy << "[MeV] " <<endl;
|
||||
itsOK = false;
|
||||
if (accuracy > accuracyForException) exitWithError = true;
|
||||
}
|
||||
|
||||
G4bool itsOKforMomentum = true;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4FastTrack.cc,v 1.2 1999/04/14 14:25:36 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4FastTrack.cc,v 1.2.8.1 1999/12/07 20:52:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//$Id:
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4GlobalFastSimulationManager.cc,v 1.4 1999/04/28 10:06:43 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4GlobalFastSimulationManager.cc,v 1.4.8.1 1999/12/07 20:52:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4VFastSimulationModel.cc,v 1.2 1999/04/14 14:25:38 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4VFastSimulationModel.cc,v 1.2.8.1 1999/12/07 20:52:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// $Id:
|
||||
//---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user