15 double deltaZ =
args.value<
double>(
"DeltaZ");
16 int numberPhi =
args.value<
int>(
"NumberPhi");
18 std::vector<double> areaSection =
args.value<std::vector<double> >(
"AreaSection");
19 std::vector<double> rStart =
args.value<std::vector<double> >(
"RadiusStart");
20 std::vector<double> rEnd =
args.value<std::vector<double> >(
"RadiusEnd");
21 std::vector<int> bundle =
args.value<std::vector<int> >(
"Bundles");
22 double tilt =
args.value<
double>(
"TiltAngle");
25 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Parent " <<
args.parentName() <<
" with " << bundle.size()
26 <<
" children with prefix " << childPrefix <<
", material " << material <<
" with "
27 << numberPhi <<
" bundles along phi; width of"
29 <<
" along phi and with " << rStart.size() <<
" different bundle types";
30 for (
unsigned int i = 0;
i < areaSection.size(); ++
i)
34 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: NameSpace " << ns.name() <<
" Tilt Angle "
36 for (
unsigned int i = 0;
i < bundle.size(); ++
i) {
38 <<
" with Type " << bundle[
i];
43 dd4hep::Material matter = ns.material(material);
46 double dPhi = deltaPhi / numberPhi;
47 std::vector<dd4hep::Rotation3D>
rotation;
48 dd4hep::Rotation3D
rot;
49 for (
int i = 0;
i < numberPhi; ++
i) {
50 double phi = -0.5 * deltaPhi + (
i + 0.5) * dPhi;
51 rot = dd4hep::RotationZ(
phi);
54 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Creating a new rotation " << 90 <<
"," << phideg <<
"," << 90
55 <<
"," << (phideg + 90) <<
", 0, 0";
57 rotation.emplace_back(rot);
61 std::vector<dd4hep::Volume> logs;
62 for (
unsigned int i = 0;
i < areaSection.size(); ++
i) {
64 double dStart = areaSection[
i] / (2 * dPhi * rStart[
i]);
65 double dEnd = areaSection[
i] / (2 * dPhi * r0);
67 dd4hep::Solid solid = dd4hep::ConeSegment(
68 name, 0.5 * deltaZ, rStart[
i] - dStart, rStart[
i] + dStart, r0 - dEnd, r0 + dEnd, -0.5 * dPhi, 0.5 * dPhi);
70 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Creating a new solid " << name <<
" a cons with dZ "
77 logs.emplace_back(
log);
82 int nY =
static_cast<int>(bundle.size()) / numberPhi;
83 for (
unsigned int i = 0;
i < bundle.size();
i++) {
84 int ir =
static_cast<int>(
i) / nY;
89 if (ib >= 0 && ib < (
int)(logs.size())) {
90 mother.placeVolume(logs[ib], copy, rotation[ir]);
92 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: " << logs[
ib].name() <<
" number " << copy
93 <<
" positioned in " << mother.name() <<
" at (0, 0, 0) with " << rotation[ir];
Log< level::Info, true > LogVerbatim
static std::vector< std::string > checklist log
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
std::string to_string(const V &value)
static constexpr long s_executed
Cos< T >::type cos(const T &t)