CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
DDEcalEndcapAlgo Class Reference
Inheritance diagram for DDEcalEndcapAlgo:

Public Types

typedef HepGeom::Point3D< double > Pt3D
 
typedef HepGeom::ReflectZ3D RfZ3D
 
typedef HepGeom::Rotate3D Ro3D
 
typedef CLHEP::HepRotation Rota
 
typedef HepGeom::RotateX3D RoX3D
 
typedef HepGeom::RotateY3D RoY3D
 
typedef HepGeom::RotateZ3D RoZ3D
 
typedef HepGeom::Transform3D Tf3D
 
typedef HepGeom::Translate3D Tl3D
 
typedef EcalTrapezoidParameters Trap
 
typedef CLHEP::Hep3Vector Vec3
 

Public Member Functions

DDName addTmp (DDName aName) const
 
DDName alvName (unsigned int i) const
 
const DDTranslationcryFCtr (unsigned int iRow, unsigned int iCol) const
 
DDName cryName () const
 
const DDTranslationcryRCtr (unsigned int iRow, unsigned int iCol) const
 
DDName cutBoxName () const
 
 DDEcalEndcapAlgo ()
 
DDMaterial ddmat (const std::string &s) const
 
DDName ddname (const std::string &s) const
 
void EECreateCR ()
 
void EECreateSC (const unsigned int iSCType, DDCompactView &cpv)
 
double eeCrysFront () const
 
double eeCrysLength () const
 
DDMaterial eeCrysMat () const
 
double eeCrysRear () const
 
std::vector< double > EEGetSCCtrs (const int iCol, const int iRow)
 
DDName EEGetSCName (const int iCol, const int iRow)
 
unsigned int EEGetSCType (const unsigned int iCol, const unsigned int iRow)
 
DDMaterial eeMat () const
 
double eenColumns () const
 
double eenCRSC () const
 
double eenSCCutaway () const
 
double eenSCquad () const
 
double eenSCTypes () const
 
double eePF45 () const
 
double eePFFifth () const
 
double eePFHalf () const
 
void EEPositionCRs (const DDName &pName, const DDTranslation &offset, const int iSCType, DDCompactView &cpv)
 
void EEPosSC (const int iCol, const int iRow, DDName EEDeeName)
 
DDMaterial eeQuaMat () const
 
DDName eeQuaName () const
 
double eeSCAFront () const
 
double eeSCALength () const
 
double eeSCARear () const
 
double eeSCAWall () const
 
double eeSCEFront () const
 
double eeSCELength () const
 
double eeSCERear () const
 
double eeSCHLength () const
 
double eeSCHSide () const
 
const std::vector< double > & eevecEECRCtrs () const
 
const std::vector< double > & eevecEESCCtrs () const
 
const std::vector< double > & eevecEESCCutaway () const
 
const std::vector< double > & eevecEESCProf () const
 
const std::vector< double > & eevecEEShape () const
 
DDMaterial eeWallMat () const
 
double eezOff () const
 
DDName envName (unsigned int i) const
 
void execute (DDCompactView &cpv) override
 
const std::string & idNameSpace () const
 
double iLength () const
 
void initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
 
DDName intName (unsigned int i) const
 
double iXYOff () const
 
DDRotation myrot (const std::string &s, const DDRotationMatrix &r) const
 
const DDTranslationscrFCtr (unsigned int iRow, unsigned int iCol) const
 
const DDTranslationscrRCtr (unsigned int iRow, unsigned int iCol) const
 
const std::vector< double > & vecEESCLims () const
 
 ~DDEcalEndcapAlgo () override
 

Private Attributes

std::string m_alvName
 
DDTranslation m_cryFCtr [5][5]
 
std::string m_cryName
 
DDTranslation m_cryRCtr [5][5]
 
double m_cryZOff
 
std::string m_cutBoxName
 
const std::vector< double > * m_cutParms
 
double m_EECrysFront
 
double m_EECrysLength
 
std::string m_EECrysMat
 
double m_EECrysRear
 
std::string m_EEMat
 
double m_EEnColumns
 
double m_EEnCRSC
 
double m_EEnSCCutaway
 
double m_EEnSCquad
 
double m_EEnSCTypes
 
std::string m_EEQuaMat
 
std::string m_EEQuaName
 
double m_EESCAFront
 
double m_EESCALength
 
double m_EESCARear
 
double m_EESCAWall
 
double m_EESCEFront
 
double m_EESCELength
 
double m_EESCERear
 
double m_EESCHLength
 
double m_EESCHSide
 
std::string m_EEWallMat
 
double m_EEzOff
 
std::string m_envName
 
std::string m_idNameSpace
 
double m_iLength
 
std::string m_intName
 
double m_iXYOff
 
double m_PF45
 
double m_PFfifth
 
double m_PFhalf
 
DDTranslation m_scrFCtr [10][10]
 
DDTranslation m_scrRCtr [10][10]
 
std::vector< double > m_vecEECRCtrs
 
std::vector< double > m_vecEESCCtrs
 
std::vector< double > m_vecEESCCutaway
 
std::vector< double > m_vecEESCLims
 
std::vector< double > m_vecEESCProf
 
std::vector< double > m_vecEEShape
 
double m_zFront
 

Detailed Description

Definition at line 37 of file DDEcalEndcapAlgo.cc.

Member Typedef Documentation

◆ Pt3D

Definition at line 40 of file DDEcalEndcapAlgo.cc.

◆ RfZ3D

typedef HepGeom::ReflectZ3D DDEcalEndcapAlgo::RfZ3D

Definition at line 42 of file DDEcalEndcapAlgo.cc.

◆ Ro3D

typedef HepGeom::Rotate3D DDEcalEndcapAlgo::Ro3D

Definition at line 44 of file DDEcalEndcapAlgo.cc.

◆ Rota

typedef CLHEP::HepRotation DDEcalEndcapAlgo::Rota

Definition at line 50 of file DDEcalEndcapAlgo.cc.

◆ RoX3D

typedef HepGeom::RotateX3D DDEcalEndcapAlgo::RoX3D

Definition at line 47 of file DDEcalEndcapAlgo.cc.

◆ RoY3D

typedef HepGeom::RotateY3D DDEcalEndcapAlgo::RoY3D

Definition at line 46 of file DDEcalEndcapAlgo.cc.

◆ RoZ3D

typedef HepGeom::RotateZ3D DDEcalEndcapAlgo::RoZ3D

Definition at line 45 of file DDEcalEndcapAlgo.cc.

◆ Tf3D

typedef HepGeom::Transform3D DDEcalEndcapAlgo::Tf3D

Definition at line 41 of file DDEcalEndcapAlgo.cc.

◆ Tl3D

typedef HepGeom::Translate3D DDEcalEndcapAlgo::Tl3D

Definition at line 43 of file DDEcalEndcapAlgo.cc.

◆ Trap

Definition at line 39 of file DDEcalEndcapAlgo.cc.

◆ Vec3

typedef CLHEP::Hep3Vector DDEcalEndcapAlgo::Vec3

Definition at line 49 of file DDEcalEndcapAlgo.cc.

Constructor & Destructor Documentation

◆ DDEcalEndcapAlgo()

DDEcalEndcapAlgo::DDEcalEndcapAlgo ( )

Definition at line 213 of file DDEcalEndcapAlgo.cc.

