def make_titanium_surface(): titanium_surface = Surface("titanium_surface") titanium_surface.set('reflect_diffuse', 0.125) titanium_surface.set('reflect_specular', 0.125) titanium_surface.set('detect', 0.0) titanium_surface.set('absorb', 0.75) titanium_surface.set('reemit', 0.0) titanium_surface.transmissive = 0 return titanium_surface
def make_G10_surface(): g10_surface = Surface("g10_surface") g10_surface.set('reflect_diffuse', 0.5) g10_surface.set('reflect_specular', 0.0) g10_surface.set('detect', 0.0) g10_surface.set('absorb', 0.5) g10_surface.set('reemit', 0.0) g10_surface.transmissive = 0 return g10_surface
def make_steel_surface(): steel_surface = Surface("steel_surface") steel_surface.set('reflect_diffuse', 0.25) steel_surface.set('reflect_specular', 0.0) steel_surface.set('detect', 0.0) steel_surface.set('absorb', 0.75) steel_surface.set('reemit', 0.0) steel_surface.transmissive = 0 # eta and kappa not set return steel_surface
def make_absorbing_surface(name="absorbing_surface"): # mostly fake numbers based on http://www.shimadzu.com/an/uv/support/uv/ap/measuring_solar2.html # glass mostly absorbs until 300 nm, then gradually transmits. reflected light assumed diffuse black_surface = Surface(name) black_surface.set('reflect_diffuse', 0.0) black_surface.set('reflect_specular', 0.0) black_surface.set('absorb', 1.0) black_surface.set('detect', 0.0) black_surface.set('reemit', 0.0) black_surface.transmissive = 0 return black_surface
def make_acrylic_surface_detectmode(): """ this version of acrylic surface detects photons and acts as our counting unit. """ acrylic_surface = Surface("acrylic_surface_detector") acrylic_surface.set('reflect_diffuse', 0.0) acrylic_surface.set('reflect_specular', 0.0) acrylic_surface.set('detect', 1.0) acrylic_surface.set('absorb', 0.0) acrylic_surface.set('reemit', 0.0) acrylic_surface.transmissive = 0 return acrylic_surface
def make_acrylic_surface_wlsmode(): """ this version of acrylic surface wavelength shifts reemitted light """ acrylic_surface = Surface("acrylic_surface_detector") acrylic_surface.set('reflect_diffuse', 0.0) acrylic_surface.set('reflect_specular', 0.0) acrylic_surface.set('detect', 0.0) acrylic_surface.set('absorb', 0.0) acrylic_surface.set( 'reemit', datatools.load_hist_data( os.path.dirname(__file__) + "/raw_tpb_emission.dat", 350, 640) ) # 100% reemission. Actually, should be 120%!! Need to think about this. acrylic_surface.transmissive = 1 return acrylic_surface
def make_glass_surface(): # mostly fake numbers based on http://www.shimadzu.com/an/uv/support/uv/ap/measuring_solar2.html # glass mostly absorbs until 300 nm, then gradually transmits. reflected light assumed diffuse glass_surface = Surface("glass_surface") glass_surface.set( 'reflect_diffuse', np.array([(100, 0.0), (280.0, 0.0), (350.0, 0.5), (1000.0, 0.5)])) glass_surface.set( 'reflect_specular', np.array([(100, 0.0), (280.0, 0.0), (350.0, 0.5), (1000.0, 0.5)])) glass_surface.set( 'absorb', np.array([(100, 1.0), (280.0, 1.0), (350.0, 0.0), (1000.0, 0.0)])) glass_surface.set('detect', 0.0) glass_surface.set('reemit', 0.0) glass_surface.transmissive = 1 return glass_surface
def reset(self): self.reflect_diffuse = 0 self.reflect_specular = 0 self.bulk_scatter = 0 self.bulk_absorb = 0 self.surface_detect = 0 self.surface_absorb = 0 self.surface_reemit = 0 uboone_wireplane = Surface('uboone_wireplane') uboone_wireplane.nplanes = 3.0 uboone_wireplane.wire_pitch = 0.3 uboone_wireplane.wire_diameter = 0.015 uboone_wireplane.transmissive = 1 uboone_wireplane.model = Surface.SURFACE_WIREPLANE def add_wireplane_surface(solid): # function detector class will use to add a wireplane surface to the geometry # set surface for triangles on x=-1281.0 plane for n, triangle in enumerate(solid.mesh.triangles): nxplane = 0 for ivert in triangle: if solid.mesh.vertices[ivert, 0] == -1281.0: nxplane += 1 if nxplane == 3: print[solid.mesh.vertices[x] for x in triangle] solid.surface[n] = uboone_wireplane solid.unique_surfaces = np.unique(solid.surface)
adc = FloatArrayCol(GPUDaqUBooNE.NTDC) q = FloatCol() t = FloatCol() class OpMap(TreeModel): opid = IntCol() x = FloatCol() y = FloatCol() z = FloatCol() lar1nd_wireplane = Surface('lar1nd_wireplane') lar1nd_wireplane.nplanes = 3.0 lar1nd_wireplane.wire_pitch = 0.3 lar1nd_wireplane.wire_diameter = 0.015 lar1nd_wireplane.transmissive = 1 lar1nd_wireplane.model = Surface.SURFACE_WIREPLANE def add_wireplane_surface(solid): # function detector class will use to add a wireplane surface to the geometry # LAr1ND has two drift regions, so we need two planes # set surface for triangles on x=-2023.25 and x=2023.25 planes for n, triangle in enumerate(solid.mesh.triangles): #print [ solid.mesh.vertices[x] for x in triangle ] # for debug nxplane = 0 for ivert in triangle: if solid.mesh.vertices[ ivert, 0] == -2023.25 or solid.mesh.vertices[ivert, 0] == 2023.25:
def surfacesdict(self): # Steel/LAr steel_surface = Surface("steel_surface") steel_surface.set('reflect_diffuse', 0.25) steel_surface.set('reflect_specular', 0.0) steel_surface.set('detect', 0.0) steel_surface.set('absorb', 0.75) steel_surface.set('reemit', 0.0) steel_surface.transmissive = 0 # Titanium/LAr titanium_surface = Surface("titanium_surface") titanium_surface.set('reflect_diffuse', 0.125) titanium_surface.set('reflect_specular', 0.125) titanium_surface.set('detect', 0.0) titanium_surface.set('absorb', 0.75) titanium_surface.set('reemit', 0.0) titanium_surface.transmissive = 0 # Glass/LAr glass_surface = Surface("glass_surface") glass_surface.set( 'reflect_diffuse', np.array([(100, 0.0), (280.0, 0.0), (350.0, 0.5), (1000.0, 0.5)])) glass_surface.set( 'reflect_specular', np.array([(100, 0.0), (280.0, 0.0), (350.0, 0.5), (1000.0, 0.5)])) glass_surface.set( 'absorb', np.array([(100, 1.0), (280.0, 1.0), (350.0, 0.0), (1000.0, 0.0)])) glass_surface.set('detect', 0.0) glass_surface.set('reemit', 0.0) glass_surface.transmissive = 1 # Acrylic: detecting surface acrylic_surface = Surface("acrylic_surface_detector") acrylic_surface.set('reflect_diffuse', 0.0) acrylic_surface.set('reflect_specular', 0.0) acrylic_surface.set('detect', 1.0) acrylic_surface.set('absorb', 0.0) acrylic_surface.set('reemit', 0.0) acrylic_surface.transmissive = 0 # Acrylic: wavelength shifting #acrylic_surface_wls = Surface("acrylic_surface_wls") #acrylic_surface_wls.set('reflect_diffuse', 0.0) #acrylic_surface_wls.set('reflect_specular',0.0) #acrylic_surface_wls.set('detect',0.0) #acrylic_surface_wls.set('absorb',0.0) #acrylic_surface_wls.set('reemit', load_hist_data( os.path.dirname(__file__)+"/raw_tpb_emission.dat", 350, 640 ) ) # 100% reemission. Actually, should be 120%!! Need to think about this. #acrylic_surface_wls.transmissive = 1 # G10 g10_surface = Surface("g10_surface") g10_surface.set('reflect_diffuse', 0.5) g10_surface.set('reflect_specular', 0.0) g10_surface.set('detect', 0.0) g10_surface.set('absorb', 0.5) g10_surface.set('reemit', 0.0) g10_surface.transmissive = 0 # Black surface black_surface = Surface("black_surface") black_surface.set('reflect_diffuse', 0.0) black_surface.set('reflect_specular', 0.0) black_surface.set('absorb', 1.0) black_surface.set('detect', 0.0) black_surface.set('reemit', 0.0) black_surface.transmissive = 0 #boundary_surfaces = { ("STEEL_STAINLESS_Fe7Cr2Ni", "LAr"):black_surface, # ("Titanium", "LAr"):black_surface, # ("Acrylic", "LAr"):acrylic_surface, # ("G10", "LAr"):black_surface, # ("Glass", "LAr"):black_surface, # ("Glass", "STEEL_STAINLESS_Fe7Cr2Ni"):black_surface, # ("Glass","Vacuum"):black_surface, } boundary_surfaces = { ("STEEL_STAINLESS_Fe7Cr2Ni", "LAr"): steel_surface, ("Titanium", "LAr"): titanium_surface, ("Acrylic", "LAr"): acrylic_surface, ("G10", "LAr"): g10_surface, ("Glass", "LAr"): glass_surface, ("Glass", "STEEL_STAINLESS_Fe7Cr2Ni"): steel_surface, ("Glass", "Vacuum"): black_surface, } return boundary_surfaces
CuSurface.set('reflect_specular',CuSurface.cuSpecReflect) #*************************************************************************** steelSurface = Surface('steelSurface') # makes a fully absorbing surface steelSurface.steelAbsorption = 1.0 #1.0 steelSurface.set('absorb', steelSurface.steelAbsorption) steelSurface.set('reflect_diffuse', 0) steelSurface.set('reflect_specular', 0.00) #*************************************************************************** nothing = Surface('nothing') # exactly what it says. Doesn't do anything. nothing.set('detect', 0) nothing.set('absorb', 0) nothing.set('reflect_diffuse', 0) nothing.set('reflect_specular', 0) nothing.set('reemit', 0) nothing.set('reemission_prob', 0) nothing.transmissive = 1 nothing.model = 1 #*************************************************************************** quartzSurface = Surface('quartzSurface') quartzSurface.set('absorb', 1.0) #1 quartzSurface.set('detect', 0) quartzSurface.set('reflect_specular', 0) quartzSurface.set('reflect_diffuse', 0) quartzSurface.transmissive = 1 #*************************************************************************** #ADDING SILICA INFO
import os, sys from chroma.importgeo import UserVG4DEAGeo, load_hist_data from chroma.geometry import Surface import numpy as np wireplane = Surface('wireplane') wireplane.nplanes = 3.0 wireplane.wire_pitch = 0.3 wireplane.wire_diameter = 0.015 wireplane.transmissive = 1 wireplane.model = Surface.SURFACE_WIREPLANE class SBND(UserVG4DEAGeo): def __init__(self): super(SBND, self).__init__("SBND", "dae/lar1nd_lightguides_nowires_chroma.dae") def surfacesdict(self): # Steel/LAr steel_surface = Surface("steel_surface") steel_surface.set('reflect_diffuse', 0.25) steel_surface.set('reflect_specular', 0.0) steel_surface.set('detect', 0.0) steel_surface.set('absorb', 0.75) steel_surface.set('reemit', 0.0) steel_surface.transmissive = 0 # Titanium/LAr titanium_surface = Surface("titanium_surface") titanium_surface.set('reflect_diffuse', 0.125)