!!!!!!!!!!!!!!!!Should be zero. And removed as soon as
160 theta =
args.value<std::vector<double> >(
"Theta");
161 rmax =
args.value<std::vector<double> >(
"RMax");
162 zoff =
args.value<std::vector<double> >(
"ZOff");
187 layerMat =
args.value<std::vector<std::string> >(
"LayerMat");
208 absorbMat =
args.value<std::vector<std::string> >(
"AbsorbMat");
209 absorbD =
args.value<std::vector<double> >(
"AbsorbD");
210 absorbT =
args.value<std::vector<double> >(
"AbsorbT");
224 midName =
args.value<std::vector<std::string> >(
"MidAbsName");
225 midMat =
args.value<std::vector<std::string> >(
"MidAbsMat");
226 midW =
args.value<std::vector<double> >(
"MidAbsW");
227 midT =
args.value<std::vector<double> >(
"MidAbsT");
236 sideMat =
args.value<std::vector<std::string> >(
"SideMat");
237 sideD =
args.value<std::vector<double> >(
"SideD");
238 sideT =
args.value<std::vector<double> >(
"SideT");
240 for (
unsigned int i = 0;
i <
sideMat.size();
i++)
246 sideAbsW =
args.value<std::vector<double> >(
"SideAbsW");
265 detType =
args.value<std::vector<int> >(
"DetType");
266 detdP1 =
args.value<std::vector<double> >(
"DetdP1");
267 detdP2 =
args.value<std::vector<double> >(
"DetdP2");
268 detT11 =
args.value<std::vector<double> >(
"DetT11");
269 detT12 =
args.value<std::vector<double> >(
"DetT12");
270 detTsc =
args.value<std::vector<double> >(
"DetTsc");
271 detT21 =
args.value<std::vector<double> >(
"DetT21");
272 detT22 =
args.value<std::vector<double> >(
"DetT22");
275 detPosY =
args.value<std::vector<int> >(
"DetPosY");
294 <<
"DDHCalBarrelAlgo: General volume...";
304 int nf =
ntot - nsec;
309 double zstep5 =
zoff[4];
317 double rout1 =
rmax[3];
319 double rmid1 =
rmax[0];
320 double rmid2 =
rmax[1];
322 double rmid4 =
rmax[2];
324 std::vector<double> pgonZ = {-
zmax,
340 std::vector<double> pgonRmin = {
341 rmid4, rmid3, rmid3, rmid2, rmid1, rmid1, rin, rin, rin, rmid1, rmid1, rmid2, rmid3, rmid3, rmid4};
343 std::vector<double> pgonRmax = {
344 rout1, rout1, rout, rout, rout, rout, rout, rout, rout, rout, rout, rout, rout, rout1, rout1};
346 std::vector<double> pgonZHalf = {0, zstep1, zstep2, zstep3, zstep4, zstep5, zstep5,
zmax};
348 std::vector<double> pgonRminHalf = {rin, rin, rmid1, rmid1, rmid2, rmid3, rmid3, rmid4};
350 std::vector<double> pgonRmaxHalf = {rout, rout, rout, rout, rout, rout, rout1, rout1};
360 for (
unsigned int i = 0;
i < pgonZ.size();
i++)
372 for (
unsigned int i = 0;
i < pgonZHalf.size();
i++)
382 parentName.placeVolume(genlogic, 1);
384 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << genlogic.name() <<
" number 1 positioned in " 385 << parentName.name() <<
" at (0, 0, 0) with no rotation";
395 for (
unsigned int i = 0;
i < pgonZHalf.size();
i++)
401 genlogic.placeVolume(genlogich, 1);
403 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << genlogich.name() <<
" number 1 positioned in " 404 << genlogic.name() <<
" at (0, 0, 0) with no rotation";
408 genlogic.placeVolume(genlogich, 2,
rot);
410 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << genlogich.name() <<
" number 2 positioned in " 411 << genlogic.name() <<
" at (0, 0, 0) with " <<
rot;
420 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << solid.name() <<
" Polyhedra made of " << matter.name()
423 for (
unsigned int i = 0;
i < pgonZHalf.size();
i++)
439 genlogich.placeVolume(seclogic,
ii + 1,
rotation);
441 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << seclogic.name() <<
" number " <<
ii + 1
442 <<
" positioned in " << genlogich.name() <<
" at (0, 0, 0) with " <<
rotation;
455 double rout = rin +
width;
471 std::vector<double> pgonZ, pgonRmin, pgonRmax;
473 pgonZ.emplace_back(0);
474 pgonRmin.emplace_back(rin);
475 pgonRmax.emplace_back(rout);
477 pgonZ.emplace_back(zout);
478 pgonRmin.emplace_back(rin);
479 pgonRmax.emplace_back(rout);
484 pgonRmin.emplace_back(pgonRmax[1]);
485 pgonRmax.emplace_back(pgonRmax[1]);
494 pgonZ.emplace_back(pgonZ[1]);
495 pgonRmin.emplace_back(pgonRmin[1]);
496 pgonRmax.emplace_back(
rmax[
in]);
499 pgonRmin.emplace_back(pgonRmin[2]);
500 pgonRmax.emplace_back(pgonRmax[2]);
507 pgonRmin.emplace_back(
rmax[
in]);
508 pgonRmax.emplace_back(pgonRmax[1]);
514 pgonRmin.emplace_back(pgonRmin[2]);
515 pgonRmax.emplace_back(pgonRmax[2]);
522 pgonRmin.emplace_back(rout);
523 pgonRmax.emplace_back(rout);
532 double alpha1 =
alpha;
534 double rmid = 0.5 * (rin + rout);
536 alpha1 = atan(
width / rmid);
546 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << solid.name() <<
" (Layer " <<
i <<
") Polyhedra made of " 547 << matter.name() <<
" with 1 sector from " <<
convertRadToDeg(-alpha1) <<
" to " 549 for (
unsigned int k = 0;
k < pgonZ.size();
k++)
554 seclogic.placeVolume(glog,
layerId[
i]);
557 <<
" positioned in " << seclogic.name() <<
" at (0,0,0) with no rotation";
std::vector< double > rmax
Log< level::Info, true > LogVerbatim
std::vector< double > sideAbsW
dd4hep::Rotation3D getRotation(std::string &rotation, std::string &rotns, cms::DDNamespace &ns)
std::vector< int > detPosY
std::vector< double > detWidth1
std::vector< double > detdP2
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
std::vector< double > absorbD
std::vector< std::string > sideAbsMat
std::vector< double > detT11
void constructInsideLayers(dd4hep::Volume &laylog, const std::string &nm, int id, int nAbs, double rin, double d1, double alpha1, double d2, double alpha2, double t1, double t2, cms::DDNamespace &ns)
std::vector< double > layerT1
std::vector< std::string > absorbMat
std::vector< std::string > midMat
std::vector< double > detT12
std::vector< std::string > midName
std::vector< double > layerAlpha
std::vector< std::string > sideAbsName
std::vector< double > sideD
std::vector< double > absorbT
Tan< T >::type tan(const T &t)
std::vector< double > detWidth2
std::vector< double > zoff
std::vector< int > detType
std::vector< double > detT22
std::vector< double > theta
std::vector< double > detT21
std::vector< int > layerAbsorb
std::vector< double > layerD1
std::vector< std::string > absorbName
std::vector< double > layerT2
std::vector< double > sideT
std::vector< double > detdP1
std::vector< std::string > layerMat
std::vector< double > layerGap
std::vector< double > midT
std::vector< double > layerWidth
std::vector< double > midW
std::vector< std::string > layerLabel
std::vector< double > detTsc
std::vector< double > layerD2
std::vector< std::string > sideMat
std::vector< double > ttheta
std::vector< int > layerId