214  : m_idNameSpace(""),
215  m_EEMat(""),
216  m_EEzOff(0),
217  m_EEQuaName(""),
218  m_EEQuaMat(""),
219  m_EECrysMat(""),
220  m_EEWallMat(""),
221  m_EECrysLength(0),
222  m_EECrysRear(0),
223  m_EECrysFront(0),
224  m_EESCELength(0),
225  m_EESCERear(0),
226  m_EESCEFront(0),
227  m_EESCALength(0),
228  m_EESCARear(0),
229  m_EESCAFront(0),
230  m_EESCAWall(0),
231  m_EESCHLength(0),
232  m_EESCHSide(0),
233  m_EEnSCTypes(0),
234  m_vecEESCProf(),
235  m_EEnColumns(0),
236  m_vecEEShape(),
237  m_EEnSCCutaway(0),
239  m_EEnSCquad(0),
240  m_vecEESCCtrs(),
241  m_EEnCRSC(0),
242  m_vecEECRCtrs(),
243  m_cutParms(nullptr),
244  m_cutBoxName(""),
245  m_envName(""),
246  m_alvName(""),
247  m_intName(""),
248  m_cryName(""),
249  m_PFhalf(0),
250  m_PFfifth(0),
251  m_PF45(0),
252  m_vecEESCLims(),
253  m_iLength(0),
254  m_iXYOff(0),
255  m_cryZOff(0),
256  m_zFront(0) {
257  edm::LogVerbatim("EcalGeomX") << "DDEcalEndcapAlgo info: Creating an instance";
258 }
Log< level::Info, true > LogVerbatim
std::string m_cutBoxName
std::string m_EEQuaMat
std::string m_idNameSpace
std::vector< double > m_vecEESCLims
std::string m_EECrysMat
std::string m_EEQuaName
std::vector< double > m_vecEEShape
std::vector< double > m_vecEESCCtrs
std::vector< double > m_vecEECRCtrs
std::string m_EEWallMat
const std::vector< double > * m_cutParms
std::vector< double > m_vecEESCCutaway
std::vector< double > m_vecEESCProf

◆ ~DDEcalEndcapAlgo()

DDEcalEndcapAlgo::~DDEcalEndcapAlgo ( )
override

Definition at line 260 of file DDEcalEndcapAlgo.cc.

260 {}

Member Function Documentation

◆ addTmp()

DDName DDEcalEndcapAlgo::addTmp ( DDName  aName) const
inline

Definition at line 128 of file DDEcalEndcapAlgo.cc.

References ddname(), and DDName::name().

Referenced by EECreateSC().

128 { return ddname(aName.name() + "Tmp"); }
DDName ddname(const std::string &s) const
const std::string & name() const
Returns the name.
Definition: DDName.cc:41

◆ alvName()

DDName DDEcalEndcapAlgo::alvName ( unsigned int  i) const
inline

Definition at line 124 of file DDEcalEndcapAlgo.cc.

References ddname(), mps_fire::i, m_alvName, and to_string().

Referenced by EECreateSC().

124 { return ddname(m_alvName + std::to_string(i)); }
DDName ddname(const std::string &s) const
static std::string to_string(const XMLCh *ch)

◆ cryFCtr()

const DDTranslation& DDEcalEndcapAlgo::cryFCtr ( unsigned int  iRow,
unsigned int  iCol 
) const
inline

Definition at line 130 of file DDEcalEndcapAlgo.cc.

References m_cryFCtr.

Referenced by EEPositionCRs().

130 { return m_cryFCtr[iRow - 1][iCol - 1]; }
DDTranslation m_cryFCtr[5][5]

◆ cryName()

DDName DDEcalEndcapAlgo::cryName ( ) const
inline

Definition at line 126 of file DDEcalEndcapAlgo.cc.

References ddname(), and m_cryName.

Referenced by EECreateCR(), and EEPositionCRs().

126 { return ddname(m_cryName); }
DDName ddname(const std::string &s) const

◆ cryRCtr()

const DDTranslation& DDEcalEndcapAlgo::cryRCtr ( unsigned int  iRow,
unsigned int  iCol 
) const
inline

Definition at line 132 of file DDEcalEndcapAlgo.cc.

References m_cryRCtr.

Referenced by EEPositionCRs().

132 { return m_cryRCtr[iRow - 1][iCol - 1]; }
DDTranslation m_cryRCtr[5][5]

◆ cutBoxName()

DDName DDEcalEndcapAlgo::cutBoxName ( ) const
inline

Definition at line 118 of file DDEcalEndcapAlgo.cc.

References ddname(), and m_cutBoxName.

Referenced by EECreateSC(), and execute().

118 { return ddname(m_cutBoxName); }
std::string m_cutBoxName
DDName ddname(const std::string &s) const

◆ ddmat()

DDMaterial DDEcalEndcapAlgo::ddmat ( const std::string &  s) const

Definition at line 334 of file DDEcalEndcapAlgo.cc.

References ddname(), and alignCSCRings::s.

Referenced by eeCrysMat(), eeMat(), eeQuaMat(), and eeWallMat().

334 { return DDMaterial(ddname(s)); }
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
DDName ddname(const std::string &s) const

◆ ddname()

DDName DDEcalEndcapAlgo::ddname ( const std::string &  s) const

Definition at line 336 of file DDEcalEndcapAlgo.cc.

References DDSplit(), m_idNameSpace, alignCSCRings::s, and groupFilesInBlocks::temp.

Referenced by addTmp(), alvName(), cryName(), cutBoxName(), ddmat(), eeQuaName(), envName(), intName(), and myrot().

336  {
337  const pair<std::string, std::string> temp(DDSplit(s));
338  if (temp.second.empty()) {
339  return DDName(temp.first, m_idNameSpace);
340  } else {
341  return DDName(temp.first, temp.second);
342  }
343 }
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
std::string m_idNameSpace
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3

◆ EECreateCR()

void DDEcalEndcapAlgo::EECreateCR ( )

Definition at line 619 of file DDEcalEndcapAlgo.cc.

References cryName(), eeCrysFront(), eeCrysLength(), eeCrysMat(), eeCrysRear(), DDBase< N, C >::name(), mathSSE::sqrt(), and DDSolidFactory::trap().

Referenced by execute().

619  {
620  // EECreateCR Create endcap crystal logical volume
621 
622 #ifdef EDM_ML_DEBUG
623  edm::LogVerbatim("EcalGeomX") << "EECreateCR: = ";
624 #endif
626  0.5 * eeCrysLength(),
627  atan((eeCrysRear() - eeCrysFront()) / (sqrt(2.) * eeCrysLength())),
628  45. * deg,
629  0.5 * eeCrysFront(),
630  0.5 * eeCrysFront(),
631  0.5 * eeCrysFront(),
632  0. * deg,
633  0.5 * eeCrysRear(),
634  0.5 * eeCrysRear(),
635  0.5 * eeCrysRear(),
636  0. * deg));
637 #ifdef EDM_ML_DEBUG
638  edm::LogVerbatim("EcalGeom") << EECRSolid.name() << " Trap with parameters: " << 0.5 * eeCrysLength() << ":"
639  << (atan((eeCrysRear() - eeCrysFront()) / (sqrt(2.) * eeCrysLength()))) << ":"
640  << 45. * deg << ":" << 0.5 * eeCrysFront() << ":" << 0.5 * eeCrysFront() << ":"
641  << 0.5 * eeCrysFront() << ":" << 0. * deg << ":" << 0.5 * eeCrysRear() << ":"
642  << 0.5 * eeCrysRear() << ":" << 0.5 * eeCrysRear() << ":" << 0. * deg;
643 #endif
644 
645  DDLogicalPart part(cryName(), eeCrysMat(), EECRSolid);
646 }
Log< level::Info, true > LogVerbatim
double eeCrysLength() const
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDName cryName() const
double eeCrysRear() const
T sqrt(T t)
Definition: SSEVec.h:23
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
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)
Definition: DDSolid.cc:609
part
Definition: HCALResponse.h:20
DDMaterial eeCrysMat() const
double eeCrysFront() const

◆ EECreateSC()

void DDEcalEndcapAlgo::EECreateSC ( const unsigned int  iSCType,
DDCompactView cpv 
)

Definition at line 444 of file DDEcalEndcapAlgo.cc.

References addTmp(), alvName(), cutBoxName(), PVValHelper::dxy, PVValHelper::dz, eeCrysRear(), eeMat(), eePF45(), eePFFifth(), eePFHalf(), EEPositionCRs(), eeSCAFront(), eeSCALength(), eeSCARear(), eeSCAWall(), eeSCEFront(), eeSCELength(), eeSCERear(), eeWallMat(), envName(), iLength(), intName(), iXYOff(), m_cutParms, myrot(), DDBase< N, C >::name(), DDCompactView::position(), mathSSE::sqrt(), DDSolidFactory::subtraction(), to_string(), and DDSolidFactory::trap().

Referenced by execute().

