From a5b73d69ef6f88f0db035a9244f0efb05d328b4e Mon Sep 17 00:00:00 2001 From: morsch Date: Thu, 7 Oct 2004 15:15:33 +0000 Subject: [PATCH] Correct icode and edep sequence. --- TFluka/endraw.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TFluka/endraw.cxx b/TFluka/endraw.cxx index c1b94b87edd..0498c9f5a2b 100644 --- a/TFluka/endraw.cxx +++ b/TFluka/endraw.cxx @@ -48,6 +48,7 @@ void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t& if (debug) printf("endraw: Depositing energy for : %d %e icode: %d \n", TRACKR.ispusr[mkbmx2-1], rull, icode); if (icode != 21 && icode != 22) { + fluka->SetIcode(icode); fluka->SetRull(edep); (TVirtualMCApplication::Instance())->Stepping(); } else { @@ -55,11 +56,12 @@ void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t& // for icode 21,22 the particle has fallen below thresshold // This has to be signalled to the StepManager() // - fluka->SetRull(0.); + fluka->SetRull(edep); + fluka->SetIcode(20); (TVirtualMCApplication::Instance())->Stepping(); fluka->SetTrackIsNew(kFALSE); fluka->SetIcode(icode); - fluka->SetRull(edep); + fluka->SetRull(0.); (TVirtualMCApplication::Instance())->Stepping(); } } // end of endraw -- 2.43.0