diff --git a/Detectors/Upgrades/ITS3/README.md b/Detectors/Upgrades/ITS3/README.md index 145fb0712e039..6d3b0d8d821fb 100644 --- a/Detectors/Upgrades/ITS3/README.md +++ b/Detectors/Upgrades/ITS3/README.md @@ -20,7 +20,7 @@ The run number is needed to retrieve objects from the CCDB. There are specific r - 311901—311999 _Note: For now the same topology dictionary will be used for both collision-systems_ -_Last Update of file here (jira)[https://its.cern.ch/jira/browse/O2-4698]_ +_Last Update of file here (jira)[https://its.cern.ch/jira/browse/O2-5293]_ ## Simulation @@ -42,12 +42,16 @@ Simulate diamond ### Local Tracking +0. Optionally, if not provided in the ccdb + +Create the general run parameters, see _GRPECS_. + 1. Simulate Simulate PIPE and ITS3 ```bash -o2-sim -g pythia8pp -j10 -m PIPE IT3 --run 303901 -n1000 +o2-sim -g pythia8pp --detectorList ALICE2.1 -m PIPE IT3 --run 303901 -n1000 --field ccdb ``` In the previous command: @@ -60,7 +64,7 @@ In the previous command: 2. Digitization ```bash -o2-sim-digitizer-workflow -b --interactionRate 50000 --run --configKeyValues="HBFUtils.runNumber=303901;" --onlyDet IT3 +o2-sim-digitizer-workflow -b --interactionRate 500000 --run --configKeyValues="HBFUtils.runNumber=303901;" --onlyDet IT3 root -x -l ${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CheckDigitsITS3.C++ ``` @@ -74,13 +78,7 @@ root -x -l ${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CheckT ### Global Tracking -1. Simulate - -Simulate all detectors but replacing ITS with IT3 - -```bash -o2-sim -g pythia8pp -j10 --detectorList ALICE2.1 --run 303901 -n20 -m IT3 -``` +TODO ## Creating CCDB Objects @@ -131,6 +129,12 @@ root -x -l '${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/Compa root -x -l '${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CheckClusterSize.C++("o2clus_its.root", "o2sim_Kine.root", "IT3dictionary.root", false)' ``` +### GRPECS + +``` bash +o2-grp-simgrp-tool createGRPs --detectorList ALICE2.1 --run 303901 --bcPatternFile bcPattern.root --hbfpertf 128 --field -5 --publishto ccdb +``` + ### Using external generators based on AliRoot It is also possible to simulate heavy-ion collision using external generators based on AliRoot. In this case, it is necessary to load both O2 and AliROOT (the order is important): diff --git a/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/RecoWorkflow.h b/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/RecoWorkflow.h index 81dbf3c9f432b..bac8a128c5b39 100644 --- a/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/RecoWorkflow.h +++ b/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/RecoWorkflow.h @@ -30,7 +30,8 @@ framework::WorkflowSpec getWorkflow(bool useMC, bool upstreamClusters, bool disableRootOutput, bool useGeom, - int useTrig); + int useTrig, + bool overrideBeamPosition); } #endif diff --git a/Detectors/Upgrades/ITS3/workflow/src/RecoWorkflow.cxx b/Detectors/Upgrades/ITS3/workflow/src/RecoWorkflow.cxx index 5b884fdc677eb..721ef36335631 100644 --- a/Detectors/Upgrades/ITS3/workflow/src/RecoWorkflow.cxx +++ b/Detectors/Upgrades/ITS3/workflow/src/RecoWorkflow.cxx @@ -21,7 +21,7 @@ namespace o2::its3::reco_workflow { framework::WorkflowSpec getWorkflow(bool useMC, const std::string& trmode, o2::gpu::GPUDataTypes::DeviceType dtype, - bool upstreamDigits, bool upstreamClusters, bool disableRootOutput, bool useGeom, int useTrig) + bool upstreamDigits, bool upstreamClusters, bool disableRootOutput, bool useGeom, int useTrig, bool overrideBeamPosition) { framework::WorkflowSpec specs; @@ -38,8 +38,7 @@ framework::WorkflowSpec getWorkflow(bool useMC, const std::string& trmode, o2::g } if (trmode != "off") { - LOGP(info, "Active tracking: '{}'", trmode); - specs.emplace_back(o2::its3::getTrackerSpec(useMC, useGeom, useTrig, trmode, dtype)); + specs.emplace_back(o2::its3::getTrackerSpec(useMC, useGeom, useTrig, trmode, overrideBeamPosition, dtype)); if (!disableRootOutput) { specs.emplace_back(o2::its3::getTrackWriterSpec(useMC)); diff --git a/Detectors/Upgrades/ITS3/workflow/src/its3-reco-workflow.cxx b/Detectors/Upgrades/ITS3/workflow/src/its3-reco-workflow.cxx index 48dfb158a80d9..b8aec2541d31f 100644 --- a/Detectors/Upgrades/ITS3/workflow/src/its3-reco-workflow.cxx +++ b/Detectors/Upgrades/ITS3/workflow/src/its3-reco-workflow.cxx @@ -43,12 +43,12 @@ void customize(std::vector& workflowOptions) {"clusters-from-upstream", o2::framework::VariantType::Bool, false, {"clusters will be provided from upstream, skip clusterizer"}}, {"disable-root-output", o2::framework::VariantType::Bool, false, {"do not write output root files"}}, {"disable-mc", o2::framework::VariantType::Bool, false, {"disable MC propagation even if available"}}, + {"ccdb-meanvertex-seed", o2::framework::VariantType::Bool, false, {"use MeanVertex from CCDB if available to provide beam position seed (default: false)"}}, {"select-with-triggers", o2::framework::VariantType::String, "none", {"use triggers to prescale processed ROFs: phys, trd, none"}}, {"tracking-mode", o2::framework::VariantType::String, "off", {"off,sync,async,cosmics"}}, - {"entropy-encoding", o2::framework::VariantType::Bool, false, {"produce entropy encoded data"}}, {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}, {"use-full-geometry", o2::framework::VariantType::Bool, false, {"use full geometry instead of the light-weight IT3 part"}}, - {"gpuDevice", o2::framework::VariantType::Int, 1, {"use gpu device: CPU=1,CUDA=2,HIP=3 (default: CPU)"}}}; + {"gpu-device", o2::framework::VariantType::Int, 1, {"use gpu device: CPU=1,CUDA=2,HIP=3 (default: CPU)"}}}; o2::raw::HBFUtilsInitializer::addConfigOption(options); std::swap(workflowOptions, options); } @@ -59,9 +59,10 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) { // Update the (declared) parameters if changed from the command line auto useMC = !configcontext.options().get("disable-mc"); + auto beamPosOVerride = configcontext.options().get("ccdb-meanvertex-seed"); auto trmode = configcontext.options().get("tracking-mode"); auto selTrig = configcontext.options().get("select-with-triggers"); - auto gpuDevice = static_cast(configcontext.options().get("gpuDevice")); + auto gpuDevice = static_cast(configcontext.options().get("gpu-device")); auto extDigits = configcontext.options().get("digits-from-upstream"); auto extClusters = configcontext.options().get("clusters-from-upstream"); auto disableRootOutput = configcontext.options().get("disable-root-output"); @@ -79,7 +80,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) LOG(fatal) << "Unknown trigger type requested for events prescaling: " << selTrig; } } - auto wf = o2::its3::reco_workflow::getWorkflow(useMC, trmode, gpuDevice, extDigits, extClusters, disableRootOutput, useGeom, trType); + auto wf = o2::its3::reco_workflow::getWorkflow(useMC, trmode, gpuDevice, extDigits, extClusters, disableRootOutput, useGeom, trType, beamPosOVerride); // configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit o2::raw::HBFUtilsInitializer hbfIni(configcontext, wf);