19#include <fairlogger/Logger.h>
20#include <fmt/format.h>
33 if (cluster.layer < 0) {
36 if constexpr (
DetID == o2::detectors::DetID::TRK) {
37 if (cluster.subDetID == 0) {
40 if (cluster.subDetID == 1) {
52 if (cluster.subDetID != 0) {
56 return {flat.X(), flat.Y(), local.Z()};
62 float cogRow = 0.f, cogCol = 0.f;
64 float x = 0.f,
z = 0.f;
66 const bool vd = cluster.subDetID == 0;
78 const auto nBytes =
static_cast<std::size_t
>(2 + ((rowSpan * colSpan + 7) / 8));
80 for (
auto it =
first; it != last; ++it) {
81 const auto& entryPattern =
data.entries[it->second].pattern;
82 if (entryPattern.size() == nBytes && std::memcmp(entryPattern.data(),
pattern, nBytes) == 0) {
86 return static_cast<int>(
data.entries.size()) - NGroups + groupOf(rowSpan, colSpan);
92 const int layer = layerOf(cluster);
95 math_utils::Point3D<float> flat;
97 flat = centreOfGravity(cluster,
pattern);
99 float x = 0.f,
z = 0.f;
101 const bool vd = cluster.
subDetID == 0;
106 flat.SetX(flat.X() +
entry.xOffset);
107 flat.SetZ(flat.Z() +
entry.zOffset);
109 flat.SetY(
data.depth);
116 auto local = getFlatCoordinates(cluster,
pattern,
id);
119 local.SetX(curved.X());
120 local.SetY(curved.Y());
128 LOGP(info,
"{} TopologyDictionary: {} layers, offsets {}",
o2::detectors::DetID(
DetID).
getName(), mLayers.size(), mApplyOffsets ?
"applied" :
"not applied");
130 LOGP(info,
" layer {:2}: depth {:6.2f} um, {} common patterns",
layer, 1e4 * mLayers[
layer].
depth, mLayers[
layer].
entries.size() - NGroups);
138 std::unique_ptr<TFile>
file{TFile::Open(fileName.c_str(),
"READ")};
140 throw std::runtime_error(fmt::format(
"Failed to open {}", fileName));
143 if (dictionary ==
nullptr) {
144 throw std::runtime_error(fmt::format(
"Failed to load {} from {}", objName, fileName));
Definition of the ClusterTopology class.
std::string getName(const TDataMember *dm, int index, int size)
Positions and errors of TRK and FT3 clusters per layer and pixel pattern.
std::vector< long > entries
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual Show related Highlight grid Show only individual collision Color clusters belonging to track objects Set line Enable drawing TPC data Enable drawing TOF data Enable drawing magnetic field Set field line step count Invert colors configStandalone Heavy OpenGL display display_heavy Show tracks with ITS contribution Show tracks with TOF contribution Enable propagation of loopers Show clusters at nominal x of pad row for early transformed data Split CE tracks when they cross the central Mark clusters Mark adjacent clusters Hide rejected tracks Apply filter on tracks to be displayed Separate increase X h configStandalone Camera window renderer OpenGL display display_camera Orient the camera such that the y axis is always upwards Full Screen MultiSample Anti Downsampling Anti Enable Vertical Sync Target frame or if the backend cannot limit to the refresh Use OpenGL indirect draws to reduce number of draw calls Display h configStandalone Vulkan display display_vulkan Have uniform buffers in host accessible device memory h configStandalone Internal display display_internal Number of updates the Qt GUI may send ahead of the last one the display has before it waits for the display Opacity of the console background Number of console lines the history is shortened to this when it reaches twice the size Time in seconds an info message fades out after setInfoTime h OpenGL display display Font size Do not use Freetype for font Renderer for event Frontend to use for event ROOT macros used as track filter Console script file
Definition of the SegmentationChipclass.
Static class with identifiers, bitmasks and names for ALICE detectors.
static int getCOG(int rowSpan, int colSpan, const unsigned char patt[MaxPatternBytes], float &xCOG, float &zCOG)
Static: Compute pattern's COG position. Returns the number of fired pixels.
static unsigned long getCompleteHash(int nRow, int nCol, const unsigned char patt[ClusterPattern::MaxPatternBytes])
Compute the complete hash as defined for mHash.
static constexpr math_utils::Vector2D< float > flatToCurved(int layer, float xFlat, float yFlat) noexcept
static void detectorToLocalUnchecked(int row, int col, float &xRow, float &zCol, int subDetID, int layer, int disk) noexcept
static constexpr float PitchColVD
static constexpr float PitchColMLOT
static constexpr float PitchRowMLOT
static constexpr float PitchRowVD
static math_utils::Vector2D< float > curvedToFlat(const int layer, const float xCurved, const float yCurved) noexcept
static int layerOf(const ClusterType &cluster) noexcept
A cluster's layer: TRK's VD layers, then ML/OT (GeometryTGeo::getLayerTRK); FT3's discs....
static math_utils::Point3D< float > localToFlat(const ClusterType &cluster, const math_utils::Point3D< float > &local) noexcept
A point from O2's local frame to the layer's flat frame (the VD's unrolled; elsewhere the same).
int findID(int layer, const unsigned char *pattern) const
The pattern's entry on the layer: its own if it is common, else its group's.
static math_utils::Point3D< float > centreOfGravity(const ClusterType &cluster, const unsigned char *pattern) noexcept
The cluster's centre of gravity in the flat frame at y = 0. pattern: row span, column span,...
static TopologyDictionary * loadFrom(const std::string &fileName, const std::string &objName="ccdb_object")
math_utils::Point3D< float > getClusterCoordinates(const ClusterType &cluster, const unsigned char *pattern, int id) const
The same in O2's local frame: curved on the VD.
math_utils::Point3D< float > getFlatCoordinates(const ClusterType &cluster, const unsigned char *pattern, int id) const
The position in the flat frame: the entry's centre of gravity, plus its offsets if applied,...
GLint GLint GLsizei GLsizei GLsizei depth
GLenum GLuint GLint GLint layer
GLdouble GLdouble GLdouble z
std::array< uint16_t, 5 > pattern