|
|
Go to the documentation of this file.
74 genMat = sArgs[
"MaterialName"];
79 theta = vArgs[
"Theta"];
83 absMat = sArgs[
"AbsMatName"];
84 thick = nArgs[
"Thickness"];
94 for (
unsigned int i = 0;
i <
theta.size();
i++)
99 idName = sArgs[
"MotherName"];
101 rotns = sArgs[
"RotNameSpace"];
104 <<
" NameSpace " <<
idNameSpace <<
" for solids etc. and " <<
rotns <<
" for rotations";
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 > rmax
DDName is used to identify DDD entities uniquely.
alpha
zGenParticlesMatch = cms.InputTag(""),
constexpr NumType convertRadToDeg(NumType radians)
std::string formatAsDegreesInInteger(double radianVal)
U second(std::pair< T, U > const &p)
Sin< T >::type sin(const T &t)
DDMaterial is used to define and access material information.
Cos< T >::type cos(const T &t)
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)
Compact representation of the geometrical detector hierarchy.
Geom::Theta< T > theta() const
#define DEFINE_EDM_PLUGIN(factory, type, name)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
void execute(DDCompactView &cpv) override
Tan< T >::type tan(const T &t)
Log< level::Info, true > LogVerbatim
static std::string & ns()
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
std::vector< double > theta
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
static AlgebraicMatrix initialize()
std::vector< double > zoff
~DDHCalTBCableAlgo() override
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
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)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
ROOT::Math::Rotation3D DDRotation