#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"
fMaterials = 0;
fDummyBoundary = 0;
fFieldFlag = 1;
+ fStopped = 0;
}
//______________________________________________________________________________
fGeom = new TFlukaMCGeometry("geom", "ALICE geometry");
if (verbosity > 2) fGeom->SetDebugMode(kTRUE);
fMaterials = 0;
+ fStopped = 0;
}
//______________________________________________________________________________
if (id == -1) {
// Cerenkov photon
- if (fVerbosityLevel >= 1)
+ if (fVerbosityLevel >= 3)
printf("\n PDGFromId: Cerenkov Photon \n");
return 50000050;
}
return mpdgha(intfluka);
}
+void TFluka::StopTrack()
+{
+ // Set stopping conditions
+ // Works for photons and charged particles
+ fStopped = kTRUE;
+}
+
//_____________________________________________________________________________
// methods for physics management
//____________________________________________________________________________
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,
//
// 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()
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;}
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