Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogicalVolume.hh,v 1.8 2001/07/11 09:59:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4LogicalVolume.hh,v 1.9 2002/05/17 17:59:47 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// class G4LogicalVolume
|
||||
@@ -45,7 +45,7 @@
|
||||
// Daughters are ascribed and managed by means of a simple
|
||||
// GetNoDaughters,Get&SetDaughter(n),AddDaughter interface.
|
||||
//
|
||||
// Smart voxels as used for tracking optimisation are also an attribute.
|
||||
// Smart voxels as used for tracking optimisation. They're also an attribute.
|
||||
//
|
||||
// Logical volumes self register to the logical volume Store on construction,
|
||||
// and deregister on destruction.
|
||||
@@ -57,52 +57,56 @@
|
||||
//
|
||||
// G4std::vector<G4VPhysicalVolume*> fDaughters
|
||||
// - Vector of daughters. Given initial size of 0.
|
||||
// G4FieldManager *fFieldManager
|
||||
// - Pointer (possibly NULL) to (magnetic or other) field manager object.
|
||||
// G4Material *fMaterial
|
||||
// G4FieldManager* fFieldManager
|
||||
// - Pointer (possibly 0) to (magnetic or other) field manager object.
|
||||
// G4Material* fMaterial
|
||||
// - Pointer to material at this node.
|
||||
// G4String fName
|
||||
// - Name of logical volume.
|
||||
// G4VSensitiveDetector *fSensitiveDetector
|
||||
// - Pointer (possibly NULL) to `Hit' object.
|
||||
// G4VSolid *fSolid
|
||||
// - Pointer (possibly 0) to `Hit' object.
|
||||
// G4VSolid* fSolid
|
||||
// - Pointer to solid.
|
||||
// G4UserLimits *fUserLimits
|
||||
// - Pointer (possibly NULL) to user Step limit object for this node.
|
||||
// G4SmartVoxelHeader *fVoxel
|
||||
// - Pointer (possibly NULL) to optimisation info objects.
|
||||
// G4UserLimits* fUserLimits
|
||||
// - Pointer (possibly 0) to user Step limit object for this node.
|
||||
// G4SmartVoxelHeader* fVoxel
|
||||
// - Pointer (possibly 0) to optimisation info objects.
|
||||
// G4bool fOptimise;
|
||||
// - Flag to identify if optimisation should be applied or not.
|
||||
// G4double fSmartless
|
||||
// - Quality for optimisation, average number of voxels to be spent
|
||||
// per content.
|
||||
// const G4VisAttributes* fVisAttributes
|
||||
// - Pointer (possibly NULL) to visualization attributes.
|
||||
// G4FastSimulationManager *fFastSimulationManager
|
||||
// - Pointer (possibly NULL) to G4FastSimulationManager object.
|
||||
// - Pointer (possibly 0) to visualization attributes.
|
||||
// G4FastSimulationManager* fFastSimulationManager
|
||||
// - Pointer (possibly 0) to G4FastSimulationManager object.
|
||||
// G4bool fIsEnvelope
|
||||
// - Flags if the Logical Volume is an envelope for a FastSimulationManager.
|
||||
// G4double fBiasWeight
|
||||
// - Weight used in the event biasing technique.
|
||||
|
||||
// History:
|
||||
// 17.05.02 G.Cosmo: Added IsToOptimise() method and related flag
|
||||
// 18.04.01 G.Cosmo: Migrated to STL vector
|
||||
// 12.02.99 S.Giani: Added user defined optimisation quality
|
||||
// 09.11.98 J. Apostolakis: Changed G4MagneticField to G4FieldManager
|
||||
// 09.11.98 M. Verderi & JA. : added BiasWeight member and Get/Set methods
|
||||
// 10.20.97 P. MoraDeFreitas : added pointer to a FastSimulation
|
||||
// (J.Apostolakis) & flag to indicate if it is an Envelope for it
|
||||
// 19.11.96 J.Allison Replaced G4Visible with explicit const G4VisAttributes*.
|
||||
// 19.08.96 P.Kent Split -> hh/icc/cc files; G4VSensitiveDetector change
|
||||
// 11.07.95 P.Kent Initial version.
|
||||
// 09.11.98 J.Apostolakis: Changed G4MagneticField to G4FieldManager
|
||||
// 09.11.98 M.Verderi, J.Apostolakis: Added BiasWeight member and accessors
|
||||
// 10.20.97 P.M.DeFreitas: Added pointer to a FastSimulation
|
||||
// J.Apostolakis: & flag to indicate if it is an Envelope for it
|
||||
// 19.11.96 J.Allison: Replaced G4Visible with explicit const G4VisAttributes*
|
||||
// 19.08.96 P.Kent: Split -> hh/icc/cc files; G4VSensitiveDetector change
|
||||
// 11.07.95 P.Kent: Initial version.
|
||||
|
||||
#ifndef G4LOGICALVOLUME_HH
|
||||
#define G4LOGICALVOLUME_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPhysicalVolume.hh" // Need operator == for vector fdaughters
|
||||
#include "G4VPhysicalVolume.hh" // Need operator == for vector fdaughters
|
||||
#include "g4std/vector"
|
||||
#include <assert.h>
|
||||
|
||||
// Forward declarations
|
||||
//
|
||||
class G4FieldManager;
|
||||
class G4Material;
|
||||
class G4VSensitiveDetector;
|
||||
@@ -118,14 +122,19 @@ class G4LogicalVolume
|
||||
|
||||
public: // with description
|
||||
|
||||
G4LogicalVolume(G4VSolid *pSolid, G4Material *pMaterial,
|
||||
const G4String& name,
|
||||
G4FieldManager *pFieldMgr=0,
|
||||
G4VSensitiveDetector *pSDetector=0,
|
||||
G4UserLimits *pULimits=0);
|
||||
// Constructor. The solid and material pointer must be non null. The
|
||||
// parameters for field, detector and user limits are optional.
|
||||
G4LogicalVolume(G4VSolid* pSolid,
|
||||
G4Material* pMaterial,
|
||||
const G4String& name,
|
||||
G4FieldManager* pFieldMgr=0,
|
||||
G4VSensitiveDetector* pSDetector=0,
|
||||
G4UserLimits* pULimits=0,
|
||||
G4bool optimise=true);
|
||||
// Constructor. The solid and material pointer must be non null.
|
||||
// The parameters for field, detector and user limits are optional.
|
||||
// The volume also enters itself into the logical volume Store.
|
||||
// Optimisation of the geometry (voxelisation) for the volume
|
||||
// hierarchy is applied by default. For parameterised volumes in
|
||||
// the hierarchy, optimisation is -always- applied.
|
||||
|
||||
~G4LogicalVolume();
|
||||
// Destructor. Removes the logical volume from the logical volume Store.
|
||||
@@ -169,7 +178,7 @@ class G4LogicalVolume
|
||||
inline G4VSensitiveDetector* GetSensitiveDetector() const;
|
||||
// Gets current SensitiveDetector.
|
||||
inline void SetSensitiveDetector(G4VSensitiveDetector *pSDetector);
|
||||
// Sets SensitiveDetector (can be NULL).
|
||||
// Sets SensitiveDetector (can be 0).
|
||||
|
||||
inline G4UserLimits* GetUserLimits() const;
|
||||
inline void SetUserLimits(G4UserLimits *pULimits);
|
||||
@@ -179,13 +188,21 @@ class G4LogicalVolume
|
||||
inline void SetVoxelHeader(G4SmartVoxelHeader *pVoxel);
|
||||
// Gets and sets current VoxelHeader.
|
||||
|
||||
inline G4double GetSmartless();
|
||||
inline G4double GetSmartless() const;
|
||||
inline void SetSmartless(G4double s);
|
||||
// Gets and sets user defined optimisation quality.
|
||||
|
||||
inline G4bool IsToOptimise() const;
|
||||
// Replies if geometry optimisation (voxelisation) is to be
|
||||
// applied for this volume hierarchy.
|
||||
inline void SetOptimisation(G4bool optim);
|
||||
// Specifies if to apply or not geometry optimisation to this
|
||||
// volume hierarchy. Note that for parameterised volumes in the
|
||||
// hierarchy, optimisation is always applied.
|
||||
|
||||
G4bool operator == ( const G4LogicalVolume& lv) const;
|
||||
// Equality defined by address only- return true if objects are at
|
||||
// same address, else false.
|
||||
// Equality defined by address only.
|
||||
// Returns true if objects are at same address, else false.
|
||||
|
||||
inline const G4VisAttributes* GetVisAttributes () const;
|
||||
inline void SetVisAttributes (const G4VisAttributes* pVA);
|
||||
@@ -209,11 +226,11 @@ class G4LogicalVolume
|
||||
private:
|
||||
|
||||
void SetFastSimulationManager (G4FastSimulationManager* pPA,
|
||||
G4bool IsEnvelope);
|
||||
G4bool IsEnvelope);
|
||||
// Sets the fast simulation manager. Private method called by the
|
||||
// public SetIsEnvelope method with IsEnvelope = TRUE. It is
|
||||
// public SetIsEnvelope method with IsEnvelope = true. It is
|
||||
// then called recursivaly to the daughters to propagate the
|
||||
// FastSimulationManager pointer with IsEnvelope = FALSE.
|
||||
// FastSimulationManager pointer with IsEnvelope = false.
|
||||
|
||||
G4LogicalVolume* FindMotherLogicalVolumeForEnvelope();
|
||||
|
||||
@@ -227,27 +244,29 @@ class G4LogicalVolume
|
||||
|
||||
G4PhysicalVolumeList fDaughters;
|
||||
// Vector of daughters. Given initial size of 0.
|
||||
G4FieldManager *fFieldManager;
|
||||
// Pointer (possibly NULL) to (magnetic or other) field manager object.
|
||||
G4Material *fMaterial;
|
||||
G4FieldManager* fFieldManager;
|
||||
// Pointer (possibly 0) to (magnetic or other) field manager object.
|
||||
G4Material* fMaterial;
|
||||
// Pointer to material at this node.
|
||||
G4String fName;
|
||||
// Name of logical volume.
|
||||
G4VSensitiveDetector *fSensitiveDetector;
|
||||
// Pointer (possibly NULL) to `Hit' object.
|
||||
G4VSolid *fSolid;
|
||||
G4VSensitiveDetector* fSensitiveDetector;
|
||||
// Pointer (possibly 0) to `Hit' object.
|
||||
G4VSolid* fSolid;
|
||||
// Pointer to solid.
|
||||
G4UserLimits *fUserLimits;
|
||||
// Pointer (possibly NULL) to user Step limit object for this node.
|
||||
G4SmartVoxelHeader *fVoxel;
|
||||
// Pointer (possibly NULL) to optimisation info objects.
|
||||
G4UserLimits* fUserLimits;
|
||||
// Pointer (possibly 0) to user Step limit object for this node.
|
||||
G4SmartVoxelHeader* fVoxel;
|
||||
// Pointer (possibly 0) to optimisation info objects.
|
||||
G4bool fOptimise;
|
||||
// Flag to identify if optimisation should be applied or not.
|
||||
G4double fSmartless;
|
||||
// Quality for optimisation, average number of voxels to be spent
|
||||
// per content.
|
||||
const G4VisAttributes* fVisAttributes;
|
||||
// Pointer (possibly NULL) to visualization attributes.
|
||||
G4FastSimulationManager *fFastSimulationManager;
|
||||
// Pointer (possibly NULL) to G4FastSimulationManager object.
|
||||
// Pointer (possibly 0) to visualization attributes.
|
||||
G4FastSimulationManager* fFastSimulationManager;
|
||||
// Pointer (possibly 0) to G4FastSimulationManager object.
|
||||
G4bool fIsEnvelope;
|
||||
// Flags if the Logical Volume is an envelope for a
|
||||
// FastSimulationManager.
|
||||
|
||||
Reference in New Issue
Block a user