Skip to content

Commit ba03d6c

Browse files
committed
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics into phiflowv10
2 parents 31fde77 + 6599115 commit ba03d6c

File tree

65 files changed

+5990
-3593
lines changed

Some content is hidden

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

65 files changed

+5990
-3593
lines changed

Common/Core/RecoDecay.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,14 +1111,14 @@ struct RecoDecay {
11111111
if (PDGParticleIMother < 9 || (PDGParticleIMother > 20 && PDGParticleIMother < 38)) {
11121112
// auto PDGPaticle = std::abs(particleMother.pdgCode());
11131113
if (
1114-
(PDGParticleIMother / 100 == 5 || // b mesons
1115-
PDGParticleIMother / 1000 == 5) // b baryons
1114+
(PDGParticle / 100 == 5 || // b mesons
1115+
PDGParticle / 1000 == 5) // b baryons
11161116
) {
11171117
return OriginType::NonPrompt; // beauty
11181118
}
11191119
if (
1120-
(PDGParticleIMother / 100 == 4 || // c mesons
1121-
PDGParticleIMother / 1000 == 4) // c baryons
1120+
(PDGParticle / 100 == 4 || // c mesons
1121+
PDGParticle / 1000 == 4) // c baryons
11221122
) {
11231123
return OriginType::Prompt; // charm
11241124
}

Common/DataModel/Centrality.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ DECLARE_SOA_COLUMN(CentRun2CL1, centRun2CL1, float); //! Run 2
2626
DECLARE_SOA_COLUMN(CentRun2RefMult5, centRun2RefMult5, float); //! Run 2 cent. from ref. mult. estimator, eta 0.5
2727
DECLARE_SOA_COLUMN(CentRun2RefMult8, centRun2RefMult8, float); //! Run 2 cent. from ref. mult. estimator, eta 0.8
2828

29-
DECLARE_SOA_COLUMN(CentFV0A, centFV0A, float); //! Run 3 cent. from FV0A multiplicities
30-
DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float); //! Run 3 cent. from FT0A+FT0C multiplicities
31-
DECLARE_SOA_COLUMN(CentFT0A, centFT0A, float); //! Run 3 cent. from FT0A multiplicity
32-
DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float); //! Run 3 cent. from FT0C multiplicity
33-
DECLARE_SOA_COLUMN(CentFDDM, centFDDM, float); //! Run 3 cent. from FDDA+FDDC multiplicity
34-
DECLARE_SOA_COLUMN(CentNTPV, centNTPV, float); //! Run 3 cent. from the number of tracks contributing to the
35-
DECLARE_SOA_COLUMN(CentNGlobal, centNGlobal, float); //! Run 3 cent. from the number of tracks contributing to the PV
36-
DECLARE_SOA_COLUMN(CentMFT, centMFT, float); //! Run 3 cent. from the number of tracks in the MFT
29+
DECLARE_SOA_COLUMN(CentFV0A, centFV0A, float); //! Run 3 cent. from FV0A multiplicities
30+
DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float); //! Run 3 cent. from FT0A+FT0C multiplicities
31+
DECLARE_SOA_COLUMN(CentFT0A, centFT0A, float); //! Run 3 cent. from FT0A multiplicity
32+
DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float); //! Run 3 cent. from FT0C multiplicity
33+
DECLARE_SOA_COLUMN(CentFT0CVariant1, centFT0CVariant1, float); //! Run 3 cent. from FT0C multiplicity
34+
DECLARE_SOA_COLUMN(CentFDDM, centFDDM, float); //! Run 3 cent. from FDDA+FDDC multiplicity
35+
DECLARE_SOA_COLUMN(CentNTPV, centNTPV, float); //! Run 3 cent. from the number of tracks contributing to the
36+
DECLARE_SOA_COLUMN(CentNGlobal, centNGlobal, float); //! Run 3 cent. from the number of tracks contributing to the PV
37+
DECLARE_SOA_COLUMN(CentMFT, centMFT, float); //! Run 3 cent. from the number of tracks in the MFT
3738
} // namespace cent
3839

3940
// Run 2 tables
@@ -56,6 +57,9 @@ DECLARE_SOA_TABLE(CentNTPVs, "AOD", "CENTNTPV", cent::CentNTPV); //! Ru
5657
DECLARE_SOA_TABLE(CentNGlobals, "AOD", "CENTNGLOBAL", cent::CentNGlobal); //! Run 3 NGlobal centrality table
5758
DECLARE_SOA_TABLE(CentMFTs, "AOD", "CENTMFT", cent::CentMFT); //! Run 3 MFT tracks centrality table
5859

