9 #include "CLHEP/Units/GlobalSystemOfUnits.h" 29 cellT_ = nArgs[
"CellThick"];
45 edm::LogWarning(
"HGCalGeom") <<
"The number of cells & sensitive differ:" 46 <<
" Truncated " <<
truncCN_.size() <<
":" 49 <<
" Corners " <<
cornrCN_.size() <<
":" 53 edm::LogWarning(
"HGCalGeom") <<
"DDHGCalCell: The number of cells does not" 54 <<
" match with Standard: Truncated " 56 <<
extenCN_.size() <<
":3" <<
" Corners " 61 <<
" Cells/Wafer " <<
nCells_ <<
" Material " 64 <<
" Full Cell: " <<
fullCN_ <<
":" 91 <<
" initialized at " << &matter;
95 static const double sqrt3 =
std::sqrt(3.0);
97 double r = 0.5*R*sqrt3;
100 double dx3 = 2.5*dx2;
101 double dx4 = 0.5*dx2;
103 double dy2 = 0.5*dy1;
104 double dy3 = 1.5*dy1;
105 std::vector<double>
xx = {dx1,dx2,-dx2,-dx1,-dx2,dx2,
106 dx3,-dx4,-dx1,-dx1,-dx4,dx3};
107 std::vector<double>
yy = {0,dy1,dy1,0,-dy1,-dy1,
108 dy2,dy3,dy1,-dy1,-dy3,-dy2};
113 std::vector<double> xw = {xx[0],xx[1],xx[2],xx[3],xx[4],xx[5]};
114 std::vector<double> yw = {yy[0],yy[1],yy[2],yy[3],yy[4],yy[5]};
116 std::vector<double> zx(2,0), zy(2,0),
scale(2,1.0);
118 xw, yw, zw, zx, zy, scale);
122 <<
" extruded polygon made of " << matName
123 <<
" z|x|y|s (0) " << zw[0] <<
":" << zx[0]
124 <<
":" << zy[0] <<
":" << scale[0]
125 <<
" z|x|y|s (1) " << zw[1] <<
":" << zx[1]
126 <<
":" << zy[1] <<
":" << scale[1] <<
" and " 127 << xw.size() <<
" edges";
128 for (
unsigned int k=0;
k<xw.size(); ++
k)
133 xw, yw, zc, zx, zy, scale);
137 <<
" extruded polygon made of " << matName
138 <<
" z|x|y|s (0) " << zc[0] <<
":" << zx[0]
139 <<
":" << zy[0] <<
":" << scale[0]
140 <<
" z|x|y|s (1) " << zc[1] <<
":" << zx[1]
141 <<
":" << zy[1] <<
":" << scale[1] <<
" and " 142 << xw.size() <<
" edges";
143 for (
unsigned int k=0;
k<xw.size(); ++
k)
147 cpv.
position(glog2, glog1, 1, tran, rot);
150 <<
" number 1 position in " << glog1.
name()
151 <<
" at " << tran <<
" with " <<
rot;
154 static const int ir0[] = {0,1,0};
155 static const int ir1[] = {1,2,1};
156 static const int ir2[] = {2,3,3};
157 static const int ir3[] = {3,4,4};
158 static const int ir4[] = {5,5,5};
160 std::vector<double> xw = {xx[ir0[
i]],xx[ir1[
i]],xx[ir2[
i]],xx[ir3[
i]],xx[ir4[
i]]};
161 std::vector<double> yw = {yy[ir0[
i]],yy[ir1[
i]],yy[ir2[
i]],yy[ir3[
i]],yy[ir4[
i]]};
163 xw, yw, zw, zx, zy, scale);
167 <<
" extruded polygon made of " << matName
168 <<
" z|x|y|s (0) " << zw[0] <<
":" << zx[0]
169 <<
":" << zy[0] <<
":" << scale[0]
170 <<
" z|x|y|s (1) " << zw[1] <<
":" << zx[1]
171 <<
":" << zy[1] <<
":" << scale[1] <<
" and " 172 << xw.size() <<
" edges";
173 for (
unsigned int k=0;
k<xw.size(); ++
k)
178 xw, yw, zc, zx, zy, scale);
182 <<
" extruded polygon made of " << matName
183 <<
" z|x|y|s (0) " << zw[0] <<
":" << zx[0]
184 <<
":" << zy[0] <<
":" << scale[0]
185 <<
" z|x|y|s (1) " << zw[1] <<
":" << zx[1]
186 <<
":" << zy[1] <<
":" << scale[1] <<
" and " 187 << xw.size() <<
" edges";
188 for (
unsigned int k=0;
k<xw.size(); ++
k)
192 cpv.
position(glog2, glog1, 1, tran, rot);
195 <<
" number 1 position in " << glog1.
name()
196 <<
" at " << tran <<
" with " <<
rot;
200 static const int ie0[] = {1,5,0};
201 static const int ie1[] = {2,6,1};
202 static const int ie2[] = {3,7,8};
203 static const int ie3[] = {10,3,9};
204 static const int ie4[] = {11,4,5};
206 std::vector<double> xw = {xx[ie0[
i]],xx[ie1[
i]],xx[ie2[
i]],xx[ie3[
i]],xx[ie4[
i]]};
207 std::vector<double> yw = {yy[ie0[
i]],yy[ie1[
i]],yy[ie2[
i]],yy[ie3[
i]],yy[ie4[
i]]};
209 xw, yw, zw, zx, zy, scale);
213 <<
" extruded polygon made of " << matName
214 <<
" z|x|y|s (0) " << zw[0] <<
":" << zx[0]
215 <<
":" << zy[0] <<
":" << scale[0]
216 <<
" z|x|y|s (1) " << zw[1] <<
":" << zx[1]
217 <<
":" << zy[1] <<
":" << scale[1] <<
" and " 218 << xw.size() <<
" edges";
219 for (
unsigned int k=0;
k<xw.size(); ++
k)
224 xw, yw, zc, zx, zy, scale);
228 <<
" extruded polygon made of " << matName
229 <<
" z|x|y|s (0) " << zw[0] <<
":" << zx[0]
230 <<
":" << zy[0] <<
":" << scale[0]
231 <<
" z|x|y|s (1) " << zw[1] <<
":" << zx[1]
232 <<
":" << zy[1] <<
":" << scale[1] <<
" and " 233 << xw.size() <<
" edges";
234 for (
unsigned int k=0;
k<xw.size(); ++
k)
238 cpv.
position(glog2, glog1, 1, tran, rot);
241 <<
" number 1 position in " << glog1.
name()
242 <<
" at " << tran <<
" with " <<
rot;
246 static const int ic0[] = {0,1,1,1,1,0};
247 static const int ic1[] = {1,2,2,7,3,1};
248 static const int ic2[] = {8,3,3,3,4,3};
249 static const int ic3[] = {3,5,10,4,5,9};
250 static const int ic4[] = {5,11,5,5,6,5};
252 std::vector<double> xw = {xx[ic0[
i]],xx[ic1[
i]],xx[ic2[
i]],xx[ic3[
i]],xx[ic4[
i]]};
253 std::vector<double> yw = {yy[ic0[
i]],yy[ic1[
i]],yy[ic2[
i]],yy[ic3[
i]],yy[ic4[
i]]};
255 xw, yw, zw, zx, zy, scale);
259 <<
" extruded polygon made of " << matName
260 <<
" z|x|y|s (0) " << zw[0] <<
":" << zx[0]
261 <<
":" << zy[0] <<
":" << scale[0]
262 <<
" z|x|y|s (1) " << zw[1] <<
":" << zx[1]
263 <<
":" << zy[1] <<
":" << scale[1] <<
" and " 264 << xw.size() <<
" edges";
265 for (
unsigned int k=0;
k<xw.size(); ++
k)
270 xw, yw, zc, zx, zy, scale);
274 <<
" extruded polygon made of " << matName
275 <<
" z|x|y|s (0) " << zw[0] <<
":" << zx[0]
276 <<
":" << zy[0] <<
":" << scale[0]
277 <<
" z|x|y|s (1) " << zw[1] <<
":" << zx[1]
278 <<
":" << zy[1] <<
":" << scale[1] <<
" and " 279 << xw.size() <<
" edges";
280 for (
unsigned int k=0;
k<xw.size(); ++
k)
284 cpv.
position(glog2, glog1, 1, tran, rot);
287 <<
" number 1 position in " << glog1.
name()
288 <<
" at " << tran <<
" with " <<
rot;
DDMaterial is used to define and access material information.
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
DDName is used to identify DDD entities uniquely.
static std::string & ns()
std::vector< std::string > truncCN_
type of data representation of DDCompactView
std::vector< std::string > extenSensN_
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
void execute(DDCompactView &cpv) override
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
static DDSolid extrudedpolygon(const DDName &name, const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, const std::vector< double > &zx, const std::vector< double > &zy, const std::vector< double > &zscale)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::vector< std::string > cornrCN_
std::vector< std::string > truncSensN_
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
std::vector< std::string > extenCN_
std::vector< std::string > cornrSensN_