fiedl / hole-ice-study

This project aims to incorporate the effects of hole ice into the clsim photon propagation simulation of the icecube neutrino observatory.
Other
4 stars 2 forks source link

Basic flasher simulation with cable #97

Open fiedl opened 6 years ago

fiedl commented 6 years ago

The flasher calibration data from #59 suggests that when flashing DOM 63_30, the receiving strings 62 and 54 are shadowed.

flasher_hits_vs_simulation

Add a cable to the flasher simulation and check whether this can be used to model the asymmetry.

image

This is a simplified version of https://github.com/fiedl/hole-ice-study/issues/60.

fiedl commented 6 years ago

Hole-ice parameters: Take the best parameters from https://github.com/fiedl/hole-ice-study/issues/59#issuecomment-406573032:

LLH: -278.658980236 esca = 0.101454356093m r = 0.832658203871 r_dom

fiedl commented 6 years ago

Unfortunately, the cable positions from https://github.com/fiedl/hole-ice-study/issues/60#issuecomment-386292394 do not work with the DOM positions in the geometry file.

bildschirmfoto 2018-07-24 um 12 28 11

Thus, insert this one cable position by hand.

The DOM position is:

      <item>
        <first>
          <StringNumber>63</StringNumber>
          <OMNumber>30</OMNumber>
          <PMTNumber>0</PMTNumber>
        </first>
        <second>
          <Position>
            <X>-66.699996948242188</X>
            <Y>276.92001342773438</Y>
            <Z>3.119999885559082</Z>
          </Position>
          <Orientation>
            <Direction>
              <zen>0</zen>
              <azi>3.1415926535897931</azi>
              <zenDeg>0</zenDeg>
              <aziDeg>180</aziDeg>
              <dx>1.2246467991473532e-16</dx>
              <dy>0</dy>
              <dz>-1</dz>
            </Direction>
            <Up>
              <zen>1.5707963267948966</zen>
              <azi>3.1415926535897931</azi>
              <zenDeg>90</zenDeg>
              <aziDeg>180</aziDeg>
              <dx>1</dx>
              <dy>0</dy>
              <dz>6.123233995736766e-17</dz>
            </Up>
            <Right>
              <zen>1.5707963267948966</zen>
              <azi>1.5707963267948966</azi>
              <zenDeg>90</zenDeg>
              <aziDeg>90</aziDeg>
              <dx>6.123233995736766e-17</dx>
              <dy>-1</dy>
              <dz>6.123233995736766e-17</dz>
            </Right>
          </Orientation>
          <OMType>20</OMType>
          <Area>0.04439999908208847</Area>
        </second>
      </item>

The cable position is:

# ruby

require_relative 'cable_positions'
CablePosition.find_by(string: 63, dom: 30).angle_from_grid_north_in_degrees
# => -134.849
fiedl commented 6 years ago

Get the cable position from the above DOM position:

# ruby

require_relative 'cable_positions'

class DomPosition
  def x
    -66.699996948242188
  end
  def y
    276.92001342773438
  end
  def z
    3.119999885559082
  end
end

class CablePosition
  def dom_position
    DomPosition.new
  end
end

cable_position = CablePosition.find_by(string: 63, dom: 30)
p [cable_position.x, cable_position.y, cable_position.z]
# => [-66.83122690023184, 276.78947335840394, 3.119999885559082]

CablePosition.cable_radius  # arbitrary choice
# => 0.02
fiedl commented 6 years ago
[2018-07-24 12:46:27] fiedl@fiedl-mbp ~/hole-ice-study/scripts/FlasherSimulation master ⚡
▶ ./run.rb --width=127 --brightness=127 --thinning-factor=0.1 --effective-scattering-length=0.10 --absorption-length=100.0 --hole-ice-radius-in-dom-radii=0.83 --cable
▶ steamshovel tmp/gcd_with_hole_ice.i3

bildschirmfoto 2018-07-24 um 12 48 09 bildschirmfoto 2018-07-24 um 12 48 50

fiedl commented 6 years ago

Something is wrong.

[2018-07-24 14:03:44] fiedl@trex01 /afs/ifh.de/group/amanda/scratch/fiedl/hole-ice-study/scripts/FlasherSimulation
▶ ./run.rb --width=127 --brightness=127 --thinning-factor=0.0001 --effective-scattering-length=0.10 --absorption-length=100.0 --hole-ice-radius-in-dom-radii=0.83 --cable