445  { // EECreateSCType Create SC logical volume of the given type
446 
447  DDRotation noRot;
448  DDLogicalPart eeSCELog;
449  DDLogicalPart eeSCALog;
450  DDLogicalPart eeSCILog;
451 
452 #ifdef EDM_ML_DEBUG
453  edm::LogVerbatim("EcalGeomX") << "EECreateSC: Creating SC envelope";
454 #endif
455  const string anum(std::to_string(iSCType));
456 
457  const double eFront(0.5 * eeSCEFront());
458  const double eRear(0.5 * eeSCERear());
459  const double eAng(atan((eeSCERear() - eeSCEFront()) / (sqrt(2.) * eeSCELength())));
460  const double ffived(45 * deg);
461  const double zerod(0 * deg);
462  DDSolid eeSCEnv(DDSolidFactory::trap((1 == iSCType ? envName(iSCType) : addTmp(envName(iSCType))),
463  0.5 * eeSCELength(),
464  eAng,
465  ffived,
466  eFront,
467  eFront,
468  eFront,
469  zerod,
470  eRear,
471  eRear,
472  eRear,
473  zerod));
474 #ifdef EDM_ML_DEBUG
475  edm::LogVerbatim("EcalGeom") << eeSCEnv.name() << " Trap with parameters: " << 0.5 * eeSCELength() << ":" << eAng
476  << ffived << ":" << eFront << ":" << eFront << ":" << eFront << ":" << zerod << ":"
477  << eRear << ":" << eRear << ":" << eRear << ":" << zerod;
478 #endif
479 
480  const double aFront(0.5 * eeSCAFront());
481  const double aRear(0.5 * eeSCARear());
482  const double aAng(atan((eeSCARear() - eeSCAFront()) / (sqrt(2.) * eeSCALength())));
483  const DDSolid eeSCAlv(DDSolidFactory::trap((1 == iSCType ? alvName(iSCType) : addTmp(alvName(iSCType))),
484  0.5 * eeSCALength(),
485  aAng,
486  ffived,
487  aFront,
488  aFront,
489  aFront,
490  zerod,
491  aRear,
492  aRear,
493  aRear,
494  zerod));
495 #ifdef EDM_ML_DEBUG
496  edm::LogVerbatim("EcalGeom") << eeSCAlv.name() << " Trap with parameters: " << 0.5 * eeSCALength() << ":" << aAng
497  << ":" << ffived << ":" << aFront << ":" << aFront << ":" << aFront << ":" << zerod
498  << ":" << aRear << ":" << aRear << ":" << aRear << ":" << zerod;
499 #endif
500  const double dwall(eeSCAWall());
501  const double iFront(aFront - dwall);
502  const double iRear(iFront); //aRear - dwall ) ;
503  const double iLen(iLength()); //0.075*eeSCALength() ) ;
504  const DDSolid eeSCInt(DDSolidFactory::trap((1 == iSCType ? intName(iSCType) : addTmp(intName(iSCType))),
505  iLen / 2.,
506  atan((eeSCARear() - eeSCAFront()) / (sqrt(2.) * eeSCALength())),
507  ffived,
508  iFront,
509  iFront,
510  iFront,
511  zerod,
512  iRear,
513  iRear,
514  iRear,
515  zerod));
516 #ifdef EDM_ML_DEBUG
517  edm::LogVerbatim("EcalGeom") << eeSCInt.name() << " Trap with parameters: " << iLen / 2. << ":"
518  << (atan((eeSCARear() - eeSCAFront()) / (sqrt(2.) * eeSCALength()))) << ":" << ffived
519  << ":" << iFront << ":" << iFront << ":" << iFront << ":" << zerod << ":" << iRear << ":"
520  << iRear << ":" << iRear << ":" << zerod;
521 #endif
522  const double dz(-0.5 * (eeSCELength() - eeSCALength()));
523  const double dxy(0.5 * dz * (eeSCERear() - eeSCEFront()) / eeSCELength());
524  const double zIOff(-(eeSCALength() - iLen) / 2.);
525  const double xyIOff(iXYOff());
526 
527  if (1 == iSCType) // standard SC in this block
528  {
529  eeSCELog = DDLogicalPart(envName(iSCType), eeMat(), eeSCEnv);
530  eeSCALog = DDLogicalPart(alvName(iSCType), eeWallMat(), eeSCAlv);
531  eeSCILog = DDLogicalPart(intName(iSCType), eeMat(), eeSCInt);
532  } else // partial SCs this block: create subtraction volumes as appropriate
533  {
534  const double half((*m_cutParms)[0] - eePFHalf() * eeCrysRear());
535  const double fifth((*m_cutParms)[0] + eePFFifth() * eeCrysRear());
536  const double fac(eePF45());
537 
538  const double zmm(0 * mm);
539 
540  DDTranslation cutTra(
541  2 == iSCType ? DDTranslation(zmm, half, zmm)
542  : (3 == iSCType ? DDTranslation(half, zmm, zmm)
543  : (4 == iSCType ? DDTranslation(zmm, -fifth, zmm)
544  : (5 == iSCType ? DDTranslation(-half * fac, -half * fac, zmm)
545  : DDTranslation(-fifth, zmm, zmm)))));
546 
547  const CLHEP::HepRotationZ cutm(ffived);
548 
549  DDRotation cutRot(5 != iSCType ? noRot
550  : myrot("EECry5Rot",
551  DDRotationMatrix(cutm.xx(),
552  cutm.xy(),
553  cutm.xz(),
554  cutm.yx(),
555  cutm.yy(),
556  cutm.yz(),
557  cutm.zx(),
558  cutm.zy(),
559  cutm.zz())));
560 
561  DDSolid eeCutEnv(
562  DDSolidFactory::subtraction(envName(iSCType), addTmp(envName(iSCType)), cutBoxName(), cutTra, cutRot));
563 #ifdef EDM_ML_DEBUG
564  edm::LogVerbatim("EcalGeom") << eeCutEnv.name() << " Subtracted by " << (eeSCERear() / sqrt(2.)) << ":"
565  << (eeSCERear() / sqrt(2.)) << ":" << (eeSCELength() / sqrt(2.));
566 #endif
567  const DDTranslation extra(dxy, dxy, dz);
568 
569  DDSolid eeCutAlv(
570  DDSolidFactory::subtraction(alvName(iSCType), addTmp(alvName(iSCType)), cutBoxName(), cutTra - extra, cutRot));
571 
572 #ifdef EDM_ML_DEBUG
573  edm::LogVerbatim("EcalGeom") << eeCutAlv.name() << " Subtracted by " << (eeSCERear() / sqrt(2.)) << ":"
574  << (eeSCERear() / sqrt(2.)) << ":" << (eeSCELength() / sqrt(2.));
575 #endif
576  const double mySign(iSCType < 4 ? +1. : -1.);
577 
578  const DDTranslation extraI(xyIOff + mySign * 2 * mm, xyIOff + mySign * 2 * mm, zIOff);
579 
580  DDSolid eeCutInt(
581  DDSolidFactory::subtraction(intName(iSCType), addTmp(intName(iSCType)), cutBoxName(), cutTra - extraI, cutRot));
582 #ifdef EDM_ML_DEBUG
583  edm::LogVerbatim("EcalGeom") << eeCutInt.name() << " Subtracted by " << (eeSCERear() / sqrt(2.)) << ":"
584  << (eeSCERear() / sqrt(2.)) << ":" << (eeSCELength() / sqrt(2.));
585 #endif
586 
587  eeSCELog = DDLogicalPart(envName(iSCType), eeMat(), eeCutEnv);
588  eeSCALog = DDLogicalPart(alvName(iSCType), eeWallMat(), eeCutAlv);
589  eeSCILog = DDLogicalPart(intName(iSCType), eeMat(), eeCutInt);
590  }
591 
592  cpv.position(eeSCALog, envName(iSCType), iSCType * 100 + 1, DDTranslation(dxy, dxy, dz), noRot);
593  cpv.position(eeSCILog, alvName(iSCType), iSCType * 100 + 1, DDTranslation(xyIOff, xyIOff, zIOff), noRot);
594 #ifdef EDM_ML_DEBUG
595  edm::LogVerbatim("EEGeom") << eeSCALog.name() << " " << (iSCType * 100 + 1) << " in " << envName(iSCType);
596  edm::LogVerbatim("EEGeom") << eeSCILog.name() << " " << (iSCType * 100 + 1) << " in " << alvName(iSCType);
597  edm::LogVerbatim("EcalGeom") << eeSCALog.name() << " " << (iSCType * 100 + 1) << " in " << envName(iSCType) << " at ("
598  << dxy << ", " << dxy << ", " << dz << ")";
599  edm::LogVerbatim("EcalGeom") << eeSCILog.name() << " " << (iSCType * 100 + 1) << " in " << alvName(iSCType) << " at ("
600  << xyIOff << ", " << xyIOff << ", " << zIOff << ")";
601 #endif
602  DDTranslation croffset(0., 0., 0.);
603  EEPositionCRs(alvName(iSCType), croffset, iSCType, cpv);
604 }
Log< level::Info, true > LogVerbatim
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
DDMaterial eeMat() const
void EEPositionCRs(const DDName &pName, const DDTranslation &offset, const int iSCType, DDCompactView &cpv)
DDRotation myrot(const std::string &s, const DDRotationMatrix &r) const
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
static std::string to_string(const XMLCh *ch)
double eeSCELength() const
DDMaterial eeWallMat() const
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
double eeSCAFront() const
double eeCrysRear() const
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
T sqrt(T t)
Definition: SSEVec.h:23
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
DDName addTmp(DDName aName) const
double eeSCARear() const
double eePFFifth() const
double iLength() 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)
Definition: DDSolid.cc:609
DDName envName(unsigned int i) const
double eePFHalf() const
DDName cutBoxName() const
const N & name() const
Definition: DDBase.h:59
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
Definition: DDSolid.cc:599
double eeSCERear() const
double eeSCEFront() const
DDName intName(unsigned int i) const
double eeSCAWall() const
double eeSCALength() const
const std::vector< double > * m_cutParms
double iXYOff() const
DDName alvName(unsigned int i) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
double eePF45() const

