Skip to content

Commit 31e7eec

Browse files
authored
Merge branch 'AliceO2Group:master' into cascades2
2 parents e762f2b + 25963ec commit 31e7eec

45 files changed

Lines changed: 5851 additions & 965 deletions

Some content is hidden

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

Common/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ o2physics_add_dpl_workflow(qvectors-correction
8181

8282
o2physics_add_dpl_workflow(centrality-study
8383
SOURCES centralityStudy.cxx
84-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
84+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB
8585
COMPONENT_NAME Analysis)
8686

8787
o2physics_add_dpl_workflow(flow-test

Common/Tasks/centralityStudy.cxx

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// Run 3 Pb-Pb centrality selections in 2023 data. It is compatible with
1414
// derived data.
1515

16+
#include "Common/CCDB/ctpRateFetcher.h"
1617
#include "Common/DataModel/Centrality.h"
1718
#include "Common/DataModel/EventSelection.h"
1819
#include "Common/DataModel/McCollisionExtra.h"
@@ -27,6 +28,9 @@
2728

2829
#include "TH1F.h"
2930
#include "TH2F.h"
31+
#include "TProfile.h"
32+
33+
#include <string>
3034

3135
using namespace o2;
3236
using namespace o2::framework;
@@ -37,6 +41,7 @@ struct centralityStudy {
3741
// Raw multiplicities
3842
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
3943
Service<o2::ccdb::BasicCCDBManager> ccdb;
44+
ctpRateFetcher mRateFetcher;
4045

4146
// Configurables
4247
Configurable<bool> do2DPlots{"do2DPlots", true, "0 - no, 1 - yes"};
@@ -76,6 +81,11 @@ struct centralityStudy {
7681
Configurable<float> scaleSignalFT0M{"scaleSignalFT0M", 1.00f, "scale FT0M signal for convenience"};
7782
Configurable<float> scaleSignalFV0A{"scaleSignalFV0A", 1.00f, "scale FV0A signal for convenience"};
7883

84+
Configurable<std::string> ccdbURL{"ccdbURL", "http://alice-ccdb.cern.ch", "ccdb url"};
85+
Configurable<std::string> pathGRPECSObject{"pathGRPECSObject", "GLO/Config/GRPECS", "Path to GRPECS object"};
86+
Configurable<std::string> irSource{"irSource", "ZNC hadronic", "Source of the interaction rate: (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"};
87+
Configurable<bool> irCrashOnNull{"irCrashOnNull", false, "Flag to avoid CTP RateFetcher crash."};
88+
7989
// _______________________________________
8090
// upc rejection criteria
8191
// reject low zna/c
@@ -120,6 +130,7 @@ struct centralityStudy {
120130
ConfigurableAxis axisPVChi2{"axisPVChi2", {300, 0, 30}, "FT0C percentile"};
121131
ConfigurableAxis axisDeltaTime{"axisDeltaTime", {300, 0, 300}, "#Delta time"};
122132
ConfigurableAxis axisDeltaTimestamp{"axisDeltaTimestamp", {1440, 0, 24}, "#Delta timestamp - sor (hours)"};
133+
ConfigurableAxis axisInteractionRate{"axisInteractionRate", {500, 0, 100}, "Binning for the interaction rate (kHz)"};
123134

124135
// For profile Z
125136
ConfigurableAxis axisPVz{"axisPVz", {400, -20.0f, +20.0f}, "PVz (cm)"};
@@ -235,26 +246,28 @@ struct centralityStudy {
235246
}
236247

237248
if (doTimeStudies) {
238-
ccdb->setURL("http://alice-ccdb.cern.ch");
249+
ccdb->setURL(ccdbURL);
239250
ccdb->setCaching(true);
240251
ccdb->setLocalObjectValidityChecking();
241252
ccdb->setFatalWhenNull(false);
242253

243254
histos.add("hFT0AvsTime", "hFT0AvsTime", kTH2F, {axisDeltaTimestamp, axisMultFT0A});
244-
histos.add("hFT0CvsTime", "hFT0CvsTime", kTH2F, {{axisDeltaTimestamp, axisMultFT0C}});
245-
histos.add("hFT0MvsTime", "hFT0MvsTime", kTH2F, {{axisDeltaTimestamp, axisMultFT0M}});
246-
histos.add("hFV0AvsTime", "hFV0AvsTime", kTH2F, {{axisDeltaTimestamp, axisMultFV0A}});
247-
histos.add("hMFTTracksvsTime", "hMFTTracksvsTime", kTH2F, {{axisDeltaTimestamp, axisMultMFTTracks}});
248-
histos.add("hNGlobalVsTime", "hNGlobalVsTime", kTH2F, {{axisDeltaTimestamp, axisMultGlobalTracks}});
249-
histos.add("hNTPVContributorsvsTime", "hNTPVContributorsvsTime", kTH2F, {{axisDeltaTimestamp, axisMultPVContributors}});
255+
histos.add("hFT0CvsTime", "hFT0CvsTime", kTH2F, {axisDeltaTimestamp, axisMultFT0C});
256+
histos.add("hFT0MvsTime", "hFT0MvsTime", kTH2F, {axisDeltaTimestamp, axisMultFT0M});
257+
histos.add("hFV0AvsTime", "hFV0AvsTime", kTH2F, {axisDeltaTimestamp, axisMultFV0A});
258+
histos.add("hMFTTracksvsTime", "hMFTTracksvsTime", kTH2F, {axisDeltaTimestamp, axisMultMFTTracks});
259+
histos.add("hNGlobalVsTime", "hNGlobalVsTime", kTH2F, {axisDeltaTimestamp, axisMultGlobalTracks});
260+
histos.add("hNTPVContributorsvsTime", "hNTPVContributorsvsTime", kTH2F, {axisDeltaTimestamp, axisMultPVContributors});
261+
histos.add("hIRProfileVsTime", "hIRProfileVsTime", kTProfile, {axisDeltaTimestamp});
262+
histos.add("hPVzProfileCoVsTime", "hPVzProfileCoVsTime", kTProfile, {axisDeltaTimestamp});
263+
histos.add("hPVzProfileBcVsTime", "hPVzProfileBcVsTime", kTProfile, {axisDeltaTimestamp});
250264
}
251265
}
252266

253267
template <typename TCollision>
254268
void genericProcessCollision(TCollision collision)
255269
// process this collisions
256270
{
257-
258271
histos.fill(HIST("hCollisionSelection"), 0); // all collisions
259272
if (applySel8 && !collision.multSel8())
260273
return;
@@ -428,16 +441,22 @@ struct centralityStudy {
428441
if (doTimeStudies && collision.has_multBC()) {
429442
auto multbc = collision.template multBC_as<aod::MultBCs>();
430443
uint64_t bcTimestamp = multbc.timestamp();
431-
o2::parameters::GRPECSObject* grpo = ccdb->getForTimeStamp<o2::parameters::GRPECSObject>("GLO/Config/GRPECS", bcTimestamp);
444+
o2::parameters::GRPECSObject* grpo = ccdb->getForTimeStamp<o2::parameters::GRPECSObject>(pathGRPECSObject, bcTimestamp);
432445
uint64_t startOfRunTimestamp = grpo->getTimeStart();
446+
433447
float hoursAfterStartOfRun = static_cast<float>(bcTimestamp - startOfRunTimestamp) / 3600000.0;
448+
float interactionRate = mRateFetcher.fetch(ccdb.service, bcTimestamp, collision.multRunNumber(), irSource.value, irCrashOnNull) / 1000.; // kHz
449+
434450
histos.fill(HIST("hFT0AvsTime"), hoursAfterStartOfRun, collision.multFT0A());
435451
histos.fill(HIST("hFT0CvsTime"), hoursAfterStartOfRun, collision.multFT0C());
436452
histos.fill(HIST("hFT0MvsTime"), hoursAfterStartOfRun, collision.multFT0M());
437453
histos.fill(HIST("hFV0AvsTime"), hoursAfterStartOfRun, collision.multFV0A());
438454
histos.fill(HIST("hMFTTracksvsTime"), hoursAfterStartOfRun, collision.mftNtracks());
439455
histos.fill(HIST("hNGlobalVsTime"), hoursAfterStartOfRun, collision.multNTracksGlobal());
440456
histos.fill(HIST("hNTPVContributorsvsTime"), hoursAfterStartOfRun, collision.multPVTotalContributors());
457+
histos.fill(HIST("hPVzProfileCoVsTime"), hoursAfterStartOfRun, collision.multPVz());
458+
histos.fill(HIST("hPVzProfileBcVsTime"), hoursAfterStartOfRun, multbc.multFT0PosZ());
459+
histos.fill(HIST("hIRProfileVsTime"), hoursAfterStartOfRun, interactionRate);
441460
}
442461
}
443462

PWGCF/DataModel/CorrelationsDerived.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ enum ParticleDecay {
124124
JPsiToEE,
125125
JPsiToMuMu,
126126
Generic2Prong,
127+
PhiToKK,
128+
K0stoPiPi,
129+
LambdatoPPi,
130+
AntiLambdatoPiP
127131
};
128132
} // namespace cf2prongtrack
129133
DECLARE_SOA_TABLE(CF2ProngTracks, "AOD", "CF2PRONGTRACK", //! Reduced track table

PWGCF/FemtoUniverse/Core/FemtoUniverseEfficiencyCorrection.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ struct EffCorConfigurableGroup : framework::ConfigurableGroup {
5050
framework::Configurable<std::string> confEffCorCCDBPath{"confEffCorCCDBPath", "", "[Efficiency Correction] CCDB path to histograms"};
5151
framework::Configurable<std::vector<std::string>> confEffCorCCDBTimestamps{"confEffCorCCDBTimestamps", {}, "[Efficiency Correction] Timestamps of histograms in CCDB (0 can be used as a placeholder, e.g. when running subwagons)"};
5252
framework::Configurable<std::string> confEffCorVariables{"confEffCorVariables", "pt", "[Efficiency Correction] Variables for efficiency correction histogram dimensions (available: 'pt'; 'pt,eta'; 'pt,mult'; 'pt,eta,mult')"};
53+
framework::Configurable<bool> confEffCorSetMultToConst{"confEffCorSetMultToConst", false, "[Efficiency Correction] Multiplicity for the histograms set to the constant value"};
5354
};
5455

5556
class EfficiencyCorrection
@@ -62,6 +63,7 @@ class EfficiencyCorrection
6263
auto init(framework::HistogramRegistry* registry, std::vector<framework::AxisSpec> axisSpecs) -> void
6364
{
6465
shouldFillHistograms = config->confEffCorFillHist;
66+
shouldSetMultToConst = config->confEffCorSetMultToConst;
6567

6668
histRegistry = registry;
6769
if (shouldFillHistograms) {
@@ -126,7 +128,7 @@ class EfficiencyCorrection
126128
histRegistry->fill(HIST(histDirectory) + HIST("/") + HIST(histSuffix[N - 1]) + HIST("/hMCTruth"),
127129
particle.pt(),
128130
particle.eta(),
129-
particle.template fdCollision_as<CollisionType>().multV0M());
131+
shouldSetMultToConst ? 100 : particle.template fdCollision_as<CollisionType>().multV0M());
130132
}
131133

132134
template <uint8_t N, typename CollisionType = aod::FdCollisions>
@@ -277,6 +279,7 @@ class EfficiencyCorrection
277279

278280
bool shouldApplyCorrection{false};
279281
bool shouldFillHistograms{false};
282+
bool shouldSetMultToConst{false};
280283

281284
o2::ccdb::BasicCCDBManager& ccdb{o2::ccdb::BasicCCDBManager::instance()};
282285
std::array<TH1*, 2> hLoaded{nullptr, nullptr};

0 commit comments

Comments
 (0)