]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Redefinition of IsTrackAlive.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Aug 2007 15:50:56 +0000 (15:50 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Aug 2007 15:50:56 +0000 (15:50 +0000)
Exclude the particles that have disappeared but will appear again.

TFluka/TFluka.cxx

index 126f299d7ea3dcb5a7e70fb75eb981e35c3fbd62..a558c0c5c6ab06e1bf5fbb01a041d6589998a088 100644 (file)
@@ -1757,6 +1757,7 @@ Bool_t   TFluka::IsTrackDisappeared() const
 {
 // All inelastic interactions and decays
 // fIcode from usdraw
+    
   FlukaProcessCode_t icode = GetIcode();
   if (icode == kKASKADinelint    || // inelastic interaction
       icode == kKASKADdecay      || // particle decay
@@ -1799,8 +1800,27 @@ Bool_t   TFluka::IsTrackStop() const
 Bool_t   TFluka::IsTrackAlive() const
 {
 // means not disappeared or not out
-  if (IsTrackDisappeared() || IsTrackOut() ) return 0;
-  else return 1;
+    FlukaProcessCode_t icode = GetIcode();
+
+    if (IsTrackOut() || IsTrackStop()) {
+       return 0;
+    } else if 
+       (
+       IsTrackDisappeared()    &&
+       icode != kKASKADdray    &&
+       icode != kKASKADpair    &&
+       icode != kKASKADbrems   &&
+       icode != kEMFSCObrems   &&
+       icode != kEMFSCOmoller  &&
+       icode != kEMFSCObhabha  &&
+       icode != kEMFSCOcompton
+       ) 
+    {
+       // Exclude the cases for which the particle has disappeared (paused) but will reappear later (= alive).
+       return 0;
+    } else {
+       return 1;
+    }
 }
 
 //