◆ eeCrysFront()

double DDEcalEndcapAlgo::eeCrysFront ( ) const
inline

Definition at line 96 of file DDEcalEndcapAlgo.cc.

References m_EECrysFront.

Referenced by EECreateCR(), and EEPositionCRs().

96 { return m_EECrysFront; }

◆ eeCrysLength()

double DDEcalEndcapAlgo::eeCrysLength ( ) const
inline

Definition at line 94 of file DDEcalEndcapAlgo.cc.

References m_EECrysLength.

Referenced by EECreateCR(), and EEPositionCRs().

94 { return m_EECrysLength; }

◆ eeCrysMat()

DDMaterial DDEcalEndcapAlgo::eeCrysMat ( ) const
inline

Definition at line 91 of file DDEcalEndcapAlgo.cc.

References ddmat(), and m_EECrysMat.

Referenced by EECreateCR().

91 { return ddmat(m_EECrysMat); }
std::string m_EECrysMat
DDMaterial ddmat(const std::string &s) const

◆ eeCrysRear()

double DDEcalEndcapAlgo::eeCrysRear ( ) const
inline

Definition at line 95 of file DDEcalEndcapAlgo.cc.

References m_EECrysRear.

Referenced by EECreateCR(), EECreateSC(), and EEPositionCRs().

95 { return m_EECrysRear; }

◆ EEGetSCCtrs()

std::vector<double> DDEcalEndcapAlgo::EEGetSCCtrs ( const int  iCol,
const int  iRow 
)

◆ EEGetSCName()

DDName DDEcalEndcapAlgo::EEGetSCName ( const int  iCol,
const int  iRow 
)

◆ EEGetSCType()

unsigned int DDEcalEndcapAlgo::EEGetSCType ( const unsigned int  iCol,
const unsigned int  iRow 
)

Definition at line 606 of file DDEcalEndcapAlgo.cc.

References eenSCCutaway(), eevecEESCCutaway(), cuy::ii, and createfilelist::int.

Referenced by execute().

606  {
607  unsigned int iType = 1;
608  for (unsigned int ii = 0; ii < (unsigned int)(eenSCCutaway()); ++ii) {
609  if ((eevecEESCCutaway()[3 * ii] == iCol) && (eevecEESCCutaway()[3 * ii + 1] == iRow)) {
610  iType = int(eevecEESCCutaway()[3 * ii + 2]);
611 #ifdef EDM_ML_DEBUG
612  edm::LogVerbatim("EcalGeomX") << "EEGetSCType: col, row, type = " << iCol << " " << iRow << " " << iType;
613 #endif
614  }
615  }
616  return iType;
617 }
Log< level::Info, true > LogVerbatim
ii
Definition: cuy.py:589
const std::vector< double > & eevecEESCCutaway() const
double eenSCCutaway() const

◆ eeMat()

DDMaterial DDEcalEndcapAlgo::eeMat ( ) const
inline

Definition at line 85 of file DDEcalEndcapAlgo.cc.

References ddmat(), and m_EEMat.

Referenced by EECreateSC().

85 { return ddmat(m_EEMat); }
DDMaterial ddmat(const std::string &s) const

◆ eenColumns()

double DDEcalEndcapAlgo::eenColumns ( ) const
inline

Definition at line 108 of file DDEcalEndcapAlgo.cc.

References m_EEnColumns.

Referenced by execute().

108 { return m_EEnColumns; }

◆ eenCRSC()

double DDEcalEndcapAlgo::eenCRSC ( ) const
inline

Definition at line 111 of file DDEcalEndcapAlgo.cc.

References m_EEnCRSC.

111 { return m_EEnCRSC; }

◆ eenSCCutaway()

double DDEcalEndcapAlgo::eenSCCutaway ( ) const
inline

Definition at line 109 of file DDEcalEndcapAlgo.cc.

References m_EEnSCCutaway.

Referenced by EEGetSCType().

109 { return m_EEnSCCutaway; }

◆ eenSCquad()

double DDEcalEndcapAlgo::eenSCquad ( ) const
inline

Definition at line 110 of file DDEcalEndcapAlgo.cc.

References m_EEnSCquad.

Referenced by execute().

110 { return m_EEnSCquad; }

◆ eenSCTypes()

double DDEcalEndcapAlgo::eenSCTypes ( ) const
inline

Definition at line 107 of file DDEcalEndcapAlgo.cc.

References m_EEnSCTypes.

Referenced by EEPositionCRs(), and execute().

107 { return m_EEnSCTypes; }

◆ eePF45()

double DDEcalEndcapAlgo::eePF45 ( ) const
inline

Definition at line 121 of file DDEcalEndcapAlgo.cc.

References m_PF45.

Referenced by EECreateSC().

121 { return m_PF45; }

◆ eePFFifth()

double DDEcalEndcapAlgo::eePFFifth ( ) const
inline

Definition at line 120 of file DDEcalEndcapAlgo.cc.

References m_PFfifth.

Referenced by EECreateSC().

120 { return m_PFfifth; }

◆ eePFHalf()

double DDEcalEndcapAlgo::eePFHalf ( ) const
inline

Definition at line 119 of file DDEcalEndcapAlgo.cc.

References m_PFhalf.

Referenced by EECreateSC().

119 { return m_PFhalf; }

◆ EEPositionCRs()

void DDEcalEndcapAlgo::EEPositionCRs ( const DDName pName,
const DDTranslation offset,
const int  iSCType,
DDCompactView cpv 
)

Definition at line 648 of file DDEcalEndcapAlgo.cc.

References DDEcalEndcapTrap::centrePos(), cryFCtr(), cryName(), cryRCtr(), eeCrysFront(), eeCrysLength(), eeCrysRear(), eenSCTypes(), eevecEESCProf(), m_cryZOff, DDEcalEndcapTrap::moveto(), myrot(), DDCompactView::position(), rname, DDEcalEndcapTrap::rotation(), and to_string().

Referenced by EECreateSC().

