Message: bad_alloc error after changing geometry Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question bad_alloc error after changing geometry 

Forum: Processes Involving Optical Photons
Date: 22 Jan, 2010
From: Astrid Velroyen <Astrid Velroyen>

Hi there!

I have a problem with my optical photons simulation: I got a code which described a scintillation crystal within a box of aluminum as a reflector. On its one end of the crystal there is placed a quartz window and a photon sensitive detector. Everything with this code seems to work fine. Now, to make it more realistic, I tried to create a thin air gap between the crystal and the Aluminum reflector. I followed the same system as before: A box of Aluminum, which contains a box of air, which contains a box of scintillator. Air and scintillator should be shifted to one end, so that between the quartzwindow and the scintillator there is no other material. Please find my detector construction code attached.


If I start this version, after some while (during the first event) I get a bad_alloc error. I can avoid this error by setting the polish of the crystal-air-surface to a 0.99. But still this version then needs a lot more (~ at least 10 times more) time than the version without the air-gap. My guess was that between the two parallel polished surfaces photons are captured for eternity. I tried to limit the maximum run time for a photon as described in the Application Guide on page 176 for neutrons, but if I set the maximum time to 200 ns (which is already too short for my simulation) the eror still occurs. Now I am running out of ideas what could cause this error or this extreme long duration of simulation. I have seen that some of you have implemented similar scenarios which are working fine. Does anyone have an idea what's wrong with my code? thanks in advance and best regards,


Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: bad_alloc error after changing geometry   (Wolfgang Lukas - 27 Jan, 2010)
(_ Feedback: Re: bad_alloc error after changing geometry   (Astrid Velroyen - 28 Jan, 2010)
 Add Message Add Message
to: "bad_alloc error after changing geometry"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews