18 throw cms::Exception(
"mtd::MTDGeomUtil") <<
"DetId " << hid.rawId() <<
" not in MTD!" << std::endl;
19 if (subDet == MTDDetId::MTDType::ETL)
34 if (thedet ==
nullptr)
35 throw cms::Exception(
"mtd::MTDGeomUtil") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 41 global_point = thedet->
toGlobal(local_point);
46 if (thedet ==
nullptr)
47 throw cms::Exception(
"mtd::MTDGeomUtil") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 53 global_point = thedet->
toGlobal(local_point);
55 return {local_point, global_point};
64 if (thedet ==
nullptr)
65 throw cms::Exception(
"mtd::MTDGeomUtil") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 69 auto local_point_sim =
71 global_point = thedet->
toGlobal(local_point_sim);
76 if (thedet ==
nullptr)
77 throw cms::Exception(
"mtd::MTDGeomUtil") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 79 global_point = thedet->
toGlobal(local_point);
90 unsigned int layer(0);
114 <<
"ID: " << std::hex <<
id.rawId() <<
" from BTL. This method is for ETL only." << std::endl;
118 if (thedet ==
nullptr)
119 throw cms::Exception(
"mtd::MTDGeomUtil") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" <<
detId.rawId()
120 <<
") is invalid!" <<
std::dec << std::endl;
124 return topo.
pixel(local_point);
133 if (thedet ==
nullptr)
134 throw cms::Exception(
"mtd::MTDGeomUtil") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 135 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
138 const auto& thepixel = topo.
pixelIndex(local_point);
139 uint8_t row =
static_cast<uint8_t
>(thepixel.first);
140 uint8_t
col =
static_cast<uint8_t
>(thepixel.second);
141 return std::pair<uint8_t, uint8_t>(row,
col);
146 if (thedet ==
nullptr)
147 throw cms::Exception(
"mtd::MTDGeomUtil") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 148 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
152 const auto& thepixel = topo.
pixelIndex(topo_point);
153 uint8_t row =
static_cast<uint8_t
>(thepixel.first);
154 uint8_t
col =
static_cast<uint8_t
>(thepixel.second);
155 return std::pair<uint8_t, uint8_t>(row,
col);
169 return (geoId.
rawId());
173 return (geoId.
rawId());
179 return corrected_position.
eta();
201 float pt = hitEnergy / cosh(Eta);
207 const float& hitEnergy,
208 const float& vertex_z)
const {
211 float pt = hitEnergy / cosh(Eta);
int getMTDTopologyMode() const
int crystalInModule(const DetId &) const
Point3DBase< Scalar, LocalTag > LocalPoint
GlobalPoint globalPosition(const DetId &id, const LocalPoint &local_point) const
std::pair< float, float > pixelInModule(const DetId &id, const int row, const int column) const
virtual const Topology & topology() const
virtual const PixelTopology & specificTopology() const
Global3DPoint GlobalPoint
int mtdSubDetector() const
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
void setTopology(MTDTopology const *topo)
Detector identifier base class for the MIP Timing Layer.
std::pair< float, float > pixel(const LocalPoint &p) const override
float localX(const float mpX) const override
unsigned int layer(const DetId &) const
bool isBTL(const DetId &) const
float phi(const GlobalPoint &position) const
const MTDGeomDet * idToDet(DetId) const override
int nrows() const override
uint32_t sensorModuleId(const DetId &id) const
std::pair< LocalPoint, GlobalPoint > position(const DetId &id, int row=0, int column=0) const
void setGeometry(MTDGeometry const *geom)
const MTDTopology * topology_
float localY(const float mpY) const override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
int zside(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
bool isETL(const DetId &) const
Detector identifier class for the Endcap Timing Layer.
float pt(const GlobalPoint &position, const float &hitEnergy, const float &vertex_z=0.) const
float eta(const GlobalPoint &position, const float &vertex_z=0.) const
static int position[264][3]
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
const MTDGeometry * geom_
std::pair< int, int > pixelIndex(const LocalPoint &p) const
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)
int module(const DetId &) const