You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Introduce TMCReplay and restructure repo
[TMCReplay]
Simulation engine based on the Virtual Monte Carlo (VMC) framework to
exactly replay the steps as previously recorded from another run using
the MCStepLogger.
Cut and process settings can be varied to study the impact on the steps.
That funcionality is currently not fully implemented but will be as the
next step.
The replay engine is built by default but the build can be switched off
setting `-MCStepLogger_BUILD_TMCReplay=OFF" at configure time when
`CMake` is invoked.
In the easiest case it can be run using the installed executable
`tmcreplay`. Use `tmcreplay --help` to see all options.
Generally, the engine can be used as usual within any other simulation
framework. In that case it might be used to evaluate the impact of
different cut and process settings on hist or digits.
[MCStepLogger]
3-momenta (px, py, pz) added to logging as that is necessary to replay
simulation correctly
[Repository restructuring]
The original MCStepLogger (and the TMCReplay engine) were moved to
corresponding sub-directories.
Installation of libraries was unified through common CMake function.
[Apply clang-format to cxx (previously not done)]
* switch off test builds by default
* Complete TVirtualMC interface implementations
* implement
* TVirtualMC::Gs* methods
* TVirtualMC::{Material,Mixture,Medium}
-> overall implementation follows
https://github.com/vmc-project/vmc/blob/master/source/include/TGeoMCGeometry.h
however, in this case with a cached pointer to TGeoManager instead of
everytime obtaining it from gGeoManager
* small updates of READMEs and executable source replay.cxx
* update tracking and stepping logic
* ignore additional secondaries secondaries pushed during hit creation
(or anywhere during TVirtualMCApplication::Stepping)
* take copy number into account when updating the TGeoManager/TNavigator
state
* Fix issues with running Replay stand-alone
* add MCReplayGenericApplication to be interceptable
* update replay test
* Add energy cut option to replay executable
Co-authored-by: Benedikt Volkel <[email protected]>
This is a pseudo-detector-simulation engine based on the [Virtual Monte Carlo (VMC)](https://vmc-project.github.io/) package. It takes logged steps recorded by the `MCStepLogger` to **replay** the entire simulation.
4
+
5
+
The main objective is to be able to provide an engine to study the impact of parameter variations with. Eventually, this can be used to optimise (full-)simulation parameters in view of enhancing their speed and efficiency.
6
+
7
+
The functionality is compiled into a separate library `libTMCReplay` which also allows to use the `libMCStepLoggerIntercept` which also allows to run the step logging against the `TMCReplay` engine.
8
+
9
+
## Setting parameters
10
+
11
+
The list of tunable parameters is foreseen to correspond to the possible settings implemented for [GEANT3_VMC]() and [GEANT4_VMC](https://github.com/vmc-project/geant4_vmc) and can be found [here](include/TMCReplay/Physics.h). The parameters can be set via the usual interfaces
12
+
*`TVirtualMC::SetCut` and `TVirtualMC::SetProcess` to set global cut and process values
13
+
*`TVirtualMC::Gstpar` to set parameters depending on a certain medium
14
+
15
+
**Please note** that the parameters can be set but at the moment nothing is actually applied. Therefore, the exact same steps would be reproduced regardless of the parameters. Of course, this is the next major development as it is one of the core objectives of this engine.
16
+
17
+
## Testing different parameter settings
18
+
19
+
**Note that this section becomes actually meaningful when the aforementioned functionality will have been implemented.** However, in the current state it can already be verified that the `TMCReplay` engine does what it is supposed to do.
20
+
21
+
### Running/testing on step level only (`TMCReplayDummyApplication` and `TMCReplayDummyStack`)
22
+
23
+
If only the impact on the steps is desired, all required functionality is already included here. Simply have a look at [this executable](src/replay.cxx). It makes use of the `TMCReplayDummyApplication` and `TMCReplayDummyStack` just to replay the steps. Once implemented, the impact of the parameters on the stepping can be evaluated with this tool alone. To do so, just run the `MCStepLogger` together with the replay, for instance as follows
That will pick up the step file `MCStepLoggerOutput.root`. If you gave that a different name (or in case also your contained tree has another name), you will find the following help message useful:
30
+
31
+
```bash
32
+
> tmcreplay --help
33
+
Replaying a previously recorded particle transport step-by-step. Mainly meant for checking and performance measurements/optimisation of the transport:
34
+
--help show this help message and exit
35
+
--stepfilename arg (=MCStepLoggerOutput.root)
36
+
MCStepLogger filename
37
+
--steptreename arg (=StepLoggerTree) treename inside file where to find step
38
+
tree
39
+
--geofilename arg (=o2sim_geometry.root)
40
+
ROOT geometry filename
41
+
--geokeyname arg (=FAIRGeom) key name inside geo file where to find
42
+
geometry tree
43
+
44
+
```
45
+
46
+
As you can see the geometry is required by this executable as well since it has otherwise no idea what geometry was used for the original simulation.
47
+
48
+
### Running in another environment
49
+
50
+
In that case the geometry construction is assumed to implemented by that environment's implementation of `TVirtualMCApplication`. Also, no stack is constructed automatically and it has to be constructed and passed by the user.
51
+
52
+
Such a scenario is useful to evaluate the impact of parameter variation on hits or even digits.
0 commit comments