blackhole = Material('blackhole') blackhole.set('refractive_index', 1.0) blackhole.set('absorption_length', 1e-15) blackhole.set('scattering_length', 1e8) #creates a surface with complete detection-- used on pmt fulldetect = Surface('fulldetect') fulldetect.set('detect', 1.0) #creates a surface with complete absorption-- used on volume boundary (previously flat pmt detecting surface) fullabsorb = Surface('fullabsorb') fullabsorb.set('absorb', 1.0) noreflect = Surface('noreflect') #noreflect.transmissive = 1.0 noreflect.model = 2 mirror = Surface('mirror') mirror.set('reflect_specular', 1.0) # myglass = Material('glass') # myglass.set('refractive_index', 1.49) # myglass.absorption_length = \ # np.array([(200, 0.1e-6), (300, 0.1e-6), (330, 1000.0), (500, 2000.0), (600, 1000.0), (770, 500.0), (800, 0.1e-6)]) # myglass.set('scattering_length', 1e8) def k_thresh(r_idx,m=0.511): # return the Cerenkov threshold energy (kinetic) for a given particle (mass in MeV) crossing media with r_idx as refractive index s = r_idx*r_idx return m*(1/np.sqrt(1.0-1.0/s)-1.0)
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: nxplane += 1
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)
#*************************************************************************** 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 silicaSurface = Surface('silicaSurface')