From 39ae81e7aabd2526945267614b06e9c642743f67 Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Thu, 30 Nov 2017 12:15:43 +0100 Subject: [PATCH] Properly specify units in postInclude.TRTCuts job options Former-commit-id: 9602bab21e922382154d855114be74c705d02363 --- .../SimulationJobOptions/share/g4/postInclude.TRTCuts10.py | 5 +++-- .../SimulationJobOptions/share/g4/postInclude.TRTCuts100.py | 3 ++- .../SimulationJobOptions/share/g4/postInclude.TRTCuts5.py | 3 ++- .../SimulationJobOptions/share/g4/postInclude.TRTCuts50.py | 3 ++- .../SimulationJobOptions/share/g4/postInclude.TRTCuts500.py | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts10.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts10.py index dd9894e8510..f5c4d1b8e56 100644 --- a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts10.py +++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts10.py @@ -8,7 +8,8 @@ ######################################################### atlasG4log.info("G4 TRT Config: Setting TRT cut") -rom AthenaCommon.CfgGetter import getService -getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=10. #FIXME Units?! +from AthenaCommon.CfgGetter import getService +import AthenaCommon.SystemOfUnits as Units +getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=10.*Units.mm # FIXME: Is it correct to alter only the e- cut and leave the e+ and # photon cuts unchanged? diff --git a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts100.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts100.py index d9ca3305de1..bc2aade57f1 100644 --- a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts100.py +++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts100.py @@ -9,6 +9,7 @@ atlasG4log.info("G4 TRT Config: Setting TRT cut") from AthenaCommon.CfgGetter import getService -getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=100. #FIXME Units?! +import AthenaCommon.SystemOfUnits as Units +getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=100.*Units.mm # FIXME: Is it correct to alter only the e- cut and leave the e+ and # photon cuts unchanged? diff --git a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts5.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts5.py index f48734d3334..bafea42e7fe 100644 --- a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts5.py +++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts5.py @@ -9,6 +9,7 @@ atlasG4log.info("G4 TRT Config: Setting TRT cut") from AthenaCommon.CfgGetter import getService -getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=5. #FIXME Units?! +import AthenaCommon.SystemOfUnits as Units +getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=5.*Units.mm # FIXME: Is it correct to alter only the e- cut and leave the e+ and # photon cuts unchanged? diff --git a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts50.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts50.py index 81ba7fe3909..907723705e3 100644 --- a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts50.py +++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts50.py @@ -9,6 +9,7 @@ atlasG4log.info("G4 TRT Config: Setting TRT cut") from AthenaCommon.CfgGetter import getService -getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=50. #FIXME Units?! +import AthenaCommon.SystemOfUnits as Units +getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=50.*Units.mm # FIXME: Is it correct to alter only the e- cut and leave the e+ and # photon cuts unchanged? diff --git a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts500.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts500.py index 97ac91fb58b..a7bd5a1aee3 100644 --- a/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts500.py +++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts500.py @@ -9,6 +9,7 @@ atlasG4log.info("G4 TRT Config: Setting TRT cut") from AthenaCommon.CfgGetter import getService -getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=500. #FIXME Units?! +import AthenaCommon.SystemOfUnits as Units +getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=500.*Units.mm # FIXME: Is it correct to alter only the e- cut and leave the e+ and # photon cuts unchanged? -- GitLab