Skip to content

Adding in user optical physics list#173

Closed
cameronc137 wants to merge 1 commit intodevelopfrom
feature-user-optical
Closed

Adding in user optical physics list#173
cameronc137 wants to merge 1 commit intodevelopfrom
feature-user-optical

Conversation

@cameronc137
Copy link
Copy Markdown
Contributor

This duplicates the already implemented "optical" list, but now the constituent processes are laid bare, allowing for the user to edit which optical processes are included. This is critical for performing blackening studies in the light guides and to determine the relative impact of scintillation vs. cherenkov.

I also ran some simple tests turning on and off cherenkov and scintillation in the user optical code, and compared also against the "optical" list to verify satisfactorily that these two lists are giving consistent results and that both scintillation and cherenkov have been included this whole time in the "optical" list.

This may still have the issue where parallel world can't be loaded at the same time (probably because these lists overwrite eachother, so that may require condensing all user lists into one class that allows multiple being turned on and off simultaneously - this UserOptical class will be a good groundwork to start from).

@cameronc137
Copy link
Copy Markdown
Contributor Author

cameronc137 commented Dec 23, 2018

This resolves #170

@cameronc137
Copy link
Copy Markdown
Contributor Author

This will put an additional constraint on users ability to pick their own G4 version. See the discussion in JeffersonLab/qsim#2

A detail with the GetParticleIterator() method requires G4 version > 4.10.02, which may be more constrictive than we want at this time.

FatalException,o.str().c_str());
}

if(theCerenkovProcess->IsApplicable(*particle)){
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines here are the ones to comment out if you want to turn off Cherenkov or Scintillation

@wdconinc
Copy link
Copy Markdown
Member

wdconinc commented Jan 3, 2019

Can someone outline the use case for this? What does remollUserOptical allow that wasn't already possible in G4OpticalPhysics?

Based on Qweak experience I am very hesitant to start including user-composed physics lists.

  • It adds a lot of Geant4 version dependence (when we move to 4.10.5 I guarantee this will have to be updated with new names, and then we'll have lots of #ifdef and #ifndef statements).
  • Geant4 is more likely to do the right thing in G4OpticalPhysics than we are, no disrespect intended. With Qweak we had for a while double photo-excitation enabled at the photo-cathode. Then we had none.

Even if we wish to define our own optical physics, I would be much more comfortable with an inherit from G4OpticalPhysics than with a copy or reimplementation.

@cameronc137
Copy link
Copy Markdown
Contributor Author

@wdconinc, the use case is pretty much specifically for the blackening study that has been pending for the detector array since the MOLLER light guide paper was written. We would like to be able to turn cherenkov and scintillation processes on or off independently to see how significant the various backgrounds are in each detector ring's light guide and whether they can be reduced by putting a non-reflective layer in specific places (this is also what my pe.cc code is designed to help diagnose).

The default optical physics list does match this user list's results (not exactly, but that's probably at the seed level), so keeping the non-user one as the default is probably best. In order to do this cherenkov and scintillation turn on/off you have to comment in/out the line (mentioned in the comment above) for it and recompile (this could probably be done with a macro command if we want to keep this functionality around). I was unaware of the /process/optical/processActivation Cerenkov false feature, which would accomplish this comfortably.

Yes, I agree that this is strongly G4 version dependent (a problem qsim currently faces for the same reason), which is why I didn't merge the pull request. The processActivation macro command probably makes this new addition irrelevant.

@wdconinc
Copy link
Copy Markdown
Member

wdconinc commented Jan 3, 2019

Of course, in addition to /process/optical/processActivation Cerenkov false you can also use /process/optical/processActivation Scintillation false, or the same with OpWLS, OpAbsorption, OpBoundary, OpRayleigh, OpMieHG. I'd recommend running with one enabled only, and seeing if that achieves what you wish.

@wdconinc
Copy link
Copy Markdown
Member

wdconinc commented Jan 3, 2019

I tried to condense some of this at https://github.com/JeffersonLab/remoll/blob/develop/README.optical.md

@wdconinc
Copy link
Copy Markdown
Member

wdconinc commented Jan 8, 2019

Proposal: close without merge, delete branch due to functionality in stock optical.

@cameronc137 cameronc137 closed this Jan 9, 2019
@cameronc137 cameronc137 deleted the feature-user-optical branch January 9, 2019 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants