7 #include "DD4hep/Shapes.h" 16 return (static_cast<int>(val + 0.5) != 0);
44 const TGeoBBox *box = fv.getShapePtr<TGeoBBox>();
57 const TGeoConeSeg *coneSeg = fv.getShapePtr<TGeoConeSeg>();
58 dz_ = coneSeg->GetDZ();
64 rmin1_ = coneSeg->GetRmin1();
65 rmin2_ = coneSeg->GetRmin2();
66 rmax1_ = coneSeg->GetRmax1();
67 rmax2_ = coneSeg->GetRmax2();
96 const TGeoTrap *trap = fv.getShapePtr<TGeoTrap>();
100 x1_ = trap->GetBl1();
101 x2_ = trap->GetTl1();
104 x3_ = trap->GetBl2();
105 x4_ = trap->GetTl2();
117 const TGeoTubeSeg *tube = fv.getShapePtr<TGeoTubeSeg>();
119 rIn_ = tube->GetRmin();
120 rOut_ = tube->GetRmax();
135 auto tube = fv.solid();
136 std::vector<double>
params = tube.dimensions();
137 if (params.size() < 16) {
138 edm::LogError(
"DDShapes DDTruncTubs") <<
"Truncated tube parameters list too small";
152 dd4hep::Rotation3D cutRotation(
153 params[6], params[7], params[8], params[9], params[10], params[11], params[12], params[13], params[14]);
154 double translation = params[15];
156 DD3Vector rotatedVec = cutRotation(xUnitVec);
157 double cosAlpha = xUnitVec.Dot(rotatedVec);
158 double sinAlpha =
sqrt(1. - cosAlpha * cosAlpha);
167 double alpha = std::acos(cosAlpha);
DDSolidShape getCurrentShape(const cms::DDFilteredView &fview)
constexpr long double convertDegToRad(NumType degrees)
Sin< T >::type sin(const T &t)
bool isAPseudoTrap() const
Abs< T >::type abs(const T &t)
Namespace of DDCMS conversion namespace.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >> DD3Vector
bool isATruncTube() const
alpha
zGenParticlesMatch = cms.InputTag(""),
bool isATrapezoid() const