18 template <
typename DDD>
19 inline void check_ddd(
const DDD* ddd) {
21 throw cms::Exception(
"hgcal::HGCalTriggerTools") <<
"DDDConstants not accessible to hgcal::HGCalTriggerTools!";
25 template <
typename GEOM>
26 inline void check_geom(
const GEOM*
geom) {
27 if (
nullptr == geom) {
28 throw cms::Exception(
"hgcal::HGCalTriggerTools") <<
"Geometry not provided yet to hgcal::HGCalTriggerTools!";
51 throw cms::Exception(
"hgcal::HGCalTriggerTools") <<
"method getTCPosition called for DetId not belonging to a TC";
119 unsigned int l =
layer(
id);
134 em = (
id.subdetId() ==
HGCEE);
144 bool silicon =
false;
146 silicon = (
id.subdetId() !=
HGCHEB);
172 unsigned det =
id.det();
182 std::array<unsigned, 3>
occurences = {{0, 0, 0}};
185 occurences[c_thickness]++;
187 thickness = std::max_element(occurences.begin(), occurences.end()) - occurences.begin();
201 return corrected_position.
eta();
206 return getEta(position, vertex_z);
210 float phi = atan2(position.
y(), position.
x());
221 float pt = hitEnergy / cosh(eta);
227 return getPt(position, hitEnergy, vertex_z);
240 return getLayerZ(subdet, layerWithOffset - offset);
244 float layerGlobalZ = 0.;
272 int layer = 0, cell = 0, sec = 0, subsec = 0, zp = 0;
276 auto recoLayerCell = dddConst.simToReco(cell, layer, sec, topo.
detectorType());
277 cell = recoLayerCell.first;
278 layer = recoLayerCell.second;
279 if (layer >= 0 && cell >= 0) {
297 switch (
id.subdetId()) {
const HcalDDDRecConstants * dddConstants() const
virtual geom_set getCellsFromTriggerCell(const unsigned cell_det_id) const =0
HGCalTriggerSubdetector subdet() const
get the subdetector
int zside() const
get the z-side of the cell (1/-1)
const HGCalTopology & eeTopology() const
Global3DPoint GlobalPoint
int zside() const
get the z-side of the cell (1/-1)
bool detectorType() const
int zside() const
get the z-side of the cell (1/-1)
int type() const
get the type
std::pair< int, int > getEtaRange(const int &i) const
int layer() const
get the layer #
int depth() const
get the tower depth
unsigned int layers(bool reco) const
int zside() const
get the z-side of the cell (1/-1)
const HcalTopology & bhTopology() const
int type() const
get the type
int layer() const
get the layer #
double getRZ(const int &subdet, const int &ieta, const int &depth) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int waferTypeL(int wafer) const
double waferZ(int layer, bool reco) const
const HGCalDDDConstants & dddConstants() const
const HGCalTopology & hscTopology() const
int getMaxDepth(const int &type) const
bool isV9Geometry() const
int layer() const
get the layer #
int zside() const
get the z-side of the cell (1/-1)
static int position[264][3]
DetId relabel(const uint32_t testId) const
T const * product() const
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
const HGCalTopology & fhTopology() const
int layer() const
get the layer #
virtual GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const =0