#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 98 of file HGCalNumberingScheme.cc.
99 std::pair<float, float>
xy;
101 double z1(0), tolR(12.0), tolZ(1.0);
107 xy =
hgcons_.
locateCell(lay,
id.waferU(),
id.waferV(),
id.cellU(),
id.cellV(),
false,
true);
123 double r2 =
pos.perp();
128 bool inok = ((
r2 >= rrange.first) && (
r2 <= rrange.second) && (
z2 >=
zrange.first) && (
z2 <=
zrange.second));
129 bool outok = ((
r1 >= rrange.first) && (
r1 <= rrange.second) && (z1 >=
zrange.first) && (z1 <=
zrange.second));
130 std::string ck = (((
r1 < rrange.first - tolR) || (
r1 > rrange.second + tolR) || (z1 <
zrange.first - tolZ) ||
131 (z1 >
zrange.second + tolZ))
132 ?
"***** ERROR *****"
134 if (!(
match && inok && outok)) {
135 edm::LogVerbatim(
"HGCSim") <<
"HGCalNumberingScheme::Detector " <<
det_ <<
" Layer " << lay <<
" R " <<
r2 <<
":"
136 <<
r1 <<
":" << rrange.first <<
":" << rrange.second <<
" Z " <<
z2 <<
":" << z1 <<
":"
137 <<
zrange.first <<
":" <<
zrange.second <<
" Match " <<
match <<
":" << inok <<
":"
138 << outok <<
" " << ck;
142 double wt = 0,
xx = ((
pos.z() > 0) ?
pos.x() : -
pos.x());
143 int waferU, waferV, cellU, cellV, waferType;
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(), 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) {
58 edm::LogVerbatim(
"HGCSim") <<
"HGCalNumberingScheme:: " <<
name_ <<
" Layer|u|v|Index|module|cell " << layer
59 <<
":" << waferU <<
":" << waferV <<
":"
61 <<
":" << cell <<
" has a type mismatch " << waferType <<
":" <<
type;
69 edm::LogVerbatim(
"HGCSim") <<
"OK WaferType " << waferType <<
" Wafer " << waferU <<
":" << waferV <<
" Cell "
70 << cellU <<
":" << cellV;
72 edm::LogVerbatim(
"HGCSim") <<
"Bad WaferType " << waferType <<
" for Layer:u:v " << layer <<
":" << waferU <<
":"
81 edm::LogVerbatim(
"HGCSim") <<
"Radius/Phi " <<
id[0] <<
":" <<
id[1] <<
" Type " <<
id[2] <<
" Layer|iz " << layer
84 edm::LogVerbatim(
"HGCSim") <<
"Radius/Phi " <<
id[0] <<
":" <<
id[1] <<
" Type " <<
id[2] <<
" Layer|iz " << layer
85 <<
":" << iz <<
" ERROR";
90 edm::LogVerbatim(
"HGCSim") <<
"HGCalNumberingScheme::i/p " <<
det_ <<
":" << layer <<
":" << module <<
":" << cell
91 <<
":" << iz <<
":" <<
pos.x() <<
":" <<
pos.y() <<
":" <<
pos.z() <<
" ID " << std::hex
References HGCalDDDConstants::assignCellTrap(), checkPosition(), TauDecayModes::dec, det_, HGCalTypes::getUnpackedCellU(), HGCalTypes::getUnpackedCellV(), HGCalTypes::getUnpackedType(), HGCalTypes::getUnpackedU(), HGCalTypes::getUnpackedV(), HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8File, HGCalGeometryMode::Hexagon8Full, HGCSiliconDetId::HGCalCoarseThick, hgcons_, mode_, name_, DetId::rawId(), HGCalDDDConstants::tileTrapezoid(), HGCalGeometryMode::Trapezoid, HGCalGeometryMode::TrapezoidFile, HGCalDDDConstants::waferFromPosition(), HGCalDDDConstants::waferHexagon8(), HGCalWaferIndex::waferIndex(), HGCalDDDConstants::waferType(), 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.