37constexpr int PrimaryVertexLayerId{-1};
38constexpr int EventLabelsSeparator{-1};
45 gsl::span<const unsigned char>::iterator& pattIt,
50 bool applyMisalignment =
false;
51 const auto& conf = TrackerParamConfig::Instance();
52 const auto& chmap = getChipMappingITS();
53 for (
int il = 0; il < chmap.NLayers; il++) {
54 if (conf.sysErrY2[il] > 0.f || conf.sysErrZ2[il] > 0.f) {
55 applyMisalignment =
true;
61 float sigmaY2{0}, sigmaZ2{0}, sigmaYZ{0};
64 if (applyMisalignment) {
65 auto lrID = chmap.getLayer(
c.getSensorID());
66 sigmaY2 += conf.sysErrY2[lrID];
67 sigmaZ2 += conf.sysErrZ2[lrID];
69 cl3d.setErrors(sigmaY2, sigmaZ2, sigmaYZ);
78 std::cerr <<
"Missing clusters." << std::endl;
88 float sigmaY2{0}, sigmaZ2{0}, sigmaYZ{0};
90 auto sensorID =
c.getSensorID();
96 event.addTrackingFrameInfoToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), trkXYZ.x(), geom->
getSensorRefAlpha(sensorID),
97 std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
98 std::array<float, 3>{sigmaY2, sigmaYZ, sigmaZ2});
101 event.addClusterToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(),
event.getClustersOnLayer(
layer).size());
104 event.setMClabelsContainer(clsLabels);
106 event.addClusterExternalIndexToLayer(
layer, clusterId);
121 for (
const auto&
c : clusters_in_frame) {
123 float sigmaY2{0}, sigmaZ2{0}, sigmaYZ{0};
125 auto sensorID =
c.getSensorID();
131 event.addTrackingFrameInfoToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), trkXYZ.x(), geom->
getSensorRefAlpha(sensorID),
132 std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
133 std::array<float, 3>{sigmaY2, sigmaYZ, sigmaZ2});
136 event.addClusterToLayer(
layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(),
event.getClustersOnLayer(
layer).size());
139 event.setMClabelsContainer(mcLabels);
141 event.addClusterExternalIndexToLayer(
layer,
first + clusterId);
144 return (
int)clusters_in_frame.size();
General auxilliary methods.
Definition of the GeometryTGeo class.
Definition of a container to keep Monte Carlo truth external to simulation objects.
const Mat3D & getMatrixL2G(int sensID) const
const Mat3D & getMatrixT2L(int lay, int hba, int sta, int det) const
int getLayer(int index) const
Get chip layer, from 0.
float getSensorRefAlpha(int isn) const
static GeometryTGeo * Instance()
void fillMatrixCache(int mask) override
gsl::span< const T > getROFData(const gsl::span< const T > tfdata) const
int getFirstEntry() const
GLenum GLuint GLint GLint layer
void convertCompactClusters(gsl::span< const itsmft::CompClusterExt > clusters, gsl::span< const unsigned char >::iterator &pattIt, std::vector< o2::BaseCluster< float > > &output, const itsmft::TopologyDictionary *dict)
convert compact clusters to 3D spacepoints
o2::math_utils::Point3D< T > extractClusterData(const itsmft::CompClusterExt &c, iterator &iter, const itsmft::TopologyDictionary *dict, T &sig2y, T &sig2z)
void loadEventData(ROframe &events, gsl::span< const itsmft::CompClusterExt > clusters, gsl::span< const unsigned char >::iterator &pattIt, const itsmft::TopologyDictionary *dict, const dataformats::MCTruthContainer< MCCompLabel > *clsLabels=nullptr)
int loadROFrameData(const o2::itsmft::ROFRecord &rof, ROframe &events, gsl::span< const itsmft::CompClusterExt > clusters, gsl::span< const unsigned char >::iterator &pattIt, const itsmft::TopologyDictionary *dict, const dataformats::MCTruthContainer< MCCompLabel > *mClsLabels=nullptr)
std::vector< Cluster > clusters