Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
B03PVolumeStore Class Reference

#include <Doxymodules_biasing.h>

Public Member Functions

 B03PVolumeStore ()
 
 ~B03PVolumeStore ()
 
void AddPVolume (const G4GeometryCell &cell)
 
const G4VPhysicalVolumeGetPVolume (const G4String &name) const
 
G4String GetPNames () const
 

Private Attributes

B03SetGeometryCell fSetGeometryCell
 

Detailed Description

Definition at line 54 of file Doxymodules_biasing.h.

Constructor & Destructor Documentation

◆ B03PVolumeStore()

B03PVolumeStore::B03PVolumeStore ( )

Definition at line 46 of file B03PVolumeStore.cc.

46{}

◆ ~B03PVolumeStore()

B03PVolumeStore::~B03PVolumeStore ( )

Definition at line 50 of file B03PVolumeStore.cc.

50{}

Member Function Documentation

◆ AddPVolume()

void B03PVolumeStore::AddPVolume ( const G4GeometryCell cell)

Definition at line 54 of file B03PVolumeStore.cc.

54 {
55
56 B03SetGeometryCell::iterator it =
57 fSetGeometryCell.find(cell);
58 if (it != fSetGeometryCell.end()) {
59 G4cout << "B03PVolumeStore::AddPVolume: cell already stored"
60 << G4endl;
61 return;
62 }
63
64 fSetGeometryCell.insert(cell);
65
66
67}
B03SetGeometryCell fSetGeometryCell

◆ GetPVolume()

const G4VPhysicalVolume * B03PVolumeStore::GetPVolume ( const G4String name) const

Definition at line 71 of file B03PVolumeStore.cc.

72 {
73 const G4VPhysicalVolume *pvol = 0;
74 for (B03SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
75 it != fSetGeometryCell.end(); ++it) {
76 const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
77 if (vol.GetName() == name) {
78 pvol = &vol;
79 }
80 }
81 if (!pvol) {
82 G4cout << "B03PVolumeStore::GetPVolume: no physical volume named: "
83 << name << ", found" << G4endl;
84 }
85 return pvol;
86}

◆ GetPNames()

G4String B03PVolumeStore::GetPNames ( ) const

Definition at line 90 of file B03PVolumeStore.cc.

90 {
91 G4String NameString;
92 for (B03SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
93 it != fSetGeometryCell.end(); ++it) {
94 const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
95 std::ostringstream os;
96 os << vol.GetName() << "_" << it->GetReplicaNumber()
97 << "\n";
98 G4String cellname = os.str();
99
100 // G4String cellname(vol.GetName());
101 // cellname += G4String("_");
102 // cellname += std::str(it->GetReplicaNumber());
103
104 NameString += cellname;
105 }
106 return NameString;
107}

Member Data Documentation

◆ fSetGeometryCell

B03SetGeometryCell B03PVolumeStore::fSetGeometryCell
private

Definition at line 62 of file B03PVolumeStore.hh.


The documentation for this class was generated from the following files:

Applications | User Support | Publications | Collaboration