Skip to content

Commit 70cfa91

Browse files
Merge branch 'master' into flow_new
2 parents 8d582f0 + 3ae2438 commit 70cfa91

File tree

121 files changed

+9614
-9333
lines changed

Some content is hidden

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

121 files changed

+9614
-9333
lines changed

.clang-format

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,60 @@ PenaltyBreakFirstLessLess: 120
3939
PenaltyBreakString: 1000
4040
PenaltyExcessCharacter: 1000000
4141
PenaltyReturnTypeOnItsOwnLine: 200
42-
SortIncludes: false
42+
SortIncludes: CaseSensitive
43+
IncludeBlocks: Regroup
44+
IncludeCategories:
45+
# O2Physics, PWG
46+
- Regex: ^(<|")PWG[A-Z]{2}/.*\.h
47+
Priority: 2
48+
CaseSensitive: true
49+
# O2Physics, non-PWG
50+
- Regex: ^(<|")(Common|ALICE3|DPG|EventFiltering|Tools|Tutorials)/.*\.h
51+
Priority: 3
52+
CaseSensitive: true
53+
# O2
54+
- Regex: ^(<|")(Algorithm|CCDB|Common[A-Z]|DataFormats|DCAFitter|Detectors|EMCAL|Field|Framework|FT0|FV0|GlobalTracking|ITS|MathUtils|MFT|MCH|MID|PHOS|PID|ReconstructionDataFormats|SimulationDataFormat|TOF|TPC|ZDC).*/.*\.h
55+
Priority: 4
56+
CaseSensitive: true
57+
# ROOT
58+
- Regex: ^(<|")(T[A-Z]|Math/|Roo[A-Z])[[:alnum:]/]+\.h
59+
Priority: 5
60+
CaseSensitive: true
61+
# known third-party: KFParticle
62+
- Regex: ^(<|")KF[A-Z][[:alnum:]]+\.h
63+
Priority: 6
64+
CaseSensitive: true
65+
# known third-party: FastJet
66+
- Regex: ^(<|")fastjet/
67+
Priority: 6
68+
CaseSensitive: true
69+
# known third-party: ONNX runtime
70+
- Regex: ^(<|")onnxruntime
71+
Priority: 6
72+
CaseSensitive: true
73+
# incomplete path to DataModel
74+
- Regex: ^(<|").*DataModel/
75+
Priority: 1
76+
CaseSensitive: true
77+
# other third-party
78+
- Regex: ^(<|")([[:alnum:]_]+/)+[[:alnum:]_]+\.h
79+
Priority: 6
80+
CaseSensitive: true
81+
# other local-looking file
82+
- Regex: ^".*\.
83+
Priority: 1
84+
CaseSensitive: true
85+
# C system
86+
- Regex: ^(<|")[[:lower:]_]+\.h(>|")
87+
Priority: 102
88+
CaseSensitive: true
89+
# C++ system
90+
- Regex: ^(<|")[[:lower:]_/]+(>|")
91+
Priority: 101
92+
CaseSensitive: true
93+
# rest
94+
- Regex: .*
95+
Priority: 100
4396
SpaceBeforeAssignmentOperators: true
4497
SpaceBeforeParens: ControlStatements
4598
SpaceInEmptyParentheses: false

ALICE3/Core/DelphesO2LutWriter.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include "ALICE3/Core/DelphesO2TrackSmearer.h"
2525
#include "ALICE3/Core/DelphesO2LutWriter.h"
26-
#include "iostream"
26+
#include <iostream>
2727
#include "TMatrixD.h"
2828
#include "TVectorD.h"
2929
#include "TAxis.h"

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,48 +23,42 @@
2323
/// \author Roberto Preghenella preghenella@bo.infn.it
2424
///
2525

26-
#include <utility>
27-
#include <array>
28-
#include <string>
29-
#include <map>
30-
#include <vector>
31-
32-
#include <TGeoGlobalMagField.h>
33-
#include <TGenPhaseSpace.h>
34-
#include <TLorentzVector.h>
35-
#include <TRandom3.h>
26+
#include "ALICE3/Core/DelphesO2TrackSmearer.h"
27+
#include "ALICE3/Core/DetLayer.h"
28+
#include "ALICE3/Core/FastTracker.h"
29+
#include "ALICE3/Core/TrackUtilities.h"
30+
#include "ALICE3/DataModel/OTFStrangeness.h"
31+
#include "ALICE3/DataModel/collisionAlice3.h"
32+
#include "ALICE3/DataModel/tracksAlice3.h"
33+
#include "Common/Core/RecoDecay.h"
34+
#include "Common/DataModel/TrackSelectionTables.h"
3635

36+
#include "CommonConstants/MathConstants.h"
37+
#include "DCAFitter/DCAFitterN.h"
38+
#include "DataFormatsParameters/GRPMagField.h"
39+
#include "DetectorsBase/Propagator.h"
40+
#include "DetectorsVertexing/PVertexer.h"
41+
#include "DetectorsVertexing/PVertexerHelpers.h"
42+
#include "Field/MagneticField.h"
3743
#include "Framework/AnalysisDataModel.h"
3844
#include "Framework/AnalysisTask.h"
39-
#include "Framework/runDataProcessing.h"
4045
#include "Framework/HistogramRegistry.h"
41-
#include <TPDGCode.h>
42-
#include "DCAFitter/DCAFitterN.h"
43-
#include "Common/Core/RecoDecay.h"
4446
#include "Framework/O2DatabasePDGPlugin.h"
45-
#include "Common/DataModel/TrackSelectionTables.h"
47+
#include "Framework/runDataProcessing.h"
4648
#include "ReconstructionDataFormats/DCA.h"
47-
#include "DetectorsBase/Propagator.h"
48-
#include "DataFormatsParameters/GRPMagField.h"
49-
#include "DetectorsVertexing/PVertexer.h"
50-
#include "DetectorsVertexing/PVertexerHelpers.h"
5149
#include "SimulationDataFormat/InteractionSampler.h"
52-
#include "Field/MagneticField.h"
5350

54-
#include "ITSMFTSimulation/Hit.h"
55-
#include "ITStracking/Configuration.h"
56-
#include "ITStracking/IOUtils.h"
57-
#include "ITStracking/Tracker.h"
58-
#include "ITStracking/Vertexer.h"
59-
#include "ITStracking/VertexerTraits.h"
51+
#include <TGenPhaseSpace.h>
52+
#include <TGeoGlobalMagField.h>
53+
#include <TLorentzVector.h>
54+
#include <TPDGCode.h>
55+
#include <TRandom3.h>
6056

61-
#include "ALICE3/Core/DelphesO2TrackSmearer.h"
62-
#include "ALICE3/Core/FastTracker.h"
63-
#include "ALICE3/Core/DetLayer.h"
64-
#include "ALICE3/Core/TrackUtilities.h"
65-
#include "ALICE3/DataModel/collisionAlice3.h"
66-
#include "ALICE3/DataModel/tracksAlice3.h"
67-
#include "ALICE3/DataModel/OTFStrangeness.h"
57+
#include <array>
58+
#include <map>
59+
#include <string>
60+
#include <utility>
61+
#include <vector>
6862

6963
using namespace o2;
7064
using namespace o2::framework;
@@ -808,7 +802,7 @@ struct OnTheFlyTracker {
808802
std::array<float, 3> posClusterCandidate;
809803
trackParCov.getXYZGlo(posClusterCandidate);
810804
float r{std::hypot(posClusterCandidate[0], posClusterCandidate[1])};
811-
float phi{std::atan2(-posClusterCandidate[1], -posClusterCandidate[0]) + o2::its::constants::math::Pi};
805+
float phi{std::atan2(-posClusterCandidate[1], -posClusterCandidate[0]) + o2::constants::math::PI};
812806
o2::fastsim::DetLayer currentTrackingLayer = fastTracker.GetLayer(i);
813807

814808
if (currentTrackingLayer.getResolutionRPhi() > 1e-8 && currentTrackingLayer.getResolutionZ() > 1e-8) { // catch zero (though should not really happen...)

ALICE3/TableProducer/alice3-decayfinder.cxx

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ struct alice3decayFinder {
267267
dmeson.mcTruth = 2; // D0bar
268268
}
269269
}
270+
270271
return true;
271272
}
272273

@@ -362,7 +363,9 @@ struct alice3decayFinder {
362363

363364
if (doprocessFindDmesons) {
364365
histos.add("h2dGenD", "h2dGenD", kTH2F, {axisPt, axisEta});
366+
histos.add("h2dGenD_KpiOnly", "h2dGenD_KpiOnly", kTH2F, {axisPt, axisEta});
365367
histos.add("h2dGenDbar", "h2dGenDbar", kTH2F, {axisPt, axisEta});
368+
histos.add("h2dGenDbar_KpiOnly", "h2dGenDbar_KpiOnly", kTH2F, {axisPt, axisEta});
366369
histos.add("h3dRecD", "h3dRecD", kTH3F, {axisPt, axisEta, axisDMass});
367370
histos.add("h3dRecDSig", "h3dRecDSig", kTH3F, {axisPt, axisEta, axisDMass});
368371
histos.add("h3dRecDRefl", "h3dRecDRefl", kTH3F, {axisPt, axisEta, axisDMass});
@@ -471,11 +474,37 @@ struct alice3decayFinder {
471474
if (doprocessFindDmesons) {
472475
for (auto const& mcParticle : trueD) {
473476
histos.fill(HIST("h2dGenD"), mcParticle.pt(), mcParticle.eta());
474-
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar
477+
auto daughters = mcParticle.template daughters_as<aod::McParticles>();
478+
if (daughters.size() != 2)
479+
continue;
480+
// int daugID[2];
481+
int daugPDG[2], i = 0;
482+
for (const auto& dau : daughters) {
483+
// daugID[i] = dau.globalIndex();
484+
daugPDG[i] = dau.pdgCode();
485+
i++;
486+
}
487+
if ((std::fabs(daugPDG[0]) == 321 && std::fabs(daugPDG[1]) == 211) || (std::fabs(daugPDG[0]) == 211 && std::fabs(daugPDG[1]) == 321)) {
488+
histos.fill(HIST("h2dGenD_KpiOnly"), mcParticle.pt(), mcParticle.eta());
489+
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar
490+
}
475491
}
476492
for (auto const& mcParticle : trueDbar) {
477493
histos.fill(HIST("h2dGenDbar"), mcParticle.pt(), mcParticle.eta());
478-
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar
494+
auto daughters = mcParticle.template daughters_as<aod::McParticles>();
495+
if (daughters.size() != 2)
496+
continue;
497+
// int daugID[2];
498+
int daugPDG[2], i = 0;
499+
for (const auto& dau : daughters) {
500+
// daugID[i] = dau.globalIndex();
501+
daugPDG[i] = dau.pdgCode();
502+
i++;
503+
}
504+
if ((std::fabs(daugPDG[0]) == 321 && std::fabs(daugPDG[1]) == 211) || (std::fabs(daugPDG[0]) == 211 && std::fabs(daugPDG[1]) == 321)) {
505+
histos.fill(HIST("h2dGenDbar_KpiOnly"), mcParticle.pt(), mcParticle.eta());
506+
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar
507+
}
479508
}
480509
}
481510
if (doprocessFindLcBaryons) {
@@ -509,6 +538,7 @@ struct alice3decayFinder {
509538
// D0 mesons
510539
for (auto const& posTrackRow : tracksPiPlusFromDgrouped) {
511540
for (auto const& negTrackRow : tracksKaMinusFromDgrouped) {
541+
512542
if (mcSameMotherCheck && !checkSameMother(posTrackRow, negTrackRow))
513543
continue;
514544
if (!buildDecayCandidateTwoBody(posTrackRow, negTrackRow, o2::constants::physics::MassPionCharged, o2::constants::physics::MassKaonCharged, mcParticles))
@@ -651,9 +681,11 @@ struct alice3decayFinder {
651681
mcTruthOutcome(dmeson.mcTruth);
652682
}
653683
}
684+
654685
// D0bar mesons
655686
for (auto const& posTrackRow : tracksKaPlusFromDgrouped) {
656687
for (auto const& negTrackRow : tracksPiMinusFromDgrouped) {
688+
657689
if (mcSameMotherCheck && !checkSameMother(posTrackRow, negTrackRow))
658690
continue;
659691
if (!buildDecayCandidateTwoBody(posTrackRow, negTrackRow, o2::constants::physics::MassKaonCharged, o2::constants::physics::MassPionCharged, mcParticles))

ALICE3/Tasks/alice3-multicharm.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ using namespace o2;
5757
using namespace o2::framework;
5858
using namespace o2::framework::expressions;
5959

60-
using multicharmtracks = soa::Join<aod::MCharmIndices, aod::MCharmCores>;
60+
// using multicharmtracks = soa::Join<aod::MCharmIndices, aod::MCharmCores>;
6161

6262
struct alice3multicharm {
6363
SliceCache cache;
@@ -134,7 +134,7 @@ struct alice3multicharm {
134134
histos.add("h3dXicc", "h3dXicc; Xicc pT (GeV/#it(c)); Xicc #eta; Xicc mass (GeV/#it(c)^{2})", kTH3D, {axisPt, axisEta, axisXiccMass});
135135
}
136136

137-
void processXicc(multicharmtracks const& multiCharmTracks)
137+
void processXicc(aod::MCharmCores const& multiCharmTracks)
138138
{
139139
for (const auto& xiccCand : multiCharmTracks) {
140140
if (xiccCand.xicDauDCA() > xicMaxDauDCA || xiccCand.xiccDauDCA() > xiccMaxDauDCA)

CPPLINT.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
filter=-build/c++11,-build/namespaces,-readability/fn_size,-readability/todo,-runtime/references,-whitespace/blank_line,-whitespace/braces,-whitespace/comments,-whitespace/indent_namespace,-whitespace/line_length,-whitespace/semicolon,-whitespace/todo
1+
filter=-build/c++11,-build/include_order,-build/namespaces,-readability/fn_size,-readability/todo,-runtime/references,-whitespace/blank_line,-whitespace/braces,-whitespace/comments,-whitespace/indent_namespace,-whitespace/line_length,-whitespace/semicolon,-whitespace/todo

Common/CCDB/macros/upload_event_selection_params.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#include "CCDB/CcdbApi.h"
1313
#include "CCDB/BasicCCDBManager.h"
1414
#include "TString.h"
15-
#include "map"
16-
#include "string"
15+
#include <map>
16+
#include <string>
1717
#include "EventSelectionParams.h"
1818
using std::map;
1919
using std::string;

Common/CCDB/macros/upload_event_selection_params_run3.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
#include "CCDB/CcdbApi.h"
1313
#include "TString.h"
14-
#include "map"
15-
#include "string"
14+
#include <map>
15+
#include <string>
1616
#include "EventSelectionParams.h"
1717
using std::map;
1818
using std::string;

Common/TableProducer/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ o2physics_add_dpl_workflow(track-propagation
6262
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
6363
COMPONENT_NAME Analysis)
6464

65+
o2physics_add_dpl_workflow(track-dca-cov-filler-run2
66+
SOURCES trackDcaCovFillerRun2.cxx
67+
PUBLIC_LINK_LIBRARIES O2::DetectorsBase O2Physics::AnalysisCore
68+
COMPONENT_NAME Analysis)
69+
6570
o2physics_add_dpl_workflow(track-propagation-tester
6671
SOURCES trackPropagationTester.cxx
6772
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::trackSelectionRequest

Common/TableProducer/eventSelection.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ struct LumiTask {
12231223
LOGP(debug, "Dummy process function for Run 2");
12241224
}
12251225

1226-
PROCESS_SWITCH(LumiTask, processRun2, "Process Run2 lumi task", false);
1226+
PROCESS_SWITCH(LumiTask, processRun2, "Process Run2 lumi task", true);
12271227

12281228
void processRun3(BCsWithBcSelsRun3 const& bcs, aod::FT0s const&)
12291229
{

0 commit comments

Comments
 (0)