#include <HGCalNumberingScheme.h>
Definition at line 16 of file HGCalNumberingScheme.h.
◆ HGCalNumberingScheme() [1/2]
◆ ~HGCalNumberingScheme()
HGCalNumberingScheme::~HGCalNumberingScheme |
( |
| ) |
|
◆ HGCalNumberingScheme() [2/2]
HGCalNumberingScheme::HGCalNumberingScheme |
( |
| ) |
|
|
privatedelete |
◆ checkPosition()
void HGCalNumberingScheme::checkPosition |
( |
uint32_t |
index, |
|
|
const G4ThreeVector & |
pos |
|
) |
| const |
|
private |
Definition at line 106 of file HGCalNumberingScheme.cc.
107 std::pair<float, float>
xy;
109 double z1(0), tolR(12.0), tolZ(1.0);
131 double r2 =
pos.perp();
136 bool inok = ((
r2 >= rrange.first) && (
r2 <= rrange.second) && (
z2 >=
zrange.first) && (
z2 <=
zrange.second));
137 bool outok = ((
r1 >= rrange.first) && (
r1 <= rrange.second) && (z1 >=
zrange.first) && (z1 <=
zrange.second));
138 std::string ck = (((
r1 < rrange.first - tolR) || (
r1 > rrange.second + tolR) || (z1 <
zrange.first - tolZ) ||
139 (z1 >
zrange.second + tolZ))
140 ?
"***** ERROR *****"
142 if (!(
match && inok && outok)) {
143 edm::LogVerbatim(
"HGCSim") <<
"HGCalNumberingScheme::Detector " <<
det_ <<
" Layer " << lay <<
" R " <<
r2 <<
":"
144 <<
r1 <<
":" << rrange.first <<
":" << rrange.second <<
" Z " <<
z2 <<
":" << z1 <<
":"
145 <<
zrange.first <<
":" <<
zrange.second <<
" Match " <<
match <<
":" << inok <<
":"
146 << outok <<
" " << ck;
150 double wt = 0,
xx = ((
pos.z() > 0) ?
pos.x() : -
pos.x());
References funct::abs(), det_, DetId::HGCalHSc, DetId::HGCalHSi, hgcons_, LEDCalibrationChannels::iphi, HGCalDDDConstants::locateCell(), HGCalDDDConstants::locateCellTrap(), match(), convertSQLiteXML::ok, diffTwoXMLs::r1, diffTwoXMLs::r2, HGCalDDDConstants::rangeR(), HGCalDDDConstants::rangeZ(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, HGCalDDDConstants::waferFromPosition(), HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), HGCalDDDConstants::waferZ(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, testProducerWithPsetDescEmpty_cfi::z2, and TkClusParameters_cff::zrange.
Referenced by getUnitID().
◆ getUnitID()
uint32_t HGCalNumberingScheme::getUnitID |
( |
int |
layer, |
|
|
int |
module, |
|
|
int |
cell, |
|
|
int |
iz, |
|
|
const G4ThreeVector & |
pos, |
|
|
double & |
wt |
|
) |
| |
assigns the det id to a hit
Definition at line 30 of file HGCalNumberingScheme.cc.
35 edm::LogVerbatim(
"HGCSim") <<
"HGCalNumberingScheme:: input Layer " <<
layer <<
" Module " << module <<
" Cell "
36 << cell <<
" iz " << iz <<
" Position " <<
pos <<
" Mode " <<
mode_ <<
":"
42 int cellU(0), cellV(0), waferType(-1),
waferU(0),
waferV(0);
56 if (
type != waferType) {
61 <<
":" << cell <<
" has a type mismatch " << waferType <<
":" <<
type;
70 << cellU <<
":" << cellV;
81 if (typm.first >= 0) {
82 detId.setType(typm.first);
83 detId.setSiPM(typm.second);
85 index = detId.rawId();
88 edm::LogVerbatim(
"HGCSim") <<
"Radius/Phi " <<
id[0] <<
":" <<
id[1] <<
" Type " <<
id[2] <<
":" << typm.first
89 <<
" SiPM " << typm.second <<
":" <<
hgcons_.
tileSiPM(typm.second) <<
" Layer "
90 <<
layer <<
":" << lay <<
" z " << iz <<
" " << detId;
92 edm::LogVerbatim(
"HGCSim") <<
"Radius/Phi " <<
id[0] <<
":" <<
id[1] <<
" Type " <<
id[2] <<
" Layer|iz " <<
layer
93 <<
":" << iz <<
" ERROR";
99 <<
":" << iz <<
":" <<
pos.x() <<
":" <<
pos.y() <<
":" <<
pos.z() <<
" ID " << std::hex
References HGCalDDDConstants::assignCellTrap(), checkPosition(), TauDecayModes::dec, det_, HGCalDDDConstants::getLayerOffset(), HGCalTypes::getUnpackedCellU(), HGCalTypes::getUnpackedCellV(), HGCalTypes::getUnpackedType(), HGCalTypes::getUnpackedU(), HGCalTypes::getUnpackedV(), HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8File, HGCalGeometryMode::Hexagon8Full, HGCSiliconDetId::HGCalCoarseThick, hgcons_, phase1PixelTopology::layer, mode_, name_, DetId::rawId(), HGCScintillatorDetId::setSiPM(), HGCScintillatorDetId::setType(), HGCalDDDConstants::tileSiPM(), HGCalDDDConstants::tileTrapezoid(), HGCalDDDConstants::tileType(), HGCalGeometryMode::Trapezoid, HGCalGeometryMode::TrapezoidFile, HGCalDDDConstants::waferFromPosition(), HGCalDDDConstants::waferHexagon8(), HGCalWaferIndex::waferIndex(), HGCalDDDConstants::waferType(), HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), and geometryCSVtoXML::xx.
◆ det_
◆ hgcons_
◆ mode_
◆ name_
std::string HGCalNumberingScheme::name_ |
|
private |
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.