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)
 
 OrderRdos (const OrderRdos &orderFunct)=default
 
OrderRdosoperator= (const OrderRdos &other)
 
bool operator() (const PixelRDORawData *rdo0, const PixelRDORawData *rdo1)
 

Private Attributes

ServiceHandle< InDetDD::IPixelReadoutManagerm_pixelReadout
 
Identifier m_offlineId
 

Detailed Description

Definition at line 97 of file PixelRawContByteStreamTool.h.

Constructor & Destructor Documentation

◆ OrderRdos() [1/2]

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

Definition at line 104 of file PixelRawContByteStreamTool.h.

104  :
105  m_pixelReadout(pixelReadout), m_offlineId(offlineId) { }

◆ OrderRdos() [2/2]

OrderRdos::OrderRdos ( const OrderRdos orderFunct)
default

Member Function Documentation

◆ operator()()

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

Definition at line 754 of file PixelRawContByteStreamTool.cxx.

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

◆ operator=()

OrderRdos& OrderRdos::operator= ( const OrderRdos other)
inline

Definition at line 111 of file PixelRawContByteStreamTool.h.

111  {
112  m_pixelReadout = other.m_pixelReadout;
113  return *this;
114  }

Member Data Documentation

◆ m_offlineId

Identifier OrderRdos::m_offlineId
private

Definition at line 101 of file PixelRawContByteStreamTool.h.

◆ m_pixelReadout

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

Definition at line 100 of file PixelRawContByteStreamTool.h.


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