60+
// Run 3 variant tables
61+
DECLARE_SOA_TABLE(CentFT0CVariant1s, "AOD", "CENTFT0Cvar1", cent::CentFT0CVariant1); //! Run 3 FT0C variant 1
62+
5963
using CentRun2V0M = CentRun2V0Ms::iterator;
6064
using CentRun2V0A = CentRun2V0As::iterator;
6165
using CentRun2SPDTrk = CentRun2SPDTrks::iterator;

Common/TableProducer/centralityTable.cxx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ static constexpr int kCentFV0As = 6;
4242
static constexpr int kCentFT0Ms = 7;
4343
static constexpr int kCentFT0As = 8;
4444
static constexpr int kCentFT0Cs = 9;
45-
static constexpr int kCentFDDMs = 10;
46-
static constexpr int kCentNTPVs = 11;
47-
static constexpr int kCentNGlobals = 12;
48-
static constexpr int kCentMFTs = 13;
49-
static constexpr int nTables = 14;
45+
static constexpr int kCentFT0CVariant1s = 10;
46+
static constexpr int kCentFDDMs = 11;
47+
static constexpr int kCentNTPVs = 12;
48+
static constexpr int kCentNGlobals = 13;
49+
static constexpr int kCentMFTs = 14;
50+
static constexpr int nTables = 15;
5051
static constexpr int nParameters = 1;
5152
static const std::vector<std::string> tableNames{"CentRun2V0Ms",
5253
"CentRun2V0As",
@@ -58,12 +59,13 @@ static const std::vector<std::string> tableNames{"CentRun2V0Ms",
5859
"CentFT0Ms",
5960
"CentFT0As",
6061
"CentFT0Cs",
62+
"CentFT0CVariant1s",
6163
"CentFDDMs",
6264
"CentNTPVs",
6365
"CentNGlobals",
6466
"CentMFTs"};
6567
static const std::vector<std::string> parameterNames{"Enable"};
66-
static const int defaultParameters[nTables][nParameters]{{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}};
68+
static const int defaultParameters[nTables][nParameters]{{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}};
6769

6870
struct CentralityTable {
6971
Produces<aod::CentRun2V0Ms> centRun2V0M;
@@ -76,6 +78,7 @@ struct CentralityTable {
7678
Produces<aod::CentFT0Ms> centFT0M;
7779
Produces<aod::CentFT0As> centFT0A;
7880
Produces<aod::CentFT0Cs> centFT0C;
81+
Produces<aod::CentFT0CVariant1s> centFT0CVariant1;
7982
Produces<aod::CentFDDMs> centFDDM;
8083
Produces<aod::CentNTPVs> centNTPV;
8184
Produces<aod::CentNGlobals> centNGlobals;
@@ -166,6 +169,7 @@ struct CentralityTable {
166169
calibrationInfo FT0MInfo = calibrationInfo("FT0");
167170
calibrationInfo FT0AInfo = calibrationInfo("FT0A");
168171
calibrationInfo FT0CInfo = calibrationInfo("FT0C");
172+
calibrationInfo FT0CVariant1Info = calibrationInfo("FT0Cvar1");
169173
calibrationInfo FDDMInfo = calibrationInfo("FDD");
170174
calibrationInfo NTPVInfo = calibrationInfo("NTracksPV");
171175
calibrationInfo NGlobalInfo = calibrationInfo("NGlobal");
@@ -183,8 +187,8 @@ struct CentralityTable {
183187
if (doprocessRun3FT0 == true) {
184188
LOG(fatal) << "FT0 only mode is automatically enabled in Run3 mode. Please disable it and enable processRun3.";
185189
}
186-
if (doprocessRun2 == false && doprocessRun3 == false) {
187-
LOGF(fatal, "Neither processRun2 nor processRun3 enabled. Please choose one.");
190+
if (doprocessRun2 == false && doprocessRun3 == false && doprocessRun3Complete == false) {
191+
LOGF(fatal, "Neither processRun2 nor processRun3 nor processRun3Complete enabled. Please choose one.");
188192
}
189193
if (doprocessRun2 == true && doprocessRun3 == true) {
190194
LOGF(fatal, "Cannot enable processRun2 and processRun3 at the same time. Please choose one.");
@@ -197,11 +201,11 @@ struct CentralityTable {
197201
if (f == 1) {
198202
if (tableNames[i].find("Run2") != std::string::npos) {
199203
if (doprocessRun3) {
200-
LOGF(fatal, "Cannot enable Run2 tables in Run3 mode. Please check and disable them.");
204+
LOG(fatal) << "Cannot enable Run2 table `" << tableNames[i] << "` while running in Run3 mode. Please check and disable them.";
201205
}
202206
} else {
203207
if (doprocessRun2) {
204-
LOGF(fatal, "Cannot enable Run3 tables in Run2 mode. Please check and disable them.");
208+
LOG(fatal) << "Cannot enable Run3 table `" << tableNames[i] << "` while running in Run2 mode. Please check and disable them.";
205209
}
206210
}
207211
isTableEnabled[i] = true;
@@ -466,6 +470,9 @@ struct CentralityTable {
466470
case kCentFT0Cs:
467471
centFT0C.reserve(collisions.size());
468472
break;
473+
case kCentFT0CVariant1s:
474+
centFT0CVariant1.reserve(collisions.size());
475+
break;
469476
case kCentFDDMs:
470477
centFDDM.reserve(collisions.size());
471478
break;
@@ -519,6 +526,7 @@ struct CentralityTable {
519526
FT0MInfo.mCalibrationStored = false;
520527
FT0AInfo.mCalibrationStored = false;
521528
FT0CInfo.mCalibrationStored = false;
529+
FT0CVariant1Info.mCalibrationStored = false;
522530
FDDMInfo.mCalibrationStored = false;
523531
NTPVInfo.mCalibrationStored = false;
524532
NGlobalInfo.mCalibrationStored = false;
@@ -564,6 +572,9 @@ struct CentralityTable {
564572
case kCentFT0Cs:
565573
getccdb(FT0CInfo, ccdbConfig.genName);
566574
break;
575+
case kCentFT0CVariant1s:
576+
getccdb(FT0CVariant1Info, ccdbConfig.genName);
577+
break;
567578
case kCentFDDMs:
568579
getccdb(FDDMInfo, ccdbConfig.genName);
569580
break;
@@ -672,6 +683,11 @@ struct CentralityTable {
672683
}
673684
}
674685
break;
686+
case kCentFT0CVariant1s:
687+
if constexpr (enableCentFT0) {
688+
populateTable(centFT0CVariant1, FT0CVariant1Info, collision.multZeqFT0C());
689+
}
690+
break;
675691
case kCentFDDMs:
676692
if constexpr (enableCentFDD) {
677693
populateTable(centFDDM, FDDMInfo, collision.multZeqFDDA() + collision.multZeqFDDC());
@@ -720,6 +736,7 @@ struct CentralityTable {
720736

721737
// Process switches
722738
PROCESS_SWITCH(CentralityTable, processRun2, "Provide Run2 calibrated centrality/multiplicity percentiles tables", true);
739+
PROCESS_SWITCH(CentralityTable, processRun3Complete, "Provide Run3 calibrated centrality/multiplicity percentiles tables using MFT and global tracks (requires extra subscriptions)", false);
723740
PROCESS_SWITCH(CentralityTable, processRun3, "Provide Run3 calibrated centrality/multiplicity percentiles tables", false);
724741
PROCESS_SWITCH(CentralityTable, processRun3FT0, "Provide Run3 calibrated centrality/multiplicity percentiles tables for FT0 only", false);
725742
};

Common/TableProducer/multiplicityTable.cxx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,6 @@ struct MultiplicityTable {
162162
LOGF(fatal, "Cannot enable processRun2 and processRun3 at the same time. Please choose one.");
163163
}
164164

165-
// exploratory
166-
auto& workflows = context.services().get<o2::framework::RunningWorkflowInfo const>();
167-
for (auto const& device : workflows.devices) {
168-
for (auto const& input : device.inputs) {
169-
// input.print();
170-
TString devNam = device.name.c_str();
171-
TString inBin = input.matcher.binding.c_str();
172-
// TString subSpec = input.matcher.subspec.c_str();
173-
LOGF(info, Form("device %s input binding %s subspec", devNam.Data(), inBin.Data()));
174-
}
175-
}
176-
177165
bool tEnabled[nTables] = {false};
178166
for (int i = 0; i < nTables; i++) {
179167
int f = enabledTables->get(tableNames[i].c_str(), "Enable");

DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
/// \brief Implementation for QA tasks of the ITS PID quantities
1616
///
1717

18+
#include <string>
19+
#include <vector>
20+
1821
#include "Framework/AnalysisTask.h"
1922
#include "Framework/runDataProcessing.h"
2023
#include "Framework/HistogramRegistry.h"
@@ -43,6 +46,9 @@ static const std::vector<std::string> parameterNames{"enable"};
4346
static const int defaultParameters[9][nParameters]{{0}, {0}, {1}, {1}, {1}, {0}, {0}, {0}, {0}};
4447
static const float defaultPIDSelection[9][nParameters]{{-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}};
4548
static constexpr int Np = 9;
49+
bool enableParticle[Np] = {false, false, false,
50+
false, false, false,
51+
false, false, false};
4652
std::array<std::shared_ptr<TH2>, Np> hNsigmaPos;
4753
std::array<std::shared_ptr<TH2>, Np> hNsigmaNeg;
4854

@@ -137,9 +143,9 @@ struct itsPidQa {
137143
static constexpr const char* pN[Np] = {"El", "Mu", "Pi", "Ka", "Pr", "De", "Tr", "He", "Al"};
138144

139145
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
140-
Configurable<LabeledArray<int>> enabledTables{"enabledTables",
141-
{defaultParameters[0], 9, nParameters, tableNames, parameterNames},
142-
"Produce QA for this species: 0 - no, 1 - yes"};
146+
Configurable<LabeledArray<int>> enabledParticle{"enabledParticle",
147+
{defaultParameters[0], 9, nParameters, tableNames, parameterNames},
148+
"Produce QA for this species: 0 - no, 1 - yes"};
143149
Configurable<LabeledArray<float>> tofSelection{"tofSelection",
144150
{defaultPIDSelection[0], 9, nParameters, tableNames, parameterNames},
145151
"Selection on the TOF nsigma"};
@@ -214,13 +220,14 @@ struct itsPidQa {
214220
histos.add("event/p", "", kTH1D, {pAxis});
215221

216222
for (int id = 0; id < 9; id++) {
217-
const int f = enabledTables->get(tableNames[id].c_str(), "enable");
223+
const int f = enabledParticle->get(tableNames[id].c_str(), "enable");
218224
if (f != 1) {
219225
continue;
220226
}
221227
// NSigma
222228
const char* axisTitle = Form("N_{#sigma}^{ITS}(%s)", pT[id]);
223229
const AxisSpec nSigmaAxis{nSigmaBins, axisTitle};
230+
enableParticle[id] = true;
224231
hNsigmaPos[id] = histos.add<TH2>(Form("nsigmaPos/%s", pN[id]), axisTitle, kTH2F, {pAxis, nSigmaAxis});
225232
hNsigmaNeg[id] = histos.add<TH2>(Form("nsigmaNeg/%s", pN[id]), axisTitle, kTH2F, {pAxis, nSigmaAxis});
226233
}
@@ -259,7 +266,9 @@ struct itsPidQa {
259266
histos.fill(HIST("event/evsel"), 3);
260267
histos.fill(HIST("event/vertexz"), collision.posZ());
261268

269+
int nTracks = -1;
262270
for (const auto& track : tracksWithPid) {
271+
nTracks++;
263272
histos.fill(HIST("event/trackselection"), 1.f);
264273
if (!track.isGlobalTrack()) { // Skipping non global tracks
265274
continue;
@@ -299,16 +308,20 @@ struct itsPidQa {
299308
continue;
300309
}
301310
for (o2::track::PID::ID id = 0; id <= o2::track::PID::Last; id++) {
311+
if (!enableParticle[id]) {
312+
continue;
313+
}
302314
if (applyRapidityCut) {
303315
if (std::abs(track.rapidity(PID::getMass(id))) > 0.5) {
304316
continue;
305317
}
306318
}
307319
const float nsigma = nsigmaITS(track, id);
308-
if (track.sign() > 0) {
309-
hNsigmaPos[id]->Fill(track.p(), nsigma);
320+
const auto& t = tracks.iteratorAt(nTracks);
321+
if (t.sign() > 0) {
322+
hNsigmaPos[id]->Fill(t.p(), nsigma);
310323
} else {
311-
hNsigmaNeg[id]->Fill(track.p(), nsigma);
324+
hNsigmaNeg[id]->Fill(t.p(), nsigma);
312325
}
313326
}
314327
}

PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ o2physics_add_dpl_workflow(netproton-cumulants-mc
4848
SOURCES netprotonCumulantsMc.cxx
4949
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
5050
COMPONENT_NAME Analysis)
51+
52+
o2physics_add_dpl_workflow(kaon-isospin-fluctuations
53+
SOURCES kaonIsospinFluctuations.cxx
54+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
55+
COMPONENT_NAME Analysis)

0 commit comments

Comments
 (0)