Skip to content

Commit 27f6079

Browse files
authored
Merge branch 'master' into DstarInPbPb
2 parents 93de77d + 966e7c4 commit 27f6079

File tree

395 files changed

+31496
-10924
lines changed

Some content is hidden

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

395 files changed

+31496
-10924
lines changed

ALICE3/DataModel/OTFMulticharm.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,24 +116,24 @@ DECLARE_SOA_TABLE(MCharmCores, "AOD", "MCharmCores",
116116
otfmulticharm::Eta,
117117

118118
otfmulticharm::XiDCAxy,
119-
otfmulticharm::XicDCAxy,
120-
otfmulticharm::XiccDCAxy,
121119
otfmulticharm::XiDCAz,
120+
otfmulticharm::XicDCAxy,
122121
otfmulticharm::XicDCAz,
122+
otfmulticharm::XiccDCAxy,
123123
otfmulticharm::XiccDCAz,
124124

125125
otfmulticharm::PiFromXiDCAxy,
126-
otfmulticharm::PiFromLaDCAxy,
127-
otfmulticharm::PrFromLaDCAxy,
128126
otfmulticharm::PiFromXiDCAz,
127+
otfmulticharm::PiFromLaDCAxy,
129128
otfmulticharm::PiFromLaDCAz,
129+
otfmulticharm::PrFromLaDCAxy,
130130
otfmulticharm::PrFromLaDCAz,
131131

132132
otfmulticharm::Pi1cDCAxy,
133-
otfmulticharm::Pi2cDCAxy,
134-
otfmulticharm::PiccDCAxy,
135133
otfmulticharm::Pi1cDCAz,
134+
otfmulticharm::Pi2cDCAxy,
136135
otfmulticharm::Pi2cDCAz,
136+
otfmulticharm::PiccDCAxy,
137137
otfmulticharm::PiccDCAz,
138138

139139
otfmulticharm::XicDecayRadius2D,

ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,15 @@ struct OnTheFlyRichPid {
745745
}
746746

747747
for (const auto& track : tracks) {
748+
749+
float nSigmaBarrelRich[5] = {error_value, error_value, error_value, error_value, error_value};
750+
748751
// first step: find precise arrival time (if any)
749752
// --- convert track into perfect track
750-
if (!track.has_mcParticle()) // should always be OK but check please
753+
if (!track.has_mcParticle()) { // should always be OK but check please
754+
upgradeRich(nSigmaBarrelRich[0], nSigmaBarrelRich[1], nSigmaBarrelRich[2], nSigmaBarrelRich[3], nSigmaBarrelRich[4]);
751755
continue;
756+
}
752757

753758
auto mcParticle = track.mcParticle();
754759
o2::track::TrackParCov o2track = o2::upgrade::convertMCParticleToO2Track(mcParticle, pdg);
@@ -761,12 +766,14 @@ struct OnTheFlyRichPid {
761766
// get particle to calculate Cherenkov angle and resolution
762767
auto pdgInfo = pdg->GetParticle(mcParticle.pdgCode());
763768
if (pdgInfo == nullptr) {
769+
upgradeRich(nSigmaBarrelRich[0], nSigmaBarrelRich[1], nSigmaBarrelRich[2], nSigmaBarrelRich[3], nSigmaBarrelRich[4]);
764770
continue;
765771
}
766772

767773
// find track bRICH sector
768774
int i_sector = findSector(o2track.getEta());
769775
if (i_sector < 0) {
776+
upgradeRich(nSigmaBarrelRich[0], nSigmaBarrelRich[1], nSigmaBarrelRich[2], nSigmaBarrelRich[3], nSigmaBarrelRich[4]);
770777
continue;
771778
}
772779

@@ -794,12 +801,12 @@ struct OnTheFlyRichPid {
794801
}
795802

796803
// Straight to Nsigma
797-
float deltaThetaBarrelRich[5], nSigmaBarrelRich[5];
804+
float deltaThetaBarrelRich[5]; //, nSigmaBarrelRich[5];
798805
int lpdg_array[5] = {kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};
799806
float masses[5];
800807

801808
for (int ii = 0; ii < 5; ii++) {
802-
nSigmaBarrelRich[ii] = error_value;
809+
// nSigmaBarrelRich[ii] = error_value;
803810

804811
auto pdgInfoThis = pdg->GetParticle(lpdg_array[ii]);
805812
masses[ii] = pdgInfoThis->Mass();

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
/PWGLF/TableProducer/Resonances @alibuild @sustripathy @skundu692 @dmallick2 @smaff92
5151
/PWGLF/Tasks/Strangeness @alibuild @sustripathy @skundu692 @ercolessi @romainschotter
5252
/PWGLF/TableProducer/Strangeness @alibuild @sustripathy @skundu692 @ercolessi @romainschotter
53+
/PWGLF/Utils @alibuild @sustripathy @skundu692 @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
5354

5455
# PWG-MM
5556
/PWGMM @alibuild @sustripathy @skundu692 @aalkin @jgcn

Common/Core/TableHelper.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
#include "Common/Core/TableHelper.h"
1919

20-
#include <string>
21-
2220
#include "Framework/InitContext.h"
2321
#include "Framework/RunningWorkflowInfo.h"
2422

23+
#include <string>
24+
2525
/// Function to print the table required in the full workflow
2626
/// @param initContext initContext of the init function
27-
void printTablesInWorkflow(o2::framework::InitContext& initContext)
27+
void o2::common::core::printTablesInWorkflow(o2::framework::InitContext& initContext)
2828
{
2929
auto& workflows = initContext.services().get<o2::framework::RunningWorkflowInfo const>();
3030
for (auto const& device : workflows.devices) {
@@ -37,7 +37,7 @@ void printTablesInWorkflow(o2::framework::InitContext& initContext)
3737
/// Function to check if a table is required in a workflow
3838
/// @param initContext initContext of the init function
3939
/// @param table name of the table to check for
40-
bool isTableRequiredInWorkflow(o2::framework::InitContext& initContext, const std::string& table)
40+
bool o2::common::core::isTableRequiredInWorkflow(o2::framework::InitContext& initContext, const std::string& table)
4141
{
4242
LOG(debug) << "Checking if table " << table << " is needed";
4343
bool tableNeeded = false;
@@ -57,7 +57,7 @@ bool isTableRequiredInWorkflow(o2::framework::InitContext& initContext, const st
5757
/// @param initContext initContext of the init function
5858
/// @param table name of the table to check for
5959
/// @param flag bool value of flag to set, if the given value is true it will be kept, disregarding the table usage in the workflow.
60-
void enableFlagIfTableRequired(o2::framework::InitContext& initContext, const std::string& table, bool& flag)
60+
void o2::common::core::enableFlagIfTableRequired(o2::framework::InitContext& initContext, const std::string& table, bool& flag)
6161
{
6262
if (flag) {
6363
LOG(info) << "Table enabled: " + table;
@@ -75,7 +75,7 @@ void enableFlagIfTableRequired(o2::framework::InitContext& initContext, const st
7575
/// @param initContext initContext of the init function
7676
/// @param table name of the table to check for
7777
/// @param flag int value of flag to set, only if initially set to -1. Initial values of 0 or 1 will be kept disregarding the table usage in the workflow.
78-
void enableFlagIfTableRequired(o2::framework::InitContext& initContext, const std::string& table, int& flag)
78+
void o2::common::core::enableFlagIfTableRequired(o2::framework::InitContext& initContext, const std::string& table, int& flag)
7979
{
8080
if (flag > 0) {
8181
flag = 1;

Common/Core/TableHelper.h

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818
#ifndef COMMON_CORE_TABLEHELPER_H_
1919
#define COMMON_CORE_TABLEHELPER_H_
2020

21-
#include <string>
22-
2321
#include "Framework/Configurable.h"
2422
#include "Framework/InitContext.h"
2523
#include "Framework/RunningWorkflowInfo.h"
2624

25+
#include <string>
26+
27+
namespace o2::common::core
28+
{
29+
2730
/// Function to print the table required in the full workflow
2831
/// @param initContext initContext of the init function
2932
void printTablesInWorkflow(o2::framework::InitContext& initContext);
@@ -76,14 +79,16 @@ bool getTaskOptionValue(o2::framework::InitContext& initContext, const std::stri
7679
}
7780
if (device.name == taskName) { // Found the mother task
7881
int optionCounter = 0;
79-
for (auto const& option : device.options) {
82+
for (const o2::framework::ConfigParamSpec& option : device.options) {
8083
if (verbose) {
81-
LOG(info) << " Option " << optionCounter++ << " " << option.name << " = '" << option.defaultValue.asString() << "'";
84+
LOG(info) << " Option " << optionCounter++ << " " << option.name << " of type " << static_cast<int>(option.type) << " = '" << option.defaultValue.asString() << "'";
8285
}
8386
if (option.name == optName) {
8487
value = option.defaultValue.get<ValueType>();
8588
if (verbose) {
86-
LOG(info) << " Found option '" << optName << "' with value '" << value << "'";
89+
if constexpr (!std::is_same_v<ValueType, o2::framework::LabeledArray<float>>) {
90+
LOG(info) << " Found option '" << optName << "' with value '" << value << "'";
91+
}
8792
found = true;
8893
} else {
8994
return true;
@@ -107,4 +112,11 @@ bool getTaskOptionValue(o2::framework::InitContext& initContext, const std::stri
107112
return getTaskOptionValue(initContext, taskName, configurable.name, configurable.value, verbose);
108113
}
109114

115+
} // namespace o2::common::core
116+
117+
using o2::common::core::enableFlagIfTableRequired;
118+
using o2::common::core::getTaskOptionValue;
119+
using o2::common::core::isTableRequiredInWorkflow;
120+
using o2::common::core::printTablesInWorkflow;
121+
110122
#endif // COMMON_CORE_TABLEHELPER_H_

Common/DataModel/OccupancyTables.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ namespace trackmeanocc
209209
{
210210
DECLARE_SOA_INDEX_COLUMN(Track, track);
211211

212+
// DECLARE_SOA_INDEX_COLUMN(TracksQA, tracksQA);// this is not working
213+
212214
DECLARE_SOA_COLUMN(TmoPrimUnfm80, tmoPrimUnfm80, float);
213215
DECLARE_SOA_COLUMN(TmoFV0AUnfm80, tmoFV0AUnfm80, float);
214216
DECLARE_SOA_COLUMN(TmoFV0CUnfm80, tmoFV0CUnfm80, float);
@@ -281,7 +283,7 @@ DECLARE_SOA_COLUMN(TwmoRobustMultExtraTableUnfm80, twmoRobustMultExtraTableUnfm8
281283
// using Tracks = aod::Tracks;
282284
// DECLARE_SOA_INDEX_TABLE_USER(TrackMeanOccs0, Tracks, "TRACKMEANOCCS0", o2::aod::trackmeanocc::TrackId);
283285

284-
DECLARE_SOA_TABLE(TmoTrackId, "AOD", "TMOTRACKID", o2::aod::trackmeanocc::TrackId);
286+
DECLARE_SOA_TABLE(TmoTrackIds, "AOD", "TMOTRACKIDS", o2::aod::trackmeanocc::TrackId);
285287

286288
DECLARE_SOA_TABLE(TmoPrim, "AOD", "TMOPRIM", o2::soa::Index<>, // TrackMeanOccDet
287289
o2::aod::trackmeanocc::TmoPrimUnfm80);
@@ -377,5 +379,21 @@ DECLARE_SOA_TABLE(TwmoRNtrackDet, "AOD", "TWMORNTRACKDET", o2::soa::Index<>,
377379
DECLARE_SOA_TABLE(TwmoRMultExtra, "AOD", "TWMORMULTEXTRA", o2::soa::Index<>,
378380
o2::aod::trackmeanocc::TwmoRobustMultExtraTableUnfm80);
379381

382+
using Tmo = aod::TmoTrackIds::iterator;
383+
384+
using TrackQA = TracksQAVersion::iterator;
385+
386+
namespace trackmeanocc
387+
{
388+
DECLARE_SOA_INDEX_COLUMN_FULL(Tmo, tmo, int64_t, TmoTrackIds, "");
389+
DECLARE_SOA_INDEX_COLUMN_FULL(TrackQA, trackQA, int64_t, TracksQAVersion, "");
390+
} // namespace trackmeanocc
391+
392+
DECLARE_SOA_TABLE(TrackToTracksQA, "AOD", "TRACKTOTRACKSQA", o2::aod::trackmeanocc::TrackQAId);
393+
DECLARE_SOA_TABLE(TrackToTmo, "AOD", "TRACKTOTMO", o2::aod::trackmeanocc::TmoId);
394+
395+
DECLARE_SOA_TABLE(TrackQAToTmo, "AOD", "TRACKQATOTMO", o2::aod::trackmeanocc::TmoId);
396+
DECLARE_SOA_TABLE(TmoToTrackQA, "AOD", "TMOTOTRACKQA", o2::aod::trackmeanocc::TrackQAId);
397+
380398
} // namespace o2::aod
381399
#endif // COMMON_DATAMODEL_OCCUPANCYTABLES_H_

Common/DataModel/PIDResponseITS.h

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323
#define COMMON_DATAMODEL_PIDRESPONSEITS_H_
2424

2525
// O2 includes
26+
#include "TableHelper.h"
27+
2628
#include "Framework/ASoA.h"
2729
#include "Framework/AnalysisDataModel.h"
28-
#include "ReconstructionDataFormats/PID.h"
2930
#include "Framework/Logger.h"
31+
#include "ReconstructionDataFormats/PID.h"
3032

3133
namespace o2::aod
3234
{
@@ -125,6 +127,40 @@ struct ITSResponse {
125127
0.09, -999., -999.);
126128
}
127129

130+
/// Initialize the TOF response parameters in the init function of each task
131+
/// \param initContext Initialization context. Gets the configuration parameters from the pidITS task
132+
static void setParameters(o2::framework::InitContext& initContext, bool isMC = false)
133+
{
134+
float p0 = 0, p1 = 0, p2 = 0;
135+
float p0_Z2 = 0, p1_Z2 = 0, p2_Z2 = 0;
136+
float p0_res = 0, p1_res = 0, p2_res = 0;
137+
float p0_res_Z2 = 0, p1_res_Z2 = 0, p2_res_Z2 = 0;
138+
o2::framework::LabeledArray<float> itsParams;
139+
getTaskOptionValue(initContext, "its-pid", "itsParams", itsParams, true);
140+
auto data = itsParams.getData();
141+
const int col = isMC ? 1 : 0; // 0 for Data, 1 for MC
142+
if (data.rows != 2 || data.cols != 12) {
143+
LOG(fatal) << "ITSResponse parameters not initialized, check the itsParams configuration";
144+
}
145+
p0 = data(col, 0);
146+
p1 = data(col, 1);
147+
p2 = data(col, 2);
148+
p0_Z2 = data(col, 3);
149+
p1_Z2 = data(col, 4);
150+
p2_Z2 = data(col, 5);
151+
p0_res = data(col, 6);
152+
p1_res = data(col, 7);
153+
p2_res = data(col, 8);
154+
p0_res_Z2 = data(col, 9);
155+
p1_res_Z2 = data(col, 10);
156+
p2_res_Z2 = data(col, 11);
157+
158+
setParameters(p0, p1, p2,
159+
p0_Z2, p1_Z2, p2_Z2,
160+
p0_res, p1_res, p2_res,
161+
p0_res_Z2, p1_res_Z2, p2_res_Z2);
162+
}
163+
128164
private:
129165
static std::array<float, 3> mITSRespParams;
130166
static std::array<float, 3> mITSRespParamsZ2;
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
12+
/// \file SelectionStudyTables
13+
/// \brief tables meant to do event selection studies for O-O / light systems
14+
///
15+
/// \author ALICE
16+
17+
#include "Framework/ASoA.h"
18+
#include "Framework/AnalysisDataModel.h"
19+
20+
#include <vector>
21+
22+
#ifndef COMMON_DATAMODEL_SELECTIONSTUDYTABLES_H_
23+
#define COMMON_DATAMODEL_SELECTIONSTUDYTABLES_H_
24+
25+
namespace o2::aod
26+
{
27+
namespace selectionstudy
28+
{
29+
DECLARE_SOA_COLUMN(PtPions, ptPions, std::vector<float>);
30+
DECLARE_SOA_COLUMN(PtKaons, ptKaons, std::vector<float>);
31+
DECLARE_SOA_COLUMN(PtProtons, ptProtons, std::vector<float>);
32+
DECLARE_SOA_COLUMN(PtK0s, ptPK0s, std::vector<float>);
33+
DECLARE_SOA_COLUMN(PtLambdas, ptLambdas, std::vector<float>);
34+
DECLARE_SOA_COLUMN(PtXis, ptXis, std::vector<float>);
35+
DECLARE_SOA_COLUMN(PtOmegas, ptOmegas, std::vector<float>);
36+
DECLARE_SOA_COLUMN(PtPhis, ptPhis, std::vector<float>);
37+
DECLARE_SOA_COLUMN(PtKStars, ptKStars, std::vector<float>);
38+
DECLARE_SOA_COLUMN(PtDs, ptDs, std::vector<float>);
39+
DECLARE_SOA_COLUMN(PtLambdaCs, ptLambdaCs, std::vector<float>);
40+
DECLARE_SOA_COLUMN(PtJPsis, ptJPsis, std::vector<float>);
41+
} // namespace selectionstudy
42+
43+
DECLARE_SOA_TABLE(PIDPts, "AOD", "PIDPTS", o2::soa::Index<>,
44+
o2::aod::selectionstudy::PtPions,
45+
o2::aod::selectionstudy::PtKaons,
46+
o2::aod::selectionstudy::PtProtons,
47+
o2::aod::selectionstudy::PtK0s,
48+
o2::aod::selectionstudy::PtLambdas,
49+
o2::aod::selectionstudy::PtXis,
50+
o2::aod::selectionstudy::PtOmegas,
51+
o2::aod::selectionstudy::PtPhis,
52+
o2::aod::selectionstudy::PtKStars,
53+
o2::aod::selectionstudy::PtDs,
54+
o2::aod::selectionstudy::PtLambdaCs,
55+
o2::aod::selectionstudy::PtJPsis);
56+
} // namespace o2::aod
57+
#endif // COMMON_DATAMODEL_SELECTIONSTUDYTABLES_H_

Common/TableProducer/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ o2physics_add_dpl_workflow(trackselection
2525
o2physics_add_dpl_workflow(event-selection
2626
SOURCES eventSelection.cxx
2727
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCCDB
28+
O2::DataFormatsITSMFT
29+
COMPONENT_NAME Analysis)
30+
31+
o2physics_add_dpl_workflow(event-selection-service
32+
SOURCES eventSelectionService.cxx
33+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCCDB
34+
O2::DataFormatsITSMFT
2835
COMPONENT_NAME Analysis)
2936

3037
o2physics_add_dpl_workflow(multiplicity-table
@@ -52,6 +59,11 @@ o2physics_add_dpl_workflow(timestamp
5259
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
5360
COMPONENT_NAME Analysis)
5461

62+
o2physics_add_dpl_workflow(timestamptester
63+
SOURCES timestampTester.cxx
64+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
65+
COMPONENT_NAME Analysis)
66+
5567
o2physics_add_dpl_workflow(weak-decay-indices
5668
SOURCES weakDecayIndices.cxx
5769
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
@@ -160,3 +172,7 @@ o2physics_add_dpl_workflow(muon-realignment
160172
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2::DetectorsCommonDataFormats O2::MathUtils O2::MCHTracking O2::DataFormatsMCH O2::GlobalTracking O2::MCHBase O2::MCHGeometryTransformer O2::CommonUtils
161173
COMPONENT_NAME Analysis)
162174

175+
o2physics_add_dpl_workflow(selectionstudytable
176+
SOURCES selectionStudyTable.cxx
177+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
178+
COMPONENT_NAME Analysis)

Common/TableProducer/PID/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ o2physics_add_dpl_workflow(pid-tof-full
4545

4646
o2physics_add_dpl_workflow(pid-tpc-base
4747
SOURCES pidTPCBase.cxx
48-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
48+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB
4949
COMPONENT_NAME Analysis)
5050

5151
o2physics_add_dpl_workflow(pid-tpc

0 commit comments

Comments
 (0)