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 ) ,
68 edm::LogInfo(
"EcalGeom") <<
"DDEcalEndcapAlgo info: Creating an instance" ;
126 m_PF45 = nArgs[
"EEPF45" ] ;
166 const pair<std::string,std::string>
temp (
DDSplit(s) ) ;
167 if ( temp.second ==
"" ) {
168 return DDName( temp.first,
171 return DDName( temp.first, temp.second );
197 for(
unsigned int iC ( 0 ) ; iC != (
unsigned int)
eenSCquad() ; ++iC )
199 const unsigned int iOff ( 8*iC ) ;
200 const unsigned int ix ( (
unsigned int)
eevecEESCCtrs()[ iOff + 0 ] ) ;
201 const unsigned int iy ( (
unsigned int)
eevecEESCCtrs()[ iOff + 1 ] ) ;
203 assert( ix > 0 && ix < 11 && iy >0 && iy < 11 ) ;
215 for(
unsigned int iC ( 0 ) ; iC != 25 ; ++iC )
217 const unsigned int iOff ( 8*iC ) ;
218 const unsigned int ix ( (
unsigned int)
eevecEECRCtrs()[ iOff + 0 ] ) ;
219 const unsigned int iy ( (
unsigned int)
eevecEECRCtrs()[ iOff + 1 ] ) ;
221 assert( ix > 0 && ix < 6 && iy >0 && iy < 6 ) ;
234 for(
unsigned int isc ( 0 ); isc<
eenSCTypes() ; ++isc )
239 const std::vector<double>& colLimits (
eevecEEShape() );
241 for(
int icol = 1; icol<=int(
eenColumns()); icol++ )
244 for(
int irow =
int(colLimits[2*icol-2]);
245 irow <= int(colLimits[2*icol-1]) ; ++irow )
253 const unsigned int isctype (
EEGetSCType( icol, irow ) );
277 100*isctype + 10*(icol-1) + (irow-1),
304 const double ffived ( 45*deg ) ;
305 const double zerod ( 0*deg ) ;
338 const double iFront ( aFront - dwall ) ;
339 const double iRear ( iFront ) ;
340 const double iLen (
iLength() ) ;
357 const double zIOff ( -(
eeSCALength() - iLen )/2. ) ;
358 const double xyIOff (
iXYOff() ) ;
370 const double fac (
eePF45() ) ;
372 const double zmm ( 0*mm ) ;
377 ( 5 == iSCType ?
DDTranslation( -half*fac, -half*fac, zmm ) :
380 const CLHEP::HepRotationZ cutm ( ffived ) ;
384 cutm.yx(), cutm.yy(), cutm.yz(),
385 cutm.zx(), cutm.zy(), cutm.zz() ) ) ) ;
401 const double mySign ( iSCType < 4 ? +1. : -1. ) ;
404 xyIOff + mySign*2*mm, zIOff ) ;
428 const unsigned int iRow )
430 unsigned int iType = 1;
431 for(
unsigned int ii = 0; ii < (
unsigned int)(
eenSCCutaway() ) ; ++ii )
472 static const unsigned int ncol ( 5 ) ;
477 const unsigned int icoffset ( ( iSCType - 1 )*ncol - 1 ) ;
480 for(
unsigned int icol ( 1 ); icol <= ncol ; ++icol )
483 const int ncrcol ( (
int)
eevecEESCProf()[ icoffset + icol ] ) ;
485 const int imin ( 0 < ncrcol ? 1 : ( 0 > ncrcol ? ncol + ncrcol + 1 : 0 ) ) ;
486 const int imax ( 0 < ncrcol ? ncrcol : ( 0 > ncrcol ? ncol : 0 ) ) ;
491 for(
int irow ( imin ); irow <= imax ; ++irow )
507 100*iSCType + 10*( icol - 1 ) + ( irow - 1 ),
const std::vector< double > & parameters() const
Don't use (only meant to be used by DDbox(), DDtub(), ...)
void EEPositionCRs(const DDName pName, const DDTranslation offset, const int iSCType, DDCompactView &cpv)
DDName cutBoxName() const
DDTranslation m_cryFCtr[5][5]
void moveto(const DDTranslation frontCentre, const DDTranslation rearCentre)
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
DDTranslation m_scrRCtr[10][10]
DDName envName(unsigned int i) const
void translate(const DDTranslation trans)
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)
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
std::string int_to_string(const int &in)
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)
unsigned int offset(bool)
static DDSolid box(const DDName &name, double xHalf, double yHalf, double 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
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