651  {
652  // EEPositionCRs Position crystals within parent supercrystal interior volume
653 
654 #ifdef EDM_ML_DEBUG
655  edm::LogVerbatim("EcalGeomX") << "EEPositionCRs called ";
656 #endif
657  static const unsigned int ncol(5);
658 
659  if (iSCType > 0 && iSCType <= eenSCTypes()) {
660  const unsigned int icoffset((iSCType - 1) * ncol - 1);
661 
662  // Loop over columns of SC
663  for (unsigned int icol(1); icol <= ncol; ++icol) {
664  // Get column limits for this SC type from xml input
665  const int ncrcol((int)eevecEESCProf()[icoffset + icol]);
666 
667  const int imin(0 < ncrcol ? 1 : (0 > ncrcol ? ncol + ncrcol + 1 : 0));
668  const int imax(0 < ncrcol ? ncrcol : (0 > ncrcol ? ncol : 0));
669 
670  if (imax > 0) {
671  // Loop over crystals in this row
672  for (int irow(imin); irow <= imax; ++irow) {
673 #ifdef EDM_ML_DEBUG
674  edm::LogVerbatim("EcalGeomX") << " type, col, row " << iSCType << " " << icol << " " << irow;
675 #endif
676  // Create crystal as a DDEcalEndcapTrap object and calculate rotation and
677  // translation required to position it in the SC.
679 
680  crystal.moveto(cryFCtr(icol, irow), cryRCtr(icol, irow));
681 
682  DDName rname("EECrRoC" + std::to_string(icol) + "R" + std::to_string(irow));
683 
684  cpv.position(cryName(),
685  pName,
686  100 * iSCType + 10 * (icol - 1) + (irow - 1),
687  crystal.centrePos() - DDTranslation(0, 0, m_cryZOff),
688  myrot(rname.fullname(), crystal.rotation()));
689 #ifdef EDM_ML_DEBUG
690  edm::LogVerbatim("EEGeom") << cryName() << " " << (100 * iSCType + 10 * (icol - 1) + (irow - 1)) << " in "
691  << pName;
692  edm::LogVerbatim("EcalGeom") << cryName() << " " << (100 * iSCType + 10 * (icol - 1) + (irow - 1)) << " in "
693  << pName << " at " << (crystal.centrePos() - DDTranslation(0, 0, m_cryZOff));
694 #endif
695  }
696  }
697  }
698  }
699 }
Log< level::Info, true > LogVerbatim
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
const std::vector< double > & eevecEESCProf() const
double eeCrysLength() const
double eenSCTypes() const
DDRotation myrot(const std::string &s, const DDRotationMatrix &r) const
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
static std::string to_string(const XMLCh *ch)
DDName cryName() const
double eeCrysRear() const
const DDTranslation & cryRCtr(unsigned int iRow, unsigned int iCol) const
const DDTranslation & cryFCtr(unsigned int iRow, unsigned int iCol) const
const G4String rname[NREG]
double eeCrysFront() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7

◆ EEPosSC()

void DDEcalEndcapAlgo::EEPosSC ( const int  iCol,
const int  iRow,
DDName  EEDeeName 
)

◆ eeQuaMat()

DDMaterial DDEcalEndcapAlgo::eeQuaMat ( ) const
inline

Definition at line 89 of file DDEcalEndcapAlgo.cc.

References ddmat(), and m_EEQuaMat.

89 { return ddmat(m_EEQuaMat); }
std::string m_EEQuaMat
DDMaterial ddmat(const std::string &s) const

◆ eeQuaName()

DDName DDEcalEndcapAlgo::eeQuaName ( ) const
inline

Definition at line 88 of file DDEcalEndcapAlgo.cc.

References ddname(), and m_EEQuaName.

Referenced by execute().

88 { return ddname(m_EEQuaName); }
DDName ddname(const std::string &s) const
std::string m_EEQuaName

◆ eeSCAFront()

double DDEcalEndcapAlgo::eeSCAFront ( ) const
inline

Definition at line 102 of file DDEcalEndcapAlgo.cc.

References m_EESCAFront.

Referenced by EECreateSC().

102 { return m_EESCAFront; }

◆ eeSCALength()

double DDEcalEndcapAlgo::eeSCALength ( ) const
inline

Definition at line 100 of file DDEcalEndcapAlgo.cc.

References m_EESCALength.

Referenced by EECreateSC().

100 { return m_EESCALength; }

◆ eeSCARear()

double DDEcalEndcapAlgo::eeSCARear ( ) const
inline

Definition at line 101 of file DDEcalEndcapAlgo.cc.

References m_EESCARear.

Referenced by EECreateSC().

101 { return m_EESCARear; }

◆ eeSCAWall()

double DDEcalEndcapAlgo::eeSCAWall ( ) const
inline

Definition at line 103 of file DDEcalEndcapAlgo.cc.

References m_EESCAWall.

Referenced by EECreateSC().

103 { return m_EESCAWall; }

◆ eeSCEFront()

double DDEcalEndcapAlgo::eeSCEFront ( ) const
inline

Definition at line 99 of file DDEcalEndcapAlgo.cc.

References m_EESCEFront.

Referenced by EECreateSC(), and execute().

99 { return m_EESCEFront; }

◆ eeSCELength()

double DDEcalEndcapAlgo::eeSCELength ( ) const
inline

Definition at line 97 of file DDEcalEndcapAlgo.cc.

References m_EESCELength.

Referenced by EECreateSC(), and execute().

97 { return m_EESCELength; }

◆ eeSCERear()

double DDEcalEndcapAlgo::eeSCERear ( ) const
inline

Definition at line 98 of file DDEcalEndcapAlgo.cc.

References m_EESCERear.

Referenced by EECreateSC(), and execute().

98 { return m_EESCERear; }

◆ eeSCHLength()

double DDEcalEndcapAlgo::eeSCHLength ( ) const
inline

Definition at line 104 of file DDEcalEndcapAlgo.cc.

References m_EESCHLength.

104 { return m_EESCHLength; }

◆ eeSCHSide()

double DDEcalEndcapAlgo::eeSCHSide ( ) const
inline

Definition at line 105 of file DDEcalEndcapAlgo.cc.

References m_EESCHSide.

105 { return m_EESCHSide; }

◆ eevecEECRCtrs()

const std::vector<double>& DDEcalEndcapAlgo::eevecEECRCtrs ( ) const
inline

Definition at line 116 of file DDEcalEndcapAlgo.cc.

References m_vecEECRCtrs.

Referenced by execute().

116 { return m_vecEECRCtrs; }
std::vector< double > m_vecEECRCtrs

◆ eevecEESCCtrs()

const std::vector<double>& DDEcalEndcapAlgo::eevecEESCCtrs ( ) const
inline

Definition at line 115 of file DDEcalEndcapAlgo.cc.

References m_vecEESCCtrs.

Referenced by execute().

115 { return m_vecEESCCtrs; }
std::vector< double > m_vecEESCCtrs

◆ eevecEESCCutaway()

const std::vector<double>& DDEcalEndcapAlgo::eevecEESCCutaway ( ) const
inline

Definition at line 114 of file DDEcalEndcapAlgo.cc.

References m_vecEESCCutaway.

Referenced by EEGetSCType().

114 { return m_vecEESCCutaway; }
std::vector< double > m_vecEESCCutaway

◆ eevecEESCProf()

const std::vector<double>& DDEcalEndcapAlgo::eevecEESCProf ( ) const
inline

Definition at line 112 of file DDEcalEndcapAlgo.cc.

References m_vecEESCProf.

Referenced by EEPositionCRs().

112 { return m_vecEESCProf; }
std::vector< double > m_vecEESCProf

◆ eevecEEShape()

const std::vector<double>& DDEcalEndcapAlgo::eevecEEShape ( ) const
inline

Definition at line 113 of file DDEcalEndcapAlgo.cc.

References m_vecEEShape.

Referenced by execute().

113 { return m_vecEEShape; }
std::vector< double > m_vecEEShape

◆ eeWallMat()

DDMaterial DDEcalEndcapAlgo::eeWallMat ( ) const
inline

Definition at line 92 of file DDEcalEndcapAlgo.cc.

References ddmat(), and m_EEWallMat.

Referenced by EECreateSC().

92 { return ddmat(m_EEWallMat); }
DDMaterial ddmat(const std::string &s) const
std::string m_EEWallMat

◆ eezOff()

double DDEcalEndcapAlgo::eezOff ( ) const
inline

Definition at line 86 of file DDEcalEndcapAlgo.cc.

References m_EEzOff.

Referenced by execute().

86 { return m_EEzOff; }

◆ envName()

DDName DDEcalEndcapAlgo::envName ( unsigned int  i) const
inline

