Project

General

Profile

Bug #1962

No delta electrons when using gdml

Added by Rogers, Chris over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Simulation
Target version:
Start date:
23 March 2018
Due date:
% Done:

100%

Estimated time:
Workflow:
New Issue

Description

When doing tracking using the gdml geometry, no delta electrons are produced. This is not the case when doing tracking using MiceModules geometry.

#1

Updated by Rogers, Chris over 5 years ago

I am running two geometries; both are 2 mm thick plastic disks, one defined in gdml and the other using MiceModules. I get a nice distribution of secondary electrons with the MiceModules, but nothing with the gdml. A few observations:

  1. The code at src/common_cpp/Simulation/MAUSGeant4Manager.hh,cc does not set the user limits correctly. The SetVolumeInformation function doesn't work. I fixed this, and manually set the Min Kinetic Energy to be low (1 keV). Still no deltas
  2. The ProductionThreshold is set to be "very high" during the cavity phasing part of the G4 setup - see Simulation/MAUSPhysicsList.hh,cc. I can't see at the moment how it is set back to something sensible. Presumably it is somewhere...

Continuing to dig.

#2

Updated by Rogers, Chris over 5 years ago

This patch seems to have fixed things:

=== modified file 'src/common_cpp/Simulation/MAUSPhysicsList.cc'
--- src/common_cpp/Simulation/MAUSPhysicsList.cc        2016-08-31 11:59:03 +0000
+++ src/common_cpp/Simulation/MAUSPhysicsList.cc        2018-03-23 18:32:42 +0000
@@ -181,8 +181,7 @@
       break;
   }
   std::vector<std::string> uiCommand;
-  if (eLossModel != energyStraggling)
-    uiCommand.push_back("/run/setCut "+STLUtils::ToString(cutDouble));
+  uiCommand.push_back("/run/setCut "+STLUtils::ToString(cutDouble));
   uiCommand.push_back("/process/eLoss/fluct "+flucActive);
   for (int i = 0; i < _nELossNames; i++)
     uiCommand.push_back("/process/"+elossActive+" "+_eLossNames[i]);
#3

Updated by Rogers, Chris over 5 years ago

This is the patch to get proper propagation of user limits

=== modified file 'src/common_cpp/Simulation/MAUSGeant4Manager.cc'
--- src/common_cpp/Simulation/MAUSGeant4Manager.cc      2016-08-31 11:59:03 +0000
+++ src/common_cpp/Simulation/MAUSGeant4Manager.cc      2018-03-26 08:44:54 +0000
@@ -240,7 +240,8 @@
 }

 void MAUSGeant4Manager::SetVolumeInformation(MiceModule& module, G4LogicalVolume* base) {
-
+  G4UserLimits* limits = new G4UserLimits(_stepMax, _trackMax, _timeMax, _keThreshold);
+  base->SetUserLimits(limits);
   // G4VPhysicalVolume* world = _parser.GetWorldVolume();
   G4int nDaughters = base->GetNoDaughters();
   for ( int i = 0; i < nDaughters; i++ ) {
@@ -255,15 +256,8 @@
       // Set auxiliary information
       SetAuxInformation(module, myvol, auxlist);
     }
-    //          else {
-    //          _detector->GetUserLimits().push_back(new G4UserLimits(_stepMax, _trackMax,
-    //          _timeMax, _keThreshold));
-    //          myvol->SetUserLimits(_detector->GetUserLimits().back());
-    //          }
-    if ( myvol->GetNoDaughters() > 0 ) {
-      // Consider adding information to the daughter volumes
-      SetVolumeInformation(module, myvol);
-    }
+    // Consider adding information to the daughter volumes
+    SetVolumeInformation(module, myvol);
   }
 }
#4

Updated by Rogers, Chris over 5 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Fixed in r739

Also available in: Atom PDF