Skip to content

Commit e69e56e

Browse files
committed
ZDC: Provide channel output full sim
- to be compared with fast sim model output from ONNX - debugging purpose (clean up later)
1 parent 8c033d9 commit e69e56e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Detectors/ZDC/simulation/src/Detector.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@ void Detector::resetHitIndices()
315315
void Detector::flushSpatialResponse()
316316
{
317317
if (o2::zdc::ZDCSimParam::Instance().recordSpatialResponse) {
318+
auto c = mNeutronResponseImage.getPhotonsPerChannel();
319+
std::fstream output("o2sim-FullSimResult", std::fstream::out | std::fstream::app);
320+
output << c[0] << " " << c[1] << " " << c[2] << " " << c[3] << " " << c[4] << "\n";
321+
output.close();
322+
318323
// only write non-trivial image pairs
319324
if (mNeutronResponseImage.getPhotonSum() > 0 || mProtonResponseImage.getPhotonSum() > 0) {
320325
mResponses.push_back(std::make_pair(mCurrentPrincipalParticle,
@@ -2442,6 +2447,7 @@ void Detector::FinishPrimary()
24422447
}
24432448
mFastSimResults.clear();
24442449
}
2450+
output.close();
24452451
}
24462452
#endif
24472453
}

0 commit comments

Comments
 (0)