478 double hthick = 0.5 * thick;
480 double thickTot(0), zpos(-hthick);
496 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Layer " << ly <<
":" <<
ii <<
" Copy " <<
copy 497 <<
" Tiles " << firstTile <<
":" << lastTile;
499 for (
int ti = firstTile; ti < lastTile; ++ti) {
505 double phi1 = dphi * (fimin - 1);
506 double phi2 = dphi * (fimax - fimin + 1);
513 <<
r2 <<
" Thick " << (2.0 * hthickl) <<
" phi " << fimin <<
":" << fimax <<
":" 515 << cassette <<
":" << cassette0 <<
" Shift " << cshift.first <<
":" 523 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << glog1.
name() <<
" Tubs made of " << matName
524 <<
" of dimensions " <<
r1 <<
", " <<
r2 <<
", " << hthickl <<
", " 531 <<
" in " << glog.
name() <<
" at " << tran <<
" with no rotation";
538 if (thickTot > thick) {
539 edm::LogError(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Thickness of the partition " << thick
540 <<
" is smaller than " << thickTot
541 <<
": thickness of all its components in the top part **** ERROR ****";
543 edm::LogWarning(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Thickness of the partition " << thick
544 <<
" does not match with " << thickTot <<
" of the components in top part";
561 <<
" Tiles " << firstTile <<
":" << lastTile;
563 for (
int ti = firstTile; ti < lastTile; ++ti) {
569 double phi1 = dphi * (fimin - 1);
570 double phi2 = dphi * (fimax - fimin + 1);
577 <<
r2 <<
" Thick " << (2.0 * hthickl) <<
" phi " << fimin <<
":" << fimax <<
":" 579 <<
":" << cassette0 <<
" Shift " << cshift.first <<
":" << cshift.second;
586 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << glog1.
name() <<
" Tubs made of " << matName
587 <<
" of dimensions " <<
r1 <<
", " <<
r2 <<
", " << hthickl <<
", " 594 <<
" in " << glog.
name() <<
" at " << tran <<
" with no rotation";
602 static const double sqrt3 =
std::sqrt(3.0);
609 double dely = 2.0 * delx / sqrt3;
610 double dy = 0.75 * dely;
613 int ium(0), ivm(0), kount(0);
614 std::vector<int> ntype(3, 0);
615 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette::Bottom: " << glog.
ddname() <<
" r " << delx <<
" R " 616 << dely <<
" dy " <<
dy <<
" Shift " << xyoff.first <<
":" << xyoff.second
618 << (lastWafer - 1) <<
" Copy " << copyM <<
":" <<
layer;
620 for (
int k = firstWafer;
k < lastWafer; ++
k) {
636 <<
"DDHGCalMixRotatedCassette::index:Property:layertype:type:part:orien:cassette:place:offsets:ind " <<
k <<
":" 637 <<
waferProperty_[
k] <<
":" << layertype <<
":" <<
type <<
":" <<
part <<
":" << orien <<
":" << cassette <<
":" 641 double xpos = xyoff.first - cshift.first + nc * delx;
642 double ypos = xyoff.second + cshift.second +
nr *
dy;
644 double xorig = xyoff.first + nc * delx;
645 double yorig = xyoff.second +
nr *
dy;
646 double angle = std::atan2(yorig, xorig);
647 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette::Wafer: layer " <<
layer + 1 <<
" cassette " << cassette
648 <<
" Shift " << cshift.first <<
":" << cshift.second <<
" Original " << xorig <<
":" 657 edm::LogVerbatim(
"HGCalGeom") <<
" FullWafer type:place:ind " <<
type <<
":" << place <<
":" <<
i <<
":" 667 edm::LogVerbatim(
"HGCalGeom") <<
" layertype:type:part:orien:cassette:place:offsets:ind " << layertype <<
":" 668 <<
type <<
":" <<
part <<
":" << orien <<
":" << cassette <<
":" << place <<
":" 680 edm::LogVerbatim(
"HGCalGeom") <<
" layertype:abstype:part:orien:cassette:offsets:ind " << layertype <<
":" 681 << absType <<
":" <<
part <<
":" << orien <<
":" << cassette <<
":" 692 edm::LogVerbatim(
"HGCalGeom") <<
" layertype:abstype:part:orien:cassette:3Types:offset:ind " << layertype <<
":" 693 << absType <<
":" <<
part <<
":" << orien <<
":" << cassette <<
":" 703 <<
" Wafer " << wafer <<
" number " <<
copy <<
" type :part:orien:ind " <<
type <<
":" 720 << layertype <<
":" <<
type <<
" positioned in " << glog.
ddname() <<
" at " << tran
721 <<
" with no rotation";
725 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Maximum # of u " << ium <<
" # of v " << ivm <<
" and " 726 << kount <<
" wafers (" << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2] <<
") for " Log< level::Info, true > LogVerbatim
static int32_t cellPlacementIndex(int32_t iz, int32_t frontBack, int32_t orient)
static constexpr int32_t WaferPartLDOffset
std::vector< double > layerThickTop_
std::vector< int > tileLayerStart_
std::unordered_set< int > copies_
std::vector< int > layerOrient_
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
static constexpr int32_t WaferTypeOffset[3]
DDMaterial is used to define and access material information.
int32_t waferU(const int32_t index)
int32_t waferLayer(const int32_t index)
constexpr NumType convertRadToDeg(NumType radians)
std::vector< int > waferLayerStart_
std::pair< double, double > getShift(int layer, int zside, int cassette, bool scnt=false) const
DDName is used to identify DDD entities uniquely.
Log< level::Error, false > LogError
int32_t waferOrient(const int32_t property)
std::vector< int > waferProperty_
A DDSolid represents the shape of a part.
static std::string to_string(const XMLCh *ch)
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
int32_t waferCassette(const int32_t property)
std::vector< int > waferIndex_
static constexpr int32_t WaferFull
std::vector< std::string > namesTop_
Abs< T >::type abs(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< std::string > waferFull_
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
int32_t waferThick(const int32_t property)
std::tuple< int32_t, int32_t, int32_t > tileUnpack(int32_t index)
std::vector< int > layerTypeTop_
static constexpr int32_t WaferPartHDOffset
std::vector< std::string > passivePart_
std::vector< std::string > materialTop_
std::vector< std::string > passiveFull_
std::vector< double > tileRMax_
int32_t waferPartial(const int32_t property)
HGCalGeomTools geomTools_
static constexpr double tol2_
std::vector< double > tileRMin_
int32_t waferV(const int32_t index)
std::vector< int > copyNumberTop_
static int32_t packTypeUV(int type, int u, int v)
static constexpr int32_t WaferHDTop
std::vector< int > tileIndex_
Log< level::Warning, false > LogWarning
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
std::vector< std::string > waferPart_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
static int cassetteType(int det, int zside, int cassette)
std::vector< int > tilePhis_
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
static constexpr int32_t layerFrontBack(int32_t layerOrient)