76 int getLayer(
unsigned int i,
unsigned int j)
const;
77 double getThick(
unsigned int i)
const {
return thick[
i]; }
78 double getTrim(
unsigned int i,
unsigned int j)
const;
86 int getPhi()
const {
return phiSections; }
110 void parameterLayer(
int iphi,
129 void parameterLayer0(
int mod,
308 rotns = sArgs[
"RotNameSpace"];
312 zEnd = nArgs[
"ZEnd"];
318 ziDip = nArgs[
"ZiDip"];
321 double gap = nArgs[
"Gap"];
322 double z1 = nArgs[
"Z1"];
323 double r1 = nArgs[
"R1"];
324 rout = nArgs[
"Rout"];
326 drEnd = nArgs[
"DrEnd"];
327 double etamin = nArgs[
"Etamin"];
333 <<
", " <<
nsectortot <<
"\tEndcaps " <<
nEndcap <<
"\tRotation matrix for half " 337 <<
" z1 " <<
z1 <<
"\n\tr1 " <<
r1 <<
" rout " <<
rout <<
" HeboxDepth " <<
heboxDepth 355 <<
"\triKink " <<
riKink <<
"\triDip " <<
riDip <<
"\n\troDip " <<
roDip <<
"\tRotation " 369 modName = vsArgs[
"ModuleName"];
370 modMat = vsArgs[
"ModuleMat"];
373 thick = vArgs[
"ModuleThick"];
440 <<
"\tScint.Thick " <<
scintT[
i];
520 idName = sArgs[
"MotherName"];
549 edm::LogVerbatim(
"HCalGeom") <<
"<<== End of DDHCalEndcapAlgo construction ...";
561 for (
int i = 0;
i < 3;
i++)
584 std::vector<double> pgonZ, pgonRmin, pgonRmax;
603 pgonRmax.emplace_back(
getRout());
606 pgonRmax.emplace_back(
getRout());
625 << pgonZ.size() <<
" sections";
626 for (
unsigned int i = 0;
i < pgonZ.size();
i++)
627 edm::LogVerbatim(
"HCalGeom") <<
"\t\tZ = " << pgonZ[
i] <<
"\tRmin = " << pgonRmin[
i] <<
"\tRmax = " << pgonRmax[
i];
639 << parentName <<
" at " << r0 <<
" with " <<
rot;
648 <<
"positioned in " << parentName <<
" at " << r0 <<
" with " <<
rot;
654 std::vector<double> pgonZMod, pgonRminMod, pgonRmaxMod;
655 for (
unsigned int i = 0;
i < (pgonZ.size() - 1);
i++) {
657 pgonRminMod.emplace_back(pgonRmin[
i]);
658 pgonRmaxMod.emplace_back(pgonRmax[
i]);
667 << pgonZMod.size() <<
" sections ";
668 for (
unsigned int i = 0;
i < pgonZMod.size();
i++)
669 edm::LogVerbatim(
"HCalGeom") <<
"\t\tZ = " << pgonZMod[
i] <<
"\tRmin = " << pgonRminMod[
i]
670 <<
"\tRmax = " << pgonRmaxMod[
i];
678 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalEndcapAlgo: " << genlogich.
name() <<
" number 1 positioned in " 679 << genlogic.
name() <<
" at (0,0," << -
getDzShift() <<
") with no rotation";
690 for (
unsigned int i = 0;
i < pgonZMod.size();
i++)
691 edm::LogVerbatim(
"HCalGeom") <<
"\t\tZ = " << pgonZMod[
i] <<
"\tRmin = " << pgonRminMod[
i]
692 <<
"\tRmax = " << pgonRmaxMod[
i];
706 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalEndcapAlgo: Creating a new rotation " << rotstr <<
"\t 90," 716 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalEndcapAlgo: " << seclogic.
name() <<
" number " <<
ii + 1 <<
" positioned in " 726 std::vector<double> pgonZBack, pgonRminBack, pgonRmaxBack;
730 pgonZBack.emplace_back(
getZEnd());
740 << pgonZBack.size() <<
" sections";
741 for (
unsigned int i = 0;
i < pgonZBack.size();
i++)
742 edm::LogVerbatim(
"HCalGeom") <<
"\t\tZ = " << pgonZBack[
i] <<
"\tRmin = " << pgonRminBack[
i]
743 <<
"\tRmax = " << pgonRmaxBack[
i];
753 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalEndcapAlgo: " << glog.
name() <<
" number 1 positioned in " << genlogic.
name()
754 <<
" at (0,0,0) with no rotation";
777 std::vector<double> pgonZ, pgonRmin, pgonRmax;
780 pgonZ.emplace_back(zf);
785 pgonRmax.emplace_back(
getRout());
794 pgonRmax.emplace_back(
getRout());
795 pgonZ.emplace_back(pgonZ[1] + deltaz);
796 pgonRmin.emplace_back(pgonRmin[1]);
811 for (
unsigned int k = 0;
k < pgonZ.size();
k++)
813 <<
"\tRmax = " << pgonRmax[
k];
821 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalEndcapAlgo: " << glog.
name() <<
" number " <<
i + 1 <<
" positioned in " 822 <<
sector.name() <<
" at (0,0,0) with no rotation";
868 yh = 0.5 * (
rout - rin);
871 xpos = 0.5 * (rin +
rout);
872 ypos = 0.5 * (bl + tl);
873 zpos = 0.5 * (zi + zo);
886 <<
" Position " << xpos <<
" " << ypos <<
" " << zpos;
914 edm::LogVerbatim(
"HCalGeom") <<
"Input " <<
iphi <<
" Front " << rinF <<
" " << routF <<
" " << zi <<
" Back " << rinB
918 yh1 = 0.5 * (routF - rinB);
921 yh2 = 0.5 * (routF - rinB);
924 double dx = 0.25 * (bl2 + tl2 - bl1 - tl1);
925 double dy = 0.5 * (rinB + routF - rinB - routF);
926 xpos = 0.25 * (rinB + routF + rinB + routF);
927 ypos = 0.25 * (bl2 + tl2 + bl1 + tl1);
928 zpos = 0.5 * (zi + zo);
938 theta = atan(
r / (zo - zi));
942 edm::LogVerbatim(
"HCalGeom") <<
"Output Dimensions " << yh1 <<
" " << bl1 <<
" " << tl1 <<
" " << yh2 <<
" " << bl2
965 double xpos, ypos, zpos;
969 double yh, bl, tl, alp;
973 DDSolidFactory::trap(
DDName(
name,
idNameSpace), 0.5 *
getLayerT(
layer), 0, 0, yh, bl, tl, alp, yh, bl, tl, alp);
977 <<
" of dimensions " << 0.5 *
getLayerT(
layer) <<
", 0, 0, " << yh <<
", " << bl
978 <<
", " << tl <<
", " <<
convertRadToDeg(alp) <<
", " << yh <<
", " << bl <<
", " << tl
989 <<
" positioned in " <<
module.name() <<
" at " <<
r1 <<
" with " <<
rot;
1001 double rinF, routF, rinB, routB;
1015 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalEndcapAlgo: Module " <<
mod <<
" Front " << zi <<
", " << rinF <<
", " << routF
1016 <<
" Back " << zo <<
", " << rinB <<
", " << routB;
1019 double yh1, bl1, tl1, yh2, bl2, tl2,
theta,
phi, alp;
1020 parameterLayer(0, rinF, routF, rinB, routB, zi, zo, yh1, bl1, tl1, yh2, bl2, tl2, alp,
theta,
phi, xpos, ypos, zpos);
1024 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalEndcapAlgo: Trim " <<
fact <<
" Param " << yh1 <<
", " << bl1 <<
", " << tl1
1025 <<
", " << yh2 <<
", " << bl2 <<
", " << tl2;
1035 DDName(
name,
idNameSpace), 0.5 *
getThick(
mod),
theta,
phi, yh1, bl1, tl1, alp, yh2, bl2, tl2, alp);
1040 <<
convertRadToDeg(alp) <<
", " << yh2 <<
", " << bl2 <<
", " << tl2 <<
", " 1051 <<
" at " <<
r2 <<
" with " <<
rot;
1097 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalEndcapAlgo: Layer " <<
i <<
" Phi " <<
iphi <<
" Front " << ziAir <<
", " 1098 << rinF <<
", " << routF <<
" Back " << zo <<
", " << rinB <<
", " << routB;
1101 double yh1, bl1, tl1, yh2, bl2, tl2,
theta,
phi, alp;
1102 double xpos, ypos, zpos;
1104 iphi, rinF, routF, rinB, routB, ziAir, zo, yh1, bl1, tl1, yh2, bl2, tl2, alp,
theta,
phi, xpos, ypos, zpos);
1108 DDName(
name,
idNameSpace), 0.5 *
getThick(
mod),
theta,
phi, yh1, bl1, tl1, alp, yh2, bl2, tl2, alp);
1114 <<
convertRadToDeg(alp) <<
", " << yh2 <<
", " << bl2 <<
", " << tl2 <<
", " 1125 <<
" positioned in " <<
module.name() <<
" at " <<
r1 <<
" with " <<
rot;
1134 DDName(
name,
idNameSpace), 0.5 *
getLayerT(
layer), 0, 0, yh, bl, tl, alp, yh, bl, tl, alp);
1138 <<
" of dimensions " << 0.5 *
getLayerT(
layer) <<
", 0, 0, " << yh <<
", " << bl
1139 <<
", " << tl <<
", " <<
convertRadToDeg(alp) <<
", " << yh <<
", " << bl <<
", " 1145 ypos = 0.5 * (routF + rinB) - xpos;
1151 <<
" positioned in " << glog.
name() <<
" at " <<
r2 <<
" with no rotation";
1177 DDSolid solid =
DDSolidFactory::trap(
DDName(
name,
idNameSpace), 0.5 *
dz, 0, 0, yh, bl, tl, alp, yh, bl, tl, alp);
1181 <<
" of dimensions " << 0.5 *
dz <<
", 0, 0, " << yh <<
", " << bl <<
", " << tl <<
", " 1182 <<
convertRadToDeg(alp) <<
", " << yh <<
", " << bl <<
", " << tl <<
", " 1191 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalEndcapAlgo: " << glog.name() <<
" number " <<
id <<
" positioned in " 1192 <<
detector.name() <<
" at (0,0,0) with no rotation";
Log< level::Info, true > LogVerbatim
static AlgebraicMatrix initialize()
void execute(DDCompactView &cpv) override
double getThick(unsigned int i) const
std::vector< int > layerN2
std::vector< int > modType
std::vector< double > zminBlock
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 > layerN0
std::vector< std::string > modMat
int getSectionModule(unsigned i) const
int getLayerType(unsigned int i) const
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
const std::string & getGenMat() const
DDMaterial is used to define and access material information.
static const double slope[3]
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
double getDzShift() const
void constructInsideSector(const DDLogicalPart §or, DDCompactView &cpv)
double getZiL0Nose() const
DDName is used to identify DDD entities uniquely.
std::vector< double > routBlock1
void constructInsideModule(const DDLogicalPart &module, int mod, DDCompactView &cpv)
static std::string & ns()
std::vector< double > zmaxBlock
double getRinKink() const
int getLayer(unsigned int i, unsigned int j) const
const std::string & getModMat(unsigned int i) const
Compact representation of the geometrical detector hierarchy.
double getHeboxDepth() const
std::string formatAsDegreesInInteger(double radianVal)
A DDSolid represents the shape of a part.
std::vector< double > routBlock2
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
std::vector< std::string > layerName
int equipModule(unsigned int i) const
constexpr uint8_t getLayer(uint32_t detId)
void parameterLayer0(int mod, int layer, int iphi, double &yh, double &bl, double &tl, double &alp, double &xpos, double &ypos, double &zcpv)
std::vector< int > layerN1
double getZminBlock(unsigned i) const
void constructScintLayer(const DDLogicalPart &glog, double pDz, double yh, double bl, double tl, double alp, const std::string &name, int id, DDCompactView &cpv)
int getLayerN(unsigned int i) const
std::vector< int > layerN4
const std::string & getPhiName(unsigned int i) const
double getZmaxBlock(unsigned i) const
double getRoutDip() const
std::vector< int > sectionModule
Tan< T >::type tan(const T &t)
double getZiL0Body() const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< double > rinBlock1
double getRinBlock2(unsigned i) const
std::vector< std::string > modName
std::vector< int > layerN5
~DDHCalEndcapAlgo() override
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
std::vector< int > eModule
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< int > layerType
std::vector< int > layerN
int getNsectortot() const
double getRoutBlock1(unsigned i) const
double getTrim(unsigned int i, unsigned int j) const
void constructGeneralVolume(DDCompactView &cpv)
double getRinBlock1(unsigned i) const
void constructInsideModule0(const DDLogicalPart &module, int mod, DDCompactView &cpv)
const std::string & getRotMat() const
double getLayerT(unsigned int i) const
std::vector< double > rinBlock2
std::vector< double > trimRight
double getZShiftHac2() const
double getScintT(unsigned int i) const
const std::string & getScintMat() const
const std::string & getRotation() const
const std::string & getModName(unsigned int i) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< int > layerN3
std::vector< std::string > phiName
void parameterLayer(int iphi, double rinF, double routF, double rinB, double routB, double zi, double zo, double &yh1, double &bl1, double &tl1, double &yh2, double &bl2, double &tl2, double &alp, double &theta, double &phi, double &xpos, double &ypos, double &zcpv)
std::vector< double > thick
const std::string & getAbsMat() const
T mod(const T &a, const T &b)
int getModType(unsigned int i) const
double getRoutBlock2(unsigned i) const
std::vector< double > scintT
std::vector< double > layerT
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
const std::string & getLayerName(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)
const std::string & getPlastMat() const
MPlex< T, D1, D2, N > atan2(const MPlex< T, D1, D2, N > &y, const MPlex< T, D1, D2, N > &x)
std::vector< double > trimLeft