Gaussino merge requestshttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests2024-03-29T00:10:25+01:00https://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/155Draft: ML backends: pyTorch and ONNXRuntime2024-03-29T00:10:25+01:00Michal MazurekDraft: ML backends: pyTorch and ONNXRuntimeMichal MazurekMichal Mazurekhttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/154Draft: Full CaloChallenge setup2024-03-29T00:10:24+01:00Michal MazurekDraft: Full CaloChallenge setupMichal MazurekMichal Mazurekhttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/153Draft: Port configuration from ConfigurableUser to GaudiConfig22024-02-21T15:23:37+01:00Adam Morrisadam.morris@cern.chDraft: Port configuration from ConfigurableUser to GaudiConfig2# Strategy
- Take a ConfigurableUser class and convert its methods to 'plain' functions
- we may decide to revert to classes
- `__slots__` becomes a module-level variable `DEFAULTS`
- the `__apply_configuration__` function is what...# Strategy
- Take a ConfigurableUser class and convert its methods to 'plain' functions
- we may decide to revert to classes
- `__slots__` becomes a module-level variable `DEFAULTS`
- the `__apply_configuration__` function is what gets called from the outside: takes an `ApplicationMgr` object and a dict of properties. The first thing it does is
```python
params = DEFAULTS | kwargs
```
then passes `params` to the other methods
- Test by configuring a job with `ConfigurableUser` and output a `.json` options file, then doing the same with `GaudiConfig2` and taking a diff:
```shell
$ gaudirun.py --dry-run --all-opts --output=old.json options.py ...
$ gaudirun.py --dry-run --all-opts --output=new.json Module:function ...
$ diff old.json new.json
```
## Example
```python
from GaudiConfig2 import Configurables as C
from GaudiConfig2 import mergeConfigs
from Gaussino.GaudiConfig2.Configuration import __apply_configuration__ as Gaussino
from Gaussino.GaudiConfig2.Generation import __apply_configuration__ as GaussinoGeneration
def main():
app = C.ApplicationMgr(AppName="Gaussino", EvtSel="NONE")
configs = [
app,
*Gaussino(app, Phases=["Generator"]),
*GaussinoGeneration(app, ParticleGun=True),
]
return mergeConfigs(configs)
```
## Classes ported
- [x] `Gaussino`
- [x] `GaussinoGeneration`
- [x] `GaussinoSimulation`
- [ ] `GaussinoGeometry`
- [x] `ExternalDetectorEmbedder`
- [ ] `ParallelGeometry`
- [ ] `CustomSimulation`
# To-do
- [ ] unit tests of individual functions
- [ ] integration tests with existing exampleshttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/151Draft: Restructuring production interfaces2024-03-06T19:23:13+01:00Ruben PozziDraft: Restructuring production interfacesChanging the way interfaces work in generation by adding new interfaces (and changing existing ones):
- A new `IProdTool` that deals with all the generation steps from hard process up to hadronization (except decay) by calling the follow...Changing the way interfaces work in generation by adding new interfaces (and changing existing ones):
- A new `IProdTool` that deals with all the generation steps from hard process up to hadronization (except decay) by calling the following intrefaces.
- `IHardProdTool` that takes care only of the hard process generation step (implemented by interfaces to generators such as Madgraph).
- `IShoweringTool` that deals with underlying event, parton shower and hadronization steps (most likely using implementation of interface to Pythia).
- Adding new `ProductionWithHardME` class (not anymore as a base class like in Gauss sim10, but as a working class that implements `IProdTool` and calls `IHardProdTool` and `IShoweringTool`)
A more detailed explanation with diagrams, and on **how to test it** can be found here https://codimd.web.cern.ch/JtD7xAGqS6S9eSIyfmKqRA#.
Relates to #39Ruben PozziRuben Pozzihttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/150Use internal Gaussino's hit class in MCCollector instead of LHCb::MCHit2024-03-29T00:10:23+01:00Michal MazurekUse internal Gaussino's hit class in MCCollector instead of LHCb::MCHit@gcorti @admorris @mkmiec
This changes the default container class used in `MCCollector` from `LHCb::MCHit` to `ExtDet::Hit` that is internal to Gaussino. Another LHCb dependency removed...
If the collector hits are to be persisted, f...@gcorti @admorris @mkmiec
This changes the default container class used in `MCCollector` from `LHCb::MCHit` to `ExtDet::Hit` that is internal to Gaussino. Another LHCb dependency removed...
If the collector hits are to be persisted, for example in Gauss, then the converter would be needed from the `ExtDet::Hit` to `LHCb::MCHit`s.Sim11/2024.02 (Gaussino v1r1)Michal MazurekMichal Mazurekhttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/147Draft: Updating generation Configurables to enable use of MadGraph2024-03-06T19:23:24+01:00Ruben PozziDraft: Updating generation Configurables to enable use of MadGraphUpdating the configurables option for generation to adapt them to the new interfaces in !151.
A more detailed explanation with diagrams, and on **how to test it** can be found here https://codimd.web.cern.ch/JtD7xAGqS6S9eSIyfmKqRA#.
Cl...Updating the configurables option for generation to adapt them to the new interfaces in !151.
A more detailed explanation with diagrams, and on **how to test it** can be found here https://codimd.web.cern.ch/JtD7xAGqS6S9eSIyfmKqRA#.
Closes #39Ruben PozziRuben Pozzihttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/138Draft: Updating Pythia8Production with new generator interfaces2024-03-06T19:22:39+01:00Ruben PozziDraft: Updating Pythia8Production with new generator interfacesUpdating `Pythia8Production` class to adapt it to the new generator interfaces as per !151 .
For now, the new interfaces will be put in parallel of the current ones.
A more detailed explanation with diagrams, and on **how to test it** c...Updating `Pythia8Production` class to adapt it to the new generator interfaces as per !151 .
For now, the new interfaces will be put in parallel of the current ones.
A more detailed explanation with diagrams, and on **how to test it** can be found here https://codimd.web.cern.ch/JtD7xAGqS6S9eSIyfmKqRA#.
Relates to #39Ruben PozziRuben Pozzihttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/136Draft: New Sampling tool interface, sampling generator components, and Pileup...2024-03-06T19:20:52+01:00Ruben PozziDraft: New Sampling tool interface, sampling generator components, and PileupTool for rare processes- Adding a new `ISamplingTool` interface
- Adding `Special` and `MinimumBias` sampling generator classes in Gaussino.
- Adding a new `FixedLuminosityForRareProcessWithSvc` Pileup tool for rare processes to be used with Madgraph.
- A new...- Adding a new `ISamplingTool` interface
- Adding `Special` and `MinimumBias` sampling generator classes in Gaussino.
- Adding a new `FixedLuminosityForRareProcessWithSvc` Pileup tool for rare processes to be used with Madgraph.
- A new adapted `GsinoExternalGenerator` is also added.
All these changes are up to date with the new generator interfaces as per !151 .
A more detailed explanation with diagrams, and on **how to test it** can be found here https://codimd.web.cern.ch/JtD7xAGqS6S9eSIyfmKqRA#.
Relates to #39Ruben PozziRuben Pozzihttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/133Draft: Implementing Madgraph in Gaussino2023-10-24T20:02:48+02:00Ruben PozziDraft: Implementing Madgraph in GaussinoImplementing LbMadgraph for Gaussino. Dependent on the interfaces in !151 .
- Added MadgraphProduction source file, LHAMadgraph file and CMake file.
- Added LbMadgraph to CMakeLists file.
- Modified Seeding Tool to use it for Madgraph Se...Implementing LbMadgraph for Gaussino. Dependent on the interfaces in !151 .
- Added MadgraphProduction source file, LHAMadgraph file and CMake file.
- Added LbMadgraph to CMakeLists file.
- Modified Seeding Tool to use it for Madgraph Seeding
A more detailed explanation with diagrams, and on **how to test it** can be found here https://codimd.web.cern.ch/JtD7xAGqS6S9eSIyfmKqRA#.
Relates to #39Ruben PozziRuben Pozzihttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/129Draft: Port of BeamSpot4D tool to Gaussino2024-03-29T00:13:24+01:00Timothy David EvansDraft: Port of BeamSpot4D tool to GaussinoPorts BeamSpot4D tool from Gauss to Gaussino, with some cleanup / modernization (i.e. drop dependencies on 'old' ROOT geometry classes)Ports BeamSpot4D tool from Gauss to Gaussino, with some cleanup / modernization (i.e. drop dependencies on 'old' ROOT geometry classes)https://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/124Draft: Added simulation backend to Simulation configuration2023-10-16T17:39:40+02:00Lucio AnderliniDraft: Added simulation backend to Simulation configurationAdded a Simulation backend slot to the Simulation configuration.
If set to "Lamarr" it sets up Lamarr instead of Geant4.
In this MR, Lamarr algorithm will be an empty shell.
Issue: https://gitlab.cern.ch/Gaussino/Gaussino/-/issues/34Added a Simulation backend slot to the Simulation configuration.
If set to "Lamarr" it sets up Lamarr instead of Geant4.
In this MR, Lamarr algorithm will be an empty shell.
Issue: https://gitlab.cern.ch/Gaussino/Gaussino/-/issues/34https://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/111Draft: Add edm4hep data model usage2023-04-24T18:15:34+02:00Adam DavisDraft: Add edm4hep data model usageSteps to try EDM4hep datamodel
- [x] ~~Write FindEDM4hep.cmake~~ Use SFT installed EDM4HEPConfig.cmake
- [x] Add to Top level CMakeLists.txt for propagation
- [x] Use in EDM CMakeLists.txt
- [ ] Write minimal Gaudi::Functional conversion...Steps to try EDM4hep datamodel
- [x] ~~Write FindEDM4hep.cmake~~ Use SFT installed EDM4HEPConfig.cmake
- [x] Add to Top level CMakeLists.txt for propagation
- [x] Use in EDM CMakeLists.txt
- [ ] Write minimal Gaudi::Functional conversion algorithm from either HepMC3 <-> EDM4hep or LHCb EDM <-> EDM4hep
- [ ] Add functional tests
- [ ] Add documentationhttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/110Draft: DD4hep message level2023-02-24T16:31:14+01:00Adam Morrisadam.morris@cern.chDraft: DD4hep message levelhttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/87Draft: Visualize hits in Phoenix2022-09-23T10:20:16+02:00Filip BilandzijaDraft: Visualize hits in PhoenixFYI: @mimazureFYI: @mimazureGeant4 & Phoenix VisualizationMichal MazurekMichal Mazurekhttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/83Draft: Enable conditional storing of G4Trajectories2023-08-17T15:03:16+02:00Michal MazurekDraft: Enable conditional storing of G4Trajectories@gcorti The possibility to store G4Trajectories was not introduced when porting `GaussPostTrackAction` to Gaussino as a `TruthFlaggingTrackAction`. Now the possibility to store them is back and switched off by default.
- Set `m_storeTra...@gcorti The possibility to store G4Trajectories was not introduced when porting `GaussPostTrackAction` to Gaussino as a `TruthFlaggingTrackAction`. Now the possibility to store them is back and switched off by default.
- Set `m_storeTrajectories` if you wish to store trajectories that correspond to MCTruth from `GaussinoTrackInformation`.
- Set `m_storeMarkedTrajectories` if you wish to store only the G4Trajectories that participated in the creation of hits in the sensitive detector classes.
@fbilandz with this option we may now optimize the number of G4Trajectories used in G4 visualization in !70 and Phoenix in !78Geant4 & Phoenix VisualizationGloria CortiGloria Cortihttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/70Draft: Geant4 & Phoenix Visualization2024-01-18T15:30:16+01:00Michal MazurekDraft: Geant4 & Phoenix VisualizationThis is the base MR for all the developments that add/modify components that enable visualization with Geant4.
### Changes in GiGaMT
Geant4 visualization does not work out of the box with Gaussino. This is mainly because a custom even...This is the base MR for all the developments that add/modify components that enable visualization with Geant4.
### Changes in GiGaMT
Geant4 visualization does not work out of the box with Gaussino. This is mainly because a custom event loop has been implemented and many functionalities of both the `G4MTRunManager` and `G4WorkerRunManager` have been re-implemented. Additional difficulty arises from the fact that visualization in G4 is handled by an additional thread (created by Geant4 just before run initialization). This thread needs to have a few things correctly set up or otherwise it will not be created. Moreover, the worker pilot must not delete the `G4Event`s too early as they are scheduled for postprocessing in Geant4. Therefore, the following MRs adapt `GiGaMT` to the new mechanism (tested with 8 threads and > 100 events):
- !77 postpone the deletion of G4Events
- !76 add the possibility to launch UI commands before the initialization of the run
- !74 some extra information that has to be passed correctly to G4
- !69 support `EventAction` and improve `RunAction` UI commands
- !71 terminate the G4 Run correctly
- !72 do not ignore the status of the UI commands launched from the worker threads,
- !73 do not repeat `RunAction` commands that were previously used by the master thread.
- !83 conditional storing of G4Trajectories,
- !78 Add GiGaMTPhoenix
## Changes in this MR
This MR consists of:
- [x] (base) Gaussino's implementation of G4VisManager
- [x] (base) python configuration
cc: @fbilandzGeant4 & Phoenix VisualizationMichal MazurekMichal Mazurekhttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/56Draft: Fixed GAN Calo Example2023-03-06T10:27:55+01:00Michal MazurekDraft: Fixed GAN Calo Example@gcorti @kreps @adavis
This MR adds the first implementation of GANs used in fast simulation and is **mostly dedicated to benchmarking the infrastructure**. We create here a very simple GAN with PyTorch where we fix all the elements in...@gcorti @kreps @adavis
This MR adds the first implementation of GANs used in fast simulation and is **mostly dedicated to benchmarking the infrastructure**. We create here a very simple GAN with PyTorch where we fix all the elements in the tensor in the output in order to have deterministic output from the neural network when testing fast simulations.
Example of the output from neural network as seen by Gaussino:
```
ToolSvc.FastCal...SUCCESS [ Worker #0 ] Elements of the GAN grid:
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
| 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, 0.015625, |
```
An example & tutorial can be accessed here https://gitlab.cern.ch/mimazure/gausstrainingsample/-/blob/fixed-GAN-CALO-example-in-Gaussino/fixed_gan_model_description.ipynb
### Examples
In the following events output from the notebook given above is given. The neural network generates a grid of 8 x 8 fast hits, centered at the point where the particle passes through the calorimeter.
![fixed_gan_calo_examples](/uploads/5b62d786f908ad7afe10630156ecf0c7/fixed_gan_calo_examples.png)
![fixed_gan_calo_examples_2](/uploads/fbed954167ac007e2f8e82b57ebac61b/fixed_gan_calo_examples_2.png)https://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/35Port MonitorTiming component to Gaussino2024-03-29T00:09:51+01:00Michal MazurekPort MonitorTiming component to Gaussino@gcorti @adavis @kreps @dpopov
This ports the `MonitorTiming` component to Gaussino that allows for measuring timing spent in a particular detector/process per particle. There are a few modifications:
1. Log file has been removed and a...@gcorti @adavis @kreps @dpopov
This ports the `MonitorTiming` component to Gaussino that allows for measuring timing spent in a particular detector/process per particle. There are a few modifications:
1. Log file has been removed and all the information is now written to CSV files.
2. `G4UserSteppingAction` is now created per each thread, so the main counters are in the factory (GaudiTool).
3. `UserSteppingAction` has been optimized and only necessary operations are made within the scope of this function. All the rest of pre- and post-processing has been moved to the `initialize()` and `finalize()` functions.Sim11/2024.02 (Gaussino v1r1)Michal MazurekMichal Mazurekhttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/11Draft: Allow empty bunch crossings with fixedluminosity from svc2024-02-11T19:31:38+01:00Dominik MullerDraft: Allow empty bunch crossings with fixedluminosity from svchttps://gitlab.cern.ch:8443/Gaussino/Gaussino/-/merge_requests/7Draft: Queue based Pythia8 interface2023-12-21T11:27:54+01:00Dominik MullerDraft: Queue based Pythia8 interfaceWhile one Pythia8 instance might not be enough when running many threads, one per thread is probably too many so this is a compromise. Still being tested.While one Pythia8 instance might not be enough when running many threads, one per thread is probably too many so this is a compromise. Still being tested.