Message: Time Limiting opticalPhotons Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Time Limiting opticalPhotons 

Forum: Processes Involving Optical Photons
Date: 07 Jan, 2015
From: Zach Miller <Zach Miller>

Hi all,

I'm trying to calculate the efficiency of my detectors. To do this, I've built the geometry and then throw neutrons into the plastic scintillators and look at opticalphoton collection at various PMT points.

Everything is working well, except that occasionally I get events where the opticalphotons just get stuck. This may only happen once every 5-10k events, but when it happens, my machine just runs and runs on that event, never moving on. Because I'm logging data into root files, when I abort the run, all of the other data in the root files is corrupted.

Thus, I'd like to setup some sort of maximum global time for optical photons... such that if they are still being tracked after some time T (say 10*ms), the program will just count them as a loss and move on. Sine this is only happening rarely, it shouldn't effect my calculation at a level I'm concerned about.

I found and attempted to add a "G4UserSpecialCut" and have been able to do everything but register it to the pre-made physics list. Following along with the manual for Application Developers:

In DetectorConstruction():

G4double maxTime = 10*ms; fStepLimit = new G4UserLimits(DBL_MAX,DBL_MAX,maxTime); LogicalVolumeFooBar->SetUserLimits(fStepLimit);

In Main():

G4VModularPhysicsList* physicsList = new FTFP_BERT_HP; physicsList->RegisterPhysics(new SpecialCutsBuilder()); runManager->SetUserInitialization(physicsList);

When I do this, I get this error from Main():

neutronBar.cc:145:36: error: expected type-specifier before ‘SpecialCutsBuilder’
   physicsList->RegisterPhysics(new SpecialCutsBuilder());

I also can't find a header file for "SpecialCutsBuilder" even though it seems there is one for the sister class "StepLimiter."

Thus 2 questions:

1) Will this work for opticalPhotons? I'm not even sure if it will assign one of these special cuts to opticalPhotons instead of "traditional" particles.

2) How do I register this process if it does work for opticalPhotons?

Thanks, Zach

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

1 Warning: Re: Time Limiting opticalPhotons   (Gumplinger Peter - 08 Jan, 2015)
(_ None: Re: Time Limiting opticalPhotons   (Zach Miller - 08 Jan, 2015)
(_ Feedback: Re: Time Limiting opticalPhotons   (Gumplinger Peter - 13 Jan, 2015)
(_ None: Re: Time Limiting opticalPhotons   (Zach Miller - 14 Jan, 2015)
 Add Message Add Message
to: "Time Limiting opticalPhotons"

 Subscribe Subscribe

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