15 #include "GaudiKernel/MsgStream.h"
20 Trk::TrackingVolumeManipulator()
44 return StatusCode::SUCCESS;
49 const std::vector<Trk::Layer*>& negLayers,
50 const std::vector<Trk::Layer*>& centralLayers,
51 const std::vector<Trk::Layer*>& posLayers,
52 double rMin,
double rMax,
53 double zMax,
double zPosCentral,
54 const std::string& baseName,
60 ATH_MSG_VERBOSE(
'\t' <<
'\t'<<
"Pack provided Layers from '" << baseName <<
"' triple into a container volume. " );
63 std::string volumeBase =
m_namespace+
"Detectors::"+baseName;
83 volumeBase +
"::Barrel",
99 '\t' <<
'\t' <<
"Volumes have been created, now pack them into a triple.");
106 std::vector<Trk::TrackingVolume*> tripleVolumes;
107 tripleVolumes.push_back(negativeVolume);
108 tripleVolumes.push_back(centralVolume);
109 tripleVolumes.push_back(positiveVolume);
120 ATH_MSG_VERBOSE(
'\t' <<
'\t' <<
"Created container volume with bounds: "
123 return tripleContainer;
128 const std::vector<Trk::TrackingVolume*>& negVolumes,
129 const std::vector<Trk::TrackingVolume*>& centralVolumes,
130 const std::vector<Trk::TrackingVolume*>& posVolumes,
131 const std::string& baseName)
const
133 ATH_MSG_VERBOSE(
'\t' <<
'\t'<<
"Pack provided Volumes from '" << baseName <<
"' triple into a container volume. " );
135 unsigned int negVolSize = negVolumes.size();
136 unsigned int cenVolSize = centralVolumes.size();
137 unsigned int posVolSize = posVolumes.size();
142 std::string volumeBase =
m_namespace+
"Containers::"+baseName;
147 volumeBase+
"::NegativeSector",
150 (negVolSize ? negVolumes[0] :
nullptr);
154 volumeBase+
"::CentralSector",
157 (cenVolSize ? centralVolumes[0] :
nullptr) ;
162 volumeBase+
"::PositiveSector",
165 (posVolSize ? posVolumes[0] :
nullptr);
167 if (!negativeVolume && !positiveVolume){
168 ATH_MSG_DEBUG(
"No negative/positive sector given - no packing needed, returning central container!" );
169 return centralVolume;
172 std::vector<Trk::TrackingVolume*> tripleVolumes;
173 if (negativeVolume) tripleVolumes.push_back(negativeVolume);
174 if (centralVolume) tripleVolumes.push_back(centralVolume);
175 if (positiveVolume) tripleVolumes.push_back(positiveVolume);
183 return tripleContainer;