Message: fStopAndKill with opPhotons Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None fStopAndKill with opPhotons 

Forum: Processes Involving Optical Photons
Date: 25 Jul, 2014
From: Zach Miller <Zach Miller>

Hi all,

I'm currently simulating large surface area plastic scintillation detectors. I'm doing so with relatively high energy neutrons (100+ MeV). One of the downsides to this simulation is that our material has a opPhoton production rate of ~12000/MeV. Given 100 MeV of neutron energy, this results in 100k+ opPhotons to track for each event. This is extraordinarily slow to run.

At present, I'm not interested in the trajectories of the opPhotons; I simply want to know how many are generated in each event, where they were generated, and at what time they were generated. My solution for this is to implement a function in the UserSteppingAction that looks like this (the rest of the SteppingAction.cc code is attached):

 if(theParticle->GetParticleDefinition() == G4OpticalPhoton::OpticalPhotonDefinition())
    {
      isOpPhoton = 1;
      fEventAction->tallyPhoton(0,copyNo,theTrack->GetGlobalTime());
      theTrack->SetTrackStatus(fStopAndKill);
    }

This is working splendidly except for one point, the fStopAndKill isn't working. The system continues to track (and draw if I enable openGL) every opPhoton to it's completion. My material has a 300cm Absorption Length, so the tracks can get to be quite long and this results in each run of 50,000 input neutrons to take 4 to 10 hours to complete (with optical physics removed, it takes 10 seconds).

Also, I realize this may not be the most efficient way to count opPhotons, but I'm using this as a gateway to my counting being reliant on the tracking, so I don't want to disable tracking of opPhotons all together.

Any ideas on why fStopAndKill isn't suppressing the tracking of the opPhotons?

Many thanks, Zach Miller

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2014/07/25/05.24-20524-SteppingAction.cc

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

1 None: Re: fStopAndKill with opPhotons   (michel maire - 25 Jul, 2014)
(_ None: Re: fStopAndKill with opPhotons   (Zach Miller - 25 Jul, 2014)
1 None: Re: fStopAndKill with opPhotons   (michel maire - 25 Jul, 2014)
1 None: Re: fStopAndKill with opPhotons   (Zach Miller - 25 Jul, 2014)
... 3 Message(s)
2 None: Re: fStopAndKill with opPhotons   (michel maire - 02 Aug, 2014)
1 None: Re: fStopAndKill with opPhotons   (Zach Miller - 04 Aug, 2014)
 Add Message Add Message
to: "fStopAndKill with opPhotons"

 Subscribe Subscribe

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