Exemplo n.º 1
0
 def setUp(self):
     with ConfigRegistry.register_config("bb") as c:
         c.length = 10
         c.width = 20
         c.muShield = AttrDict(z=10) 
     with ConfigRegistry.register_config("cc", base="bb") as c:
         c.height = 30
         c.volume = c.length * c.height * c.width
Exemplo n.º 2
0
 def setUp(self):
     with ConfigRegistry.register_config("bb") as c:
         c.length = 10
         c.width = 20
         c.muShield = AttrDict(z=10)
     with ConfigRegistry.register_config("cc", base="bb") as c:
         c.height = 30
         c.volume = c.length * c.height * c.width
Exemplo n.º 3
0
def execute(f,ox,name='ShipGeo'):
    if type(ox) == type(''): ox = ConfigRegistry.register_config("basic")
    o = retrieveGitTags(ox)
    if type(f)==type("s"): fg = ROOT.TFile.Open(f,'update')
    else:                  fg = f 
    pkl = Pickler(fg)
    pkl.dump(o,name)    
    if type(f)==type("s"): fg.Close()
import shipunit as u
from ShipGeoConfig import AttrDict, ConfigRegistry
# the following params should be passed through 'ConfigRegistry.loadpy' method
# none for the moment
with ConfigRegistry.register_config("basic") as c:

    c.MufluxSpectrometer = AttrDict(z=0 * u.cm)
    # False = charm cross-section; True = muon flux measurement
    c.MufluxSpectrometer.muflux = False

    if "targetOpt" not in globals():
        targetOpt = 18  # add extra 20cm of tungsten as per 13/06/2017

    c.target = AttrDict(z0=0 * u.cm)

    c.Bfield = AttrDict(z=0 * u.cm)
    c.Bfield.max = 10. * u.kilogauss  # 1.4361*u.kilogauss for SHiP
    c.Bfield.y = 1.8 * u.m  # dummy value
    c.Bfield.x = 5.0 * u.m  # dummy value
    c.Bfield.z = 3.571 * u.m
    #BOX (Brick!)
    c.Box = AttrDict(z=0 * u.cm)
    c.Box.BX = 13 * u.cm
    c.Box.BY = 11 * u.cm
    c.Box.BZ = 20 * u.cm
    c.Box.zBox = 0 * u.cm
    c.Box.EmTh = 0.0045 * u.cm
    c.Box.EmX = 10 * u.cm  #for the moment, replace the previous values for normal simulations
    c.Box.EmY = 10 * u.cm
    c.Box.PBTh = 0.0205 * u.cm
    c.Box.MolybdenumTh = 0.3 * u.cm
Exemplo n.º 5
0
if "nuTargetDesign" not in globals():
    nuTargetDesign = 1
if "targetOpt" not in globals():
    targetOpt = 17
if "strawDesign" not in globals():
    strawDesign = 4
if "HcalOption" not in globals():
    HcalOption = 1
if "Yheight" not in globals():
    Yheight = 10.
if "EcalGeoFile" not in globals():
    EcalGeoFile = "ecal_ellipse5x10m2.geo" 
if "preshowerOption" not in globals():
    preshowerOption = 0

with ConfigRegistry.register_config("basic") as c:
    # global muShieldDesign, targetOpt, strawDesign, Yheight
    c.Yheight = Yheight*u.m
    # decision by the SP 
    totalLength       = 2.5*c.Yheight + 35*u.m
    extraVesselLength = totalLength - 50*u.m
    windowBulge = 1*u.m
    c.strawDesign = strawDesign
    c.chambers = AttrDict(z=0*u.cm)
    if strawDesign != 4:
     print "this design is not supported, use strawDesign = 4"
     1/0 
    else:
     c.chambers.Length = totalLength
     magnetIncrease    = 100.*u.cm
     c.chambers.Tub1length = 2.5*u.m
import shipunit as u
from ShipGeoConfig import AttrDict, ConfigRegistry
# the following params should be passed through 'ConfigRegistry.loadpy' method
# muShieldDesign = 1  # 1=passive 2=active
# targetOpt      = 5  # 0=solid   >0 sliced, 5 pieces of tungsten, 4 air slits

with ConfigRegistry.register_config("basic") as c:
    c.vetoStation = AttrDict(z=-2390.*u.cm)
    c.TrackStation1 = AttrDict(z=1510.*u.cm)
    c.TrackStation2 = AttrDict(z=1710.*u.cm)
    c.TrackStation3 = AttrDict(z=2150.*u.cm)
    c.TrackStation4 = AttrDict(z=2370.*u.cm)

    c.z = c.TrackStation2.z + 0.5 * (c.TrackStation3.z - c.TrackStation2.z)

    c.Bfield = AttrDict(z=c.z)
    c.Bfield.max = 1.5*u.kilogauss  # was 1.15 in EOI

    # target absorber muon shield setup
    c.decayVolume            =  AttrDict(z=0*u.cm)
    c.decayVolume.length     =   50*u.m

    c.muShield               =  AttrDict(z=0*u.cm)
    c.muShield.dZ1 = 2.5*u.m
    c.muShield.dZ2 = 3.5*u.m
    c.muShield.dZ3 = 3.0*u.m
    c.muShield.dZ4 = 3.0*u.m
    c.muShield.dZ5 = 2.5*u.m
    c.muShield.dZ6 = 2.5*u.m
    c.muShield.LE  = 5*u.m
Exemplo n.º 7
0
 def setUp(self):
     self.key = "bb"
     with ConfigRegistry.register_config("bb") as c:
         c.length = 10
         c.width = 20
Exemplo n.º 8
0
 def setUp(self):
     self.key = "bb"
     with ConfigRegistry.register_config("bb") as c:
         c.length = 10
         c.width = 20
Exemplo n.º 9
0
import shipunit as u
from ShipGeoConfig import AttrDict, ConfigRegistry
# the following params should be passed through 'ConfigRegistry.loadpy' method
# muShieldDesign = 1  # 1=passive 2=active
# targetOpt      = 5  # 0=solid   >0 sliced, 5 pieces of tungsten, 4 air slits

with ConfigRegistry.register_config("basic") as c:
    c.vetoStation = AttrDict(z=-2390. * u.cm)
    c.TrackStation1 = AttrDict(z=1510. * u.cm)
    c.TrackStation2 = AttrDict(z=1710. * u.cm)
    c.TrackStation3 = AttrDict(z=2150. * u.cm)
    c.TrackStation4 = AttrDict(z=2370. * u.cm)

    c.z = c.TrackStation2.z + 0.5 * (c.TrackStation3.z - c.TrackStation2.z)

    c.Bfield = AttrDict(z=c.z)
    c.Bfield.max = 1.5 * u.kilogauss  # was 1.15 in EOI

    # target absorber muon shield setup
    c.decayVolume = AttrDict(z=0 * u.cm)
    c.decayVolume.length = 50 * u.m

    c.muShield = AttrDict(z=0 * u.cm)
    c.muShield.dZ1 = 2.5 * u.m
    c.muShield.dZ2 = 3.5 * u.m
    c.muShield.dZ3 = 3.0 * u.m
    c.muShield.dZ4 = 3.0 * u.m
    c.muShield.dZ5 = 2.5 * u.m
    c.muShield.dZ6 = 2.5 * u.m
    c.muShield.LE = 5 * u.m