G4IStore Class Reference

#include <G4IStore.hh>

Inheritance diagram for G4IStore:

G4VIStore

Public Member Functions

 G4IStore (const G4VPhysicalVolume &worldvolume)
virtual ~G4IStore ()
virtual G4double GetImportance (const G4GeometryCell &gCell) const
virtual G4bool IsKnown (const G4GeometryCell &gCell) const
virtual const G4VPhysicalVolumeGetWorldVolume () const
void AddImportanceGeometryCell (G4double importance, const G4GeometryCell &gCell)
void AddImportanceGeometryCell (G4double importance, const G4VPhysicalVolume &, G4int aRepNum=0)
void ChangeImportance (G4double importance, const G4GeometryCell &gCell)
void ChangeImportance (G4double importance, const G4VPhysicalVolume &, G4int aRepNum=0)
G4double GetImportance (const G4VPhysicalVolume &, G4int aRepNum=0) const

Detailed Description

Definition at line 52 of file G4IStore.hh.


Constructor & Destructor Documentation

G4IStore::G4IStore ( const G4VPhysicalVolume worldvolume  )  [explicit]

Definition at line 42 of file G4IStore.cc.

00042                                                        :
00043   fWorldVolume(worldvolume)
00044 {}

G4IStore::~G4IStore (  )  [virtual]

Definition at line 46 of file G4IStore.cc.

00047 {}


Member Function Documentation

void G4IStore::AddImportanceGeometryCell ( G4double  importance,
const G4VPhysicalVolume ,
G4int  aRepNum = 0 
)

Definition at line 74 of file G4IStore.cc.

References AddImportanceGeometryCell().

00077 {
00078   AddImportanceGeometryCell(importance,
00079                       G4GeometryCell(aVolume, aRepNum));
00080 }

void G4IStore::AddImportanceGeometryCell ( G4double  importance,
const G4GeometryCell gCell 
)

Definition at line 59 of file G4IStore.cc.

References G4GeometryCell::GetPhysicalVolume().

Referenced by AddImportanceGeometryCell().

00060                                                      {
00061   if (importance < 0 ) {
00062     Error("AddImportanceGeometryCell() - Invalid importance value given.");
00063   }  
00064   if (!IsInWorld(gCell.GetPhysicalVolume()) ) {
00065     Error("AddImportanceGeometryCell() - Physical volume not found!");
00066   }
00067   SetInternalIterator(gCell);
00068   if (fCurrentIterator!=fGeometryCelli.end()) {
00069     Error("AddImportanceGeometryCell() - Region already existing!");
00070   }
00071   fGeometryCelli[gCell] = importance;
00072 }

void G4IStore::ChangeImportance ( G4double  importance,
const G4VPhysicalVolume ,
G4int  aRepNum = 0 
)

Definition at line 97 of file G4IStore.cc.

References ChangeImportance().

00100 {
00101   ChangeImportance(importance, G4GeometryCell(aVolume, aRepNum));
00102 }

void G4IStore::ChangeImportance ( G4double  importance,
const G4GeometryCell gCell 
)

Definition at line 82 of file G4IStore.cc.

References G4GeometryCell::GetPhysicalVolume().

Referenced by ChangeImportance().

00083                                                             {
00084   if (importance < 0 ) {
00085     Error("ChangeImportance() - Invalid importance value given.");
00086   }
00087   if (!IsInWorld(gCell.GetPhysicalVolume()) ) {
00088     Error("ChangeImportance() - Physical volume not found!");
00089   }
00090   SetInternalIterator(gCell);
00091   if (fCurrentIterator==fGeometryCelli.end()) {
00092     Error("ChangeImportance() - Region does not exist!");
00093   }
00094   fGeometryCelli[gCell] = importance;
00095 
00096 }

G4double G4IStore::GetImportance ( const G4VPhysicalVolume ,
G4int  aRepNum = 0 
) const

Definition at line 104 of file G4IStore.cc.

00106 {  
00107   SetInternalIterator(G4GeometryCell(aVolume, aRepNum));
00108   G4GeometryCellImportance::const_iterator gCellIterator = fCurrentIterator;
00109   if (gCellIterator==fGeometryCelli.end()) {
00110     Error("GetImportance() - Region does not exist!");
00111     return 0.;
00112   }
00113   return (*fCurrentIterator).second;
00114 }

G4double G4IStore::GetImportance ( const G4GeometryCell gCell  )  const [virtual]

Implements G4VIStore.

Definition at line 117 of file G4IStore.cc.

References G4endl.

00118 {
00119   SetInternalIterator(gCell);
00120   G4GeometryCellImportance::const_iterator gCellIterator = fCurrentIterator;
00121   if (gCellIterator==fGeometryCelli.end()) {
00122     std::ostringstream err_mess;
00123     err_mess << "GetImportance() - Region does not exist!" << G4endl
00124              << "Geometry cell, " << gCell
00125              << ", not found in: " << fGeometryCelli << ".";
00126     Error(err_mess.str());
00127     return 0.;
00128   }
00129   return (*fCurrentIterator).second;
00130 }

const G4VPhysicalVolume & G4IStore::GetWorldVolume (  )  const [virtual]

Implements G4VIStore.

Definition at line 49 of file G4IStore.cc.

00050 {
00051   return fWorldVolume;
00052 }

G4bool G4IStore::IsKnown ( const G4GeometryCell gCell  )  const [virtual]

Implements G4VIStore.

Definition at line 132 of file G4IStore.cc.

References G4GeometryCell::GetPhysicalVolume().

00132                                                           {
00133   G4bool inWorldKnown(IsInWorld(gCell.GetPhysicalVolume()));
00134                       
00135   if ( inWorldKnown ) {
00136     SetInternalIterator(gCell);
00137     inWorldKnown = (fCurrentIterator!=fGeometryCelli.end());
00138   }
00139   return inWorldKnown;
00140 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:19 2013 for Geant4 by  doxygen 1.4.7