7 #include <G4TouchableHandle.hh> 17 int historyDepth = handle->GetHistoryDepth();
19 for (
int i=0; i< historyDepth; ++i) {
20 AddVolume(handle->GetVolume(i),handle->GetReplicaNumber(i));
27 int historyDepth = handle->GetHistoryDepth();
29 for (
int i=0; i< historyDepth; ++i) {
30 AddVolume(handle->GetVolume(i),handle->GetReplicaNumber(i));
39 i !=
id.fVolumes.end();
61 if (a->fHandle != b->fHandle)
return false;
62 if (a->fReplica != b->fReplica)
return false;
72 unsigned int historyDepth = y->GetHistoryDepth();
73 if (x.
fVolumes.size() != historyDepth)
return false;
79 if (a->fHandle != y->GetVolume(b)) {
82 if (a->fReplica != y->GetReplicaNumber(b)) {
109 if (a->fHandle < b->fHandle)
return true;
110 if (a->fHandle > b->fHandle)
return false;
111 if (a->fHandle == b->fHandle) {
112 if (a->fReplica < b->fReplica)
return true;
113 if (a->fReplica > b->fReplica)
return false;
121 stream<<
"<VolumeId ";
130 stream << v.
fVolumes.front().fHandle->GetName() <<
">";
EDepSim::VolumeId & operator=(const G4TouchableHandle &handle)
G4VPhysicalVolume * fHandle
friend std::ostream & operator<<(std::ostream &s, const EDepSim::VolumeId &)
VolumeId()
Construct an empty volume Id.
bool operator<(const EDepSim::VolumeId &x, const EDepSim::VolumeId &y)
void AddVolume(G4VPhysicalVolume *fHandle, int fReplica)
Explicitly add a new volume to the volume Id.
bool operator==(const EDepSim::VolumeId &x, const EDepSim::VolumeId &y)
bool operator!=(const EDepSim::VolumeId &x, const EDepSim::VolumeId &y)