Skip to content

Commit e3272bb

Browse files
Merge branch 'AliceO2Group:master' into master
2 parents c35f72d + 56df3a0 commit e3272bb

289 files changed

Lines changed: 24819 additions & 10005 deletions

File tree

Some content is hidden

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

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ struct OnTheFlyTracker {
5858
Produces<aod::TracksCovExtension> tracksParCovExtension;
5959
Produces<aod::McTrackLabels> tracksLabels;
6060
Produces<aod::TracksDCA> tracksDCA;
61+
Produces<aod::TracksDCACov> tracksDCACov;
6162
Produces<aod::CollisionsAlice3> collisionsAlice3;
6263
Produces<aod::TracksAlice3> TracksAlice3;
6364

@@ -76,6 +77,7 @@ struct OnTheFlyTracker {
7677
Configurable<bool> interpolateLutEfficiencyVsNch{"interpolateLutEfficiencyVsNch", true, "interpolate LUT efficiency as f(Nch)"};
7778

7879
Configurable<bool> populateTracksDCA{"populateTracksDCA", true, "populate TracksDCA table"};
80+
Configurable<bool> populateTracksDCACov{"populateTracksDCACov", false, "populate TracksDCACov table"};
7981
Configurable<bool> populateTracksExtra{"populateTracksExtra", false, "populate TracksExtra table (legacy)"};
8082
Configurable<bool> populateTrackSelection{"populateTrackSelection", false, "populate TrackSelection table (legacy)"};
8183

@@ -464,8 +466,10 @@ struct OnTheFlyTracker {
464466
histos.fill(HIST("hTrackXatDCA"), trackParametrization.getX());
465467
}
466468
tracksDCA(dcaXY, dcaZ);
469+
if (populateTracksDCACov) {
470+
tracksDCACov(dcaInfo.getSigmaY2(), dcaInfo.getSigmaZ2());
471+
}
467472
}
468-
469473
tracksPar(collisions.lastIndex(), trackType, trackParCov.getX(), trackParCov.getAlpha(), trackParCov.getY(), trackParCov.getZ(), trackParCov.getSnp(), trackParCov.getTgl(), trackParCov.getQ2Pt());
470474
tracksParExtension(trackParCov.getPt(), trackParCov.getP(), trackParCov.getEta(), trackParCov.getPhi());
471475

@@ -508,6 +512,9 @@ struct OnTheFlyTracker {
508512
histos.fill(HIST("hTrackXatDCA"), trackParametrization.getX());
509513
}
510514
tracksDCA(dcaXY, dcaZ);
515+
if (populateTracksDCACov) {
516+
tracksDCACov(dcaInfo.getSigmaY2(), dcaInfo.getSigmaZ2());
517+
}
511518
}
512519

513520
tracksPar(collisions.lastIndex(), trackType, trackParCov.getX(), trackParCov.getAlpha(), trackParCov.getY(), trackParCov.getZ(), trackParCov.getSnp(), trackParCov.getTgl(), trackParCov.getQ2Pt());

