32 gsl::span<const unsigned char>::iterator& pattIt,
37 bool applyMisalignment =
false;
39 for (
int il = 0; il < geom->getNumberOfLayers(); ++il) {
40 if (conf.sysErrY2[il] > 0.f || conf.sysErrZ2[il] > 0.f) {
41 applyMisalignment =
true;
47 float sigmaY2, sigmaZ2, sigmaYZ = 0;
49 const auto detID =
c.getSensorID();
50 auto& cl3d =
output.emplace_back(detID,
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<o2::itsmft::ROFRecord> rofs,
63 gsl::span<const itsmft::CompClusterExt>
clusters,
64 gsl::span<const unsigned char>::iterator& pattIt,
73 std::vector<uint8_t> clusterSizeVec;
74 clusterSizeVec.reserve(
clusters.size());
76 for (
auto& rof : rofs) {
77 for (
int clusterId{rof.getFirstEntry()}; clusterId < rof.getFirstEntry() + rof.getNEntries(); ++clusterId) {
79 auto sensorID =
c.getSensorID();
81 auto layer = geom->getLayer(sensorID);
83 auto pattID =
c.getPatternID();
84 float sigmaY2{0}, sigmaZ2{0}, sigmaYZ{0};
90 auto gloXYZ = geom->getMatrixL2G(sensorID) * locXYZ;
93 float alpha = geom->getSensorRefAlpha(sensorID);
97 trkXYZ = geom->getT2LMatrixITS3(sensorID,
alpha) ^ locXYZ;
100 trkXYZ = geom->getMatrixT2L(sensorID) ^ locXYZ;
103 tf->addTrackingFrameInfoToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), trkXYZ.x(),
alpha,
104 std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
105 std::array<float, 3>{sigmaY2, sigmaYZ, sigmaZ2});
108 tf->addClusterToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(),
tf->getUnsortedClusters()[
layer].size());
109 tf->addClusterExternalIndexToLayer(
layer, clusterId);
111 for (
unsigned int iL{0}; iL <
tf->getUnsortedClusters().
size(); ++iL) {
112 tf->mROFramesClusters[iL].push_back(
tf->getUnsortedClusters()[iL].size());
117 tf->setClusterSize(clusterSizeVec);
119 for (
auto&
v :
tf->mNTrackletsPerCluster) {
120 v.resize(
tf->getUnsortedClusters()[1].size());
122 for (
auto&
v :
tf->mNTrackletsPerClusterSum) {
123 v.resize(
tf->getUnsortedClusters()[1].size() + 1);
126 if (mcLabels !=
nullptr) {
127 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