CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiPixelCoordinates Class Reference

#include <SiPixelCoordinates.h>

Public Member Functions

int blade (const DetId &)
 
float blade_coord (const DetId &, const std::pair< int, int > &)
 
float blade_coord (const DetId &, const PixelDigi *)
 
float blade_coord (const DetId &, const SiPixelCluster *)
 
float blade_coord (const SiPixelRecHit *)
 
float blade_coord (const TrackingRecHit *)
 
float blade_panel_coord (const DetId &, const std::pair< int, int > &)
 
float blade_panel_coord (const DetId &, const PixelDigi *)
 
float blade_panel_coord (const DetId &, const SiPixelCluster *)
 
float blade_panel_coord (const SiPixelRecHit *)
 
float blade_panel_coord (const TrackingRecHit *)
 
int channel (const DetId &, const std::pair< int, int > &)
 
int channel (const DetId &, const PixelDigi *)
 
int channel (const DetId &, const SiPixelCluster *)
 
int channel (const SiPixelRecHit *)
 
int channel (const TrackingRecHit *)
 
int disk (const DetId &)
 
float disk_coord (const DetId &, const std::pair< int, int > &)
 
float disk_coord (const DetId &, const PixelDigi *)
 
float disk_coord (const DetId &, const SiPixelCluster *)
 
float disk_coord (const SiPixelRecHit *)
 
float disk_coord (const TrackingRecHit *)
 
float disk_ring_coord (const DetId &, const std::pair< int, int > &)
 
float disk_ring_coord (const DetId &, const PixelDigi *)
 
float disk_ring_coord (const DetId &, const SiPixelCluster *)
 
float disk_ring_coord (const SiPixelRecHit *)
 
float disk_ring_coord (const TrackingRecHit *)
 
unsigned int fedid (const DetId &)
 
int flipped (const DetId &)
 
int half (const DetId &)
 
void init (edm::EventSetup const &)
 
int ladder (const DetId &)
 
float ladder_coord (const DetId &, const std::pair< int, int > &)
 
float ladder_coord (const DetId &, const PixelDigi *)
 
float ladder_coord (const DetId &, const SiPixelCluster *)
 
float ladder_coord (const SiPixelRecHit *)
 
float ladder_coord (const TrackingRecHit *)
 
int layer (const DetId &)
 
int module (const DetId &)
 
float module_coord (const DetId &, const std::pair< int, int > &)
 
float module_coord (const DetId &, const PixelDigi *)
 
float module_coord (const DetId &, const SiPixelCluster *)
 
float module_coord (const SiPixelRecHit *)
 
float module_coord (const TrackingRecHit *)
 
int outer (const DetId &)
 
int panel (const DetId &)
 
int quadrant (const DetId &)
 
int ring (const DetId &)
 
float ring_coord (const DetId &, const std::pair< int, int > &)
 
float ring_coord (const DetId &, const PixelDigi *)
 
float ring_coord (const DetId &, const SiPixelCluster *)
 
float ring_coord (const SiPixelRecHit *)
 
float ring_coord (const TrackingRecHit *)
 
int roc (const DetId &, const std::pair< int, int > &)
 
int roc (const DetId &, const PixelDigi *)
 
int roc (const DetId &, const SiPixelCluster *)
 
int roc (const SiPixelRecHit *)
 
int roc (const TrackingRecHit *)
 
int sector (const DetId &)
 
int side (const DetId &)
 
int signed_blade (const DetId &)
 
float signed_blade_coord (const DetId &, const std::pair< int, int > &)
 
float signed_blade_coord (const DetId &, const PixelDigi *)
 
float signed_blade_coord (const DetId &, const SiPixelCluster *)
 
float signed_blade_coord (const SiPixelRecHit *)
 
float signed_blade_coord (const TrackingRecHit *)
 
float signed_blade_panel_coord (const DetId &, const std::pair< int, int > &)
 
float signed_blade_panel_coord (const DetId &, const PixelDigi *)
 
float signed_blade_panel_coord (const DetId &, const SiPixelCluster *)
 
float signed_blade_panel_coord (const SiPixelRecHit *)
 
float signed_blade_panel_coord (const TrackingRecHit *)
 
int signed_disk (const DetId &)
 
float signed_disk_coord (const DetId &, const std::pair< int, int > &)
 
float signed_disk_coord (const DetId &, const PixelDigi *)
 
float signed_disk_coord (const DetId &, const SiPixelCluster *)
 
float signed_disk_coord (const SiPixelRecHit *)
 
float signed_disk_coord (const TrackingRecHit *)
 
float signed_disk_ring_coord (const DetId &, const std::pair< int, int > &)
 
float signed_disk_ring_coord (const DetId &, const PixelDigi *)
 
float signed_disk_ring_coord (const DetId &, const SiPixelCluster *)
 
float signed_disk_ring_coord (const SiPixelRecHit *)
 
float signed_disk_ring_coord (const TrackingRecHit *)
 
int signed_ladder (const DetId &)
 
float signed_ladder_coord (const DetId &, const std::pair< int, int > &)
 
float signed_ladder_coord (const DetId &, const PixelDigi *)
 
float signed_ladder_coord (const DetId &, const SiPixelCluster *)
 
float signed_ladder_coord (const SiPixelRecHit *)
 
float signed_ladder_coord (const TrackingRecHit *)
 
int signed_module (const DetId &)
 
float signed_module_coord (const DetId &, const std::pair< int, int > &)
 
float signed_module_coord (const DetId &, const PixelDigi *)
 
float signed_module_coord (const DetId &, const SiPixelCluster *)
 
float signed_module_coord (const SiPixelRecHit *)
 
float signed_module_coord (const TrackingRecHit *)
 
float signed_shifted_blade_panel_coord (const DetId &, const std::pair< int, int > &)
 
float signed_shifted_blade_panel_coord (const DetId &, const PixelDigi *)
 
float signed_shifted_blade_panel_coord (const DetId &, const SiPixelCluster *)
 
float signed_shifted_blade_panel_coord (const SiPixelRecHit *)
 
float signed_shifted_blade_panel_coord (const TrackingRecHit *)
 
 SiPixelCoordinates ()
 
 SiPixelCoordinates (int)
 
virtual ~SiPixelCoordinates ()
 

Private Member Functions

bool isBPix_ (const DetId &)
 
bool isFPix_ (const DetId &)
 
bool isPixel_ (const DetId &)
 
std::pair< int, int > pixel_ (const PixelDigi *)
 
std::pair< int, int > pixel_ (const SiPixelCluster *)
 
std::pair< int, int > pixel_ (const SiPixelRecHit *)
 
float xcoord_on_module_ (const DetId &, const std::pair< int, int > &)
 
float ycoord_on_module_ (const DetId &, const std::pair< int, int > &)
 

Private Attributes

std::unordered_map< uint32_t, int > blade_
 
const SiPixelFedCablingMapcablingMap_
 
std::unordered_map< uint64_t, unsigned int > channel_
 
std::unordered_map< uint32_t, int > disk_
 
std::unordered_map< uint32_t, unsigned int > fedid_
 
std::unordered_map< uint32_t, int > flipped_
 
std::unordered_map< uint32_t, int > half_
 
std::unordered_map< uint32_t, int > ladder_
 
std::unordered_map< uint32_t, int > layer_
 
std::unordered_map< uint32_t, int > module_
 
std::unordered_map< uint32_t, int > outer_
 
std::unordered_map< uint32_t, int > panel_
 
int phase_
 
std::unordered_map< uint32_t, int > quadrant_
 
std::unordered_map< uint32_t, int > ring_
 
std::unordered_map< uint64_t, unsigned int > roc_
 
std::unordered_map< uint32_t, int > sector_
 
std::unordered_map< uint32_t, int > side_
 
std::unordered_map< uint32_t, int > signed_blade_
 
std::unordered_map< uint32_t, int > signed_disk_
 
std::unordered_map< uint32_t, int > signed_ladder_
 
std::unordered_map< uint32_t, int > signed_module_
 
const TrackerGeometrytGeom_
 
const TrackerTopologytTopo_
 

Detailed Description

Definition at line 34 of file SiPixelCoordinates.h.

Constructor & Destructor Documentation

SiPixelCoordinates::SiPixelCoordinates ( )

Definition at line 24 of file SiPixelCoordinates.cc.

References phase_.

24 { phase_ = -1; }
SiPixelCoordinates::SiPixelCoordinates ( int  phase)

Definition at line 26 of file SiPixelCoordinates.cc.

SiPixelCoordinates::~SiPixelCoordinates ( )
virtual

Definition at line 28 of file SiPixelCoordinates.cc.

28 {}

Member Function Documentation

int SiPixelCoordinates::blade ( const DetId detid)

Definition at line 257 of file SiPixelCoordinates.cc.

References blade_, isFPix_(), TrackerTopology::pxfBlade(), DetId::rawId(), and tTopo_.

Referenced by blade_coord(), and blade_panel_coord().

257  {
258  if (blade_.count(detid.rawId()))
259  return blade_[detid.rawId()];
260  if (!isFPix_(detid))
261  return blade_[detid.rawId()] = -9999;
262  return blade_[detid.rawId()] = tTopo_->pxfBlade(detid);
263 }
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::unordered_map< uint32_t, int > blade_
unsigned int pxfBlade(const DetId &id) const
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 865 of file SiPixelCoordinates.cc.

References blade(), isFPix_(), module(), panel(), phase_, side(), xcoord_on_module_(), and ycoord_on_module_().

Referenced by blade_coord(), and blade_panel_coord().