ALICE3/Tasks/alice3-qa-singleparticle.cxx

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,16 @@ struct Alice3SingleParticle {
166166
histos.add("particle/mothers/prodVz", "Mothers Prod. Vertex Z " + tit, kTH1D, {axisProdz});
167167
histos.add("particle/mothers/prodRadiusVsPt", "Mothers Prod. Vertex Radius " + tit, kTH2D, {axisPt, axisProdRadius});
168168
histos.add("particle/mothers/prodRadius3DVsPt", "Mothers Prod. Vertex Radius XYZ " + tit, kTH2D, {axisPt, axisProdRadius});
169+
170+
histos.add("particle/mothers/mothers/PDGs", "Mothers mothers PDGs " + tit, kTH2D, {axisPDGs, axisCharge});
171+
histos.add("particle/mothers/mothers/PDGsPrimaries", "Mothers mothers PDGs Primaries of " + tit, kTH2D, {axisPDGs, axisCharge});
172+
histos.add("particle/mothers/mothers/PDGsSecondaries", "Mothers mothers PDGs Secondaries of " + tit, kTH2D, {axisPDGs, axisCharge});
173+
histos.add("particle/mothers/mothers/prodVx", "Mothers mothers Prod. Vertex X " + tit, kTH1D, {axisProdx});
174+
histos.add("particle/mothers/mothers/prodVy", "Mothers mothers Prod. Vertex Y " + tit, kTH1D, {axisPrody});
175+
histos.add("particle/mothers/mothers/prodVz", "Mothers mothers Prod. Vertex Z " + tit, kTH1D, {axisProdz});
176+
histos.add("particle/mothers/mothers/prodRadiusVsPt", "Mothers mothers Prod. Vertex Radius " + tit, kTH2D, {axisPt, axisProdRadius});
177+
histos.add("particle/mothers/mothers/prodRadius3DVsPt", "Mothers mothers Prod. Vertex Radius XYZ " + tit, kTH2D, {axisPt, axisProdRadius});
178+
169179
if (doprocessParticleOnly) {
170180
return;
171181
}
@@ -285,7 +295,7 @@ struct Alice3SingleParticle {
285295
}
286296
}
287297
if (mcParticle.has_mothers()) {
288-
auto mothers = mcParticle.mothers_as<aod::McParticles>();
298+
const auto& mothers = mcParticle.mothers_as<aod::McParticles>();
289299
for (const auto& mother : mothers) {
290300
const auto& pdgStringMot = getPdgCodeString(mother);
291301
const auto& pdgChargeMot = getCharge(mother);
@@ -302,6 +312,26 @@ struct Alice3SingleParticle {
302312
histos.fill(HIST("particle/mothers/prodVz"), mother.vz());
303313
histos.fill(HIST("particle/mothers/prodRadiusVsPt"), mother.pt(), std::sqrt(mother.vx() * mother.vx() + mother.vy() * mother.vy()));
304314
histos.fill(HIST("particle/mothers/prodRadius3DVsPt"), mother.pt(), std::sqrt(mother.vx() * mother.vx() + mother.vy() * mother.vy() + mother.vz() * mother.vz()));
315+
if (mother.has_mothers()) {
316+
const auto& mothers2 = mother.mothers_as<aod::McParticles>();
317+
for (const auto& mother2 : mothers2) {
318+
const auto& pdgStringMot2 = getPdgCodeString(mother2);
319+
const auto& pdgChargeMot2 = getCharge(mother2);
320+
321+
histos.get<TH2>(HIST("particle/mothers/mothers/PDGs"))->Fill(pdgStringMot2, pdgChargeMot2, 1.f);
322+
if (mcParticle.isPhysicalPrimary()) {
323+
histos.get<TH2>(HIST("particle/mothers/mothers/PDGsPrimaries"))->Fill(pdgStringMot2, pdgChargeMot2, 1.f);
324+
} else {
325+
histos.get<TH2>(HIST("particle/mothers/mothers/PDGsSecondaries"))->Fill(pdgStringMot2, pdgChargeMot2, 1.f);
326+
}
327+
328+
histos.fill(HIST("particle/mothers/mothers/prodVx"), mother2.vx());
329+
histos.fill(HIST("particle/mothers/mothers/prodVy"), mother2.vy());
330+
histos.fill(HIST("particle/mothers/mothers/prodVz"), mother2.vz());
331+
histos.fill(HIST("particle/mothers/mothers/prodRadiusVsPt"), mother2.pt(), std::sqrt(mother2.vx() * mother2.vx() + mother2.vy() * mother2.vy()));
332+
histos.fill(HIST("particle/mothers/mothers/prodRadius3DVsPt"), mother2.pt(), std::sqrt(mother2.vx() * mother2.vx() + mother2.vy() * mother2.vy() + mother2.vz() * mother2.vz()));
333+
}
334+
}
305335
}
306336
}
307337

@@ -335,7 +365,8 @@ struct Alice3SingleParticle {
335365
if (track.hasTOF()) {
336366
histos.get<TH2>(HIST("track/tofPDGs"))->Fill(getPdgCodeString(mcParticle), getCharge(mcParticle), 1.f);
337367
}
338-
if (!IsStable) {
368+
if (IsStable.value == 0) {
369+
LOG(info) << mcParticle.pdgCode() << " asked for " << PDG.value;
339370
if (!mcParticle.has_mothers()) {
340371
continue;
341372
}
@@ -624,13 +655,12 @@ struct Alice3SingleParticle {
624655
if (track.hasTOF()) {
625656
histos.get<TH2>(HIST("track/tofPDGs"))->Fill(getPdgCodeString(mcParticle), getCharge(mcParticle), 1.f);
626657
}
627-
if (!IsStable) {
658+
if (IsStable.value == 0) {
628659
if (!mcParticle.has_mothers()) {
629660
continue;
630661
}
631-
// auto mothers = mcParticle.mothers();
632-
auto mothers = mcParticle.mothers_as<aod::McParticles>();
633-
const auto ParticleIsInteresting = std::find(ParticlesOfInterest.begin(), ParticlesOfInterest.end(), mothers[0].globalIndex()) != ParticlesOfInterest.end();
662+
const auto& mothers = mcParticle.mothers_as<aod::McParticles>();
663+
const auto& ParticleIsInteresting = std::find(ParticlesOfInterest.begin(), ParticlesOfInterest.end(), mothers[0].globalIndex()) != ParticlesOfInterest.end();
634664
if (!ParticleIsInteresting) {
635665
continue;
636666
}

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/Common/Tools/Multiplicity @alibuild @ddobrigk @victor-gonzalez
1717
/ALICE3 @alibuild @njacazio @hscheid
1818
/DPG @alibuild @chiarazampolli @noferini
19-
/DPG/Tasks/AOTEvent @alibuild @ekryshen @strogolo
19+
/DPG/Tasks/AOTEvent @alibuild @ekryshen @strogolo @altsybee
2020
/DPG/Tasks/AOTTrack @alibuild @mfaggin @iouribelikov @njacazio
2121
/DPG/Tasks/TOF @alibuild @noferini @njacazio
2222
/DPG/Tasks/FT0 @alibuild @afurs

Common/CCDB/macros/upload_trigger_aliases_run3.C

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ void createPbPbAliases(map<int, TString>& mAliases)
4646
void upload_trigger_aliases_run3()
4747
{
4848
map<int, TString> mAliases;
49-
// createDefaultAliases(mAliases);
50-
createPbPbAliases(mAliases);
49+
createDefaultAliases(mAliases);
50+
// createPbPbAliases(mAliases);
5151

5252
TObjArray* classNames[kNaliases];
5353
for (auto& al : mAliases) {
@@ -62,7 +62,7 @@ void upload_trigger_aliases_run3()
6262
map<string, string> metadata;
6363

6464
// read list of runs from text file
65-
std::ifstream f("run3_pbpb2023.txt");
65+
std::ifstream f("runs.txt");
6666
std::vector<int> runs;
6767
int r = 0;
6868
while (f >> r) {
@@ -117,7 +117,7 @@ void upload_trigger_aliases_run3()
117117
TriggerAliases* aliases = new TriggerAliases();
118118
for (auto& al : mAliases) {
119119
int aliasId = al.first;
120-
LOGP(debug, "alias = {}", al.second);
120+
LOGP(debug, "alias = {}", al.second.Data());
121121
for (const auto& className : *(classNames[aliasId])) {
122122
TString sname = className->GetName();
123123
LOGP(debug, " className = {}", sname.Data());
@@ -150,6 +150,6 @@ void upload_trigger_aliases_run3()
150150
}
151151
}
152152
aliases->Print();
153-
ccdb.storeAsTFileAny(aliases, "EventSelection/TriggerAliases", metadata, sor, eor + 10000); // adding tolerance of 10s to eor
153+
ccdb.storeAsTFileAny(aliases, "EventSelection/TriggerAliases", metadata, sor - 1000, eor + 10000); // adding tolerance of 10s to eor
154154
}
155155
}

Common/DataModel/PIDResponse.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ using hasTPCAl = decltype(std::declval<T&>().tpcNSigmaAl());
9696
// PID index as template argument
9797
#define perSpeciesWrapper(functionName) \
9898
template <o2::track::PID::ID index, typename TrackType> \
99-
const auto functionName(const TrackType& track) \
99+
auto functionName(const TrackType& track) \
100100
{ \
101101
if constexpr (index == o2::track::PID::Electron) { \
102102
return track.functionName##El(); \
@@ -122,7 +122,7 @@ using hasTPCAl = decltype(std::declval<T&>().tpcNSigmaAl());
122122
perSpeciesWrapper(tofNSigma);
123123
perSpeciesWrapper(tofExpSigma);
124124
template <o2::track::PID::ID index, typename TrackType>
125-
const auto tofExpSignal(const TrackType& track)
125+
auto tofExpSignal(const TrackType& track)
126126
{
127127
if constexpr (index == o2::track::PID::Electron) {
128128
return track.tofExpSignalEl(track.tofSignal());
@@ -149,7 +149,7 @@ perSpeciesWrapper(tofExpSignalDiff);
149149
perSpeciesWrapper(tpcNSigma);
150150
perSpeciesWrapper(tpcExpSigma);
151151
template <o2::track::PID::ID index, typename TrackType>
152-
const auto tpcExpSignal(const TrackType& track)
152+
auto tpcExpSignal(const TrackType& track)
153153
{
154154
if constexpr (index == o2::track::PID::Electron) {
155155
return track.tpcExpSignalEl(track.tpcSignal());
@@ -178,7 +178,7 @@ perSpeciesWrapper(tpcExpSignalDiff);
178178
// PID index as function argument for TOF
179179
#define perSpeciesWrapper(functionName) \
180180
template <typename TrackType> \
181-
const auto functionName(const o2::track::PID::ID index, const TrackType& track) \
181+
auto functionName(const o2::track::PID::ID index, const TrackType& track) \
182182
{ \
183183
switch (index) { \
184184
case o2::track::PID::Electron: \
@@ -226,7 +226,7 @@ perSpeciesWrapper(tpcExpSignalDiff);
226226
perSpeciesWrapper(tofNSigma);
227227
perSpeciesWrapper(tofExpSigma);
228228
template <typename TrackType>
229-
const auto tofExpSignal(const o2::track::PID::ID index, const TrackType& track)
229+
auto tofExpSignal(const o2::track::PID::ID index, const TrackType& track)
230230
{
231231
switch (index) {
232232
case o2::track::PID::Electron:
@@ -277,7 +277,7 @@ perSpeciesWrapper(tofExpSignalDiff);
277277
// PID index as function argument for TPC
278278
#define perSpeciesWrapper(functionName) \
279279
template <typename TrackType> \
280-
const auto functionName(const o2::track::PID::ID index, const TrackType& track) \
280+
auto functionName(const o2::track::PID::ID index, const TrackType& track) \
281281
{ \
282282
switch (index) { \
283283
case o2::track::PID::Electron: \
@@ -325,7 +325,7 @@ perSpeciesWrapper(tofExpSignalDiff);
325325
perSpeciesWrapper(tpcNSigma);
326326
perSpeciesWrapper(tpcExpSigma);
327327
template <typename TrackType>
328-
const auto tpcExpSignal(const o2::track::PID::ID index, const TrackType& track)
328+
auto tpcExpSignal(const o2::track::PID::ID index, const TrackType& track)
329329
{
330330
switch (index) {
331331
case o2::track::PID::Electron:

Common/TableProducer/eventSelection.cxx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,7 @@ struct EventSelectionTask {
640640
int nITSTPCtracks = 0;
641641
int nTOFtracks = 0;
642642
int nTRDtracks = 0;
643-
int nTRDnotTOFtracks = 0;
644643
double timeFromTOFtracks = 0;
645-
double timeFromTRDtracks = 0;
646644
auto tracksGrouped = tracks.sliceBy(perCollision, col.globalIndex());
647645
for (auto& track : tracksGrouped) {
648646
if (!track.isPVContributor()) {
@@ -651,22 +649,17 @@ struct EventSelectionTask {
651649
nITSTPCtracks += track.hasITS() && track.hasTPC();
652650
nTOFtracks += track.hasTOF();
653651
nTRDtracks += track.hasTRD();
654-
nTRDnotTOFtracks += track.hasTRD() && !track.hasTOF();
655-
// calculate average time using TOF and TRD tracks
652+
// calculate average time using TOF tracks
656653
if (track.hasTOF()) {
657654
timeFromTOFtracks += track.trackTime();
658-
} else if (track.hasTRD()) {
659-
timeFromTRDtracks += track.trackTime();
660655
}
656+
661657
if (track.itsNCls() >= 5)
662658
nITS567cls++;
663659
}
664-
LOGP(debug, "nContrib={} nITSTPCtracks={} nTOFtracks={} nTRDtracks={} nTRDnotTOFtracks={}", col.numContrib(), nITSTPCtracks, nTOFtracks, nTRDtracks, nTRDnotTOFtracks);
660+
LOGP(debug, "nContrib={} nITSTPCtracks={} nTOFtracks={} nTRDtracks={}", col.numContrib(), nITSTPCtracks, nTOFtracks, nTRDtracks);
665661

666-
if (nTRDnotTOFtracks > 0) {
667-
meanBC += TMath::Nint(timeFromTRDtracks / nTRDnotTOFtracks / bcNS); // assign collision bc using TRD-matched tracks
668-
deltaBC = 0; // use precise bc from TRD-matched tracks
669-
} else if (nTOFtracks > 0) {
662+
if (nTOFtracks > 0) {
670663
meanBC += TMath::FloorNint(timeFromTOFtracks / nTOFtracks / bcNS); // assign collision bc using TOF-matched tracks
671664
deltaBC = 4; // use precise bc from TOF tracks with +/-4 bc margin
672665
} else if (nITSTPCtracks > 0) {
@@ -819,8 +812,12 @@ struct EventSelectionTask {
819812
bool decisions[4];
820813
for (int iCut = 0; iCut < 4; iCut++) {
821814
decisions[iCut] = true;
822-
for (int iTime = 0; iTime < nTimeIntervals; iTime++)
823-
decisions[iCut] *= (nITS567tracksInTimeBins[iTime] < coeffOccupInTimeBins[iCut] * confReferenceOccupanciesInTimeBins->at(iTime));
815+
for (int iTime = 0; iTime < nTimeIntervals; iTime++) {
816+
if (nITS567tracksInTimeBins[iTime] >= coeffOccupInTimeBins[iCut] * confReferenceOccupanciesInTimeBins->at(iTime)) {
817+
decisions[iCut] = false;
818+
break;
819+
}
820+
}
824821
}
825822
vNoOccupStrictCuts[colIndex] = decisions[0];
826823
vNoOccupMediumCuts[colIndex] = decisions[1];

Common/TableProducer/qVectorsTable.cxx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,14 @@ struct qVectorsTable {
402402
continue;
403403
}
404404
histosQA.fill(HIST("ChTracks"), trk.pt(), trk.eta(), trk.phi(), cent);
405-
if (std::abs(trk.eta()) < 0.1 || std::abs(trk.eta()) > 0.8) {
405+
if (std::abs(trk.eta()) > 0.8) {
406+
continue;
407+
}
408+
qVectBTot[0] += trk.pt() * std::cos(trk.phi() * nmode);
409+
qVectBTot[1] += trk.pt() * std::sin(trk.phi() * nmode);
410+
TrkBTotLabel.push_back(trk.globalIndex());
411+
nTrkBTot++;
412+
if (std::abs(trk.eta()) < 0.1) {
406413
continue;
407414
}
408415
if (trk.eta() > 0 && useDetector["QvectorBPoss"]) {
@@ -416,10 +423,6 @@ struct qVectorsTable {
416423
TrkBNegLabel.push_back(trk.globalIndex());
417424
nTrkBNeg++;
418425
}
419-
qVectBTot[0] += trk.pt() * std::cos(trk.phi() * nmode);
420-
qVectBTot[1] += trk.pt() * std::sin(trk.phi() * nmode);
421-
TrkBTotLabel.push_back(trk.globalIndex());
422-
nTrkBTot++;
423426
}
424427
if (nTrkBPos > 0) {
425428
qVectBPos[0] /= nTrkBPos;
@@ -527,7 +530,7 @@ struct qVectorsTable {
527530
int ind = cfgnMods->at(id);
528531
CalQvec(ind, coll, tracks, qvecRe, qvecIm, qvecAmp, TrkBPosLabel, TrkBNegLabel, TrkBTotLabel);
529532
if (cent < 80) {
530-
for (auto i{0u}; i < 6; i++) {
533+
for (auto i{0u}; i < kBTot + 1; i++) {
531534
helperEP.DoRecenter(qvecRe[(kBTot + 1) * 4 * id + i * 4 + 1], qvecIm[(kBTot + 1) * 4 * id + i * 4 + 1],
532535
objQvec.at(id)->GetBinContent(static_cast<int>(cent) + 1, 1, i + 1), objQvec.at(id)->GetBinContent(static_cast<int>(cent) + 1, 2, i + 1));
533536

Common/Tasks/centralityStudy.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ struct centralityStudy {
181181
if constexpr (requires { collision.centFT0C(); }) {
182182
// process FT0C centrality plots
183183
histos.fill(HIST("hNContribsVsCentrality"), collision.centFT0C(), collision.multPVTotalContributors());
184-
histos.fill(HIST("hNITSTPCTracksVsCentrality"), collision.centFT0C(), collision.multNTracksITSOnly());
184+
histos.fill(HIST("hNITSTPCTracksVsCentrality"), collision.centFT0C(), collision.multNTracksITSTPC());
185185
histos.fill(HIST("hNITSOnlyTracksVsCentrality"), collision.centFT0C(), collision.multNTracksITSOnly());
186186
histos.fill(HIST("hNGlobalTracksVsCentrality"), collision.centFT0C(), collision.multNTracksGlobal());
187187
histos.fill(HIST("hPVChi2VsCentrality"), collision.centFT0C(), collision.multPVChi2());

0 commit comments

Comments
 (0)