Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Detectors/Upgrades/ALICE3/IOTOF/base/src/GeometryTGeo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ void GeometryTGeo::Build(int loadTrans)
mLastChipIndex[j] = numberOfChips - 1;
}

LOG(info) << "TF3 geometry: numberOfChipsITOF = " << mNumberOfChipsIOTOF[0] << ", numberOfChipsOTOF = "
<< mNumberOfChipsIOTOF[1] << ", numberOfChips = " << numberOfChips << ", mNumberOfChipesPerStaveITOF"
LOG(info) << "TF3 geometry: numberOfChipsITOF = " << mNumberOfChipsIOTOF[0] << ", numberOfChipsOTOF = "
<< mNumberOfChipsIOTOF[1] << ", numberOfChips = " << numberOfChips << ", mNumberOfChipesPerStaveITOF"
<< mNumberOfChipsPerStaveIOTOF[0];

setSize(numberOfChips);
Expand Down
10 changes: 4 additions & 6 deletions Detectors/Upgrades/ALICE3/IOTOF/macros/CheckClustersIOTOF.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ void CheckClustersIOTOF(std::string digiFilePath = "tf3digits.root", std::string
using namespace o2::base;
using namespace o2::iotof;

using o2::iotof::Digit;
using o2::iotof::Cluster;
using o2::iotof::Digit;

o2::conf::ConfigurableParam::updateFromString("IOTOFBase.segmentedInnerTOF=true;IOTOFBase.segmentedOuterTOF=true;IOTOFBase.enableForwardTOF=false;IOTOFBase.enableBackwardTOF=false");

Expand Down Expand Up @@ -81,7 +81,7 @@ void CheckClustersIOTOF(std::string digiFilePath = "tf3digits.root", std::string
o2::dataformats::MCTruthContainer<o2::MCCompLabel>* clsLabels{nullptr};
clsTree->SetBranchAddress("TF3ClusterMCTruth", &clsLabels);
clsTree->GetEntry(0);

// Summary of entries in all branches
std::cout << std::endl;
std::cout << "---> Number of digits: " << digitsArray->size() << std::endl;
Expand Down Expand Up @@ -151,7 +151,6 @@ void CheckClustersIOTOF(std::string digiFilePath = "tf3digits.root", std::string
histZCoordDigit->Fill(globalDigitCoord.Z());
} // end loop on digits array


// LOOP on : clusters array
std::cout << "\n\n ----> Starting loop on clusters for ROF " << iROF << " with index " << rofIndex << " and nEntries " << rofNEntries << std::endl;
for (unsigned int iCls = rofIndex; iCls < rofIndex + rofNEntries; iCls++) {
Expand All @@ -170,7 +169,7 @@ void CheckClustersIOTOF(std::string digiFilePath = "tf3digits.root", std::string
segGeom->detectorToLocal(iRow, iCol, x, z, subDetID);
}

o2::math_utils::Point3D<float> localClsCoords(x, y, z); // local Digit
o2::math_utils::Point3D<float> localClsCoords(x, y, z); // local Digit
const auto globalClsCoords = tofGeo->getMatrixL2G(chipID)(localClsCoords); // convert to global
clsTuple->Fill((*clsArray)[iCls].chipID,
globalClsCoords.x(),
Expand Down Expand Up @@ -204,7 +203,7 @@ void CheckClustersIOTOF(std::string digiFilePath = "tf3digits.root", std::string
segGeom->detectorToLocal(iRowFromDigit, iColFromDigit, xFromDigit, zFromDigit, iSubDetIDFromDigit);
}

o2::math_utils::Point3D<float> localDigitCoordFromDigit(xFromDigit, yFromDigit, zFromDigit); // local Digit
o2::math_utils::Point3D<float> localDigitCoordFromDigit(xFromDigit, yFromDigit, zFromDigit); // local Digit
const auto globalDigitCoordFromDigit = tofGeo->getMatrixL2G(iChipIDFromDigit)(localDigitCoordFromDigit); // convert to global
histXCoordRes->Fill(globalClsCoords.x() - globalDigitCoordFromDigit.X());
histYCoordRes->Fill(globalClsCoords.y() - globalDigitCoordFromDigit.Y());
Expand Down Expand Up @@ -245,5 +244,4 @@ void CheckClustersIOTOF(std::string digiFilePath = "tf3digits.root", std::string
histTimeRes->Write();
outFile->Write();
outFile->Close();

}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Clusterer

// Further struct members in TRK, for now not needed in TF3

std::array<Label, MaxLabels> labelsBuff; ///< MC label buffer for one cluster
std::array<Label, MaxLabels> labelsBuff; ///< MC label buffer for one cluster

// per-thread output (accumulated, then merged back by caller)
std::vector<Cluster> clusters;
Expand Down
10 changes: 5 additions & 5 deletions Detectors/Upgrades/ALICE3/IOTOF/reconstruction/src/Clusterer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void Clusterer::process(gsl::span<const Digit> digits,
continue;
}

// Sort digit indices within this ROF by (chipID, col, row)
// Sort digit indices within this ROF by (chipID, col, row)
// chip by chip, column by column (taken from TRK).
mSortIdx.resize(nEntries);
std::iota(mSortIdx.begin(), mSortIdx.end(), first);
Expand Down Expand Up @@ -111,7 +111,7 @@ void Clusterer::ClustererThread::processChip(gsl::span<const Digit> digits,
const auto& sortIdx = parent->mSortIdx;

// TRK has per-ROF readout, so multiple hits belonging to the same chip, i.e. chipN > 1,
// are handled with a preclusterer. TF3 still does not have per-ROF readout, so we
// are handled with a preclusterer. TF3 still does not have per-ROF readout, so we
// use finishChipSingleHitFast on all hits for now.
for (auto i = 0; i < chipN; ++i) {
finishChipSingleHitFast(digits, sortIdx[chipFirst + i], labelsDigPtr, labelsClusPtr);
Expand Down Expand Up @@ -152,9 +152,9 @@ void Clusterer::ClustererThread::finishChipSingleHitFast(gsl::span<const Digit>
{
const auto& digit = digits[digitIdx];
const uint16_t chipID = digit.getChipIndex();
const uint16_t row = digit.getRow();
const uint16_t col = digit.getColumn();
const double time = digit.getTime();
const uint16_t row = digit.getRow();
const uint16_t col = digit.getColumn();
const double time = digit.getTime();

if (labelsClusPtr) {
int nlab = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ namespace o2::iotof

template <typename T>
using BranchDefinition = MakeRootTreeWriterSpec::BranchDefinition<T>;
using ClustersType = std::vector<o2::iotof::Cluster>;
using PatternsType = std::vector<unsigned char>;
using ROFrameType = std::vector<o2::itsmft::ROFRecord>;
using LabelsType = o2::dataformats::MCTruthContainer<o2::MCCompLabel>;
using ClustersType = std::vector<o2::iotof::Cluster>;
using PatternsType = std::vector<unsigned char>;
using ROFrameType = std::vector<o2::itsmft::ROFRecord>;
using LabelsType = o2::dataformats::MCTruthContainer<o2::MCCompLabel>;

DataProcessorSpec getClusterWriterSpec(bool mctruth, bool dec, o2::header::DataOrigin detOrig, o2::detectors::DetID detId)
{
Expand All @@ -63,7 +63,6 @@ DataProcessorSpec getClusterWriterSpec(bool mctruth, bool dec, o2::header::DataO
(detStr + "ClusterROF").c_str(), "cluster-rof-branch"},
BranchDefinition<LabelsType>{InputSpec{"tf3_labels", detOrig, "CLUSTERSMCTR", 0},
(detStr + "ClusterMCTruth").c_str()})();

}

DataProcessorSpec getIOTOFClusterWriterSpec(bool mctruth, bool dec)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void ClustererDPL::run(o2::framework::ProcessingContext& pc)
o2::base::GeometryManager::loadGeometry("o2sim_geometry.root", false, true);

uint64_t totalClusters = 0;

// Loop on layers to be added here, for now only one layer is processed
int iLayer = 0;
auto digits = pc.inputs().get<gsl::span<o2::iotof::Digit>>(std::format("digits_{}", iLayer));
Expand Down Expand Up @@ -104,8 +104,7 @@ o2::framework::DataProcessorSpec getClustererSpec(bool useMC)
inputs,
outputs,
o2::framework::AlgorithmSpec{o2::framework::adaptFromTask<o2::iotof::ClustererDPL>(useMC)},
o2::framework::Options{{"nthreads", o2::framework::VariantType::Int, 1, {"Number of clustering threads"}}
}};
o2::framework::Options{{"nthreads", o2::framework::VariantType::Int, 1, {"Number of clustering threads"}}}};
}

DataProcessorSpec getIOTOFClustererSpec(bool mctruth)
Expand Down