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
Copy file name to clipboardExpand all lines: README.md
+35-17Lines changed: 35 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
-
# Important note
1
+
# MCStepLogger
2
2
3
-
This repository is extracting the MCStepLogger from https://github.com/AliceO2Group/AliceO2/tree/dev/Utilities/MCStepLogger making it ready to be an O2-independent tool (which is in principle already is). Only dependencies are `ROOT` and `Boost`.
3
+
This package can be used to log and analyse the single steps computed by detector simulation engines built upon the [Virtual Monte Carlo (VMC)](https://vmc-project.github.io/).
4
4
5
5
## Build and install
6
6
7
-
`cmake` (version >= 3.11.0) is used to build this project. Please install [ROOT](https://github.com/root-project/root) (tested with version 6.12.06) and [Boost](https://www.boost.org/) (tested with version 1.59.0). After that just set the environment variables `ROOTSYS` and `BOOST_ROOT` to the root directories of the `ROOT` and `Boost` installations, respectively. Finally, do
7
+
The only dependencies are `ROOT` and `Boost`.
8
+
9
+
`cmake` (version >= 3.11.0) is used to build this project. Please install [ROOT](https://github.com/root-project/root) and [Boost](https://www.boost.org/). For both the versions that shoult allow the built can be derived from [alidist](https://github.com/alisw/alidist). After that just set the environment variables `ROOTSYS` and `BOOST_ROOT` to the root directories of the `ROOT` and `Boost` installations, respectively. Finally, do
* the executable `$INSTALL_DIR/bin/mcStepAnalysis` (usage explained [below](#mcsteploganalysis))
17
19
18
-
Note that some of the instructions below especially apply to the usage together with the ALICE O2 software framework.
20
+
**Note** that some of the instructions below especially apply to the usage together with the ALICE O2 software framework.
21
+
**Note** also that the interception only works in case your application derives from or is equal to [FairMCApplication](https://github.com/FairRootGroup/FairRoot/blob/master/base/sim/FairMCApplication.h) or [AliMC](https://github.com/alisw/AliRoot/blob/master/STEER/STEER/AliMC.h).
22
+
23
+
### Use `aliBuild`
24
+
25
+
`aliBuild` can be used to setup the package. To obtain `aliBuild` and related packages, please follow https://alice-doc.github.io/alice-analysis-tutorial/building/. To build from the `master` branch, do
26
+
27
+
```bash
28
+
aliBuild init MCStepLogger@master --defaults o2
29
+
aliBuild build MCStepLogger --defaults o2
30
+
```
31
+
32
+
After that, enter the environment with
33
+
```bash
34
+
alienv enter MCStepLogger/latest
35
+
```
36
+
and you are good to go.
19
37
20
-
## MCStepLogger
38
+
## MCStepLogger - usage and info
21
39
22
40
3 libraries are built
23
41
24
-
1.MCStepLoggerCore
25
-
2.MCStepLoggerIntercept
26
-
3.MCStepLoggerAnalysis
42
+
1.`libMCStepLoggerCore.so`
43
+
2.`libMCStepLoggerIntercept.so`
44
+
3.`libMCStepLoggerAnalysis.so`
27
45
28
-
The first one contains core classes like `o2::StepInfo` to be used in depending packages and the same is true for the third one which contains analysis specific code.
46
+
The first one contains core functionality to be used in depending packages and the same is true for the third one which contains analysis specific code.
29
47
30
-
The second library `MCStepLoggerIntercept`allows for detailed debug information where stepping can be directed to standard output using the `LD_PRELOAD` env variable, which "injects" this library (which intercepts some calls) in the executable that follows in the command line.
48
+
The second allows for detailed debug information where stepping can be directed to standard output using the `LD_PRELOAD` env variable, which "injects" this library (which intercepts some calls) in the executable that follows in the command line.
Finally the logger can use a map file to give names to some logical grouping of volumes. For instance to map all sensitive volumes from a given detector `DET` to a common label `DET`. That label can then be used to query information about the detector steps "as a whole" when using the `StepLoggerTree` output tree.
`LD_DEBUG=libs` must be replaced by `DYLD_PRINT_LIBRARIES=1`
96
114
97
115
`LD_DEBUG=statistics` must be replaced by `DYLD_PRINT_STATISTICS=1`
98
116
99
117
100
-
## MCStepLogAnalysis
118
+
## Step analysis
101
119
102
120
Information collected and stored in `MCStepLoggerOutput.root` can be further investigated using the excutable `mcStepAnalysis`. This executable is independent of the simulation itself and produces therefore no overhead when running a simulation. 2 commands are so far available (`analyze`, `checkFile`) including useful help message when typing
0 commit comments