36 genMat = sArgs[
"MaterialName"];
41 theta = vArgs[
"Theta"];
45 absMat = sArgs[
"AbsMatName"];
46 thick = nArgs[
"Thickness"];
58 for (
unsigned int i = 0;
i <
theta.size();
i++)
62 <<
"\tThick " <<
thick <<
"\tLength and width " 66 idName = sArgs[
"MotherName"];
68 rotns = sArgs[
"RotNameSpace"];
73 <<
" for solids etc. and " <<
rotns 89 double zstep2 =
zoff[3];
91 double rstep0 =
rin + (zstep2-zstep1)/
tan(
theta[2]);
92 double rstep1 =
rin + (zstep1-zstep0)/
tan(
theta[2]);
94 std::vector<double> pgonZ = {zstep0, zstep1, zstep2,
97 std::vector<double> pgonRmin = {
rin,
rin, rstep0,
rmax[2]};
98 std::vector<double> pgonRmax = {
rin, rstep1, rmax[2], rmax[2]};
108 <<
" Polyhedra made of " <<
genMat <<
" with " 112 << pgonZ.size() <<
" sections";
113 for (
unsigned int i = 0;
i <pgonZ.size();
i++)
115 << pgonRmin[
i] <<
"\tRmax = " << pgonRmax[
i];
128 <<
" number 1 positioned in " << parentName
129 <<
" at " << r0 <<
" with "<<
rot;
137 <<
" number 2 positioned in " << parentName
138 <<
" at " << r0 <<
" with " <<
rot;
147 <<
" Polyhedra made of " <<
genMat 148 <<
" with 1 sector from " 151 << pgonZ.size() <<
" sections";
152 for (
unsigned int i = 0;
i < pgonZ.size();
i++)
154 << pgonRmin[
i] <<
"\tRmax = " << pgonRmax[
i];
157 1, -alpha, 2*alpha, pgonZ,
171 <<
"rotation " << rotstr <<
"\t90," 176 (90._deg+phi), 0, 0);
184 <<
" number " <<
ii+1 <<
" positioned in " 185 << genlogic.name() <<
" at (0,0,0) with " 193 double dx1 = rinl *
tan(alpha);
194 double dx2 = 0.90 * routl *
tan(alpha);
196 double dz = 0.50 * (routl -rinl);
199 dx1, 0, dy, dx2, dx2, 0);
202 <<
" Trap made of " <<
genMat 203 <<
" of dimensions " << dz <<
", 0, 0, " 204 << dy <<
", " << dx1 <<
", " << dx1
205 <<
", 0, " << dy <<
", " << dx2 <<
", " << dx2
213 << rotstr <<
"\t90, 270, " 219 (180._deg-
theta[2]), 0, (90._deg-
theta[2]), 0);
221 cpv.
position(glog, seclogic, 1, r1, rot);
224 <<
" number 1 positioned in " << seclogic.name()
225 <<
" at " << r1 <<
" with " <<
rot;
229 double phi = atan((dx2-dx1)/(2*dz));
230 double xmid = 0.5*(dx1+dx2)-1.0;
235 <<
" Box made of " <<
absMat <<
" of dimension " 251 90._deg, 90._deg, phi, 0.0);
253 cpv.
position(cablog1, glog, 1, r2, rot2);
256 <<
" number 1 positioned in " << glog.name()
257 <<
" at " << r2 <<
" with " << rot2;
259 rotstr =
idName +
"Right";
267 90._deg, 90._deg, -phi, 0);
269 cpv.
position(cablog1, glog, 2, r3, rot3);
272 <<
" number 2 positioned in " << glog.name()
273 <<
" at " << r3 <<
" with " << rot3;
281 <<
" Box made of " <<
absMat <<
" of dimension " 291 <<
" number 1 positioned in " << glog.name()
292 <<
" at (" << xpos <<
", 0, 0) with no " 298 <<
" number 2 positioned in " << glog.name()
299 <<
" at (" <<-xpos <<
", 0, 0) with no " 302 edm::LogVerbatim(
"HCalGeom") <<
"<<== End of DDHCalTBCableAlgo construction";
std::vector< double > theta
std::vector< double > rmax
DDMaterial is used to define and access material information.
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
DDName is used to identify DDD entities uniquely.
constexpr NumType convertRadToDeg(NumType radians)
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
std::string formatAsDegreesInInteger(double radianVal)
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
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 ...
void execute(DDCompactView &cpv) override
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.
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
~DDHCalTBCableAlgo() override
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::vector< double > zoff
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
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)