40 double getRin()
const {
return rin; }
45 double getRmax(
unsigned int i)
const {
return rmax[
i]; }
46 double getZoff(
unsigned int i)
const {
return zoff[
i]; }
62 double getSideD(
unsigned int i)
const {
return sideD[
i]; }
63 double getSideT(
unsigned int i)
const {
return sideT[
i]; }
310 rout = nArgs[
"ROut"];
313 rotns = sArgs[
"RotNameSpace"];
315 theta = vArgs[
"Theta"];
316 rmax = vArgs[
"RMax"];
317 zoff = vArgs[
"ZOff"];
330 <<
"\tzoff[" <<
i <<
"] = " <<
zoff[
i];
375 midName = vsArgs[
"MidAbsName"];
376 midMat = vsArgs[
"MidAbsMat"];
377 midW = vArgs[
"MidAbsW"];
378 midT = vArgs[
"MidAbsT"];
388 sideD = vArgs[
"SideD"];
389 sideT = vArgs[
"SideT"];
391 for (
unsigned int i = 0;
i <
sideMat.size();
i++)
435 idName = sArgs[
"MotherName"];
454 edm::LogVerbatim(
"HCalGeom") <<
"<<== End of DDHCalBarrelAlgo construction";
474 int nf =
ntot - nsec;
494 std::vector<double> pgonZ = {-
zmax,
510 std::vector<double> pgonRmin = {
511 rmid4, rmid3, rmid3, rmid2, rmid1, rmid1,
rin,
rin,
rin, rmid1, rmid1, rmid2, rmid3, rmid3, rmid4};
513 std::vector<double> pgonRmax = {
514 rout1, rout1,
rout,
rout,
rout,
rout,
rout,
rout,
rout,
rout,
rout,
rout,
rout, rout1, rout1};
516 std::vector<double> pgonZHalf = {0, zstep1, zstep2, zstep3, zstep4, zstep5, zstep5,
zmax};
518 std::vector<double> pgonRminHalf = {
rin,
rin, rmid1, rmid1, rmid2, rmid3, rmid3, rmid4};
531 << nsec <<
" sections ";
532 for (
unsigned int i = 0;
i < pgonZ.size();
i++)
534 <<
"\tZ = " << pgonZ[
i] <<
"\tRmin = " << pgonRmin[
i] <<
"\tRmax = " << pgonRmax[
i];
543 << nsec <<
" sections ";
544 for (
unsigned int i = 0;
i < pgonZHalf.size();
i++)
546 <<
"\tZ = " << pgonZHalf[
i] <<
"\tRmin = " << pgonRminHalf[
i]
547 <<
"\tRmax = " << pgonRmaxHalf[
i];
560 << parentName <<
" at (0, 0, 0) with no rotation";
569 << nf <<
" sections ";
570 for (
unsigned int i = 0;
i < pgonZHalf.size();
i++)
572 <<
"\tZ = " << pgonZHalf[
i] <<
"\tRmin = " << pgonRminHalf[
i]
573 <<
"\tRmax = " << pgonRmaxHalf[
i];
582 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << genlogich.
name() <<
" number 1 positioned in " 583 << genlogic.
name() <<
" at (0, 0, 0) with no rotation";
589 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << genlogich.
name() <<
" number 2 positioned in " 590 << genlogic.
name() <<
" at " << r0 <<
" with " <<
rot;
600 for (
unsigned int i = 0;
i < pgonZHalf.size();
i++)
602 <<
"\tZ = " << pgonZHalf[
i] <<
"\tRmin = " << pgonRminHalf[
i]
603 <<
"\tRmax = " << pgonRmaxHalf[
i];
610 double theta = 90._deg;
613 double phiy =
phi + 90._deg;
632 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << seclogic.
name() <<
" number " <<
ii + 1 <<
" positioned in " 633 << genlogich.
name() <<
" at " << r0 <<
" with " <<
rotation;
669 std::vector<double> pgonZ, pgonRmin, pgonRmax;
671 pgonZ.emplace_back(0);
672 pgonRmin.emplace_back(
rin);
673 pgonRmax.emplace_back(
rout);
675 pgonZ.emplace_back(zout);
676 pgonRmin.emplace_back(
rin);
677 pgonRmax.emplace_back(
rout);
682 pgonRmin.emplace_back(pgonRmax[1]);
683 pgonRmax.emplace_back(pgonRmax[1]);
690 pgonZ.emplace_back(pgonZ[1] + deltaz);
691 pgonRmin.emplace_back(pgonRmin[1]);
695 pgonRmin.emplace_back(pgonRmin[2]);
696 pgonRmax.emplace_back(pgonRmax[2]);
702 pgonRmax.emplace_back(pgonRmax[1]);
706 pgonRmin.emplace_back(pgonRmin[2]);
707 pgonRmax.emplace_back(pgonRmax[2]);
712 pgonRmin.emplace_back(
rout);
713 pgonRmax.emplace_back(
rout);
720 double alpha1 =
alpha;
722 double rmid = 0.5 * (
rin +
rout);
724 alpha1 = atan(
width / rmid);
732 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
name <<
" (Layer " <<
i <<
") Polyhedra made of " 735 for (
unsigned int k = 0;
k < pgonZ.size();
k++)
737 <<
"\t" << pgonZ[
k] <<
"\t" << pgonRmin[
k] <<
"\t" << pgonRmax[
k];
745 <<
" positioned in " <<
sector.name() <<
" at (0,0,0) with no rotation";
776 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: \t\tInside layer " <<
id <<
"...";
800 dy = 0.5 * rsi * (
tan(alpha1) -
tan(alpha2));
803 y = 0.5 * rsi * (
tan(alpha1) +
tan(alpha2));
810 <<
" of dimensions " <<
dx <<
", " <<
dy <<
", " <<
dz;
823 <<
" positioned in " << mother.
name() <<
" at " << r11 <<
" with no rotation\n" 824 <<
"DDHCalBarrelAlgo: " << glog.
name() <<
" Number " <<
idOffset + 2
825 <<
" positioned in " << mother.
name() <<
" at " << r12 <<
" with " <<
rot;
839 dy = 0.5 * rsi *
tan(alpha2);
848 <<
" of dimensions " <<
dx <<
", " <<
dy <<
", " <<
dz;
861 << mother.
name() <<
" at " << r21
862 <<
" with no rotation\nDDHCalBarrelAlgo: " << glog.
name() <<
" Number " <<
idOffset + 4
863 <<
" positioned in " << mother.
name() <<
" at " << r22 <<
" with " <<
rot;
872 int k =
abs(nAbs) - 1;
880 std::vector<double> pgonZ, pgonRmin, pgonRmax;
882 pgonZ.emplace_back(0.0);
883 pgonRmin.emplace_back(rsi);
884 pgonRmax.emplace_back(rsi +
getSideT(
k));
887 pgonRmin.emplace_back(rsi);
888 pgonRmax.emplace_back(pgonRmax[0]);
891 pgonRmin.emplace_back(pgonRmax[1]);
892 pgonRmax.emplace_back(pgonRmax[1]);
898 <<
" and with " << pgonZ.size() <<
" sections";
899 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
901 <<
"\tRmax = " << pgonRmax[
ii];
911 <<
" at (0,0,0) with no rotation";
915 double rmid = pgonRmax[0];
924 <<
convertRadToDeg(alpha1) <<
" and with " << pgonZ.size() <<
" sections";
925 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
927 <<
"\tRmax = " << pgonRmax[
ii];
936 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
log.name() <<
" Number 1 positioned in " 937 << mother.
name() <<
" at (0,0,0) with no rotation";
959 std::vector<double> pgonZ, pgonRmin, pgonRmax;
961 pgonZ.emplace_back(0.0);
962 pgonRmin.emplace_back(rsi);
966 pgonRmin.emplace_back(rsi);
967 pgonRmax.emplace_back(pgonRmax[0]);
970 pgonRmin.emplace_back(pgonRmax[1]);
971 pgonRmax.emplace_back(pgonRmax[1]);
977 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
979 <<
"\tRmax = " << pgonRmax[
ii];
988 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
log.name() <<
" Number 1 positioned in " << laylog.
name()
989 <<
" at (0,0,0) with no rotation";
992 double rmin = pgonRmin[0];
993 double rmax = pgonRmax[0];
995 for (
int i = 0;
i < 1;
i++) {
1003 <<
convertRadToDeg(alpha1) <<
" and with " << pgonZ.size() <<
" sections";
1004 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
1006 <<
"\tRmax = " << pgonRmax[
ii];
1015 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
log.name() <<
" Number 1 positioned in " 1016 << mother.
name() <<
" at (0,0,0) with no rotation";
1036 <<
convertRadToDeg(alpha1) <<
" and with " << pgonZ.size() <<
" sections";
1037 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
1039 <<
"\tRmax = " << pgonRmax[
ii];
1049 <<
" at (0,0,0) with no rotation";
1069 <<
convertRadToDeg(alpha1) <<
" and with " << pgonZ.size() <<
" sections";
1070 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
1072 <<
"\tRmax = " << pgonRmax[
ii];
1081 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
log.name() <<
" Number " <<
i <<
" positioned in " 1082 << mother.
name() <<
" at (0,0,0) with no " 1101 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: \t\tInside detector " <<
id <<
"...";
1116 double dx1, dx2, shiftX;
1135 <<
" of dimensions " << dx1 <<
", " << wid <<
", " <<
dz;
1139 double x = shiftX + dx1 -
dx;
1143 <<
" at (" <<
x <<
"," <<
y <<
",0) with no rotation";
1148 <<
" of dimensions " << 0.5 *
getDetTsc(
id) <<
", " << wid <<
", " <<
dz;
1156 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << glog.
name() <<
" Number " << copyNo <<
" positioned in " 1157 <<
detector.name() <<
" at (" <<
x <<
"," <<
y <<
",0) with no rotation";
1162 <<
" of dimensions " << dx2 <<
", " << wid <<
", " <<
dz;
1170 <<
" at (" <<
x <<
"," <<
y <<
",0) with no rotation";
std::vector< std::string > absorbMat
double getMiddleD() const
Log< level::Info, true > LogVerbatim
double getMidAbsT(unsigned int i) const
static AlgebraicMatrix initialize()
double getLayerT1(unsigned i) const
const std::string & getLayerMaterial(unsigned i) const
std::vector< std::string > midMat
int getDetPosY(unsigned int i) const
std::vector< double > sideAbsW
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
std::vector< std::string > layerLabel
double getTanTheta(unsigned int i) const
double getLayerWidth(unsigned i) const
double getLayerD1(unsigned i) const
DDMaterial is used to define and access material information.
constexpr NumType convertRadToDeg(NumType radians)
double getSideAbsW(unsigned int i) const
double getDetdP2(unsigned int i) const
std::vector< double > layerD2
double getTheta(unsigned int i) const
double getLayerD2(unsigned i) const
std::vector< std::string > layerMat
DDName is used to identify DDD entities uniquely.
const std::string & getSideAbsMat(unsigned int i) const
std::vector< int > layerId
const std::string & getDetMatSc() const
static std::string & ns()
std::vector< double > rmax
void constructInsideDetectors(const DDLogicalPart &detector, const std::string &name, int id, double dx, double dy, double dz, int type, DDCompactView &cpv)
Compact representation of the geometrical detector hierarchy.
double getSideD(unsigned int i) const
std::string formatAsDegreesInInteger(double radianVal)
A DDSolid represents the shape of a part.
double getZoff(unsigned int i) const
void constructInsideSector(const DDLogicalPart §or, DDCompactView &cpv)
double getDetdP1(unsigned int i) const
Represents a uniquely identifyable rotation matrix.
const std::string & getSideMat(unsigned int i) const
double getDetT21(unsigned int i) const
U second(std::pair< T, U > const &p)
std::vector< double > layerT1
std::vector< double > detdP2
std::vector< double > detWidth2
int getNsectortot() const
int getMidAbsorber() const
const std::string & getSideAbsName(unsigned int i) const
std::vector< std::string > sideAbsName
const std::string & getMiddleMat() const
std::vector< double > detdP1
std::vector< double > absorbT
double getAbsorbT(unsigned int i) const
double getMidAbsW(unsigned int i) const
const std::string & getDetMat() const
void execute(DDCompactView &cpv) override
std::vector< double > detWidth1
DDLogicalPart constructSideLayer(const DDLogicalPart &laylog, const std::string &nm, int nAbs, double rin, double alpha, DDCompactView &cpv)
void constructGeneralVolume(DDCompactView &cpv)
int getSideAbsorber() const
const std::string & getAbsorbName(unsigned int i) const
double getDetT22(unsigned int i) const
std::vector< double > layerGap
double getSideT(unsigned int i) const
double getDetT11(unsigned int i) const
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
std::vector< double > layerAlpha
void constructInsideLayers(const DDLogicalPart &laylog, const std::string &name, int id, int nAbs, double rin, double d1, double alpha1, double d2, double alpha2, double t1, double t2, DDCompactView &cpv)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< double > detT22
std::vector< int > layerAbsorb
const std::string & getMidAbsName(unsigned int i) const
std::vector< std::string > sideAbsMat
std::vector< double > sideT
std::vector< double > detTsc
double getDetT12(unsigned int i) const
~DDHCalBarrelAlgo() override
const std::string & getMidAbsMat(unsigned int i) const
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
const std::string & getGenMaterial() const
int getDetType(unsigned int i) const
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 > midName
std::vector< std::string > sideMat
std::vector< double > detT21
double getDetWidth2(unsigned int i) const
double getLayerGap(unsigned int i) const
int getLayerId(unsigned i) const
double getLayerAlpha(unsigned i) const
std::vector< int > detPosY
const std::string & getLayerLabel(unsigned i) const
double getAbsorbD(unsigned int i) const
double getDetTsc(unsigned int i) const
double getMiddleW() const
std::vector< int > detType
const std::string & getDetMatPl() const
std::vector< double > zoff
double getLayerT2(unsigned i) const
double getDetWidth1(unsigned int i) const
std::vector< double > sideD
std::vector< double > detT11
const std::string & getAbsorbMat(unsigned int i) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< double > absorbD
std::vector< double > ttheta
std::vector< double > theta
double getRmax(unsigned int i) const
int getLayerAbsorb(unsigned int i) const
std::vector< double > layerWidth
std::vector< std::string > absorbName
static constexpr float d1
std::vector< double > midW
std::vector< double > layerD1
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
Geom::Theta< T > theta() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
std::vector< double > detT12
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)
std::vector< double > midT
std::vector< double > layerT2
DDLogicalPart constructMidLayer(const DDLogicalPart &laylog, const std::string &nm, double rin, double alpha, DDCompactView &cpv)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override