Add interface for sim parameters to JSON#8017
Conversation
3b10a38 to
5361213
Compare
|
usage to overwrite from cmd o2-sim <args> --configKeyValues "MaterialManagerParam.inputFile=<path/to/file.json>"to write to o2-sim <args> --configKeyValues "MaterialManagerParam.outputFile=med_params.json"Of course, both The output in {
"module_1": [
{
"local_id": 1,
"global_id": 5,
"medium_name": "med_1_1",
"material_name": "mat_1_1",
"cuts": {
"CUTGAM": 0.1,
"CUTELE": 0.1,
"CUTNEU": 0.1,
"CUTHAD": 0.1,
"CUTMUO": 0.1,
"BCUTE": 0.1,
"BCUTM": 0.1,
"...": 0.1},
"processes": {
"PAIR": 0,
"COMP": 1,
"PHOT": -1,
"PFIS": 1,
"DRAY": 0,
"ANNI": 0,
"BREM": 1,
"...": -1}
},
{
"local_id": 2,
"global_id": 3,
"medium_name": "med_1_2",
"material_name": "mat_1_2",
"cuts": {"...": "..."},
"processes": {"...": "..."}
}
],
"module_N": [
{
"local_id": 10,
"global_id": 50,
"medium_name": "med_N_10",
"material_name": "mat_N_10",
"cuts": {"...": "..."},
"processes": {"...": "..."}
},
{
"local_id": 20,
"global_id": 30,
"medium_name": "med_N_20",
"material_name": "mat_N_20",
"cuts": {"...": "..."},
"processes": {"...": "..."}
}
],
"default":
{
"cuts": {"...": "..."},
"processes": {"...": "..."}
}
"enableSpecialCuts": true,
"enableSpecialProcesses": false
}This can be edited/extended and used again as input as well. The In addition, the latter is extremely useful to be used in parameter optimisation together with the MCReplay engine |
fdf416e to
c39ce4a
Compare
* first step to give cut and process setting from the outside more
structure
* introduce JSON parsing into MaterialManager for that matter
* leave previous interface for now where cuts and processes are set from
bare text files
* introduce configurable params
* MaterialManagerParam.inputFile to pass and overwrite parameters
from JSON
* MaterialManagerParam.outputFile to write parameters used in sim to
JSON for further usage and inspection
* introduced policy:
* parameters set later will overwrite previous settings
* parameters set from MaterialManagerParam.inputFile have highest
priority
* fix typos in helper functions * remove rapidjson dependency from header file
c39ce4a to
7f2f27f
Compare
* change policy to "first come first serve"
* if MaterialManagerParam.inputFile is present via config-key
1) set defaults in gconfig/src/SetCuts.cxx before anything else is set
2) set special in O2MCApplication::InitGeometry before FairModules get
the chance to do so via SetSpecialPhysicsCuts
* two step procedure is necessary because TVirtualMC::SetCut
TVirtualMC::Gstpar have to be called at two different points during
setup
|
as discussed today in the WP12 meeting I will add an additional |
* print medium and material name * add options to enable/disable special cut and process setting
Head branch was pushed to by a user without write access
|
@sawenzel I pushed a typo fix cause it was still waiting for all tests to pass. Then I realised that this commit killed your automerge. CI is green now, could you enable the automerge again or merge it? |
|
The full-CI for this PR is failing due to a missing alien-token for the CCDB access: @TimoWilken : Is this problem already fixed or being taken care of? (Maybe the full-CI merely needs a restart) |
first step to give cut and process setting from the outside more
structure
introduce JSON parsing into MaterialManager for that matter
leave previous interface for now where cuts and processes are set from
bare text files
introduce configurable params
from command line
JSON for further usage and inspection
introduced policy:
parameters set later will overwrite previous settings