|
|
Go to the documentation of this file.
70 deltaZ = nArgs[
"DeltaZ"];
71 numberPhi =
int(nArgs[
"NumberPhi"]);
72 material = sArgs[
"Material"];
73 areaSection = vArgs[
"AreaSection"];
74 rStart = vArgs[
"RadiusStart"];
75 rEnd = vArgs[
"RadiusEnd"];
77 tilt = nArgs[
"TiltAngle"];
80 childPrefix = sArgs[
"Child"];
82 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Parent " <<
parent().name() <<
" with " << bundle.size()
83 <<
" children with prefix " << childPrefix <<
", material " << material <<
" with "
84 << numberPhi <<
" bundles along phi; width of"
86 <<
" along phi and with " << rStart.size() <<
" different bundle types";
87 for (
unsigned int i = 0;
i < areaSection.size(); ++
i)
88 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Child[" <<
i <<
"] Area " << areaSection[
i] <<
" R at Start "
89 << rStart[
i] <<
" R at End " << rEnd[
i];
90 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: NameSpace " << idNameSpace <<
" Tilt Angle "
92 for (
unsigned int i = 0;
i < bundle.size(); ++
i) {
94 <<
" with Type " << bundle[
i];
107 for (
int i = 0;
i < numberPhi; ++
i) {
110 std::string rotstr =
"R0" + std::to_string(phideg);
115 <<
"rotation " << rotstr <<
"\t" << 90 <<
"," << phideg <<
"," << 90 <<
","
116 << (phideg + 90) <<
", 0, 0";
118 rot =
DDrot(
DDName(rotstr, idNameSpace), 90._deg, phi, 90._deg, (90._deg + phi), 0, 0);
124 std::vector<DDLogicalPart> logs;
125 for (
unsigned int i = 0;
i < areaSection.size(); ++
i) {
127 double dStart = areaSection[
i] / (2 *
dPhi * rStart[
i]);
128 double dEnd = areaSection[
i] / (2 *
dPhi * r0);
139 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalFibreBundle: Creating a new solid " <<
name <<
" a cons with dZ " << deltaZ
140 <<
" rStart " << rStart[
i] - dStart <<
":" << rStart[
i] + dStart <<
" rEnd "
145 logs.emplace_back(
log);
150 int nY = (
int)(bundle.size()) / numberPhi;
151 for (
unsigned int i = 0;
i < bundle.size();
i++) {
153 int ir = (
int)(
i) / nY;
158 if (
ib >= 0 &&
ib < (
int)(logs.size())) {
162 <<
" positioned in " << mother <<
" at " << tran <<
" with " <<
rotation[ir];
std::vector< int > bundle
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
DDName is used to identify DDD entities uniquely.
constexpr NumType convertRadToDeg(NumType radians)
U second(std::pair< T, U > const &p)
static DDSolid cons(const DDName &name, double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double phiFrom, double deltaPhi)
DDMaterial is used to define and access material information.
Cos< T >::type cos(const T &t)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Compact representation of the geometrical detector hierarchy.
#define DEFINE_EDM_PLUGIN(factory, type, name)
~DDHCalFibreBundle() override
std::vector< double > areaSection
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
void execute(DDCompactView &cpv) override
Log< level::Info, true > LogVerbatim
static std::string & ns()
std::vector< double > rEnd
std::vector< double > rStart
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
static AlgebraicMatrix initialize()
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
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