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.
pixel(local_point);
139 uint8_t row(thepixel.first),
col(thepixel.second);
140 return std::pair<uint8_t, uint8_t>(row,
col);
145 if (thedet ==
nullptr)
146 throw cms::Exception(
"mtd::MTDGeomUtil") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 147 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
151 const auto& thepixel = topo.
pixel(topo_point);
152 uint8_t row(thepixel.first),
col(thepixel.second);
153 return std::pair<uint8_t, uint8_t>(row,
col);
164 return corrected_position.
eta();
186 float pt = hitEnergy / cosh(Eta);
192 const float& hitEnergy,
193 const float& vertex_z)
const {
196 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
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_
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)
int module(const DetId &) const