14 #include "CLHEP/Units/GlobalSystemOfUnits.h" 16 #include <CLHEP/Geometry/Transform3D.h> 31 #include "CLHEP/Geometry/Transform3D.h" 36 typedef HepGeom::Point3D<double>
Pt3D;
37 typedef HepGeom::Transform3D
Tf3D;
38 typedef HepGeom::ReflectZ3D
RfZ3D;
39 typedef HepGeom::Translate3D
Tl3D;
40 typedef HepGeom::Rotate3D
Ro3D;
41 typedef HepGeom::RotateZ3D
RoZ3D;
42 typedef HepGeom::RotateY3D
RoY3D;
43 typedef HepGeom::RotateX3D
RoX3D;
45 typedef CLHEP::Hep3Vector
Vec3;
46 typedef CLHEP::HepRotation
Rota;
66 void EEPosSC(
const int iCol,
const int iRow,
DDName EEDeeName);
68 unsigned int EEGetSCType(
const unsigned int iCol,
const unsigned int iRow);
72 std::vector<double>
EEGetSCCtrs(
const int iCol,
const int iRow);
253 LogDebug(
"EcalGeom") <<
"DDEcalEndcapAlgo info: Creating an instance";
331 const pair<std::string, std::string>
temp(
DDSplit(s));
332 if (temp.second.empty()) {
335 return DDName(temp.first, temp.second);
354 const double zFix(
m_zFront - 3172 * mm);
357 for (
unsigned int iC(0); iC != (
unsigned int)
eenSCquad(); ++iC) {
358 const unsigned int iOff(8 * iC);
359 const unsigned int ix((
unsigned int)
eevecEESCCtrs()[iOff + 0]);
360 const unsigned int iy((
unsigned int)
eevecEESCCtrs()[iOff + 1]);
362 assert(ix > 0 && ix < 11 && iy > 0 && iy < 11);
372 for (
unsigned int iC(0); iC != 25; ++iC) {
373 const unsigned int iOff(8 * iC);
374 const unsigned int ix((
unsigned int)
eevecEECRCtrs()[iOff + 0]);
375 const unsigned int iy((
unsigned int)
eevecEECRCtrs()[iOff + 1]);
377 assert(ix > 0 && ix < 6 && iy > 0 && iy < 6);
388 for (
unsigned int isc(0); isc <
eenSCTypes(); ++isc) {
396 for (
int irow =
int(colLimits[2 * icol - 2]); irow <=
int(colLimits[2 * icol - 1]); ++irow) {
400 const unsigned int isctype(
EEGetSCType(icol, irow));
422 100 * isctype + 10 * (icol - 1) + (irow - 1),
441 const string anum(std::to_string(iSCType));
446 const double ffived(45 * deg);
447 const double zerod(0 * deg);
478 const double iFront(aFront - dwall);
479 const double iRear(iFront);
497 const double xyIOff(
iXYOff());
508 const double fac(
eePF45());
510 const double zmm(0 * mm);
516 : (5 == iSCType ?
DDTranslation(-half * fac, -half * fac, zmm)
519 const CLHEP::HepRotationZ cutm(ffived);
541 const double mySign(iSCType < 4 ? +1. : -1.);
543 const DDTranslation extraI(xyIOff + mySign * 2 * mm, xyIOff + mySign * 2 * mm, zIOff);
561 unsigned int iType = 1;
601 static const unsigned int ncol(5);
604 const unsigned int icoffset((iSCType - 1) * ncol - 1);
607 for (
unsigned int icol(1); icol <= ncol; ++icol) {
611 const int imin(0 < ncrcol ? 1 : (0 > ncrcol ? ncol + ncrcol + 1 : 0));
612 const int imax(0 < ncrcol ? ncrcol : (0 > ncrcol ? ncol : 0));
616 for (
int irow(imin); irow <= imax; ++irow) {
626 DDName rname(
"EECrRoC" + std::to_string(icol) +
"R" + std::to_string(irow));
630 100 * iSCType + 10 * (icol - 1) + (irow - 1),
double eeSCHLength() const
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
DDName cutBoxName() const
DDTranslation m_cryFCtr[5][5]
HepGeom::Point3D< double > Pt3D
void execute(DDCompactView &cpv) override
const DDTranslation & scrRCtr(unsigned int iRow, unsigned int iCol) const
DDMaterial ddmat(const std::string &s) const
const std::vector< double > & eevecEESCCtrs() const
DDName addTmp(DDName aName) const
DDMaterial is used to define and access material information.
double eeSCEFront() const
void EEPositionCRs(const DDName &pName, const DDTranslation &offset, const int iSCType, DDCompactView &cpv)
DDTranslation m_scrRCtr[10][10]
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
DDName envName(unsigned int i) const
unsigned int EEGetSCType(const unsigned int iCol, const unsigned int iRow)
DDName is used to identify DDD entities uniquely.
HepGeom::Translate3D Tl3D
static std::string & ns()
void moveto(const DDTranslation &frontCentre, const DDTranslation &rearCentre)
Compact representation of the geometrical detector hierarchy.
double eeSCELength() const
double eeSCALength() const
HepGeom::ReflectZ3D RfZ3D
A DDSolid represents the shape of a part.
DDRotation myrot(const std::string &s, const DDRotationMatrix &r) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
double eenSCCutaway() const
Represents a uniquely identifyable rotation matrix.
std::string m_idNameSpace
EcalTrapezoidParameters Trap
std::vector< double > m_vecEESCLims
const std::vector< double > & vecEESCLims() const
void EEPosSC(const int iCol, const int iRow, DDName EEDeeName)
double eeCrysLength() const
~DDEcalEndcapAlgo() override
const std::vector< double > & eevecEESCProf() const
DDMaterial eeWallMat() const
double eeCrysRear() const
std::vector< double > EEGetSCCtrs(const int iCol, const int iRow)
const std::string fullname() const
HepGeom::Transform3D Tf3D
DDTranslation m_scrFCtr[10][10]
DDName ddname(const std::string &s) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
double eeCrysFront() const
const DDTranslation & cryRCtr(unsigned int iRow, unsigned int iCol) const
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)
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 DDTranslation & cryFCtr(unsigned int iRow, unsigned int iCol) const
DDMaterial eeCrysMat() const
const std::vector< double > & eevecEECRCtrs() const
const std::string & idNameSpace() const
std::vector< double > m_vecEEShape
DDTranslation m_cryRCtr[5][5]
DDMaterial eeQuaMat() const
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
std::vector< double > m_vecEESCCtrs
double eenColumns() const
double eeSCAFront() const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::vector< double > m_vecEECRCtrs
void translate(const DDTranslation &trans)
const G4String rname[NREG]
DDName intName(unsigned int i) const
const DDTranslation & scrFCtr(unsigned int iRow, unsigned int iCol) const
double eenSCTypes() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
#define DEFINE_EDM_PLUGIN(factory, type, name)
const std::vector< double > & eevecEESCCutaway() const
void EECreateSC(const unsigned int iSCType, DDCompactView &cpv)
DDTranslation centrePos()
DDRotationMatrix rotation()
const std::vector< double > & eevecEEShape() const
const std::vector< double > * m_cutParms
DDName alvName(unsigned int i) const
std::vector< double > m_vecEESCCutaway
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
const std::string & name() const
Returns the name.
DDName EEGetSCName(const int iCol, const int iRow)
std::vector< double > m_vecEESCProf