|
|
Go to the documentation of this file.
32 :
BaseVolumeHandle(expand2Pi, debugVal), theShape(fv.legacyShape(fv.shape())), solid(fv) {
35 const auto *
const transArray = fv.
trans();
39 string volName =
name;
40 volName.erase(0, volName.rfind(
'_') + 1);
41 volumeno = static_cast<unsigned short>(std::atoi(volName.c_str()));
43 for (
int i = 0;
i < 6; ++
i) {
51 double halfX = box.x();
52 double halfY = box.y();
53 double halfZ = box.z();
58 double x1 = trap.bottomLow1();
59 double x2 = trap.topLow1();
60 double x3 = trap.bottomLow2();
61 double x4 = trap.topLow2();
62 double y1 = trap.high1();
63 double y2 = trap.high2();
64 double theta = trap.theta();
65 double phi = trap.phi();
66 double halfZ = trap.dZ();
67 double alpha1 = trap.alpha1();
68 double alpha2 = trap.alpha2();
69 buildTrap(
x1,
x2, x3, x4,
y1,
y2,
theta, phi, halfZ, alpha1, alpha2);
74 double zhalf = cons.dZ();
75 double rInMinusZ = cons.rMin1();
76 double rOutMinusZ = cons.rMax1();
77 double rInPlusZ = cons.rMin2();
78 double rOutPlusZ = cons.rMax2();
79 double startPhi = cons.startPhi();
85 double zhalf = tubs.dZ();
86 double rIn = tubs.rMin();
87 double rOut = tubs.rMax();
89 double deltaPhi = tubs.endPhi() - startPhi;
98 double zhalf = tubs.dZ();
99 double rIn = tubs.rMin();
100 double rOut = tubs.rMax();
103 double cutAtStart = tubs.cutAtStart();
104 double cutAtDelta = tubs.cutAtDelta();
105 bool cutInside = tubs.cutInside();
109 LogError(
"magneticfield::volumeHandle")
110 <<
"ctor: Unexpected shape # " << static_cast<int>(
theShape) <<
" for vol " <<
name;
121 LogTrace(
"MagGeoBuilder") <<
"*** WARNING: wrong RMin/RN/RMax";
128 LogTrace(
"MagGeoBuilder") <<
" Orientation of surfaces:";
129 std::string sideName[3] = {
"positiveSide",
"negativeSide",
"onSurface"};
130 for (
int i = 0;
i < 6; ++
i) {
171 dd4hep::Rotation3D refRot;
173 refRot.GetComponents(x, y, z);
175 if (x.Cross(y).Dot(z) < 0.5) {
176 LogTrace(
"MagGeoBuilder") <<
"*** WARNING: Rotation is not RH ";
205 globalZdir = -globalZdir;
209 LogTrace(
"MagGeoBuilder") <<
"*** WARNING RefPlane check failed!***" << chk;
214 std::vector<VolumeSide>
result;
215 for (
int i = 0;
i < 6; ++
i) {
231 #include "buildBox.icc"
232 #include "buildTrap.icc"
233 #include "buildTubs.icc"
234 #include "buildCons.icc"
235 #include "buildPseudoTrap.icc"
236 #include "buildTruncTubs.icc"
std::string magFile
Name of magnetic field table file.
const Double_t * rot() const
The absolute rotation of the current node.
const std::vector< double > parameters() const
extract shape parameters
double startPhi(void) const
angular start of the tube-section
MagGeoBuilderFromDDD::volumeHandle volumeHandle
constexpr double deltaPhi(double phi1, double phi2)
const DDSolidShape theShape
unsigned short copyNum() const
const GlobalPoint & center() const
Return the center of the volume.
void buildTrap(double x1, double x2, double x3, double x4, double y1, double y2, double theta, double phi, double halfZ, double alpha1, double alpha2)
Global3DVector GlobalVector
unsigned short volumeno
volume number
void buildCons(double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double startPhi, double deltaPhi)
std::string_view name() const
dd4hep::Solid solid() const
const Double_t * trans() const
The absolute translation of the current node.
A truncated tube section.
Surface::GlobalPoint GlobalPoint
void buildTubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
Geom::Theta< T > theta() const
int masterSector
The sector for which an interpolator for this class of volumes should be built.
Interface to a Trapezoid.
void buildBox(double halfX, double halfY, double halfZ)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Surface::LocalVector LocalVector
void referencePlane(const cms::DDFilteredView &fv)
double startPhi(void) const
void buildTruncTubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi, double cutAtStart, double cutAtDelta, bool cutInside)
Log< level::Error, false > LogError
unsigned short copyno
copy number
const PositionType & position() const
std::string name
Name of the volume.
std::string_view materialName() const
const cms::DDFilteredView & solid
GloballyPositioned< float > * refPlane
void buildPseudoTrap(double x1, double x2, double y1, double y2, double halfZ, double radius, bool atMinusZ)
Geom::Phi< T > phi() const
GlobalPoint toGlobal(const LocalPoint &lp) const
std::vector< VolumeSide > sides() const override
The surfaces and they orientation, as required to build a MagVolume.