62 cellSize_ = nArgs[
"CellSize"];
63 cellType_ = (
int)(nArgs[
"CellType"]);
64 childNames_ = vsArgs[
"ChildNames"];
67 angles_ = vArgs[
"Angles"];
68 detectorType_ =
dbl_to_int(vArgs[
"DetectorType"]);
70 edm::LogVerbatim(
"HGCalGeom") << childNames_.size() <<
" children: " << childNames_[0] <<
"; " << childNames_[1]
71 <<
" positioned " << positionX_.size() <<
" times with cell size " << cellSize_;
72 for (
unsigned int k = 0;
k < positionX_.size(); ++
k)
73 edm::LogVerbatim(
"HGCalGeom") <<
"[" <<
k <<
"] x " << positionX_[
k] <<
" y " << positionY_[
k] <<
" angle " 74 << angles_[
k] <<
" detector " << detectorType_[
k];
76 rotns_ = sArgs[
"RotNameSpace"];
78 parentName_ =
parent().name();
80 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferAlgo debug: Parent " << parentName_ <<
" NameSpace " << idNameSpace_
81 <<
" for Rotation " << rotns_;
89 double dx = 0.5 * cellSize_;
90 double dy = 0.5 *
dx *
tan(30._deg);
92 for (
unsigned int k = 0;
k < positionX_.size(); ++
k) {
96 if (angles_[
k] != 0) {
103 <<
"\t90, " << angles_[
k] <<
", 90, " << (angles_[
k] + 90) <<
", 0, 0";
108 double xpos =
dx * positionX_[
k];
109 double ypos =
dy * positionY_[
k];
115 <<
" positioned in " << parentName_ <<
" at " << tran <<
" with " <<
rotation;
Log< level::Info, true > LogVerbatim
static AlgebraicMatrix initialize()
std::vector< int > positionY_
constexpr double convertDegToRad(NumType degrees)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
Represents a uniquely identifyable rotation matrix.
std::vector< int > positionX_
std::vector< int > detectorType_
std::vector< double > angles_
Tan< T >::type tan(const T &t)
std::string formatAsDegrees(double radianVal)
static int32_t packCellType6(int type, int cell)
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::vector< std::string > childNames_
#define DEFINE_EDM_PLUGIN(factory, type, name)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
void execute(DDCompactView &cpv) override