14 #include "Identifier/Identifier.h"
28 return StatusCode::SUCCESS;
34 const EventContext &ctx)
const {
41 std::make_unique<xAOD::StripClusterContainer>(),
42 std::make_unique<xAOD::StripClusterAuxContainer>()));
44 int rdoIndex_counter = 0;
46 for (
unsigned int i = 0;
i <
metadata->numOfStripClusters;
i++) {
49 stripClustersHandle->push_back(std::make_unique<xAOD::StripCluster>());
52 Eigen::Matrix<float, 1, 1> localPosition;
53 Eigen::Matrix<float, 1, 1> localCovariance;
58 Eigen::Matrix<float, 3, 1> globalPosition(
62 std::vector<Identifier> RDOs;
65 for (
unsigned int j = 0; j <
metadata->scRdoIndex[
i]; ++j) {
69 rdoIndex_counter +=
metadata->scRdoIndex[
i];
71 stripCl->setMeasurement<1>(scAux.
idHash.at(
i), localPosition,
73 stripCl->setIdentifier(scAux.
id.at(
i));
74 stripCl->setRDOlist(RDOs);
75 stripCl->globalPosition() = globalPosition;
79 return StatusCode::SUCCESS;
85 const EventContext &ctx)
const {
92 std::make_unique<xAOD::PixelClusterContainer>(),
93 std::make_unique<xAOD::PixelClusterAuxContainer>()));
98 int rdoIndex_counter = 0;
99 int totListIndex_counter = 0;
100 int chargeListIndex_counter = 0;
102 for (
unsigned int i = 0;
i <
metadata->numOfPixelClusters;
i++) {
105 pixelClustersHandle->push_back(std::make_unique<xAOD::PixelCluster>());
107 Eigen::Matrix<float, 2, 1> localPosition(pxAux.
localPosition.at(
i * 2),
109 Eigen::Matrix<float, 2, 2> localCovariance;
110 localCovariance.setZero();
113 Eigen::Matrix<float, 3, 1> globalPosition(
117 std::vector<Identifier> RDOs;
120 for (
unsigned int j = 0; j <
metadata->pcRdoIndex[
i]; ++j) {
124 std::vector<int> vec_totList;
125 vec_totList.reserve(
metadata->pcTotIndex[
i]);
126 for (
unsigned int j = 0; j <
metadata->pcTotIndex[
i]; ++j) {
127 vec_totList.push_back(pxAux.
totList.at(totListIndex_counter + j));
130 std::vector<float> vec_chargeList;
131 vec_chargeList.reserve(
metadata->pcChargeIndex[
i]);
132 for (
unsigned int k = 0;
k <
metadata->pcChargeIndex[
i]; ++
k) {
133 vec_chargeList.push_back(pxAux.
totList.at(chargeListIndex_counter +
k));
136 rdoIndex_counter +=
metadata->pcRdoIndex[
i];
137 totListIndex_counter +=
metadata->pcTotIndex[
i];
138 chargeListIndex_counter +=
metadata->pcChargeIndex[
i];
140 pixelCl->setMeasurement<2>(pxAux.
idHash.at(
i), localPosition,
142 pixelCl->setIdentifier(pxAux.
id.at(
i));
143 pixelCl->setRDOlist(RDOs);
144 pixelCl->globalPosition() = globalPosition;
145 pixelCl->setToTlist(vec_totList);
146 pixelCl->setTotalToT(pxAux.
totalToT.at(
i));
147 pixelCl->setChargelist(vec_chargeList);
149 pixelCl->setLVL1A(pxAux.
lvl1a.at(
i));
154 pixelCl->setIsSplit(pxAux.
isSplit.at(
i));
158 return StatusCode::SUCCESS;
163 const std::vector<std::vector<const xAOD::UncalibratedMeasurement *>>
166 const EventContext &ctx)
const {
173 std::make_unique<xAOD::SpacePointContainer>(),
174 std::make_unique<xAOD::SpacePointAuxContainer>()));
176 ATH_CHECK(pixelSpacePointsHandle.isValid());
179 for (
unsigned int i = 0;
i <
metadata->numOfPixelSpacePoints;
i++) {
182 pixelSpacePointsHandle->push_back(std::make_unique<xAOD::SpacePoint>());
183 Eigen::Matrix<float, 3, 1> globalPosition(
187 std::vector<const xAOD::UncalibratedMeasurement *> pixel_meas(
188 pixelsp_meas.at(
i).size());
189 std::copy(pixelsp_meas.at(
i).begin(), pixelsp_meas.at(
i).end(),
196 return StatusCode::SUCCESS;
201 const std::vector<std::vector<const xAOD::UncalibratedMeasurement *>>
204 const EventContext &ctx)
const {
211 std::make_unique<xAOD::SpacePointContainer>(),
212 std::make_unique<xAOD::SpacePointAuxContainer>()));
214 ATH_CHECK(stripSpacePointsHandle.isValid());
217 for (
unsigned int i = 0;
i <
metadata->numOfStripSpacePoints;
i++) {
220 stripSpacePointsHandle->push_back(std::make_unique<xAOD::SpacePoint>());
222 Eigen::Matrix<float, 3, 1> globalPosition(
226 std::vector<const xAOD::UncalibratedMeasurement *> strip_meas(
227 stripsp_meas.at(
i).size());
228 std::copy(stripsp_meas.at(
i).begin(), stripsp_meas.at(
i).end(),
233 Eigen::Matrix<float, 3, 1> topStripDirection(
237 Eigen::Matrix<float, 3, 1> bottomStripDirection(
241 Eigen::Matrix<float, 3, 1> stripCenterDistance(
244 Eigen::Matrix<float, 3, 1> topStripCenter(
250 strip_meas, topHalfStripLength, bottomHalfStripLength,
251 topStripDirection, bottomStripDirection, stripCenterDistance,
254 return StatusCode::SUCCESS;