|
|
Go to the documentation of this file.
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;
DDName is used to identify DDD entities uniquely.
std::vector< int > positionX_
constexpr long double convertDegToRad(NumType degrees)
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 execute(DDCompactView &cpv) override
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::vector< int > positionY_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Compact representation of the geometrical detector hierarchy.
std::string formatAsDegrees(double radianVal)
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< std::string > childNames_
Tan< T >::type tan(const T &t)
std::vector< int > detectorType_
std::vector< double > angles_
Log< level::Info, true > LogVerbatim
static std::string & ns()
Represents a uniquely identifyable rotation matrix.
static AlgebraicMatrix initialize()
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
ROOT::Math::Rotation3D DDRotation