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 35 of file DDEcalEndcapAlgo.cc.

Member Typedef Documentation

◆ Pt3D

Definition at line 38 of file DDEcalEndcapAlgo.cc.

◆ RfZ3D

typedef HepGeom::ReflectZ3D DDEcalEndcapAlgo::RfZ3D

Definition at line 40 of file DDEcalEndcapAlgo.cc.

◆ Ro3D

typedef HepGeom::Rotate3D DDEcalEndcapAlgo::Ro3D

Definition at line 42 of file DDEcalEndcapAlgo.cc.

◆ Rota

typedef CLHEP::HepRotation DDEcalEndcapAlgo::Rota

Definition at line 48 of file DDEcalEndcapAlgo.cc.

◆ RoX3D

typedef HepGeom::RotateX3D DDEcalEndcapAlgo::RoX3D

Definition at line 45 of file DDEcalEndcapAlgo.cc.

◆ RoY3D

typedef HepGeom::RotateY3D DDEcalEndcapAlgo::RoY3D

Definition at line 44 of file DDEcalEndcapAlgo.cc.

◆ RoZ3D

typedef HepGeom::RotateZ3D DDEcalEndcapAlgo::RoZ3D

Definition at line 43 of file DDEcalEndcapAlgo.cc.

◆ Tf3D

typedef HepGeom::Transform3D DDEcalEndcapAlgo::Tf3D

Definition at line 39 of file DDEcalEndcapAlgo.cc.

◆ Tl3D

typedef HepGeom::Translate3D DDEcalEndcapAlgo::Tl3D

Definition at line 41 of file DDEcalEndcapAlgo.cc.

◆ Trap

Definition at line 37 of file DDEcalEndcapAlgo.cc.

◆ Vec3

typedef CLHEP::Hep3Vector DDEcalEndcapAlgo::Vec3

Definition at line 47 of file DDEcalEndcapAlgo.cc.

Constructor & Destructor Documentation

◆ DDEcalEndcapAlgo()

DDEcalEndcapAlgo::DDEcalEndcapAlgo ( )

Definition at line 211 of file DDEcalEndcapAlgo.cc.

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

258 {}

Member Function Documentation

◆ addTmp()

DDName DDEcalEndcapAlgo::addTmp ( DDName  aName) const
inline

Definition at line 126 of file DDEcalEndcapAlgo.cc.

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

Referenced by EECreateSC().

