2009-06-08 Kamil Sedlak

Bug correction in "G4UserLimit":
DETAILS OF THE BUG:
Call of "G4UserLimits" was inactive in the musrSim
(using the comand "/musr/command SetUserLimits log_target 0.01")
was ignored by the simulation.  
  I found out, that in addition to the call of "G4UserLimits",
the "G4StepLimiter" and/or "G4UserSpecialCuts" has to be called
for a given particle (particles) that needs to be limitted.  These processes
were not implemented.
  I corrected the musrSim code in the svn repository.  From now on,
"G4StepLimiter"  should function fine, IF CALLED TOGETHER WITH SOMETHING
LIKE:
/musr/command process addProcess        e-    G4StepLimiter      -1 -1 4
/musr/command process addProcess        e+    G4StepLimiter      -1 -1 4
/musr/command process addProcess        mu+   G4StepLimiter      -1 -1 5
  More details can be found in:
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/eventtrackmanage/702/1.html
  and
http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch05s07.html
This commit is contained in:
sedlak 2009-06-08 13:57:10 +00:00
parent b70e4ddbc7
commit 46e13dc4a0
3 changed files with 20 additions and 0 deletions

Binary file not shown.

View File

@ -620,6 +620,20 @@ Three special volumes ``Target, M0, M1 and M2''.
The five last parameters correspond to the Geant4 methods
``SetMaxAllowedStep'', ``SetUserMaxTrackLength'', ``SetUserMaxTime'',
``SetUserMinEkine'' and ``SetUserMinRange''.
{\bf NOTE THAT G4StepLimiter AND/OR G4UserSpecialCuts HAS TO BE DEFINED FOR THE
REQUIRED PARTICLE TYPES BEFORE CALLING THIS COMMAND!}\\
(E.g.:\ ``/musr/command process addProcess mu+ G4StepLimiter -1 -1 5'')\\
See chapter ``5.7. User Limits'' (namely ``5.7.2. Processes co-working with G4UserLimits'')
of the Geant User Manual for more details about this issue.
The user can set G4UserLimits to logical volume and/or to a region.
{\bf At the moment, ``/musr/command SetUserLimits'' in musrSim supports the G4UserLimits
in logical volumes only, not in the G4Regions.}
User limits assigned to logical volume do not propagate to daughter volumes,
while User limits assigned to region propagate to daughter volumes unless
daughters belong to another region. If both logical volume and associated
region have user limits, those of logical volume win.
\item{\bf /musr/command storeOnlyEventsWithHits false}\\
By default, only the events in which at least one hit in an active

View File

@ -42,6 +42,9 @@
//
#include "musrParameters.hh"
#include "musrErrorMessage.hh"
// cks 2009-06-08 G4StepLimiter and/or G4UserSpecialCuts are needed to activate the "G4UserLimits"
#include "G4StepLimiter.hh"
#include "G4UserSpecialCuts.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@ -296,6 +299,9 @@ void musrPhysicsList::ConstructEM()
else if (stringProcessName=="G4MuIonisation") pManager->AddProcess(new G4MuIonisation,nr1,nr2,nr3);
else if (stringProcessName=="G4MuBremsstrahlung") pManager->AddProcess(new G4MuBremsstrahlung,nr1,nr2,nr3);
else if (stringProcessName=="G4MuPairProduction") pManager->AddProcess(new G4MuPairProduction,nr1,nr2,nr3);
// cks 2009-06-08 G4StepLimiter and/or G4UserSpecialCuts are needed to activate the "G4UserLimits"
else if (stringProcessName=="G4StepLimiter") pManager->AddProcess(new G4StepLimiter,nr1,nr2,nr3);
else if (stringProcessName=="G4UserSpecialCuts") pManager->AddProcess(new G4UserSpecialCuts,nr1,nr2,nr3);
// else if (stringProcessName=="G4DecayWithSpin") pManager->AddProcess(new G4DecayWithSpin,nr1,nr2,nr3);
// else if (stringProcessName=="G4hIonisation") pManager->AddProcess(new G4hIonisation,nr1,nr2,nr3);
// else if (stringProcessName=="G4hLowEnergyIonisation") pManager->AddProcess(new G4hLowEnergyIonisation,nr1,nr2,nr3);