Skip to content

Commit

Permalink
Add example WLS materials and use in validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilf Shorrock committed Dec 12, 2024
1 parent 02395de commit 71dc358
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 16 deletions.
10 changes: 6 additions & 4 deletions macros/vis_nestedTubeArrays.mac
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
/vis/scene/add/hits
/vis/sceneHandler/attach
/vis/viewer/set/upVector 0.0 0.0 1.0
/vis/viewer/set/viewpointThetaPhi -90 135
/vis/viewer/set/viewpointThetaPhi -90 135
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/setRGBA 0 0.236 0.240 0.002 1
/vis/viewer/set/style s
/vis/viewer/flush

Expand All @@ -39,15 +41,15 @@

#add ntuple tracking
/rat/proc outntuple
/rat/procset include_tracking 1
/rat/procset include_tracking 0
/rat/procset include_mcparticles 1
/rat/procset include_pmthits 1
/rat/procset include_untriggered_events 1
/rat/physics/setOpWLS g4
##### GENERATORS #################
/generator/add combo pbomb:point:poisson
/generator/vtx/set 10 430 # 10000 photons, 430nm
/generator/vtx/set 1000 350 # 1000 photons, 350nm
/generator/pos/set 0.0 0.0 0.0

##### RUN ###########
/run/beamOn 1
/run/beamOn 1
24 changes: 12 additions & 12 deletions ratdb/Validation/NestedTubeArray.geo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
mother: "",
type: "box",
size: [20000.0,20000.0,20000.0],
material: "mirror",
material: "air",
}

{
Expand All @@ -33,7 +33,7 @@
size: [9.0,9.0,9.0],
position: [0.0, 0.0, 0.0],
rotation: [0.0, 0.0, 0.0],
material: "mirror",
material: "air",
#color: [0.02,0.2,0.2,0.1],
}

Expand All @@ -49,7 +49,7 @@
size_z: 49.5,
position: [-5.0, 0.0, -5.0],
rotation: [-90.0, 0.0, 0.0],
material: "aluminum",
material: "Fpolyethylene",
color: [0.0,0.8,0.0,0.01],
}

Expand All @@ -64,7 +64,7 @@
size_z: 49.5,
position: [0.0, 0.0, 0.0],
rotation: [0.0, 0.0, 0.0],
material: "glass",
material: "PMMA",
color: [0.0,0.8,0.0,0.05],
}

Expand All @@ -79,7 +79,7 @@
size_z: 49.5,
position: [0.0, 0.0, 0.0],
rotation: [0.0, 0.0, 0.0],
material: "mirror",
material: "WLSExample",
color: [0.0,0.8,0.0,0.1],
}
{
Expand All @@ -93,7 +93,7 @@
size_z: 29.5,
position: [-5.0, 0.0, 5.0],
rotation: [-90.0, 0.0, 0.0],
material: "aluminum",
material: "Fpolyethylene",
color: [0.0,0.8,0.0,0.01],
}

Expand All @@ -108,7 +108,7 @@
size_z: 29.5,
position: [0.0, 0.0, 0.0],
rotation: [0.0, 0.0, 0.0],
material: "glass",
material: "PMMA",
color: [0.0,0.8,0.0,0.05],
}

