538 double hthick = 0.5 * thick;
540 double thickTot(0), zpos(-hthick);
542 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Entry to positionMix with Name " << nameM <<
" copy " 543 << copyM <<
" Thick " << thick <<
" AbsType " << absType <<
" Fine " << fine <<
" dphi " 566 <<
" Copy " <<
copy <<
" Tiles " << firstTile <<
":" << lastTile <<
" Size " 568 <<
" absType " << absType;
570 for (
int ti = firstTile; ti < lastTile; ++ti) {
572 int cassette, fimin, fimax;
574 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: ti " << ti <<
":" << fine <<
" index " 592 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Casstee|Fimin|Fimax " << cassette <<
":" 593 << fimin <<
":" << fimax;
595 double phi1 = dphi * (fimin - 1);
596 double phi2 = dphi * (fimax - fimin + 1);
605 << ir1 <<
":" << ir2 <<
" R " <<
r1 <<
":" <<
r2 <<
" Thick " << (2.0 * hthickl)
606 <<
" phi " << fimin <<
":" << fimax <<
":" <<
convertRadToDeg(phi1) <<
":" 607 <<
convertRadToDeg(phi2) <<
" cassette " << cassette <<
":" << cassette0
608 <<
" Shift " << cshift.first <<
":" << cshift.second;
615 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: " << glog1.
name() <<
" Tubs made of " 616 << matName <<
" of dimensions " <<
r1 <<
", " <<
r2 <<
", " << hthickl <<
", " 622 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Position " << glog1.
name() <<
" number " 623 <<
copy <<
" in " << glog.
name() <<
" at " << tran <<
" with no rotation";
630 if (thickTot > thick) {
631 edm::LogError(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Thickness of the partition " << thick
632 <<
" is smaller than " << thickTot
633 <<
": thickness of all its components in the top part **** ERROR ****";
635 edm::LogWarning(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Thickness of the partition " << thick
636 <<
" does not match with " << thickTot <<
" of the components in top part";
657 <<
copy <<
" Tiles " << firstTile <<
":" << lastTile <<
" Size " 659 <<
" absType " << absType;
661 for (
int ti = firstTile; ti < lastTile; ++ti) {
663 int cassette, fimin, fimax;
665 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: ti " << ti <<
":" << fine <<
" index " 683 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Casstee|Fimin|Fimax " << cassette <<
":" << fimin
686 double phi1 = dphi * (fimin - 1);
687 double phi2 = dphi * (fimax - fimin + 1);
696 << ir1 <<
":" << ir2 <<
" R " <<
r1 <<
":" <<
r2 <<
" Thick " << (2.0 * hthickl)
697 <<
" phi " << fimin <<
":" << fimax <<
":" <<
convertRadToDeg(phi1) <<
":" 698 <<
convertRadToDeg(phi2) <<
" cassette " << cassette <<
":" << cassette0
699 <<
" Shift " << cshift.first <<
":" << cshift.second;
706 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: " << glog1.
name() <<
" Tubs made of " << matName
707 <<
" of dimensions " <<
r1 <<
", " <<
r2 <<
", " << hthickl <<
", " 714 <<
" in " << glog.
name() <<
" at " << tran <<
" with no rotation";
723 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Start bottom section for layer " <<
layer 724 <<
" absType " << absType;
731 int cassette =
k + 1;
733 double xpos = -cshift.first;
734 double ypos = cshift.second;
737 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette::Passive: layer " <<
layer + 1 <<
" cassette " 738 << cassette <<
" Shift " << cshift.first <<
":" << cshift.second <<
" PassiveIndex " 743 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Passive " << passive <<
" number " << cassette
744 <<
" pos " << xpos <<
":" << ypos;
752 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: " <<
name <<
" number " << cassette
753 <<
" positioned in " << glog.
ddname() <<
" at " << tran <<
" with no rotation";
757 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: " << kount <<
" passives of type " << absType
758 <<
" for " << glog.
ddname();
761 static const double sqrt3 =
std::sqrt(3.0);
768 double dely = 2.0 * delx / sqrt3;
769 double dy = 0.75 * dely;
772 int ium(0), ivm(0), kount(0);
773 std::vector<int> ntype(3, 0);
774 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette::Bottom: " << glog.
ddname() <<
" r " << delx
775 <<
" R " << dely <<
" dy " <<
dy <<
" Shift " << xyoff.first <<
":" << xyoff.second
778 << (lastWafer - 1) <<
" Copy " << copyM <<
":" <<
layer;
780 for (
int k = firstWafer;
k < lastWafer; ++
k) {
796 <<
"DDHGCalMixRotatedFineCassette::index:Property:layertype:type:part:orien:cassette:place:offsets:ind " <<
k 798 << cassette <<
":" << place;
801 double xpos = xyoff.first - cshift.first + nc * delx;
802 double ypos = xyoff.second + cshift.second +
nr *
dy;
804 double xorig = xyoff.first + nc * delx;
805 double yorig = xyoff.second +
nr *
dy;
806 double angle = std::atan2(yorig, xorig);
807 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette::Wafer: layer " <<
layer + 1 <<
" cassette " 808 << cassette <<
" Shift " << cshift.first <<
":" << cshift.second <<
" Original " 817 edm::LogVerbatim(
"HGCalGeom") <<
" FullWafer type:place:ind " <<
type <<
":" << place <<
":" <<
i <<
":" 827 edm::LogVerbatim(
"HGCalGeom") <<
" layertype:type:part:orien:cassette:place:offsets:ind " << layertype <<
":" 828 <<
type <<
":" <<
part <<
":" << orien <<
":" << cassette <<
":" << place <<
":" 838 <<
copy <<
" type :part:orien:ind " <<
type <<
":" <<
part <<
":" << orien <<
":" 854 << layertype <<
":" <<
type <<
" positioned in " << glog.
ddname() <<
" at " << tran
855 <<
" with no rotation";
859 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Maximum # of u " << ium <<
" # of v " << ivm
860 <<
" and " << kount <<
" wafers (" << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2]
861 <<
") for " << glog.
ddname();
Log< level::Info, true > LogVerbatim
static int32_t cellPlacementIndex(int32_t iz, int32_t frontBack, int32_t orient)
static constexpr double tol2_
static constexpr int32_t WaferPartLDOffset
std::vector< std::string > waferFull_
std::vector< int > tileFinePhis_
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::pair< double, double > getShift(int layer, int zside, int cassette, bool scnt=false) const
std::unordered_set< int > copies_
DDName is used to identify DDD entities uniquely.
std::vector< int > layerTypeTop_
std::vector< int > tileCoarsePhis_
Log< level::Error, false > LogError
std::vector< int > copyNumberTop_
int32_t waferOrient(const int32_t property)
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)
static constexpr int32_t WaferFull
std::vector< std::string > passivePart_
std::vector< double > tileFineRMin_
std::vector< int > tileFineLayerStart_
std::vector< double > tileFineRMax_
Abs< T >::type abs(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
int32_t waferThick(const int32_t property)
HGCalGeomTools geomTools_
std::vector< int > layerOrient_
std::vector< int > tileFineIndex_
std::vector< int > waferIndex_
std::vector< double > tileCoarseRMin_
std::tuple< int32_t, int32_t, int32_t > tileUnpack(int32_t index)
static constexpr int32_t WaferPartHDOffset
std::vector< double > tileCoarseRMax_
std::vector< int > copyNumberCoverTop_
std::vector< double > layerThickTop_
std::vector< int > waferLayerStart_
int32_t waferPartial(const int32_t property)
std::vector< int > tileCoarseLayerStart_
std::vector< std::string > materialTop_
std::vector< std::string > waferPart_
int32_t waferV(const int32_t index)
static int32_t packTypeUV(int type, int u, int v)
static constexpr int32_t WaferHDTop
std::vector< int > waferProperty_
Log< level::Warning, false > LogWarning
std::vector< std::string > namesTop_
std::vector< std::string > passiveFull_
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
std::vector< int > tileCoarseIndex_
static int cassetteType(int det, int zside, int cassette)
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
static constexpr int32_t layerFrontBack(int32_t layerOrient)