|
|
Go to the documentation of this file.
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, "
111 double xpos =
dx * positionX[
k];
112 double ypos =
dy * positionY[
k];
114 int copy = cellType * 1000 +
k;
118 <<
" 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)
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
std::vector< std::string > childNames
void execute(DDCompactView &cpv) override
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Compact representation of the geometrical detector hierarchy.
std::string formatAsDegrees(double radianVal)
~DDHGCalWaferAlgo() override
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< double > angles
Tan< T >::type tan(const T &t)
static std::string & ns()
Represents a uniquely identifyable rotation matrix.
std::vector< int > detectorType
static AlgebraicMatrix initialize()
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=nullptr)
ROOT::Math::Rotation3D DDRotation