Expand All @@ -123,7 +123,7 @@
size_z: 29.5,
position: [0.0, 0.0, 0.0],
rotation: [0.0, 0.0, 0.0],
material: "mirror",
material: "WLSExample",
color: [0.0,0.8,0.0,0.1],
}
// manual nested tubes ends here
Expand Down Expand Up @@ -162,9 +162,9 @@ inner_r: 0.485,
outer_r: 0.5,
pos_table: "cable_pos",
orientation: "manual",
material_outer: "aluminum",
material_inner: "glass",
material_core: "mirror",
outer_material: "Fpolyethylene",
inner_material: "PMMA",
core_material: "WLSExample",
#drawstyle: "solid",
color: [0.8,0.0,0.0,0.8]
color: [0.0,0.8,0.0,0.2]
}
146 changes: 146 additions & 0 deletions ratdb/WLSExample.ratdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
//------------------------------------------------//
//Wavelength Shifting (WLS) Material Example
//------------------------------------------------//
// From https://en.wikipedia.org/wiki/Polystyrene
// Composition (C8H8)n
// From
// https://www.kuraray.com/uploads/5a717515df6f5/PR0150_psf01.pdf
// Density 1.05 g / cm3
{
name: "MATERIAL",
index: "WLSExample",
valid_begin : [0, 0],
valid_end : [0, 0],
density: 1.050,
nelements: 2,
nmaterials: 0,
elements: ["Hydrogen", "Carbon"],
elemprop: [0.0774, 0.9226],
index_of_refraction: 1.59
}
{
name: "OPTICS",
index: "WLSExample",
valid_begin : [0, 0],
valid_end : [0, 0],
surface: 1,
finish: "polished",
model: "unified",
polish: 1.0,
LIGHT_YIELD: 0.0, // Does not scintillate!
//------------------------------------------------//
// Refractive Index
//------------------------------------------------//
// From
// https://www.kuraray.com/uploads/5a717515df6f5/PR0150_psf01.pdf, page 3
RINDEX_option: "wavelength",
RINDEX_value1: [ 250.0, 800.0 ],
RINDEX_value2: [ 1.590, 1.590 ],
//------------------------------------------------//
// Re-emission spectrum
//------------------------------------------------//
SCINTILLATION_option: "dy_dwavelength",
SCINTILLATION_value1: [ 250.0, 300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 800.0 ],
SCINTILLATION_value2: [ 0.000, 0.000, 0.000, 0.000, 1.000, 1.000, 0.000, 0.000, 0.000 ],
SCINTILLATION_WLS_option: "dy_dwavelength",
SCINTILLATION_WLS_value1: [ 250.0, 300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 800.0 ],
SCINTILLATION_WLS_value2: [ 0.000, 0.000, 0.000, 0.000, 1.000, 1.000, 0.000, 0.000, 0.000 ],
//------------------------------------------------//
// Quantum efficiency of the WLS dye a function of absorbed wavelength
//------------------------------------------------//
REEMISSION_PROB_option: "wavelength",
REEMISSION_PROB_value1: [ 250.0, 300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 800.0 ],
REEMISSION_PROB_value2: [ 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900 ],
//------------------------------------------------//
// Time constants for WLS re-emission
//------------------------------------------------//
// Decay time assumed to be 10.0 ns
// Rise time is assumed to be 0.1 ns
REEMITWAVEFORM_value1: [-10.0],
REEMITWAVEFORM_value2: [1.0],
SCINTWAVEFORM_value1: [-10.0],
SCINTWAVEFORM_value2: [1.0],
SCINT_RISE_TIME: 0.1,
//------------------------------------------------//
// ABSORPTION LENGTH
//------------------------------------------------//
ABSLENGTH_option: "wavelength",
ABSLENGTH_value1: [ 250.0, 300.0, 350.0, 400.0, 450.00, 500.00, 550.00, 600.00, 800.00 ],
ABSLENGTH_value2: [ 0.000, 0.500, 0.500, 0.500, 4000.0, 4000.0, 4000.0, 4000.0, 4000.0 ],
PROPERTY_LIST: ["LIGHT_YIELD", "RINDEX", "SCINTILLATION", "SCINTILLATION_WLS", "ABSLENGTH", "SCINT_RISE_TIME", "SCINTWAVEFORM", "REEMISSION_PROB", "REEMITWAVEFORM"]
}
////////////////////////////////////////////////////
//------------------------------------------------//
//Fiber Cladding Materials:
//------------------------------------------------//
////////////////////////////////////////////////////
//------------------------------------------------//
//Inner cladding of fiber: PMMA
//------------------------------------------------//
// From https://en.wikipedia.org/wiki/Poly(methyl_methacrylate)
// Composition (C5O2H8)n
// From
// https://www.kuraray.com/uploads/5a717515df6f5/PR0150_psf01.pdf, page 3
// Density 1.19 g / cm3
{
name: "MATERIAL",
index: "PMMA",
valid_begin : [0, 0],
valid_end : [0, 0],
density: 1.19,
nelements: 3,
nmaterials: 0,
elements: ["Hydrogen", "Carbon", "Oxygen"],
elemprop: [0.080538, 0.599848, 0.319614],
index_of_refraction: 1.49
}
{
name: "OPTICS",
index: "PMMA",
valid_begin : [0, 0],
valid_end : [0, 0],
//------------------------------------------------//
// REFRACTIVE INDEX
//------------------------------------------------//
// From
// https://www.kuraray.com/uploads/5a717515df6f5/PR0150_psf01.pdf, page 3
RINDEX_option: "wavelength",
RINDEX_value1: [250.0, 800.0],
RINDEX_value2: [1.49, 1.49],
PROPERTY_LIST: ["RINDEX"],
}
//------------------------------------------------//
//Outer cladding of fiber: Fluorinated polyethylene
//------------------------------------------------//
// From
// https://www.kuraray.com/uploads/5a717515df6f5/PR0150_psf01.pdf, page 3
// Density 1.43 g / cm3
{
name: "MATERIAL",
index: "Fpolyethylene",
valid_begin : [0, 0],
valid_end : [0, 0],
density: 1.430,
nelements: 3,
nmaterials: 0,
elements: ["Hydrogen", "Carbon", "Fluorine"],
// H, C and F atoms.. let's do 8:3:3 (random guess)
elemprop: [0.08, 0.36, 0.56],
index_of_refraction: 1.42
}
{
name: "OPTICS",
index: "Fpolyethylene",
valid_begin : [0, 0],
valid_end : [0, 0],
//------------------------------------------------//
// REFRACTIVE INDEX
//------------------------------------------------//
// From
// https://www.kuraray.com/uploads/5a717515df6f5/PR0150_psf01.pdf, page 3
RINDEX_option: "wavelength",
RINDEX_value1: [250.0, 800.0],
RINDEX_value2: [1.42, 1.42],
PROPERTY_LIST: ["RINDEX"],
}

0 comments on commit 71dc358

Please sign in to comment.