Skip to content

Commit 3543aaa

Browse files
[PWGLF] Add globalBC to strangeness data model (#8624)
Co-authored-by: Nicolò Jacazio <njacazio@users.noreply.github.com>
1 parent 4225f70 commit 3543aaa

File tree

4 files changed

+47
-2
lines changed

4 files changed

+47
-2
lines changed

PWGLF/DataModel/LFStrangenessTables.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,14 @@ DECLARE_SOA_TABLE(StraFT0CQVsEv, "AOD", "STRAFT0CQVSEv", //! events used to comp
224224
epcalibrationtable::TriggerEventEP);
225225
DECLARE_SOA_TABLE(StraZDCSP, "AOD", "STRAZDCSP", //! events used to compute the ZDC spectator plane
226226
spcalibrationtable::TriggerEventSP, spcalibrationtable::PsiZDCA, spcalibrationtable::PsiZDCC);
227-
DECLARE_SOA_TABLE(StraStamps, "AOD", "STRASTAMPS", //! information for ID-ing mag field if needed
227+
DECLARE_SOA_TABLE(StraStamps_000, "AOD", "STRASTAMPS", //! information for ID-ing mag field if needed
228228
bc::RunNumber, timestamp::Timestamp);
229+
DECLARE_SOA_TABLE_VERSIONED(StraStamps_001, "AOD", "STRASTAMPS", 1, //! information for ID-ing mag field if needed
230+
bc::RunNumber, timestamp::Timestamp, bc::GlobalBC);
229231

230232
using StraRawCents = StraRawCents_004;
231233
using StraEvSels = StraEvSels_003;
234+
using StraStamps = StraStamps_001;
232235
using StraCollision = StraCollisions::iterator;
233236
using StraCent = StraCents::iterator;
234237

PWGLF/TableProducer/Strangeness/Converters/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,9 @@ o2physics_add_dpl_workflow(v0mlscoresconverter
7272
o2physics_add_dpl_workflow(stramccollisionconverter
7373
SOURCES stramccollisionconverter.cxx
7474
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
75+
COMPONENT_NAME Analysis)
76+
77+
o2physics_add_dpl_workflow(strastampsconverter
78+
SOURCES strastampsconverter.cxx
79+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
7580
COMPONENT_NAME Analysis)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
#include "Framework/runDataProcessing.h"
12+
#include "Framework/AnalysisTask.h"
13+
#include "Framework/AnalysisDataModel.h"
14+
#include "PWGLF/DataModel/LFStrangenessTables.h"
15+
16+
using namespace o2;
17+
using namespace o2::framework;
18+
19+
// Converts Stra Stamps from 000 to 001
20+
struct strastampsconverter {
21+
Produces<aod::StraStamps_001> straStamps_001;
22+
23+
void process(aod::StraStamps_000 const& straStamps_000)
24+
{
25+
for (auto& values : straStamps_000) {
26+
straStamps_001(values.runNumber(),
27+
values.timestamp(),
28+
0 /*dummy globalBC value*/);
29+
}
30+
}
31+
};
32+
33+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
34+
{
35+
return WorkflowSpec{
36+
adaptAnalysisTask<strastampsconverter>(cfgc)};
37+
}

PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ struct strangederivedbuilder {
382382
energyCommonZNA, energyCommonZNC,
383383
// Collision flags
384384
collision.flags());
385-
strangeStamps(bc.runNumber(), bc.timestamp());
385+
strangeStamps(bc.runNumber(), bc.timestamp(), bc.globalBC());
386386
}
387387
for (const auto& v0 : V0Table_thisColl)
388388
V0CollIndices[v0.globalIndex()] = strangeColl.lastIndex();

0 commit comments

Comments
 (0)