Skip to content

Commit 3cbae3d

Browse files
author
Marcello Di Costanzo
committed
Add time info to clusters
1 parent f957e94 commit 3cbae3d

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

Detectors/Upgrades/ALICE3/IOTOF/DataFormatsIOTOF/include/DataFormatsIOTOF/Cluster.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ struct Cluster {
3030
float xCoord = 0.f;
3131
float yCoord = 0.f;
3232
float zCoord = 0.f;
33+
float time = 0.f;
3334

3435
std::string asString() const;
3536

Detectors/Upgrades/ALICE3/IOTOF/macros/CheckClustersIOTOF.C

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void CheckClustersIOTOF(std::string digiFilePath = "tf3digits.root", std::string
8484
o2::dataformats::ConstMCTruthContainer<o2::MCCompLabel> labels;
8585
clsPlabelsArr->copyandflatten(labels);
8686

87-
auto clsTuple = new TNtuple("clsTuple", "clsTuple", "chip_id:x:y:z:subdet_id:row:col");
87+
auto clsTuple = new TNtuple("clsTuple", "clsTuple", "chip_id:x:y:z:subdet_id:row:col:time");
8888
clsTuple->SetDirectory(nullptr);
8989

9090
TH1F* histXCoordCls = new TH1F("histXCoordCls", "histXCoordCls", 8000, -100, 100);
@@ -144,14 +144,15 @@ void CheckClustersIOTOF(std::string digiFilePath = "tf3digits.root", std::string
144144

145145
o2::math_utils::Point3D<float> localClsCoords(x, y, z); // local Digit
146146
const auto globalClsCoords = tofGeo->getMatrixL2G(chipID)(localClsCoords); // convert to global
147-
std::cout << "Cluster " << iCls << ": chipID = " << chipID << ", X=" << globalClsCoords.x() << ", Y=" << globalClsCoords.y() << ", Z=" << globalClsCoords.z() << std::endl;
147+
std::cout << "Cluster " << iCls << ": chipID = " << chipID << ", X=" << globalClsCoords.x() << ", Y=" << globalClsCoords.y() << ", Z=" << globalClsCoords.z() << ", time=" << (*clsArray)[iCls].time << std::endl;
148148
clsTuple->Fill((*clsArray)[iCls].chipID,
149149
globalClsCoords.x(),
150150
globalClsCoords.y(),
151151
globalClsCoords.z(),
152152
(*clsArray)[iCls].subDetID,
153153
(*clsArray)[iCls].row,
154-
(*clsArray)[iCls].col);
154+
(*clsArray)[iCls].col,
155+
(*clsArray)[iCls].time);
155156
histXCoordCls->Fill(globalClsCoords.x());
156157
histYCoordCls->Fill(globalClsCoords.y());
157158
histZCoordCls->Fill(globalClsCoords.z());

Detectors/Upgrades/ALICE3/IOTOF/reconstruction/src/Clusterer.cxx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ o2::math_utils::Point3D<float> Clusterer::getClusterGlobalCoordinates(const Clus
3030

3131
Segmentation::Instance()->detectorToLocal(cluster.row, cluster.col, coords, cluster.subDetID);
3232
LOG(info) << "[Clusterer] Cluster local coordinates: x=" << coords.x() << ", y=" << coords.y() << ", z=" << coords.z();
33-
GeometryTGeo::Instance()->getMatrixL2G(cluster.subDetID)(coords);
33+
GeometryTGeo::Instance()->getMatrixL2G(cluster.chipID)(coords);
3434

3535
LOG(info) << "[Clusterer] Cluster global coordinates: x=" << coords.x() << ", y=" << coords.y() << ", z=" << coords.z();
3636
return coords;
@@ -183,10 +183,11 @@ void Clusterer::ClustererThread::finishChipSingleHitFast(gsl::span<const Digit>
183183
ClusterTruth* labelsClusPtr,
184184
GeometryTGeo* geom)
185185
{
186-
const auto& d = digits[digitIdx];
187-
const uint16_t chipID = d.getChipIndex();
188-
const uint16_t row = d.getRow();
189-
const uint16_t col = d.getColumn();
186+
const auto& digit = digits[digitIdx];
187+
const uint16_t chipID = digit.getChipIndex();
188+
const uint16_t row = digit.getRow();
189+
const uint16_t col = digit.getColumn();
190+
const float time = digit.getTime();
190191

191192
if (labelsClusPtr) {
192193
int nlab = 0;
@@ -216,7 +217,7 @@ void Clusterer::ClustererThread::finishChipSingleHitFast(gsl::span<const Digit>
216217
cluster.xCoord = localClsCoords.x();
217218
cluster.yCoord = localClsCoords.y();
218219
cluster.zCoord = localClsCoords.z();
219-
220+
cluster.time = time;
220221
clusters.emplace_back(cluster);
221222
}
222223

0 commit comments

Comments
 (0)