18 #include <boost/range/irange.hpp>
191 flipped =
outer(detid) == 0;
274 unsigned int fedid = 9999;
311 return std::make_pair(digi->
row(), digi->
column());
317 int row = cluster->
x() - 0.5,
col = cluster->
y() - 0.5;
318 return std::make_pair(row,
col);
329 return std::make_pair(row, col);
340 nrows = topo->
nrows();
343 return (pixel.first + 0.5) / nrows;
360 return (pixel.second + 0.5) / ncols;
376 int rowsperroc = 80, colsperroc = 52;
387 uint64_t(1 << 16) * detid.
rawId() + (1 << 8) * (pixel.first / rowsperroc) + pixel.second / colsperroc;
426 return channel(static_cast<const SiPixelRecHit*>(rechit->
hit()));
447 int rowsperroc = 80, colsperroc = 52;
458 uint64_t(1 << 16) * detid.
rawId() + (1 << 8) * (pixel.first / rowsperroc) + pixel.second / colsperroc;
459 if (
roc_.count(pseudo_roc_num))
460 return roc_[pseudo_roc_num];
486 int rocX = pixel.first / rowsperroc, rocY = pixel.second / colsperroc;
489 int v1x8 =
half(detid) == 1, v1x2 = (pan == 1 &&
mod == 1), v1x5 = (pan == 1 &&
mod == 4);
490 if (v1x8 || v1x2 || v1x5)
498 rocY = rocsY - 1 - rocY;
501 roc = rocX ? rocY : 2 * rocsY - 1 - rocY;
503 return roc_[pseudo_roc_num] =
roc;
523 return roc(static_cast<const SiPixelRecHit*>(rechit->
hit()));
683 ring_coord += coord_shift;
704 return ring_coord(static_cast<const SiPixelRecHit*>(rechit->
hit()));
717 disk_coord += coord_shift;
738 return disk_coord(static_cast<const SiPixelRecHit*>(rechit->
hit()));
749 if (signed_disk_coord < 0)
750 coord_shift = -coord_shift;
751 signed_disk_coord += coord_shift;
783 coord_shift = (
ring_coord(detid, pixel) - 1.5) / 2.0;
784 disk_ring_coord += coord_shift;
816 coord_shift = (
ring_coord(detid, pixel) - 1.5) / 2.0;
818 if (signed_disk_ring_coord < 0)
819 coord_shift = -coord_shift;
820 signed_disk_ring_coord += coord_shift;
862 if (
side(detid) == 1)
863 coord_shift = -coord_shift;
866 if ((
side(detid) +
panel(detid)) % 2 == 0)
867 coord_shift = -coord_shift;
869 blade_coord += coord_shift;
890 return blade_coord(static_cast<const SiPixelRecHit*>(rechit->
hit()));
907 if (
side(detid) == 2)
908 coord_shift = -coord_shift;
911 if ((
side(detid) +
panel(detid)) % 2 == 1)
912 coord_shift = -coord_shift;
914 signed_blade_coord += coord_shift;
947 float coord_shift = (
blade_coord(detid, pixel) - blade_panel_coord +
panel(detid) - 1.5) / 2;
948 blade_panel_coord += coord_shift;
983 signed_blade_panel_coord += coord_shift;
1016 float coord_shift = (
signed_blade_coord(detid, pixel) - signed_shifted_blade_panel_coord -
panel(detid) + 1.5) / 2;
1018 signed_shifted_blade_panel_coord *= 1.5;
1019 signed_shifted_blade_panel_coord += coord_shift;
float ycoord_on_module_(const DetId &, const std::pair< int, int > &)
int sector(const DetId &)
float signed_module_coord(const DetId &, const std::pair< int, int > &)
std::unordered_map< uint32_t, int > panel_
std::unordered_map< uint64_t, unsigned int > channel_
float signed_blade_panel_coord(const DetId &, const std::pair< int, int > &)
int signed_blade(const DetId &)
float disk_ring_coord(const DetId &, const std::pair< int, int > &)
float ring_coord(const DetId &, const std::pair< int, int > &)
std::unordered_map< uint32_t, int > half_
bool isPixel_(const DetId &)
const GeomDetUnit * detUnit() const override
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::unordered_map< uint32_t, int > sector_
int moduleName() const
module id (index in z)
virtual int ncolumns() const =0
std::unordered_map< uint32_t, int > ladder_
std::unordered_map< uint32_t, int > signed_disk_
unsigned int pxfDisk(const DetId &id) const
float ladder_coord(const DetId &, const std::pair< int, int > &)
int signed_disk(const DetId &)
virtual int rowsperroc() const =0
float disk_coord(const DetId &, const std::pair< int, int > &)
const TrackerTopology * tTopo_
unsigned int pxbLadder(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
virtual int nrows() const =0
float blade_coord(const DetId &, const std::pair< int, int > &)
unsigned int pxbModule(const DetId &id) const
unsigned int fedid(const DetId &)
int flipped(const DetId &)
int module(const DetId &)
virtual ~SiPixelCoordinates()
bool isThere(GeomDetEnumerators::SubDetector subdet) const
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
int bladeName() const
blade id
std::unordered_map< uint32_t, int > signed_module_
std::unordered_map< uint32_t, int > flipped_
std::unordered_map< uint32_t, int > ring_
std::unordered_map< uint32_t, int > outer_
bool isHalfModule() const
full or half module
virtual int colsperroc() const =0
std::unordered_map< uint32_t, int > layer_
std::unordered_map< uint32_t, int > module_
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int sectorName() const
sector id
int channel(const DetId &, const std::pair< int, int > &)
const SiPixelFedCablingMap * cablingMap_
void init(const TrackerTopology *, const TrackerGeometry *, const SiPixelFedCablingMap *)
std::unordered_map< uint32_t, int > signed_blade_
int roc(const DetId &, const std::pair< int, int > &)
std::unordered_map< uint32_t, int > disk_
unsigned int pxfModule(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
virtual TrackingRecHit const * hit() const
int ladderName() const
ladder id (index in phi)
unsigned long long uint64_t
std::unordered_map< uint32_t, int > signed_ladder_
const TrackerGeometry * tGeom_
int signed_module(const DetId &)
int toCabling(sipixelobjects::ElectronicIndex &cabling, const sipixelobjects::DetectorIndex &detector) const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
std::unordered_map< uint32_t, int > quadrant_
std::unordered_map< uint32_t, int > side_
int quadrant(const DetId &)
std::unordered_map< uint64_t, unsigned int > roc_
float xcoord_on_module_(const DetId &, const std::pair< int, int > &)
Pixel cluster – collection of neighboring pixels above threshold.
LocalPoint localPosition() const override
float signed_disk_coord(const DetId &, const std::pair< int, int > &)
sipixelobjects::PixelROC const * toRoc(int link, int roc) const
bool hasDetUnit(uint32_t radId) const
std::unordered_map< uint32_t, unsigned int > det2fedMap() const final
unsigned int pxfSide(const DetId &id) const
std::vector< unsigned int > fedIds() const
std::unordered_map< uint32_t, int > blade_
int ladder(const DetId &)
DetId geographicalId() const
float module_coord(const DetId &, const std::pair< int, int > &)
float signed_shifted_blade_panel_coord(const DetId &, const std::pair< int, int > &)
int ringName() const
ring Id
HalfCylinder halfCylinder() const
T mod(const T &a, const T &b)
float signed_blade_coord(const DetId &, const std::pair< int, int > &)
float signed_disk_ring_coord(const DetId &, const std::pair< int, int > &)
float blade_panel_coord(const DetId &, const std::pair< int, int > &)
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
float signed_ladder_coord(const DetId &, const std::pair< int, int > &)
int signed_ladder(const DetId &)
std::unordered_map< uint32_t, unsigned int > fedid_
bool isFPix_(const DetId &)
constexpr Detector det() const
get the detector field from this detid