31 gsl::span<const unsigned char>
const& patterns,
32 gsl::span<const o2::itsmft::ROFRecord>
const& rofs)
35 LOG(detail) <<
"Processing TF# " << nTF++ <<
" of " <<
clusters.size() <<
" clusters in" << rofs.size() <<
" ROFs";
37 auto pattIt = patterns.begin();
39 for (
const auto& rof : rofs) {
41 std::vector<int>* currChip =
nullptr;
42 auto clustersInFrame = rof.getROFData(
clusters);
43 for (
const auto&
c : clustersInFrame) {
44 if (chipID !=
c.getSensorID()) {
45 chipID =
c.getSensorID();
46 currChip = &mChipHits[chipID];
47 if (currChip->empty()) {
48 mChipIDs.push_back(chipID);
51 auto pattID =
c.getPatternID();
53 auto row =
c.getRow();
54 auto col =
c.getCol();
59 LOG(fatal) <<
"Clusters contain pattern IDs, but no dictionary is provided...";
63 }
else if (mDict->
isGroup(pattID)) {
65 float xCOG = 0., zCOG = 0.;
75 if ((rowSpan == 1) && (colSpan == 1)) {
82 for (
int ir = 0;
ir < rowSpan;
ir++) {
83 for (
int ic = 0; ic < colSpan; ic++) {
93#pragma omp parallel for schedule(dynamic) num_threads(mNThreads)
95 for (
int chipID : mChipIDs) {
97 mChipHits[chipID].clear();
99 mNumberOfStrobes += rofs.size();
100 return (mNumberOfStrobes > mMinROFs) ? true :
false;
104 gsl::span<const o2::itsmft::ROFRecord>
const& rofs)
107 LOG(detail) <<
"Processing TF# " << nTF++ <<
" of " <<
digits.size() <<
" digits in " << rofs.size() <<
" ROFs";
109 for (
const auto& rof : rofs) {
111 std::vector<int>* currChip =
nullptr;
112 auto digitsInFrame = rof.getROFData(
digits);
113 for (
const auto& dig : digitsInFrame) {
114 if (chipID != dig.getChipIndex()) {
115 chipID = dig.getChipIndex();
116 currChip = &mChipHits[chipID];
117 if (currChip->empty()) {
118 mChipIDs.push_back(chipID);
126#pragma omp parallel for schedule(dynamic) num_threads(mNThreads)
128 for (
int chipID : mChipIDs) {
130 mChipHits[chipID].clear();
132 mNumberOfStrobes += rofs.size();
133 return (mNumberOfStrobes > mMinROFs) ? true :
false;
140#pragma omp parallel for schedule(dynamic) num_threads(mNThreads)
142 for (
int ic = 0; ic <
NChips; ic++) {
143 const auto& chExt = extMap.
getChip(ic);
144 auto& chCurr = mNoiseMap.
getChip(ic);
145 for (
auto it : chExt) {
146 chCurr[it.first] += it.second;
153 LOG(info) <<
"Number of processed strobes is " << mNumberOfStrobes;
155 mNoiseMap.
applyProbThreshold(mProbabilityThreshold, mNumberOfStrobes, mProbRelErr, 432, 24119);
156 LOG(info) <<
"Applying special cut for ITS IB: " << cutIB;
168 mChipHits[
i].clear();
Definition of the ITSMFT compact cluster.
static constexpr int NChips
bool processTimeFrameDigits(gsl::span< const o2::itsmft::Digit > const &digits, gsl::span< const o2::itsmft::ROFRecord > const &rofs)
void addMap(const o2::itsmft::NoiseMap &extMap)
bool processTimeFrameClusters(gsl::span< const o2::itsmft::CompClusterExt > const &clusters, gsl::span< const unsigned char > const &patterns, gsl::span< const o2::itsmft::ROFRecord > const &rofs)
void finalize(float cutIB=-1.)
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.
bool isSet(int row, int col) const
static constexpr unsigned short InvalidPatternID
NoiseMap class for the ITS and MFT.
static int getKey(int row, int col)
void increaseNoiseCount(int chip, int row, int col)
std::map< int, int > & getChip(int chip)
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.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
o2::InteractionRecord ir(0, 0)
std::vector< Cluster > clusters
std::vector< Digit > digits