13 #include "CLHEP/Units/GlobalPhysicalConstants.h"
14 #include "CLHEP/Units/GlobalSystemOfUnits.h"
19 edm::LogInfo(
"HGCalGeom") <<
"DDHGCalNoTaperEndcap test: Creating an instance";
31 m_rMin = int( nArgs[
"rMin"] );
32 m_rMax = int( nArgs[
"rMax"] );
35 m_n = int( nArgs[
"n"] );
41 <<
"\tParent " << parent().name();
54 int copyNo = startCopyNo;
56 double xphi = xQuadrant*tiltAngle;
57 double yphi = yQuadrant*tiltAngle;
58 double theta = 90.*CLHEP::deg;
61 double phiZ = 3*
theta;
65 double offsetX = xQuadrant*0.5*offsetXY;
66 double offsetY = yQuadrant*0.5*offsetXY;
69 int rowmax(0), column(0);
80 double limit1 =
sqrt((offsetX+0.5*xQuadrant*offsetXY)*
81 (offsetX+0.5*xQuadrant*offsetXY) +
82 (offsetY+0.5*yQuadrant*offsetXY)*
83 (offsetY+0.5*yQuadrant*offsetXY) );
84 double limit2 =
sqrt((offsetX-0.5*xQuadrant*offsetXY)*
85 (offsetX-0.5*xQuadrant*offsetXY) +
86 (offsetY-0.5*yQuadrant*offsetXY)*
87 (offsetY-0.5*yQuadrant*offsetXY) );
92 <<
"," << row <<
"): offsetX,Y = " << offsetX <<
","
93 << offsetY <<
" limit=" << limit1 <<
":" << limit2
94 <<
" rMin, rMax = " <<
m_rMin <<
"," <<
m_rMax << std::endl;
111 edm::LogInfo(
"HGCalGeom") <<
"Module " << copyNo <<
": location = "
112 << tran <<
" Rotation " <<
rotation;
120 std::cout <<
" (" << column <<
"," << row <<
"): offsetX,Y = "
121 << offsetX <<
"," << offsetY <<
" is out of limit=" << limit1
122 <<
":" << limit2 <<
" rMin, rMax = " <<
m_rMin <<
","
127 yphi += yQuadrant*2.*tiltAngle;
128 offsetY += yQuadrant*offsetXY;
132 if (row > rowmax) rowmax = row;
134 xphi += xQuadrant*2.*tiltAngle;
135 yphi = yQuadrant*tiltAngle;
136 offsetY = yQuadrant*0.5*offsetXY;
137 offsetX += xQuadrant*offsetXY;
141 std::cout << rowmax <<
" rows and " << column <<
" columns in quadrant "
142 << xQuadrant <<
":" << yQuadrant << std::endl;
DDHGCalNoTaperEndcap(void)
Geom::Theta< T > theta() const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
std::string dbl_to_string(const double &in)
Converts only the integer part of a double to a string.
type of data representation of DDCompactView
std::string m_idNameSpace
virtual ~DDHGCalNoTaperEndcap(void)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
Abs< T >::type abs(const T &t)
void execute(DDCompactView &cpv)
int createQuarter(DDCompactView &cpv, int xQuadrant, int yQuadrant, int startCopyNo)
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const std::string & name() const
Returns the name.
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)