4 #include "DD4hep/DetFactoryHelper.h"
13 dd4hep::SensitiveDetector& ) {
18 double deltaZ =
args.value<
double>(
"DeltaZ");
19 int numberPhi =
args.value<
int>(
"NumberPhi");
21 std::vector<double> areaSection =
args.value<std::vector<double> >(
"AreaSection");
22 std::vector<double> rStart =
args.value<std::vector<double> >(
"RadiusStart");
23 std::vector<double> rEnd =
args.value<std::vector<double> >(
"RadiusEnd");
24 std::vector<int> bundle =
args.value<std::vector<int> >(
"Bundles");
25 double tilt =
args.value<
double>(
"TiltAngle");
28 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Parent " <<
args.parentName() <<
" with " << bundle.size()
29 <<
" children with prefix " << childPrefix <<
", material " << material <<
" with "
30 << numberPhi <<
" bundles along phi; width of"
32 <<
" along phi and with " << rStart.size() <<
" different bundle types";
33 for (
unsigned int i = 0;
i < areaSection.size(); ++
i)
39 for (
unsigned int i = 0;
i < bundle.size(); ++
i) {
41 <<
" with Type " << bundle[
i];
50 std::vector<dd4hep::Rotation3D>
rotation;
51 dd4hep::Rotation3D
rot;
52 for (
int i = 0;
i < numberPhi; ++
i) {
54 rot = dd4hep::RotationZ(phi);
57 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Creating a new rotation " << 90 <<
"," << phideg <<
"," << 90
58 <<
"," << (phideg + 90) <<
", 0, 0";
64 std::vector<dd4hep::Volume> logs;
65 for (
unsigned int i = 0;
i < areaSection.size(); ++
i) {
67 double dStart = areaSection[
i] / (2 *
dPhi * rStart[
i]);
68 double dEnd = areaSection[
i] / (2 *
dPhi * r0);
70 dd4hep::Solid solid = dd4hep::ConeSegment(
71 name, 0.5 * deltaZ, rStart[
i] - dStart, rStart[
i] + dStart, r0 - dEnd, r0 + dEnd, -0.5 *
dPhi, 0.5 *
dPhi);
73 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Creating a new solid " <<
name <<
" a cons with dZ " << deltaZ
74 <<
" rStart " << rStart[
i] - dStart <<
":" << rStart[
i] + dStart <<
" rEnd "
79 logs.emplace_back(
log);
84 int nY = static_cast<int>(bundle.size()) / numberPhi;
85 for (
unsigned int i = 0;
i < bundle.size();
i++) {
86 int ir = static_cast<int>(
i) / nY;
91 if (
ib >= 0 &&
ib < (
int)(logs.size())) {
95 <<
" positioned in " << mother.name() <<
" at (0, 0, 0) with " <<
rotation[ir];