65 cellSize = nArgs[
"CellSize"];
66 cellType = (
int)(nArgs[
"CellType"]);
67 childNames = vsArgs[
"ChildNames"];
71 detectorType =
dbl_to_int(vArgs[
"DetectorType"]);
73 edm::LogVerbatim(
"HGCalGeom") << childNames.size() <<
" children: " << childNames[0] <<
"; " << childNames[1]
74 <<
" positioned " << positionX.size() <<
" times with cell size " << cellSize;
75 for (
unsigned int k = 0;
k < positionX.size(); ++
k)
76 edm::LogVerbatim(
"HGCalGeom") <<
"[" <<
k <<
"] x " << positionX[
k] <<
" y " << positionY[
k] <<
" angle " 77 <<
angles[
k] <<
" detector " << detectorType[
k];
79 rotns = sArgs[
"RotNameSpace"];
81 parentName =
parent().name();
83 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferAlgo debug: Parent " << parentName <<
" NameSpace " << idNameSpace
84 <<
" for Rotation " << rotns;
92 double dx = 0.5 * cellSize;
93 double dy = 0.5 * dx *
tan(30._deg);
95 for (
unsigned int k = 0;
k < positionX.size(); ++
k) {
105 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferAlgo: Creating new rotation " <<
DDName(rotstr, rotns) <<
"\t90, " 108 rotation =
DDrot(
DDName(rotstr, rotns), 90._deg, phi, 90._deg, (90._deg + phi), 0, 0);
111 double xpos = dx * positionX[
k];
112 double ypos = dy * positionY[
k];
114 int copy = cellType * 1000 +
k;
115 cpv.
position(
DDName(name, idNameSpace), parentName, copy, tran, rotation);
118 <<
" positioned in " << parentName <<
" at " << tran <<
" with " <<
rotation;
static AlgebraicMatrix initialize()
constexpr long double convertDegToRad(NumType degrees)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
Tan< T >::type tan(const T &t)
std::vector< int > positionX
std::string formatAsDegrees(double radianVal)
std::vector< int > detectorType
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::vector< std::string > childNames
std::vector< int > positionY
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
~DDHGCalWaferAlgo() override
std::vector< double > angles
#define DEFINE_EDM_PLUGIN(factory, type, name)
ROOT::Math::Rotation3D DDRotation
void execute(DDCompactView &cpv) override