31 gsl::span<const unsigned char>::iterator& pattIt,
38 bool applyMisalignment =
false;
40 for (
int il = 0; il < geom->getNumberOfLayers(); ++il) {
41 if (conf.sysErrY2[il] > 0.f || conf.sysErrZ2[il] > 0.f) {
42 applyMisalignment =
true;
48 float sigmaY2, sigmaZ2, sigmaYZ = 0;
50 const auto detID =
c.getSensorID();
51 auto& cl3d =
output.emplace_back(detID, geom->getMatrixT2L(detID) ^ locXYZ);
52 if (applyMisalignment) {
53 auto lrID = geom->getLayer(detID);
54 sigmaY2 += conf.sysErrY2[lrID];
55 sigmaZ2 += conf.sysErrZ2[lrID];
57 cl3d.setErrors(sigmaY2, sigmaZ2, sigmaYZ);
62 gsl::span<const o2::itsmft::ROFRecord> rofs,
63 gsl::span<const itsmft::CompClusterExt>
clusters,
64 gsl::span<const unsigned char>::iterator& pattIt,
71 tf->resetROFrameData(rofs.size());
76 for (
size_t iRof{0}; iRof < rofs.size(); ++iRof) {
77 const auto& rof = rofs[iRof];
78 for (
int clusterId{rof.getFirstEntry()}; clusterId < rof.getFirstEntry() + rof.getNEntries(); ++clusterId) {
80 auto sensorID =
c.getSensorID();
81 auto layer = geom->getLayer(sensorID);
83 float sigmaY2{0}, sigmaZ2{0}, sigmaYZ{0};
89 auto gloXYZ = geom->getMatrixL2G(sensorID) * locXYZ;
95 float alpha = geom->getSensorRefAlpha(sensorID);
97 tf->addTrackingFrameInfoToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), trkXYZ.x(),
alpha,
98 std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
99 std::array<float, 3>{sigmaY2, sigmaYZ, sigmaZ2});
102 tf->addClusterToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(),
tf->getUnsortedClusters()[
layer].size());
103 tf->addClusterExternalIndexToLayer(
layer, clusterId);
105 for (
unsigned int iL{0}; iL <
tf->getUnsortedClusters().
size(); ++iL) {
106 tf->mROFramesClusters[iL][iRof + 1] =
tf->getUnsortedClusters()[iL].size();
110 tf->setClusterSize(clusterSizeVec);
112 for (
auto&
v :
tf->mNTrackletsPerCluster) {
113 v.resize(
tf->getUnsortedClusters()[1].size());
115 for (
auto&
v :
tf->mNTrackletsPerClusterSum) {
116 v.resize(
tf->getUnsortedClusters()[1].size() + 1);
119 if (mcLabels !=
nullptr) {
120 tf->mClusterLabels = mcLabels;
int loadROFrameDataITS3(its::TimeFrame< 7 > *tf, gsl::span< const o2::itsmft::ROFRecord > rofs, gsl::span< const itsmft::CompClusterExt > clusters, gsl::span< const unsigned char >::iterator &pattIt, const its3::TopologyDictionary *dict, const dataformats::MCTruthContainer< MCCompLabel > *mcLabels=nullptr)
void convertCompactClusters(gsl::span< const itsmft::CompClusterExt > clusters, gsl::span< const unsigned char >::iterator &pattIt, std::vector< o2::BaseCluster< float > > &output, const its3::TopologyDictionary *dict)
convert compact clusters to 3D spacepoints