|
|
Go to the documentation of this file.
60 waferSize_ = nArgs[
"WaferSize"];
61 cellType_ = (
int)(nArgs[
"CellType"]);
62 nColumns_ = (
int)(nArgs[
"NColumns"]);
63 nBottomY_ = (
int)(nArgs[
"NBottomY"]);
64 childNames_ = vsArgs[
"ChildNames"];
67 detectorType_ =
dbl_to_int(vArgs[
"DetectorType"]);
69 parentName_ =
parent().name();
71 edm::LogVerbatim(
"HGCalGeom") << childNames_.size() <<
" children: " << childNames_[0] <<
"; " << childNames_[1]
72 <<
" in namespace " << idNameSpace_ <<
" positioned in " << nCellsRow_.size()
73 <<
" rows and " << nColumns_ <<
" columns with lowest column at " << nBottomY_
74 <<
" in mother " << parentName_ <<
" of size " << waferSize_;
75 for (
unsigned int k = 0;
k < nCellsRow_.size(); ++
k)
76 edm::LogVerbatim(
"HGCalGeom") <<
"[" <<
k <<
"] Ncells " << nCellsRow_[
k] <<
" Edge rotations "
77 << angleEdges_[2 *
k] <<
":" << angleEdges_[2 *
k + 1] <<
" Type of edge cells "
78 << detectorType_[2 *
k] <<
":" << detectorType_[2 *
k + 1];
86 double dx = 0.5 * waferSize_ / nColumns_;
87 double dy = 0.5 *
dx *
tan(30._deg);
91 for (
unsigned int ir = 0; ir < nCellsRow_.size(); ++ir) {
92 int nx = 1 - nCellsRow_[ir];
93 double ypos =
dy * ny;
94 for (
int ic = 0; ic < nCellsRow_[ir]; ++ic) {
98 name = childNames_[detectorType_[2 * ir]];
99 irot = angleEdges_[2 * ir];
100 }
else if (ic + 1 == nCellsRow_[ir]) {
101 name = childNames_[detectorType_[2 * ir + 1]];
102 irot = angleEdges_[2 * ir + 1];
111 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferAlgo: Creating new rotation " <<
DDName(rotstr, idNameSpace_)
112 <<
"\t90, " << irot <<
", 90, " << (irot + 90) <<
", 0, 0";
114 rot =
DDrot(
DDName(rotstr, idNameSpace_), 90._deg, phi, 90._deg, (90._deg + phi), 0, 0);
117 double xpos =
dx * nx;
120 int copy = cellType_ * 1000 + kount;
125 <<
" positioned in " << parentName_ <<
" at " << tran <<
" with " <<
rot;
std::vector< int > nCellsRow_
DDName is used to identify DDD entities uniquely.
constexpr long double convertDegToRad(NumType degrees)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
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
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< int > angleEdges_
Tan< T >::type tan(const T &t)
std::vector< int > detectorType_
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