ATLAS Offline Software
ITkPixelHitSortingTool.cxx
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 
9 
10 ITkPixelHitSortingTool::ITkPixelHitSortingTool(const std::string& type,const std::string& name,const IInterface* parent) :
12 {
13  //not much to construct as of now
14 }
15 
16 
18  ATH_CHECK(m_pixelReadout.retrieve());
19  if (!detStore()->retrieve(m_pixIdHelper, "PixelID").isSuccess()) {
20  ATH_MSG_FATAL("Unable to retrieve PixelID helper");
21  return StatusCode::FAILURE;
22  }
23  return StatusCode::SUCCESS;
24 }
25 
27  PixelRDO_Container::const_iterator rdoCollections = rdoContainer->begin();
28  PixelRDO_Container::const_iterator rdoCollectionsEnd = rdoContainer->end();
29 
30  for(; rdoCollections!=rdoCollectionsEnd; ++rdoCollections){
31  const InDetRawDataCollection<PixelRDORawData>* RDO_Collection(*rdoCollections);
32 
33  for(const auto *const rdo : *RDO_Collection) {
34  const Identifier rdoID = rdo->identify();
35  const Identifier wafferID = m_pixIdHelper->wafer_id(rdoID);
36 
37  int pixPhiIx = m_pixIdHelper->phi_index(rdoID);
38  int pixEtaIx = m_pixIdHelper->eta_index(rdoID);
39 
40  const int tot = rdo->getToT();
41  uint32_t chip = m_pixelReadout->getFE( rdoID, wafferID);
42  uint32_t col = m_pixelReadout->getColumn( rdoID, wafferID);
43  uint32_t row = m_pixelReadout->getRow( rdoID, wafferID);
44 
45  ATH_MSG_INFO("ID: " + rdoID.getString() + " IDoff: " + wafferID.getString() + " Chip: "+ std::to_string(chip) + " ToT: " + std::to_string(tot) + " pixEtaIx: " + std::to_string(pixEtaIx) + " col: " + std::to_string(col)+ " pixPhiIx: " + std::to_string(pixPhiIx) + " row: " + std::to_string(row));
46  };
47  };
48 
49 
50 
51  return StatusCode::SUCCESS;
52 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
query_example.row
row
Definition: query_example.py:24
ITkPixelHitSortingTool.h
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ITkPixelHitSortingTool::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: ITkPixelHitSortingTool.h:35
ITkPixelHitSortingTool::initialize
StatusCode initialize()
Definition: ITkPixelHitSortingTool.cxx:17
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
ITkPixelHitSortingTool::m_pixIdHelper
const PixelID * m_pixIdHelper
Definition: ITkPixelHitSortingTool.h:37
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:364
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDetRawDataCollection
Definition: InDetRawDataCollection.h:31
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:239
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:79
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:233
ITkPixelHitSortingTool::sortRDOHits
StatusCode sortRDOHits(SG::ReadHandle< PixelRDO_Container > &rdoContainer) const
Definition: ITkPixelHitSortingTool.cxx:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
query_example.col
col
Definition: query_example.py:7
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26
ITkPixelHitSortingTool::ITkPixelHitSortingTool
ITkPixelHitSortingTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ITkPixelHitSortingTool.cxx:10
Identifier
Definition: IdentifierFieldParser.cxx:14