Definition at line 123 of file DDEcalEndcapAlgo.cc.

References ddname(), mps_fire::i, m_envName, and to_string().

Referenced by EECreateSC(), and execute().

123 { return ddname(m_envName + std::to_string(i)); }
DDName ddname(const std::string &s) const
static std::string to_string(const XMLCh *ch)

◆ execute()

void DDEcalEndcapAlgo::execute ( DDCompactView cpv)
override

Definition at line 347 of file DDEcalEndcapAlgo.cc.

References cms::cuda::assert(), DDSolidFactory::box(), DDEcalEndcapTrap::centrePos(), cutBoxName(), EECreateCR(), EECreateSC(), EEGetSCType(), eenColumns(), eenSCquad(), eenSCTypes(), eeQuaName(), eeSCEFront(), eeSCELength(), eeSCERear(), eevecEECRCtrs(), eevecEESCCtrs(), eevecEEShape(), eezOff(), envName(), createfilelist::int, ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::iy(), m_cryFCtr, m_cryRCtr, m_cutParms, m_scrFCtr, m_scrRCtr, m_zFront, DDEcalEndcapTrap::moveto(), myrot(), Skims_PA_cff::name, DDSolid::parameters(), DDCompactView::position(), rname, DDEcalEndcapTrap::rotation(), scrFCtr(), scrRCtr(), mathSSE::sqrt(), to_string(), DDEcalEndcapTrap::translate(), and vecEESCLims().

347  {
348  // Position supercrystals in EE Quadrant
349  // Version: 1.00
350  // Created: 30 July 2007
351  // Last Mod:
352  //---------------------------------------------------------------------
353 
354  //********************************* cutbox for trimming edge SCs
355  const double cutWid(eeSCERear() / sqrt(2.));
356  const DDSolid eeCutBox(DDSolidFactory::box(cutBoxName(), cutWid, cutWid, eeSCELength() / sqrt(2.)));
357  m_cutParms = &eeCutBox.parameters();
358  //**************************************************************
359 
360  const double zFix(m_zFront - 3172.0 * mm); // fix for changing z offset
361 
362  //** fill supercrystal front and rear center positions from xml input
363  for (unsigned int iC(0); iC != (unsigned int)eenSCquad(); ++iC) {
364  const unsigned int iOff(8 * iC);
365  const unsigned int ix((unsigned int)eevecEESCCtrs()[iOff + 0]);
366  const unsigned int iy((unsigned int)eevecEESCCtrs()[iOff + 1]);
367 
368  assert(ix > 0 && ix < 11 && iy > 0 && iy < 11);
369 
370  m_scrFCtr[ix - 1][iy - 1] =
371  DDTranslation(eevecEESCCtrs()[iOff + 2], eevecEESCCtrs()[iOff + 4], eevecEESCCtrs()[iOff + 6] + zFix);
372 
373  m_scrRCtr[ix - 1][iy - 1] =
374  DDTranslation(eevecEESCCtrs()[iOff + 3], eevecEESCCtrs()[iOff + 5], eevecEESCCtrs()[iOff + 7] + zFix);
375  }
376 
377  //** fill crystal front and rear center positions from xml input
378  for (unsigned int iC(0); iC != 25; ++iC) {
379  const unsigned int iOff(8 * iC);
380  const unsigned int ix((unsigned int)eevecEECRCtrs()[iOff + 0]);
381  const unsigned int iy((unsigned int)eevecEECRCtrs()[iOff + 1]);
382 
383  assert(ix > 0 && ix < 6 && iy > 0 && iy < 6);
384 
385  m_cryFCtr[ix - 1][iy - 1] =
386  DDTranslation(eevecEECRCtrs()[iOff + 2], eevecEECRCtrs()[iOff + 4], eevecEECRCtrs()[iOff + 6]);
387 
388  m_cryRCtr[ix - 1][iy - 1] =
389  DDTranslation(eevecEECRCtrs()[iOff + 3], eevecEECRCtrs()[iOff + 5], eevecEECRCtrs()[iOff + 7]);
390  }
391 
392  EECreateCR(); // make a single crystal just once here
393 
394  for (unsigned int isc(0); isc < eenSCTypes(); ++isc) {
395  EECreateSC(isc + 1, cpv);
396  }
397 
398  const std::vector<double>& colLimits(eevecEEShape());
399  //** Loop over endcap columns
400  for (int icol = 1; icol <= int(eenColumns()); icol++) {
401  //** Loop over SCs in column, using limits from xml input
402  for (int irow = int(colLimits[2 * icol - 2]); irow <= int(colLimits[2 * icol - 1]); ++irow) {
403  if (vecEESCLims()[0] <= icol && vecEESCLims()[1] >= icol && vecEESCLims()[2] <= irow &&
404  vecEESCLims()[3] >= irow) {
405  // Find SC type (complete or partial) for this location
406  const unsigned int isctype(EEGetSCType(icol, irow));
407 
408  // Create SC as a DDEcalEndcapTrap object and calculate rotation and
409  // translation required to position it in the endcap.
411 
412  scrys.moveto(scrFCtr(icol, irow), scrRCtr(icol, irow));
413  scrys.translate(DDTranslation(0., 0., -eezOff()));
414 
415  DDName rname(envName(isctype).name() + std::to_string(icol) + "R" + std::to_string(irow));
416 
417 #ifdef EDM_ML_DEBUG
418  edm::LogVerbatim("EcalGeoXm") << "Quadrant, SC col/row " << eeQuaName() << " " << icol << " / " << irow
419  << std::endl
420  << " Limits " << int(colLimits[2 * icol - 2]) << "->"
421  << int(colLimits[2 * icol - 1]) << std::endl
422  << " SC type = " << isctype << std::endl
423  << " Zoff = " << eezOff() << std::endl
424  << " Rotation " << rname << " " << scrys.rotation() << std::endl
425  << " Position " << scrys.centrePos();
426 #endif
427  // Position SC in endcap
428  cpv.position(envName(isctype),
429  eeQuaName(),
430  100 * isctype + 10 * (icol - 1) + (irow - 1),
431  scrys.centrePos(),
432  myrot(rname.fullname(), scrys.rotation()));
433 #ifdef EDM_ML_DEBUG
434  edm::LogVerbatim("EEGeom") << envName(isctype) << " " << (100 * isctype + 10 * (icol - 1) + (irow - 1))
435  << " in " << eeQuaName();
436  edm::LogVerbatim("EcalGeom") << envName(isctype) << " " << (100 * isctype + 10 * (icol - 1) + (irow - 1))
437  << " in " << eeQuaName() << " at " << scrys.centrePos();
438 #endif
439  }
440  }
441  }
442 }
Log< level::Info, true > LogVerbatim
DDTranslation m_cryFCtr[5][5]
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
double eenSCTypes() const
DDTranslation m_scrRCtr[10][10]
DDRotation myrot(const std::string &s, const DDRotationMatrix &r) const
unsigned int EEGetSCType(const unsigned int iCol, const unsigned int iRow)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
const DDTranslation & scrRCtr(unsigned int iRow, unsigned int iCol) const
DDName eeQuaName() const
assert(be >=bs)
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
static std::string to_string(const XMLCh *ch)
double eeSCELength() const
const std::vector< double > & vecEESCLims() const
double eenColumns() const
T sqrt(T t)
Definition: SSEVec.h:23
DDTranslation m_scrFCtr[10][10]
DDName envName(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.
Definition: DDSolid.cc:547
DDName cutBoxName() const
double eenSCquad() const
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
DDTranslation m_cryRCtr[5][5]
double eeSCERear() const
double eeSCEFront() const
const std::vector< double > & eevecEECRCtrs() const
const G4String rname[NREG]
const DDTranslation & scrFCtr(unsigned int iRow, unsigned int iCol) const
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
void EECreateSC(const unsigned int iSCType, DDCompactView &cpv)
const std::vector< double > * m_cutParms
const std::vector< double > & eevecEEShape() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
const std::vector< double > & eevecEESCCtrs() const
double eezOff() const

◆ idNameSpace()

const std::string& DDEcalEndcapAlgo::idNameSpace ( ) const
inline

Definition at line 82 of file DDEcalEndcapAlgo.cc.

References m_idNameSpace.

82 { return m_idNameSpace; }
std::string m_idNameSpace

◆ iLength()

double DDEcalEndcapAlgo::iLength ( ) const
inline

Definition at line 140 of file DDEcalEndcapAlgo.cc.

References m_iLength.

Referenced by EECreateSC().

140 { return m_iLength; }

◆ initialize()

void DDEcalEndcapAlgo::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)
override

