16 if (volumes().
empty())
return nullptr;
23 for (VolumeContainer::const_iterator
i=volumes().
begin();
i!=volumes().end(); ++
i) {
28 if (
pos < (**i).position()) {
31 <<
", " << (**i).zPos() <<
" contains exit point" <<
endmsg;
37 <<
", " << (**i).zPos() <<
" does not contain exit point" <<
endmsg;
40 return volumes().front();
43 for (VolumeContainer::const_reverse_iterator
i=volumes().rbegin();
i!=volumes().rend(); ++
i) {
44 if ((**i).contains(
pos))
return *
i;
46 return volumes().back();
57 if (m_exitVolume !=
nullptr)
return m_exitVolume;
60 if (volumes().
empty())
return nullptr;
62 for (VolumeContainer::const_iterator
i=volumes().
begin();
i!=volumes().end(); ++
i) {
63 if ((**i).contains(
exit()))
return *
i;
66 <<
", " << (**i).zPos() <<
" does not contain exit point" <<
endmsg;
69 return volumes().back();
72 for (VolumeContainer::const_reverse_iterator
i=volumes().rbegin();
i!=volumes().rend(); ++
i) {
73 if ((**i).contains(
exit()))
return *
i;
75 return volumes().front();