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" ] ;
171 const pair<std::string,std::string>
temp (
DDSplit(s) ) ;
172 if ( temp.second ==
"" ) {
173 return DDName( temp.first,
176 return DDName( temp.first, temp.second );
201 const double zFix (
m_zFront - 3172*mm ) ;
204 for(
unsigned int iC ( 0 ) ; iC != (
unsigned int)
eenSCquad() ; ++iC )
206 const unsigned int iOff ( 8*iC ) ;
207 const unsigned int ix ( (
unsigned int)
eevecEESCCtrs()[ iOff + 0 ] ) ;
208 const unsigned int iy ( (
unsigned int)
eevecEESCCtrs()[ iOff + 1 ] ) ;
210 assert( ix > 0 && ix < 11 && iy >0 && iy < 11 ) ;
222 for(
unsigned int iC ( 0 ) ; iC != 25 ; ++iC )
224 const unsigned int iOff ( 8*iC ) ;
225 const unsigned int ix ( (
unsigned int)
eevecEECRCtrs()[ iOff + 0 ] ) ;
226 const unsigned int iy ( (
unsigned int)
eevecEECRCtrs()[ iOff + 1 ] ) ;
228 assert( ix > 0 && ix < 6 && iy >0 && iy < 6 ) ;
241 for(
unsigned int isc ( 0 ); isc<
eenSCTypes() ; ++isc )
246 const std::vector<double>& colLimits (
eevecEEShape() );
251 for(
int irow =
int(colLimits[2*icol-2]);
252 irow <=
int(colLimits[2*icol-1]) ; ++irow )
260 const unsigned int isctype (
EEGetSCType( icol, irow ) );
271 + std::to_string( icol ) +
"R" + std::to_string( irow ) ) ;
284 100*isctype + 10*(icol-1) + (irow-1),
306 const string anum ( std::to_string(iSCType) ) ;
311 const double ffived ( 45*deg ) ;
312 const double zerod ( 0*deg ) ;
345 const double iFront ( aFront - dwall ) ;
346 const double iRear ( iFront ) ;
347 const double iLen (
iLength() ) ;
364 const double zIOff ( -(
eeSCALength() - iLen )/2. ) ;
365 const double xyIOff (
iXYOff() ) ;
377 const double fac (
eePF45() ) ;
379 const double zmm ( 0*mm ) ;
384 ( 5 == iSCType ?
DDTranslation( -half*fac, -half*fac, zmm ) :
387 const CLHEP::HepRotationZ cutm ( ffived ) ;
391 cutm.yx(), cutm.yy(), cutm.yz(),
392 cutm.zx(), cutm.zy(), cutm.zz() ) ) ) ;
408 const double mySign ( iSCType < 4 ? +1. : -1. ) ;
411 xyIOff + mySign*2*mm, zIOff ) ;
435 const unsigned int iRow )
437 unsigned int iType = 1;
479 static const unsigned int ncol ( 5 ) ;
484 const unsigned int icoffset ( ( iSCType - 1 )*ncol - 1 ) ;
487 for(
unsigned int icol ( 1 ); icol <=
ncol ; ++icol )
490 const int ncrcol ( (
int)
eevecEESCProf()[ icoffset + icol ] ) ;
492 const int imin ( 0 < ncrcol ? 1 : ( 0 > ncrcol ? ncol + ncrcol + 1 : 0 ) ) ;
493 const int imax ( 0 < ncrcol ? ncrcol : ( 0 > ncrcol ? ncol : 0 ) ) ;
498 for(
int irow ( imin ); irow <= imax ; ++irow )
510 DDName rname (
"EECrRoC" + std::to_string( icol ) +
"R" + std::to_string( irow ) ) ;
514 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]
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]
DDName envName(unsigned int i) const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
unsigned int EEGetSCType(const unsigned int iCol, const unsigned int iRow)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
void execute(DDCompactView &cpv)
void moveto(const DDTranslation &frontCentre, const DDTranslation &rearCentre)
type of data representation of DDCompactView
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
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
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]
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
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
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
virtual ~DDEcalEndcapAlgo()
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
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
std::vector< double > m_vecEESCProf