15 #include "CLHEP/Units/GlobalSystemOfUnits.h" 17 #include <CLHEP/Geometry/Transform3D.h> 23 namespace std{}
using namespace std;
33 m_EECrysLength ( 0 ) ,
49 m_EEnSCCutaway ( 0 ) ,
70 LogDebug(
"EcalGeom") <<
"DDEcalEndcapAlgo info: Creating an instance" ;
128 m_PF45 = nArgs[
"EEPF45" ] ;
162 const pair<std::string,std::string>
temp (
DDSplit(s) ) ;
163 if ( temp.second.empty() ) {
164 return DDName( temp.first,
167 return DDName( temp.first, temp.second );
192 const double zFix (
m_zFront - 3172*mm ) ;
195 for(
unsigned int iC ( 0 ) ; iC != (
unsigned int)
eenSCquad() ; ++iC )
197 const unsigned int iOff ( 8*iC ) ;
198 const unsigned int ix ( (
unsigned int)
eevecEESCCtrs()[ iOff + 0 ] ) ;
199 const unsigned int iy ( (
unsigned int)
eevecEESCCtrs()[ iOff + 1 ] ) ;
201 assert( ix > 0 && ix < 11 && iy >0 && iy < 11 ) ;
213 for(
unsigned int iC ( 0 ) ; iC != 25 ; ++iC )
215 const unsigned int iOff ( 8*iC ) ;
216 const unsigned int ix ( (
unsigned int)
eevecEECRCtrs()[ iOff + 0 ] ) ;
217 const unsigned int iy ( (
unsigned int)
eevecEECRCtrs()[ iOff + 1 ] ) ;
219 assert( ix > 0 && ix < 6 && iy >0 && iy < 6 ) ;
232 for(
unsigned int isc ( 0 ); isc<
eenSCTypes() ; ++isc )
237 const std::vector<double>& colLimits (
eevecEEShape() );
242 for(
int irow =
int(colLimits[2*icol-2]);
243 irow <=
int(colLimits[2*icol-1]) ; ++irow )
251 const unsigned int isctype (
EEGetSCType( icol, irow ) );
262 + std::to_string( icol ) +
"R" + std::to_string( irow ) ) ;
275 100*isctype + 10*(icol-1) + (irow-1),
297 const string anum ( std::to_string(iSCType) ) ;
302 const double ffived ( 45*deg ) ;
303 const double zerod ( 0*deg ) ;
336 const double iFront ( aFront - dwall ) ;
337 const double iRear ( iFront ) ;
338 const double iLen (
iLength() ) ;
355 const double zIOff ( -(
eeSCALength() - iLen )/2. ) ;
356 const double xyIOff (
iXYOff() ) ;
368 const double fac (
eePF45() ) ;
370 const double zmm ( 0*mm ) ;
375 ( 5 == iSCType ?
DDTranslation( -half*fac, -half*fac, zmm ) :
378 const CLHEP::HepRotationZ cutm ( ffived ) ;
382 cutm.yx(), cutm.yy(), cutm.yz(),
383 cutm.zx(), cutm.zy(), cutm.zz() ) ) ) ;
399 const double mySign ( iSCType < 4 ? +1. : -1. ) ;
402 xyIOff + mySign*2*mm, zIOff ) ;
426 const unsigned int iRow )
428 unsigned int iType = 1;
470 static const unsigned int ncol ( 5 ) ;
475 const unsigned int icoffset ( ( iSCType - 1 )*ncol - 1 ) ;
478 for(
unsigned int icol ( 1 ); icol <=
ncol ; ++icol )
481 const int ncrcol ( (
int)
eevecEESCProf()[ icoffset + icol ] ) ;
483 const int imin ( 0 < ncrcol ? 1 : ( 0 > ncrcol ? ncol + ncrcol + 1 : 0 ) ) ;
484 const int imax ( 0 < ncrcol ? ncrcol : ( 0 > ncrcol ? ncol : 0 ) ) ;
489 for(
int irow ( imin ); irow <= imax ; ++irow )
501 DDName rname (
"EECrRoC" + std::to_string( icol ) +
"R" + std::to_string( irow ) ) ;
505 100*iSCType + 10*( icol - 1 ) + ( irow - 1 ),
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
DDName cutBoxName() const
DDTranslation m_cryFCtr[5][5]
void execute(DDCompactView &cpv) override
const DDTranslation & scrRCtr(unsigned int iRow, unsigned int iCol) const
DDMaterial ddmat(const std::string &s) const
const std::vector< double > & eevecEESCCtrs() const
DDName addTmp(DDName aName) const
DDMaterial is used to define and access material information.
double eeSCEFront() const
void EEPositionCRs(const DDName &pName, const DDTranslation &offset, const int iSCType, DDCompactView &cpv)
DDTranslation m_scrRCtr[10][10]
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
DDName envName(unsigned int i) const
unsigned int EEGetSCType(const unsigned int iCol, const unsigned int iRow)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
void moveto(const DDTranslation &frontCentre, const DDTranslation &rearCentre)
Compact representation of the geometrical detector hierarchy.
double eeSCELength() const
double eeSCALength() const
A DDSolid represents the shape of a part.
DDRotation myrot(const std::string &s, const DDRotationMatrix &r) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
double eenSCCutaway() const
Represents a uniquely identifyable rotation matrix.
std::string m_idNameSpace
std::vector< double > m_vecEESCLims
const std::vector< double > & vecEESCLims() const
double eeCrysLength() const
~DDEcalEndcapAlgo() override
const std::vector< double > & eevecEESCProf() const
DDMaterial eeWallMat() const
double eeCrysRear() const
const std::string fullname() const
DDTranslation m_scrFCtr[10][10]
DDName ddname(const std::string &s) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
double eeCrysFront() const
const DDTranslation & cryRCtr(unsigned int iRow, unsigned int iCol) const
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
const DDTranslation & cryFCtr(unsigned int iRow, unsigned int iCol) const
DDMaterial eeCrysMat() const
const std::vector< double > & eevecEECRCtrs() const
std::vector< double > m_vecEEShape
DDTranslation m_cryRCtr[5][5]
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
std::vector< double > m_vecEESCCtrs
double eenColumns() const
double eeSCAFront() const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::vector< double > m_vecEECRCtrs
void translate(const DDTranslation &trans)
DDName intName(unsigned int i) const
const DDTranslation & scrFCtr(unsigned int iRow, unsigned int iCol) const
double eenSCTypes() const
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
const std::vector< double > & eevecEESCCutaway() const
void EECreateSC(const unsigned int iSCType, DDCompactView &cpv)
DDTranslation centrePos()
DDRotationMatrix rotation()
const std::vector< double > & eevecEEShape() const
const std::vector< double > * m_cutParms
DDName alvName(unsigned int i) const
std::vector< double > m_vecEESCCutaway
std::vector< double > m_vecEESCProf