Skip to content
Snippets Groups Projects
Commit ed5478c1 authored by Sanya Solodkov's avatar Sanya Solodkov Committed by Julien Maurer
Browse files

Updating jobOptions for TileCal testbeam simulation

Updating jobOptions for TileCal testbeam simulation
TilePVT and TileSteel options added in jobOptions_TileTB_Sim.py which can be used with new geometries like 3B-01 or 2B1EB-01
Also, Birk1, Birk2 and special OldBirk flags added which allows to modify Birks' constants or set them to the values used in RUN2 simulation
parent 483eda8f
No related branches found
No related tags found
2 merge requests!67122Manual sweep of !66860 into 23.0,!67083Updating jobOptions for TileCal testbeam simulation
...@@ -83,6 +83,16 @@ if 'TileUshape' in dir(): ...@@ -83,6 +83,16 @@ if 'TileUshape' in dir():
from AtlasGeoModel import TileGM from AtlasGeoModel import TileGM
GeoModelSvc.DetectorTools[ "TileDetectorTool" ].Ushape = TileUshape GeoModelSvc.DetectorTools[ "TileDetectorTool" ].Ushape = TileUshape
#---- Select steel with 0.45% Manganse for absorber instead of pure Iron. Any value > 0 enables Steel
if 'TileSteel' in dir():
from AtlasGeoModel import TileGM
GeoModelSvc.DetectorTools[ "TileDetectorTool" ].Steel = TileSteel
#---- Use PVT instead of PS for scintillator material. Any value > 0 enables PVT
if 'TilePVT' in dir():
from AtlasGeoModel import TileGM
GeoModelSvc.DetectorTools[ "TileDetectorTool" ].PVT = TilePVT
#---- Special option to enable Cs tubes in simulation. Any value > 0 enables them #---- Special option to enable Cs tubes in simulation. Any value > 0 enables them
if 'TileCsTube' in dir(): if 'TileCsTube' in dir():
from AtlasGeoModel import TileGM from AtlasGeoModel import TileGM
...@@ -187,6 +197,17 @@ SD = svcMgr.TileGeoG4SDCalc ...@@ -187,6 +197,17 @@ SD = svcMgr.TileGeoG4SDCalc
# Birks' law # Birks' law
if 'DoBirk' in dir(): if 'DoBirk' in dir():
SD.DoBirk = DoBirk SD.DoBirk = DoBirk
if 'OldBirk' in dir() or 'Birk1' in dir() or 'Birk2' in dir():
import AthenaCommon.SystemOfUnits as Units
gramsPerMeVcmSq = Units.g/(Units.MeV*Units.cm2)
if 'OldBirk' in dir() and OldBirk:
## exp. values from NIM 80 (1970) 239-244
SD.birk1 = 0.0130 * gramsPerMeVcmSq
SD.birk2 = 9.6e-6 * gramsPerMeVcmSq * gramsPerMeVcmSq
if 'Birk1' in dir():
SD.birk1 = Birk1 * gramsPerMeVcmSq
if 'Birk2' in dir():
SD.birk2 = Birk2 * gramsPerMeVcmSq * gramsPerMeVcmSq
if 'TileUshape' in dir(): if 'TileUshape' in dir():
SD.Ushape=TileUshape SD.Ushape=TileUshape
printfunc (SD) printfunc (SD)
......
...@@ -71,7 +71,7 @@ if not 'Geo' in dir(): ...@@ -71,7 +71,7 @@ if not 'Geo' in dir():
#Geo = '3B' #Geo = '3B'
# TileCal standalone setup with 5 barrels - use for sampling fraction calculation # TileCal standalone setup with 5 barrels - use for sampling fraction calculation
Geo = '5B' Geo = '5B'
simFlags.SimLayout='tb_Tile2000_2003_%s' % Geo simFlags.SimLayout='tb_Tile2000_2003_%s' % Geo.split('-')[0]
simFlags.load_tbtile_flags() simFlags.load_tbtile_flags()
# set eta only if you want eta-projective scan # set eta only if you want eta-projective scan
...@@ -133,6 +133,18 @@ if 'TileUshape' in dir(): ...@@ -133,6 +133,18 @@ if 'TileUshape' in dir():
from AtlasGeoModel import TileGM from AtlasGeoModel import TileGM
GeoModelSvc.DetectorTools[ "TileDetectorTool" ].Ushape = TileUshape GeoModelSvc.DetectorTools[ "TileDetectorTool" ].Ushape = TileUshape
#---- Select steel with 0.45% Manganse for absorber instead of pure Iron. Any value > 0 enables Steel
if 'TileSteel' in dir():
from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
GeoModelSvc = GeoModelSvc()
GeoModelSvc.DetectorTools[ "TileDetectorTool" ].Steel = TileSteel
#---- Use PVT instead of PS for scintillator material. Any value > 0 enables PVT
if 'TilePVT' in dir():
from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
GeoModelSvc = GeoModelSvc()
GeoModelSvc.DetectorTools[ "TileDetectorTool" ].PVT = TilePVT
#---- Special option to enable Cs tubes in simulation. Any value > 0 enables them #---- Special option to enable Cs tubes in simulation. Any value > 0 enables them
if 'TileCsTube' in dir(): if 'TileCsTube' in dir():
from GeoModelSvc.GeoModelSvcConf import GeoModelSvc from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
...@@ -193,6 +205,10 @@ except: ...@@ -193,6 +205,10 @@ except:
printfunc ("can not import BeamEffectsAlg algorithm") printfunc ("can not import BeamEffectsAlg algorithm")
include('G4AtlasApps/Tile2000_2003.flat.configuration.py')#HACK - has to be here for TBDetDescrLoader include('G4AtlasApps/Tile2000_2003.flat.configuration.py')#HACK - has to be here for TBDetDescrLoader
if Geo.count('-')>0:
GeoModelSvc.TileVersionOverride='TileTB-%s' % Geo
else:
GeoModelSvc.TileVersionOverride='TileTB-%s-00' % Geo
#--- Geant4 flags --------------------------------------------- #--- Geant4 flags ---------------------------------------------
...@@ -228,6 +244,17 @@ SD.TileTB=True ...@@ -228,6 +244,17 @@ SD.TileTB=True
# Birks' law # Birks' law
if 'DoBirk' in dir(): if 'DoBirk' in dir():
SD.DoBirk = DoBirk SD.DoBirk = DoBirk
if 'OldBirk' in dir() or 'Birk1' in dir() or 'Birk2' in dir():
import AthenaCommon.SystemOfUnits as Units
gramsPerMeVcmSq = Units.g/(Units.MeV*Units.cm2)
if 'OldBirk' in dir() and OldBirk:
## exp. values from NIM 80 (1970) 239-244
SD.birk1 = 0.0130 * gramsPerMeVcmSq
SD.birk2 = 9.6e-6 * gramsPerMeVcmSq * gramsPerMeVcmSq
if 'Birk1' in dir():
SD.birk1 = Birk1 * gramsPerMeVcmSq
if 'Birk2' in dir():
SD.birk2 = Birk2 * gramsPerMeVcmSq * gramsPerMeVcmSq
if 'TileUshape' in dir(): if 'TileUshape' in dir():
SD.Ushape=TileUshape SD.Ushape=TileUshape
printfunc (SD) printfunc (SD)
......
...@@ -42,7 +42,8 @@ if not 'FileSuffix' in dir(): ...@@ -42,7 +42,8 @@ if not 'FileSuffix' in dir():
FileSuffix = '' FileSuffix = ''
if not 'TileTB' in dir(): if not 'TileTB' in dir():
TileTB = ('Geo' in dir() and (Geo=='5B' or Geo=='3B' or Geo=='2B2EB' or Geo=='2B1EB')) Geo0 = Geo.split('-')[0] if 'Geo' in dir() else ''
TileTB = (Geo0=='5B' or Geo0=='3B' or Geo0=='2B2EB' or Geo0=='2B1EB')
if TileTB: if TileTB:
ConddbTag = 'OFLCOND-MC12-SDR-27' ConddbTag = 'OFLCOND-MC12-SDR-27'
...@@ -50,7 +51,10 @@ if TileTB: ...@@ -50,7 +51,10 @@ if TileTB:
DetDescrVersion = 'ATLAS-CTB-01' DetDescrVersion = 'ATLAS-CTB-01'
if not 'Geo' in dir(): if not 'Geo' in dir():
Geo = '5B' Geo = '5B'
TileVersionOverride = 'TileTB-%s-00' % Geo if Geo.count('-')>0:
TileVersionOverride = 'TileTB-%s' % Geo
else:
TileVersionOverride = 'TileTB-%s-00' % Geo
if not 'doHitNtuple' in dir(): if not 'doHitNtuple' in dir():
doHitNtuple = True doHitNtuple = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment