Skip to content

Commit

Permalink
FT0/FV0/TPC: adding workflows for integrated currents
Browse files Browse the repository at this point in the history
FT0,FV0,TPC: The workflows for the integrated currents are analog to the worfklows for the TOF (integration of the cluster, writing of the clusters to file, reading in the clusters and merging the clusters to contigous intervals)
- integrated currents can be stored in the CCDB or in local files
- see for the TOF PR for further details AliceO2Group#10608
- examples of the integrated currents and use case for FT0,FV0,TOF,TPC https://indico.cern.ch/event/1237926/contributions/5251727/attachments/2585970/4461305/ATO-615O2%20Multiplicity%20counters%20-%20normalization%20and%20interactive%20visualization-3.pdf

TOF
- templating TOFIntegratedClusterCalibrator to be able to use the same calibratior for different detectors
- Adding filtering of noise during integration of currents
- Add option to store calibration objects to local files

TPC:
- IDCFactorization: parallelising writing of files for speed up
- removing unneded code for integrated clusters which was in the IDC chain
- Integrated cluster processing can be done in 1D (faster, less memory consumption, outliers e.g. out-of-sync FECs are not taken into account) or in 3D (outliers taken into account)

Running the workflows for all the currents from list of input files:

ARGS_ALL="--shm-segment-size 50000000000"
o2-ctf-reader-workflow --copy-cmd no-copy  --onlyDet FT0,FV0,TOF,TPC --ctf-input "list.txt" --severity warning $ARGS_ALL \
| o2-ft0-reco-workflow --disable-mc --disable-root-input --disable-root-output \
| o2-ft0-integrate-cluster-workflow --disable-root-output \
| o2-fv0-reco-workflow --disable-mc --disable-root-input --disable-root-output \
| o2-fv0-integrate-cluster-workflow --disable-root-output \
| o2-ft0-merge-integrate-cluster-workflow --dump-calib-data --meta-output-dir none \
| o2-fv0-merge-integrate-cluster-workflow --dump-calib-data --meta-output-dir none \
| o2-tof-reco-workflow --input-type none --output-type "clusters" --disable-mc --disable-root-output $ARGS_ALL \
| o2-tof-integrate-cluster-workflow --disable-root-output \
| o2-tof-merge-integrate-cluster-workflow --dump-calib-data --meta-output-dir none \
| o2-tpc-reco-workflow --input-type compressed-clusters-ctf --output-type "clusters,disable-writer" --disable-mc \
| o2-tpc-integrate-cluster-workflow $ARGS_ALL --disable-root-output \
| o2-tpc-merge-integrate-cluster-workflow --dump-calib-data --meta-output-dir none --nthreads 32 --enableWritingPadStatusMap -b
  • Loading branch information
matthias-kleiner committed Feb 3, 2023
1 parent ef91066 commit 3bbd42a
Show file tree
Hide file tree
Showing 45 changed files with 2,368 additions and 351 deletions.
16 changes: 16 additions & 0 deletions Detectors/FIT/FT0/workflow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ o2_add_executable(recpoints-reader-workflow
SOURCES src/recpoints-reader-workflow.cxx
COMPONENT_NAME ft0
PUBLIC_LINK_LIBRARIES O2::FT0Workflow)

o2_add_executable(integrate-cluster-workflow
SOURCES src/cluster-integrator.cxx
COMPONENT_NAME ft0
PUBLIC_LINK_LIBRARIES O2::FT0Workflow O2::FITWorkflow)

o2_add_executable(integrate-cluster-reader-workflow
SOURCES src/cluster-integrator-reader.cxx
COMPONENT_NAME ft0
PUBLIC_LINK_LIBRARIES O2::FT0Workflow O2::FITWorkflow)

o2_add_executable(merge-integrate-cluster-workflow
SOURCES src/cluster-merge-integrator.cxx
COMPONENT_NAME ft0
PUBLIC_LINK_LIBRARIES O2::FT0Workflow O2::FITWorkflow)

