Import Geant4 9.0.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FastSimulationManager.hh,v 1.12 2006/11/03 17:26:04 mverderi Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4FastSimulationManager.hh,v 1.13 2007/05/11 13:50:20 mverderi Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -89,13 +89,13 @@ public: // with description
|
||||
//------------------------
|
||||
// Only one Constructor. By default the envelope can
|
||||
// be placed n-Times.
|
||||
// If the user is sure that it'll be placed just one time,
|
||||
// If the user is sure that it is placed just one time,
|
||||
// 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);
|
||||
G4bool IsUnique = FALSE);
|
||||
// This is the only constructor. In this constructor you specify
|
||||
// the envelope by giving the G4Region (typedef-ed as G4Envelope)
|
||||
// pointer. The G4FastSimulationManager object will bind itself to
|
||||
@@ -148,13 +148,6 @@ public: // without description
|
||||
{return ModelList;}
|
||||
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// 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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.6 2006/11/03 17:26:04 mverderi Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4FastSimulationMessenger.hh,v 1.7 2007/05/11 13:50:20 mverderi Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// GEANT 4 class header file
|
||||
@@ -64,13 +64,13 @@ private:
|
||||
G4GlobalFastSimulationManager* fGlobalFastSimulationManager;
|
||||
|
||||
//commands
|
||||
G4UIdirectory* fFSDirectory;
|
||||
G4UIcmdWithoutParameter* fShowSetupCmd;
|
||||
G4UIcmdWithAString* fListEnvelopesCmd;
|
||||
G4UIcmdWithAString* fListModelsCmd;
|
||||
G4UIdirectory* fFSDirectory;
|
||||
G4UIcmdWithoutParameter* fShowSetupCmd;
|
||||
G4UIcmdWithAString* fListEnvelopesCmd;
|
||||
G4UIcmdWithAString* fListModelsCmd;
|
||||
G4UIcmdWithAString* fListIsApplicableCmd;
|
||||
G4UIcmdWithAString* fActivateModel;
|
||||
G4UIcmdWithAString* fInActivateModel;
|
||||
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-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FastStep.icc,v 1.5 2006/06/29 21:09:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// $id: G4ParticleChange.icc,v 1.6 1998/04/14 02:25:54 kurasige Exp $
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FastTrack.hh,v 1.7 2006/06/29 21:09:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4FastTrack.hh,v 1.8 2007/05/11 13:50:20 mverderi Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// $Id:
|
||||
//---------------------------------------------------------------
|
||||
@@ -167,22 +167,24 @@ private:
|
||||
// of the envelope.
|
||||
//------------------------------------------------
|
||||
void FRecordsAffineTransformation(const G4Navigator*);
|
||||
G4bool fAffineTransformationDefined;
|
||||
G4Envelope* fEnvelope;
|
||||
G4bool fIsUnique;
|
||||
G4LogicalVolume* fEnvelopeLogicalVolume;
|
||||
G4VPhysicalVolume* fEnvelopePhysicalVolume;
|
||||
G4VSolid* fEnvelopeSolid;
|
||||
G4ThreeVector fLocalTrackPosition, fLocalTrackMomentum,
|
||||
fLocalTrackDirection, fLocalTrackPolarization;
|
||||
G4AffineTransform fAffineTransformation, fInverseAffineTransformation;
|
||||
G4bool fAffineTransformationDefined;
|
||||
G4Envelope* fEnvelope;
|
||||
G4bool fIsUnique;
|
||||
G4LogicalVolume* fEnvelopeLogicalVolume;
|
||||
G4VPhysicalVolume* fEnvelopePhysicalVolume;
|
||||
G4VSolid* fEnvelopeSolid;
|
||||
G4ThreeVector fLocalTrackPosition,
|
||||
fLocalTrackMomentum,
|
||||
fLocalTrackDirection,
|
||||
fLocalTrackPolarization;
|
||||
G4AffineTransform fAffineTransformation,
|
||||
fInverseAffineTransformation;
|
||||
};
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
// Inline functions
|
||||
//
|
||||
//*******************************************************************
|
||||
|
||||
// -----------------
|
||||
// -- Inline methods
|
||||
// -----------------
|
||||
|
||||
inline G4Envelope* G4FastTrack::GetEnvelope() const
|
||||
{
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4FlavoredParallelWorld.hh,v 1.7 2006/11/03 17:26:04 mverderi Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4FlavoredParallelWorld.hh
|
||||
//
|
||||
// Description:
|
||||
// Internal class to keep ParticleType X Parallel world
|
||||
// relationship.
|
||||
//
|
||||
// History:
|
||||
// June 98: Verderi && MoraDeFreitas - "G4ParallelWorld" becomes
|
||||
// "G4FlavoredParallelWorld".
|
||||
// Mars 98: Verderi && MoraDeFreitas - First Implementation.
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
#ifndef G4FlavoredParallelWorld_hh
|
||||
#define G4FlavoredParallelWorld_hh
|
||||
|
||||
#include "G4VFlavoredParallelWorld.hh"
|
||||
|
||||
class G4ParticleDefinition;
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
class G4FlavoredParallelWorld : public G4VFlavoredParallelWorld
|
||||
{
|
||||
public:
|
||||
//
|
||||
// Constructor
|
||||
G4FlavoredParallelWorld(G4ParticleDefinition *pParticleType,
|
||||
G4VPhysicalVolume *pWorld) {
|
||||
ParticleType=pParticleType;
|
||||
World=pWorld;
|
||||
}
|
||||
//
|
||||
// Destructor
|
||||
~G4FlavoredParallelWorld() {
|
||||
delete World;
|
||||
World = 0;
|
||||
}
|
||||
// Get/Set
|
||||
inline G4ParticleDefinition* GetTheParticleType() const {
|
||||
return ParticleType;
|
||||
}
|
||||
|
||||
inline G4VPhysicalVolume* GetThePhysicalVolumeWorld() const {
|
||||
return World;
|
||||
}
|
||||
|
||||
// operator ==
|
||||
inline G4bool
|
||||
operator == (const G4FlavoredParallelWorld& pw) const {
|
||||
return (this==&pw) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
G4ParticleDefinition *ParticleType;
|
||||
G4VPhysicalVolume *World;
|
||||
};
|
||||
|
||||
#endif
|
||||
// end of #ifndef G4FlavoredParallelWorld_hh
|
||||
@@ -1,73 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.12 2006/11/10 13:23:07 mverderi Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4GlobalFastSimulationManager.hh,v 1.13 2007/05/11 13:50:20 mverderi Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -53,10 +53,8 @@
|
||||
|
||||
#include "G4VGlobalFastSimulationManager.hh"
|
||||
#include "G4FastSimulationManager.hh"
|
||||
#include "G4FastSimulationManagerProcess81.hh"
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4VStateDependent.hh"
|
||||
#include "G4FlavoredParallelWorld.hh"
|
||||
#include "G4FastSimulationManagerProcess.hh"
|
||||
|
||||
|
||||
class G4FastSimulationMessenger;
|
||||
|
||||
@@ -85,44 +83,29 @@ enum listType {
|
||||
// geometries.
|
||||
//
|
||||
|
||||
// -- *** to be dropped @ next major release: >>>
|
||||
#include "G4GFSManager81.hh"
|
||||
// -- <<<.
|
||||
|
||||
class G4GlobalFastSimulationManager : public G4VStateDependent,
|
||||
public G4VGlobalFastSimulationManager
|
||||
class G4GlobalFastSimulationManager
|
||||
{
|
||||
// -- *** to be dropped @ next major release: >>>
|
||||
friend class G4GFSManager81;
|
||||
// -- <<<.
|
||||
|
||||
public: // With description
|
||||
|
||||
static G4GlobalFastSimulationManager* GetGlobalFastSimulationManager();
|
||||
// Provides a global access to the GlobalFastSimulationManager
|
||||
static G4GlobalFastSimulationManager* GetInstance();
|
||||
// Same as GetGlobalFastSimulationManager()
|
||||
|
||||
G4VFastSimulationModel* GetFastSimulationModel(const G4String& modelName,
|
||||
const G4VFastSimulationModel* previousFound = 0) const;
|
||||
// Fetch G4VFastSimulationModel by name:
|
||||
//
|
||||
// Iterative fetch of G4VFastSimulationModel objects by name:
|
||||
// o returns the G4VFastSimulationModel* of model with name modelName;
|
||||
// o returns 0 if no model found;
|
||||
//
|
||||
// - usage:
|
||||
//
|
||||
// myModel = gblManager->GetFastSimulationModel("MyModel");
|
||||
//
|
||||
// o usage:
|
||||
// myModel = gblManager->GetFastSimulationModel("MyModel");
|
||||
// o note for the case of several models having the same name:
|
||||
// - to get the first "MyModel" model:
|
||||
//
|
||||
// myModel1 = gblManager->GetFastSimulationModel("MyModel", 0);
|
||||
//
|
||||
// - to get the next one:
|
||||
//
|
||||
// myModel2 = gblManager->GetFastSimulationModel("MyModel", myModel1);
|
||||
//
|
||||
// - and so on.
|
||||
//
|
||||
// - When gblManager->GetFastSimulationModel("MyModel", myModel_n)
|
||||
// returns a null pointer, no extra model with name "MyModel" exist.
|
||||
|
||||
@@ -133,8 +116,7 @@ public: // Without description
|
||||
~G4GlobalFastSimulationManager();
|
||||
|
||||
//
|
||||
// G4FastSimulationManager(Process)'s management, no intended for
|
||||
// general use.
|
||||
// G4FastSimulationManager(Process)'s management, no intended for general use.
|
||||
//
|
||||
// Methods for a G4FastSimulationManager to register itself
|
||||
//
|
||||
@@ -143,8 +125,8 @@ public: // Without description
|
||||
//
|
||||
// G4FastSimulationManagerProcess bookeeping:
|
||||
//
|
||||
void AddFSMP(G4FastSimulationManagerProcess81*);
|
||||
void RemoveFSMP(G4FastSimulationManagerProcess81*);
|
||||
void AddFSMP(G4FastSimulationManagerProcess*);
|
||||
void RemoveFSMP(G4FastSimulationManagerProcess*);
|
||||
|
||||
|
||||
// Flag that the Parameterisation must be closed.
|
||||
@@ -158,8 +140,6 @@ public: // With description
|
||||
|
||||
|
||||
public: // Without description
|
||||
void CloseFastSimulation();
|
||||
// deprecated
|
||||
|
||||
void ListEnvelopes(const G4String& aName = "all",
|
||||
listType aListType = NAMES_ONLY);
|
||||
@@ -168,11 +148,7 @@ public: // Without description
|
||||
void ActivateFastSimulationModel(const G4String&);
|
||||
void InActivateFastSimulationModel(const G4String&);
|
||||
|
||||
// G4FastSimulationProcess interface
|
||||
G4VFlavoredParallelWorld* GetFlavoredWorldForThis(G4ParticleDefinition *);
|
||||
|
||||
// G4StateManager interface
|
||||
G4bool Notify(G4ApplicationState requestedState);
|
||||
|
||||
private:
|
||||
// Private construtor insures singleton class
|
||||
@@ -182,20 +158,10 @@ private:
|
||||
void DisplayRegion(G4Region* motherRegion, G4int depth, std::vector<G4ParticleDefinition*>& particles) const;
|
||||
|
||||
// The single instance.
|
||||
static G4GlobalFastSimulationManager* fGlobalFastSimulationManager;
|
||||
|
||||
// The G4FastSimulationMessenger
|
||||
G4FastSimulationMessenger* fTheFastSimulationMessenger;
|
||||
|
||||
// List of G4FastSimulationManagers
|
||||
G4FastSimulationVector <G4FastSimulationManager> ManagedManagers;
|
||||
|
||||
// Instantiated fast simulation processes:
|
||||
G4FastSimulationVector <G4FastSimulationManagerProcess81> fFSMPVector;
|
||||
|
||||
|
||||
// -- *** to be dropped @ next major release: >>>
|
||||
G4GFSManager81* _deprecated;
|
||||
static G4GlobalFastSimulationManager* fGlobalFastSimulationManager;
|
||||
G4FastSimulationMessenger* fTheFastSimulationMessenger;
|
||||
G4FastSimulationVector <G4FastSimulationManager> ManagedManagers;
|
||||
G4FastSimulationVector <G4FastSimulationManagerProcess> fFSMPVector;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VFastSimulationModel.hh,v 1.7 2006/06/29 21:09:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user