]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
StopTrack() implemented.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Jul 2004 09:35:32 +0000 (09:35 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Jul 2004 09:35:32 +0000 (09:35 +0000)
Correct parent for cerenkov photons.

TFluka/TFluka.cxx
TFluka/TFluka.h

index e857b57b4be777b2ab04392eefdf89ed2ee3e5d6..04203336cfd30d7cf35ed250d2bd4cee1a718871 100644 (file)
@@ -43,6 +43,7 @@
 #include "Fpaprop.h"       //(PAPROP) fluka common
 #include "Ffheavy.h"       //(FHEAVY) fluka common
 #include "Fopphst.h"       //(OPPHST) fluka common
+#include "Fstack.h"        //(STACK) fluka common
 
 #include "TVirtualMC.h"
 #include "TMCProcess.h"
@@ -106,6 +107,7 @@ TFluka::TFluka()
    fMaterials = 0;
    fDummyBoundary = 0;
    fFieldFlag = 1;
+   fStopped   = 0;
 } 
  
 //______________________________________________________________________________ 
@@ -130,6 +132,7 @@ TFluka::TFluka(const char *title, Int_t verbosity, Bool_t isRootGeometrySupporte
    fGeom = new TFlukaMCGeometry("geom", "ALICE geometry");
    if (verbosity > 2) fGeom->SetDebugMode(kTRUE);
    fMaterials = 0;
+   fStopped   = 0;
 }
 
 //______________________________________________________________________________ 
@@ -708,7 +711,7 @@ Int_t TFluka::PDGFromId(Int_t id) const
 
     if (id == -1) {
 // Cerenkov photon
-       if (fVerbosityLevel >= 1)
+       if (fVerbosityLevel >= 3)
            printf("\n PDGFromId: Cerenkov Photon \n");
        return  50000050;
     }
@@ -735,6 +738,13 @@ Int_t TFluka::PDGFromId(Int_t id) const
     return mpdgha(intfluka);
 }
 
+void TFluka::StopTrack()
+{
+    // Set stopping conditions
+    // Works for photons and charged particles
+    fStopped = kTRUE;
+}
+  
 //_____________________________________________________________________________
 // methods for physics management
 //____________________________________________________________________________ 
@@ -2617,8 +2627,7 @@ extern "C" {
        
        TFluka* fluka =  (TFluka*) gMC;
        TVirtualMCStack* cppstack = fluka->GetStack();
-       Int_t parent = cppstack->GetCurrentTrackNumber();
-       
+       Int_t parent =  TRACKR.ispusr[mkbmx2-1];
        cppstack->PushTrack(1, parent, 50000050,
                            px, py, pz, e,
                             vx, vy, vz, tof,
index 2acca7ee89a44ca817b96fb653f21d9b225f2b2d..d7d85468a0742f6ced5d6f9cd879a1b4e2b7a393 100644 (file)
@@ -137,8 +137,10 @@ class TFluka : public TVirtualMC {
   //
   
   // action methods
-  virtual void StopTrack()
-    {printf("WARNING: StopTrack not yet implemented !\n");}
+  virtual void   StopTrack();
+  virtual void   ResetStoppingCondition() {fStopped = kFALSE;}
+  virtual Bool_t GetStoppingCondition()   {return fStopped;}
+
   virtual void StopEvent()
     {printf("WARNING: StopEvent not yet implemented !\n");}   
   virtual void StopRun()
@@ -202,6 +204,7 @@ class TFluka : public TVirtualMC {
   virtual Int_t    NSecondaries() const ;
   virtual void     GetSecondary(Int_t isec, Int_t& particleId, 
                        TLorentzVector& position, TLorentzVector& momentum);
+  virtual Bool_t   SecondariesAreOrdered() const {return kFALSE;}
   virtual TMCProcess ProdProcess(Int_t iproc) const ;
   virtual Int_t    StepProcesses(TArrayI &/*proc*/) const
     {printf("WARNING: StepProcesses not yet implemented !\n"); return -1;}
@@ -357,6 +360,8 @@ class TFluka : public TVirtualMC {
   Bool_t   fFieldFlag;        // Flag for magnetic field
   Bool_t   fGeneratePemf;     // Flag for automatic .pemf generation
   Int_t    fDummyBoundary;    // Flag for crossing dummy boundaries
+  Bool_t   fStopped;          // Flag for stopping 
+  
   //variables for SetProcess and SetCut
   Int_t    fNbOfProc;                // Current number of processes 
   Int_t    fProcessValue[10000];     // User values assigned to processes