if(NOT APPLE)

set_property(TARGET ${fitrecoexe} PROPERTY LINK_WHAT_YOU_USE ON)
Expand Down
23 changes: 23 additions & 0 deletions Detectors/FIT/FT0/workflow/src/cluster-integrator-reader.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "FITWorkflow/FITIntegrateClusterReaderSpec.h"
#include "DataFormatsFT0/RecPoints.h"
#include "Framework/runDataProcessing.h"

using namespace o2::framework;

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
WorkflowSpec wf;
wf.emplace_back(o2::fit::getFITIntegrateClusterReaderSpec<o2::ft0::RecPoints>());
return wf;
}
44 changes: 44 additions & 0 deletions Detectors/FIT/FT0/workflow/src/cluster-integrator.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "FITWorkflow/FITIntegrateClusterSpec.h"
#include "DataFormatsFT0/RecPoints.h"
#include "FITWorkflow/FITIntegrateClusterWriterSpec.h"
#include "CommonUtils/ConfigurableParam.h"
#include "Framework/ConfigParamSpec.h"

using namespace o2::framework;

void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{
std::vector<ConfigParamSpec> options{
ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
{"min-NChan", VariantType::Int, 0, {"Minimum NChan signal required to avoid noise"}},
{"min-Ampl", VariantType::Int, 0, {"Minimum Ampl signal required to avoid noise"}},
{"disable-root-output", VariantType::Bool, false, {"disable root-files output writers"}}};
std::swap(workflowOptions, options);
}

#include "Framework/runDataProcessing.h"

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
WorkflowSpec wf;
o2::conf::ConfigurableParam::updateFromString(cfgc.options().get<std::string>("configKeyValues"));
const bool disableWriter = cfgc.options().get<bool>("disable-root-output");
const int minNChan = cfgc.options().get<int>("min-NChan");
const int minAmpl = cfgc.options().get<int>("min-Ampl");
wf.emplace_back(o2::fit::getFITIntegrateClusterSpec<o2::ft0::RecPoints>(disableWriter, minNChan, minAmpl));
if (!disableWriter) {
wf.emplace_back(o2::fit::getFITIntegrateClusterWriterSpec<o2::ft0::RecPoints>());
}
return wf;
}
33 changes: 33 additions & 0 deletions Detectors/FIT/FT0/workflow/src/cluster-merge-integrator.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "FITWorkflow/FITMergeIntegrateClusterSpec.h"
#include "DataFormatsFT0/RecPoints.h"
#include "CommonUtils/ConfigurableParam.h"
#include "Framework/ConfigParamSpec.h"

using namespace o2::framework;

void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{
std::vector<ConfigParamSpec> options{
ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
};
std::swap(workflowOptions, options);
}

#include "Framework/runDataProcessing.h"

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
WorkflowSpec wf;
o2::conf::ConfigurableParam::updateFromString(cfgc.options().get<std::string>("configKeyValues"));
wf.emplace_back(o2::fit::getFITMergeIntegrateClusterSpec<o2::ft0::RecPoints>());
return wf;
}
15 changes: 15 additions & 0 deletions Detectors/FIT/FV0/workflow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ o2_add_executable(flp-dpl-workflow
PUBLIC_LINK_LIBRARIES O2::FV0Workflow O2::FITWorkflow O2::FV0Raw
TARGETVARNAME fv0flpexe)

o2_add_executable(integrate-cluster-workflow
SOURCES src/cluster-integrator.cxx
COMPONENT_NAME fv0
PUBLIC_LINK_LIBRARIES O2::FV0Workflow O2::FITWorkflow)

o2_add_executable(integrate-cluster-reader-workflow
SOURCES src/cluster-integrator-reader.cxx
COMPONENT_NAME fv0
PUBLIC_LINK_LIBRARIES O2::FV0Workflow O2::FITWorkflow)

o2_add_executable(merge-integrate-cluster-workflow
SOURCES src/cluster-merge-integrator.cxx
COMPONENT_NAME fv0
PUBLIC_LINK_LIBRARIES O2::FV0Workflow O2::FITWorkflow)

