1 #include "DD4hep/DetFactoryHelper.h" 16 std::cout <<
"******** My DDTECPhiAlgo!!!!!!\n";
22 double startAngle = args.
value<
double>(
"StartAngle");
23 double incrAngle = args.
value<
double>(
"IncrAngle");
24 double zIn = args.
value<
double>(
"ZIn");
25 double zOut = args.
value<
double>(
"ZOut");
26 int number = args.
value<
double>(
"Number");
27 int startCopyNo = args.
find(
"StartCopyNo") ? args.
value<
int>(
"StartCopyNo") : 1;
28 int incrCopyNo = args.
find(
"IncrCopyNo") ? args.
value<
int>(
"IncrCopyNo") : 1;
30 LogDebug(
"TECGeom") <<
"debug: Parameters for " 31 <<
"positioning--" <<
"\tStartAngle " 34 << zOut <<
"\tCopy Numbers " << number
35 <<
" Start/Increment " << startCopyNo <<
", " 37 LogDebug(
"TECGeom") <<
"debug: Parent " << mother.name()
38 <<
"\tChild " << child.name() <<
" NameSpace " 42 double theta = 90._deg;
43 int copyNo = startCopyNo;
44 for (
int i=0;
i<number;
i++) {
45 double phix = startAngle +
i*incrAngle;
46 double phiy = phix + 90._deg;
48 Position tran(0., 0., (
i%2 == 0) ? zIn : zOut);
49 mother.placeVolume(child, copyNo, Transform3D(rotation,tran));
50 LogDebug(
"TECGeom") <<
"test: " << child.name() <<
" number " 51 << copyNo <<
" positioned in " << mother.name() <<
" at "
dd4hep::Volume volume(const std::string &name, bool exc=true) const
std::string childName() const
Access value of child'name from the xml element.
T value(const std::string &name) const
Geom::Theta< T > theta() const
constexpr NumType convertRadToDeg(NumType radians)
static long algorithm(Detector &, cms::DDParsingContext &ctxt, xml_h e, SensitiveDetector &)
dd4hep::Rotation3D makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
std::string_view name() const
Namespace of DDCMS conversion namespace.
#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.