118 double zstep2 =
zoff[3];
120 double rstep0 =
rin + (zstep2 - zstep1) /
tan(
theta[2]);
121 double rstep1 =
rin + (zstep1 - zstep0) /
tan(
theta[2]);
123 std::vector<double> pgonZ = {zstep0, zstep1, zstep2, zstep2 +
thick /
cos(
theta[2])};
125 std::vector<double> pgonRmin = {
rin,
rin, rstep0,
rmax[2]};
126 std::vector<double> pgonRmax = {
rin, rstep1,
rmax[2],
rmax[2]};
136 for (
unsigned int i = 0;
i < pgonZ.size();
i++)
137 edm::LogVerbatim(
"HCalGeom") <<
"\t\tZ = " << pgonZ[
i] <<
"\tRmin = " << pgonRmin[
i] <<
"\tRmax = " << pgonRmax[
i];
149 << parentName <<
" at " <<
r0 <<
" with " <<
rot;
156 << parentName <<
" at " <<
r0 <<
" with " <<
rot;
165 <<
" and with " << pgonZ.size() <<
" sections";
166 for (
unsigned int i = 0;
i < pgonZ.size();
i++)
167 edm::LogVerbatim(
"HCalGeom") <<
"\t\tZ = " << pgonZ[
i] <<
"\tRmin = " << pgonRmin[
i] <<
"\tRmax = " << pgonRmax[
i];
191 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBCableAlgo: " << seclogic.name() <<
" number " <<
ii + 1
192 <<
" positioned in " << genlogic.name() <<
" at (0,0,0) with " <<
rotation;
200 double dx2 = 0.90 * routl *
tan(
alpha);
202 double dz = 0.50 * (routl - rinl);
204 solid =
DDSolidFactory::trap(
DDName(
name,
idNameSpace),
dz, 0, 0,
dy, dx1, dx1, 0,
dy, dx2, dx2, 0);
207 <<
" of dimensions " <<
dz <<
", 0, 0, " <<
dy <<
", " << dx1 <<
", " << dx1 <<
", 0, " 208 <<
dy <<
", " << dx2 <<
", " << dx2 <<
", 0";
214 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBCableAlgo: Creating a rotation: " << rotstr <<
"\t90, 270, " 219 DDTranslation r1(0.5 * (rinl + routl), 0, 0.5 * (pgonZ[1] + pgonZ[2]));
222 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBCableAlgo: " << glog.name() <<
" number 1 positioned in " << seclogic.name()
223 <<
" at " <<
r1 <<
" with " <<
rot;
227 double phi = atan((dx2 - dx1) / (2 *
dz));
228 double xmid = 0.5 * (dx1 + dx2) - 1.0;
240 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBCableAlgo: Creating a rotation " << rotstr <<
"\t" 247 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBCableAlgo: " << cablog1.name() <<
" number 1 positioned in " << glog.name()
248 <<
" at " <<
r2 <<
" with " << rot2;
250 rotstr =
idName +
"Right";
252 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBCableAlgo: Creating a rotation " << rotstr <<
"\t" 257 cpv.
position(cablog1, glog, 2, r3, rot3);
259 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBCableAlgo: " << cablog1.name() <<
" number 2 positioned in " << glog.name()
260 <<
" at " << r3 <<
" with " << rot3;
274 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBCableAlgo: " << cablog2.name() <<
" number 1 positioned in " << glog.name()
275 <<
" at (" << xpos <<
", 0, 0) with no " 280 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBCableAlgo: " << cablog2.name() <<
" number 2 positioned in " << glog.name()
281 <<
" at (" << -xpos <<
", 0, 0) with no " 284 edm::LogVerbatim(
"HCalGeom") <<
"<<== End of DDHCalTBCableAlgo construction";
std::vector< double > theta
Log< level::Info, true > LogVerbatim
std::vector< double > rmax
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
DDMaterial is used to define and access material information.
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
std::string formatAsDegreesInInteger(double radianVal)
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
std::vector< double > zoff
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)