Skip to content

Commit af6a0d6

Browse files
authored
Merge fca3012 into sapling-pr-archive-ehellbar
2 parents 3783dba + fca3012 commit af6a0d6

63 files changed

Lines changed: 1462 additions & 604 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/clean-test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ name: Clean PR checks
1919
# Warning: the check_* keys are magic and must consist of the string
2020
# "check_" followed by the applicable check name exactly. The
2121
# "description" field is only the human-readable label for the input.
22-
'check_build/AliceO2/O2/o2/macOS':
23-
description: build/AliceO2/O2/o2/macOS
24-
type: boolean
25-
default: true
2622
'check_build/AliceO2/O2/o2/macOS-arm':
2723
description: build/AliceO2/O2/o2/macOS-arm
2824
type: boolean
@@ -31,8 +27,8 @@ name: Clean PR checks
3127
description: build/O2/fullCI
3228
type: boolean
3329
default: true
34-
'check_build/O2/o2-dataflow-cs8':
35-
description: build/O2/o2-dataflow-cs8
30+
'check_build/O2/o2-dataflow-slc9':
31+
description: build/O2/o2-dataflow-slc9
3632
type: boolean
3733
default: true
3834
'check_build/O2/o2/aarch64':

DataFormats/Detectors/TRD/include/DataFormatsTRD/CalGain.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CalGain
4040
if (!defaultAvg || isGoodGain(iDet))
4141
return mMPVdEdx[iDet];
4242
else {
43-
if (TMath::Abs(mMeanGain + 999.) < 1e-6)
43+
if (std::fabs(mMeanGain + 999.) < 1e-6)
4444
mMeanGain = getAverageGain();
4545
return mMeanGain;
4646
}
@@ -68,7 +68,7 @@ class CalGain
6868

