18 using namespace hgcal;
21 template<
typename DDD>
22 inline void check_ddd(
const DDD* ddd) {
23 if(
nullptr == ddd ) {
25 <<
"DDDConstants not accessibl to hgcal::RecHitTools!";
29 template<
typename GEOM>
30 inline void check_geom(
const GEOM*
geom) {
31 if(
nullptr == geom ) {
33 <<
"Geometry not provided yet to hgcal::RecHitTools!";
54 int type,
int maxLayerEE,
79 unsigned int wmaxEE(0), wmaxFH(0);
85 wmaxEE = (geomEE->topology().dddConstants()).waferCount(0);
88 wmaxFH = (geomFH->topology().dddConstants()).waferCount(0);
95 wmaxEE = 1 + (geomEE->topology().dddConstants()).waferMax();
98 wmaxFH = 1 + (geomFH->topology().dddConstants()).waferMax();
127 double z = (layer > 0) ? ddd->
waferZ(lay,
true) : -ddd->
waferZ(lay,
true);
147 std::float_t thick(0.37);
150 auto ddd = get_ddd(geom,hid);
154 auto ddd = get_ddd(geom,hid);
157 LogDebug(
"getSiThickness::InvalidSiliconDetid")
158 <<
"det id: " << std::hex <<
id.rawId() <<
std::dec <<
":" 159 <<
id.det() <<
" is not HGCal silicon!";
172 if (thickness > 99. && thickness < 121.)
174 else if (thickness > 199. && thickness < 201.)
176 else if (thickness > 299. && thickness < 301.)
179 assert(thickIndex > 0 &&
"ERROR - silicon thickness has a nonsensical value");
191 auto ddd = get_ddd(geom,hid);
195 auto ddd = get_ddd(geom,hid);
199 <<
"det id: " << std::hex <<
id.rawId() <<
std::dec <<
":" 200 <<
id.det() <<
" is not HGCal silicon!";
211 layer = (geomEE->topology().dddConstants()).
layers(
true);
216 layer = (geomFH->topology().dddConstants()).
layers(
true);
221 layer = (geomBH->topology().dddConstants())->getMaxDepth(1);
226 layer = (geomEE->topology().dddConstants()).
layers(
true);
228 layer += (geomFH->topology().dddConstants()).
layers(
true);
230 layer += (geomBH->topology().dddConstants())->getMaxDepth(1);
235 return (
unsigned int)(layer);
244 layer = (geomEE->topology().dddConstants()).
layers(
true);
249 layer = (geomFH->topology().dddConstants()).
layers(
true);
254 layer = (geomBH->topology().dddConstants()).
layers(
true);
259 layer = (geomEE->topology().dddConstants()).
layers(
true);
261 layer += (geomFH->topology().dddConstants()).
layers(
true);
266 return (
unsigned int)(layer);
305 <<
"det id: " << std::hex <<
id.rawId() <<
std::dec <<
":" 306 <<
id.det() <<
" is not HGCal silicon!";
308 return std::pair<int,int>(waferU,waferV);
321 <<
"det id: " << std::hex <<
id.rawId() <<
std::dec <<
":" 322 <<
id.det() <<
" is not HGCal silicon!";
324 return std::pair<int,int>(cellU,cellV);
332 auto ddd = get_ddd(geom,hid);
342 return corrected_position.
eta();
352 float phi = atan2(position.
y(),position.
x());
358 float phi = atan2(position.
y(),position.
x());
364 float pt = hitEnergy / cosh(eta);
371 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
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
double cellSizeHex(int type) const
double cellThickness(int layer, int waferU, int waferV) const
int zside() const
get the z-side of the cell (1/-1)
Global3DPoint GlobalPoint
GlobalPoint getPosition(const DetId &id) const
int zside() const
get the z-side of the cell (1/-1)
int cellU() const
get the cell #'s in u,v or in x,y
int depth() const
get the tower depth
int zside() const
get the z-side of the cell (1/-1)
int type() const
get the type
int layer() const
get the layer #
const HGCalTopology & topology() const
Abs< T >::type abs(const T &t)
int wafer() const
get the wafer #
double waferZ(int layer, bool reco) const
int cell() const
get the absolute value of the cell #'s in x and y
const HGCalDDDConstants & dddConstants() const
bool maskCell(const DetId &id, int corners) const
int layer() const
get the layer #
int zside() const
get the z-side of the cell (1/-1)
static int position[264][3]
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
int waferType() const
get the wafer type
int waferTypeT(int wafer) const
T const * product() const
int layer() const
get the layer #