14 #include "Identifier/Identifier.h"
28 return StatusCode::SUCCESS;
32 const int numClusters,
35 const EventContext &ctx)
const {
42 std::make_unique<xAOD::StripClusterContainer>(),
43 std::make_unique<xAOD::StripClusterAuxContainer>()));
45 int rdoIndex_counter = 0;
47 for (
int i = 0;
i < numClusters;
i++) {
50 stripClustersHandle->push_back(std::make_unique<xAOD::StripCluster>());
53 Eigen::Matrix<float, 1, 1> localPosition;
54 Eigen::Matrix<float, 1, 1> localCovariance;
59 Eigen::Matrix<float, 3, 1> globalPosition(
63 std::vector<Identifier> RDOs;
72 stripCl->setMeasurement<1>(scAux.
idHash.at(
i), localPosition,
74 stripCl->setIdentifier(scAux.
id.at(
i));
75 stripCl->setRDOlist(RDOs);
76 stripCl->globalPosition() = globalPosition;
80 return StatusCode::SUCCESS;
84 const int numClusters,
87 const EventContext &ctx)
const {
94 std::make_unique<xAOD::PixelClusterContainer>(),
95 std::make_unique<xAOD::PixelClusterAuxContainer>()));
100 int rdoIndex_counter = 0;
101 int totListIndex_counter = 0;
102 int chargeListIndex_counter = 0;
104 for (
int i = 0;
i < numClusters;
i++) {
107 pixelClustersHandle->push_back(std::make_unique<xAOD::PixelCluster>());
109 Eigen::Matrix<float, 2, 1> localPosition(pxAux.
localPosition.at(
i * 2),
111 Eigen::Matrix<float, 2, 2> localCovariance;
112 localCovariance.setZero();
115 Eigen::Matrix<float, 3, 1> globalPosition(
119 std::vector<Identifier> RDOs;
126 std::vector<int> vec_totList;
129 vec_totList.push_back(pxAux.
totList.at(totListIndex_counter + j));
132 std::vector<float> vec_chargeList;
135 vec_chargeList.push_back(pxAux.
totList.at(chargeListIndex_counter +
k));
142 pixelCl->setMeasurement<2>(pxAux.
idHash.at(
i), localPosition,
144 pixelCl->setIdentifier(pxAux.
id.at(
i));
145 pixelCl->setRDOlist(RDOs);
146 pixelCl->globalPosition() = globalPosition;
147 pixelCl->setToTlist(vec_totList);
148 pixelCl->setTotalToT(pxAux.
totalToT.at(
i));
149 pixelCl->setChargelist(vec_chargeList);
151 pixelCl->setLVL1A(pxAux.
lvl1a.at(
i));
156 pixelCl->setIsSplit(pxAux.
isSplit.at(
i));
160 return StatusCode::SUCCESS;
164 const int numPixelSpacePoints,
166 const std::vector<std::vector<const xAOD::UncalibratedMeasurement *>>
168 const EventContext &ctx)
const {
175 std::make_unique<xAOD::SpacePointContainer>(),
176 std::make_unique<xAOD::SpacePointAuxContainer>()));
178 ATH_CHECK(pixelSpacePointsHandle.isValid());
181 for (
int i = 0;
i < numPixelSpacePoints;
i++) {
184 pixelSpacePointsHandle->push_back(std::make_unique<xAOD::SpacePoint>());
185 Eigen::Matrix<float, 3, 1> globalPosition(
189 std::vector<const xAOD::UncalibratedMeasurement *> pixel_meas(
190 pixelsp_meas.at(
i).size());
191 std::copy(pixelsp_meas.at(
i).begin(), pixelsp_meas.at(
i).end(),
198 return StatusCode::SUCCESS;
202 const int numStripSpacePoints,
204 const std::vector<std::vector<const xAOD::UncalibratedMeasurement *>>
206 const EventContext &ctx)
const {
213 std::make_unique<xAOD::SpacePointContainer>(),
214 std::make_unique<xAOD::SpacePointAuxContainer>()));
216 ATH_CHECK(stripSpacePointsHandle.isValid());
219 for (
int i = 0;
i < numStripSpacePoints;
i++) {
222 stripSpacePointsHandle->push_back(std::make_unique<xAOD::SpacePoint>());
224 Eigen::Matrix<float, 3, 1> globalPosition(
228 std::vector<const xAOD::UncalibratedMeasurement *> strip_meas(
229 stripsp_meas.at(
i).size());
230 std::copy(stripsp_meas.at(
i).begin(), stripsp_meas.at(
i).end(),
235 Eigen::Matrix<float, 3, 1> topStripDirection(
239 Eigen::Matrix<float, 3, 1> bottomStripDirection(
243 Eigen::Matrix<float, 3, 1> stripCenterDistance(
246 Eigen::Matrix<float, 3, 1> topStripCenter(
252 strip_meas, topHalfStripLength, bottomHalfStripLength,
253 topStripDirection, bottomStripDirection, stripCenterDistance,
256 return StatusCode::SUCCESS;