|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/SystemOfUnits.h"
27 const std::vector<const ServiceVolume*>&
29 for (
unsigned int i = 0;
i < origVolumeList.size(); ++
i) {
44 double rmin = origVolume.
rmin();
45 double rmax = origVolume.
rmax();
50 bool horizontal = (std::abs(
zmax -
zmin) > std::abs(rmax - rmin));
52 double rmid = 0.5 * (rmin + rmax);
63 if (origVolume.
zsymm()) {
90 double volumeTotal = 0;
92 std::vector<ServiceVolume* > tmpServiceVec;
93 tmpServiceVec.reserve(segments.
size());
94 for (
unsigned int i = 0;
i < segments.
size(); ++
i) {
105 std::cout <<
"Volume " << param.
fullLabel() <<
" cannot be split in Z" << std::endl;
113 std::cout <<
"Volume " << param.
fullLabel() <<
" cannot be split in R" << std::endl;
122 double zminTmp = paramNew->
zmin();
134 tmpServiceVec.push_back(paramNew);
137 volumeTotal += paramNew->
volume();
141 for (
unsigned int i = 0;
i < segments.
size(); ++
i) {
143 if (segments.
size() > 1) {
144 std::ostringstream ostr;
145 ostr <<
"_" <<
i + 1;
156 double z1 = param.
zmin();
157 double z2 = param.
zmax();
158 double z1New = paramNew->
zmin();
159 double z2New = paramNew->
zmax();
160 double rmin1 = param.
rmin();
161 double rmin2 = param.
rmin2();
162 double rmax1 = param.
rmax();
163 double rmax2 = param.
rmax2();
168 if (z1New > z2New)
std::swap(z1New, z2New);
171 if (z1 == z2)
return;
173 if (z1 != z1New || z2 != z2New) {
174 if (rmin2 > 0 && rmax2 > 0 && (rmin1 != rmin2 || rmax1 != rmax2)) {
175 double slopeMin = (rmin2 - rmin1) / (z2 - z1);
176 double slopeMax = (rmax2 - rmax1) / (z2 - z1);
178 double rmin1New = (z1New - z1) * slopeMin + rmin1;
179 double rmin2New = (z2New - z1) * slopeMin + rmin1;
181 double rmax1New = (z1New - z1) * slopeMax + rmax1;
182 double rmax2New = (z2New - z1) * slopeMax + rmax1;
JetConstituentVector::iterator iterator
bool needsRotation() const
void setRmin2(double rmin2)
void reduceSize(double safety)
const std::vector< const ServiceVolume * > & splitAll(const Zone &zone, const std::vector< const ServiceVolume * > &)
const SegmentList & split(const Zone *, const Ray &)
bool splittableInZ() const
void setZmax(double zmax)
bool splittableInR() const
void setOrigVolume(double volume)
void adjustR(const ServiceVolume ¶m, ServiceVolume *paramNew)
void splitVolume(const Zone *zone, const ServiceVolume &vol)
const GeoShape * getShape() const
void setRegion(const std::string ®ion)
const std::string & label() const
unsigned int size() const
void setRmin(double rmin)
Ray makeRay(const ServiceVolume &origVolume)
std::string fullLabel() const
void setRmax2(double rmax2)
void setZmin(double zmin)
void setNeedsRotation(bool flag)
std::vector< const ServiceVolume * > m_volumes
void setRmax(double rmax)
void split(const Zone &zone, const ServiceVolume &origVolume)
void addLabel(const std::string &name)
void makeVolumes(const Zone *zone, const ServiceVolume &origVolume)
=============================================================================
const Segment & getSegment(unsigned int i) const