From 2bc7818231dda0bf405bbfe46c5d713592acb9d5 Mon Sep 17 00:00:00 2001 From: morsch Date: Mon, 2 Aug 2004 09:02:10 +0000 Subject: [PATCH] Double step if track falls below threshod: - first step sum energy - second step signal that track has stopped --- TFluka/endraw.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/TFluka/endraw.cxx b/TFluka/endraw.cxx index 06051acf66e..158bbcd69d8 100644 --- a/TFluka/endraw.cxx +++ b/TFluka/endraw.cxx @@ -18,9 +18,8 @@ void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t& { TFluka* fluka = (TFluka*) gMC; Int_t verbosityLevel = fluka->GetVerbosityLevel(); - Bool_t debug = (verbosityLevel>=3)?kTRUE:kFALSE; + Bool_t debug = (verbosityLevel >= 3)? kTRUE : kFALSE; fluka->SetCaller(3); - fluka->SetIcode(icode); fluka->SetRull(rull); fluka->SetXsco(xsco); fluka->SetYsco(ysco); @@ -44,8 +43,17 @@ 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); + (TVirtualMCApplication::Instance())->Stepping(); + // + // for icode 21,22 the particle has fallen below thresshold + // This has to be signalled to the StepManager() + // fluka->SetTrackIsNew(kFALSE); + fluka->SetIcode(icode); + (TVirtualMCApplication::Instance())->Stepping(); + } // end of endraw } // end of extern "C" -- 2.39.3