Skip to content

Commit f2e272c

Browse files
authored
Merge ad58743 into sapling-pr-archive-ktf
2 parents 1a54cc3 + ad58743 commit f2e272c

File tree

25 files changed

+246
-94
lines changed

25 files changed

+246
-94
lines changed

DataFormats/Detectors/TOF/include/DataFormatsTOF/Cluster.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Cluster : public o2::BaseCluster<float>
5353

5454
Cluster() = default;
5555

56-
Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, double timeRaw, double time, float tot, int L0L1latency, int deltaBC);
56+
Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, double timeRaw, double time, float tot, int L0L1latency, int deltaBC, float geanttime = 0.0, double t0 = 0.0);
5757

5858
~Cluster() = default;
5959

@@ -134,6 +134,10 @@ class Cluster : public o2::BaseCluster<float>
134134
int getDigitInfoCH(int idig) const { return mDigitInfoCh[idig]; }
135135
double getDigitInfoT(int idig) const { return mDigitInfoT[idig]; }
136136
float getDigitInfoTOT(int idig) const { return mDigitInfoTOT[idig]; }
137+
float getTgeant() const { return mTgeant; }
138+
void setTgeant(float val) { mTgeant = val; }
139+
double getT0true() const { return mT0true; }
140+
void setT0true(double val) { mT0true = val; }
137141

138142
private:
139143
#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
@@ -153,8 +157,10 @@ class Cluster : public o2::BaseCluster<float>
153157
int mDigitInfoCh[6] = {0, 0, 0, 0, 0, 0};
154158
double mDigitInfoT[6] = {0., 0., 0., 0., 0., 0.};
155159
float mDigitInfoTOT[6] = {0., 0., 0., 0., 0., 0.};
160+
float mTgeant = 0.0;
161+
double mT0true = 0.0;
156162

157-
ClassDefNV(Cluster, 4);
163+
ClassDefNV(Cluster, 5);
158164
};
159165

160166
#ifndef GPUCA_GPUCODE

DataFormats/Detectors/TOF/src/Cluster.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ using namespace o2::tof;
2323

2424
ClassImp(o2::tof::Cluster);
2525

26-
Cluster::Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, double timeRaw, double time, float tot, int L0L1Latency, int deltaBC) : o2::BaseCluster<float>(sensid, x, y, z, sy2, sz2, syz), mTimeRaw(timeRaw), mTime(time), mTot(tot), mL0L1Latency(L0L1Latency), mDeltaBC(deltaBC)
26+
Cluster::Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, double timeRaw, double time, float tot, int L0L1Latency, int deltaBC, float geanttime, double t0) : o2::BaseCluster<float>(sensid, x, y, z, sy2, sz2, syz), mTimeRaw(timeRaw), mTime(time), mTot(tot), mL0L1Latency(L0L1Latency), mDeltaBC(deltaBC), mTgeant(geanttime), mT0true(t0)
2727
{
2828

2929
// caching R and phi

DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOF.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MatchInfoTOF
2828
using GTrackID = o2::dataformats::GlobalTrackID;
2929

3030
public:
31-
MatchInfoTOF(int idLocal, int idxTOFCl, double time, float chi2, o2::track::TrackLTIntegral trkIntLT, GTrackID idxTrack, float dt = 0, float z = 0, float dx = 0, float dz = 0, float dy = 0) : mIdLocal(idLocal), mIdxTOFCl(idxTOFCl), mSignal(time), mChi2(chi2), mIntLT(trkIntLT), mIdxTrack(idxTrack), mDeltaT(dt), mZatTOF(z), mDXatTOF(dx), mDZatTOF(dz), mDYatTOF(dy){};
31+
MatchInfoTOF(int idLocal, int idxTOFCl, double time, float chi2, o2::track::TrackLTIntegral trkIntLT, GTrackID idxTrack, float dt = 0, float z = 0, float dx = 0, float dz = 0, float dy = 0, float geanttime = 0.0, double t0 = 0.0) : mIdLocal(idLocal), mIdxTOFCl(idxTOFCl), mSignal(time), mChi2(chi2), mIntLT(trkIntLT), mIdxTrack(idxTrack), mDeltaT(dt), mZatTOF(z), mDXatTOF(dx), mDZatTOF(dz), mDYatTOF(dy), mTgeant(geanttime), mT0true(t0){};
3232
MatchInfoTOF() = default;
3333
void setIdxTOFCl(int index) { mIdxTOFCl = index; }
3434
void setIdxTrack(GTrackID index) { mIdxTrack = index; }
@@ -70,6 +70,10 @@ class MatchInfoTOF
7070
void setVz(float val) { mVz = val; }
7171
int getChannel() const { return mChannel; }
7272
void setChannel(int val) { mChannel = val; }
73+
float getTgeant() const { return mTgeant; }
74+
void setTgeant(float val) { mTgeant = val; }
75+
double getT0true() const { return mT0true; }
76+
void setT0true(double val) { mT0true = val; }
7377

7478
private:
7579
int mIdLocal; // track id in sector of the pair track-TOFcluster
@@ -88,8 +92,10 @@ class MatchInfoTOF
8892
// Hit pattern information
8993
bool mHitUpDown = false; ///< hit pattern in TOF up-down
9094
bool mHitLeftRight = false; ///< hit pattern in TOF left-right
95+
float mTgeant = 0.0; ///< geant time in MC
96+
double mT0true = 0.0; ///< t0true
9197

92-
ClassDefNV(MatchInfoTOF, 7);
98+
ClassDefNV(MatchInfoTOF, 8);
9399
};
94100
} // namespace dataformats
95101
} // namespace o2

