Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optical physicslist tool #44

Merged
merged 9 commits into from
Sep 26, 2023

Conversation

atolosadelgado
Copy link
Contributor

Hi,

Optical physics will be needed for optical calorimeters and the ARC.

I have copied the tool which allows to register the Optical Physics on top of a full physics list.
https://github.com/HEP-FCC/dual-readout/blob/master/DRsim/DRsimG4Full/src/components/SimG4OpticalPhysicsList.cpp

I have added setters for the 3 optical processes: Cerenkov, Scintillation and Transition Radiation.

Cerenkov and Scintillation are enabled by default, as in the original file.

The code is rather small, so a test for just this is not worth it. However, it might be healthy for the repository to have a minimal simulation as test, to notice changes in Geant4 or DD4hep.

Best,
Alvaro

Copy link
Contributor

@BrieucF BrieucF left a comment

Choose a reason for hiding this comment

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

Thanks Alvaro! Could you still add an example on how this tool should be instantiated and used in a Gaudi steering file? Event though they are not ran as tests per se I guess they could still go to SimG4Components/tests/options, what do you think @kjvbrt ?

SimG4Components/src/SimG4OpticalPhysicsList.h Outdated Show resolved Hide resolved
SimG4Components/src/SimG4OpticalPhysicsList.h Outdated Show resolved Hide resolved
@atolosadelgado
Copy link
Contributor Author

@kjvbrt suggested a very simple self-contained example, which consist in a minimal compact file that allow to run a silent simulation. This example can actually be a test, to check if there is any mention to the optical processes in the standard output. I am on it.

@atolosadelgado
Copy link
Contributor Author

Hi,
I have introduced a gaudi script to run a simple simulation and test if some Optical Physics processes are being activated when the tool that wraps the FTFpBert+Optics is used.

The steering file just loads the geometry and G4, and launch 1 event. The details of the optical physics are printed just before starting the simulation, and the test checks if the printout contains the reference to optical processes.

To be studied the possibility of concatenating Gaudi tools in order to register different physics lists in a modular way as it is done in G4

#include "GaudiKernel/AlgTool.h"
#include "GaudiKernel/ToolHandle.h"

// FCCSW
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually this is the k4FWCore location https://github.com/key4hep/k4FWCore/blob/main/k4Interface/include/k4Interface/ISimG4PhysicsList.h

Suggested change
// FCCSW
// k4FWCore

But there is also the same file here https://github.com/HEP-FCC/k4SimGeant4/blob/main/SimG4Interface/include/SimG4Interface/ISimG4PhysicsList.h
And it should be dropped in k4SimGeant4.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took as template another physics lists existing in this repo. If refactoring of this and other physics lists tools is needed, maybe it is worth to do it in a separate PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, probably worth doing a separate PR.

@kjvbrt kjvbrt merged commit 3ae4c42 into HEP-FCC:main Sep 26, 2023
1 of 2 checks passed
giovannimarchiori pushed a commit to giovannimarchiori/k4SimGeant4 that referenced this pull request Sep 26, 2023
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.

4 participants