17 #include "CLHEP/Units/GlobalPhysicalConstants.h"
18 #include "CLHEP/Units/GlobalSystemOfUnits.h"
21 edm::LogInfo(
"HGCalGeom") <<
"DDHGCalEEAlgo info: Creating an instance";
33 names = vsArgs[
"VolumeNames"];
34 thick = vArgs[
"Thickness"];
35 rotstr = sArgs[
"Rotation"];
44 <<
" volumes to be put with rotation " <<
rotstr
46 for (
unsigned int i=0;
i<
names.size(); ++
i)
48 <<
" of thickness " <<
thick[
i]
54 edm::LogInfo(
"HGCalGeom") <<
"Layer [" <<
i <<
"] with material type "
59 sectors = (int)(nArgs[
"Sectors"]);
60 slopeB = nArgs[
"SlopeBottom"];
61 slopeT = vArgs[
"SlopeTop"];
64 idName = parent().name().name();
67 <<
" " <<
slopeT.size() <<
" slopes for top";
68 for (
unsigned int i=0;
i<
slopeT.size(); ++
i)
84 edm::LogInfo(
"HGCalGeom") <<
"==>> Constructing DDHGCalEEAlgo...";
86 edm::LogInfo(
"HGCalGeom") <<
"<<== End of DDHGCalEEAlgo construction ...";
91 edm::LogInfo(
"HGCalGeom") <<
"DDHGCalEEAlgo test: \t\tInside Layers";
105 double zlayer = zz + layer_thick;
107 double rinF = zi *
slopeB;
108 double rinB = zlayer *
slopeB;
110 double routB =
rMax(zo);
113 edm::LogInfo(
"HGCalGeom") <<
"DDHGCalEEAlgo test: Layer " <<
i <<
":"
114 << ii <<
" Front " << zi <<
", " << rinF <<
", "
115 << routF <<
" Back " << zo <<
", " << rinB
116 <<
", " << routB <<
" superlayer thickness "
121 0.5*thick[ii], parm.
theta,
131 << solid.
name() <<
" Trap made of " << matName
132 <<
" of dimensions " << 0.5*thick[
ii] <<
", "
133 << parm.
theta/CLHEP::deg <<
", "
134 << parm.
phi/CLHEP::deg <<
", " << parm.
yh1
135 <<
", " << parm.
bl1 <<
", " << parm.
tl1
136 <<
", " << parm.
alp/CLHEP::deg <<
", "
137 << parm.
yh2 <<
", " << parm.
bl2 <<
", "
138 << parm.
tl2 <<
", " << parm.
alp/CLHEP::deg;
140 cpv.
position(glog, module, copy, r1, rot);
142 <<
" number " << copy <<
" positioned in "
143 << module.
name() <<
" at " << r1 <<
" with "
152 double routB,
double zi,
double zo) {
158 edm::LogInfo(
"HGCalGeom") <<
"Input: Front " << rinF <<
" " << routF <<
" "
159 << zi <<
" Back " << rinB <<
" " << routB <<
" "
160 << zo <<
" Alpha " << alpha/CLHEP::deg;
162 parm.
yh2 = parm.
yh1 = 0.5 * (routF*
cos(alpha) - rinB);
164 parm.
tl2 = parm.
tl1 = routF *
sin(alpha);
165 parm.
xpos = 0.5*(routF*
cos(alpha)+rinB);
167 parm.
zpos = 0.5*(zi+zo);
170 << parm.
bl1 <<
" " << parm.
tl1 <<
" " << parm.
yh2
171 <<
" " << parm.
bl2 <<
" " << parm.
tl2 <<
" "
172 << parm.
alp/CLHEP::deg <<
" "<<parm.
theta/CLHEP::deg
173 <<
" " << parm.
phi/CLHEP::deg <<
" Position "
182 for (
unsigned int k=0;
k<
slopeT.size(); ++
k) {
187 edm::LogInfo(
"HGCalGeom") <<
"rMax : " << z <<
":" << ik <<
":" <<
r ;
std::vector< double > thick
void execute(DDCompactView &cpv)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
DDMaterial is used to define and access material information.
std::vector< std::string > names
Sin< T >::type sin(const T &t)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
DDName is used to identify DDD entities uniquely.
std::vector< std::string > materials
static std::string & ns()
std::string dbl_to_string(const double &in)
Converts only the integer part of a double to a string.
void constructLayers(DDLogicalPart, DDCompactView &cpv)
type of data representation of DDCompactView
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)
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< double > thickBlock
std::vector< int > layerType
std::vector< int > heightType
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::vector< double > rMaxFront
std::vector< double > slopeT
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
HGCalEEPar parameterLayer(double rinF, double routF, double rinB, double routB, double zi, double zo)
std::vector< double > zFront
std::vector< int > copyNumber