20 #include <boost/range/irange.hpp> 201 flipped =
outer(detid) == 0;
284 unsigned int fedid = 9999;
321 return std::make_pair(digi->
row(), digi->
column());
327 int row = cluster->
x() - 0.5,
col = cluster->
y() - 0.5;
328 return std::make_pair(row,
col);
339 return std::make_pair(row, col);
350 nrows = topo->
nrows();
353 return (pixel.first + 0.5) / nrows;
370 return (pixel.second + 0.5) /
ncols;
386 int rowsperroc = 80, colsperroc = 52;
397 uint64_t(1 << 16) * detid.
rawId() + (1 << 8) * (pixel.first / rowsperroc) + pixel.second / colsperroc;
436 return channel(static_cast<const SiPixelRecHit*>(rechit->
hit()));
457 int rowsperroc = 80, colsperroc = 52;
468 uint64_t(1 << 16) * detid.
rawId() + (1 << 8) * (pixel.first / rowsperroc) + pixel.second / colsperroc;
469 if (
roc_.count(pseudo_roc_num))
470 return roc_[pseudo_roc_num];
496 int rocX = pixel.first / rowsperroc, rocY = pixel.second / colsperroc;
499 int v1x8 =
half(detid) == 1, v1x2 = (pan == 1 &&
mod == 1), v1x5 = (pan == 1 &&
mod == 4);
500 if (v1x8 || v1x2 || v1x5)
508 rocY = rocsY - 1 - rocY;
511 roc = rocX ? rocY : 2 * rocsY - 1 - rocY;
513 return roc_[pseudo_roc_num] =
roc;
533 return roc(static_cast<const SiPixelRecHit*>(rechit->
hit()));
693 ring_coord += coord_shift;
714 return ring_coord(static_cast<const SiPixelRecHit*>(rechit->
hit()));
727 disk_coord += coord_shift;
748 return disk_coord(static_cast<const SiPixelRecHit*>(rechit->
hit()));
759 if (signed_disk_coord < 0)
760 coord_shift = -coord_shift;
761 signed_disk_coord += coord_shift;
793 coord_shift = (
ring_coord(detid, pixel) - 1.5) / 2.0;
794 disk_ring_coord += coord_shift;
826 coord_shift = (
ring_coord(detid, pixel) - 1.5) / 2.0;
828 if (signed_disk_ring_coord < 0)
829 coord_shift = -coord_shift;
830 signed_disk_ring_coord += coord_shift;
872 if (
side(detid) == 1)
873 coord_shift = -coord_shift;
876 if ((
side(detid) +
panel(detid)) % 2 == 0)
877 coord_shift = -coord_shift;
879 blade_coord += coord_shift;
900 return blade_coord(static_cast<const SiPixelRecHit*>(rechit->
hit()));
917 if (
side(detid) == 2)
918 coord_shift = -coord_shift;
921 if ((
side(detid) +
panel(detid)) % 2 == 1)
922 coord_shift = -coord_shift;
924 signed_blade_coord += coord_shift;
957 float coord_shift = (
blade_coord(detid, pixel) - blade_panel_coord +
panel(detid) - 1.5) / 2;
958 blade_panel_coord += coord_shift;
993 signed_blade_panel_coord += coord_shift;
1026 float coord_shift = (
signed_blade_coord(detid, pixel) - signed_shifted_blade_panel_coord -
panel(detid) + 1.5) / 2;
1028 signed_shifted_blade_panel_coord *= 1.5;
1029 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 > &)
virtual int nrows() const =0
int signed_blade(const DetId &)
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
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_
virtual int rowsperroc() const =0
bool isPixel_(const DetId &)
std::unordered_map< uint32_t, int > sector_
int moduleName() const
module id (index in z)
std::unordered_map< uint32_t, int > ladder_
std::unordered_map< uint32_t, int > signed_disk_
void init(edm::EventSetup const &)
unsigned int pxfDisk(const DetId &id) const
float ladder_coord(const DetId &, const std::pair< int, int > &)
int signed_disk(const DetId &)
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
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_
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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_
std::unordered_map< uint32_t, int > signed_blade_
int roc(const DetId &, const std::pair< int, int > &)
std::unordered_map< uint32_t, int > disk_
std::unordered_map< uint32_t, unsigned int > det2fedMap() const final
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_
const GeomDetUnit * detUnit() const override
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.
virtual int ncolumns() const =0
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
unsigned int pxfSide(const DetId &id) const
std::vector< unsigned int > fedIds() const
LocalPoint localPosition() const final
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 > &)
T const * product() const
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