Skip to content

Commit eea84b4

Browse files
authored
Merge branch 'AliceO2Group:dev' into dev
2 parents 8beccfe + 108aeca commit eea84b4

File tree

63 files changed

+2314
-1000
lines changed

Some content is hidden

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

63 files changed

+2314
-1000
lines changed

CCDB/src/CcdbApi.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void CcdbApi::init(std::string const& host)
232232
deploymentMode == o2::framework::DeploymentMode::FST) {
233233
mCurlTimeoutDownload = 15;
234234
} else if (deploymentMode == o2::framework::DeploymentMode::Local) {
235-
mCurlTimeoutDownload = 1;
235+
mCurlTimeoutDownload = 5;
236236
}
237237
}
238238

Common/Constants/include/CommonConstants/PhysicsConstants.h

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ enum Pdg {
5151
kDSBar = -431,
5252
kDSStar = 433,
5353
kDS1 = 10433,
54+
kDS1Star2700 = 30433,
55+
kDS1Star2860 = 40433,
5456
kDS2Star = 435,
57+
kDS3Star2860 = 437,
5558
kDStar = 413,
5659
kDStar0 = 423,
5760
kChiC1 = 20443,
@@ -72,10 +75,15 @@ enum Pdg {
7275
kXiCCPlusPlus = 4422,
7376
kXiCPlus = 4232,
7477
kXiC0 = 4132,
78+
kXiC3055Plus = 4325,
79+
kXiC3080Plus = 4326,
80+
kXiC3055_0 = 4315,
81+
kXiC3080_0 = 4316,
7582
kDeuteron = 1000010020,
7683
kTriton = 1000010030,
7784
kHelium3 = 1000020030,
7885
kAlpha = 1000020040,
86+
kLithium4 = 1000030040,
7987
kHyperTriton = 1010010030,
8088
kHyperHydrogen4 = 1010010040,
8189
kHyperHelium4 = 1010020040,
@@ -104,7 +112,10 @@ constexpr double MassDS = 1.96835;
104112
constexpr double MassDSBar = 1.96835;
105113
constexpr double MassDSStar = 2.1122;
106114
constexpr double MassDS1 = 2.53511;
115+
constexpr double MassDS1Star2700 = 2.714;
116+
constexpr double MassDS1Star2860 = 2.859;
107117
constexpr double MassDS2Star = 2.5691;
118+
constexpr double MassDS3Star2860 = 2.86;
108119
constexpr double MassDStar = 2.01026;
109120
constexpr double MassDStar0 = 2.00685;
110121
constexpr double MassChiC1 = 3.51067;
@@ -125,14 +136,19 @@ constexpr double MassXiB0 = 5.7919;
125136
constexpr double MassXiCCPlusPlus = 3.62155;
126137
constexpr double MassXiCPlus = 2.46771;
127138
constexpr double MassXiC0 = 2.47044;
139+
constexpr double MassXiC3055Plus = 3.0559;
140+
constexpr double MassXiC3080Plus = 3.0772;
141+
constexpr double MassXiC3055_0 = 3.059;
142+
constexpr double MassXiC3080_0 = 3.0799;
128143
constexpr double MassDeuteron = 1.87561294257;
129144
constexpr double MassTriton = 2.80892113298;
130145
constexpr double MassHelium3 = 2.80839160743;
131146
constexpr double MassAlpha = 3.7273794066;
132-
constexpr double MassHyperTriton = 2.99131;
133-
constexpr double MassHyperHydrogen4 = 3.9226;
134-
constexpr double MassHyperHelium4 = 3.9217;
135-
constexpr double MassHyperHelium5 = 4.841;
147+
constexpr double MassLithium4 = 3.7513;
148+
constexpr double MassHyperTriton = 2.991134;
149+
constexpr double MassHyperHydrogen4 = 3.922434;
150+
constexpr double MassHyperHelium4 = 3.921728;
151+
constexpr double MassHyperHelium5 = 4.839961;
136152
constexpr double MassHyperHelium4Sigma = 3.995;
137153

138154
/// \brief Declarations of masses for particles in ROOT PDG_t

Common/Constants/include/CommonConstants/make_pdg_header.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ class Pdg(Enum):
106106
kDSBar = -431
107107
kDSStar = 433
108108
kDS1 = 10433
109+
kDS1Star2700 = 30433
110+
kDS1Star2860 = 40433
109111
kDS2Star = 435
112+
kDS3Star2860 = 437
110113
kDStar = 413
111114
kDStar0 = 423
112115
kChiC1 = 20443
@@ -127,10 +130,15 @@ class Pdg(Enum):
127130
kXiCCPlusPlus = 4422
128131
kXiCPlus = 4232
129132
kXiC0 = 4132
133+
kXiC3055Plus = 4325
134+
kXiC3080Plus = 4326
135+
kXiC3055_0 = 4315
136+
kXiC3080_0 = 4316
130137
kDeuteron = 1000010020
131138
kTriton = 1000010030
132139
kHelium3 = 1000020030
133140
kAlpha = 1000020040
141+
kLithium4 = 1000030040
134142
kHyperTriton = 1010010030
135143
kHyperHydrogen4 = 1010010040
136144
kHyperHelium4 = 1010020040

DataFormats/simulation/include/SimulationDataFormat/O2DatabasePDG.h

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,47 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db)
640640
db->AddParticle("Anti-Theta_c_3100", "Anti-Theta_c_3100", 3.099, kFALSE,
641641
83.e-6, 0, "Resonance", ionCode); // same width as D*+ (83 keV)
642642
}
643-
if (!db->GetParticle(-ionCode)) {
644-
db->AddParticle("Theta_c_3100", "Theta_c_3100", 3.099, kFALSE,
645-
83.e-6, 0, "Resonance", -ionCode); // same width as D*+ (83 keV)
643+
db->AddAntiParticle("Theta_c_3100", -ionCode);
644+
645+
// Charm resonances not present in PYTHIA (consistent with https://github.com/AliceO2Group/O2DPG/blob/master/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_DResoTrigger.cfg)
646+
// Mesons
647+
ionCode = 30433;
648+
if (!db->GetParticle(ionCode)) {
649+
db->AddParticle("D*_s1_Plus_2700", "D*_s1_Plus_2700", 2.714, false, 0.122, 3, "Resonance", ionCode);
650+
}
651+
db->AddAntiParticle("D*_s1_Minus_2700", -ionCode);
652+
ionCode = 40433;
653+
if (!db->GetParticle(ionCode)) {
654+
db->AddParticle("D*_s1_Plus_2860", "D*_s1_Plus_2860", 2.859, false, 0.160, 3, "Resonance", ionCode);
655+
}
656+
db->AddAntiParticle("D*_s1_Minus_2860", -ionCode);
657+
ionCode = 437;
658+
if (!db->GetParticle(ionCode)) {
659+
db->AddParticle("D*_s3_Plus_2860", "D*_s3_Plus_2860", 2.860, false, 0.053, 3, "Resonance", ionCode);
660+
}
661+
db->AddAntiParticle("D*_s3_Minus_2860", -ionCode);
662+
663+
// Baryons
664+
ionCode = 4325;
665+
if (!db->GetParticle(ionCode)) {
666+
db->AddParticle("Xi_c_Plus_3055", "Xi_c_Plus_3055", 3.0559, false, 0.0078, 3, "Resonance", ionCode);
667+
}
668+
db->AddAntiParticle("Xi_c_Minus_3055", -ionCode);
669+
ionCode = 4326;
670+
if (!db->GetParticle(ionCode)) {
671+
db->AddParticle("Xi_c_Plus_3080", "Xi_c_Plus_3080", 3.0772, false, 0.0036, 3, "Resonance", ionCode);
672+
}
673+
db->AddAntiParticle("Xi_c_Minus_3080", -ionCode);
674+
ionCode = 4315;
675+
if (!db->GetParticle(ionCode)) {
676+
db->AddParticle("Xi_c_0_3055", "Xi_c_0_3055", 3.0590, false, 0.0064, 0, "Resonance", ionCode);
677+
}
678+
db->AddAntiParticle("Anti-Xi_c_0_3055", -ionCode);
679+
ionCode = 4316;
680+
if (!db->GetParticle(ionCode)) {
681+
db->AddParticle("Xi_c_0_3080", "Xi_c_0_3080", 3.0799, false, 0.0056, 0, "Resonance", ionCode);
646682
}
683+
db->AddAntiParticle("Anti-Xi_c_0_3080", -ionCode);
647684

648685
// d*(2380) - dibaryon resonance
649686

Detectors/AOD/include/AODProducerWorkflow/AODProducerWorkflowSpec.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ class AODProducerWorkflowDPL : public Task
271271
TString mAnchorPass{""};
272272
TString mAnchorProd{""};
273273
TString mRecoPass{""};
274+
TString mUser{"aliprod"}; // who created this AOD (aliprod, alidaq, individual users)
274275
TStopwatch mTimer;
275276
bool mEMCselectLeading{false};
276277
uint64_t mEMCALTrgClassMask = 0;

Detectors/AOD/src/AODProducerWorkflowSpec.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,7 @@ void AODProducerWorkflowDPL::init(InitContext& ic)
16751675
mLPMProdTag = ic.options().get<string>("lpmp-prod-tag");
16761676
mAnchorPass = ic.options().get<string>("anchor-pass");
16771677
mAnchorProd = ic.options().get<string>("anchor-prod");
1678+
mUser = ic.options().get<string>("created-by");
16781679
mRecoPass = ic.options().get<string>("reco-pass");
16791680
mTFNumber = ic.options().get<int64_t>("aod-timeframe-id");
16801681
mRecoOnly = ic.options().get<int>("reco-mctracks-only");
@@ -2398,8 +2399,8 @@ void AODProducerWorkflowDPL::run(ProcessingContext& pc)
23982399
TString dataType = mUseMC ? "MC" : "RAW";
23992400
TString O2Version = o2::fullVersion();
24002401
TString ROOTVersion = ROOT_RELEASE;
2401-
mMetaDataKeys = {"DataType", "Run", "O2Version", "ROOTVersion", "RecoPassName", "AnchorProduction", "AnchorPassName", "LPMProductionTag"};
2402-
mMetaDataVals = {dataType, "3", O2Version, ROOTVersion, mRecoPass, mAnchorProd, mAnchorPass, mLPMProdTag};
2402+
mMetaDataKeys = {"DataType", "Run", "O2Version", "ROOTVersion", "RecoPassName", "AnchorProduction", "AnchorPassName", "LPMProductionTag", "CreatedBy"};
2403+
mMetaDataVals = {dataType, "3", O2Version, ROOTVersion, mRecoPass, mAnchorProd, mAnchorPass, mLPMProdTag, mUser};
24032404
pc.outputs().snapshot(Output{"AMD", "AODMetadataKeys", 0}, mMetaDataKeys);
24042405
pc.outputs().snapshot(Output{"AMD", "AODMetadataVals", 0}, mMetaDataVals);
24052406

@@ -3256,6 +3257,7 @@ DataProcessorSpec getAODProducerWorkflowSpec(GID::mask_t src, bool enableSV, boo
32563257
ConfigParamSpec{"anchor-pass", VariantType::String, "", {"AnchorPassName"}},
32573258
ConfigParamSpec{"anchor-prod", VariantType::String, "", {"AnchorProduction"}},
32583259
ConfigParamSpec{"reco-pass", VariantType::String, "", {"RecoPassName"}},
3260+
ConfigParamSpec{"created-by", VariantType::String, "", {"Who created this AO2D"}},
32593261
ConfigParamSpec{"nthreads", VariantType::Int, std::max(1, int(std::thread::hardware_concurrency() / 2)), {"Number of threads"}},
32603262
ConfigParamSpec{"reco-mctracks-only", VariantType::Int, 0, {"Store only reconstructed MC tracks and their mothers/daughters. 0 -- off, != 0 -- on"}},
32613263
ConfigParamSpec{"ctpreadout-create", VariantType::Int, 0, {"Create CTP digits from detector readout and CTP inputs. !=1 -- off, 1 -- on"}},

Detectors/CTF/workflow/include/CTFWorkflow/CTFReaderSpec.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ struct CTFReaderInp {
3333
std::string fileIRFrames{};
3434
std::string fileRunTimeSpans{};
3535
std::vector<int> ctfIDs{};
36+
bool reverseCTFIDs{false};
3637
bool skipSkimmedOutTF = false;
3738
bool invertIRFramesSelection = false;
3839
bool allowMissingDetectors = false;
@@ -47,6 +48,7 @@ struct CTFReaderInp {
4748
unsigned int decSSpecEMC = 0;
4849
int tfRateLimit = -999;
4950
size_t minSHM = 0;
51+
bool shuffle{false};
5052
};
5153

5254
/// create a processor spec

Detectors/CTF/workflow/src/CTFReaderSpec.cxx

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@
1111

1212
/// @file CTFReaderSpec.cxx
1313

14+
#include <random>
1415
#include <vector>
16+
#include <algorithm>
17+
#include <numeric>
18+
1519
#include <TFile.h>
1620
#include <TTree.h>
21+
#include <TStopwatch.h>
1722

1823
#include "Framework/Logger.h"
1924
#include "Framework/ControlService.h"
@@ -49,7 +54,6 @@
4954
#include "CCDB/BasicCCDBManager.h"
5055
#include "CommonConstants/LHCConstants.h"
5156
#include "Algorithm/RangeTokenizer.h"
52-
#include <TStopwatch.h>
5357
#include <fairmq/Device.h>
5458

5559
using namespace o2::framework;
@@ -155,6 +159,9 @@ void CTFReaderSpec::stopReader()
155159
void CTFReaderSpec::init(InitContext& ic)
156160
{
157161
mInput.ctfIDs = o2::RangeTokenizer::tokenize<int>(ic.options().get<std::string>("select-ctf-ids"));
162+
if ((mInput.reverseCTFIDs = ic.options().get<bool>("reverse-select-ctf-ids"))) {
163+
std::reverse(mInput.ctfIDs.begin(), mInput.ctfIDs.end());
164+
}
158165
mUseLocalTFCounter = ic.options().get<bool>("local-tf-counter");
159166
mImposeRunStartMS = ic.options().get<int64_t>("impose-run-start-timstamp");
160167
mInput.checkTFLimitBeforeReading = ic.options().get<bool>("limit-tf-before-reading");
@@ -299,6 +306,27 @@ void CTFReaderSpec::openCTFFile(const std::string& flname)
299306
if (mCTFTree->GetEntries() < 1) {
300307
throw std::runtime_error(fmt::format("CTF tree in {} has 0 entries, skipping", flname));
301308
}
309+
if (mInput.shuffle) {
310+
if (mInput.ctfIDs.empty()) {
311+
int entries = mCTFTree->GetEntries();
312+
if (mInput.maxTFs > 0) {
313+
entries = std::min(entries, mInput.maxTFs);
314+
}
315+
if (mInput.maxTFsPerFile > 0) {
316+
entries = std::min(entries, mInput.maxTFsPerFile);
317+
}
318+
mInput.ctfIDs.clear();
319+
mInput.ctfIDs.resize(entries);
320+
std::iota(mInput.ctfIDs.begin(), mInput.ctfIDs.end(), 0);
321+
}
322+
std::random_device dev;
323+
std::mt19937 gen{dev()};
324+
std::shuffle(mInput.ctfIDs.begin(), mInput.ctfIDs.end(), gen);
325+
LOGP(info, "will shuffle reading of CTF entries in this order:");
326+
for (int i{0}; i < (int)mInput.ctfIDs.size(); ++i) {
327+
LOGP(info, "\tTF {:02} -> {:02}", i, mInput.ctfIDs[i]);
328+
}
329+
}
302330
} catch (const std::exception& e) {
303331
LOG(error) << "Cannot process " << flname << ", reason: " << e.what();
304332
mCTFTree.reset();
@@ -322,9 +350,12 @@ void CTFReaderSpec::run(ProcessingContext& pc)
322350
long startWait = 0;
323351

324352
while (mRunning) {
325-
if (mCTFTree) { // there is a tree open with multiple CTF
326-
if (mInput.ctfIDs.empty() || mInput.ctfIDs[mSelIDEntry] == mCTFCounter) { // no selection requested or matching CTF ID is found
353+
if (mCTFTree) { // there is a tree open with multiple CTF
354+
if (mInput.ctfIDs.empty() || mInput.ctfIDs[mSelIDEntry] == mCTFCounter || mInput.shuffle || mInput.reverseCTFIDs) { // no selection requested or matching CTF ID is found
327355
LOG(debug) << "TF " << mCTFCounter << " of " << mInput.maxTFs << " loop " << mFileFetcher->getNLoops();
356+
if (mInput.shuffle || mInput.reverseCTFIDs) {
357+
mCurrTreeEntry = mInput.ctfIDs[mSelIDEntry];
358+
}
328359
mSelIDEntry++;
329360
if (processTF(pc)) {
330361
break;
@@ -500,8 +531,13 @@ bool CTFReaderSpec::processTF(ProcessingContext& pc)
500531
///_______________________________________
501532
void CTFReaderSpec::checkTreeEntries()
502533
{
503-
// check if the tree has entries left, if needed, close current tree/file
504-
if (++mCurrTreeEntry >= mCTFTree->GetEntries() || (mInput.maxTFsPerFile > 0 && mCurrTreeEntry >= mInput.maxTFsPerFile)) { // this file is done, check if there are other files
534+
bool reachedEnd{false};
535+
if (mInput.shuffle || mInput.reverseCTFIDs) { // last entry is last id
536+
reachedEnd = (mCurrTreeEntry == mInput.ctfIDs.back());
537+
} else { // check if the tree has entries left, if needed, close current tree/file
538+
reachedEnd = (++mCurrTreeEntry >= mCTFTree->GetEntries());
539+
}
540+
if (reachedEnd || (mInput.maxTFsPerFile > 0 && mCurrTreeEntry >= mInput.maxTFsPerFile)) { // this file is done, check if there are other files
505541
mCTFTree.reset();
506542
mCTFFile->Close();
507543
mCTFFile.reset();
@@ -611,6 +647,7 @@ DataProcessorSpec getCTFReaderSpec(const CTFReaderInp& inp)
611647
}
612648

613649
options.emplace_back(ConfigParamSpec{"select-ctf-ids", VariantType::String, "", {"comma-separated list CTF IDs to inject (from cumulative counter of CTFs seen)"}});
650+
options.emplace_back(ConfigParamSpec{"reverse-select-ctf-ids", VariantType::Bool, false, {"reverse order of to inject CTF IDs"}});
614651
options.emplace_back(ConfigParamSpec{"impose-run-start-timstamp", VariantType::Int64, 0L, {"impose run start time stamp (ms), ignored if 0"}});
615652
options.emplace_back(ConfigParamSpec{"local-tf-counter", VariantType::Bool, false, {"reassign header.tfCounter from local TF counter"}});
616653
options.emplace_back(ConfigParamSpec{"fetch-failure-threshold", VariantType::Float, 0.f, {"Fail if too many failures( >0: fraction, <0: abs number, 0: no threshold)"}});

Detectors/CTF/workflow/src/ctf-reader-workflow.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
5656
options.push_back(ConfigParamSpec{"skipDet", VariantType::String, std::string{DetID::NONE}, {"comma-separate list of detectors to skip"}});
5757
options.push_back(ConfigParamSpec{"loop", VariantType::Int, 0, {"loop N times (infinite for N<0)"}});
5858
options.push_back(ConfigParamSpec{"delay", VariantType::Float, 0.f, {"delay in seconds between consecutive TFs sending"}});
59+
options.push_back(ConfigParamSpec{"shuffle", VariantType::Bool, false, {"shuffle TF sending order (for debug)"}});
5960
options.push_back(ConfigParamSpec{"copy-cmd", VariantType::String, "alien_cp ?src file://?dst", {"copy command for remote files or no-copy to avoid copying"}}); // Use "XrdSecPROTOCOL=sss,unix xrdcp -N root://eosaliceo2.cern.ch/?src ?dst" for direct EOS access
6061
options.push_back(ConfigParamSpec{"ctf-file-regex", VariantType::String, ".*o2_ctf_run.+\\.root$", {"regex string to identify CTF files"}});
6162
options.push_back(ConfigParamSpec{"remote-regex", VariantType::String, "^(alien://|)/alice/data/.+", {"regex string to identify remote files"}}); // Use "^/eos/aliceo2/.+" for direct EOS access
@@ -120,6 +121,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
120121

121122
ctfInput.maxFileCache = std::max(1, configcontext.options().get<int>("max-cached-files"));
122123

124+
ctfInput.shuffle = configcontext.options().get<bool>("shuffle");
123125
ctfInput.copyCmd = configcontext.options().get<std::string>("copy-cmd");
124126
ctfInput.tffileRegex = configcontext.options().get<std::string>("ctf-file-regex");
125127
ctfInput.remoteRegex = configcontext.options().get<std::string>("remote-regex");

Detectors/EMCAL/base/include/EMCALBase/ClusterFactory.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#define ALICEO2_EMCAL_CLUSTERFACTORY_H_
1313
#include <array>
1414
#include <vector>
15-
#include <optional>
1615
#include <utility>
1716
#include <gsl/span>
1817
#include "Rtypes.h"
@@ -336,16 +335,16 @@ class ClusterFactory
336335
bool getUseWeightExotic() const { return mUseWeightExotic; }
337336
void setUseWeightExotic(float useWeightExotic) { mUseWeightExotic = useWeightExotic; }
338337

339-
void setContainer(gsl::span<const o2::emcal::Cluster> clusterContainer, gsl::span<const InputType> cellContainer, gsl::span<const int> indicesContainer, std::optional<gsl::span<const o2::emcal::CellLabel>> cellLabelContainer = std::nullopt)
338+
void setContainer(gsl::span<const o2::emcal::Cluster> clusterContainer, gsl::span<const InputType> cellContainer, gsl::span<const int> indicesContainer, gsl::span<const o2::emcal::CellLabel> cellLabelContainer = {})
340339
{
341340
mClustersContainer = clusterContainer;
342341
mInputsContainer = cellContainer;
343342
mCellsIndices = indicesContainer;
344343
if (!getLookUpInit()) {
345344
setLookUpTable();
346345
}
347-
if (cellLabelContainer) {
348-
mCellLabelContainer = cellLabelContainer.value();
346+
if (!cellLabelContainer.empty()) {
347+
mCellLabelContainer = cellLabelContainer;
349348
}
350349
}
351350

0 commit comments

Comments
 (0)