]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Correct icode and edep sequence.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Oct 2004 15:15:33 +0000 (15:15 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Oct 2004 15:15:33 +0000 (15:15 +0000)
TFluka/endraw.cxx

index c1b94b87eddc6892488fb4f952293a58ee94ad8e..0498c9f5a2b3e309ee4b14db4b81333823b198a2 100644 (file)
@@ -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