if(NOT APPLE)

set_property(TARGET ${fitrecoexe} PROPERTY LINK_WHAT_YOU_USE ON)
Expand Down
23 changes: 23 additions & 0 deletions Detectors/FIT/FV0/workflow/src/cluster-integrator-reader.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "FITWorkflow/FITIntegrateClusterReaderSpec.h"
#include "DataFormatsFV0/RecPoints.h"
#include "Framework/runDataProcessing.h"

using namespace o2::framework;

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
WorkflowSpec wf;
wf.emplace_back(o2::fit::getFITIntegrateClusterReaderSpec<o2::fv0::RecPoints>());
return wf;
}
44 changes: 44 additions & 0 deletions Detectors/FIT/FV0/workflow/src/cluster-integrator.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "FITWorkflow/FITIntegrateClusterSpec.h"
#include "FITWorkflow/FITIntegrateClusterWriterSpec.h"
#include "CommonUtils/ConfigurableParam.h"
#include "Framework/ConfigParamSpec.h"
#include "DataFormatsFV0/RecPoints.h"

using namespace o2::framework;

void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{
std::vector<ConfigParamSpec> options{
ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
{"min-NChan", VariantType::Int, 2, {"Minimum NChan signal required to avoid noise"}},
{"min-Ampl", VariantType::Int, 2, {"Minimum Ampl signal required to avoid noise"}},
{"disable-root-output", VariantType::Bool, false, {"disable root-files output writers"}}};
std::swap(workflowOptions, options);
}

#include "Framework/runDataProcessing.h"

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
WorkflowSpec wf;
o2::conf::ConfigurableParam::updateFromString(cfgc.options().get<std::string>("configKeyValues"));
const bool disableWriter = cfgc.options().get<bool>("disable-root-output");
const int minNChan = cfgc.options().get<int>("min-NChan");
const int minAmpl = cfgc.options().get<int>("min-Ampl");
wf.emplace_back(o2::fit::getFITIntegrateClusterSpec<o2::fv0::RecPoints>(disableWriter, minNChan, minAmpl));
if (!disableWriter) {
wf.emplace_back(o2::fit::getFITIntegrateClusterWriterSpec<o2::fv0::RecPoints>());
}
return wf;
}
33 changes: 33 additions & 0 deletions Detectors/FIT/FV0/workflow/src/cluster-merge-integrator.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "FITWorkflow/FITMergeIntegrateClusterSpec.h"
#include "DataFormatsFV0/RecPoints.h"
#include "CommonUtils/ConfigurableParam.h"
#include "Framework/ConfigParamSpec.h"

using namespace o2::framework;

void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{
std::vector<ConfigParamSpec> options{
ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
};
std::swap(workflowOptions, options);
}

#include "Framework/runDataProcessing.h"

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
WorkflowSpec wf;
o2::conf::ConfigurableParam::updateFromString(cfgc.options().get<std::string>("configKeyValues"));
wf.emplace_back(o2::fit::getFITMergeIntegrateClusterSpec<o2::fv0::RecPoints>());
return wf;
}
9 changes: 8 additions & 1 deletion Detectors/FIT/workflow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ o2_add_library(FITWorkflow
SOURCES src/FITDataReaderDPLSpec.cxx
src/FITDigitWriterSpec.cxx
src/RawReaderFIT.cxx
src/FITIntegrateClusterReaderSpec.cxx
src/FITIntegrateClusterSpec.cxx
src/FITIntegrateClusterWriterSpec.cxx
src/FITMergeIntegrateClusterSpec.cxx
PUBLIC_LINK_LIBRARIES O2::Framework
O2::DetectorsCommonDataFormats
O2::DPLUtils
O2::FITRaw)
O2::FITRaw
O2::DetectorsBase
O2::Algorithm
O2::TOFWorkflowUtils)
Loading

0 comments on commit 3bbd42a

Please sign in to comment.