Detectors/CTP/workflowIO/src/DigitReaderSpec.cxx

Lines changed: 64 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
#include "DataFormatsCTP/LumiInfo.h"
1818
#include "Headers/DataHeader.h"
1919
#include "DetectorsCommonDataFormats/DetID.h"
20+
#include "SimulationDataFormat/MCCompLabel.h"
21+
#include "SimulationDataFormat/ConstMCTruthContainer.h"
2022
#include "CommonUtils/NameConf.h"
23+
#include "CommonUtils/IRFrameSelector.h"
2124
#include "Framework/DataProcessorSpec.h"
2225
#include "Framework/Task.h"
2326
#include "Framework/ControlService.h"
@@ -50,6 +53,7 @@ class DigitReader : public Task
5053
std::unique_ptr<TTree> mTree;
5154

5255
bool mUseMC = false; // use MC truth
56+
bool mUseIRFrames = false; // selected IRFrames mode
5357
std::string mDigTreeName = "o2sim";
5458
std::string mDigitBranchName = "CTPDigits";
5559
std::string mLumiBranchName = "CTPLumi";
@@ -58,29 +62,78 @@ class DigitReader : public Task
5862
DigitReader::DigitReader(bool useMC)
5963
{
6064
if (useMC) {
61-
LOG(info) << "CTP does not support MC truth at the moment";
65+
LOG(info) << "CTP : truth = data as CTP inputs are already digital";
6266
}
6367
}
6468

6569
void DigitReader::init(InitContext& ic)
6670
{
6771
auto filename = o2::utils::Str::concat_string(o2::utils::Str::rectifyDirectory(ic.options().get<std::string>("input-dir")),
6872
ic.options().get<std::string>("ctp-digit-infile"));
73+
if (ic.options().hasOption("ignore-irframes") && !ic.options().get<bool>("ignore-irframes")) {
74+
mUseIRFrames = true;
75+
}
6976
connectTree(filename);
7077
}
7178

