30 gsl::span<const unsigned char>::iterator& pattIt,
35 bool applyMisalignment =
false;
37 for (
int il = 0; il < geom->getNumberOfLayers(); ++il) {
38 if (conf.sysErrY2[il] > 0.f || conf.sysErrZ2[il] > 0.f) {
39 applyMisalignment =
true;
45 float sigmaY2, sigmaZ2, sigmaYZ = 0;
47 const auto detID =
c.getSensorID();
48 auto& cl3d =
output.emplace_back(detID,
50 if (applyMisalignment) {
51 auto lrID = geom->getLayer(detID);
52 sigmaY2 += conf.sysErrY2[lrID];
53 sigmaZ2 += conf.sysErrZ2[lrID];
55 cl3d.setErrors(sigmaY2, sigmaZ2, sigmaYZ);
60 gsl::span<o2::itsmft::ROFRecord> rofs,
61 gsl::span<const itsmft::CompClusterExt>
clusters,
62 gsl::span<const unsigned char>::iterator& pattIt,
71 std::vector<uint8_t> clusterSizeVec;
72 clusterSizeVec.reserve(
clusters.size());
74 for (
auto& rof : rofs) {
75 for (
int clusterId{rof.getFirstEntry()}; clusterId < rof.getFirstEntry() + rof.getNEntries(); ++clusterId) {
77 auto sensorID =
c.getSensorID();
79 auto layer = geom->getLayer(sensorID);
81 float sigmaY2{0}, sigmaZ2{0}, sigmaYZ{0};
87 auto gloXYZ = geom->getMatrixL2G(sensorID) * locXYZ;
90 float alpha = geom->getSensorRefAlpha(sensorID);
94 trkXYZ = geom->getT2LMatrixITS3(sensorID,
alpha) ^ locXYZ;
97 trkXYZ = geom->getMatrixT2L(sensorID) ^ locXYZ;
100 tf->addTrackingFrameInfoToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), trkXYZ.x(),
alpha,
101 std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
102 std::array<float, 3>{sigmaY2, sigmaYZ, sigmaZ2});
105 tf->addClusterToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(),
tf->getUnsortedClusters()[
layer].size());
106 tf->addClusterExternalIndexToLayer(
layer, clusterId);
108 for (
unsigned int iL{0}; iL <
tf->getUnsortedClusters().
size(); ++iL) {
109 tf->mROFramesClusters[iL].push_back(
tf->getUnsortedClusters()[iL].size());
114 tf->setClusterSize(clusterSizeVec);
116 for (
auto&
v :
tf->mNTrackletsPerCluster) {
117 v.resize(
tf->getUnsortedClusters()[1].size());
119 for (
auto&
v :
tf->mNTrackletsPerClusterSum) {
120 v.resize(
tf->getUnsortedClusters()[1].size() + 1);
123 if (mcLabels !=
nullptr) {
124 tf->mClusterLabels = mcLabels;
int loadROFrameDataITS3(its::TimeFrame *tf, gsl::span< 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