ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
OrderRdos Class Reference

#include <PixelRawContByteStreamTool.h>

Collaboration diagram for OrderRdos:

Public Member Functions

 OrderRdos (Identifier offlineId, const ServiceHandle< InDetDD::IPixelReadoutManager > &pixelReadout)
 
bool operator() (const PixelRDORawData *rdo0, const PixelRDORawData *rdo1)
 

Private Attributes

ServiceHandle< InDetDD::IPixelReadoutManagerm_pixelReadout
 
Identifier m_offlineId
 

Detailed Description

Definition at line 89 of file PixelRawContByteStreamTool.h.

Constructor & Destructor Documentation

◆ OrderRdos()

OrderRdos::OrderRdos ( Identifier  offlineId,
const ServiceHandle< InDetDD::IPixelReadoutManager > &  pixelReadout 
)
inline

Definition at line 96 of file PixelRawContByteStreamTool.h.

96  :
97  m_pixelReadout(pixelReadout), m_offlineId(offlineId) { }

Member Function Documentation

◆ operator()()

bool OrderRdos::operator() ( const PixelRDORawData rdo0,
const PixelRDORawData rdo1 
)

Definition at line 755 of file PixelRawContByteStreamTool.cxx.

756 {
757  // const uint32_t halfCols = 40; // this is the number of the FE-I4 columns / 2, because the two tokens in the FE-I4 run from the double column 0 to 19, and then from 39 to 20.
758  // This corresponds to column 1 to 40, and 79-80, 77-78, ... to 41-42.
759  Identifier pixelId0 = rdo0->identify();
760  uint32_t col0 = m_pixelReadout->getColumn(pixelId0, m_offlineId);
761  uint32_t row0 = m_pixelReadout->getRow(pixelId0, m_offlineId);
762  Identifier pixelId1 = rdo1->identify();
763  uint32_t col1 = m_pixelReadout->getColumn(pixelId1, m_offlineId);
764  uint32_t row1 = m_pixelReadout->getRow(pixelId1, m_offlineId);
765 
766  // Decide if (col0, row0) should be inserted in front of (col1, row1):
767 
768  // Check if both hits are in same column
769  if (col0 == col1) return (row0 < row1);
770 
771  // If not, check if they are in same double column
772  else if (((col0 == col1-1) && (col1%2 == 0)) || ((col1 == col0-1) && (col0%2 == 0))) {
773 
774  // If rows are equal, sort by ascending column
775  if (row0 == row1) return (col0 < col1);
776  // If rows are unequal, sort by ascending row
777  else return (row0 < row1);
778  }
779 
780  // Not in same double column: Separate between FE halfs
781  else {
782 
783  // If both hits are in second FE half: Sort by descending col
784  if (col0 > 40 && col1 > 40) return (col0 > col1);
785 
786  // Otherwise, sort by ascending col
787  else return (col0 < col1);
788  }
789 }

Member Data Documentation

◆ m_offlineId

Identifier OrderRdos::m_offlineId
private

Definition at line 93 of file PixelRawContByteStreamTool.h.

◆ m_pixelReadout

ServiceHandle<InDetDD::IPixelReadoutManager> OrderRdos::m_pixelReadout
private

Definition at line 92 of file PixelRawContByteStreamTool.h.


The documentation for this class was generated from the following files:
OrderRdos::m_offlineId
Identifier m_offlineId
Definition: PixelRawContByteStreamTool.h:93
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
InDetRawData::identify
virtual Identifier identify() const override final
Definition: InDetRawData.h:41
OrderRdos::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelRawContByteStreamTool.h:92
Identifier
Definition: IdentifierFieldParser.cxx:14