Skip to content

Commit

Permalink
Update material info and G4 x-section scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Volkel committed Jan 31, 2024
1 parent 1d0ece2 commit 99b02b6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docs/transport/engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ title: Transport engines

## GEANT4

Information about GEANT4.
### Scaling hadronic cross sections

Hadronic cross sections can be scaled by passing a specific Geant4 configuration to the transport simulation.
[This is an example](https://github.com/AliceO2Group/O2DPG/blob/eb3591632fe75ba65ff68353984839c22826a89c/MC/config/PWGLF/xsection/g4config_had_x2.in#L66-L72) where various hadronic cross sections are scaled.

## FLUKA

Expand Down
34 changes: 31 additions & 3 deletions docs/transport/geometry.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,30 @@ geoMgr->GetTopVolume()->Draw();

This can of course also be done in an interactive ROOT session.

## Material densities

Material densities can be changed at runtime from the outside. There is a global setting as well as a setting **per module**.
The local settings take precedence over the global setting.
The default for all parameters is `1`.

To scale the overall density of the geometry by a factor 2, for instance, run the simulation with
```bash
o2-sim <args> --configKeyValues "SimMaterialParams.globalDensityFactor=2"
```

To scale densities per module, on can do so for instance for the TPC and ITS by running the simulation like
```bash
o2-sim <args> --configKeyValues "SimMaterialParams.localDensityFactor=ITS:1.5,TPC:1.2"
```


## Medium properties

As mentioned, a medium defines the physical properties of a volume. These are defined in the code and usually, these properties cannot be changed at runtime.
As mentioned, a medium defines the physical properties of a volume. Some of them can be changed at runtime as shown in the following.

### Energy thresholds

However, there are some additional properties that can be modified at runtime. An important type of those properties are production cut thresholds for particles. When a particle traverses the detector, a certain interaction with the material (also called physics process) can lead to the production of secondary particles.
When a particle traverses the detector, a certain interaction with the material (also called physics process) can lead to the production of secondary particles.
In reality, all of those particles would be produced, however, in simulation one has the possibility to suppress the production of particles below a certain energy threshold. The following cut parameters are available:
* `CUTGAM`: gammas,
* `CUTELE`: electrons,
Expand All @@ -38,7 +57,7 @@ They are set globally [here](https://github.com/AliceO2Group/AliceO2/blob/dev/De

It is possible to set specific parameters for each medium. For most modules, there exists a text file which is parsed at runtime. As an example, the files for the passive modules are [here](https://github.com/AliceO2Group/AliceO2/tree/dev/Detectors/Passive/data).

It is also possible to change parameters on the fly. To do so, we first extract a JSON file with all current parameters.
It is also possible to change parameters on the fly. To do so, first extract a JSON file with all current parameters.
```bash
o2-sim-serial -n0 --configKeyValues "MaterialManagerParam.outputFile=o2_medium_params.json"
```
Expand All @@ -47,6 +66,15 @@ This will leave you with the `o2_medium_params.json`. It contains all media per
o2-sim --configKeyValues "MaterialManagerParam.inputFile=o2_medium_params_modified.json" [<further_arguments>]
```

### Special controls

Some physics processes can be switched on or off. The global default settings are [here](https://github.com/AliceO2Group/AliceO2/blob/dev/Detectors/gconfig/src/SetCuts.cxx).

In the same way as the energy thresholds, they can also be tweaked at runtime by manipulating a `o2_medium_params.json` and re-inject it.

**IMPORTANT NOTE**: At the moment, any local changes on the special controls per medium take no effect when using Geant4. Only the **global settings** will affect the behaviour of the transport code


## Magnetic field

**...under construction...**

0 comments on commit 99b02b6

Please sign in to comment.