ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ActsTrk::HgtdClusteringTool Class Reference

#include <HgtdClusteringTool.h>

Inheritance diagram for ActsTrk::HgtdClusteringTool:
Collaboration diagram for ActsTrk::HgtdClusteringTool:

Public Member Functions

 HgtdClusteringTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override
 
virtual StatusCode clusterize (const RawDataCollection &RDOs, const EventContext &ctx, ClusterContainer &container) const override
 

Private Attributes

const HGTD_DetectorManagerm_hgtd_det_mgr {nullptr}
 

Detailed Description

Definition at line 16 of file HgtdClusteringTool.h.

Constructor & Destructor Documentation

◆ HgtdClusteringTool()

ActsTrk::HgtdClusteringTool::HgtdClusteringTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 10 of file HgtdClusteringTool.cxx.

13  : base_class(type, name, parent)
14  {}

Member Function Documentation

◆ clusterize()

StatusCode ActsTrk::HgtdClusteringTool::clusterize ( const RawDataCollection &  RDOs,
const EventContext &  ctx,
ClusterContainer &  container 
) const
overridevirtual

Definition at line 24 of file HgtdClusteringTool.cxx.

27  {
28  ATH_MSG_DEBUG("Clustering hits...");
29 
30  // Fast insertion trick
31  std::size_t previousSize = container.size();
32  std::vector<xAOD::HGTDCluster*> toAdd;
33  toAdd.reserve(RDOs.size());
34  for (std::size_t i(0), n(RDOs.size()); i < n; ++i)
35  toAdd.push_back( new xAOD::HGTDCluster() );
36  container.insert(container.end(), toAdd.begin(), toAdd.end());
37 
38  for (std::size_t i(0), n(RDOs.size()); i < n; ++i) {
39  const auto* rdo = RDOs[i];
40  Identifier rdo_id = rdo->identify();
42 
43  InDetDD::SiCellId si_cell_id = element->cellIdFromIdentifier(rdo_id);
44 
45  InDetDD::SiLocalPosition si_pos = element->design().localPositionOfCell(si_cell_id);
46 
47 
48  Eigen::Matrix<float, 3, 1> loc_pos(si_pos.xPhi(), si_pos.xEta(),rdo->getTOA());
49  Eigen::Matrix<float, 3, 3> cov_matrix= Eigen::Matrix<float, 3, 3>::Zero();
50 
51  float xWidth = 1.3;
52  float yWidth = 1.3;
53  cov_matrix(0,0) = xWidth * xWidth / 12; // i.e. Cov XX
54  cov_matrix(1,1) = yWidth * yWidth / 12; // i.e. Cov YY
55  float time_of_arrival_err = 0.035;
56  cov_matrix(2,2) = time_of_arrival_err * time_of_arrival_err; // i.e. Cov TT
57 
58  std::vector<Identifier> rdo_list = {rdo_id};
59  std::vector<int> time_over_threshold = {static_cast<int>(rdo->getTOT())};
60 
61  IdentifierHash id_hash = RDOs.identifierHash();
62 
63  // Fill
64  xAOD::HGTDCluster* cluster = container[previousSize + i];
65  cluster->setMeasurement<3>(id_hash,loc_pos,cov_matrix);
66  cluster->setIdentifier(rdo_id.get_compact());
67  cluster->setRDOlist(std::move(rdo_list));
68  cluster->setToTlist(std::move(time_over_threshold));
69  }
70 
71 
72  return StatusCode::SUCCESS;
73  }

◆ initialize()

StatusCode ActsTrk::HgtdClusteringTool::initialize ( )
overridevirtual

Definition at line 16 of file HgtdClusteringTool.cxx.

17  {
18  ATH_MSG_INFO("Initializing HgtdClusteringTool...");
19 
21  return StatusCode::SUCCESS;
22  }

Member Data Documentation

◆ m_hgtd_det_mgr

const HGTD_DetectorManager* ActsTrk::HgtdClusteringTool::m_hgtd_det_mgr {nullptr}
private

Definition at line 29 of file HgtdClusteringTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
InDetDD::HGTD_DetectorElement::cellIdFromIdentifier
SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
Definition: HGTD_DetectorElement.cxx:51
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ActsTrk::HgtdClusteringTool::m_hgtd_det_mgr
const HGTD_DetectorManager * m_hgtd_det_mgr
Definition: HgtdClusteringTool.h:29
InDetDD::HGTD_ModuleDesign::localPositionOfCell
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const
readout or diode id -> position.
Definition: HGTD_ModuleDesign.cxx:145
xAOD::HGTDCluster_v1::setRDOlist
void setRDOlist(const std::vector< Identifier > &rdolist)
Sets the list of identifiers of the channels building the cluster.
Definition: HGTDCluster_v1.cxx:15
InDetDD::HGTD_DetectorElement
Definition: HGTD_DetectorElement.h:40
xAOD::HGTDCluster_v1
Definition: HGTDCluster_v1.h:23
InDetDD::HGTD_DetectorElement::design
const HGTD_ModuleDesign & design() const override final
access to the local description:
Definition: HGTD_DetectorElement.h:121
InDetDD::SiLocalPosition
Definition: SiLocalPosition.h:31
InDetDD::SiLocalPosition::xPhi
double xPhi() const
position along phi direction:
Definition: SiLocalPosition.h:123
xAOD::UncalibratedMeasurement_v1::setIdentifier
void setIdentifier(const DetectorIdentType measId)
Sets the full Identifier of the measurement.
lumiFormat.i
int i
Definition: lumiFormat.py:92
InDetDD::SiLocalPosition::xEta
double xEta() const
position along eta direction:
Definition: SiLocalPosition.h:118
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::HGTDCluster_v1::setToTlist
void setToTlist(const std::vector< int > &tots)
Sets the list of ToT of the channels building the cluster.
DeMoUpdate.toAdd
bool toAdd
Definition: DeMoUpdate.py:1304
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
InDetDD::SiCellId
Definition: SiCellId.h:29
HGTD_DetectorManager::getDetectorElement
InDetDD::HGTD_DetectorElement * getDetectorElement(const Identifier &id) const
access to individual elements : via Identifier
Definition: HGTD_DetectorManager.cxx:57
xAOD::UncalibratedMeasurement_v1::setMeasurement
void setMeasurement(const DetectorIDHashType idHash, MeasVector< N > locPos, MeasMatrix< N > locCov)
Sets IdentifierHash, local position and local covariance of the measurement.
Identifier::get_compact
value_type get_compact(void) const
Get the compact id.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IdentifierHash
Definition: IdentifierHash.h:38
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32