Skip to content

Commit 5f3a1b3

Browse files
committed
Track info makes sense only for unbinned residuals
1 parent 439fcfa commit 5f3a1b3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Detectors/TPC/calibration/SpacePoints/src/ResidualAggregator.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ void ResidualsContainer::init(const TrackResiduals* residualsEngine, std::string
9898
if (writeUnbinnedResiduals) {
9999
treeOutResidualsUnbinned = std::make_unique<TTree>("unbinnedResid", "TPC unbinned residuals");
100100
treeOutResidualsUnbinned->Branch("res", &unbinnedResPtr);
101+
treeOutResidualsUnbinned->Branch("trackInfo", &trackInfoPtr);
101102
}
102103
if (writeTrackData) {
103104
treeOutTrackData = std::make_unique<TTree>("trackData", "Track information incl cluster range ref");
@@ -123,7 +124,6 @@ void ResidualsContainer::init(const TrackResiduals* residualsEngine, std::string
123124
treeOutResiduals->Branch(Form("sec%d", iSec), &residualsPtr[iSec]);
124125
treeOutStats->Branch(Form("sec%d", iSec), &statsPtr[iSec]);
125126
}
126-
treeOutResiduals->Branch("trackInfo", &trackInfoPtr);
127127
treeOutRecords->Branch("firstTForbit", &tfOrbitsPtr);
128128
treeOutRecords->Branch("sumOfResiduals", &sumOfResidualsPtr);
129129
treeOutRecords->Branch("lumi", &lumiPtr);
@@ -198,7 +198,6 @@ void ResidualsContainer::fill(const o2::dataformats::TFIDInfo& ti, const gsl::sp
198198
}
199199
if (writeBinnedResid) {
200200
treeOutResiduals->Fill();
201-
trackInfo.clear();
202201
sumOfResiduals.push_back(nResidualsInTF);
203202
}
204203
for (auto& residVecOut : residuals) {
@@ -214,6 +213,7 @@ void ResidualsContainer::fill(const o2::dataformats::TFIDInfo& ti, const gsl::sp
214213
if (writeUnbinnedResiduals) {
215214
treeOutResidualsUnbinned->Fill();
216215
unbinnedRes.clear();
216+
trackInfo.clear();
217217
}
218218
tfOrbits.push_back(ti.firstTForbit);
219219
if (lumiInput) {
@@ -285,7 +285,6 @@ void ResidualsContainer::merge(ResidualsContainer* prev)
285285
// prepare merging of residuals
286286
prev->treeOutResiduals->SetBranchAddress(Form("sec%d", iSec), &residualsPtr[iSec]);
287287
}
288-
prev->treeOutResiduals->SetBranchAddress("trackInfo", &trackInfoPtr);
289288
// We append the entries of the tree of the following slot to the
290289
// previous slot and afterwards move the merged tree to this slot.
291290
// This way the order of the entries is preserved
@@ -304,6 +303,7 @@ void ResidualsContainer::merge(ResidualsContainer* prev)
304303
}
305304
if (writeUnbinnedResiduals) {
306305
prev->treeOutResidualsUnbinned->SetBranchAddress("res", &unbinnedResPtr);
306+
prev->treeOutResidualsUnbinned->SetBranchAddress("trackInfo", &trackInfoPtr);
307307
for (int i = 0; i < treeOutResidualsUnbinned->GetEntries(); ++i) {
308308
treeOutResidualsUnbinned->GetEntry(i);
309309
prev->treeOutResidualsUnbinned->Fill();

0 commit comments

Comments
 (0)