|
|
#include <DD4hep_volumeHandle.h>
|
void | buildBox (double halfX, double halfY, double halfZ) |
|
void | buildCons (double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double startPhi, double deltaPhi) |
|
void | buildPseudoTrap (double x1, double x2, double y1, double y2, double halfZ, double radius, bool atMinusZ) |
|
void | buildTrap (double x1, double x2, double x3, double x4, double y1, double y2, double theta, double phi, double halfZ, double alpha1, double alpha2) |
|
void | buildTruncTubs (double zhalf, double rIn, double rOut, double startPhi, double deltaPhi, double cutAtStart, double cutAtDelta, bool cutInside) |
|
void | buildTubs (double zhalf, double rIn, double rOut, double startPhi, double deltaPhi) |
|
void | referencePlane (const cms::DDFilteredView &fv) |
|
Definition at line 23 of file DD4hep_volumeHandle.h.
◆ volumeHandle() [1/2]
volumeHandle::volumeHandle |
( |
const cms::DDFilteredView & |
fv, |
|
|
bool |
expand2Pi = false , |
|
|
bool |
debugVal = false |
|
) |
| |
Definition at line 31 of file DD4hep_volumeHandle.cc.
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) {
References buildBox(), buildCons(), buildPseudoTrap(), buildTrap(), buildTruncTubs(), buildTubs(), magneticfield::BaseVolumeHandle::center(), magneticfield::BaseVolumeHandle::center_, magneticfield::BaseVolumeHandle::copyno, cms::DDFilteredView::copyNum(), ztail::d, ddbox, ddcons, ddpseudotrap, ddtrap, ddtrunctubs, ddtubs, magneticfield::BaseVolumeHandle::debug, SiPixelRawToDigiRegional_cfi::deltaPhi, reco::deltaPhi(), mps_fire::i, magneticfield::BaseVolumeHandle::isAssigned, magneticfield::BaseVolumeHandle::isIronFlag, LogTrace, magneticfield::BaseVolumeHandle::magFile, magneticfield::BaseVolumeHandle::masterSector, cms::DDFilteredView::materialName(), magneticfield::BaseVolumeHandle::name, cms::DDFilteredView::name(), magneticfield::newln, cms::DDFilteredView::parameters(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), referencePlane(), solid, cms::DDFilteredView::solid(), DDTruncTubs::startPhi(), DDTubs::startPhi(), AlCaHLTBitMon_QueryRunRegistry::string, magneticfield::BaseVolumeHandle::surfaces, magneticfield::BaseVolumeHandle::theRMax, magneticfield::BaseVolumeHandle::theRMin, magneticfield::BaseVolumeHandle::theRN, theShape, theta(), cms::DDFilteredView::trans(), magneticfield::BaseVolumeHandle::volumeno, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.
◆ volumeHandle() [2/2]
magneticfield::volumeHandle::volumeHandle |
( |
const volumeHandle & |
v | ) |
|
|
delete |
◆ buildBox()
void magneticfield::volumeHandle::buildBox |
( |
double |
halfX, |
|
|
double |
halfY, |
|
|
double |
halfZ |
|
) |
| |
|
private |
◆ buildCons()
void magneticfield::volumeHandle::buildCons |
( |
double |
zhalf, |
|
|
double |
rInMinusZ, |
|
|
double |
rOutMinusZ, |
|
|
double |
rInPlusZ, |
|
|
double |
rOutPlusZ, |
|
|
double |
startPhi, |
|
|
double |
deltaPhi |
|
) |
| |
|
private |
◆ buildPseudoTrap()
void magneticfield::volumeHandle::buildPseudoTrap |
( |
double |
x1, |
|
|
double |
x2, |
|
|
double |
y1, |
|
|
double |
y2, |
|
|
double |
halfZ, |
|
|
double |
radius, |
|
|
bool |
atMinusZ |
|
) |
| |
|
private |
◆ buildTrap()
void magneticfield::volumeHandle::buildTrap |
( |
double |
x1, |
|
|
double |
x2, |
|
|
double |
x3, |
|
|
double |
x4, |
|
|
double |
y1, |
|
|
double |
y2, |
|
|
double |
theta, |
|
|
double |
phi, |
|
|
double |
halfZ, |
|
|
double |
alpha1, |
|
|
double |
alpha2 |
|
) |
| |
|
private |
◆ buildTruncTubs()
void magneticfield::volumeHandle::buildTruncTubs |
( |
double |
zhalf, |
|
|
double |
rIn, |
|
|
double |
rOut, |
|
|
double |
startPhi, |
|
|
double |
deltaPhi, |
|
|
double |
cutAtStart, |
|
|
double |
cutAtDelta, |
|
|
bool |
cutInside |
|
) |
| |
|
private |
◆ buildTubs()
void magneticfield::volumeHandle::buildTubs |
( |
double |
zhalf, |
|
|
double |
rIn, |
|
|
double |
rOut, |
|
|
double |
startPhi, |
|
|
double |
deltaPhi |
|
) |
| |
|
private |
◆ operator=()
◆ referencePlane()
Definition at line 137 of file DD4hep_volumeHandle.cc.
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;
References magneticfield::BaseVolumeHandle::center_, ddpseudotrap, magneticfield::BaseVolumeHandle::debug, LogTrace, GloballyPositioned< T >::position(), magneticfield::BaseVolumeHandle::refPlane, cms::DDFilteredView::rot(), theShape, GloballyPositioned< T >::toGlobal(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by volumeHandle().
◆ shape()
◆ sides()
std::vector< VolumeSide > volumeHandle::sides |
( |
void |
| ) |
const |
|
overridevirtual |
The surfaces and they orientation, as required to build a MagVolume.
Implements magneticfield::BaseVolumeHandle.
Definition at line 213 of file DD4hep_volumeHandle.cc.
214 std::vector<VolumeSide>
result;
215 for (
int i = 0;
i < 6; ++
i) {
References magneticfield::BaseVolumeHandle::center_, ddtubs, magneticfield::BaseVolumeHandle::expand, get, mps_fire::i, SurfaceOrientation::inner, SurfaceOrientation::phiminus, SurfaceOrientation::phiplus, mps_fire::result, alignCSCRings::s, magneticfield::BaseVolumeHandle::surfaces, magneticfield::BaseVolumeHandle::theRMin, and theShape.
Referenced by magneticfield::MagGeoBuilder::buildInterpolator().
◆ solid
◆ theShape
std::string magFile
Name of magnetic field table file.
const Double_t * rot() const
The absolute rotation of the current node.
BaseVolumeHandle(bool expand2Pi=false, bool debugVal=false)
const std::vector< double > parameters() const
extract shape parameters
double startPhi(void) const
angular start of the tube-section
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)
const cms::DDSolidShape shape() const
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
LegacySolidShape legacyShape(const cms::DDSolidShape shape) const
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