16#include <fairlogger/Logger.h>
28 gsl::span<const o2::itsmft::Digit>
const&
digits,
29 gsl::span<const o2::itsmft::ROFRecord>
const& rofs)
32 LOG(detail) <<
"Processing TF# " << nTF++;
34 for (
const auto& rof : rofs) {
35 auto digitsInFrame = rof.getROFData(
digits);
36 for (
const auto& d : digitsInFrame) {
37 auto id = d.getChipIndex();
38 auto row = d.getRow();
39 auto col = d.getColumn();
44 mNumberOfStrobes += rofs.size();
45 return (mNumberOfStrobes > mMinROFs) ? true :
false;
49 gsl::span<const o2::itsmft::CompClusterExt>
const&
clusters,
50 gsl::span<const unsigned char>
const& patterns,
51 gsl::span<const o2::itsmft::ROFRecord>
const& rofs)
54 LOG(detail) <<
"Processing TF# " << nTF++;
56 auto pattIt = patterns.begin();
57 for (
const auto& rof : rofs) {
58 auto clustersInFrame = rof.getROFData(
clusters);
59 for (
const auto&
c : clustersInFrame) {
60 auto pattID =
c.getPatternID();
62 auto row =
c.getRow();
63 auto col =
c.getCol();
68 LOG(fatal) <<
"Clusters contain pattern IDs, but no dictionary is provided...";
72 }
else if (mDict->
isGroup(pattID)) {
74 float xCOG = 0., zCOG = 0.;
81 auto id =
c.getSensorID();
86 if ((rowSpan == 1) && (colSpan == 1)) {
92 auto nBits = rowSpan * colSpan;
95 unsigned char tempChar = patt.
getByte(
i);
98 if ((tempChar & s) != 0) {
103 if ((
ir + 1) * ic == nBits) {
111 if ((
ir + 1) * ic == nBits) {
117 mNumberOfStrobes += rofs.size();
118 return (mNumberOfStrobes > mMinROFs) ? true :
false;
123 LOG(info) <<
"Number of processed strobes is " << mNumberOfStrobes;
Definition of the ITSMFT compact cluster.
int getRowSpan() const
Returns the number of rows.
void acquirePattern(iterator &pattIt)
int getColumnSpan() const
Returns the number of columns.
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.
unsigned char getByte(int n) const
Returns a specific byte of the pattern.
int getUsedBytes() const
Returns the number of bytes used for the pattern.
static constexpr unsigned short InvalidPatternID
void increaseNoiseCount(int chip, int row, int col)
void applyProbThreshold(float t, long int n, float relErr=0.2f, int minChipID=0, int maxChipID=24119)
int getSize() const
Returns the number of elements in the dicionary;.
const ClusterPattern & getPattern(int n) const
Returns the pattern of the topology.
bool isGroup(int n) const
Returns true if the element corresponds to a group of rare topologies.
bool processTimeFrame(calibration::TFType tf, gsl::span< const o2::itsmft::Digit > const &digits, gsl::span< const o2::itsmft::ROFRecord > const &rofs)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::unique_ptr< GPUReconstructionTimeframe > tf
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
o2::InteractionRecord ir(0, 0)
std::vector< Cluster > clusters
std::vector< Digit > digits