7279
void DigitReader::run(ProcessingContext& pc)
7380
{
74-
auto ent = mTree->GetReadEntry() + 1;
75-
assert(ent < mTree->GetEntries()); // this should not happen
76-
77-
mTree->GetEntry(ent);
78-
LOG(info) << "DigitReader pushes " << mDigits.size() << " digits at entry " << ent;
79-
pc.outputs().snapshot(Output{"CTP", "DIGITS", 0}, mDigits);
80-
pc.outputs().snapshot(Output{"CTP", "LUMI", 0}, mLumi);
81-
if (mTree->GetReadEntry() + 1 >= mTree->GetEntries()) {
82-
pc.services().get<ControlService>().endOfStream();
83-
pc.services().get<ControlService>().readyToQuit(QuitRequest::Me);
81+
gsl::span<const o2::dataformats::IRFrame> irFrames{};
82+
// LOG(info) << "Using IRs:" << mUseIRFrames;
83+
if (mUseIRFrames) {
84+
irFrames = pc.inputs().get<gsl::span<o2::dataformats::IRFrame>>("driverInfo");
85+
}
86+
auto ent = mTree->GetReadEntry();
87+
if (!mUseIRFrames) {
88+
ent++;
89+
assert(ent < mTree->GetEntries()); // this should not happen
90+
mTree->GetEntry(ent);
91+
LOG(info) << "DigitReader pushes " << mDigits.size() << " digits at entry " << ent;
92+
pc.outputs().snapshot(Output{"CTP", "DIGITS", 0}, mDigits);
93+
pc.outputs().snapshot(Output{"CTP", "LUMI", 0}, mLumi);
94+
if (mTree->GetReadEntry() + 1 >= mTree->GetEntries()) {
95+
pc.services().get<ControlService>().endOfStream();
96+
pc.services().get<ControlService>().readyToQuit(QuitRequest::Me);
97+
}
98+
} else {
99+
std::vector<o2::ctp::CTPDigit> digitSel;
100+
if (irFrames.size()) { // we assume the IRFrames are in the increasing order
101+
if (ent < 0) {
102+
ent++;
103+
}
104+
o2::utils::IRFrameSelector irfSel;
105+
// MC digits are already aligned
106+
irfSel.setSelectedIRFrames(irFrames, 0, 0, 0, true);
107+
const auto irMin = irfSel.getIRFrames().front().getMin(); // use processed IRframes for rough comparisons (possible shift!)
108+
const auto irMax = irfSel.getIRFrames().back().getMax();
109+
LOGP(info, "Selecting IRFrame {}-{}", irMin.asString(), irMax.asString());
110+
while (ent < mTree->GetEntries()) {
111+
if (ent > mTree->GetReadEntry()) {
112+
mTree->GetEntry(ent);
113+
}
114+
if (mDigits.front().intRecord <= irMax && mDigits.back().intRecord >= irMin) { // THere is overlap
115+
for (int i = 0; i < (int)mDigits.size(); i++) {
116+
const auto& dig = mDigits[i];
117+
// if(irfSel.check(dig.intRecord)) { // adding selected digit
118+
if (dig.intRecord >= irMin && dig.intRecord <= irMax) {
119+
digitSel.push_back(dig);
120+
LOG(info) << "adding:" << dig.intRecord << " ent:" << ent;
121+
}
122+
}
123+
}
124+
if (mDigits.back().intRecord < irMax) { // need to check the next entry
125+
ent++;
126+
continue;
127+
}
128+
break; // push collected data
129+
}
130+
}
131+
pc.outputs().snapshot(Output{"CTP", "DIGITS", 0}, digitSel);
132+
pc.outputs().snapshot(Output{"CTP", "LUMI", 0}, mLumi); // add full lumi for this TF
133+
if (!irFrames.size() || irFrames.back().isLast()) {
134+
pc.services().get<ControlService>().endOfStream();
135+
pc.services().get<ControlService>().readyToQuit(QuitRequest::Me);
136+
}
84137
}
85138
}
86139

Detectors/GlobalTracking/src/MatchTOF.cxx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,9 @@ void MatchTOF::doMatching(int sec)
967967
}
968968
}
969969

