Dummy methods DefineParticle required by the interface added.
[u/mrichter/AliRoot.git] / TFluka / endraw.cxx
index 3b07d5d..5c68002 100644 (file)
@@ -12,6 +12,7 @@
 #include "Ftrackr.h"  //(TRACKR) fluka common
 #include "Fltclcm.h"  //(LTCLCM) fluka common
 #include "Fpaprop.h"  //(PAPROP) fluka common
+#include "Fopphst.h"  //(OPPHST) fluka common
 
 #ifndef WIN32
 # define endraw endraw_
@@ -41,7 +42,6 @@ void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t&
       return;
   }
   
-  
   if (TRACKR.jtrack == -1) {
   // Handle quantum efficiency the G3 way
       if (debug) printf("endraw: Cerenkov photon depositing energy: %d %e\n", mreg, rull);
@@ -80,8 +80,6 @@ void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t&
         if( mlttc == crtlttc ) cout << "   *************************************************************" << endl;
     }
     // *****************************************************
-
-
   if (icode != kEMFSCOstopping1 && icode != kEMFSCOstopping2) {
       fluka->SetIcode((FlukaProcessCode_t)icode);
       fluka->SetRull(edep);
@@ -89,12 +87,13 @@ void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t&
          //  Elastic recoil and in stuprf npprmr > 0,
          //  the secondary being loaded is actually still the interacting particle
          cppstack->SetCurrentTrack( TRACKR.ispusr[mkbmx2-4] );
+      } else if (TRACKR.jtrack == -1) {
+         cppstack->SetCurrentTrack(OPPHST.louopp[OPPHST.lstopp]);
       } else {
           cppstack->SetCurrentTrack(TRACKR.ispusr[mkbmx2-1] );
       }
 
-      if (TRACKR.jtrack != 308 && TRACKR.jtrack != 211) (TVirtualMCApplication::Instance())->Stepping();
-    
+      (TVirtualMCApplication::Instance())->Stepping();
       
   } else {
   //
@@ -102,13 +101,14 @@ void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t&
   // This has to be signalled to the StepManager() 
   //
       cppstack->SetCurrentTrack( TRACKR.ispusr[mkbmx2-1] );
+      
       fluka->SetRull(edep);
       fluka->SetIcode((FlukaProcessCode_t) icode);
       (TVirtualMCApplication::Instance())->Stepping();
       fluka->SetTrackIsNew(kFALSE);
-      fluka->SetIcode((FlukaProcessCode_t)icode);
-      fluka->SetRull(0.);
-      (TVirtualMCApplication::Instance())->Stepping();
+//      fluka->SetIcode((FlukaProcessCode_t)icode);
+//      fluka->SetRull(0.);
+//      (TVirtualMCApplication::Instance())->Stepping();
   }
 } // end of endraw
 } // end of extern "C"