Definition at line 262 of file DDEcalEndcapAlgo.cc.

References m_alvName, m_cryName, m_cryZOff, m_cutBoxName, m_EECrysFront, m_EECrysLength, m_EECrysMat, m_EECrysRear, m_EEMat, m_EEnColumns, m_EEnCRSC, m_EEnSCCutaway, m_EEnSCquad, m_EEnSCTypes, m_EEQuaMat, m_EEQuaName, m_EESCAFront, m_EESCALength, m_EESCARear, m_EESCAWall, m_EESCEFront, m_EESCELength, m_EESCERear, m_EESCHLength, m_EESCHSide, m_EEWallMat, m_EEzOff, m_envName, m_idNameSpace, m_iLength, m_intName, m_iXYOff, m_PF45, m_PFfifth, m_PFhalf, m_vecEECRCtrs, m_vecEESCCtrs, m_vecEESCCutaway, m_vecEESCLims, m_vecEESCProf, m_vecEEShape, m_zFront, DDCurrentNamespace::ns(), and class-composition::parent.

266  {
267 #ifdef EDM_ML_DEBUG
268  edm::LogVerbatim("EcalGeomX") << "DDEcalEndcapAlgo info: Initialize";
269 #endif
271  // TRICK!
272  m_idNameSpace = parent().name().ns();
273  // barrel parent volume
274  m_EEMat = sArgs["EEMat"];
275  m_EEzOff = nArgs["EEzOff"];
276 
277  m_EEQuaName = sArgs["EEQuaName"];
278  m_EEQuaMat = sArgs["EEQuaMat"];
279  m_EECrysMat = sArgs["EECrysMat"];
280  m_EEWallMat = sArgs["EEWallMat"];
281  m_EECrysLength = nArgs["EECrysLength"];
282  m_EECrysRear = nArgs["EECrysRear"];
283  m_EECrysFront = nArgs["EECrysFront"];
284  m_EESCELength = nArgs["EESCELength"];
285  m_EESCERear = nArgs["EESCERear"];
286  m_EESCEFront = nArgs["EESCEFront"];
287  m_EESCALength = nArgs["EESCALength"];
288  m_EESCARear = nArgs["EESCARear"];
289  m_EESCAFront = nArgs["EESCAFront"];
290  m_EESCAWall = nArgs["EESCAWall"];
291  m_EESCHLength = nArgs["EESCHLength"];
292  m_EESCHSide = nArgs["EESCHSide"];
293  m_EEnSCTypes = nArgs["EEnSCTypes"];
294  m_EEnColumns = nArgs["EEnColumns"];
295  m_EEnSCCutaway = nArgs["EEnSCCutaway"];
296  m_EEnSCquad = nArgs["EEnSCquad"];
297  m_EEnCRSC = nArgs["EEnCRSC"];
298  m_vecEESCProf = vArgs["EESCProf"];
299  m_vecEEShape = vArgs["EEShape"];
300  m_vecEESCCutaway = vArgs["EESCCutaway"];
301  m_vecEESCCtrs = vArgs["EESCCtrs"];
302  m_vecEECRCtrs = vArgs["EECRCtrs"];
303 
304  m_cutBoxName = sArgs["EECutBoxName"];
305 
306  m_envName = sArgs["EEEnvName"];
307  m_alvName = sArgs["EEAlvName"];
308  m_intName = sArgs["EEIntName"];
309  m_cryName = sArgs["EECryName"];
310 
311  m_PFhalf = nArgs["EEPFHalf"];
312  m_PFfifth = nArgs["EEPFFifth"];
313  m_PF45 = nArgs["EEPF45"];
314 
315  m_vecEESCLims = vArgs["EESCLims"];
316 
317  m_iLength = nArgs["EEiLength"];
318 
319  m_iXYOff = nArgs["EEiXYOff"];
320 
321  m_cryZOff = nArgs["EECryZOff"];
322 
323  m_zFront = nArgs["EEzFront"];
324 }
Log< level::Info, true > LogVerbatim
std::string m_cutBoxName
static std::string & ns()
std::string m_EEQuaMat
std::string m_idNameSpace
std::vector< double > m_vecEESCLims
std::string m_EECrysMat
std::string m_EEQuaName
std::vector< double > m_vecEEShape
std::vector< double > m_vecEESCCtrs
std::vector< double > m_vecEECRCtrs
std::string m_EEWallMat
std::vector< double > m_vecEESCCutaway
std::vector< double > m_vecEESCProf

◆ intName()

DDName DDEcalEndcapAlgo::intName ( unsigned int  i) const
inline

Definition at line 125 of file DDEcalEndcapAlgo.cc.

References ddname(), mps_fire::i, m_intName, and to_string().

Referenced by EECreateSC().

125 { return ddname(m_intName + std::to_string(i)); }
DDName ddname(const std::string &s) const
static std::string to_string(const XMLCh *ch)

◆ iXYOff()

double DDEcalEndcapAlgo::iXYOff ( ) const
inline

Definition at line 141 of file DDEcalEndcapAlgo.cc.

References m_iXYOff.

Referenced by EECreateSC().

141 { return m_iXYOff; }

◆ myrot()

DDRotation DDEcalEndcapAlgo::myrot ( const std::string &  s,
const DDRotationMatrix r 
) const

Definition at line 330 of file DDEcalEndcapAlgo.cc.

References ddname(), DDrot(), m_idNameSpace, alignCSCRings::r, and alignCSCRings::s.

Referenced by EECreateSC(), EEPositionCRs(), and execute().

330  {
331  return DDrot(ddname(m_idNameSpace + ":" + s), std::make_unique<DDRotationMatrix>(r));
332 }
DDName ddname(const std::string &s) const
std::string m_idNameSpace
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:67

◆ scrFCtr()

const DDTranslation& DDEcalEndcapAlgo::scrFCtr ( unsigned int  iRow,
unsigned int  iCol 
) const
inline

Definition at line 134 of file DDEcalEndcapAlgo.cc.

References m_scrFCtr.

Referenced by execute().

134 { return m_scrFCtr[iRow - 1][iCol - 1]; }
DDTranslation m_scrFCtr[10][10]

◆ scrRCtr()

const DDTranslation& DDEcalEndcapAlgo::scrRCtr ( unsigned int  iRow,
unsigned int  iCol 
) const
inline

Definition at line 136 of file DDEcalEndcapAlgo.cc.

References m_scrRCtr.

Referenced by execute().

136 { return m_scrRCtr[iRow - 1][iCol - 1]; }
DDTranslation m_scrRCtr[10][10]

◆ vecEESCLims()

const std::vector<double>& DDEcalEndcapAlgo::vecEESCLims ( ) const
inline

Definition at line 138 of file DDEcalEndcapAlgo.cc.

References m_vecEESCLims.

Referenced by execute().

138 { return m_vecEESCLims; }
std::vector< double > m_vecEESCLims

Member Data Documentation

◆ m_alvName

std::string DDEcalEndcapAlgo::m_alvName
private

Definition at line 185 of file DDEcalEndcapAlgo.cc.

Referenced by alvName(), and initialize().

◆ m_cryFCtr

DDTranslation DDEcalEndcapAlgo::m_cryFCtr[5][5]
private

Definition at line 189 of file DDEcalEndcapAlgo.cc.

Referenced by cryFCtr(), and execute().

◆ m_cryName

std::string DDEcalEndcapAlgo::m_cryName
private

Definition at line 187 of file DDEcalEndcapAlgo.cc.

Referenced by cryName(), and initialize().

◆ m_cryRCtr

DDTranslation DDEcalEndcapAlgo::m_cryRCtr[5][5]
private

Definition at line 190 of file DDEcalEndcapAlgo.cc.

Referenced by cryRCtr(), and execute().

◆ m_cryZOff

double DDEcalEndcapAlgo::m_cryZOff
private