970+
// adjust accordingly to DeltaY
971+
updateTL(trkLTInt[nStripsCrossedInPropagation - 1], -deltaPosTemp[1]);
972+
970973
detId[nStripsCrossedInPropagation - 1][0] = detIdTemp[0];
971974
detId[nStripsCrossedInPropagation - 1][1] = detIdTemp[1];
972975
detId[nStripsCrossedInPropagation - 1][2] = detIdTemp[2];
@@ -1340,11 +1343,14 @@ void MatchTOF::doMatchingForTPC(int sec)
13401343
for (int ii = 0; ii < 3; ii++) { // we need to change the type...
13411344
posFloat[ii] = pos[ii];
13421345
}
1346+
13431347
while (deltaPosTemp2[1] < -0.05 && detIdTemp2[2] != -1 && nstep < maxnstep) { // continuing propagation if dy is negative and we are still inside the strip volume
13441348
nstep++;
13451349
xStop += 0.1;
13461350
propagateToRefXWithoutCov(trefTrk, xStop, 0.1, mBz, posFloat);
13471351

1352+
posFloat[2] += ZshiftCurrent;
1353+
13481354
Geo::getPadDxDyDz(posFloat, detIdTemp2, deltaPosTemp2, sec);
13491355
if (detIdTemp2[2] != -1) { // if propation was succesful -> update params
13501356
float dx = deltaPosTemp2[0] - deltaPosTemp[0];
@@ -1356,9 +1362,15 @@ void MatchTOF::doMatchingForTPC(int sec)
13561362
detIdTemp[2] = detIdTemp2[2];
13571363
detIdTemp[3] = detIdTemp2[3];
13581364
detIdTemp[4] = detIdTemp2[4];
1365+
deltaPosTemp[0] = deltaPosTemp2[0];
1366+
deltaPosTemp[1] = deltaPosTemp2[1];
1367+
deltaPosTemp[2] = deltaPosTemp2[2];
13591368
}
13601369
}
13611370

1371+
// adjust accordingly to DeltaY
1372+
updateTL(trkLTInt[ibc][nStripsCrossedInPropagation[ibc] - 1], -deltaPosTemp[1]);
1373+
13621374
detId[ibc][nStripsCrossedInPropagation[ibc] - 1][0] = detIdTemp[0];
13631375
detId[ibc][nStripsCrossedInPropagation[ibc] - 1][1] = detIdTemp[1];
13641376
detId[ibc][nStripsCrossedInPropagation[ibc] - 1][2] = detIdTemp[2];
@@ -1671,6 +1683,10 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
16711683
if (std::abs(timeNew - timeOld) < 200) {
16721684
// update time information averaging the two (the second one corrected for the difference in the track length)
16731685
prevMatching.setSignal((timeNew + timeOld) * 0.5);
1686+
float geanttime = (TOFClusWork[matchingPair.getTOFClIndex()].getTgeant() + TOFClusWork[prevMatching.getTOFClIndex()].getTgeant() - deltaT * 1E-3) * 0.5;
1687+
double t0 = (TOFClusWork[matchingPair.getTOFClIndex()].getT0true() + TOFClusWork[prevMatching.getTOFClIndex()].getT0true()) * 0.5;
1688+
prevMatching.setTgeant(geanttime);
1689+
prevMatching.setT0true(t0);
16741690
prevMatching.setChi2(0); // flag such cases with chi2 equal to zero
16751691
matchedClustersIndex[matchingPair.getTOFClIndex()] = matchedTracksIndex[trkType][itrk]; // flag also the second cluster as already used
16761692
}
@@ -1682,6 +1698,9 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
16821698
matchedTracksIndex[trkType][itrk] = matchedTracks[trkTypeSplitted].size(); // index of the MatchInfoTOF correspoding to this track
16831699
matchedClustersIndex[matchingPair.getTOFClIndex()] = matchedTracksIndex[trkType][itrk]; // index of the track that was matched to this cluster
16841700