126 { 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 122 of file DDEcalEndcapAlgo.cc.

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

Referenced by EECreateSC().

122 { return ddname(m_alvName + std::to_string(i)); }
DDName ddname(const std::string &s) const
std::string to_string(const V &value)
Definition: OMSAccess.h:71

◆ cryFCtr()

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

Definition at line 128 of file DDEcalEndcapAlgo.cc.

References m_cryFCtr.

Referenced by EEPositionCRs().

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

◆ cryName()

DDName DDEcalEndcapAlgo::cryName ( ) const
inline

Definition at line 124 of file DDEcalEndcapAlgo.cc.

References ddname(), and m_cryName.

Referenced by EECreateCR(), and EEPositionCRs().

124 { 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 130 of file DDEcalEndcapAlgo.cc.

References m_cryRCtr.

Referenced by EEPositionCRs().

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

◆ cutBoxName()

DDName DDEcalEndcapAlgo::cutBoxName ( ) const
inline

Definition at line 116 of file DDEcalEndcapAlgo.cc.

References ddname(), and m_cutBoxName.

Referenced by EECreateSC(), and execute().

116 { 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 332 of file DDEcalEndcapAlgo.cc.

References ddname(), and alignCSCRings::s.

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

332 { 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 334 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().

334  {
335  const pair<std::string, std::string> temp(DDSplit(s));
336  if (temp.second.empty()) {
337  return DDName(temp.first, m_idNameSpace);
338  } else {
339  return DDName(temp.first, temp.second);
340  }
341 }
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 617 of file DDEcalEndcapAlgo.cc.

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

Referenced by execute().

617  {
618  // EECreateCR Create endcap crystal logical volume
619 
620 #ifdef EDM_ML_DEBUG
621  edm::LogVerbatim("EcalGeomX") << "EECreateCR: = ";
622 #endif
624  0.5 * eeCrysLength(),
625  atan((eeCrysRear() - eeCrysFront()) / (sqrt(2.) * eeCrysLength())),
626  45. * deg,
627  0.5 * eeCrysFront(),
628  0.5 * eeCrysFront(),
629  0.5 * eeCrysFront(),
630  0. * deg,
631  0.5 * eeCrysRear(),
632  0.5 * eeCrysRear(),
633  0.5 * eeCrysRear(),
634  0. * deg));
635 #ifdef EDM_ML_DEBUG
636  edm::LogVerbatim("EcalGeom") << EECRSolid.name() << " Trap with parameters: " << 0.5 * eeCrysLength() << ":"
637  << (atan((eeCrysRear() - eeCrysFront()) / (sqrt(2.) * eeCrysLength()))) << ":"
638  << 45. * deg << ":" << 0.5 * eeCrysFront() << ":" << 0.5 * eeCrysFront() << ":"
639  << 0.5 * eeCrysFront() << ":" << 0. * deg << ":" << 0.5 * eeCrysRear() << ":"
640  << 0.5 * eeCrysRear() << ":" << 0.5 * eeCrysRear() << ":" << 0. * deg;
641 #endif
642 
643  DDLogicalPart part(cryName(), eeCrysMat(), EECRSolid);
644 }
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:19
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 442 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(), cond::impl::to_string(), and DDSolidFactory::trap().

Referenced by execute().

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

References m_EECrysFront.

Referenced by EECreateCR(), and EEPositionCRs().

94 { return m_EECrysFront; }

◆ eeCrysLength()

double DDEcalEndcapAlgo::eeCrysLength ( ) const
inline

Definition at line 92 of file DDEcalEndcapAlgo.cc.

References m_EECrysLength.

Referenced by EECreateCR(), and EEPositionCRs().

92 { return m_EECrysLength; }

◆ eeCrysMat()

DDMaterial DDEcalEndcapAlgo::eeCrysMat ( ) const
inline

Definition at line 89 of file DDEcalEndcapAlgo.cc.

References ddmat(), and m_EECrysMat.

Referenced by EECreateCR().

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

◆ eeCrysRear()

double DDEcalEndcapAlgo::eeCrysRear ( ) const
inline

Definition at line 93 of file DDEcalEndcapAlgo.cc.

References m_EECrysRear.

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

93 { 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 604 of file DDEcalEndcapAlgo.cc.

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

Referenced by execute().

604  {
605  unsigned int iType = 1;
606  for (unsigned int ii = 0; ii < (unsigned int)(eenSCCutaway()); ++ii) {
607  if ((eevecEESCCutaway()[3 * ii] == iCol) && (eevecEESCCutaway()[3 * ii + 1] == iRow)) {
608  iType = int(eevecEESCCutaway()[3 * ii + 2]);
609 #ifdef EDM_ML_DEBUG
610  edm::LogVerbatim("EcalGeomX") << "EEGetSCType: col, row, type = " << iCol << " " << iRow << " " << iType;
611 #endif
612  }
613  }
614  return iType;
615 }
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 83 of file DDEcalEndcapAlgo.cc.

References ddmat(), and m_EEMat.

Referenced by EECreateSC().

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

◆ eenColumns()

double DDEcalEndcapAlgo::eenColumns ( ) const
inline

Definition at line 106 of file DDEcalEndcapAlgo.cc.

References m_EEnColumns.

Referenced by execute().

106 { return m_EEnColumns; }

◆ eenCRSC()

double DDEcalEndcapAlgo::eenCRSC ( ) const
inline

Definition at line 109 of file DDEcalEndcapAlgo.cc.

References m_EEnCRSC.

109 { return m_EEnCRSC; }

◆ eenSCCutaway()

double DDEcalEndcapAlgo::eenSCCutaway ( ) const
inline

Definition at line 107 of file DDEcalEndcapAlgo.cc.

References m_EEnSCCutaway.

Referenced by EEGetSCType().

107 { return m_EEnSCCutaway; }

◆ eenSCquad()

double DDEcalEndcapAlgo::eenSCquad ( ) const
inline

Definition at line 108 of file DDEcalEndcapAlgo.cc.

References m_EEnSCquad.

Referenced by execute().

108 { return m_EEnSCquad; }

◆ eenSCTypes()

double DDEcalEndcapAlgo::eenSCTypes ( ) const
inline

Definition at line 105 of file DDEcalEndcapAlgo.cc.

References m_EEnSCTypes.

Referenced by EEPositionCRs(), and execute().

105 { return m_EEnSCTypes; }

◆ eePF45()

double DDEcalEndcapAlgo::eePF45 ( ) const
inline

Definition at line 119 of file DDEcalEndcapAlgo.cc.

References m_PF45.

Referenced by EECreateSC().

119 { return m_PF45; }

◆ eePFFifth()

double DDEcalEndcapAlgo::eePFFifth ( ) const
inline

Definition at line 118 of file DDEcalEndcapAlgo.cc.

References m_PFfifth.

Referenced by EECreateSC().

118 { return m_PFfifth; }

◆ eePFHalf()

double DDEcalEndcapAlgo::eePFHalf ( ) const
inline

Definition at line 117 of file DDEcalEndcapAlgo.cc.

References m_PFhalf.

Referenced by EECreateSC().

117 { return m_PFhalf; }

◆ EEPositionCRs()

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

Definition at line 646 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 cond::impl::to_string().

Referenced by EECreateSC().

649  {
650  // EEPositionCRs Position crystals within parent supercrystal interior volume
651 
652 #ifdef EDM_ML_DEBUG
653  edm::LogVerbatim("EcalGeomX") << "EEPositionCRs called ";
654 #endif
655  static const unsigned int ncol(5);
656 
657  if (iSCType > 0 && iSCType <= eenSCTypes()) {
658  const unsigned int icoffset((iSCType - 1) * ncol - 1);
659 
660  // Loop over columns of SC
661  for (unsigned int icol(1); icol <= ncol; ++icol) {
662  // Get column limits for this SC type from xml input
663  const int ncrcol((int)eevecEESCProf()[icoffset + icol]);
664 
665  const int imin(0 < ncrcol ? 1 : (0 > ncrcol ? ncol + ncrcol + 1 : 0));
666  const int imax(0 < ncrcol ? ncrcol : (0 > ncrcol ? ncol : 0));
667 
668  if (imax > 0) {
669  // Loop over crystals in this row
670  for (int irow(imin); irow <= imax; ++irow) {
671 #ifdef EDM_ML_DEBUG
672  edm::LogVerbatim("EcalGeomX") << " type, col, row " << iSCType << " " << icol << " " << irow;
673 #endif
674  // Create crystal as a DDEcalEndcapTrap object and calculate rotation and
675  // translation required to position it in the SC.
677 
678  crystal.moveto(cryFCtr(icol, irow), cryRCtr(icol, irow));
679 
680  DDName rname("EECrRoC" + std::to_string(icol) + "R" + std::to_string(irow));
681 
682  cpv.position(cryName(),
683  pName,
684  100 * iSCType + 10 * (icol - 1) + (irow - 1),
685  crystal.centrePos() - DDTranslation(0, 0, m_cryZOff),
686  myrot(rname.fullname(), crystal.rotation()));
687 #ifdef EDM_ML_DEBUG
688  edm::LogVerbatim("EEGeom") << cryName() << " " << (100 * iSCType + 10 * (icol - 1) + (irow - 1)) << " in "
689  << pName;
690  edm::LogVerbatim("EcalGeom") << cryName() << " " << (100 * iSCType + 10 * (icol - 1) + (irow - 1)) << " in "
691  << pName << " at " << (crystal.centrePos() - DDTranslation(0, 0, m_cryZOff));
692 #endif
693  }
694  }
695  }
696  }
697 }
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
std::string to_string(const V &value)
Definition: OMSAccess.h:71
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 87 of file DDEcalEndcapAlgo.cc.

References ddmat(), and m_EEQuaMat.

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

◆ eeQuaName()

DDName DDEcalEndcapAlgo::eeQuaName ( ) const
inline

Definition at line 86 of file DDEcalEndcapAlgo.cc.

References ddname(), and m_EEQuaName.

Referenced by execute().

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

◆ eeSCAFront()

double DDEcalEndcapAlgo::eeSCAFront ( ) const
inline

Definition at line 100 of file DDEcalEndcapAlgo.cc.

References m_EESCAFront.

Referenced by EECreateSC().

100 { return m_EESCAFront; }

◆ eeSCALength()

double DDEcalEndcapAlgo::eeSCALength ( ) const
inline

Definition at line 98 of file DDEcalEndcapAlgo.cc.

References m_EESCALength.

Referenced by EECreateSC().

98 { return m_EESCALength; }

◆ eeSCARear()

double DDEcalEndcapAlgo::eeSCARear ( ) const
inline

Definition at line 99 of file DDEcalEndcapAlgo.cc.

References m_EESCARear.

Referenced by EECreateSC().

99 { return m_EESCARear; }

◆ eeSCAWall()

double DDEcalEndcapAlgo::eeSCAWall ( ) const
inline

Definition at line 101 of file DDEcalEndcapAlgo.cc.

References m_EESCAWall.

Referenced by EECreateSC().

101 { return m_EESCAWall; }

◆ eeSCEFront()

double DDEcalEndcapAlgo::eeSCEFront ( ) const
inline

Definition at line 97 of file DDEcalEndcapAlgo.cc.

References m_EESCEFront.

Referenced by EECreateSC(), and execute().

97 { return m_EESCEFront; }

◆ eeSCELength()

double DDEcalEndcapAlgo::eeSCELength ( ) const
inline

Definition at line 95 of file DDEcalEndcapAlgo.cc.

References m_EESCELength.

Referenced by EECreateSC(), and execute().

95 { return m_EESCELength; }

◆ eeSCERear()

double DDEcalEndcapAlgo::eeSCERear ( ) const
inline

Definition at line 96 of file DDEcalEndcapAlgo.cc.

References m_EESCERear.

Referenced by EECreateSC(), and execute().

96 { return m_EESCERear; }

◆ eeSCHLength()

double DDEcalEndcapAlgo::eeSCHLength ( ) const
inline

Definition at line 102 of file DDEcalEndcapAlgo.cc.

References m_EESCHLength.

102 { return m_EESCHLength; }

◆ eeSCHSide()

double DDEcalEndcapAlgo::eeSCHSide ( ) const
inline

Definition at line 103 of file DDEcalEndcapAlgo.cc.

References m_EESCHSide.

103 { return m_EESCHSide; }

◆ eevecEECRCtrs()

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

Definition at line 114 of file DDEcalEndcapAlgo.cc.

References m_vecEECRCtrs.

Referenced by execute().

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

◆ eevecEESCCtrs()

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

Definition at line 113 of file DDEcalEndcapAlgo.cc.

References m_vecEESCCtrs.

Referenced by execute().

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

◆ eevecEESCCutaway()

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

Definition at line 112 of file DDEcalEndcapAlgo.cc.

References m_vecEESCCutaway.

Referenced by EEGetSCType().

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

◆ eevecEESCProf()

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

Definition at line 110 of file DDEcalEndcapAlgo.cc.

References m_vecEESCProf.

Referenced by EEPositionCRs().

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

◆ eevecEEShape()

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

Definition at line 111 of file DDEcalEndcapAlgo.cc.

References m_vecEEShape.

Referenced by execute().

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

◆ eeWallMat()

DDMaterial DDEcalEndcapAlgo::eeWallMat ( ) const
inline

Definition at line 90 of file DDEcalEndcapAlgo.cc.

References ddmat(), and m_EEWallMat.

Referenced by EECreateSC().

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

◆ eezOff()

double DDEcalEndcapAlgo::eezOff ( ) const
inline

Definition at line 84 of file DDEcalEndcapAlgo.cc.

References m_EEzOff.

Referenced by execute().

84 { return m_EEzOff; }

◆ envName()

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

Definition at line 121 of file DDEcalEndcapAlgo.cc.

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

Referenced by EECreateSC(), and execute().

121 { return ddname(m_envName + std::to_string(i)); }
DDName ddname(const std::string &s) const
std::string to_string(const V &value)
Definition: OMSAccess.h:71

◆ execute()

void DDEcalEndcapAlgo::execute ( DDCompactView cpv)
override

Definition at line 345 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, 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(), cond::impl::to_string(), DDEcalEndcapTrap::translate(), and vecEESCLims().

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

References m_idNameSpace.

80 { return m_idNameSpace; }
std::string m_idNameSpace

◆ iLength()

double DDEcalEndcapAlgo::iLength ( ) const
inline

Definition at line 138 of file DDEcalEndcapAlgo.cc.

References m_iLength.

Referenced by EECreateSC().

138 { 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 260 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.

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

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

Referenced by EECreateSC().

123 { return ddname(m_intName + std::to_string(i)); }
DDName ddname(const std::string &s) const
std::string to_string(const V &value)
Definition: OMSAccess.h:71

◆ iXYOff()

double DDEcalEndcapAlgo::iXYOff ( ) const
inline

Definition at line 139 of file DDEcalEndcapAlgo.cc.

References m_iXYOff.

Referenced by EECreateSC().

139 { return m_iXYOff; }

◆ myrot()

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

Definition at line 328 of file DDEcalEndcapAlgo.cc.

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

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

328  {
329  return DDrot(ddname(m_idNameSpace + ":" + s), std::make_unique<DDRotationMatrix>(r));
330 }
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 132 of file DDEcalEndcapAlgo.cc.

References m_scrFCtr.

Referenced by execute().

132 { 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 134 of file DDEcalEndcapAlgo.cc.

References m_scrRCtr.

Referenced by execute().

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

◆ vecEESCLims()

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

Definition at line 136 of file DDEcalEndcapAlgo.cc.

References m_vecEESCLims.

Referenced by execute().

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

Member Data Documentation

◆ m_alvName

std::string DDEcalEndcapAlgo::m_alvName
private

Definition at line 183 of file DDEcalEndcapAlgo.cc.

Referenced by alvName(), and initialize().

◆ m_cryFCtr

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

Definition at line 187 of file DDEcalEndcapAlgo.cc.

Referenced by cryFCtr(), and execute().

◆ m_cryName

std::string DDEcalEndcapAlgo::m_cryName
private

Definition at line 185 of file DDEcalEndcapAlgo.cc.

Referenced by cryName(), and initialize().

◆ m_cryRCtr

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

Definition at line 188 of file DDEcalEndcapAlgo.cc.

Referenced by cryRCtr(), and execute().

◆ m_cryZOff

double DDEcalEndcapAlgo::m_cryZOff
private

Definition at line 203 of file DDEcalEndcapAlgo.cc.

Referenced by EEPositionCRs(), and initialize().

◆ m_cutBoxName

std::string DDEcalEndcapAlgo::m_cutBoxName
private

Definition at line 180 of file DDEcalEndcapAlgo.cc.

Referenced by cutBoxName(), and initialize().

◆ m_cutParms

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

Definition at line 179 of file DDEcalEndcapAlgo.cc.

Referenced by EECreateSC(), and execute().

◆ m_EECrysFront

double DDEcalEndcapAlgo::m_EECrysFront
private

Definition at line 157 of file DDEcalEndcapAlgo.cc.

Referenced by eeCrysFront(), and initialize().

◆ m_EECrysLength

double DDEcalEndcapAlgo::m_EECrysLength
private

Definition at line 155 of file DDEcalEndcapAlgo.cc.

Referenced by eeCrysLength(), and initialize().

◆ m_EECrysMat

std::string DDEcalEndcapAlgo::m_EECrysMat
private

Definition at line 152 of file DDEcalEndcapAlgo.cc.

Referenced by eeCrysMat(), and initialize().

◆ m_EECrysRear

double DDEcalEndcapAlgo::m_EECrysRear
private

Definition at line 156 of file DDEcalEndcapAlgo.cc.

Referenced by eeCrysRear(), and initialize().

◆ m_EEMat

std::string DDEcalEndcapAlgo::m_EEMat
private

Definition at line 146 of file DDEcalEndcapAlgo.cc.

Referenced by eeMat(), and initialize().

◆ m_EEnColumns

double DDEcalEndcapAlgo::m_EEnColumns
private

Definition at line 170 of file DDEcalEndcapAlgo.cc.

Referenced by eenColumns(), and initialize().

◆ m_EEnCRSC

double DDEcalEndcapAlgo::m_EEnCRSC
private

Definition at line 176 of file DDEcalEndcapAlgo.cc.

Referenced by eenCRSC(), and initialize().

◆ m_EEnSCCutaway

double DDEcalEndcapAlgo::m_EEnSCCutaway
private

Definition at line 172 of file DDEcalEndcapAlgo.cc.

Referenced by eenSCCutaway(), and initialize().

◆ m_EEnSCquad

double DDEcalEndcapAlgo::m_EEnSCquad
private

Definition at line 174 of file DDEcalEndcapAlgo.cc.

Referenced by eenSCquad(), and initialize().

◆ m_EEnSCTypes

double DDEcalEndcapAlgo::m_EEnSCTypes
private

Definition at line 168 of file DDEcalEndcapAlgo.cc.

Referenced by eenSCTypes(), and initialize().

◆ m_EEQuaMat

std::string DDEcalEndcapAlgo::m_EEQuaMat
private

Definition at line 150 of file DDEcalEndcapAlgo.cc.

Referenced by eeQuaMat(), and initialize().

◆ m_EEQuaName

std::string DDEcalEndcapAlgo::m_EEQuaName
private

Definition at line 149 of file DDEcalEndcapAlgo.cc.

Referenced by eeQuaName(), and initialize().

◆ m_EESCAFront

double DDEcalEndcapAlgo::m_EESCAFront
private

Definition at line 163 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCAFront(), and initialize().

◆ m_EESCALength

double DDEcalEndcapAlgo::m_EESCALength
private

Definition at line 161 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCALength(), and initialize().

◆ m_EESCARear

double DDEcalEndcapAlgo::m_EESCARear
private

Definition at line 162 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCARear(), and initialize().

◆ m_EESCAWall

double DDEcalEndcapAlgo::m_EESCAWall
private

Definition at line 164 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCAWall(), and initialize().

◆ m_EESCEFront

double DDEcalEndcapAlgo::m_EESCEFront
private

Definition at line 160 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCEFront(), and initialize().

◆ m_EESCELength

double DDEcalEndcapAlgo::m_EESCELength
private

Definition at line 158 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCELength(), and initialize().

◆ m_EESCERear

double DDEcalEndcapAlgo::m_EESCERear
private

Definition at line 159 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCERear(), and initialize().

◆ m_EESCHLength

double DDEcalEndcapAlgo::m_EESCHLength
private

Definition at line 165 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCHLength(), and initialize().

◆ m_EESCHSide

double DDEcalEndcapAlgo::m_EESCHSide
private

Definition at line 166 of file DDEcalEndcapAlgo.cc.

Referenced by eeSCHSide(), and initialize().

◆ m_EEWallMat

std::string DDEcalEndcapAlgo::m_EEWallMat
private

Definition at line 153 of file DDEcalEndcapAlgo.cc.

Referenced by eeWallMat(), and initialize().

◆ m_EEzOff

double DDEcalEndcapAlgo::m_EEzOff
private

Definition at line 147 of file DDEcalEndcapAlgo.cc.

Referenced by eezOff(), and initialize().

◆ m_envName

std::string DDEcalEndcapAlgo::m_envName
private

Definition at line 182 of file DDEcalEndcapAlgo.cc.

Referenced by envName(), and initialize().

◆ m_idNameSpace

std::string DDEcalEndcapAlgo::m_idNameSpace
private

Definition at line 143 of file DDEcalEndcapAlgo.cc.

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

◆ m_iLength

double DDEcalEndcapAlgo::m_iLength
private

Definition at line 199 of file DDEcalEndcapAlgo.cc.

Referenced by iLength(), and initialize().

◆ m_intName

std::string DDEcalEndcapAlgo::m_intName
private

Definition at line 184 of file DDEcalEndcapAlgo.cc.

Referenced by initialize(), and intName().

◆ m_iXYOff

double DDEcalEndcapAlgo::m_iXYOff
private

Definition at line 201 of file DDEcalEndcapAlgo.cc.

Referenced by initialize(), and iXYOff().

◆ m_PF45

double DDEcalEndcapAlgo::m_PF45
private

Definition at line 195 of file DDEcalEndcapAlgo.cc.

Referenced by eePF45(), and initialize().

◆ m_PFfifth

double DDEcalEndcapAlgo::m_PFfifth
private

Definition at line 194 of file DDEcalEndcapAlgo.cc.

Referenced by eePFFifth(), and initialize().

◆ m_PFhalf

double DDEcalEndcapAlgo::m_PFhalf
private

Definition at line 193 of file DDEcalEndcapAlgo.cc.

Referenced by eePFHalf(), and initialize().

◆ m_scrFCtr

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

Definition at line 190 of file DDEcalEndcapAlgo.cc.

Referenced by execute(), and scrFCtr().

◆ m_scrRCtr

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

Definition at line 191 of file DDEcalEndcapAlgo.cc.

Referenced by execute(), and scrRCtr().

◆ m_vecEECRCtrs

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

Definition at line 177 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEECRCtrs(), and initialize().

◆ m_vecEESCCtrs

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

Definition at line 175 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEESCCtrs(), and initialize().

◆ m_vecEESCCutaway

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

Definition at line 173 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEESCCutaway(), and initialize().

◆ m_vecEESCLims

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

Definition at line 197 of file DDEcalEndcapAlgo.cc.

Referenced by initialize(), and vecEESCLims().

◆ m_vecEESCProf

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

Definition at line 169 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEESCProf(), and initialize().

◆ m_vecEEShape

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

Definition at line 171 of file DDEcalEndcapAlgo.cc.

Referenced by eevecEEShape(), and initialize().

◆ m_zFront

double DDEcalEndcapAlgo::m_zFront
private

Definition at line 205 of file DDEcalEndcapAlgo.cc.

Referenced by execute(), and initialize().