Definition at line 205 of file DDEcalEndcapAlgo.cc.

Referenced by EEPositionCRs(), and initialize().

◆ m_cutBoxName

std::string DDEcalEndcapAlgo::m_cutBoxName
private

Definition at line 182 of file DDEcalEndcapAlgo.cc.

Referenced by cutBoxName(), and initialize().

◆ m_cutParms

const std::vector<double>* DDEcalEndcapAlgo::m_cutParms
private

Definition at line 181 of file DDEcalEndcapAlgo.cc.

Referenced by EECreateSC(), and execute().

◆ m_EECrysFront

double DDEcalEndcapAlgo::m_EECrysFront
private

Definition at line 159 of file DDEcalEndcapAlgo.cc.

Referenced by eeCrysFront(), and initialize().

◆ m_EECrysLength

double DDEcalEndcapAlgo::m_EECrysLength
private

Definition at line 157 of file DDEcalEndcapAlgo.cc.

Referenced by eeCrysLength(), and initialize().

◆ m_EECrysMat

std::string DDEcalEndcapAlgo::m_EECrysMat
private

Definition at line 154 of file DDEcalEndcapAlgo.cc.

Referenced by eeCrysMat(), and initialize().

◆ m_EECrysRear

double DDEcalEndcapAlgo::m_EECrysRear
private

Definition at line 158 of file DDEcalEndcapAlgo.cc.

Referenced by eeCrysRear(), and initialize().

◆ m_EEMat

std::string DDEcalEndcapAlgo::m_EEMat
private

Definition at line 148 of file DDEcalEndcapAlgo.cc.

Referenced by eeMat(), and initialize().

◆ m_EEnColumns

double DDEcalEndcapAlgo::m_EEnColumns
private

Definition at line 172 of file DDEcalEndcapAlgo.cc.

Referenced by eenColumns(), and initialize().

◆ m_EEnCRSC

double DDEcalEndcapAlgo::m_EEnCRSC
private

Definition at line 178 of file DDEcalEndcapAlgo.cc.

Referenced by eenCRSC(), and initialize().

◆ m_EEnSCCutaway

double DDEcalEndcapAlgo::m_EEnSCCutaway
private

Definition at line 174 of file DDEcalEndcapAlgo.cc.

Referenced by eenSCCutaway(), and initialize().

◆ m_EEnSCquad

double DDEcalEndcapAlgo::m_EEnSCquad
private

Definition at line 176 of file DDEcalEndcapAlgo.cc.

Referenced by eenSCquad(), and initialize().

◆ m_EEnSCTypes

double DDEcalEndcapAlgo::m_EEnSCTypes
private

Definition at line 170 of file DDEcalEndcapAlgo.cc.

Referenced by eenSCTypes(), and initialize().

◆ m_EEQuaMat

std::string DDEcalEndcapAlgo::m_EEQuaMat
private

Definition at line 152 of file DDEcalEndcapAlgo.cc.

Referenced by eeQuaMat(), and initialize().

◆ m_EEQuaName

std::string DDEcalEndcapAlgo::m_EEQuaName
private

Definition at line 151 of file DDEcalEndcapAlgo.cc.

Referenced by eeQuaName(), and initialize().

◆ m_EESCAFront

double DDEcalEndcapAlgo::m_EESCAFront
private

Definition at line 165 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCAFront(), and initialize().

◆ m_EESCALength

double DDEcalEndcapAlgo::m_EESCALength
private

Definition at line 163 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCALength(), and initialize().

◆ m_EESCARear

double DDEcalEndcapAlgo::m_EESCARear
private

Definition at line 164 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCARear(), and initialize().

◆ m_EESCAWall

double DDEcalEndcapAlgo::m_EESCAWall
private

Definition at line 166 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCAWall(), and initialize().

◆ m_EESCEFront

double DDEcalEndcapAlgo::m_EESCEFront
private

Definition at line 162 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCEFront(), and initialize().

◆ m_EESCELength

double DDEcalEndcapAlgo::m_EESCELength
private

Definition at line 160 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCELength(), and initialize().

◆ m_EESCERear

double DDEcalEndcapAlgo::m_EESCERear
private

Definition at line 161 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCERear(), and initialize().

◆ m_EESCHLength

double DDEcalEndcapAlgo::m_EESCHLength
private

Definition at line 167 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCHLength(), and initialize().

◆ m_EESCHSide

double DDEcalEndcapAlgo::m_EESCHSide
private

Definition at line 168 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCHSide(), and initialize().

◆ m_EEWallMat

std::string DDEcalEndcapAlgo::m_EEWallMat
private

Definition at line 155 of file DDEcalEndcapAlgo.cc.

Referenced by eeWallMat(), and initialize().

◆ m_EEzOff

double DDEcalEndcapAlgo::m_EEzOff
private

Definition at line 149 of file DDEcalEndcapAlgo.cc.

Referenced by eezOff(), and initialize().

◆ m_envName

std::string DDEcalEndcapAlgo::m_envName
private

Definition at line 184 of file DDEcalEndcapAlgo.cc.

Referenced by envName(), and initialize().

◆ m_idNameSpace

std::string DDEcalEndcapAlgo::m_idNameSpace
private

Definition at line 145 of file DDEcalEndcapAlgo.cc.

Referenced by ddname(), idNameSpace(), initialize(), and myrot().

◆ m_iLength

double DDEcalEndcapAlgo::m_iLength
private

Definition at line 201 of file DDEcalEndcapAlgo.cc.

Referenced by iLength(), and initialize().

◆ m_intName

std::string DDEcalEndcapAlgo::m_intName
private

Definition at line 186 of file DDEcalEndcapAlgo.cc.

Referenced by initialize(), and intName().

◆ m_iXYOff

double DDEcalEndcapAlgo::m_iXYOff
private

Definition at line 203 of file DDEcalEndcapAlgo.cc.

Referenced by initialize(), and iXYOff().

◆ m_PF45

double DDEcalEndcapAlgo::m_PF45
private

Definition at line 197 of file DDEcalEndcapAlgo.cc.

Referenced by eePF45(), and initialize().

◆ m_PFfifth

double DDEcalEndcapAlgo::m_PFfifth
private

Definition at line 196 of file DDEcalEndcapAlgo.cc.

Referenced by eePFFifth(), and initialize().

◆ m_PFhalf

double DDEcalEndcapAlgo::m_PFhalf
private

Definition at line 195 of file DDEcalEndcapAlgo.cc.

Referenced by eePFHalf(), and initialize().

◆ m_scrFCtr

DDTranslation DDEcalEndcapAlgo::m_scrFCtr[10][10]
private

Definition at line 192 of file DDEcalEndcapAlgo.cc.

Referenced by execute(), and scrFCtr().

◆ m_scrRCtr

DDTranslation DDEcalEndcapAlgo::m_scrRCtr[10][10]
private

Definition at line 193 of file DDEcalEndcapAlgo.cc.

Referenced by execute(), and scrRCtr().

◆ m_vecEECRCtrs

std::vector<double> DDEcalEndcapAlgo::m_vecEECRCtrs
private

Definition at line 179 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEECRCtrs(), and initialize().

◆ m_vecEESCCtrs

std::vector<double> DDEcalEndcapAlgo::m_vecEESCCtrs
private

Definition at line 177 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEESCCtrs(), and initialize().

◆ m_vecEESCCutaway

std::vector<double> DDEcalEndcapAlgo::m_vecEESCCutaway
private

Definition at line 175 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEESCCutaway(), and initialize().

◆ m_vecEESCLims

std::vector<double> DDEcalEndcapAlgo::m_vecEESCLims
private

Definition at line 199 of file DDEcalEndcapAlgo.cc.

Referenced by initialize(), and vecEESCLims().

◆ m_vecEESCProf

std::vector<double> DDEcalEndcapAlgo::m_vecEESCProf
private

Definition at line 171 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEESCProf(), and initialize().

◆ m_vecEEShape

std::vector<double> DDEcalEndcapAlgo::m_vecEEShape
private

Definition at line 173 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEEShape(), and initialize().

◆ m_zFront

double DDEcalEndcapAlgo::m_zFront
private

Definition at line 207 of file DDEcalEndcapAlgo.cc.

Referenced by execute(), and initialize().