1701+
matchingPair.setTgeant(TOFClusWork[matchingPair.getTOFClIndex()].getTgeant());
1702+
matchingPair.setT0true(TOFClusWork[matchingPair.getTOFClIndex()].getT0true());
1703+
16851704
// let's check if cluster has multiple-hits (noferini)
16861705
if (TOFClusWork[matchingPair.getTOFClIndex()].getNumOfContributingChannels() > 1) {
16871706
const auto& tofcl = TOFClusWork[matchingPair.getTOFClIndex()];

Detectors/TOF/base/include/TOFBase/Digit.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class Digit
3232
public:
3333
Digit() = default;
3434

35-
Digit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t label = -1, uint32_t triggerorbit = 0, uint16_t triggerbunch = 0);
36-
Digit(Int_t channel, Int_t tdc, Int_t tot, uint32_t orbit, uint16_t bc, Int_t label = -1, uint32_t triggerorbit = 0, uint16_t triggerbunch = 0);
35+
Digit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t label = -1, uint32_t triggerorbit = 0, uint16_t triggerbunch = 0, float geanttime = 0, double t0 = 0);
36+
Digit(Int_t channel, Int_t tdc, Int_t tot, uint32_t orbit, uint16_t bc, Int_t label = -1, uint32_t triggerorbit = 0, uint16_t triggerbunch = 0, float geanttime = 0, double t0 = 0);
3737
~Digit() = default;
3838

3939
/// Get global ordering key made of
@@ -66,7 +66,7 @@ class Digit
6666

6767
void printStream(std::ostream& stream) const;
6868

69-
void merge(Int_t tdc, Int_t tot);
69+
bool merge(Int_t tdc, Int_t tot);
7070

7171
void getPhiAndEtaIndex(int& phi, int& eta) const;
7272

@@ -93,6 +93,11 @@ class Digit
9393
void setTriggerBunch(uint16_t value) { mTriggerBunch = value; }
9494
uint16_t getTriggerBunch() const { return mTriggerBunch; }
9595

96+
float getTgeant() const { return mTgeant; }
97+
void setTgeant(float val) { mTgeant = val; }
98+
double getT0true() const { return mT0true; }
99+
void setT0true(double val) { mT0true = val; }
100+
96101
private:
97102
friend class boost::serialization::access;
98103

@@ -107,8 +112,10 @@ class Digit
107112
uint16_t mTriggerBunch = 0; //!< bunch id of trigger event
108113
Bool_t mIsUsedInCluster; //!/< flag to declare that the digit was used to build a cluster
109114
Bool_t mIsProblematic = false; //!< flag to tell whether the channel of the digit was problemati; not persistent; default = ok
115+
float mTgeant = 0.0; ///< geant time in MC
116+
double mT0true = 0.0; ///< t0true
110117

111-
ClassDefNV(Digit, 4);
118+
ClassDefNV(Digit, 5);
112119
};
113120

114121
std::ostream& operator<<(std::ostream& stream, const Digit& dig);

Detectors/TOF/base/include/TOFBase/Strip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Strip
8080
/// reset points container
8181
o2::tof::Digit* findDigit(ULong64_t key);
8282

83-
Int_t addDigit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t lbl = 0, uint32_t triggerorbit = 0, uint16_t triggerbunch = 0); // returns the MC label
83+
Int_t addDigit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t lbl = 0, uint32_t triggerorbit = 0, uint16_t triggerbunch = 0, float geanttime = 0, double t0 = 0); // returns the MC label
8484

8585
void fillOutputContainer(std::vector<o2::tof::Digit>& digits);
8686

Detectors/TOF/base/src/Digit.cxx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ using namespace o2::tof;
1717

1818
ClassImp(o2::tof::Digit);
1919

