1 #include "DD4hep/DetFactoryHelper.h" 12 int startcn = args.
find(
"StartCopyNo") ? args.
value<
int>(
"StartCopyNo") : 1;
13 int incrcn = args.
find(
"IncrCopyNo") ? args.
value<
int>(
"IncrCopyNo") : 1;
16 double phi = args.
value<
double>(
"Phi");
19 vector<double> centre = args.
value<vector<double> >(
"Center");
20 string rotMat = args.
value<
string>(
"Rotation");
24 LogDebug(
"TrackerGeom") <<
"DDTrackerLinear +++ Executing Algorithm. rParent:" << mother.name();
25 LogDebug(
"TrackerGeom") <<
"debug: Parent " << mother.name() <<
"\tChild " << child.name() <<
" NameSpace " 26 << ns.
name() <<
"\tNumber " << number <<
"\tAxis (theta/phi) " << theta / dd4hep::deg <<
", " 27 << phi / dd4hep::deg <<
"\t(Offset/Delta) " << offset <<
", " << delta <<
"\tCentre " 28 << centre[0] <<
", " << centre[1] <<
", " << centre[2] <<
"\tRotation " << rotMat;
30 Position direction(
sin(theta) *
cos(phi),
sin(theta) *
sin(phi),
cos(theta));
31 Position
base(centre[0], centre[1], centre[2]);
35 for (
int i = 0, ci = startcn;
i <
number;
i++, ci += incrcn) {
36 Position tran = base + (offset + double(
i) *
delta) * direction;
37 mother.placeVolume(child, ci, Transform3D(rot, tran));
39 LogDebug(
"TrackerGeom") << child.name() <<
" number " << ci <<
" positioned in " << mother.name() <<
" at " << tran
dd4hep::Volume volume(const std::string &name, bool exc=true) const
Sin< T >::type sin(const T &t)
T value(const std::string &name) const
Geom::Theta< T > theta() const
static long algorithm(Detector &, cms::DDParsingContext &ctxt, xml_h e, SensitiveDetector &)
std::string_view name() const
static constexpr long s_executed
Cos< T >::type cos(const T &t)
Namespace of DDCMS conversion namespace.
const dd4hep::Rotation3D & rotation(const std::string &name) const
#define DECLARE_DDCMS_DETELEMENT(name, func)
bool find(const std::string &name) const
Check the existence of an argument by name.
std::string parentName() const
Access value of rParent child node.