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

#include <Doxymodules_biasing.h>

Public Member Functions

 B02PVolumeStore ()
 
 ~B02PVolumeStore ()
 
void AddPVolume (const G4GeometryCell &cell)
 
const G4VPhysicalVolumeGetPVolume (const G4String &name) const
 
G4int Size ()
 
G4String GetPNames () const
 

Private Attributes

B02SetGeometryCell fSetGeometryCell
 

Detailed Description

Definition at line 37 of file Doxymodules_biasing.h.

Constructor & Destructor Documentation

◆ B02PVolumeStore()

B02PVolumeStore::B02PVolumeStore ( )

Definition at line 46 of file B02PVolumeStore.cc.

46{}

◆ ~B02PVolumeStore()

B02PVolumeStore::~B02PVolumeStore ( )

Definition at line 50 of file B02PVolumeStore.cc.

50{}

Member Function Documentation

◆ AddPVolume()

void B02PVolumeStore::AddPVolume ( const G4GeometryCell cell)

Definition at line 54 of file B02PVolumeStore.cc.

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

◆ GetPVolume()

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

Definition at line 70 of file B02PVolumeStore.cc.

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

◆ Size()

G4int B02PVolumeStore::Size ( )

Definition at line 110 of file B02PVolumeStore.cc.

110 {
111 return fSetGeometryCell.size();
112}

◆ GetPNames()

G4String B02PVolumeStore::GetPNames ( ) const

Definition at line 89 of file B02PVolumeStore.cc.

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

Member Data Documentation

◆ fSetGeometryCell

B02SetGeometryCell B02PVolumeStore::fSetGeometryCell
private

Definition at line 63 of file B02PVolumeStore.hh.


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

Applications | User Support | Publications | Collaboration