Skip to content

Commit 641b890

Browse files
sawenzelclaude
andcommitted
Count the charge of the buffered TPC hit in the electron counter
This fixes the electron count that the TPC detector prints at the end of a run. - The charge of the buffered hit was read after it had been reset to -1. - It is now added before the reset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8ace561 commit 641b890

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Detectors/TPC/simulation/src/Detector.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ Bool_t Detector::ProcessHits(FairVolume* vol)
278278
// add last buffered hit, which was not yet added to the current group
279279
if (mHitLast.GetEnergyLoss() >= 0) {
280280
mCurrentGroup->addHit(mHitLast.GetX(), mHitLast.GetY(), mHitLast.GetZ(), mHitLast.GetTime(), mHitLast.GetEnergyLoss());
281-
mHitLast.mELoss = -1;
282281
mGroupCounter++;
283282
mHitCounter++;
284283
mElectronCounter += mHitLast.GetEnergyLoss();
284+
mHitLast.mELoss = -1;
285285
}
286286
}
287287
// finish group

0 commit comments

Comments
 (0)