431 G4bool found =
false;
size_t foundPosition = 0;
432 for (
size_t i = 0; i < node->fDaughters.size(); ++i) {
433 PVNodeID& daughterPVNodeID = node->fDaughters[i]->fPVNodeID;
435 if (daughterPVNodeID.GetPhysicalVolume() == pvPath[0].GetPhysicalVolume() &&
436 daughterPVNodeID.GetCopyNo() == pvPath[0].GetCopyNo()) {
443 if (pathLength == 1) {
445 node->fDaughters[foundPosition]->fIndex = index;
447 node->fDaughters.push_back(
new Node(pvPath[0],index));
454 Insert(pvPath+1,--pathLength,index,
455 node->fDaughters[foundPosition]);
457 node->fDaughters.push_back(
new Node(pvPath[0]));
458 Insert(pvPath+1,--pathLength,index,
459 node->fDaughters[node->fDaughters.size()-1]);
G4PhysicalVolumeModel::G4PhysicalVolumeNodeID PVNodeID
void Insert(const PVNodeID *pvPath, size_t pathLength, G4int index, Node *node)