71 numberPhi =
int(nArgs[
"NumberPhi"]);
72 material = sArgs[
"Material"];
73 areaSection = vArgs[
"AreaSection"];
74 rStart = vArgs[
"RadiusStart"];
75 rEnd = vArgs[
"RadiusEnd"];
77 tilt = nArgs[
"TiltAngle"];
80 childPrefix = sArgs[
"Child"];
82 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Parent " <<
parent().name() <<
" with " << bundle.size()
83 <<
" children with prefix " << childPrefix <<
", material " << material <<
" with " 84 << numberPhi <<
" bundles along phi; width of" 86 <<
" along phi and with " << rStart.size() <<
" different bundle types";
87 for (
unsigned int i = 0;
i < areaSection.size(); ++
i)
88 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Child[" <<
i <<
"] Area " << areaSection[
i] <<
" R at Start " 89 << rStart[
i] <<
" R at End " << rEnd[
i];
90 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: NameSpace " << idNameSpace <<
" Tilt Angle " 92 for (
unsigned int i = 0;
i < bundle.size(); ++
i) {
94 <<
" with Type " << bundle[
i];
107 for (
int i = 0;
i < numberPhi; ++
i) {
108 double phi = -0.5 *
deltaPhi + (
i + 0.5) * dPhi;
115 <<
"rotation " << rotstr <<
"\t" << 90 <<
"," << phideg <<
"," << 90 <<
"," 116 << (phideg + 90) <<
", 0, 0";
118 rot =
DDrot(
DDName(rotstr, idNameSpace), 90._deg, phi, 90._deg, (90._deg + phi), 0, 0);
124 std::vector<DDLogicalPart> logs;
125 for (
unsigned int i = 0;
i < areaSection.size(); ++
i) {
127 double dStart = areaSection[
i] / (2 * dPhi * rStart[
i]);
128 double dEnd = areaSection[
i] / (2 * dPhi * r0);
140 <<
" rStart " << rStart[
i] - dStart <<
":" << rStart[
i] + dStart <<
" rEnd " 141 << r0 - dEnd <<
":" << r0 + dEnd <<
" Phi " <<
convertRadToDeg(-0.5 * dPhi) <<
":" 145 logs.emplace_back(
log);
150 int nY = (
int)(bundle.size()) / numberPhi;
151 for (
unsigned int i = 0;
i < bundle.size();
i++) {
153 int ir = (
int)(
i) / nY;
158 if (
ib >= 0 &&
ib < (
int)(logs.size())) {
162 <<
" positioned in " << mother <<
" at " << tran <<
" with " <<
rotation[ir];
Log< level::Info, true > LogVerbatim
static AlgebraicMatrix initialize()
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
DDMaterial is used to define and access material information.
static DDSolid cons(const DDName &name, double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double phiFrom, double deltaPhi)
constexpr NumType convertRadToDeg(NumType radians)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
A DDSolid represents the shape of a part.
static std::string to_string(const XMLCh *ch)
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
~DDHCalFibreBundle() override
Cos< T >::type cos(const T &t)
void execute(DDCompactView &cpv) override
std::vector< double > areaSection
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
std::vector< double > rEnd
std::vector< double > rStart
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< int > bundle
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override