16 using namespace hgcal;
19 constexpr char hgcalee_sens[] =
"HGCalEESensitive";
20 constexpr char hgcalfh_sens[] =
"HGCalHESiliconSensitive";
22 constexpr std::float_t idx_to_thickness = std::float_t(100.0);
26 const unsigned int fhOffset = 28;
27 const unsigned int bhOffset = fhOffset + 12;
29 template<
typename DDD>
30 inline void check_ddd(
const DDD* ddd) {
31 if(
nullptr == ddd ) {
33 <<
"DDDConstants not accessibl to hgcal::RecHitTools!";
37 template<
typename GEOM>
38 inline void check_geom(
const GEOM*
geom) {
39 if(
nullptr == geom ) {
41 <<
"Geometry not provided yet to hgcal::RecHitTools!";
91 <<
"det id: " <<
id.rawId() <<
" is not HGCal silicon!";
94 auto ddd = get_ddd(geom,hid);
95 unsigned int wafer = hid.
wafer();
97 return idx_to_thickness*tidx;
105 <<
"det id: " <<
id.rawId() <<
" is not HGCal silicon!";
109 auto ddd = get_ddd(geom,hid);
121 layer = hcid.
depth();
139 <<
"det id: " <<
id.rawId() <<
" is not HGCal silicon!";
143 unsigned int wafer = hid.
wafer();
150 <<
"det id: " <<
id.rawId() <<
" is not HGCal silicon!";
154 unsigned int cell = hid.
cell();
165 auto ddd = get_ddd(geom,hid);
172 return corrected_position.
eta();
182 float phi = atan2(position.
y(),position.
x());
188 float phi = atan2(position.
y(),position.
x());
194 float pt = hitEnergy / cosh(eta);
201 float pt = hitEnergy / cosh(eta);
bool isHalfCell(int waferType, int cell) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
const HcalDDDRecConstants * dddConstants() const
double cellSizeHex(int type) const
Global3DPoint GlobalPoint
GlobalPoint getPosition(const DetId &id) const
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
const HcalTopology & topology() const
int depth() const
get the tower depth
const HGCalTopology & topology() const
int wafer() const
get the wafer #
int waferTypeL(int wafer) const
int cell() const
get the absolute value of the cell #'s in x and y
const HGCalDDDConstants & dddConstants() const
T const * product() const
Geom::Phi< T > phi() const
static int position[264][3]
int waferType() const
get the wafer type
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
int waferTypeT(int wafer) const
tuple size
Write out results.
int layer() const
get the layer #