Skip to content

Commit a9cc77a

Browse files
authored
Merge branch 'master' into WeightMerging
2 parents 32d4445 + 1480d7a commit a9cc77a

File tree

298 files changed

+25251
-11962
lines changed

Some content is hidden

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

298 files changed

+25251
-11962
lines changed

.github/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ infrastructure:
1616
- '.github/**'
1717
- '.checkov.yml'
1818
- '.mega-linter.yml'
19+
- '.pre-commit-config.yaml'
1920
- 'cmake/**'
2021
- 'CODEOWNERS'
2122
- 'CPPLINT.cfg'

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v5.0.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- repo: https://github.com/pre-commit/mirrors-clang-format
10+
rev: "v18.1.3" # clang-format version
11+
hooks:
12+
- id: clang-format

ALICE3/Core/FastTracker.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void FastTracker::AddSiliconALICE3v4()
9090
layers.push_back(DetLayer{"ddd1", 1.2, 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1});
9191
layers.push_back(DetLayer{"ddd2", 2.5, 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1});
9292
layers.push_back(DetLayer{"bpipe1", 5.7, 250, 0.0014, 9.24e-02, 0.0f, 0.0f, 0.0f, 0}); // 500 mum Be
93-
layers.push_back(DetLayer{"ddd3", 7., 250, x0OT, xrhoOB, resRPhiOT, resZOT, eff, 1});
93+
layers.push_back(DetLayer{"ddd3", 7., 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1});
9494
layers.push_back(DetLayer{"ddd4", 10., 250, x0OT, xrhoOB, resRPhiOT, resZOT, eff, 1});
9595
layers.push_back(DetLayer{"ddd5", 13., 250, x0OT, xrhoOB, resRPhiOT, resZOT, eff, 1});
9696
layers.push_back(DetLayer{"ddd6", 16., 250, x0OT, xrhoOB, resRPhiOT, resZOT, eff, 1});
@@ -113,12 +113,12 @@ void FastTracker::AddSiliconALICE3v1()
113113
float resZOT = 0.00100; // 5 mum
114114
float eff = 1.00;
115115

116-
layers.push_back(DetLayer{"bpipe0", 0.48, 250, 0.00042, 2.772e-02, 0.0f, 0.0f, 0.0f, 1}); // 150 mum Be
116+
layers.push_back(DetLayer{"bpipe0", 0.48, 250, 0.00042, 2.772e-02, 0.0f, 0.0f, 0.0f, 0}); // 150 mum Be
117117
layers.push_back(DetLayer{"B00", 0.5, 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1});
118118
layers.push_back(DetLayer{"B01", 1.2, 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1});
119119
layers.push_back(DetLayer{"B02", 2.5, 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1});
120-
layers.push_back(DetLayer{"bpipe1", 3.7, 250, 0.0014, 9.24e-02, 0.0f, 0.0f, 0.0f, 1}); // 500 mum Be
121-
layers.push_back(DetLayer{"B03", 3.75, 250, x0OT, xrhoOB, resRPhiOT, resZOT, eff, 1});
120+
layers.push_back(DetLayer{"bpipe1", 3.7, 250, 0.0014, 9.24e-02, 0.0f, 0.0f, 0.0f, 0}); // 500 mum Be
121+
layers.push_back(DetLayer{"B03", 3.75, 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1});
122122
layers.push_back(DetLayer{"B04", 7., 250, x0OT, xrhoOB, resRPhiOT, resZOT, eff, 1});
123123
layers.push_back(DetLayer{"B05", 12., 250, x0OT, xrhoOB, resRPhiOT, resZOT, eff, 1});
124124
layers.push_back(DetLayer{"B06", 20., 250, x0OT, xrhoOB, resRPhiOT, resZOT, eff, 1});

ALICE3/TableProducer/alice3-decayfinder.cxx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ struct alice3decayFinder {
9191
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "pt axis for QA histograms"};
9292
ConfigurableAxis axisDCA{"axisDCA", {200, -100, 100}, "DCA (#mum)"};
9393
ConfigurableAxis axisDMass{"axisDMass", {200, 1.765f, 1.965f}, "D Inv Mass (GeV/c^{2})"};
94+
ConfigurableAxis axisDCADaughters{"axisDCADaughters", {200, 0, 100}, "DCA (#mum)"};
9495
ConfigurableAxis axisLcMass{"axisLcMass", {200, 2.186f, 2.386f}, "#Lambda_{c} Inv Mass (GeV/c^{2})"};
9596

