|
|
Go to the documentation of this file. 1 #include "DD4hep/DetFactoryHelper.h"
5 #include <Math/Cartesian3D.h>
6 #include <Math/DisplacementVector3D.h>
14 using DD3Vector = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double> >;
20 int n =
args.value<
int>(
"N");
21 int startCopyNo =
args.find(
"StartCopyNo") ?
args.value<
int>(
"StartCopyNo") : 1;
22 int incrCopyNo =
args.find(
"IncrCopyNo") ?
args.value<
int>(
"IncrCopyNo") : 1;
23 double theta =
args.find(
"Theta") ?
args.value<
double>(
"Theta") : 0.;
24 double phi =
args.find(
"Phi") ?
args.value<
double>(
"Phi") : 0.;
25 double theta_obj =
args.find(
"Theta_obj") ?
args.value<
double>(
"Theta_obj") : 0.;
26 double phi_obj =
args.find(
"Phi_obj") ?
args.value<
double>(
"Phi_obj") : 0.;
27 double delta =
args.find(
"Delta") ?
args.value<
double>(
"Delta") : 0.;
28 vector<double>
base =
args.value<vector<double> >(
"Base");
31 int copy = startCopyNo;
33 LogDebug(
"DDAlgorithm") <<
"DDMTDLinear: Parameters for positioning:: n " <<
n <<
" Direction Theta, Phi, Delta "
38 LogDebug(
"DDAlgorithm") <<
"DDMTDLinear: Parent " << mother.name() <<
"\tChild " <<
child.name() <<
" NameSpace "
46 double thetaZ = theta_obj - 0.5_pi;
47 double phiZ = phi_obj;
50 double phiX = phi_obj;
51 double phiY = phi_obj + 0.5_pi;
55 for (
int i = 0;
i <
n; ++
i) {
58 LogDebug(
"DDAlgorithm") <<
"DDMTDLinear: " <<
child.name() <<
" number " <<
copy <<
" positioned in "
59 << mother.name() <<
" at " << tran <<
" with " <<
rotation;
#define DECLARE_DDCMS_DETELEMENT(name, func)
constexpr NumType convertRadToDeg(NumType radians)
DDRotationMatrix makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
Sin< T >::type sin(const T &t)
static long algorithm(Detector &, cms::DDParsingContext &ctxt, xml_h e)
Cos< T >::type cos(const T &t)
Geom::Theta< T > theta() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
std::string_view name() const
dd4hep::Volume volume(const std::string &name, bool exc=true) const
Namespace of DDCMS conversion namespace.