Skip to content

Commit 617e4fc

Browse files
committed
ITS3: split topo dict into IB and OB
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 7e5ba7d commit 617e4fc

File tree

14 files changed

+476
-298
lines changed

14 files changed

+476
-298
lines changed

Detectors/Upgrades/ITS3/macros/test/CheckClusterSize.C

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,14 @@ void CheckClusterSize(std::string clusFileName = "o2clus_its.root",
255255

256256
auto pattId = cluster.getPatternID();
257257
auto id = cluster.getSensorID();
258+
auto ib = o2::its3::constants::detID::isDetITS3(id);
258259
int clusterSize{-1};
259-
if (pattId == o2::itsmft::CompCluster::InvalidPatternID || dict.isGroup(pattId)) {
260+
if (pattId == o2::itsmft::CompCluster::InvalidPatternID || dict.isGroup(pattId, ib)) {
260261
o2::itsmft::ClusterPattern patt(pattIt);
261262
clusterSize = patt.getNPixels();
262263
continue;
263264
} else {
264-
clusterSize = dict.getNpixels(pattId);
265+
clusterSize = dict.getNpixels(pattId, ib);
265266
}
266267

267268
const auto& label = (clusLabArr->getLabels(clEntry))[0];

Detectors/Upgrades/ITS3/macros/test/CheckClustersITS3.C

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,17 @@ void CheckClustersITS3(const std::string& clusfile = "o2clus_its.root",
175175
auto isIB = o2::its3::constants::detID::isDetITS3(chipID);
176176
auto layer = o2::its3::constants::detID::getDetID2Layer(chipID);
177177
auto clusterSize{-1};
178-
if (pattID == o2::itsmft::CompCluster::InvalidPatternID || dict.isGroup(pattID)) {
178+
if (pattID == o2::itsmft::CompCluster::InvalidPatternID || dict.isGroup(pattID, isIB)) {
179179
o2::itsmft::ClusterPattern patt(pattIt);
180180
locC = dict.getClusterCoordinates(cluster, patt, false);
181181
LOGP(debug, "I am invalid and I am on chip {}", chipID);
182182
++cPattInvalid;
183183
continue;
184184
} else {
185185
locC = dict.getClusterCoordinates(cluster);
186-
errX = dict.getErrX(pattID);
187-
errZ = dict.getErrZ(pattID);
188-
errX *= (isIB) ? MosaixSegmentation::PitchRow : Segmentation::PitchRow;
189-
errZ *= (isIB) ? MosaixSegmentation::PitchCol : Segmentation::PitchCol;
190-
npix = dict.getNpixels(pattID);
186+
errX = dict.getErrX(pattID, isIB);
187+
errZ = dict.getErrZ(pattID, isIB);
188+
npix = dict.getNpixels(pattID, isIB);
191189
++cPattValid;
192190
}
193191

Detectors/Upgrades/ITS3/macros/test/CompareClustersAndDigits.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void CompareClustersAndDigits(std::string clusfile = "o2clus_it3.root",
260260
const auto pattID = cluster.getPatternID();
261261
const auto isIB = o2::its3::constants::detID::isDetITS3(chipID);
262262
const auto layer = gman->getLayer(chipID);
263-
if (pattID == o2::itsmft::CompCluster::InvalidPatternID || dict.isGroup(pattID)) {
263+
if (pattID == o2::itsmft::CompCluster::InvalidPatternID || dict.isGroup(pattID, isIB)) {
264264
continue;
265265
}
266266
const auto& lab = (clusLabArr->getLabels(clEntry))[0];
@@ -316,7 +316,7 @@ void CompareClustersAndDigits(std::string clusfile = "o2clus_it3.root",
316316
data[chipID].cog->AddPoint(colC, rowC);
317317

318318
constexpr float delta = 1e-2;
319-
const auto& patt = dict.getPattern(cluster.getPatternID());
319+
const auto& patt = dict.getPattern(cluster.getPatternID(), isIB);
320320
auto box = new TBox(
321321
cluster.getCol() - delta - 0.5,
322322
cluster.getRow() - delta - 0.5,

Detectors/Upgrades/ITS3/macros/test/CreateDictionariesITS3.C

Lines changed: 68 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void CreateDictionariesITS3(bool saveDeltas = false,
6060
std::string collContextfile = "collisioncontext.root",
6161
std::string inputGeom = "",
6262
float checkOutliers = 2., // reject outliers (MC dX or dZ exceeds row/col span by a factor above the threshold)
63-
float minPtMC = 0.01) // account only MC hits with pT above threshold
63+
float minPtMC = 0.1) // account only MC hits with pT above threshold
6464
{
6565
const int QEDSourceID = 99; // Clusters from this MC source correspond to QED electrons
6666

@@ -84,10 +84,11 @@ void CreateDictionariesITS3(bool saveDeltas = false,
8484
std::array<o2::its3::SegmentationMosaix, 3> mMosaixSegmentations{0, 1, 2};
8585
if (!clusDictFile.empty()) {
8686
clusDictOld.readFromFile(clusDictFile);
87-
LOGP(info, "Loaded external cluster dictionary with {} entries from {}", clusDictOld.getSize(), clusDictFile);
87+
LOGP(info, "Loaded external cluster dictionary with {} IB/{} OBentries from {}", clusDictOld.getSize(true), clusDictOld.getSize(false), clusDictFile);
8888
}
8989

90-
ULong_t cOk{0}, cOutliers{0}, cFailedMC{0};
90+
ULong_t cOkIB{0}, cOutliersIB{0}, cFailedMCIB{0};
91+
ULong_t cOkOB{0}, cOutliersOB{0}, cFailedMCOB{0};
9192

9293
TFile* fout = nullptr;
9394
TNtuple* nt = nullptr;
@@ -233,17 +234,18 @@ void CreateDictionariesITS3(bool saveDeltas = false,
233234

234235
const auto& cluster = (*clusArr)[clEntry];
235236
o2::itsmft::ClusterPattern pattern;
237+
bool ib = o2::its3::constants::detID::isDetITS3(cluster.getChipID());
236238

237239
if (cluster.getPatternID() != CompCluster::InvalidPatternID) {
238-
if (clusDictOld.getSize() == 0) {
240+
if (clusDictOld.getSize(ib) == 0) {
239241
LOG(error) << "Encountered patternID = " << cluster.getPatternID() << " != " << CompCluster::InvalidPatternID;
240242
LOG(error) << "Clusters have already been generated with a dictionary which was not provided";
241243
return;
242244
}
243-
if (clusDictOld.isGroup(cluster.getPatternID())) {
245+
if (clusDictOld.isGroup(cluster.getPatternID(), ib)) {
244246
pattern.acquirePattern(pattIdx);
245247
} else {
246-
pattern = clusDictOld.getPattern(cluster.getPatternID());
248+
pattern = clusDictOld.getPattern(cluster.getPatternID(), ib);
247249
}
248250
} else {
249251
pattern.acquirePattern(pattIdx);
@@ -270,9 +272,8 @@ void CreateDictionariesITS3(bool saveDeltas = false,
270272
o2::math_utils::Vector3D<float> xyzLocM;
271273
xyzLocM.SetCoordinates(0.5f * (xyzLocE.X() + xyzLocS.X()), 0.5f * (xyzLocE.Y() + xyzLocS.Y()), 0.5f * (xyzLocE.Z() + xyzLocS.Z()));
272274
auto locC = o2::its3::TopologyDictionary::getClusterCoordinates(cluster, pattern, false);
273-
bool isIB = o2::its3::constants::detID::isDetITS3(chipID);
274275
int layer = gman->getLayer(chipID);
275-
if (isIB) {
276+
if (ib) {
276277
float xFlat{0.}, yFlat{0.};
277278
mMosaixSegmentations[layer].curvedToFlat(xyzLocM.X(), xyzLocM.Y(), xFlat, yFlat);
278279
xyzLocM.SetCoordinates(xFlat, yFlat, xyzLocM.Z());
@@ -281,33 +282,33 @@ void CreateDictionariesITS3(bool saveDeltas = false,
281282
}
282283
dX = xyzLocM.X() - locC.X();
283284
dZ = xyzLocM.Z() - locC.Z();
284-
dX /= (isIB) ? o2::its3::SegmentationMosaix::PitchRow : o2::itsmft::SegmentationAlpide::PitchRow;
285-
dZ /= (isIB) ? o2::its3::SegmentationMosaix::PitchCol : o2::itsmft::SegmentationAlpide::PitchCol;
285+
dX /= (ib) ? o2::its3::SegmentationMosaix::PitchRow : o2::itsmft::SegmentationAlpide::PitchRow;
286+
dZ /= (ib) ? o2::its3::SegmentationMosaix::PitchCol : o2::itsmft::SegmentationAlpide::PitchCol;
286287
if (saveDeltas) {
287288
nt->Fill(topology.getHash(), dX, dZ);
288289
}
289290
if (checkOutliers > 0.) {
290291
if (bool bX = std::abs(dX) > topology.getRowSpan() * checkOutliers, bZ = std::abs(dZ) > topology.getColumnSpan() * checkOutliers; bX || bZ) { // ignore outlier
291-
++cOutliers;
292+
(ib) ? ++cOutliersIB : ++cOutliersOB;
292293
LOGP(debug, "Ignored Value dX={} > {} * {} -> {}", dX, topology.getRowSpan(), checkOutliers, bX);
293294
LOGP(debug, "Ignored Value dZ={} > {} * {} -> {}", dZ, topology.getColumnSpan(), checkOutliers, bZ);
294295
dX = dZ = BuildTopologyDictionary::IgnoreVal;
295296
} else {
296-
++cOk;
297+
(ib) ? ++cOkIB : ++cOkOB;
297298
}
298299
}
299300
}
300301
} else {
301302
/* LOGP(info, " Failed to find MC hit entry for Tr: {} chipID: {}", trID, chipID); */
302303
/* lab.print(); */
303-
++cFailedMC;
304+
(ib) ? ++cFailedMCIB : ++cFailedMCOB;
304305
}
305-
signalDictionary.accountTopology(topology, dX, dZ);
306+
signalDictionary.accountTopology(topology, ib, dX, dZ);
306307
} else {
307-
noiseDictionary.accountTopology(topology, dX, dZ);
308+
noiseDictionary.accountTopology(topology, ib, dX, dZ);
308309
}
309310
}
310-
completeDictionary.accountTopology(topology, dX, dZ);
311+
completeDictionary.accountTopology(topology, ib, dX, dZ);
311312
}
312313

313314
// clean MC cache for events which are not needed anymore
@@ -323,64 +324,92 @@ void CreateDictionariesITS3(bool saveDeltas = false,
323324
}
324325
}
325326

326-
LOGP(info, "Clusters: {} okay (failed MCHit2Clus {}); outliers {}", cOk, cFailedMC, cOutliers);
327+
LOGP(info, "IB Clusters: {} okay (failed MCHit2Clus {}); outliers {}", cOkIB, cFailedMCIB, cOutliersIB);
328+
LOGP(info, "OB Clusters: {} okay (failed MCHit2Clus {}); outliers {}", cOkOB, cFailedMCOB, cOutliersOB);
327329

328330
auto dID = o2::detectors::DetID::IT3;
329331

330332
LOGP(info, "Complete Dictionary:");
331-
completeDictionary.setThreshold(probThreshold);
333+
completeDictionary.setThreshold(probThreshold, true);
334+
completeDictionary.setThreshold(probThreshold, false);
332335
completeDictionary.groupRareTopologies();
333336
completeDictionary.printDictionaryBinary(o2::base::DetectorNameConf::getAlpideClusterDictionaryFileName(dID, ""));
334337
completeDictionary.printDictionary(o2::base::DetectorNameConf::getAlpideClusterDictionaryFileName(dID, "", "txt"));
335338
completeDictionary.saveDictionaryRoot(o2::base::DetectorNameConf::getAlpideClusterDictionaryFileName(dID, "", "root"));
336339

337340
TFile histogramOutput("histograms.root", "recreate");
338341
TCanvas* cComplete = new TCanvas("cComplete", "Distribution of all the topologies");
339-
cComplete->cd();
340-
cComplete->SetLogy();
341-
TH1F* hComplete = completeDictionary.getDictionary().getTopologyDistribution("hComplete");
342-
hComplete->SetDirectory(nullptr);
343-
hComplete->Draw("hist");
344-
hComplete->Write();
342+
cComplete->Divide(2, 1);
343+
cComplete->cd(1);
344+
TH1F* hCompleteIB = completeDictionary.getDictionary().getTopologyDistribution("hCompleteInnerBarrel", true);
345+
hCompleteIB->SetDirectory(nullptr);
346+
hCompleteIB->Draw("hist");
347+
gPad->SetLogy();
348+
cComplete->cd(2);
349+
TH1F* hCompleteOB = completeDictionary.getDictionary().getTopologyDistribution("hCompleteOuterBarrel", false);
350+
hCompleteOB->SetDirectory(nullptr);
351+
hCompleteOB->Draw("hist");
352+
gPad->SetLogy();
353+
histogramOutput.cd();
354+
hCompleteIB->Write();
355+
hCompleteOB->Write();
345356
cComplete->Write();
346357

347358
if (clusLabArr) {
348359
LOGP(info, "Noise Dictionary:");
349-
noiseDictionary.setThreshold(0.0001);
360+
noiseDictionary.setThreshold(0.0001, true);
361+
noiseDictionary.setThreshold(0.0001, false);
350362
noiseDictionary.groupRareTopologies();
351363
noiseDictionary.printDictionaryBinary(o2::base::DetectorNameConf::getAlpideClusterDictionaryFileName(dID, "noiseClusTopo"));
352364
noiseDictionary.printDictionary(o2::base::DetectorNameConf::getAlpideClusterDictionaryFileName(dID, "noiseClusTopo", "txt"));
353365
noiseDictionary.saveDictionaryRoot(o2::base::DetectorNameConf::getAlpideClusterDictionaryFileName(dID, "noiseClusTopo", "root"));
354366

355367
LOGP(info, "Signal Dictionary:");
356-
signalDictionary.setThreshold(0.0001);
368+
signalDictionary.setThreshold(0.0001, true);
369+
signalDictionary.setThreshold(0.0001, false);
357370
signalDictionary.groupRareTopologies();
358371
signalDictionary.printDictionaryBinary(o2::base::DetectorNameConf::getAlpideClusterDictionaryFileName(dID, "signal"));
359372
signalDictionary.printDictionary(o2::base::DetectorNameConf::getAlpideClusterDictionaryFileName(dID, "signal", "txt"));
360373
signalDictionary.saveDictionaryRoot(o2::base::DetectorNameConf::getAlpideClusterDictionaryFileName(dID, "signal", "root"));
361374

362375
LOGP(info, "Plotting Channels");
363376
auto cNoise = new TCanvas("cNoise", "Distribution of noise topologies");
364-
cNoise->cd();
365-
cNoise->SetLogy();
366-
auto hNoise = noiseDictionary.getDictionary().getTopologyDistribution("hNoise");
367-
hNoise->SetDirectory(nullptr);
368-
hNoise->Draw("hist");
377+
cNoise->Divide(2, 1);
378+
cNoise->cd(1);
379+
auto hNoiseIB = noiseDictionary.getDictionary().getTopologyDistribution("hNoiseInnerBarrel", true);
380+
hNoiseIB->SetDirectory(nullptr);
381+
hNoiseIB->Draw("hist");
382+
gPad->SetLogy();
383+
cNoise->cd(2);
384+
auto hNoiseOB = noiseDictionary.getDictionary().getTopologyDistribution("hNoiseOuterBarrel", false);
385+
hNoiseOB->SetDirectory(nullptr);
386+
hNoiseOB->Draw("hist");
387+
gPad->SetLogy();
369388
histogramOutput.cd();
370-
hNoise->Write();
389+
hNoiseIB->Write();
390+
hNoiseOB->Write();
371391
cNoise->Write();
392+
372393
auto cSignal = new TCanvas("cSignal", "cSignal");
373-
cSignal->cd();
394+
cSignal->Divide(2, 1);
395+
cSignal->cd(1);
396+
auto hSignalIB = signalDictionary.getDictionary().getTopologyDistribution("hSignalInnerBarrel", true);
397+
hSignalIB->SetDirectory(nullptr);
398+
hSignalIB->Draw("hist");
399+
gPad->SetLogy();
400+
cSignal->cd(2);
374401
cSignal->SetLogy();
375-
auto hSignal = signalDictionary.getDictionary().getTopologyDistribution("hSignal");
376-
hSignal->SetDirectory(nullptr);
377-
hSignal->Draw("hist");
402+
auto hSignalOB = signalDictionary.getDictionary().getTopologyDistribution("hSignalOuterBarrel", false);
403+
hSignalOB->SetDirectory(nullptr);
404+
hSignalOB->Draw("hist");
405+
gPad->SetLogy();
378406
histogramOutput.cd();
379-
hSignal->Write();
407+
hSignalIB->Write();
408+
hSignalOB->Write();
380409
cSignal->Write();
381-
sw.Stop();
382-
sw.Print();
383410
}
411+
sw.Stop();
412+
sw.Print();
384413
if (saveDeltas) {
385414
fout->cd();
386415
nt->Write();

Detectors/Upgrades/ITS3/reconstruction/include/ITS3Reconstruction/BuildTopologyDictionary.h

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,47 @@ namespace o2::its3
2424

2525
class BuildTopologyDictionary
2626
{
27+
using TopoInfo = std::unordered_map<long unsigned, itsmft::TopologyInfo>;
28+
using TopoStat = std::map<long unsigned, itsmft::TopoStat>;
29+
using TopoFreq = std::vector<std::pair<unsigned long, unsigned long>>;
30+
2731
public:
2832
static constexpr float IgnoreVal = 999.;
29-
void accountTopology(const itsmft::ClusterTopology& cluster, float dX = IgnoreVal, float dZ = IgnoreVal);
30-
void setNCommon(unsigned int nCommon); // set number of common topologies
31-
void setThreshold(double thr);
32-
void setThresholdCumulative(double cumulative); // Considering the integral
33+
void accountTopology(const itsmft::ClusterTopology& cluster, bool IB, float dX = IgnoreVal, float dZ = IgnoreVal);
34+
void setNCommon(unsigned int nCommon, bool IB); // set number of common topologies
35+
void setThreshold(double thr, bool IB);
36+
void setThresholdCumulative(double cumulative, bool IB); // Considering the integral
3337
void groupRareTopologies();
34-
friend std::ostream& operator<<(std::ostream& os, const BuildTopologyDictionary& BD);
3538
void printDictionary(const std::string& fname);
3639
void printDictionaryBinary(const std::string& fname);
3740
void saveDictionaryRoot(const std::string& fname);
3841

39-
unsigned int getTotClusters() const { return mTotClusters; }
40-
unsigned int getNotInGroups() const { return mNCommonTopologies; }
41-
TopologyDictionary getDictionary() const { return mDictionary; }
42+
[[nodiscard]] unsigned int getTotClusters(bool IB) const { return (IB) ? mTotClustersIB : mTotClustersOB; }
43+
[[nodiscard]] unsigned int getNotInGroups(bool IB) const { return (IB) ? mNCommonTopologiesIB : mNCommonTopologiesOB; }
44+
[[nodiscard]] const TopologyDictionary& getDictionary() const { return mDictionary; }
45+
46+
friend std::ostream& operator<<(std::ostream& os, const BuildTopologyDictionary& BD);
4247

4348
private:
44-
TopologyDictionary mDictionary; ///< Dictionary of topologies
45-
std::map<unsigned long, itsmft::TopoStat> mTopologyMap; //! Temporary map of type <hash, TopStat>
46-
std::vector<std::pair<unsigned long, unsigned long>> mTopologyFrequency; //! <freq,hash>, needed to define threshold
47-
unsigned int mTotClusters{0};
48-
unsigned int mNCommonTopologies{0};
49-
double mFrequencyThreshold{0.};
50-
51-
std::unordered_map<long unsigned, itsmft::TopologyInfo> mMapInfo;
49+
void accountTopologyImpl(const itsmft::ClusterTopology& cluster, TopoInfo& tinfo, TopoStat& tstat, unsigned int& ntot, float sigmaX, float sigmaZ, float dX, float dZ);
50+
void setNCommonImpl(unsigned int ncom, TopoFreq& tfreq, TopoStat& tstat, unsigned int& ncommon, unsigned int ntot);
51+
void setThresholdImpl(double thr, TopoFreq& tfreq, TopoInfo& tinfo, TopoStat& tstat, unsigned int& ncommon, double& freqthres, unsigned int ntot);
52+
void setThresholdCumulativeImpl(double cumulative, TopoFreq& tfreq, unsigned int& ncommon, double& freqthres, unsigned int ntot);
53+
void groupRareTopologiesImpl(TopoFreq& tfreq, TopoInfo& tinfo, TopoStat& tstat, unsigned int& ncommon, double& freqthres, TopologyDictionaryData& data, unsigned int ntot);
54+
55+
TopologyDictionary mDictionary; ///< Dictionary of topologies
56+
unsigned int mTotClustersIB{0};
57+
unsigned int mTotClustersOB{0};
58+
unsigned int mNCommonTopologiesIB{0};
59+
unsigned int mNCommonTopologiesOB{0};
60+
double mFrequencyThresholdIB{0.};
61+
double mFrequencyThresholdOB{0.};
62+
TopoInfo mMapInfoIB;
63+
TopoInfo mMapInfoOB;
64+
TopoStat mTopologyMapIB; //! IB Temporary map of type <hash, TopStat>
65+
TopoStat mTopologyMapOB; //! OB Temporary map of type <hash, TopStat>
66+
TopoFreq mTopologyFrequencyIB; //! IB <freq,hash>, needed to define threshold
67+
TopoFreq mTopologyFrequencyOB; //! OB <freq,hash>, needed to define threshold
5268

5369
ClassDefNV(BuildTopologyDictionary, 3);
5470
};

Detectors/Upgrades/ITS3/reconstruction/include/ITS3Reconstruction/Clusterer.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class Clusterer
207207

208208
template <typename VCLUS, typename VPAT>
209209
static void streamCluster(const std::vector<PixelData>& pixbuf, const std::array<Label, MaxLabels>* lblBuff, const BBox& bbox, const its3::LookUp& pattIdConverter,
210-
VCLUS* compClusPtr, VPAT* patternsPtr, MCTruth* labelsClusPtr, int nlab, bool isHuge = false);
210+
VCLUS* compClusPtr, VPAT* patternsPtr, MCTruth* labelsClusPtr, int nlab, bool isIB, bool isHuge = false);
211211

212212
bool isContinuousReadOut() const { return mContinuousReadout; }
213213
void setContinuousReadOut(bool v) { mContinuousReadout = v; }
@@ -230,7 +230,7 @@ class Clusterer
230230
///< load the dictionary of cluster topologies
231231
void setDictionary(const its3::TopologyDictionary* dict)
232232
{
233-
LOGP(info, "Setting TopologyDictionary with size={}", dict->getSize());
233+
LOGP(info, "Setting TopologyDictionary with IB size={} & OB size={}", dict->getSize(true), dict->getSize(false));
234234
mPattIdConverter.setDictionary(dict);
235235
// dict->print();
236236
}
@@ -274,7 +274,7 @@ class Clusterer
274274

275275
template <typename VCLUS, typename VPAT>
276276
void Clusterer::streamCluster(const std::vector<PixelData>& pixbuf, const std::array<Label, MaxLabels>* lblBuff, const Clusterer::BBox& bbox, const its3::LookUp& pattIdConverter,
277-
VCLUS* compClusPtr, VPAT* patternsPtr, MCTruth* labelsClusPtr, int nlab, bool isHuge)
277+
VCLUS* compClusPtr, VPAT* patternsPtr, MCTruth* labelsClusPtr, int nlab, bool isIB, bool isHuge)
278278
{
279279
if (labelsClusPtr && lblBuff) { // MC labels were requested
280280
auto cnt = compClusPtr->size();
@@ -291,10 +291,10 @@ void Clusterer::streamCluster(const std::vector<PixelData>& pixbuf, const std::a
291291
int nbits = ir * colSpanW + ic;
292292
patt[nbits >> 3] |= (0x1 << (7 - (nbits % 8)));
293293
}
294-
uint16_t pattID = (isHuge || pattIdConverter.size() == 0) ? CompCluster::InvalidPatternID : pattIdConverter.findGroupID(rowSpanW, colSpanW, patt.data());
294+
uint16_t pattID = (isHuge || pattIdConverter.size(isIB) == 0) ? CompCluster::InvalidPatternID : pattIdConverter.findGroupID(rowSpanW, colSpanW, isIB, patt.data());
295295
uint16_t row = bbox.rowMin, col = bbox.colMin;
296296
LOGP(debug, "PattID: findGroupID({},{},{})={}", row, col, patt[0], pattID);
297-
if (pattID == CompCluster::InvalidPatternID || pattIdConverter.isGroup(pattID)) {
297+
if (pattID == CompCluster::InvalidPatternID || pattIdConverter.isGroup(pattID, isIB)) {
298298
if (pattID != CompCluster::InvalidPatternID) {
299299
// For groupped topologies, the reference pixel is the COG pixel
300300
float xCOG = 0., zCOG = 0.;

0 commit comments

Comments
 (0)