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;
671 std::vector<double> pgonZ, pgonRmin, pgonRmax;
673 pgonZ.emplace_back(0);
674 pgonRmin.emplace_back(
rin);
675 pgonRmax.emplace_back(
rout);
677 pgonZ.emplace_back(zout);
678 pgonRmin.emplace_back(
rin);
679 pgonRmax.emplace_back(
rout);
684 pgonRmin.emplace_back(pgonRmax[1]);
685 pgonRmax.emplace_back(pgonRmax[1]);
694 pgonZ.emplace_back(pgonZ[1] + deltaz);
695 pgonRmin.emplace_back(pgonRmin[1]);
699 pgonRmin.emplace_back(pgonRmin[2]);
700 pgonRmax.emplace_back(pgonRmax[2]);
708 pgonRmax.emplace_back(pgonRmax[1]);
714 pgonRmin.emplace_back(pgonRmin[2]);
715 pgonRmax.emplace_back(pgonRmax[2]);
722 pgonRmin.emplace_back(
rout);
723 pgonRmax.emplace_back(
rout);
732 double alpha1 =
alpha;
734 double rmid = 0.5 * (
rin +
rout);
736 alpha1 = atan(
width / rmid);
744 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
name <<
" (Layer " <<
i <<
") Polyhedra made of " 747 for (
unsigned int k = 0;
k < pgonZ.size();
k++)
749 <<
"\t" << pgonZ[
k] <<
"\t" << pgonRmin[
k] <<
"\t" << pgonRmax[
k];
757 <<
" positioned in " <<
sector.name() <<
" at (0,0,0) with no rotation";
788 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: \t\tInside layer " <<
id <<
"...";
812 dy = 0.5 * rsi * (
tan(alpha1) -
tan(alpha2));
815 y = 0.5 * rsi * (
tan(alpha1) +
tan(alpha2));
822 <<
" of dimensions " <<
dx <<
", " <<
dy <<
", " <<
dz;
835 <<
" positioned in " << mother.
name() <<
" at " << r11 <<
" with no rotation\n" 836 <<
"DDHCalBarrelAlgo: " << glog.
name() <<
" Number " <<
idOffset + 2
837 <<
" positioned in " << mother.
name() <<
" at " << r12 <<
" with " <<
rot;
851 dy = 0.5 * rsi *
tan(alpha2);
860 <<
" of dimensions " <<
dx <<
", " <<
dy <<
", " <<
dz;
873 << mother.
name() <<
" at " << r21
874 <<
" with no rotation\nDDHCalBarrelAlgo: " << glog.
name() <<
" Number " <<
idOffset + 4
875 <<
" positioned in " << mother.
name() <<
" at " << r22 <<
" with " <<
rot;
884 int k =
abs(nAbs) - 1;
892 std::vector<double> pgonZ, pgonRmin, pgonRmax;
894 pgonZ.emplace_back(0.0);
895 pgonRmin.emplace_back(rsi);
896 pgonRmax.emplace_back(rsi +
getSideT(
k));
899 pgonRmin.emplace_back(rsi);
900 pgonRmax.emplace_back(pgonRmax[0]);
903 pgonRmin.emplace_back(pgonRmax[1]);
904 pgonRmax.emplace_back(pgonRmax[1]);
910 <<
" and with " << pgonZ.size() <<
" sections";
911 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
913 <<
"\tRmax = " << pgonRmax[
ii];
923 <<
" at (0,0,0) with no rotation";
927 double rmid = pgonRmax[0];
936 <<
convertRadToDeg(alpha1) <<
" and with " << pgonZ.size() <<
" sections";
937 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
939 <<
"\tRmax = " << pgonRmax[
ii];
948 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
log.name() <<
" Number 1 positioned in " 949 << mother.
name() <<
" at (0,0,0) with no rotation";
971 std::vector<double> pgonZ, pgonRmin, pgonRmax;
973 pgonZ.emplace_back(0.0);
974 pgonRmin.emplace_back(rsi);
978 pgonRmin.emplace_back(rsi);
979 pgonRmax.emplace_back(pgonRmax[0]);
982 pgonRmin.emplace_back(pgonRmax[1]);
983 pgonRmax.emplace_back(pgonRmax[1]);
989 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
991 <<
"\tRmax = " << pgonRmax[
ii];
1000 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
log.name() <<
" Number 1 positioned in " << laylog.
name()
1001 <<
" at (0,0,0) with no rotation";
1004 double rmin = pgonRmin[0];
1005 double rmax = pgonRmax[0];
1007 for (
int i = 0;
i < 1;
i++) {
1015 <<
convertRadToDeg(alpha1) <<
" and with " << pgonZ.size() <<
" sections";
1016 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
1018 <<
"\tRmax = " << pgonRmax[
ii];
1027 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
log.name() <<
" Number 1 positioned in " 1028 << mother.
name() <<
" at (0,0,0) with no rotation";
1048 <<
convertRadToDeg(alpha1) <<
" and with " << pgonZ.size() <<
" sections";
1049 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
1051 <<
"\tRmax = " << pgonRmax[
ii];
1061 <<
" at (0,0,0) with no rotation";
1081 <<
convertRadToDeg(alpha1) <<
" and with " << pgonZ.size() <<
" sections";
1082 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
1084 <<
"\tRmax = " << pgonRmax[
ii];
1093 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " <<
log.name() <<
" Number " <<
i <<
" positioned in " 1094 << mother.
name() <<
" at (0,0,0) with no " 1113 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: \t\tInside detector " <<
id <<
"...";
1128 double dx1, dx2, shiftX;
1147 <<
" of dimensions " << dx1 <<
", " << wid <<
", " <<
dz;
1151 double x = shiftX + dx1 -
dx;
1155 <<
" at (" <<
x <<
"," <<
y <<
",0) with no rotation";
1160 <<
" of dimensions " << 0.5 *
getDetTsc(
id) <<
", " << wid <<
", " <<
dz;
1168 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalBarrelAlgo: " << glog.
name() <<
" Number " << copyNo <<
" positioned in " 1169 <<
detector.name() <<
" at (" <<
x <<
"," <<
y <<
",0) with no rotation";
1174 <<
" of dimensions " << dx2 <<
", " << wid <<
", " <<
dz;
1182 <<
" 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