20-
Digit::Digit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t label, uint32_t triggerorbit, uint16_t triggerbunch)
21-
: mChannel(channel), mTDC(tdc), mTOT(tot), mIR(0, 0), mLabel(label), mTriggerOrbit(triggerorbit), mTriggerBunch(triggerbunch), mIsUsedInCluster(kFALSE)
20+
Digit::Digit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t label, uint32_t triggerorbit, uint16_t triggerbunch, float geanttime, double t0)
21+
: mChannel(channel), mTDC(tdc), mTOT(tot), mIR(0, 0), mLabel(label), mTriggerOrbit(triggerorbit), mTriggerBunch(triggerbunch), mIsUsedInCluster(kFALSE), mTgeant(geanttime), mT0true(t0)
2222
{
2323
mIR.setFromLong(bc);
2424
}
2525
//______________________________________________________________________
26-
Digit::Digit(Int_t channel, Int_t tdc, Int_t tot, uint32_t orbit, uint16_t bc, Int_t label, uint32_t triggerorbit, uint16_t triggerbunch)
27-
: mChannel(channel), mTDC(tdc), mTOT(tot), mIR(bc, orbit), mLabel(label), mTriggerOrbit(triggerorbit), mTriggerBunch(triggerbunch), mIsUsedInCluster(kFALSE)
26+
Digit::Digit(Int_t channel, Int_t tdc, Int_t tot, uint32_t orbit, uint16_t bc, Int_t label, uint32_t triggerorbit, uint16_t triggerbunch, float geanttime, double t0)
27+
: mChannel(channel), mTDC(tdc), mTOT(tot), mIR(bc, orbit), mLabel(label), mTriggerOrbit(triggerorbit), mTriggerBunch(triggerbunch), mIsUsedInCluster(kFALSE), mTgeant(geanttime), mT0true(t0)
2828
{
2929
}
3030
//______________________________________________________________________
@@ -44,16 +44,18 @@ std::ostream& operator<<(std::ostream& stream, const Digit& digi)
4444

4545
//______________________________________________________________________
4646

47-
void Digit::merge(Int_t tdc, Int_t tot)
47+
bool Digit::merge(Int_t tdc, Int_t tot)
4848
{
4949

5050
// merging two digits
5151

5252
if (tdc < mTDC) {
5353
mTDC = tdc;
54+
return 1; // new came first
5455
// TODO: adjust TOT
5556
} else {
5657
// TODO: adjust TOT
58+
return 0;
5759
}
5860
}
5961

Detectors/TOF/base/src/Strip.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Strip::Strip(Int_t index)
3434
{
3535
}
3636
//_______________________________________________________________________
37-
Int_t Strip::addDigit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t lbl, uint32_t triggerorbit, uint16_t triggerbunch)
37+
Int_t Strip::addDigit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t lbl, uint32_t triggerorbit, uint16_t triggerbunch, float geanttime, double t0)
3838
{
3939

4040
// return the MC label. We pass it also as argument, but it can change in
@@ -44,10 +44,13 @@ Int_t Strip::addDigit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t lb
4444
auto dig = findDigit(key);
4545
if (dig) {
4646
lbl = dig->getLabel(); // getting the label from the already existing digit
47-
dig->merge(tdc, tot); // merging to the existing digit
47+
if (dig->merge(tdc, tot)) { // merging to the existing digit (if new came first upload also MC truth)
48+
dig->setTgeant(geanttime);
49+
dig->setT0true(t0);
50+
}
4851
mDigitMerged++;
4952
} else {
50-
mDigits.emplace(std::make_pair(key, Digit(channel, tdc, tot, bc, lbl, triggerorbit, triggerbunch)));
53+
mDigits.emplace(std::make_pair(key, Digit(channel, tdc, tot, bc, lbl, triggerorbit, triggerbunch, geanttime, t0)));
5154
}
5255

5356
return lbl;

Detectors/TOF/reconstruction/src/Clusterer.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ void Clusterer::buildCluster(Cluster& c, MCLabelContainer const* digitMCTruth)
173173
}
174174

175175
c.setMainContributingChannel(mContributingDigit[0]->getChannel());
176+
c.setTgeant(mContributingDigit[0]->getTgeant());
177+
c.setT0true(mContributingDigit[0]->getT0true());
176178
c.setTime(mContributingDigit[0]->getCalibratedTime()); // time in ps (for now we assume it calibrated)
177179
c.setTimeRaw(mContributingDigit[0]->getTDC() * Geo::TDCBIN + mContributingDigit[0]->getBC() * o2::constants::lhc::LHCBunchSpacingNS * 1E3); // time in ps (for now we assume it calibrated)
178180

0 commit comments

Comments
 (0)