|
|
Go to the documentation of this file.
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";
double getDetT21(unsigned int i) const
double getDetdP1(unsigned int i) const
std::vector< double > detT21
std::vector< double > layerT1
double getLayerAlpha(unsigned i) const
const std::string & getSideAbsName(unsigned int i) const
int getNsectortot() const
double getAbsorbT(unsigned int i) const
void execute(DDCompactView &cpv) override
void constructGeneralVolume(DDCompactView &cpv)
const std::string & getAbsorbMat(unsigned int i) const
std::vector< double > detWidth2
DDName is used to identify DDD entities uniquely.
std::vector< double > detdP2
double getRmax(unsigned int i) const
std::vector< double > layerGap
const std::string & getDetMatPl() const
constexpr NumType convertRadToDeg(NumType radians)
double getDetT22(unsigned int i) const
double getDetWidth1(unsigned int i) const
std::string formatAsDegreesInInteger(double radianVal)
std::vector< double > layerAlpha
double getSideT(unsigned int i) const
std::vector< std::string > sideAbsName
std::vector< std::string > sideAbsMat
std::vector< int > layerAbsorb
std::vector< double > sideD
std::vector< double > absorbT
double getMidAbsW(unsigned int i) const
U second(std::pair< T, U > const &p)
std::vector< double > layerT2
std::vector< double > detTsc
std::vector< std::string > absorbName
int getLayerAbsorb(unsigned int i) const
std::vector< double > midW
std::vector< std::string > midName
std::vector< double > detT22
double getMidAbsT(unsigned int i) const
double getMiddleD() const
std::vector< std::string > sideMat
std::vector< double > sideT
double getLayerT1(unsigned i) const
int getLayerId(unsigned i) const
const std::string & getMidAbsMat(unsigned int i) const
double getDetT12(unsigned int i) const
DDLogicalPart constructMidLayer(const DDLogicalPart &laylog, const std::string &nm, double rin, double alpha, DDCompactView &cpv)
DDMaterial is used to define and access material information.
std::vector< std::string > midMat
double getAbsorbD(unsigned int i) const
double getLayerGap(unsigned int i) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
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)
Compact representation of the geometrical detector hierarchy.
std::vector< int > detPosY
const std::string & getLayerLabel(unsigned i) const
double getDetdP2(unsigned int i) const
double getSideAbsW(unsigned int i) const
Geom::Theta< T > theta() const
std::vector< int > detType
#define DEFINE_EDM_PLUGIN(factory, type, name)
double getLayerWidth(unsigned i) const
std::vector< double > zoff
std::vector< double > absorbD
std::vector< double > ttheta
std::vector< double > theta
void constructInsideDetectors(const DDLogicalPart &detector, const std::string &name, int id, double dx, double dy, double dz, int type, DDCompactView &cpv)
std::vector< double > layerWidth
double getSideD(unsigned int i) const
double getLayerT2(unsigned i) const
std::vector< double > layerD2
void constructInsideSector(const DDLogicalPart §or, DDCompactView &cpv)
std::vector< double > detT11
const std::string & getDetMatSc() const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
double getZoff(unsigned int i) const
Tan< T >::type tan(const T &t)
std::vector< double > rmax
const std::string & getSideMat(unsigned int i) const
std::vector< std::string > absorbMat
std::vector< double > layerD1
std::vector< double > detT12
std::vector< double > midT
const std::string & getDetMat() const
std::vector< double > detdP1
const std::string & getMiddleMat() const
std::vector< double > detWidth1
const std::string & getLayerMaterial(unsigned i) const
DDLogicalPart constructSideLayer(const DDLogicalPart &laylog, const std::string &nm, int nAbs, double rin, double alpha, DDCompactView &cpv)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::vector< double > sideAbsW
const std::string & getAbsorbName(unsigned int i) const
int getDetPosY(unsigned int i) const
int getMidAbsorber() const
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)
double getDetT11(unsigned int i) const
Log< level::Info, true > LogVerbatim
static std::string & ns()
double getTanTheta(unsigned int i) const
int getSideAbsorber() const
~DDHCalBarrelAlgo() override
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
std::vector< std::string > layerLabel
double getLayerD2(unsigned i) const
double getTheta(unsigned int i) const
const std::string & getGenMaterial() const
const std::string & getSideAbsMat(unsigned int i) const
double getLayerD1(unsigned i) const
static AlgebraicMatrix initialize()
Abs< T >::type abs(const T &t)
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
const std::string & getMidAbsName(unsigned int i) const
double getDetWidth2(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.
int getDetType(unsigned int i) const
static constexpr float d1
std::vector< std::string > layerMat
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)
std::vector< int > layerId
double getDetTsc(unsigned int i) const
double getMiddleW() const