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
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4FastSimulationManager.hh,v 1.11 2006/06/29 21:09:04 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4FastSimulationManager.hh,v 1.12 2006/11/03 17:26:04 mverderi Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
@@ -143,44 +143,25 @@ public: // without description
G4VFastSimulationModel* GetFastSimulationModel(const G4String& modelName,
const G4VFastSimulationModel* previousFound,
bool &foundPrevious) const;
const std::vector<G4VFastSimulationModel*>& GetFastSimulationModelList() const
{return ModelList;}
// -------------------------------------------------
// 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.
//
//----------------------------------------------
// Interface methods for the G4GlobalFastSimulationManager
//----------------------------------------------
// Parallel geometry placements
G4bool InsertGhostHereIfNecessary(G4VPhysicalVolume* ,
const G4ParticleDefinition&);
//
// -------------------------------------------------------------
// Deprecated ghost methods, to be dropped @ next major release:
// -------------------------------------------------------------
G4Transform3D* AddGhostPlacement(G4RotationMatrix*, const G4ThreeVector&);
G4Transform3D* AddGhostPlacement(G4Transform3D*);
G4bool RemoveGhostPlacement(const G4Transform3D*);
G4bool InsertGhostHereIfNecessary(G4VPhysicalVolume*, const G4ParticleDefinition&);
//----------------------------------------------
// Interface methods for the
// G4FastSimulationManagerProcess process.
//----------------------------------------------
// Trigger
G4bool PostStepGetFastSimulationManagerTrigger(const G4Track &,
const G4Navigator* a = 0);
const G4Navigator* a = 0);
// DoIt
G4VParticleChange* InvokePostStepDoIt();
@@ -199,10 +180,12 @@ private:
G4VFastSimulationModel* fTriggedFastSimulationModel;
G4FastSimulationVector <G4VFastSimulationModel> ModelList;
G4FastSimulationVector <G4VFastSimulationModel> fInactivatedModels;
G4FastSimulationVector <G4Transform3D> GhostPlacements;
G4ParticleDefinition* fLastCrossedParticle;
G4FastSimulationVector <G4VFastSimulationModel> fApplicableModelList;
// -- *** depracating, to be dropped @ next major release:
G4FastSimulationVector <G4Transform3D> GhostPlacements;
};
inline void
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4FastSimulationManagerProcess.hh,v 1.12 2006/06/29 21:09:06 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4FastSimulationManagerProcess.hh,v 1.13 2006/11/03 17:26:04 mverderi Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
@@ -0,0 +1,161 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4FastSimulationManagerProcess81.hh,v 1.1 2006/11/10 13:23:07 mverderi Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
//
// G4FastSimulationManagerProcess81.hh
//
// Description:
// The process that triggers parameterised simulations if any.
//
// History:
// Feb 98: Parallel geometry sensitivity. MoraDeFreitas.
// Oct 97: "Fast" replaces "Parameterisation" in class/method names.
// (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.
//
//---------------------------------------------------------------
#ifndef G4FastSimulationManagerProcess81_hh
#define G4FastSimulationManagerProcess81_hh
#include "globals.hh"
#include "G4VProcess.hh"
#include "G4FastSimulationManager.hh"
#include "G4Step.hh"
#include "G4Navigator.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VParticleChange.hh"
// ---------------------------------------------------------------------
//
// G4FastSimulationManagerProcess81 class
//
// ---------------------------------------------------------------------
// Class Description:
// -- G4VProcess providing the interface between the tracking and the fast simulation.
//
class G4FastSimulationManagerProcess81 : public G4VProcess
{
public:
// -------------------------
// Constructor/Destructor:
// -------------------------
// -- Constructor for parameterisation in mass geometry
G4FastSimulationManagerProcess81(const G4String& processName = "G4FastSimulationManagerProcess81",
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.
G4FastSimulationManagerProcess81(const G4String& processName,
const G4String& worldVolumeName,
G4ProcessType theType = fParameterisation);
G4FastSimulationManagerProcess81(const G4String& processName,
G4VPhysicalVolume* worldVolume,
G4ProcessType theType = fParameterisation);
virtual ~G4FastSimulationManagerProcess81();
// -----------------------
// User access methods:
// -----------------------
// -- const G4VPhysicalVolume* GetWorldVolume() const {return fWorldVolume;}
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();
// -- PostStep methods:
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;
// ******* private *******
private:
//-- 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;
};
#endif
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4FastSimulationMessenger.hh,v 1.5 2006/06/29 21:09:08 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4FastSimulationMessenger.hh,v 1.6 2006/11/03 17:26:04 mverderi Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// GEANT 4 class header file
@@ -64,12 +64,13 @@ private:
G4GlobalFastSimulationManager* fGlobalFastSimulationManager;
//commands
G4UIdirectory *fFSDirectory;
G4UIcmdWithAString *fListEnvelopesCmd;
G4UIcmdWithAString *fListModelsCmd;
G4UIcmdWithAString *fListIsApplicableCmd;
G4UIcmdWithAString *fActivateModel;
G4UIcmdWithAString *fInActivateModel;
G4UIdirectory* fFSDirectory;
G4UIcmdWithoutParameter* fShowSetupCmd;
G4UIcmdWithAString* fListEnvelopesCmd;
G4UIcmdWithAString* fListModelsCmd;
G4UIcmdWithAString* fListIsApplicableCmd;
G4UIcmdWithAString* fActivateModel;
G4UIcmdWithAString* fInActivateModel;
};
#endif
@@ -25,7 +25,7 @@
//
//
// $Id: G4FastStep.hh,v 1.8 2006/06/29 21:09:14 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4FastStep.icc,v 1.5 2006/06/29 21:09:16 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
// $id: G4ParticleChange.icc,v 1.6 1998/04/14 02:25:54 kurasige Exp $
@@ -25,7 +25,7 @@
//
//
// $Id: G4FastTrack.hh,v 1.7 2006/06/29 21:09:18 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
// $Id:
//---------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4FlavoredParallelWorld.hh,v 1.6 2006/06/29 21:09:20 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4FlavoredParallelWorld.hh,v 1.7 2006/11/03 17:26:04 mverderi Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
@@ -49,7 +49,7 @@
#include "G4VFlavoredParallelWorld.hh"
class G4ParticleDefinition;
class G4VPhysicalVolume;
#include "G4VPhysicalVolume.hh"
class G4FlavoredParallelWorld : public G4VFlavoredParallelWorld
{
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4GFSManager81.hh,v 1.1 2006/11/10 13:23:07 mverderi Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
//
// G4GFSManager81.hh
//
// Description:
// Gathers code to be dropped @ next major release
//
// History:
// November 06: Marc Verderi
//
//---------------------------------------------------------------
#ifndef G4GFSManager81_hh
#define G4GFSManager81_hh
#include "globals.hh"
#include "G4FastSimulationVector.hh"
#include "G4FlavoredParallelWorld.hh"
#include "G4StateManager.hh"
class G4GFSManager;
class G4GFSManager81 {
public:
~G4GFSManager81();
void FastSimulationNeedsToBeClosed();
public:
void CloseFastSimulation();
G4VFlavoredParallelWorld* GetFlavoredWorldForThis(G4ParticleDefinition *);
G4bool Notify(G4ApplicationState requestedState);
G4GFSManager81();
private:
G4bool fClosed;
G4FastSimulationVector <G4FlavoredParallelWorld> NeededFlavoredWorlds;
G4VPhysicalVolume* GiveMeAWorldVolumeClone();
};
#endif
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GlobalFastSimulationManager.hh,v 1.10 2006/06/29 21:09:22 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4GlobalFastSimulationManager.hh,v 1.12 2006/11/10 13:23:07 mverderi Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
@@ -53,18 +53,19 @@
#include "G4VGlobalFastSimulationManager.hh"
#include "G4FastSimulationManager.hh"
#include "G4FastSimulationManagerProcess.hh"
#include "G4FastSimulationManagerProcess81.hh"
#include "G4StateManager.hh"
#include "G4VStateDependent.hh"
#include "G4FlavoredParallelWorld.hh"
class G4FastSimulationMessenger;
enum listType {
NAMES_ONLY,
MODELS,
ISAPPLICABLE
};
class G4FastSimulationMessenger;
// Class Description:
// This a singleton class which provides the management of the G4FastSimulationManager
@@ -84,9 +85,17 @@ class G4FastSimulationMessenger;
// geometries.
//
// -- *** to be dropped @ next major release: >>>
#include "G4GFSManager81.hh"
// -- <<<.
class G4GlobalFastSimulationManager : public G4VStateDependent,
public G4VGlobalFastSimulationManager
{
// -- *** to be dropped @ next major release: >>>
friend class G4GFSManager81;
// -- <<<.
public: // With description
static G4GlobalFastSimulationManager* GetGlobalFastSimulationManager();
@@ -123,12 +132,19 @@ public: // Without description
// Destructor
~G4GlobalFastSimulationManager();
// G4FastSimulationManager's management :
//
// G4FastSimulationManager(Process)'s management, no intended for
// general use.
//
// Methods for a G4FastSimulationManager to register itself
//
void AddFastSimulationManager(G4FastSimulationManager*);
void AddFastSimulationManager(G4FastSimulationManager*);
void RemoveFastSimulationManager(G4FastSimulationManager*);
//
// G4FastSimulationManagerProcess bookeeping:
//
void AddFSMP(G4FastSimulationManagerProcess81*);
void RemoveFSMP(G4FastSimulationManagerProcess81*);
// Flag that the Parameterisation must be closed.
@@ -136,19 +152,20 @@ public: // Without description
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.
//
void ShowSetup();
// Show the fast simulation setup : world(s), region(s), model(s) and links between them.
// Requires the geometry to be closed.
public: // Without description
// print/control commands
void ListEnvelopes(const G4String& aName = "all",
listType aListType = NAMES_ONLY);
void ListEnvelopes(const G4ParticleDefinition*);
void CloseFastSimulation();
// deprecated
void ListEnvelopes(const G4String& aName = "all",
listType aListType = NAMES_ONLY);
void ListEnvelopes(const G4ParticleDefinition* );
void ActivateFastSimulationModel(const G4String&);
void ActivateFastSimulationModel(const G4String&);
void InActivateFastSimulationModel(const G4String&);
// G4FastSimulationProcess interface
@@ -161,6 +178,9 @@ private:
// Private construtor insures singleton class
G4GlobalFastSimulationManager();
// recursive display of regions, models, etc...
void DisplayRegion(G4Region* motherRegion, G4int depth, std::vector<G4ParticleDefinition*>& particles) const;
// The single instance.
static G4GlobalFastSimulationManager* fGlobalFastSimulationManager;
@@ -170,14 +190,12 @@ private:
// List of G4FastSimulationManagers
G4FastSimulationVector <G4FastSimulationManager> ManagedManagers;
// fClosed flags if the NeededFlavoredWorlds List was Build.
G4bool fClosed;
// Instantiated fast simulation processes:
G4FastSimulationVector <G4FastSimulationManagerProcess81> fFSMPVector;
// List of needed ParallelWorlds after close
G4FastSimulationVector <G4FlavoredParallelWorld> NeededFlavoredWorlds;
// Internal fonction to Build world volume clones.
G4VPhysicalVolume* GiveMeAWorldVolumeClone();
// -- *** to be dropped @ next major release: >>>
G4GFSManager81* _deprecated;
};
#endif
@@ -25,7 +25,7 @@
//
//
// $Id: G4VFastSimulationModel.hh,v 1.7 2006/06/29 21:09:24 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------