|Message: Time Limiting opticalPhotons||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
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:
G4double maxTime = 10*ms; fStepLimit = new G4UserLimits(DBL_MAX,DBL_MAX,maxTime); LogicalVolumeFooBar->SetUserLimits(fStepLimit);
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?
|Inline Depth:||Outline Depth:||Add message:|