37 deltaZ = nArgs[
"DeltaZ"];
38 numberPhi =
int(nArgs[
"NumberPhi"]);
39 material = sArgs[
"Material"];
40 areaSection = vArgs[
"AreaSection"];
41 rStart = vArgs[
"RadiusStart"];
42 rEnd = vArgs[
"RadiusEnd"];
44 tilt = nArgs[
"TiltAngle"];
47 childPrefix = sArgs[
"Child"];
50 <<
parent().name() <<
" with " << bundle.size()
51 <<
" children with prefix " << childPrefix
52 <<
", material " << material <<
" with " 53 << numberPhi <<
" bundles along phi; width of" 54 <<
" mother " << deltaZ <<
" along Z, " 56 <<
" along phi and with " << rStart.size()
57 <<
" different bundle types";
58 for (
unsigned int i=0;
i<areaSection.size(); ++
i)
60 <<
"] Area " << areaSection[
i]
61 <<
" R at Start " << rStart[
i]
62 <<
" R at End " << rEnd[
i];
64 << idNameSpace <<
" Tilt Angle " 66 <<
" Bundle type at different positions";
67 for (
unsigned int i=0;
i<bundle.size(); ++
i) {
69 <<
" with Type " << bundle[
i];
83 for (
int i=0;
i<numberPhi; ++
i) {
91 <<
"rotation " << rotstr <<
"\t" << 90
92 <<
"," << phideg <<
"," << 90 <<
"," 93 << (phideg+90) <<
", 0, 0";
95 rot =
DDrot(
DDName(rotstr, idNameSpace), 90._deg, phi,
96 90._deg, (90._deg+phi), 0, 0);
98 rotation.emplace_back(rot);
102 std::vector<DDLogicalPart> logs;
103 for (
unsigned int i=0;
i<areaSection.size(); ++
i) {
105 double dStart = areaSection[
i]/(2*dPhi*rStart[
i]);
106 double dEnd = areaSection[
i]/(2*dPhi*r0);
109 rStart[
i]-dStart, rStart[
i]+dStart,
110 r0-dEnd, r0+dEnd, -0.5*dPhi, dPhi);
113 << name <<
" a cons with dZ " << deltaZ
114 <<
" rStart " << rStart[
i]-dStart <<
":" 115 << rStart[
i]+dStart <<
" rEnd " << r0-dEnd
116 <<
":" << r0+dEnd <<
" Phi " 121 logs.emplace_back(log);
126 int nY = (
int)(bundle.size())/numberPhi;
127 for (
unsigned int i=0;
i<bundle.size();
i++) {
129 int ir = (
int)(
i)/nY;
130 if (ir >= numberPhi) ir = numberPhi-1;
133 if (ib>=0 && ib<(
int)(logs.size())) {
134 cpv.
position(logs[ib], mother, copy, tran, rotation[ir]);
137 <<
" number " << copy <<
" positioned in " 138 << mother <<
" at " << tran <<
" with "
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)
DDName is used to identify DDD entities uniquely.
constexpr NumType convertRadToDeg(NumType radians)
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
~DDHCalFibreBundle() override
Cos< T >::type cos(const T &t)
void execute(DDCompactView &cpv) override
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override