865  {
866  if (!isFPix_(detid))
867  return -9999;
868  float blade_coord = blade(detid), coord_shift = 0;
869  if (phase_ == 0) {
870  int rocsY = panel(detid) + module(detid);
871  coord_shift = ycoord_on_module_(detid, pixel) - rocsY / 10.;
872  if (side(detid) == 1)
873  coord_shift = -coord_shift;
874  } else if (phase_ == 1) {
875  coord_shift = xcoord_on_module_(detid, pixel) - 0.5;
876  if ((side(detid) + panel(detid)) % 2 == 0)
877  coord_shift = -coord_shift;
878  }
879  blade_coord += coord_shift;
880  return blade_coord;
881 }
float ycoord_on_module_(const DetId &, const std::pair< int, int > &)
int side(const DetId &)
int blade(const DetId &)
float blade_coord(const DetId &, const std::pair< int, int > &)
int module(const DetId &)
int panel(const DetId &)
float xcoord_on_module_(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 882 of file SiPixelCoordinates.cc.

References blade_coord(), isFPix_(), and pixel_().

882  {
883  if (!isFPix_(detid))
884  return -9999;
885  return blade_coord(detid, pixel_(digi));
886 }
float blade_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 887 of file SiPixelCoordinates.cc.

References blade_coord(), isFPix_(), and pixel_().

887  {
888  if (!isFPix_(detid))
889  return -9999;
890  return blade_coord(detid, pixel_(cluster));
891 }
float blade_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_coord ( const SiPixelRecHit rechit)

Definition at line 892 of file SiPixelCoordinates.cc.

References blade_coord(), TrackingRecHit::geographicalId(), isFPix_(), and pixel_().

892  {
893  if (!isFPix_(rechit->geographicalId()))
894  return -9999;
895  return blade_coord(rechit->geographicalId(), pixel_(rechit));
896 }
float blade_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_coord ( const TrackingRecHit rechit)

Definition at line 897 of file SiPixelCoordinates.cc.

References blade_coord(), TrackingRecHit::geographicalId(), TrackingRecHit::hit(), and isFPix_().

897  {
898  if (!isFPix_(rechit->geographicalId()))
899  return -9999;
900  return blade_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
901 }
float blade_coord(const DetId &, const std::pair< int, int > &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_panel_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 953 of file SiPixelCoordinates.cc.

References blade(), blade_coord(), isFPix_(), and panel().

Referenced by blade_panel_coord().

953  {
954  if (!isFPix_(detid))
955  return -9999;
956  float blade_panel_coord = blade(detid);
957  float coord_shift = (blade_coord(detid, pixel) - blade_panel_coord + panel(detid) - 1.5) / 2;
958  blade_panel_coord += coord_shift;
959  return blade_panel_coord;
960 }
int blade(const DetId &)
float blade_coord(const DetId &, const std::pair< int, int > &)
int panel(const DetId &)
float blade_panel_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_panel_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 961 of file SiPixelCoordinates.cc.

References blade_panel_coord(), isFPix_(), and pixel_().

961  {
962  if (!isFPix_(detid))
963  return -9999;
964  return blade_panel_coord(detid, pixel_(digi));
965 }
std::pair< int, int > pixel_(const PixelDigi *)
float blade_panel_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_panel_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 966 of file SiPixelCoordinates.cc.

References blade_panel_coord(), isFPix_(), and pixel_().

966  {
967  if (!isFPix_(detid))
968  return -9999;
969  return blade_panel_coord(detid, pixel_(cluster));
970 }
std::pair< int, int > pixel_(const PixelDigi *)
float blade_panel_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_panel_coord ( const SiPixelRecHit rechit)

Definition at line 971 of file SiPixelCoordinates.cc.

References blade_panel_coord(), TrackingRecHit::geographicalId(), isFPix_(), and pixel_().

971  {
972  if (!isFPix_(rechit->geographicalId()))
973  return -9999;
974  return blade_panel_coord(rechit->geographicalId(), pixel_(rechit));
975 }
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
float blade_panel_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::blade_panel_coord ( const TrackingRecHit rechit)

Definition at line 976 of file SiPixelCoordinates.cc.

References blade_panel_coord(), TrackingRecHit::geographicalId(), TrackingRecHit::hit(), and isFPix_().

976  {
977  if (!isFPix_(rechit->geographicalId()))
978  return -9999;
979  return blade_panel_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
980 }
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
float blade_panel_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
int SiPixelCoordinates::channel ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 381 of file SiPixelCoordinates.cc.

References cablingMap_, channel_, PixelTopology::colsperroc(), hgcalTestNeighbor_cfi::detector, fedid(), l1tstage2_dqm_sourceclient-live_cfg::fedId, half(), sipixelobjects::PixelROC::idInDetUnit(), TrackerGeometry::idToDetUnit(), isPixel_(), sipixelobjects::ElectronicIndex::link, phase_, PixelSubdetector::PixelBarrel, DetId::rawId(), sipixelobjects::ElectronicIndex::roc, roc(), roc_, PixelTopology::rowsperroc(), side(), PixelGeomDetUnit::specificTopology(), DetId::subdetId(), tGeom_, SiPixelFrameConverter::toCabling(), and SiPixelFrameConverter::toRoc().

Referenced by channel().

381  {
382  if (!isPixel_(detid))
383  return -9999;
384  // The method below may be slow when looping on a lot of pixels, so let's try to speed it up
385  // by quickly chategorizing pixels to ROC coordinates inside det units
386  int rowsperroc = 80, colsperroc = 52;
387  if (phase_ == 2) {
388  // Can get roc info from Geometry for Phase 2, this will need to be specified when it's final
389  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(tGeom_->idToDetUnit(detid));
390  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
391  rowsperroc = topo->rowsperroc();
392  colsperroc = topo->colsperroc();
393  }
394  // It is unlikely a ROC would have more than 256 chips, so let's use this formula
395  // If a ROC number was ever found, then binary search in a map will be much quicker
396  uint64_t pseudo_roc_num =
397  uint64_t(1 << 16) * detid.rawId() + (1 << 8) * (pixel.first / rowsperroc) + pixel.second / colsperroc;
398  if (channel_.count(pseudo_roc_num))
399  return channel_[pseudo_roc_num];
400  // If not found previously, get the channel number
401  unsigned int fedId = fedid(detid);
403  sipixelobjects::DetectorIndex detector = {detid.rawId(), pixel.first, pixel.second};
405  converter.toCabling(cabling, detector);
406  // Time consuming part is over, so let's save the roc number too
407  const sipixelobjects::PixelROC* theRoc = converter.toRoc(cabling.link, cabling.roc);
408  int roc = theRoc->idInDetUnit();
409  if (detid.subdetId() == PixelSubdetector::PixelBarrel && side(detid) == 1 && half(detid))
410  roc += 8;
411  roc_[pseudo_roc_num] = roc;
412  //printf ("Online FED, LNK, LNKID, ROC: %2d %2d %2d %2d - Offline RAWID, ROW, COL: %9d [%3d,%3d] [%3d,%3d]\n",
413  // fedId, cabling.link, cabling.roc, roc, detid.rawId(),
414  // (pixel.first /rowsperroc)*rowsperroc, (pixel.first /rowsperroc+1)*rowsperroc-1,
415  // (pixel.second/colsperroc)*colsperroc, (pixel.second/colsperroc+1)*colsperroc-1);
416  return channel_[pseudo_roc_num] = cabling.link;
417 }
std::unordered_map< uint64_t, unsigned int > channel_
virtual int rowsperroc() const =0
bool isPixel_(const DetId &)
int side(const DetId &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
unsigned int fedid(const DetId &)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
int half(const DetId &)
virtual int colsperroc() const =0
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:37
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
const SiPixelFedCablingMap * cablingMap_
int roc(const DetId &, const std::pair< int, int > &)
unsigned long long uint64_t
Definition: Time.h:13
const TrackerGeometry * tGeom_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
std::unordered_map< uint64_t, unsigned int > roc_
int SiPixelCoordinates::channel ( const DetId detid,
const PixelDigi digi 
)

Definition at line 418 of file SiPixelCoordinates.cc.

References channel(), isPixel_(), and pixel_().

418  {
419  if (!isPixel_(detid))
420  return -9999;
421  return channel(detid, pixel_(digi));
422 }
bool isPixel_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
int channel(const DetId &, const std::pair< int, int > &)
int SiPixelCoordinates::channel ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 423 of file SiPixelCoordinates.cc.

References channel(), isPixel_(), and pixel_().

423  {
424  if (!isPixel_(detid))
425  return -9999;
426  return channel(detid, pixel_(cluster));
427 }
bool isPixel_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
int channel(const DetId &, const std::pair< int, int > &)
int SiPixelCoordinates::channel ( const SiPixelRecHit rechit)

Definition at line 428 of file SiPixelCoordinates.cc.

References channel(), TrackingRecHit::geographicalId(), isPixel_(), and pixel_().

428  {
429  if (!isPixel_(rechit->geographicalId()))
430  return -9999;
431  return channel(rechit->geographicalId(), pixel_(rechit));
432 }
bool isPixel_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
int channel(const DetId &, const std::pair< int, int > &)
DetId geographicalId() const
int SiPixelCoordinates::channel ( const TrackingRecHit rechit)

Definition at line 433 of file SiPixelCoordinates.cc.

References channel(), TrackingRecHit::geographicalId(), TrackingRecHit::hit(), and isPixel_().

433  {
434  if (!isPixel_(rechit->geographicalId()))
435  return -9999;
436  return channel(static_cast<const SiPixelRecHit*>(rechit->hit()));
437 }
bool isPixel_(const DetId &)
int channel(const DetId &, const std::pair< int, int > &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
int SiPixelCoordinates::disk ( const DetId detid)

Definition at line 206 of file SiPixelCoordinates.cc.

References disk_, isFPix_(), TrackerTopology::pxfDisk(), DetId::rawId(), and tTopo_.

Referenced by disk_coord(), disk_ring_coord(), and signed_disk().

206  {
207  if (disk_.count(detid.rawId()))
208  return disk_[detid.rawId()];
209  if (!isFPix_(detid))
210  return disk_[detid.rawId()] = -9999;
211  return disk_[detid.rawId()] = tTopo_->pxfDisk(detid);
212 }
unsigned int pxfDisk(const DetId &id) const
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::unordered_map< uint32_t, int > disk_
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 723 of file SiPixelCoordinates.cc.

References disk(), isFPix_(), ring(), and ring_coord().

Referenced by disk_coord().

723  {
724  if (!isFPix_(detid))
725  return -9999;
726  float disk_coord = disk(detid), coord_shift = ring_coord(detid, pixel) - ring(detid);
727  disk_coord += coord_shift;
728  return disk_coord;
729 }
float ring_coord(const DetId &, const std::pair< int, int > &)
float disk_coord(const DetId &, const std::pair< int, int > &)
int ring(const DetId &)
int disk(const DetId &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 730 of file SiPixelCoordinates.cc.

References disk_coord(), isFPix_(), and pixel_().

730  {
731  if (!isFPix_(detid))
732  return -9999;
733  return disk_coord(detid, pixel_(digi));
734 }
float disk_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 735 of file SiPixelCoordinates.cc.

References disk_coord(), isFPix_(), and pixel_().

735  {
736  if (!isFPix_(detid))
737  return -9999;
738  return disk_coord(detid, pixel_(cluster));
739 }
float disk_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_coord ( const SiPixelRecHit rechit)

Definition at line 740 of file SiPixelCoordinates.cc.

References disk_coord(), TrackingRecHit::geographicalId(), isFPix_(), and pixel_().

740  {
741  if (!isFPix_(rechit->geographicalId()))
742  return -9999;
743  return disk_coord(rechit->geographicalId(), pixel_(rechit));
744 }
float disk_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_coord ( const TrackingRecHit rechit)

Definition at line 745 of file SiPixelCoordinates.cc.

References disk_coord(), TrackingRecHit::geographicalId(), TrackingRecHit::hit(), and isFPix_().

745  {
746  if (!isFPix_(rechit->geographicalId()))
747  return -9999;
748  return disk_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
749 }
float disk_coord(const DetId &, const std::pair< int, int > &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_ring_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 787 of file SiPixelCoordinates.cc.

References disk(), isFPix_(), and ring_coord().

Referenced by disk_ring_coord().

787  {
788  if (!isFPix_(detid))
789  return -9999;
790  float disk_ring_coord = disk(detid), coord_shift = 0;
791  //if (phase_==0) coord_shift = (ring_coord(detid,pixel) - 1.625) / 1.5;
792  //else if (phase_==1) coord_shift = (ring_coord(detid,pixel) - 1.5 ) / 2.0;
793  coord_shift = (ring_coord(detid, pixel) - 1.5) / 2.0;
794  disk_ring_coord += coord_shift;
795  return disk_ring_coord;
796 }
float disk_ring_coord(const DetId &, const std::pair< int, int > &)
float ring_coord(const DetId &, const std::pair< int, int > &)
int disk(const DetId &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_ring_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 797 of file SiPixelCoordinates.cc.

References disk_ring_coord(), isFPix_(), and pixel_().

797  {
798  if (!isFPix_(detid))
799  return -9999;
800  return disk_ring_coord(detid, pixel_(digi));
801 }
float disk_ring_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_ring_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 802 of file SiPixelCoordinates.cc.

References disk_ring_coord(), isFPix_(), and pixel_().

802  {
803  if (!isFPix_(detid))
804  return -9999;
805  return disk_ring_coord(detid, pixel_(cluster));
806 }
float disk_ring_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_ring_coord ( const SiPixelRecHit rechit)

Definition at line 807 of file SiPixelCoordinates.cc.

References disk_ring_coord(), TrackingRecHit::geographicalId(), isFPix_(), and pixel_().

807  {
808  if (!isFPix_(rechit->geographicalId()))
809  return -9999;
810  return disk_ring_coord(rechit->geographicalId(), pixel_(rechit));
811 }
float disk_ring_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
bool isFPix_(const DetId &)
float SiPixelCoordinates::disk_ring_coord ( const TrackingRecHit rechit)

Definition at line 812 of file SiPixelCoordinates.cc.

References disk_ring_coord(), TrackingRecHit::geographicalId(), TrackingRecHit::hit(), and isFPix_().

812  {
813  if (!isFPix_(rechit->geographicalId()))
814  return -9999;
815  return disk_ring_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
816 }
float disk_ring_coord(const DetId &, const std::pair< int, int > &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
bool isFPix_(const DetId &)
unsigned int SiPixelCoordinates::fedid ( const DetId detid)

Definition at line 279 of file SiPixelCoordinates.cc.

References cablingMap_, l1tstage2_dqm_sourceclient-live_cfg::fedId, fedid_, SiPixelFedCablingMap::fedIds(), SiPixelFrameConverter::hasDetUnit(), isPixel_(), and DetId::rawId().

Referenced by channel(), and roc().

279  {
280  if (fedid_.count(detid.rawId()))
281  return fedid_[detid.rawId()];
282  if (!isPixel_(detid))
283  return fedid_[detid.rawId()] = 9999;
284  unsigned int fedid = 9999;
285  for (auto& fedId : cablingMap_->fedIds()) {
287  fedid = fedId;
288  break;
289  }
290  }
291  return fedid_[detid.rawId()] = fedid;
292 }
bool isPixel_(const DetId &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
unsigned int fedid(const DetId &)
const SiPixelFedCablingMap * cablingMap_
bool hasDetUnit(uint32_t radId) const
std::vector< unsigned int > fedIds() const
std::unordered_map< uint32_t, unsigned int > fedid_
int SiPixelCoordinates::flipped ( const DetId detid)

Definition at line 194 of file SiPixelCoordinates.cc.

References flipped_, isBPix_(), outer(), phase_, and DetId::rawId().

Referenced by ladder_coord(), and signed_ladder_coord().

194  {
195  if (flipped_.count(detid.rawId()))
196  return flipped_[detid.rawId()];
197  if (!isBPix_(detid))
198  return flipped_[detid.rawId()] = -9999;
199  int flipped = -9999;
200  if (phase_ < 2)
201  flipped = outer(detid) == 0;
202  return flipped_[detid.rawId()] = flipped;
203 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int flipped(const DetId &)
bool isBPix_(const DetId &)
std::unordered_map< uint32_t, int > flipped_
int outer(const DetId &)
int SiPixelCoordinates::half ( const DetId detid)

Definition at line 157 of file SiPixelCoordinates.cc.

References half_, isBPix_(), PixelBarrelName::isHalfModule(), phase_, DetId::rawId(), and tTopo_.

Referenced by channel(), ladder_coord(), roc(), and signed_ladder_coord().

157  {
158  if (half_.count(detid.rawId()))
159  return half_[detid.rawId()];
160  if (!isBPix_(detid))
161  return half_[detid.rawId()] = -9999;
162  return half_[detid.rawId()] = PixelBarrelName(detid, tTopo_, phase_).isHalfModule();
163 }
std::unordered_map< uint32_t, int > half_
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool isBPix_(const DetId &)
bool isHalfModule() const
full or half module
void SiPixelCoordinates::init ( edm::EventSetup const &  iSetup)

Definition at line 32 of file SiPixelCoordinates.cc.

References cablingMap_, SiPixelFedCablingMap::det2fedMap(), fedid_, edm::EventSetup::get(), TrackerGeometry::isThere(), GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, phase_, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, edm::ESHandle< T >::product(), tGeom_, and tTopo_.

Referenced by SiPixelStatusHarvester::dqmEndRun().

32  {
33  // Get CablingMap (used for ROC number)
34  edm::ESHandle<SiPixelFedCablingMap> cablingMapHandle;
35  iSetup.get<SiPixelFedCablingMapRcd>().get(cablingMapHandle);
36  cablingMap_ = cablingMapHandle.product();
38 
39  // Get TrackerTopology
40  edm::ESHandle<TrackerTopology> trackerTopologyHandle;
41  iSetup.get<TrackerTopologyRcd>().get(trackerTopologyHandle);
42  tTopo_ = trackerTopologyHandle.product();
43 
44  // Get TrackerGeometry
45  edm::ESHandle<TrackerGeometry> trackerGeometryHandle;
46  iSetup.get<TrackerDigiGeometryRecord>().get(trackerGeometryHandle);
47  tGeom_ = trackerGeometryHandle.product();
48 
49  // If not specified, determine from the geometry
50  if (phase_ == -1) {
52  phase_ = 0;
54  phase_ = 1;
56  phase_ = 2;
57  }
58 }
const TrackerTopology * tTopo_
bool isThere(GeomDetEnumerators::SubDetector subdet) const
const SiPixelFedCablingMap * cablingMap_
std::unordered_map< uint32_t, unsigned int > det2fedMap() const final
const TrackerGeometry * tGeom_
T const * product() const
Definition: ESHandle.h:86
std::unordered_map< uint32_t, unsigned int > fedid_
bool SiPixelCoordinates::isBPix_ ( const DetId detid)
private

Definition at line 305 of file SiPixelCoordinates.cc.

References DetId::det(), PixelSubdetector::PixelBarrel, DetId::subdetId(), and DetId::Tracker.

Referenced by flipped(), half(), ladder(), ladder_coord(), layer(), module_coord(), outer(), sector(), signed_ladder(), signed_ladder_coord(), signed_module(), and signed_module_coord().

305  {
306  if (detid.det() != DetId::Tracker)
307  return false;
309  return true;
310  return false;
311 }
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
bool SiPixelCoordinates::isFPix_ ( const DetId detid)
private

Definition at line 312 of file SiPixelCoordinates.cc.

References DetId::det(), PixelSubdetector::PixelEndcap, DetId::subdetId(), and DetId::Tracker.

Referenced by blade(), blade_coord(), blade_panel_coord(), disk(), disk_coord(), disk_ring_coord(), panel(), ring(), ring_coord(), signed_blade(), signed_blade_coord(), signed_blade_panel_coord(), signed_disk(), signed_disk_coord(), signed_disk_ring_coord(), signed_shifted_blade_panel_coord(), and ycoord_on_module_().

312  {
313  if (detid.det() != DetId::Tracker)
314  return false;
316  return true;
317  return false;
318 }
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
bool SiPixelCoordinates::isPixel_ ( const DetId detid)
private

Definition at line 296 of file SiPixelCoordinates.cc.

References DetId::det(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::subdetId(), and DetId::Tracker.

Referenced by channel(), fedid(), module(), quadrant(), roc(), and side().

296  {
297  if (detid.det() != DetId::Tracker)
298  return false;
300  return true;
302  return true;
303  return false;
304 }
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
int SiPixelCoordinates::ladder ( const DetId detid)

Definition at line 122 of file SiPixelCoordinates.cc.

References isBPix_(), ladder_, TrackerTopology::pxbLadder(), DetId::rawId(), and tTopo_.

Referenced by ladder_coord().

122  {
123  if (ladder_.count(detid.rawId()))
124  return ladder_[detid.rawId()];
125  if (!isBPix_(detid))
126  return ladder_[detid.rawId()] = -9999;
127  return ladder_[detid.rawId()] = tTopo_->pxbLadder(detid);
128 }
std::unordered_map< uint32_t, int > ladder_
const TrackerTopology * tTopo_
unsigned int pxbLadder(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool isBPix_(const DetId &)
float SiPixelCoordinates::ladder_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 597 of file SiPixelCoordinates.cc.

References flipped(), half(), isBPix_(), ladder(), Validation_hcalonly_cfi::sign, and xcoord_on_module_().

Referenced by ladder_coord().

597  {
598  if (!isBPix_(detid))
599  return -9999;
600  // offline ladder number is monotonously increasing with global phi
601  // flipped/inner ladders: lx parallel to global r-phi - positive sign
602  // non-flipped/outer ladders: lx anti-parallel to global r-phi - negative sign
603  int sign = flipped(detid) ? 1 : -1;
604  return ladder(detid) + sign * (xcoord_on_module_(detid, pixel) + half(detid) * 0.5 - 0.5);
605 }
int flipped(const DetId &)
bool isBPix_(const DetId &)
int half(const DetId &)
float xcoord_on_module_(const DetId &, const std::pair< int, int > &)
int ladder(const DetId &)
float SiPixelCoordinates::ladder_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 606 of file SiPixelCoordinates.cc.

References isBPix_(), ladder_coord(), and pixel_().

606  {
607  if (!isBPix_(detid))
608  return -9999;
609  return ladder_coord(detid, pixel_(digi));
610 }
float ladder_coord(const DetId &, const std::pair< int, int > &)
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
float SiPixelCoordinates::ladder_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 611 of file SiPixelCoordinates.cc.

References isBPix_(), ladder_coord(), and pixel_().

611  {
612  if (!isBPix_(detid))
613  return -9999;
614  return ladder_coord(detid, pixel_(cluster));
615 }
float ladder_coord(const DetId &, const std::pair< int, int > &)
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
float SiPixelCoordinates::ladder_coord ( const SiPixelRecHit rechit)

Definition at line 616 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isBPix_(), ladder_coord(), and pixel_().

616  {
617  if (!isBPix_(rechit->geographicalId()))
618  return -9999;
619  return ladder_coord(rechit->geographicalId(), pixel_(rechit));
620 }
float ladder_coord(const DetId &, const std::pair< int, int > &)
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
float SiPixelCoordinates::ladder_coord ( const TrackingRecHit rechit)

Definition at line 621 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isBPix_(), and ladder_coord().

621  {
622  if (!isBPix_(rechit->geographicalId()))
623  return -9999;
624  return ladder_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
625 }
float ladder_coord(const DetId &, const std::pair< int, int > &)
bool isBPix_(const DetId &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
int SiPixelCoordinates::layer ( const DetId detid)

Definition at line 104 of file SiPixelCoordinates.cc.

References isBPix_(), layer_, TrackerTopology::pxbLayer(), DetId::rawId(), and tTopo_.

Referenced by SiPixelStatusHarvester::dqmEndRun(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), outer(), SiPixelStatusHarvester::perLayerRingAverage(), and SiPixelStatusHarvester::substructure().

104  {
105  if (layer_.count(detid.rawId()))
106  return layer_[detid.rawId()];
107  if (!isBPix_(detid))
108  return layer_[detid.rawId()] = -9999;
109  return layer_[detid.rawId()] = tTopo_->pxbLayer(detid);
110 }
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool isBPix_(const DetId &)
std::unordered_map< uint32_t, int > layer_
unsigned int pxbLayer(const DetId &id) const
int SiPixelCoordinates::module ( const DetId detid)

Definition at line 92 of file SiPixelCoordinates.cc.

References isPixel_(), module_, PixelSubdetector::PixelBarrel, TrackerTopology::pxbModule(), TrackerTopology::pxfModule(), DetId::rawId(), DetId::subdetId(), and tTopo_.

Referenced by blade_coord(), module_coord(), ring(), ring_coord(), roc(), and signed_blade_coord().

92  {
93  if (module_.count(detid.rawId()))
94  return module_[detid.rawId()];
95  if (!isPixel_(detid))
96  return module_[detid.rawId()] = -9999;
98  return module_[detid.rawId()] = tTopo_->pxbModule(detid.rawId());
99  else
100  return module_[detid.rawId()] = tTopo_->pxfModule(detid.rawId());
101 }
bool isPixel_(const DetId &)
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
unsigned int pxbModule(const DetId &id) const
std::unordered_map< uint32_t, int > module_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
unsigned int pxfModule(const DetId &id) const
float SiPixelCoordinates::module_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 541 of file SiPixelCoordinates.cc.

References isBPix_(), module(), and ycoord_on_module_().

Referenced by module_coord().

541  {
542  if (!isBPix_(detid))
543  return -9999;
544  // offline module number is monotonously increasing with global z
545  // sign is negative because local y is antiparallel to global z
546  return module(detid) - (ycoord_on_module_(detid, pixel) - 0.5);
547 }
float ycoord_on_module_(const DetId &, const std::pair< int, int > &)
int module(const DetId &)
bool isBPix_(const DetId &)
float SiPixelCoordinates::module_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 548 of file SiPixelCoordinates.cc.

References isBPix_(), module_coord(), and pixel_().

548  {
549  if (!isBPix_(detid))
550  return -9999;
551  return module_coord(detid, pixel_(digi));
552 }
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
float module_coord(const DetId &, const std::pair< int, int > &)
float SiPixelCoordinates::module_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 553 of file SiPixelCoordinates.cc.

References isBPix_(), module_coord(), and pixel_().

553  {
554  if (!isBPix_(detid))
555  return -9999;
556  return module_coord(detid, pixel_(cluster));
557 }
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
float module_coord(const DetId &, const std::pair< int, int > &)
float SiPixelCoordinates::module_coord ( const SiPixelRecHit rechit)

Definition at line 558 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isBPix_(), module_coord(), and pixel_().

558  {
559  if (!isBPix_(rechit->geographicalId()))
560  return -9999;
561  return module_coord(rechit->geographicalId(), pixel_(rechit));
562 }
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
float module_coord(const DetId &, const std::pair< int, int > &)
float SiPixelCoordinates::module_coord ( const TrackingRecHit rechit)

Definition at line 563 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isBPix_(), and module_coord().

563  {
564  if (!isBPix_(rechit->geographicalId()))
565  return -9999;
566  return module_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
567 }
bool isBPix_(const DetId &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
float module_coord(const DetId &, const std::pair< int, int > &)
int SiPixelCoordinates::outer ( const DetId detid)

Definition at line 170 of file SiPixelCoordinates.cc.

References isBPix_(), layer(), outer_, phase_, TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), DetId::rawId(), and tTopo_.

Referenced by flipped().

170  {
171  if (outer_.count(detid.rawId()))
172  return outer_[detid.rawId()];
173  if (!isBPix_(detid))
174  return outer_[detid.rawId()] = -9999;
175  int outer = -9999;
176  int layer = tTopo_->pxbLayer(detid.rawId());
177  bool odd_ladder = tTopo_->pxbLadder(detid.rawId()) % 2;
178  if (phase_ == 0) {
179  if (layer == 2)
180  outer = !odd_ladder;
181  else
182  outer = odd_ladder;
183  } else if (phase_ == 1) {
184  if (layer == 4)
185  outer = odd_ladder;
186  else
187  outer = !odd_ladder;
188  }
189  return outer_[detid.rawId()] = outer;
190 }
const TrackerTopology * tTopo_
unsigned int pxbLadder(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool isBPix_(const DetId &)
int layer(const DetId &)
std::unordered_map< uint32_t, int > outer_
unsigned int pxbLayer(const DetId &id) const
int outer(const DetId &)
int SiPixelCoordinates::panel ( const DetId detid)

Definition at line 228 of file SiPixelCoordinates.cc.

References isFPix_(), panel_, TrackerTopology::pxfPanel(), DetId::rawId(), and tTopo_.

Referenced by blade_coord(), blade_panel_coord(), ring(), ring_coord(), roc(), signed_blade_coord(), signed_blade_panel_coord(), and signed_shifted_blade_panel_coord().

228  {
229  if (panel_.count(detid.rawId()))
230  return panel_[detid.rawId()];
231  if (!isFPix_(detid))
232  return panel_[detid.rawId()] = -9999;
233  return panel_[detid.rawId()] = tTopo_->pxfPanel(detid);
234 }
std::unordered_map< uint32_t, int > panel_
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
unsigned int pxfPanel(const DetId &id) const
bool isFPix_(const DetId &)
std::pair< int, int > SiPixelCoordinates::pixel_ ( const PixelDigi digi)
private
std::pair< int, int > SiPixelCoordinates::pixel_ ( const SiPixelCluster cluster)
private

Definition at line 323 of file SiPixelCoordinates.cc.

References cuy::col, SiPixelCluster::x(), and SiPixelCluster::y().

323  {
324  // Cluster positions are already shifted by 0.5
325  // We remove this and add back later (for all pixels)
326  // The aim is to get the offline row/col number of the pixel
327  int row = cluster->x() - 0.5, col = cluster->y() - 0.5;
328  return std::make_pair(row, col);
329 }
col
Definition: cuy.py:1010
float y() const
float x() const
std::pair< int, int > SiPixelCoordinates::pixel_ ( const SiPixelRecHit rechit)
private

Definition at line 330 of file SiPixelCoordinates.cc.

References cuy::col, TrackerSingleRecHit::detUnit(), createfilelist::int, BaseTrackerRecHit::localPosition(), SiStripPI::max, min(), PixelTopology::ncolumns(), PixelTopology::nrows(), muonClassificationByHits_cfi::pixel, PixelTopology::pixel(), and PixelGeomDetUnit::specificTopology().

330  {
331  // Convert RecHit local position to local pixel using Topology
332  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(rechit->detUnit());
333  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
334  std::pair<float, float> pixel = topo->pixel(rechit->localPosition());
335  // We could leave it like this, but it's better to constrain pixel to be on the module
336  // Also truncate floating point to int (similar to digis)
337  int row = std::max(0, std::min(topo->nrows() - 1, (int)pixel.first));
338  int col = std::max(0, std::min(topo->ncolumns() - 1, (int)pixel.second));
339  return std::make_pair(row, col);
340 }
virtual int nrows() const =0
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
T min(T a, T b)
Definition: MathUtil.h:58
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
const GeomDetUnit * detUnit() const override
virtual int ncolumns() const =0
col
Definition: cuy.py:1010
LocalPoint localPosition() const final
int SiPixelCoordinates::quadrant ( const DetId detid)

Definition at line 66 of file SiPixelCoordinates.cc.

References PixelEndcapName::halfCylinder(), isPixel_(), phase_, PixelSubdetector::PixelBarrel, quadrant_, DetId::rawId(), PixelBarrelName::shell(), DetId::subdetId(), and tTopo_.

Referenced by side(), signed_blade(), signed_disk(), signed_ladder(), and signed_module().

66  {
67  if (quadrant_.count(detid.rawId()))
68  return quadrant_[detid.rawId()];
69  if (!isPixel_(detid))
70  return quadrant_[detid.rawId()] = -9999;
72  return quadrant_[detid.rawId()] = PixelBarrelName(detid, tTopo_, phase_).shell();
73  else
74  return quadrant_[detid.rawId()] = PixelEndcapName(detid, tTopo_, phase_).halfCylinder();
75 }
bool isPixel_(const DetId &)
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
std::unordered_map< uint32_t, int > quadrant_
Shell shell() const
HalfCylinder halfCylinder() const
int SiPixelCoordinates::ring ( const DetId detid)

Definition at line 242 of file SiPixelCoordinates.cc.

References isFPix_(), module(), panel(), phase_, DetId::rawId(), ring_, PixelEndcapName::ringName(), and tTopo_.

Referenced by disk_coord(), SiPixelStatusHarvester::dqmEndRun(), geometryXMLparser.CSCAlignable::index(), SiPixelStatusHarvester::perLayerRingAverage(), ring_coord(), signed_disk_coord(), signed_shifted_blade_panel_coord(), and SiPixelStatusHarvester::substructure().

242  {
243  if (ring_.count(detid.rawId()))
244  return ring_[detid.rawId()];
245  if (!isFPix_(detid))
246  return ring_[detid.rawId()] = -9999;
247  int ring = -9999;
248  if (phase_ == 0) {
249  ring = 1 + (panel(detid) + module(detid) > 3);
250  } else if (phase_ == 1) {
251  ring = PixelEndcapName(detid, tTopo_, phase_).ringName();
252  }
253  return ring_[detid.rawId()] = ring;
254 }
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int ring(const DetId &)
int module(const DetId &)
std::unordered_map< uint32_t, int > ring_
int panel(const DetId &)
int ringName() const
ring Id
bool isFPix_(const DetId &)
float SiPixelCoordinates::ring_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 664 of file SiPixelCoordinates.cc.

References isFPix_(), mod(), module(), panel(), phase_, ring(), xcoord_on_module_(), and ycoord_on_module_().

Referenced by disk_coord(), disk_ring_coord(), ring_coord(), signed_disk_coord(), and signed_disk_ring_coord().

664  {
665  if (!isFPix_(detid))
666  return -9999;
667  float ring_coord = ring(detid), coord_shift = 0;
668  if (phase_ == 0) {
669  // local x on panel 1 is anti-parallel to global radius - sign is negative
670  // and parallel for panel 2 - sign is positive
671  int pan = panel(detid), mod = module(detid);
672  if (pan == 1) {
673  if (mod == 1)
674  coord_shift = (-xcoord_on_module_(detid, pixel)) / 4;
675  else if (mod == 2)
676  coord_shift = (-xcoord_on_module_(detid, pixel) + 2.0) / 4;
677  else if (mod == 3)
678  coord_shift = (-xcoord_on_module_(detid, pixel)) / 4;
679  else if (mod == 4)
680  coord_shift = (-xcoord_on_module_(detid, pixel) + 1.5) / 4;
681  } else {
682  if (mod == 1)
683  coord_shift = (xcoord_on_module_(detid, pixel)) / 4;
684  else if (mod == 2)
685  coord_shift = (xcoord_on_module_(detid, pixel) - 2.0) / 4;
686  else if (mod == 3)
687  coord_shift = (xcoord_on_module_(detid, pixel)) / 4;
688  }
689  } else if (phase_ == 1) {
690  // local y is parallel to global radius, so sign is positive
691  coord_shift = ycoord_on_module_(detid, pixel) - 0.5;
692  }
693  ring_coord += coord_shift;
694  return ring_coord;
695 }
float ycoord_on_module_(const DetId &, const std::pair< int, int > &)
float ring_coord(const DetId &, const std::pair< int, int > &)
int ring(const DetId &)
int module(const DetId &)
int panel(const DetId &)
float xcoord_on_module_(const DetId &, const std::pair< int, int > &)
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
bool isFPix_(const DetId &)
float SiPixelCoordinates::ring_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 696 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and ring_coord().

696  {
697  if (!isFPix_(detid))
698  return -9999;
699  return ring_coord(detid, pixel_(digi));
700 }
float ring_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::ring_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 701 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and ring_coord().

701  {
702  if (!isFPix_(detid))
703  return -9999;
704  return ring_coord(detid, pixel_(cluster));
705 }
float ring_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::ring_coord ( const SiPixelRecHit rechit)

Definition at line 706 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isFPix_(), pixel_(), and ring_coord().

706  {
707  if (!isFPix_(rechit->geographicalId()))
708  return -9999;
709  return ring_coord(rechit->geographicalId(), pixel_(rechit));
710 }
float ring_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
bool isFPix_(const DetId &)
float SiPixelCoordinates::ring_coord ( const TrackingRecHit rechit)

Definition at line 711 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isFPix_(), and ring_coord().

711  {
712  if (!isFPix_(rechit->geographicalId()))
713  return -9999;
714  return ring_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
715 }
float ring_coord(const DetId &, const std::pair< int, int > &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
bool isFPix_(const DetId &)
int SiPixelCoordinates::roc ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 452 of file SiPixelCoordinates.cc.

References cablingMap_, channel_, PixelTopology::colsperroc(), hgcalTestNeighbor_cfi::detector, fedid(), l1tstage2_dqm_sourceclient-live_cfg::fedId, half(), sipixelobjects::PixelROC::idInDetUnit(), TrackerGeometry::idToDetUnit(), isPixel_(), sipixelobjects::ElectronicIndex::link, mod(), module(), panel(), phase_, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::rawId(), sipixelobjects::ElectronicIndex::roc, roc_, PixelTopology::rowsperroc(), side(), PixelGeomDetUnit::specificTopology(), DetId::subdetId(), tGeom_, SiPixelFrameConverter::toCabling(), and SiPixelFrameConverter::toRoc().

Referenced by channel(), and roc().

452  {
453  if (!isPixel_(detid))
454  return -9999;
455  // The method below may be slow when looping on a lot of pixels, so let's try to speed it up
456  // by quickly chategorizing pixels to ROC coordinates inside det units
457  int rowsperroc = 80, colsperroc = 52;
458  if (phase_ == 2) {
459  // Can get roc info from Geometry for Phase 2, this will need to be specified when it's final
460  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(tGeom_->idToDetUnit(detid));
461  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
462  rowsperroc = topo->rowsperroc();
463  colsperroc = topo->colsperroc();
464  }
465  // It is unlikely a ROC would have more than 256 chips, so let's use this formula
466  // If a ROC number was ever found, then binary search in a map will be much quicker
467  uint64_t pseudo_roc_num =
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];
471  // If not found previously, get the ROC number
472  int roc = -9999;
473  // Use the Fed Cabling Map if specified by the bool
474  // or if using channel number too, or if it's the Phase 2 detector
475  if (phase_ == 2 || !channel_.empty()) {
476  unsigned int fedId = fedid(detid);
478  sipixelobjects::DetectorIndex detector = {detid.rawId(), pixel.first, pixel.second};
480  converter.toCabling(cabling, detector);
481  // Time consuming part is over, so let's save the channel number too
482  channel_[pseudo_roc_num] = cabling.link;
483  const sipixelobjects::PixelROC* theRoc = converter.toRoc(cabling.link, cabling.roc);
484  roc = theRoc->idInDetUnit();
485  if (detid.subdetId() == PixelSubdetector::PixelBarrel && side(detid) == 1 && half(detid))
486  roc += 8;
487  //printf ("Online FED, LNK, LNKID, ROC: %2d %2d %2d %2d - Offline RAWID, ROW, COL: %9d [%3d,%3d] [%3d,%3d]\n",
488  // fedId, cabling.link, cabling.roc, roc, detid.rawId(),
489  // (pixel.first /rowsperroc)*rowsperroc, (pixel.first /rowsperroc+1)*rowsperroc-1,
490  // (pixel.second/colsperroc)*colsperroc, (pixel.second/colsperroc+1)*colsperroc-1);
491  } else if (phase_ < 2) {
492  // This method is faster if only ROC number is needed
493  int pan = panel(detid), mod = module(detid), rocsY = 8;
494  if (phase_ == 0 && detid.subdetId() == PixelSubdetector::PixelEndcap)
495  rocsY = pan + mod;
496  int rocX = pixel.first / rowsperroc, rocY = pixel.second / colsperroc;
497  // Consider second row for all 1xN Phase 0 modules
498  if (phase_ == 0) {
499  int v1x8 = half(detid) == 1, v1x2 = (pan == 1 && mod == 1), v1x5 = (pan == 1 && mod == 4);
500  if (v1x8 || v1x2 || v1x5)
501  ++rocX;
502  }
503  // Mirror both coordinates for barrel -Z side
504  // and for endcap (but only Panel 2 for Phase 0)
505  if ((detid.subdetId() == PixelSubdetector::PixelBarrel && side(detid) == 1) ||
506  (detid.subdetId() == PixelSubdetector::PixelEndcap && ((phase_ == 0 && pan == 2) || phase_ == 1))) {
507  rocX = 1 - rocX;
508  rocY = rocsY - 1 - rocY;
509  }
510  // U-shape readout order
511  roc = rocX ? rocY : 2 * rocsY - 1 - rocY;
512  }
513  return roc_[pseudo_roc_num] = roc;
514 }
std::unordered_map< uint64_t, unsigned int > channel_
virtual int rowsperroc() const =0
bool isPixel_(const DetId &)
int side(const DetId &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
unsigned int fedid(const DetId &)
int module(const DetId &)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
int half(const DetId &)
virtual int colsperroc() const =0
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:37
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
const SiPixelFedCablingMap * cablingMap_
int roc(const DetId &, const std::pair< int, int > &)
unsigned long long uint64_t
Definition: Time.h:13
const TrackerGeometry * tGeom_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
int panel(const DetId &)
std::unordered_map< uint64_t, unsigned int > roc_
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
int SiPixelCoordinates::roc ( const DetId detid,
const PixelDigi digi 
)

Definition at line 515 of file SiPixelCoordinates.cc.

References isPixel_(), pixel_(), and roc().

515  {
516  if (!isPixel_(detid))
517  return -9999;
518  return roc(detid, pixel_(digi));
519 }
bool isPixel_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
int roc(const DetId &, const std::pair< int, int > &)
int SiPixelCoordinates::roc ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 520 of file SiPixelCoordinates.cc.

References isPixel_(), pixel_(), and roc().

520  {
521  if (!isPixel_(detid))
522  return -9999;
523  return roc(detid, pixel_(cluster));
524 }
bool isPixel_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
int roc(const DetId &, const std::pair< int, int > &)
int SiPixelCoordinates::roc ( const SiPixelRecHit rechit)

Definition at line 525 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isPixel_(), pixel_(), and roc().

525  {
526  if (!isPixel_(rechit->geographicalId()))
527  return -9999;
528  return roc(rechit->geographicalId(), pixel_(rechit));
529 }
bool isPixel_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
int roc(const DetId &, const std::pair< int, int > &)
DetId geographicalId() const
int SiPixelCoordinates::roc ( const TrackingRecHit rechit)

Definition at line 530 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isPixel_(), and roc().

530  {
531  if (!isPixel_(rechit->geographicalId()))
532  return -9999;
533  return roc(static_cast<const SiPixelRecHit*>(rechit->hit()));
534 }
bool isPixel_(const DetId &)
int roc(const DetId &, const std::pair< int, int > &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
int SiPixelCoordinates::sector ( const DetId detid)

Definition at line 113 of file SiPixelCoordinates.cc.

References isBPix_(), phase_, DetId::rawId(), sector_, PixelBarrelName::sectorName(), and tTopo_.

Referenced by geometryXMLparser.DTAlignable::index().

113  {
114  if (sector_.count(detid.rawId()))
115  return sector_[detid.rawId()];
116  if (!isBPix_(detid))
117  return sector_[detid.rawId()] = -9999;
118  return sector_[detid.rawId()] = PixelBarrelName(detid, tTopo_, phase_).sectorName();
119 }
std::unordered_map< uint32_t, int > sector_
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool isBPix_(const DetId &)
int sectorName() const
sector id
int SiPixelCoordinates::side ( const DetId detid)

Definition at line 80 of file SiPixelCoordinates.cc.

References isPixel_(), PixelSubdetector::PixelBarrel, TrackerTopology::pxfSide(), quadrant(), DetId::rawId(), side_, DetId::subdetId(), and tTopo_.

Referenced by blade_coord(), channel(), roc(), and signed_blade_coord().

80  {
81  if (side_.count(detid.rawId()))
82  return side_[detid.rawId()];
83  if (!isPixel_(detid))
84  return side_[detid.rawId()] = -9999;
86  return side_[detid.rawId()] = 1 + (quadrant(detid) > 2);
87  else
88  return side_[detid.rawId()] = tTopo_->pxfSide(detid);
89 }
bool isPixel_(const DetId &)
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
std::unordered_map< uint32_t, int > side_
int quadrant(const DetId &)
unsigned int pxfSide(const DetId &id) const
int SiPixelCoordinates::signed_blade ( const DetId detid)

Definition at line 267 of file SiPixelCoordinates.cc.

References PixelEndcapName::bladeName(), isFPix_(), phase_, quadrant(), DetId::rawId(), signed_blade_, and tTopo_.

Referenced by signed_blade_coord(), signed_blade_panel_coord(), and signed_shifted_blade_panel_coord().

267  {
268  if (signed_blade_.count(detid.rawId()))
269  return signed_blade_[detid.rawId()];
270  if (!isFPix_(detid))
271  return signed_blade_[detid.rawId()] = -9999;
273  if (quadrant(detid) % 2)
274  signed_blade *= -1;
275  return signed_blade_[detid.rawId()] = signed_blade;
276 }
int signed_blade(const DetId &)
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int bladeName() const
blade id
std::unordered_map< uint32_t, int > signed_blade_
int quadrant(const DetId &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 910 of file SiPixelCoordinates.cc.

References isFPix_(), module(), panel(), phase_, side(), signed_blade(), xcoord_on_module_(), and ycoord_on_module_().

Referenced by signed_blade_coord(), signed_blade_panel_coord(), and signed_shifted_blade_panel_coord().

910  {
911  if (!isFPix_(detid))
912  return -9999;
913  float signed_blade_coord = signed_blade(detid), coord_shift = 0;
914  if (phase_ == 0) {
915  int rocsY = panel(detid) + module(detid);
916  coord_shift = ycoord_on_module_(detid, pixel) - rocsY / 10.;
917  if (side(detid) == 2)
918  coord_shift = -coord_shift;
919  } else if (phase_ == 1) {
920  coord_shift = xcoord_on_module_(detid, pixel) - 0.5;
921  if ((side(detid) + panel(detid)) % 2 == 1)
922  coord_shift = -coord_shift;
923  }
924  signed_blade_coord += coord_shift;
925  return signed_blade_coord;
926 }
float ycoord_on_module_(const DetId &, const std::pair< int, int > &)
int signed_blade(const DetId &)
int side(const DetId &)
int module(const DetId &)
int panel(const DetId &)
float xcoord_on_module_(const DetId &, const std::pair< int, int > &)
float signed_blade_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 927 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_blade_coord().

927  {
928  if (!isFPix_(detid))
929  return -9999;
930  return signed_blade_coord(detid, pixel_(digi));
931 }
std::pair< int, int > pixel_(const PixelDigi *)
float signed_blade_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 932 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_blade_coord().

932  {
933  if (!isFPix_(detid))
934  return -9999;
935  return signed_blade_coord(detid, pixel_(cluster));
936 }
std::pair< int, int > pixel_(const PixelDigi *)
float signed_blade_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_coord ( const SiPixelRecHit rechit)

Definition at line 937 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isFPix_(), pixel_(), and signed_blade_coord().

937  {
938  if (!isFPix_(rechit->geographicalId()))
939  return -9999;
940  return signed_blade_coord(rechit->geographicalId(), pixel_(rechit));
941 }
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
float signed_blade_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_coord ( const TrackingRecHit rechit)

Definition at line 942 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isFPix_(), and signed_blade_coord().

942  {
943  if (!isFPix_(rechit->geographicalId()))
944  return -9999;
945  return signed_blade_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
946 }
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
float signed_blade_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_panel_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 988 of file SiPixelCoordinates.cc.

References isFPix_(), panel(), signed_blade(), and signed_blade_coord().

Referenced by signed_blade_panel_coord().

988  {
989  if (!isFPix_(detid))
990  return -9999;
991  float signed_blade_panel_coord = signed_blade(detid);
992  float coord_shift = (signed_blade_coord(detid, pixel) - signed_blade_panel_coord - panel(detid) + 1.5) / 2;
993  signed_blade_panel_coord += coord_shift;
995 }
float signed_blade_panel_coord(const DetId &, const std::pair< int, int > &)
int signed_blade(const DetId &)
int panel(const DetId &)
float signed_blade_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_panel_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 996 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_blade_panel_coord().

996  {
997  if (!isFPix_(detid))
998  return -9999;
999  return signed_blade_panel_coord(detid, pixel_(digi));
1000 }
float signed_blade_panel_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_panel_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 1001 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_blade_panel_coord().

1001  {
1002  if (!isFPix_(detid))
1003  return -9999;
1004  return signed_blade_panel_coord(detid, pixel_(cluster));
1005 }
float signed_blade_panel_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_panel_coord ( const SiPixelRecHit rechit)

Definition at line 1006 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isFPix_(), pixel_(), and signed_blade_panel_coord().

1006  {
1007  if (!isFPix_(rechit->geographicalId()))
1008  return -9999;
1009  return signed_blade_panel_coord(rechit->geographicalId(), pixel_(rechit));
1010 }
float signed_blade_panel_coord(const DetId &, const std::pair< int, int > &)
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_blade_panel_coord ( const TrackingRecHit rechit)

Definition at line 1011 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isFPix_(), and signed_blade_panel_coord().

1011  {
1012  if (!isFPix_(rechit->geographicalId()))
1013  return -9999;
1014  return signed_blade_panel_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
1015 }
float signed_blade_panel_coord(const DetId &, const std::pair< int, int > &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
bool isFPix_(const DetId &)
int SiPixelCoordinates::signed_disk ( const DetId detid)

Definition at line 216 of file SiPixelCoordinates.cc.

References disk(), isFPix_(), quadrant(), DetId::rawId(), and signed_disk_.

Referenced by signed_disk_coord(), and signed_disk_ring_coord().

216  {
217  if (signed_disk_.count(detid.rawId()))
218  return signed_disk_[detid.rawId()];
219  if (!isFPix_(detid))
220  return signed_disk_[detid.rawId()] = -9999;
221  int signed_disk = disk(detid);
222  if (quadrant(detid) < 3)
223  signed_disk *= -1;
224  return signed_disk_[detid.rawId()] = signed_disk;
225 }
std::unordered_map< uint32_t, int > signed_disk_
int signed_disk(const DetId &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int disk(const DetId &)
int quadrant(const DetId &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 754 of file SiPixelCoordinates.cc.

References isFPix_(), ring(), ring_coord(), and signed_disk().

Referenced by signed_disk_coord().

754  {
755  if (!isFPix_(detid))
756  return -9999;
757  float signed_disk_coord = signed_disk(detid), coord_shift = ring_coord(detid, pixel) - ring(detid);
758  // Mirror -z side, so plots are symmetric
759  if (signed_disk_coord < 0)
760  coord_shift = -coord_shift;
761  signed_disk_coord += coord_shift;
762  return signed_disk_coord;
763 }
float ring_coord(const DetId &, const std::pair< int, int > &)
int signed_disk(const DetId &)
int ring(const DetId &)
float signed_disk_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 764 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_disk_coord().

764  {
765  if (!isFPix_(detid))
766  return -9999;
767  return signed_disk_coord(detid, pixel_(digi));
768 }
std::pair< int, int > pixel_(const PixelDigi *)
float signed_disk_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 769 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_disk_coord().

769  {
770  if (!isFPix_(detid))
771  return -9999;
772  return signed_disk_coord(detid, pixel_(cluster));
773 }
std::pair< int, int > pixel_(const PixelDigi *)
float signed_disk_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_coord ( const SiPixelRecHit rechit)

Definition at line 774 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isFPix_(), pixel_(), and signed_disk_coord().

774  {
775  if (!isFPix_(rechit->geographicalId()))
776  return -9999;
777  return signed_disk_coord(rechit->geographicalId(), pixel_(rechit));
778 }
std::pair< int, int > pixel_(const PixelDigi *)
float signed_disk_coord(const DetId &, const std::pair< int, int > &)
DetId geographicalId() const
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_coord ( const TrackingRecHit rechit)

Definition at line 779 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isFPix_(), and signed_disk_coord().

779  {
780  if (!isFPix_(rechit->geographicalId()))
781  return -9999;
782  return signed_disk_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
783 }
virtual TrackingRecHit const * hit() const
float signed_disk_coord(const DetId &, const std::pair< int, int > &)
DetId geographicalId() const
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_ring_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 820 of file SiPixelCoordinates.cc.

References isFPix_(), ring_coord(), and signed_disk().

Referenced by signed_disk_ring_coord().

820  {
821  if (!isFPix_(detid))
822  return -9999;
823  float signed_disk_ring_coord = signed_disk(detid), coord_shift = 0;
824  //if (phase_==0) coord_shift = (ring_coord(detid,pixel) - 1.625) / 1.5;
825  //else if (phase_==1) coord_shift = (ring_coord(detid,pixel) - 1.5 ) / 2.0;
826  coord_shift = (ring_coord(detid, pixel) - 1.5) / 2.0;
827  // Mirror -z side, so plots are symmetric
828  if (signed_disk_ring_coord < 0)
829  coord_shift = -coord_shift;
830  signed_disk_ring_coord += coord_shift;
831  return signed_disk_ring_coord;
832 }
float ring_coord(const DetId &, const std::pair< int, int > &)
int signed_disk(const DetId &)
float signed_disk_ring_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_ring_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 833 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_disk_ring_coord().

833  {
834  if (!isFPix_(detid))
835  return -9999;
836  return signed_disk_ring_coord(detid, pixel_(digi));
837 }
std::pair< int, int > pixel_(const PixelDigi *)
float signed_disk_ring_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_ring_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 838 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_disk_ring_coord().

838  {
839  if (!isFPix_(detid))
840  return -9999;
841  return signed_disk_ring_coord(detid, pixel_(cluster));
842 }
std::pair< int, int > pixel_(const PixelDigi *)
float signed_disk_ring_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_ring_coord ( const SiPixelRecHit rechit)

Definition at line 843 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isFPix_(), pixel_(), and signed_disk_ring_coord().

843  {
844  if (!isFPix_(rechit->geographicalId()))
845  return -9999;
846  return signed_disk_ring_coord(rechit->geographicalId(), pixel_(rechit));
847 }
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
float signed_disk_ring_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_disk_ring_coord ( const TrackingRecHit rechit)

Definition at line 848 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isFPix_(), and signed_disk_ring_coord().

848  {
849  if (!isFPix_(rechit->geographicalId()))
850  return -9999;
851  return signed_disk_ring_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
852 }
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
float signed_disk_ring_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
int SiPixelCoordinates::signed_ladder ( const DetId detid)

Definition at line 132 of file SiPixelCoordinates.cc.

References isBPix_(), PixelBarrelName::ladderName(), phase_, quadrant(), DetId::rawId(), signed_ladder_, and tTopo_.

Referenced by signed_ladder_coord().

132  {
133  if (signed_ladder_.count(detid.rawId()))
134  return signed_ladder_[detid.rawId()];
135  if (!isBPix_(detid))
136  return signed_ladder_[detid.rawId()] = -9999;
138  if (quadrant(detid) % 2)
139  signed_ladder *= -1;
140  return signed_ladder_[detid.rawId()] = signed_ladder;
141 }
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool isBPix_(const DetId &)
int ladderName() const
ladder id (index in phi)
std::unordered_map< uint32_t, int > signed_ladder_
int quadrant(const DetId &)
int signed_ladder(const DetId &)
float SiPixelCoordinates::signed_ladder_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 627 of file SiPixelCoordinates.cc.

References flipped(), half(), isBPix_(), Validation_hcalonly_cfi::sign, signed_ladder(), and xcoord_on_module_().

Referenced by signed_ladder_coord().

627  {
628  if (!isBPix_(detid))
629  return -9999;
630  // online ladder number is monotonously decreasing with global phi
631  // flipped/inner ladders: lx parallel to global r-phi - negative sign
632  // non-flipped/outer ladders: lx anti-parallel to global r-phi - positive sign
633  int sign = flipped(detid) ? -1 : 1;
634  return signed_ladder(detid) + sign * (xcoord_on_module_(detid, pixel) + half(detid) * 0.5 - 0.5);
635 }
int flipped(const DetId &)
bool isBPix_(const DetId &)
int half(const DetId &)
float xcoord_on_module_(const DetId &, const std::pair< int, int > &)
int signed_ladder(const DetId &)
float SiPixelCoordinates::signed_ladder_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 636 of file SiPixelCoordinates.cc.

References isBPix_(), pixel_(), and signed_ladder_coord().

636  {
637  if (!isBPix_(detid))
638  return -9999;
639  return signed_ladder_coord(detid, pixel_(digi));
640 }
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
float signed_ladder_coord(const DetId &, const std::pair< int, int > &)
float SiPixelCoordinates::signed_ladder_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 641 of file SiPixelCoordinates.cc.

References isBPix_(), pixel_(), and signed_ladder_coord().

641  {
642  if (!isBPix_(detid))
643  return -9999;
644  return signed_ladder_coord(detid, pixel_(cluster));
645 }
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
float signed_ladder_coord(const DetId &, const std::pair< int, int > &)
float SiPixelCoordinates::signed_ladder_coord ( const SiPixelRecHit rechit)

Definition at line 646 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isBPix_(), pixel_(), and signed_ladder_coord().

646  {
647  if (!isBPix_(rechit->geographicalId()))
648  return -9999;
649  return signed_ladder_coord(rechit->geographicalId(), pixel_(rechit));
650 }
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
float signed_ladder_coord(const DetId &, const std::pair< int, int > &)
float SiPixelCoordinates::signed_ladder_coord ( const TrackingRecHit rechit)

Definition at line 651 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isBPix_(), and signed_ladder_coord().

651  {
652  if (!isBPix_(rechit->geographicalId()))
653  return -9999;
654  return signed_ladder_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
655 }
bool isBPix_(const DetId &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
float signed_ladder_coord(const DetId &, const std::pair< int, int > &)
int SiPixelCoordinates::signed_module ( const DetId detid)

Definition at line 145 of file SiPixelCoordinates.cc.

References isBPix_(), PixelBarrelName::moduleName(), phase_, quadrant(), DetId::rawId(), signed_module_, and tTopo_.

Referenced by signed_module_coord().

145  {
146  if (signed_module_.count(detid.rawId()))
147  return signed_module_[detid.rawId()];
148  if (!isBPix_(detid))
149  return signed_module_[detid.rawId()] = -9999;
151  if (quadrant(detid) < 3)
152  signed_module *= -1;
153  return signed_module_[detid.rawId()] = signed_module;
154 }
int moduleName() const
module id (index in z)
const TrackerTopology * tTopo_
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool isBPix_(const DetId &)
std::unordered_map< uint32_t, int > signed_module_
int signed_module(const DetId &)
int quadrant(const DetId &)
float SiPixelCoordinates::signed_module_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 569 of file SiPixelCoordinates.cc.

References isBPix_(), signed_module(), and ycoord_on_module_().

Referenced by signed_module_coord().

569  {
570  if (!isBPix_(detid))
571  return -9999;
572  // offline module number is monotonously increasing with global z
573  // sign is negative because local y is antiparallel to global z
574  return signed_module(detid) - (ycoord_on_module_(detid, pixel) - 0.5);
575 }
float ycoord_on_module_(const DetId &, const std::pair< int, int > &)
bool isBPix_(const DetId &)
int signed_module(const DetId &)
float SiPixelCoordinates::signed_module_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 576 of file SiPixelCoordinates.cc.

References isBPix_(), pixel_(), and signed_module_coord().

576  {
577  if (!isBPix_(detid))
578  return -9999;
579  return signed_module_coord(detid, pixel_(digi));
580 }
float signed_module_coord(const DetId &, const std::pair< int, int > &)
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
float SiPixelCoordinates::signed_module_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 581 of file SiPixelCoordinates.cc.

References isBPix_(), pixel_(), and signed_module_coord().

581  {
582  if (!isBPix_(detid))
583  return -9999;
584  return signed_module_coord(detid, pixel_(cluster));
585 }
float signed_module_coord(const DetId &, const std::pair< int, int > &)
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
float SiPixelCoordinates::signed_module_coord ( const SiPixelRecHit rechit)

Definition at line 586 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isBPix_(), pixel_(), and signed_module_coord().

586  {
587  if (!isBPix_(rechit->geographicalId()))
588  return -9999;
589  return signed_module_coord(rechit->geographicalId(), pixel_(rechit));
590 }
float signed_module_coord(const DetId &, const std::pair< int, int > &)
bool isBPix_(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
float SiPixelCoordinates::signed_module_coord ( const TrackingRecHit rechit)

Definition at line 591 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isBPix_(), and signed_module_coord().

591  {
592  if (!isBPix_(rechit->geographicalId()))
593  return -9999;
594  return signed_module_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
595 }
float signed_module_coord(const DetId &, const std::pair< int, int > &)
bool isBPix_(const DetId &)
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
float SiPixelCoordinates::signed_shifted_blade_panel_coord ( const DetId detid,
const std::pair< int, int > &  pixel 
)

Definition at line 1022 of file SiPixelCoordinates.cc.

References isFPix_(), panel(), phase_, ring(), signed_blade(), and signed_blade_coord().

Referenced by signed_shifted_blade_panel_coord().

1022  {
1023  if (!isFPix_(detid))
1024  return -9999;
1026  float coord_shift = (signed_blade_coord(detid, pixel) - signed_shifted_blade_panel_coord - panel(detid) + 1.5) / 2;
1027  if (phase_ == 1 && ring(detid) == 1)
1028  signed_shifted_blade_panel_coord *= 1.5;
1029  signed_shifted_blade_panel_coord += coord_shift;
1031 }
int signed_blade(const DetId &)
int ring(const DetId &)
int panel(const DetId &)
float signed_shifted_blade_panel_coord(const DetId &, const std::pair< int, int > &)
float signed_blade_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_shifted_blade_panel_coord ( const DetId detid,
const PixelDigi digi 
)

Definition at line 1032 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_shifted_blade_panel_coord().

1032  {
1033  if (!isFPix_(detid))
1034  return -9999;
1035  return signed_shifted_blade_panel_coord(detid, pixel_(digi));
1036 }
std::pair< int, int > pixel_(const PixelDigi *)
float signed_shifted_blade_panel_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_shifted_blade_panel_coord ( const DetId detid,
const SiPixelCluster cluster 
)

Definition at line 1037 of file SiPixelCoordinates.cc.

References isFPix_(), pixel_(), and signed_shifted_blade_panel_coord().

1037  {
1038  if (!isFPix_(detid))
1039  return -9999;
1040  return signed_shifted_blade_panel_coord(detid, pixel_(cluster));
1041 }
std::pair< int, int > pixel_(const PixelDigi *)
float signed_shifted_blade_panel_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_shifted_blade_panel_coord ( const SiPixelRecHit rechit)

Definition at line 1042 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), isFPix_(), pixel_(), and signed_shifted_blade_panel_coord().

1042  {
1043  if (!isFPix_(rechit->geographicalId()))
1044  return -9999;
1045  return signed_shifted_blade_panel_coord(rechit->geographicalId(), pixel_(rechit));
1046 }
std::pair< int, int > pixel_(const PixelDigi *)
DetId geographicalId() const
float signed_shifted_blade_panel_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::signed_shifted_blade_panel_coord ( const TrackingRecHit rechit)

Definition at line 1047 of file SiPixelCoordinates.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::hit(), isFPix_(), and signed_shifted_blade_panel_coord().

1047  {
1048  if (!isFPix_(rechit->geographicalId()))
1049  return -9999;
1050  return signed_shifted_blade_panel_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
1051 }
virtual TrackingRecHit const * hit() const
DetId geographicalId() const
float signed_shifted_blade_panel_coord(const DetId &, const std::pair< int, int > &)
bool isFPix_(const DetId &)
float SiPixelCoordinates::xcoord_on_module_ ( const DetId detid,
const std::pair< int, int > &  pixel 
)
private

Definition at line 342 of file SiPixelCoordinates.cc.

References TrackerGeometry::idToDetUnit(), PixelTopology::nrows(), phase_, PixelGeomDetUnit::specificTopology(), and tGeom_.

Referenced by blade_coord(), ladder_coord(), ring_coord(), signed_blade_coord(), and signed_ladder_coord().

342  {
343  int nrows = 160;
344  // Leave it hard-coded for phase 0/1, read from geometry for phase 2
345  // no special treatment needed here for phase 0 1x8, 1x5 and 1x2 modules either
346  // because we do not want to scale coordinates (only shift if needed)
347  if (phase_ == 2) {
348  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(tGeom_->idToDetUnit(detid));
349  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
350  nrows = topo->nrows();
351  }
352  // Shift to the middle of the pixel, for precision binning
353  return (pixel.first + 0.5) / nrows;
354 }
virtual int nrows() const =0
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const TrackerGeometry * tGeom_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
float SiPixelCoordinates::ycoord_on_module_ ( const DetId detid,
const std::pair< int, int > &  pixel 
)
private

Definition at line 356 of file SiPixelCoordinates.cc.

References TrackerGeometry::idToDetUnit(), isFPix_(), hgcalPlots::ncols, PixelTopology::ncolumns(), phase_, PixelGeomDetUnit::specificTopology(), and tGeom_.

Referenced by blade_coord(), module_coord(), ring_coord(), signed_blade_coord(), and signed_module_coord().

356  {
357  int ncols = 416;
358  // Leave it hard-coded for phase 0/1, read from geometry for phase 2
359  if (phase_ == 2) {
360  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(tGeom_->idToDetUnit(detid));
361  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
362  ncols = topo->ncolumns();
363  } else if (phase_ == 0 && isFPix_(detid)) {
364  // Always use largest length for Phase 0 FPix modules (1x5 and 2x5)
365  // because we do not want to scale coordinates so ROC size remains fixed
366  // and only shifts are needed
367  ncols = 260;
368  }
369  // Shift to the middle of the pixel, for precision binning
370  return (pixel.second + 0.5) / ncols;
371 }
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const TrackerGeometry * tGeom_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
virtual int ncolumns() const =0
bool isFPix_(const DetId &)

Member Data Documentation

std::unordered_map<uint32_t, int> SiPixelCoordinates::blade_
private

Definition at line 186 of file SiPixelCoordinates.h.

Referenced by blade().

const SiPixelFedCablingMap* SiPixelCoordinates::cablingMap_
private

Definition at line 167 of file SiPixelCoordinates.h.

Referenced by channel(), fedid(), init(), and roc().

std::unordered_map<uint64_t, unsigned int> SiPixelCoordinates::channel_
private

Definition at line 190 of file SiPixelCoordinates.h.

Referenced by channel(), and roc().

std::unordered_map<uint32_t, int> SiPixelCoordinates::disk_
private

Definition at line 182 of file SiPixelCoordinates.h.

Referenced by disk().

std::unordered_map<uint32_t, unsigned int> SiPixelCoordinates::fedid_
private

Definition at line 189 of file SiPixelCoordinates.h.

Referenced by fedid(), and init().

std::unordered_map<uint32_t, int> SiPixelCoordinates::flipped_
private

Definition at line 181 of file SiPixelCoordinates.h.

Referenced by flipped().

std::unordered_map<uint32_t, int> SiPixelCoordinates::half_
private

Definition at line 179 of file SiPixelCoordinates.h.

Referenced by half().

std::unordered_map<uint32_t, int> SiPixelCoordinates::ladder_
private

Definition at line 176 of file SiPixelCoordinates.h.

Referenced by ladder().

std::unordered_map<uint32_t, int> SiPixelCoordinates::layer_
private

Definition at line 174 of file SiPixelCoordinates.h.

Referenced by layer().

std::unordered_map<uint32_t, int> SiPixelCoordinates::module_
private

Definition at line 173 of file SiPixelCoordinates.h.

Referenced by module().

std::unordered_map<uint32_t, int> SiPixelCoordinates::outer_
private

Definition at line 180 of file SiPixelCoordinates.h.

Referenced by outer().

std::unordered_map<uint32_t, int> SiPixelCoordinates::panel_
private

Definition at line 184 of file SiPixelCoordinates.h.

Referenced by panel().

int SiPixelCoordinates::phase_
private
std::unordered_map<uint32_t, int> SiPixelCoordinates::quadrant_
private

Definition at line 171 of file SiPixelCoordinates.h.

Referenced by quadrant().

std::unordered_map<uint32_t, int> SiPixelCoordinates::ring_
private

Definition at line 185 of file SiPixelCoordinates.h.

Referenced by ring().

std::unordered_map<uint64_t, unsigned int> SiPixelCoordinates::roc_
private

Definition at line 191 of file SiPixelCoordinates.h.

Referenced by channel(), and roc().

std::unordered_map<uint32_t, int> SiPixelCoordinates::sector_
private

Definition at line 175 of file SiPixelCoordinates.h.

Referenced by sector().

std::unordered_map<uint32_t, int> SiPixelCoordinates::side_
private

Definition at line 172 of file SiPixelCoordinates.h.

Referenced by side().

std::unordered_map<uint32_t, int> SiPixelCoordinates::signed_blade_
private

Definition at line 187 of file SiPixelCoordinates.h.

Referenced by signed_blade().

std::unordered_map<uint32_t, int> SiPixelCoordinates::signed_disk_
private

Definition at line 183 of file SiPixelCoordinates.h.

Referenced by signed_disk().

std::unordered_map<uint32_t, int> SiPixelCoordinates::signed_ladder_
private

Definition at line 177 of file SiPixelCoordinates.h.

Referenced by signed_ladder().

std::unordered_map<uint32_t, int> SiPixelCoordinates::signed_module_
private

Definition at line 178 of file SiPixelCoordinates.h.

Referenced by signed_module().

const TrackerGeometry* SiPixelCoordinates::tGeom_
private

Definition at line 166 of file SiPixelCoordinates.h.

Referenced by channel(), init(), roc(), xcoord_on_module_(), and ycoord_on_module_().

const TrackerTopology* SiPixelCoordinates::tTopo_
private