6969
bool isGoodGain(int iDet) const
7070
{
71-
if (TMath::Abs(mMPVdEdx[iDet] - constants::MPVDEDXDEFAULT) > 1e-6)
71+
if (std::fabs(mMPVdEdx[iDet] - constants::MPVDEDXDEFAULT) > 1e-6)
7272
return true;
7373
else
7474
return false;

DataFormats/Detectors/TRD/include/DataFormatsTRD/CalVdriftExB.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CalVdriftExB
4141
if (!defaultAvg || (isGoodExB(iDet) && isGoodVdrift(iDet)))
4242
return mVdrift[iDet];
4343
else {
44-
if (TMath::Abs(mMeanVdrift + 999.) < 1e-6)
44+
if (std::fabs(mMeanVdrift + 999.) < 1e-6)
4545
mMeanVdrift = getAverageVdrift();
4646
return mMeanVdrift;
4747
}
@@ -51,7 +51,7 @@ class CalVdriftExB
5151
if (!defaultAvg || (isGoodExB(iDet) && isGoodVdrift(iDet)))
5252
return mExB[iDet];
5353
else {
54-
if (TMath::Abs(mMeanExB + 999.) < 1e-6)
54+
if (std::fabs(mMeanExB + 999.) < 1e-6)
5555
mMeanExB = getAverageExB();
5656
return mMeanExB;
5757
}
@@ -102,9 +102,9 @@ class CalVdriftExB
102102
// check if value is well calibrated or not
103103
// default calibration if not enough entries
104104
// close to boundaries indicate a failed fit
105-
if (TMath::Abs(mExB[iDet] - constants::EXBDEFAULT) > 1e-6 &&
106-
TMath::Abs(mExB[iDet] - constants::EXBMIN) > 0.01 &&
107-
TMath::Abs(mExB[iDet] - constants::EXBMAX) > 0.01)
105+
if (std::fabs(mExB[iDet] - constants::EXBDEFAULT) > 1e-6 &&
106+
std::fabs(mExB[iDet] - constants::EXBMIN) > 0.01 &&
107+
std::fabs(mExB[iDet] - constants::EXBMAX) > 0.01)
108108
return true;
109109
else
110110
return false;
@@ -115,9 +115,9 @@ class CalVdriftExB
115115
// check if value is well calibrated or not
116116
// default calibration if not enough entries
117117
// close to boundaries indicate a failed fit
118-
if (TMath::Abs(mVdrift[iDet] - constants::VDRIFTDEFAULT) > 1e-6 &&
119-
TMath::Abs(mVdrift[iDet] - constants::VDRIFTMIN) > 0.1 &&
120-
TMath::Abs(mVdrift[iDet] - constants::VDRIFTMAX) > 0.1)
118+
if (std::fabs(mVdrift[iDet] - constants::VDRIFTDEFAULT) > 1e-6 &&
119+
std::fabs(mVdrift[iDet] - constants::VDRIFTMIN) > 0.1 &&
120+
std::fabs(mVdrift[iDet] - constants::VDRIFTMAX) > 0.1)
121121
return true;
122122
else
123123
return false;

Detectors/AOD/include/AODProducerWorkflow/AODProducerWorkflowSpec.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ class AODProducerWorkflowDPL : public Task
283283
TString mAnchorPass{""};
284284
TString mAnchorProd{""};
285285
TString mRecoPass{""};
286+
std::string mAODParent{""}; // link to possible parent AOD file (MC embedding,...)
286287
TString mUser{"aliprod"}; // who created this AOD (aliprod, alidaq, individual users)
287288
TStopwatch mTimer;
288289
bool mEMCselectLeading{false};

Detectors/AOD/src/AODProducerWorkflowSpec.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1818,6 +1818,7 @@ void AODProducerWorkflowDPL::init(InitContext& ic)
18181818
mAnchorProd = ic.options().get<std::string>("anchor-prod");
18191819
mUser = ic.options().get<std::string>("created-by");
18201820
mRecoPass = ic.options().get<std::string>("reco-pass");
1821+
mAODParent = ic.options().get<std::string>("aod-parent");
18211822
mTFNumber = ic.options().get<int64_t>("aod-timeframe-id");
18221823
mRecoOnly = ic.options().get<int>("reco-mctracks-only");
18231824
mTruncate = ic.options().get<int>("enable-truncation");
@@ -2615,7 +2616,7 @@ void AODProducerWorkflowDPL::run(ProcessingContext& pc)
26152616
pc.outputs().snapshot(Output{"AMD", "AODMetadataVals", 0}, mMetaDataVals);
26162617

26172618
pc.outputs().snapshot(Output{"TFN", "TFNumber", 0}, tfNumber);
2618-
pc.outputs().snapshot(Output{"TFF", "TFFilename", 0}, "");
2619+
pc.outputs().snapshot(Output{"TFF", "TFFilename", 0}, mAODParent);
26192620

26202621
mTimer.Stop();
26212622
}
@@ -3485,6 +3486,7 @@ DataProcessorSpec getAODProducerWorkflowSpec(GID::mask_t src, bool enableSV, boo
34853486
ConfigParamSpec{"anchor-pass", VariantType::String, "", {"AnchorPassName"}},
34863487
ConfigParamSpec{"anchor-prod", VariantType::String, "", {"AnchorProduction"}},
34873488
ConfigParamSpec{"reco-pass", VariantType::String, "", {"RecoPassName"}},
3489+
ConfigParamSpec{"aod-parent", VariantType::String, "", {"Parent AOD file name (if any)"}},
34883490
ConfigParamSpec{"created-by", VariantType::String, "", {"Who created this AO2D"}},
34893491
ConfigParamSpec{"nthreads", VariantType::Int, std::max(1, int(std::thread::hardware_concurrency() / 2)), {"Number of threads"}},
34903492
ConfigParamSpec{"reco-mctracks-only", VariantType::Int, 0, {"Store only reconstructed MC tracks and their mothers/daughters. 0 -- off, != 0 -- on"}},

Detectors/Base/test/buildMatBudLUT.C

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ o2::base::MatLayerCylSet mbLUT;
2929

3030
bool testMBLUT(const std::string& lutFile = "matbud.root");
3131

32-
bool buildMatBudLUT(int nTst = 30, int maxLr = -1, const std::string& outFile = "matbud.root", const std::string& geomNamePrefix = "o2sim", const std::string& opts = "");
32+
bool buildMatBudLUT(int nTst = 60, int maxLr = -1, const std::string& outFile = "matbud.root", const std::string& geomName = "o2sim_geometry-aligned.root");
3333

3434
struct LrData {
3535
float rMin = 0.f;
@@ -306,23 +306,26 @@ void configLayers()
306306
zBin = 10.;
307307
rphiBin = lrData.back().rMax * TMath::Pi() * 2 / 18;
308308
lrData.emplace_back(LrData(lrData.back().rMax, 56.5, zSpanH, zBin, rphiBin));
309+
310+
//------------------------------------
311+
zBin = 1.;
309312
rphiBin = lrData.back().rMax * TMath::Pi() * 2 / 18;
310313
lrData.emplace_back(LrData(lrData.back().rMax, 60.5, zSpanH, zBin, rphiBin));
311314
rphiBin = lrData.back().rMax * TMath::Pi() * 2 / 18;
312315
lrData.emplace_back(LrData(lrData.back().rMax, 61.5, zSpanH, zBin, rphiBin));
313316

314317
zSpanH = 150.f;
315-
drStep = 3.5;
316-
zBin = 15.;
318+
drStep = 2;
319+
zBin = 1.;
317320
do {
318321
auto rmean = lrData.back().rMax + drStep / 2;
319322
rphiBin = rmean * TMath::Pi() * 2 / (NSect * 2);
320323
lrData.emplace_back(LrData(lrData.back().rMax, lrData.back().rMax + drStep, zSpanH, zBin, rphiBin));
321324
} while (lrData.back().rMax < 68.5 - kToler);
322325

323326
zSpanH = 250.f;
324-
zBin = 25.;
325-
rphiBin = 5;
327+
zBin = 1.;
328+
rphiBin = 2.5;
326329
{
327330
auto rmean = (lrData.back().rMax + 76) / 2.;
328331
rphiBin = rmean * TMath::Pi() * 2 / (NSect * 2);

Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/src/TPCInterpolationSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ DataProcessorSpec getTPCInterpolationSpec(GTrackID::mask_t srcCls, GTrackID::mas
206206
AlgorithmSpec{adaptFromTask<TPCInterpolationDPL>(dataRequest, srcTrk, srcTrkMap, ggRequest, useMC, processITSTPConly, sendTrackData, debugOutput, extDetResid)},
207207
Options{
208208
{"matCorrType", VariantType::Int, 2, {"material correction type (definition in Propagator.h)"}},
209-
{"sec-per-slot", VariantType::UInt32, 600u, {"number of seconds per calibration time slot (put 0 for infinite slot length)"}},
209+
{"sec-per-slot", VariantType::UInt32, 300u, {"number of seconds per calibration time slot (put 0 for infinite slot length)"}},
210210
{"process-seeds", VariantType::Bool, false, {"do not remove duplicates, e.g. for ITS-TPC-TRD track also process its seeding ITS-TPC part"}}}};
211211
}
212212

Detectors/MUON/MID/Workflow/include/MIDWorkflow/ColumnDataSpecsUtils.h

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,28 @@ namespace mid
4242
namespace specs
4343
{
4444

45-
/// Returns the input specs for MID Column Data and corresponding ROFs and labels
45+
/// Returns the input specs for MID Column Data and corresponding ROFs and labels for EventType Standard
4646
/// \param dataBind Data binding name
4747
/// \param dataDesc Input data description
4848
/// \param useMC Builds output specs for labels
4949
/// \return Vector of input specs
50-
std::vector<framework::InputSpec> buildInputSpecs(std::string_view dataBind, std::string_view dataDesc, bool useMC);
50+
std::vector<framework::InputSpec> buildStandardInputSpecs(std::string_view dataBind, std::string_view dataDesc, bool useMC);
5151

52-
/// Returns the input specs for MID Column Data and corresponding ROFs and labels
52+
/// Returns the input specs for MID Column Data and corresponding ROFs and labels for EventType Standard
5353
/// \param dataBind Data binding name
5454
/// \param dataDesc Input data description
5555
/// \param rofDesc Input ROF record description
5656
/// \param labelsDesc Input MC labels description
5757
/// \param useMC Builds output specs for labels
5858
/// \return Vector of input specs
59-
std::vector<framework::InputSpec> buildInputSpecs(std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc, std::string_view labelsDesc, bool useMC);
59+
std::vector<framework::InputSpec> buildStandardInputSpecs(std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc, std::string_view labelsDesc, bool useMC);
60+
61+
/// Returns the input specs for MID Column Data and corresponding ROFs and labels for all three EventTypes
62+
/// \param dataBind Data binding name
63+
/// \param dataDesc Input data description
64+
/// \param rofDesc Input ROF record description
65+
/// \return Vector of input specs
66+
std::vector<framework::InputSpec> buildInputSpecs(std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc);
6067

6168
/// Returns the output specs for the different event types
6269
/// \param bind Binding name
@@ -71,30 +78,22 @@ std::vector<framework::OutputSpec> buildOutputSpecs(std::string_view bind, std::
7178
/// \return Vector of Output specs
7279
std::vector<framework::OutputSpec> buildStandardOutputSpecs(std::string_view dataBind, std::string_view dataDesc, bool useMC);
7380

74-
/// Returns the inputs for the different event types
81+
/// Returns the input matching a specific binding
7582
/// \param pc Processing context
7683
/// \param bind Binding name
7784
/// \return Array of spans
7885
template <typename T>
79-
std::array<gsl::span<const T>, NEvTypes> getInput(framework::ProcessingContext& pc, std::string_view bind)
86+
gsl::span<const T> getInput(framework::ProcessingContext& pc, std::string_view bind, int subSpec = -1)
8087
{
81-
std::array<gsl::span<const T>, 3> data;
82-
for (auto const& inputRef : framework::InputRecordWalker(pc.inputs())) {
83-
auto const* dh = framework::DataRefUtils::getHeader<o2::header::DataHeader*>(inputRef);
84-
auto subSpecIdx = static_cast<size_t>(dh->subSpecification);
85-
if (framework::DataRefUtils::match(inputRef, bind.data())) {
86-
data[subSpecIdx] = pc.inputs().get<gsl::span<T>>(inputRef);
87-
}
88-
}
89-
return data;
88+
return pc.inputs().get<gsl::span<T>>(fmt::format("{}{}", bind.data(), subSpec >= 0 ? fmt::format("_{}", subSpec) : ""));
9089
}
9190

9291
/// Gets the outputs
9392
/// \param outputSpecs Vector of output specs
9493
/// \return vector of outputs
9594
std::vector<framework::Output> buildOutputs(std::vector<framework::OutputSpec> outputSpecs);
9695

97-
/// Returns the array of Column Data
96+
/// Returns the array of Column Data for all three EventTypes
9897
/// \param pc Processing context
9998
/// \param dataBind Data binding name
10099
/// \return Array of Column Data spans
@@ -107,7 +106,7 @@ std::array<gsl::span<const ColumnData>, NEvTypes> getData(framework::ProcessingC
107106
/// \return Span of ColumnData
108107
gsl::span<const ColumnData> getData(framework::ProcessingContext& pc, std::string_view dataBind, EventType eventType);
109108

110-
/// Returns the array of ROF records
109+
/// Returns the array of ROF records for all three EventTypes
111110
/// \param pc Processing context
112111
/// \param dataBind Data binding name
113112
/// \return Array of ROF Records spans
@@ -124,7 +123,7 @@ gsl::span<const ROFRecord> getRofs(framework::ProcessingContext& pc, std::string
124123
/// \param pc Processing context
125124
/// \param dataBind Data binding name
126125
/// \return Pointer to MC labels
127-
std::unique_ptr<const o2::dataformats::MCTruthContainer<MCLabel>> getLabels(framework::ProcessingContext& pc, std::string_view dataBind);
126+
std::unique_ptr<const o2::dataformats::MCTruthContainer<MCLabel>> getLabels(framework::ProcessingContext& pc, std::string_view dataBind, EventType eventType = EventType::Standard);
128127

129128
} // namespace specs
130129
} // namespace mid

Detectors/MUON/MID/Workflow/src/CalibDataProcessorSpec.cxx

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,9 @@ class CalibDataProcessorDPL
6161
std::array<gsl::span<const ColumnData>, 3> data;
6262
std::array<gsl::span<const ROFRecord>, 3> dataRof;
6363

64-
std::vector<of::InputSpec> filter = {
65-
{"check_data", of::ConcreteDataTypeMatcher{header::gDataOriginMID, "DATA"}, of::Lifetime::Timeframe},
66-
{"check_rof", of::ConcreteDataTypeMatcher{header::gDataOriginMID, "DATAROF"}, of::Lifetime::Timeframe},
67-
};
68-
69-
for (auto const& inputRef : of::InputRecordWalker(pc.inputs(), filter)) {
70-
auto const* dh = framework::DataRefUtils::getHeader<o2::header::DataHeader*>(inputRef);
71-
auto subSpecIdx = static_cast<size_t>(dh->subSpecification);
72-
if (of::DataRefUtils::match(inputRef, "mid_data")) {
73-
data[subSpecIdx] = pc.inputs().get<gsl::span<o2::mid::ColumnData>>(inputRef);
74-
} else if (of::DataRefUtils::match(inputRef, "mid_data_rof")) {
75-
dataRof[subSpecIdx] = pc.inputs().get<gsl::span<o2::mid::ROFRecord>>(inputRef);
76-
}
64+
for (o2::header::DataHeader::SubSpecificationType subSpec = 0; subSpec < NEvTypes; ++subSpec) {
65+
data[subSpec] = pc.inputs().get<gsl::span<o2::mid::ColumnData>>(fmt::format("mid_data_{}", subSpec));
66+
dataRof[subSpec] = pc.inputs().get<gsl::span<o2::mid::ROFRecord>>(fmt::format("mid_data_rof_{}", subSpec));
7767
}
7868

7969
mNoise.clear();
@@ -151,8 +141,10 @@ class CalibDataProcessorDPL
151141
of::DataProcessorSpec getCalibDataProcessorSpec(const FEEIdConfig& feeIdConfig, const CrateMasks& crateMasks)
152142
{
153143
std::vector<of::InputSpec> inputSpecs;
154-
inputSpecs.emplace_back("mid_data", of::ConcreteDataTypeMatcher(header::gDataOriginMID, "DATA"), of::Lifetime::Timeframe);
155-
inputSpecs.emplace_back("mid_data_rof", of::ConcreteDataTypeMatcher(header::gDataOriginMID, "DATAROF"), of::Lifetime::Timeframe);
144+
for (o2::header::DataHeader::SubSpecificationType subSpec = 0; subSpec < NEvTypes; ++subSpec) {
145+
inputSpecs.emplace_back(fmt::format("mid_data_{}", subSpec), header::gDataOriginMID, "DATA", subSpec, of::Lifetime::Timeframe);
146+
inputSpecs.emplace_back(fmt::format("mid_data_rof_{}", subSpec), header::gDataOriginMID, "DATAROF", subSpec, of::Lifetime::Timeframe);
147+
}
156148

157149
std::vector<of::OutputSpec> outputSpecs;
158150
outputSpecs.emplace_back(header::gDataOriginMID, "NOISE", 0);

Detectors/MUON/MID/Workflow/src/ClusterizerSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ framework::DataProcessorSpec getClusterizerSpec(bool isMC, std::string_view inDa
132132
if (isMC) {
133133
outputSpecs.emplace_back(of::OutputSpec{header::gDataOriginMID, "CLUSTERSLABELS"});
134134
}
135-
auto inputSpecs = specs::buildInputSpecs("mid_cluster_in", inDataDesc, inRofDesc, inLabelsDesc, isMC);
135+
auto inputSpecs = specs::buildStandardInputSpecs("mid_cluster_in", inDataDesc, inRofDesc, inLabelsDesc, isMC);
136136

137137
return of::DataProcessorSpec{
138138
"MIDClusterizer",

0 commit comments

Comments
 (0)