|
|
#include <HGCalGeometryLoader.h>
Definition at line 10 of file HGCalGeometryLoader.h.
◆ CCGFloat
◆ ParmVec
◆ HGCalGeometryLoader()
HGCalGeometryLoader::HGCalGeometryLoader |
( |
| ) |
|
◆ ~HGCalGeometryLoader()
HGCalGeometryLoader::~HGCalGeometryLoader |
( |
| ) |
|
◆ build()
Definition at line 23 of file HGCalGeometryLoader.cc.
30 uint32_t numberOfShapes =
33 edm::LogVerbatim(
"HGCalGeom") <<
"Number of Cells " << numberOfCells <<
":" << numberExpected <<
" for sub-detector "
37 geom->allocateCorners(numberOfCells);
54 unsigned int kount(0);
67 double xx = (
zside > 0) ?
w.first : -
w.first;
68 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
69 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
71 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader:: Wafer:Type " << wafer <<
":" <<
type <<
" DetId "
73 <<
" transf " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
98 if (typm.first >= 0) {
99 id.setType(typm.first);
100 id.setSiPM(typm.second);
102 DetId detId = static_cast<DetId>(
id);
104 double xx = (
zside > 0) ?
w.first : -
w.first;
105 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
106 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
110 << detId.
rawId() <<
std::dec <<
" transf " << ht3d.getTranslation() <<
" R "
111 << ht3d.getTranslation().perp() <<
" and " << ht3d.getRotation();
141 double xx = (
zside > 0) ?
w.first : -
w.first;
142 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
143 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
146 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader::Wafer:Type " << wafer <<
":" <<
type <<
" DetId "
148 <<
" trans " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
150 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader::Wafer:Type " << wafer <<
":" <<
type <<
" DetId "
152 <<
" trans " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
174 if (
counter != numberExpected) {
175 edm::LogError(
"HGCalGeom") <<
"Inconsistent # of cells: expected " << numberExpected <<
":" << numberOfCells
References HGCalTopology::allGeomModules(), cms::cuda::assert(), HGCalParameters::hgtrap::bl, buildGeom(), HGCalDDDConstants::cellSizeHex(), filterCSVwithJSON::copy, counter, HGCalTopology::dddConstants(), TauDecayModes::dec, HGCalTopology::detector(), HGCalParameters::hgtrap::dz, HGCalParameters::firstModule_, relativeConstraints::geom, HGCalTopology::geomMode(), HGCalDDDConstants::getModule(), HGCalDDDConstants::getParameter(), HGCalDDDConstants::getTrForm(), HGCalDDDConstants::getTrFormN(), HGCalDDDConstants::getTypeHex(), HGCalParameters::hgtrap::h, HGCalParameters::hgtrform::h3v, HGCalParameters::hgtrform::hr, triggerObjects_cff::id, createfilelist::int, LEDCalibrationChannels::iphi, HGCalParameters::iradMinBH_, HGCalTopology::isHFNose(), FlatTrd::k_Alp1, FlatTrd::k_Alp2, FlatTrd::k_Cell, FlatTrd::k_dX1, FlatTrd::k_dX2, FlatTrd::k_dX3, FlatTrd::k_dX4, FlatTrd::k_dY1, FlatTrd::k_dY2, FlatTrd::k_dZ, FlatHexagon::k_dZ, HGCalGeometry::k_NumberOfParametersPerHex, HGCalGeometry::k_NumberOfParametersPerTrd, HGCalGeometry::k_NumberOfShapes, HGCalGeometry::k_NumberOfShapesTrd, FlatTrd::k_Phi, FlatHexagon::k_r, FlatHexagon::k_R, FlatTrd::k_Theta, HGCalParameters::lastModule_, HGCalParameters::hgtrform::lay, phase1PixelTopology::layer, HGCalDDDConstants::layerIndex(), HGCalDDDConstants::locateCellTrap(), nphi, parametersPerShape_, CalibrationSummaryClient_cfi::params, DetId::rawId(), relativeConstraints::ring, HGCalParameters::scintCells(), HGCalParameters::scintType(), HGCalDDDConstants::sectors(), AlCaHLTBitMon_QueryRunRegistry::string, HGCalTopology::subDetector(), HGCalTopology::tileTrapezoid(), HGCalDDDConstants::tileType(), HGCalParameters::hgtrap::tl, HGCalTopology::totalGeomModules(), twoBysqrt3_, findQualityFiles::v, HGCalDDDConstants::volumes(), w, HGCalParameters::waferCopy_, HGCalTopology::waferHexagon6(), HGCalDDDConstants::waferInLayer(), HGCalDDDConstants::waferPosition(), HGCalDDDConstants::waferTypeT(), HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), geometryCSVtoXML::xx, HGCalParameters::hgtrform::zp, and ecaldqm::zside().
Referenced by HGCalGeometryESProducer::produce().
◆ buildGeom()
void HGCalGeometryLoader::buildGeom |
( |
const ParmVec & |
params, |
|
|
const HepGeom::Transform3D & |
ht3d, |
|
|
const DetId & |
detId, |
|
|
HGCalGeometry * |
geom, |
|
|
int |
mode |
|
) |
| |
|
private |
Definition at line 183 of file HGCalGeometryLoader.cc.
196 GlobalPoint front(0.25 * (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x()),
197 0.25 * (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y()),
198 0.25 * (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z()));
200 GlobalPoint back(0.25 * (corners[4].
x() + corners[5].
x() + corners[6].
x() + corners[7].
x()),
201 0.25 * (corners[4].
y() + corners[5].
y() + corners[6].
y() + corners[7].
y()),
202 0.25 * (corners[4].
z() + corners[5].
z() + corners[6].
z() + corners[7].
z()));
204 if (front.mag2() > back.mag2()) {
208 geom->newCell(front, back, corners[0], parmPtr, detId);
218 (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x() + corners[4].
x() + corners[5].
x()),
220 (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y() + corners[4].
y() + corners[5].
y()),
222 (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z() + corners[4].
z() + corners[5].
z()));
226 (corners[6].
x() + corners[7].
x() + corners[8].
x() + corners[9].
x() + corners[10].
x() + corners[11].
x()),
228 (corners[6].
y() + corners[7].
y() + corners[8].
y() + corners[9].
y() + corners[10].
y() + corners[11].
y()),
230 (corners[6].
z() + corners[7].
z() + corners[8].
z() + corners[9].
z() + corners[10].
z() + corners[11].
z()));
232 if (front.mag2() > back.mag2()) {
237 geom->newCell(front, back, corners[0], parmPtr, detId);
References FlatHexagon::createCorners(), FlatTrd::createCorners(), relativeConstraints::geom, CaloCellGeometry::getParmPtr(), mps_fire::i, PV3DBase< T, PVType, FrameType >::mag2(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, FlatHexagon::ncorner_, FlatTrd::ncorner_, FlatHexagon::ncornerBy2_, FlatTrd::ncornerBy2_, FlatHexagon::oneBySix_, parametersPerShape_, CalibrationSummaryClient_cfi::params, std::swap(), x, y, and z.
Referenced by build().
◆ parametersPerShape_
int HGCalGeometryLoader::parametersPerShape_ |
|
private |
◆ twoBysqrt3_
const double HGCalGeometryLoader::twoBysqrt3_ |
|
private |
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
const HGCalDDDConstants & dddConstants() const
int waferTypeT(int wafer) const
std::pair< float, float > locateCellTrap(int lay, int ieta, int iphi, bool reco) const
unsigned int allGeomModules() const
static constexpr uint32_t k_Cell
CaloCellGeometry::CCGFloat CCGFloat
DetId::Detector detector() const
static constexpr uint32_t k_Phi
int32_t waferU(const int32_t index)
static constexpr unsigned int k_NumberOfShapes
unsigned int totalGeomModules() const
static constexpr unsigned int k_NumberOfParametersPerTrd
bool tileTrapezoid() const
int getTypeHex(int layer, int waferU, int waferV) const
static constexpr uint32_t k_Theta
static constexpr uint32_t k_r
std::vector< float > ParmVec
static constexpr uint32_t k_dX1
ForwardSubdetector subDetector() const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
static constexpr uint32_t k_Alp1
static constexpr unsigned int ncorner_
static constexpr uint32_t k_dY2
std::pair< int, int > tileType(int layer, int ring, int phi) const
bool waferInLayer(int wafer, int lay, bool reco) const
static constexpr uint32_t k_dX4
int layerIndex(int lay, bool reco) const
static constexpr unsigned int k_NumberOfParametersPerHex
int32_t waferV(const int32_t index)
bool waferHexagon6() const
std::vector< int > waferCopy_
static constexpr uint32_t k_R
static constexpr unsigned int ncornerBy2_
std::vector< int > iradMinBH_
constexpr std::array< uint8_t, layerIndexSize > layer
static constexpr unsigned int k_NumberOfShapesTrd
std::vector< int > firstModule_
HGCalGeometryMode::GeometryMode geomMode() const
Geometry mode.
static constexpr uint32_t k_dX3
static constexpr unsigned int ncornerBy2_
int scintType(const int layer) const
int scintCells(const int layer) const
static constexpr uint32_t k_dX2
double cellSizeHex(int type) const
static std::atomic< unsigned int > counter
Log< level::Error, false > LogError
void buildGeom(const ParmVec &, const HepGeom::Transform3D &, const DetId &, HGCalGeometry *, int mode)
HGCalParameters::hgtrform getTrForm(unsigned int k) const
static constexpr uint32_t k_dZ
constexpr uint32_t rawId() const
get the raw id
Log< level::Info, true > LogVerbatim
std::pair< double, double > waferPosition(int wafer, bool reco) const
std::vector< int > lastModule_
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
static constexpr double oneBySix_
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
static constexpr uint32_t k_Alp2
unsigned int getTrFormN() const
static constexpr unsigned int ncorner_
const HGCalParameters * getParameter() const
static constexpr uint32_t k_dY1
unsigned int volumes() const
static constexpr uint32_t k_dZ
HGCalParameters::hgtrap getModule(unsigned int k, bool hexType, bool reco) const