9697
o2::vertexing::DCAFitterN<2> fitter;
@@ -144,12 +145,14 @@ struct alice3decayFinder {
144145

145146
// Helper struct to pass candidate information
146147
struct {
148+
float dcaDau;
147149
float mass;
148150
float pt;
149151
float eta;
150152
} dmeson;
151153

152154
struct {
155+
float dcaDau;
153156
float mass;
154157
float pt;
155158
float eta;
@@ -181,8 +184,8 @@ struct alice3decayFinder {
181184
posTrack.getPxPyPzGlo(posP);
182185
negTrack.getPxPyPzGlo(negP);
183186

184-
float dcaDau = TMath::Sqrt(fitter.getChi2AtPCACandidate());
185-
if (dcaDau > dcaDaughtersSelection)
187+
dmeson.dcaDau = TMath::Sqrt(fitter.getChi2AtPCACandidate());
188+
if (dmeson.dcaDau > dcaDaughtersSelection)
186189
return false;
187190

188191
// return mass
@@ -222,8 +225,8 @@ struct alice3decayFinder {
222225
t1.getPxPyPzGlo(P1);
223226
t2.getPxPyPzGlo(P2);
224227

225-
float dcaDau = TMath::Sqrt(fitter3.getChi2AtPCACandidate());
226-
if (dcaDau > dcaDaughtersSelection)
228+
lcbaryon.dcaDau = TMath::Sqrt(fitter.getChi2AtPCACandidate());
229+
if (lcbaryon.dcaDau > dcaDaughtersSelection)
227230
return false;
228231

229232
// return mass
@@ -289,6 +292,8 @@ struct alice3decayFinder {
289292

290293
histos.add("hMassD", "hMassD", kTH1F, {axisDMass});
291294
histos.add("hMassDbar", "hMassDbar", kTH1F, {axisDMass});
295+
histos.add("hDCADDaughters", "hDCADDaughters", kTH1D, {axisDCADaughters});
296+
histos.add("hDCADbarDaughters", "hDCADbarDaughters", kTH1D, {axisDCADaughters});
292297

293298
if (doDCAplotsD) {
294299
histos.add("h2dDCAxyVsPtPiPlusFromD", "h2dDCAxyVsPtPiPlusFromD", kTH2F, {axisPt, axisDCA});
@@ -305,6 +310,8 @@ struct alice3decayFinder {
305310

306311
histos.add("hMassLc", "hMassLc", kTH1F, {axisLcMass});
307312
histos.add("hMassLcbar", "hMassLcbar", kTH1F, {axisLcMass});
313+
histos.add("hDCALcDaughters", "hDCALcDaughters", kTH1D, {axisDCADaughters});
314+
histos.add("hDCALcbarDaughters", "hDCALcbarDaughters", kTH1D, {axisDCADaughters});
308315

309316
if (doDCAplotsD) {
310317
histos.add("h2dDCAxyVsPtPiPlusFromLc", "h2dDCAxyVsPtPiPlusFromLc", kTH2F, {axisPt, axisDCA});
@@ -362,6 +369,7 @@ struct alice3decayFinder {
362369
continue;
363370
if (!buildDecayCandidateTwoBody(posTrackRow, negTrackRow, o2::constants::physics::MassPionCharged, o2::constants::physics::MassKaonCharged))
364371
continue;
372+
histos.fill(HIST("hDCADDaughters"), dmeson.dcaDau * 1e+4);
365373
histos.fill(HIST("hMassD"), dmeson.mass);
366374
histos.fill(HIST("h3dRecD"), dmeson.pt, dmeson.eta, dmeson.mass);
367375
}
@@ -373,6 +381,7 @@ struct alice3decayFinder {
373381
continue;
374382
if (!buildDecayCandidateTwoBody(posTrackRow, negTrackRow, o2::constants::physics::MassKaonCharged, o2::constants::physics::MassPionCharged))
375383
continue;
384+
histos.fill(HIST("hDCADbarDaughters"), dmeson.dcaDau * 1e+4);
376385
histos.fill(HIST("hMassDbar"), dmeson.mass);
377386
histos.fill(HIST("h3dRecDbar"), dmeson.pt, dmeson.eta, dmeson.mass);
378387
}
@@ -417,6 +426,7 @@ struct alice3decayFinder {
417426
continue;
418427
if (!buildDecayCandidateThreeBody(proton, kaon, pion, o2::constants::physics::MassProton, o2::constants::physics::MassKaonCharged, o2::constants::physics::MassPionCharged))
419428
continue;
429+
histos.fill(HIST("hDCALcDaughters"), lcbaryon.dcaDau);
420430
histos.fill(HIST("hMassLc"), lcbaryon.mass);
421431
histos.fill(HIST("h3dRecLc"), lcbaryon.pt, lcbaryon.eta, lcbaryon.mass);
422432
}
@@ -432,6 +442,7 @@ struct alice3decayFinder {
432442
continue;
433443
if (!buildDecayCandidateThreeBody(proton, kaon, pion, o2::constants::physics::MassProton, o2::constants::physics::MassKaonCharged, o2::constants::physics::MassPionCharged))
434444
continue;
445+
histos.fill(HIST("hDCALcbarDaughters"), lcbaryon.dcaDau);
435446
histos.fill(HIST("hMassLcbar"), lcbaryon.mass);
436447
histos.fill(HIST("h3dRecLcbar"), lcbaryon.pt, lcbaryon.eta, lcbaryon.mass);
437448
}

ALICE3/TableProducer/alice3-pidTOF.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ struct ALICE3pidTOFTask {
123123
if (!track.hasTOF()) {
124124
return -999.f;
125125
}
126-
return ((track.trackTime() - track.collision().collisionTime()) * 1000.f - o2::pid::tof::ExpTimes<Trks::iterator, id>::ComputeExpectedTime(track.tofExpMom() / o2::pid::tof::kCSPEED,
126+
return ((track.trackTime() - track.collision().collisionTime()) * 1000.f - o2::pid::tof::ExpTimes<Trks::iterator, id>::ComputeExpectedTime(track.tofExpMom() * o2::constants::physics::invLightSpeedCm2PS,
127127
track.length())) /
128128
sigma<id>(track);
129129
}
@@ -294,7 +294,7 @@ struct ALICE3pidTOFTaskQA {
294294
//
295295
// histos.fill(HIST("event/tofsignal"), t.p(), t.tofSignal());
296296
histos.fill(HIST("event/tofsignal"), t.p(), tofSignal);
297-
histos.fill(HIST("event/pexp"), t.p(), t.tofExpMom() / o2::pid::tof::kCSPEED);
297+
histos.fill(HIST("event/pexp"), t.p(), t.tofExpMom() * o2::constants::physics::invLightSpeedCm2PS);
298298
histos.fill(HIST("event/eta"), t.eta());
299299
histos.fill(HIST("event/length"), t.length());
300300
histos.fill(HIST("event/pt"), t.pt());

Common/CCDB/AnalysisCCDBLinkDef.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,20 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12+
/// \file AnalysisCCDBLinkDef.h
13+
/// \brief Dictionary definitions
14+
///
15+
/// \author Evgeny Kryshen <[email protected]>
16+
17+
#ifndef COMMON_CCDB_ANALYSISCCDBLINKDEF_H_
18+
#define COMMON_CCDB_ANALYSISCCDBLINKDEF_H_
19+
1220
#pragma link off all globals;
1321
#pragma link off all classes;
1422
#pragma link off all functions;
1523

1624
#pragma link C++ class EventSelectionParams + ;
1725
#pragma link C++ class TriggerAliases + ;
26+
#pragma link C++ class std::map < uint64_t, uint32_t> + ;
27+
28+
#endif // COMMON_CCDB_ANALYSISCCDBLINKDEF_H_

Common/Core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ o2physics_add_library(AnalysisCore
1313
SOURCES TrackSelection.cxx
1414
OrbitRange.cxx
1515
PID/ParamBase.cxx
16+
PID/PIDTOF.cxx
1617
CollisionAssociation.cxx
1718
TrackSelectionDefaults.cxx
1819
EventPlaneHelper.cxx

Common/Core/PID/PIDTOF.cxx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
///
13+
/// \file PIDTOF.cxx
14+
/// \author Nicolò Jacazio [email protected]
15+
/// \since 02/07/2020
16+
/// \brief Implementation of the TOF detector response for PID
17+
///
18+
19+
#include "PIDTOF.h"
20+
#include <string>
21+
22+
namespace o2::pid::tof
23+
{
24+
25+
void TOFResoParamsV3::setResolutionParametrizationRun2(std::unordered_map<std::string, float> const& pars)
26+
{
27+
std::array<std::string, 13> paramNames{"TrkRes.Pi.P0", "TrkRes.Pi.P1", "TrkRes.Pi.P2", "TrkRes.Pi.P3", "time_resolution",
28+
"TrkRes.Ka.P0", "TrkRes.Ka.P1", "TrkRes.Ka.P2", "TrkRes.Ka.P3",
29+
"TrkRes.Pr.P0", "TrkRes.Pr.P1", "TrkRes.Pr.P2", "TrkRes.Pr.P3"};
30+
// Now we override the parametrization to use the Run 2 one
31+
for (int i = 0; i < 9; i++) {
32+
if (mResolution[i]) {
33+
delete mResolution[i];
34+
}
35+
mResolution[i] = new TF2(Form("tofResTrack.%s_Run2", particleNames[i]), "-10", 0., 20, -1, 1.); // With negative values the old one is used
36+
}
37+
// Print the map
38+
for (const auto& [key, value] : pars) {
39+
LOG(info) << "Key: " << key << " Value: " << value;
40+
}
41+
for (int i = 0; i < 13; i++) {
42+
setParameter(i, pars.at(paramNames[i]));
43+
}
44+
}
45+
46+
} // namespace o2::pid::tof

0 commit comments

Comments
 (0)