NOTICE (I3Tray): I3Tray finishing... (I3Tray.cxx:473 in void I3Tray::Execute(unsigned int))
FATAL (I3CLSimStepToPhotonConverterOpenCL): OpenCL ERROR (running kernel): clEnqueueNDRangeKernel (-4) (I3CLSimStepToPhotonConverterOpenCL.cxx:1005 in void I3CLSimStepToPhotonConverterOpenCL::OpenCLThread_impl_runKernel(unsigned int, cl::Event&, std::size_t))
***** running unweighted simulation with a photon pre-scaling of 0.0001
number of spectra (1x Cherenkov + Nx flasher): 7
OpenCL worker thread died unexpectedly..

Running it with cpu: true works. (See also #23.) Why does this occur now? Repeating simple simulations that have worked previously, results in the same error now.

Fix: https://github.com/fiedl/hole-ice-study/commit/a867983a7d4ddaedf727abdf00e7792446a5b2ed

Add MaxNumOutputPhotonsCorrectionFactor in propagate_photons_with_clsim.py because it is required by https://github.com/fiedl/clsim/commit/232c1f3b10effcfeff39436b6891565f1e893cdc. This fixes https://github.com/fiedl/hole-ice-study/issues/97#issuecomment-407382571 and might be related to https://github.com/fiedl/hole-ice-study/issues/23 as well.

fiedl commented 6 years ago
[2018-07-24 14:57:45] fiedl@trex01 /afs/ifh.de/group/amanda/scratch/fiedl/hole-ice-study/scripts/FlasherSimulation
▶ ./run.rb --width=127 --brightness=127 --thinning-factor=0.1 --effective-scattering-length=0.10 --absorption-length=100.0 --hole-ice-radius-in-dom-radii=0.83 --cable

[2018-07-24 15:29:11] fiedl@trex01 /afs/ifh.de/group/amanda/scratch/fiedl/hole-ice-study/scripts/FlasherSimulation
▶ mv results/Run-2018-Maht3Key $SCRATCH/hole-ice-study/results/flasher_with_cable/
fiedl commented 6 years ago

Without cable:

[2018-07-24 15:46:31] fiedl@fiedl-mbp ~/hole-ice-study/scripts/lib master ⚡
▶ ./plot_flasher_hits_vs_simulation.py ~/hole-ice-study/results/flasher_parameter_scan_full_brightness_with_thinning/esca0.10145435609344855_r0.8326582038706608rdom_abs100_width127_bright127

With cable:

[2018-07-24 15:43:42] fiedl@fiedl-mbp ~/hole-ice-study/scripts/lib master ⚡
▶ ./calculate_flasher_llhs.py ~/hole-ice-study/results/flasher_with_cable
▶ ./plot_flasher_hits_vs_simulation.py ~/hole-ice-study/results/flasher_with_cable

flasher_hits_vs_simulation

The result shows an effect, but it's not as strong as expected.

fiedl commented 6 years ago

If the hole-ice cylinder is smaller then the photons are less likely to scatter and miss the cable. Try what happens when decreasing the cylinder radius.

[2018-07-24 15:57:18] fiedl@kepler16 /afs/ifh.de/group/amanda/scratch/fiedl/hole-ice-study/scripts/FlasherSimulation
▶ ./run.rb --width=127 --brightness=127 --thinning-factor=0.1 --effective-scattering-length=0.25 --absorption-length=100.0 --hole-ice-radius-in-dom-radii=0.3 --cable

[2018-07-24 16:15:32] fiedl@kepler16 /afs/ifh.de/group/amanda/scratch/fiedl/hole-ice-study/scripts/FlasherSimulation
▶ mv results/Run-2018-Avahk3xo $SCRATCH/hole-ice-study/results/flasher_with_cable/

Expectation: More hits overall, but relatively less hits on the shadowed strings.

fiedl commented 6 years ago
[2018-07-24 16:23:55] fiedl@fiedl-mbp ~/hole-ice-study/scripts/lib master ⚡
▶ ./plot_flasher_hits_vs_simulation.py ~/hole-ice-study/results/flasher_with_cable

flasher_hits_vs_simulation

No luck, yet.

fiedl commented 6 years ago
[2018-08-30 22:53:24] fiedl@fiedl-mbp ~/hole-ice-study/scripts/lib master ⚡
▶ ./plot_flasher_hits_vs_simulation.py ~/hole-ice-study/results/flasher_with_cable/Run-2018-Maht3Key ~/hole-ice-study/results/flasher_parameter_scan_full_brightness_with_thinning/esca0.10145435609344855_r0.8326582038706608rdom_abs100_width127_bright127
bildschirmfoto 2018-08-30 um 22 54 20