Skip to content

Commit 0b7f5e0

Browse files
authored
PWGMM: dndeta: rework (#3910)
1 parent a797dca commit 0b7f5e0

File tree

8 files changed

+804
-470
lines changed

8 files changed

+804
-470
lines changed

PWGMM/Mult/CMakeLists.txt

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

12-
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/DataModel")
12+
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/DataModel" "${CMAKE_CURRENT_SOURCE_DIR}/Core/include")
1313

14-
# add_subdirectory(Core)
14+
add_subdirectory(Core)
1515
add_subdirectory(DataModel)
1616
add_subdirectory(Tasks)
1717
add_subdirectory(TableProducer)

PWGMM/Mult/Core/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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.

PWGMM/Mult/Core/include/Axes.h

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
#ifndef PWGMM_MULT_CORE_INCLUDE_AXES_H_
13+
#define PWGMM_MULT_CORE_INCLUDE_AXES_H_
14+
#include "Framework/HistogramSpec.h"
15+
#include "CommonConstants/MathConstants.h"
16+
17+
namespace pwgmm::mult
18+
{
19+
using namespace o2::framework;
20+
static constexpr std::string_view ptAxisName = "p_{T} (GeV/c)";
21+
// common axis definitions
22+
AxisSpec ZAxis = {301, -30.1, 30.1, "Z_{vtx} (cm)"}; // Z vertex in cm
23+
AxisSpec DeltaZAxis = {61, -6.1, 6.1, "#Delta Z (cm)"}; // Z vertex difference in cm
24+
AxisSpec DCAAxis = {601, -3.01, 3.01}; // DCA in cm
25+
AxisSpec EtaAxis = {22, -2.2, 2.2, "#eta"}; // Eta
26+
27+
AxisSpec PhiAxis = {629, 0, o2::constants::math::TwoPI, "#phi"}; // Phi (azimuthal angle)
28+
AxisSpec PtAxis = {2401, -0.005, 24.005, ptAxisName.data()}; // Large fine-binned Pt
29+
// Large wide-binned Pt (for efficiency)
30+
AxisSpec PtAxisEff = {{0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
31+
1.7, 1.8, 1.9, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 18.0, 20.0},
32+
ptAxisName.data()};
33+
AxisSpec PtAxis_wide = {1041, -0.05, 104.05, ptAxisName.data()}; // Smaller wider-binned Pt
34+
AxisSpec FT0CAxis = {1001, -0.5, 1000.5, "FT0C amplitude (arb. units)"}; // FT0C amplitudes
35+
AxisSpec FT0AAxis = {3001, -0.5, 3000.5, "FT0A amplitude (arb. units)"}; // FT0A amplitudes
36+
AxisSpec FDDAxis = {3001, -0.5, 3000.5, "FDD amplitude (arb. units)"}; // FDD amplitudes
37+
AxisSpec RapidityAxis = {102, -10.2, 10.2, "Y"}; // Rapidity
38+
AxisSpec ScaleAxis = {121, -0.5, 120.5, "Event scale (GeV)"}; // Event scale
39+
AxisSpec MPIAxis = {51, -0.5, 50.5, "N_{MPI}"}; // N_{MPI}
40+
AxisSpec ProcAxis = {21, 89.5, 110.5}; // Process flag
41+
42+
// event selection/efficiency binning
43+
enum struct EvSelBins : int {
44+
kAll = 1,
45+
kSelected = 2,
46+
kSelectedgt0 = 3,
47+
kSelectedPVgt0 = 4,
48+
kRejected = 5
49+
};
50+
51+
// labels for event selection axis
52+
std::array<std::string_view, static_cast<size_t>(EvSelBins::kRejected)> EvSelBinLabels{
53+
"All",
54+
"Selected",
55+
"Selected INEL>0",
56+
"Selected INEL>0 (PV)",
57+
"Rejected"};
58+
59+
enum struct EvEffBins : int {
60+
kGen = 1,
61+
kGengt0 = 2,
62+
kRec = 3,
63+
kSelected = 4,
64+
kSelectedgt0 = 5,
65+
kSelectedPVgt0 = 6
66+
};
67+
68+
// labels for event efficiency axis
69+
std::array<std::string_view, static_cast<size_t>(EvEffBins::kSelectedPVgt0)> EvEffBinLabels{
70+
"Generated",
71+
"Generated INEL>0",
72+
"Reconstructed",
73+
"Selected",
74+
"Selected INEL>0",
75+
"Selected INEL>0 (PV)"};
76+
} // namespace pwgmm::mult
77+
#endif // PWGMM_MULT_CORE_INCLUDE_AXES_H_
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
#ifndef PWGMM_MULT_CORE_INCLUDE_FUNCTIONS_H_
13+
#define PWGMM_MULT_CORE_INCLUDE_FUNCTIONS_H_
14+
#include "Common/DataModel/Centrality.h"
15+
16+
namespace pwgmm::mult
17+
{
18+
using namespace o2;
19+
20+
// helper function to determine if collision/mccollison type contains centrality
21+
template <typename T>
22+
static constexpr bool hasSimCent()
23+
{
24+
if constexpr (!soa::is_soa_join_v<T>) {
25+
return false;
26+
} else {
27+
return T::template contains<aod::HepMCHeavyIons>();
28+
}
29+
}
30+
31+
template <typename T>
32+
static constexpr bool hasRecoCent()
33+
{
34+
if constexpr (!soa::is_soa_join_v<T>) {
35+
return false;
36+
} else {
37+
return T::template contains<aod::CentFT0Cs>() || T::template contains<aod::CentFT0Ms>();
38+
}
39+
}
40+
} // namespace pwgmm::mult
41+
42+
#endif // PWGMM_MULT_CORE_INCLUDE_FUNCTIONS_H_
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
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+
#ifndef PWGMM_MULT_CORE_INCLUDE_HISTOGRAMS_H_
13+
#define PWGMM_MULT_CORE_INCLUDE_HISTOGRAMS_H_
14+
#include "TPDGCode.h"
15+
#include <string_view>
16+
17+
namespace pwgmm::mult
18+
{
19+
// particle species to consider for tracking efficiency
20+
static constexpr std::string_view species[] = {"pi", "p", "e", "K"};
21+
static constexpr std::array<int, 4> speciesIds{kPiPlus, kProton, kElectron, kKPlus};
22+
static constexpr std::string_view prefix = "Tracks/Control/";
23+
static constexpr std::string_view PtGenSuff = "/PtGen";
24+
static constexpr std::string_view PtGenIdxSuff = "/PtGenI";
25+
static constexpr std::string_view PtEffSuff = "/PtEfficiency";
26+
static constexpr std::string_view PtEffIdxSuff = "/PtEfficiencyI";
27+
28+
// histogram registry labels
29+
static constexpr std::string_view BinnedPrefix = "Centrality";
30+
static constexpr std::string_view InclusivePrefix = "Inclusive";
31+
32+
namespace histograms
33+
{
34+
// events and collisions
35+
static constexpr std::string_view BCSelection = "Events/BCSelection"; // BC selection categories
36+
static constexpr std::string_view EventSelection = "Events/Selection"; // Collision selection categories
37+
static constexpr std::string_view NtrkZvtx = "Events/NtrkZvtx"; // N tracks vs vtx Z for selected collisions
38+
static constexpr std::string_view NtrkZvtxGen = "Events/NtrkZvtxGen"; // -- for selected simulated collisions
39+
static constexpr std::string_view NtrkZvtxGen_t = "Events/NtrkZvtxGen_t"; // N particles vs vtx Z for generated events
40+
static constexpr std::string_view Efficiency = "Events/Efficiency"; // simulated event selection efficiency
41+
static constexpr std::string_view EfficiencyMult = "Events/EfficiencyMult"; // simulated event selection efficiency vs generated multiplicity
42+
static constexpr std::string_view NotFoundZvtx = "Events/NotFoundEventZvtx"; // vtx Z distribution of events without reconstructed collisions
43+
static constexpr std::string_view Response = "Events/Response"; // simulated multiplicity response (N tracks vs N particles)
44+
static constexpr std::string_view MultiResponse = "Events/MultiResponse"; // -- multi-estimator
45+
static constexpr std::string_view SplitMult = "Events/SplitMult"; // split reconstructed events vs generated multiplicity
46+
static constexpr std::string_view EventChi2 = "Events/Control/Chi2"; // collisions chi2 distribution
47+
static constexpr std::string_view EventTimeRes = "Events/Control/TimeResolution"; // collisions time resolution distribution
48+
49+
// particles and tracks
50+
static constexpr std::string_view EtaZvtx = "Tracks/EtaZvtx"; // eta vs vtx Z distribution of tracks
51+
static constexpr std::string_view EtaZvtx_gt0 = "Tracks/EtaZvtx_gt0"; // -- for INEL>0 collisions
52+
static constexpr std::string_view EtaZvtx_PVgt0 = "Tracks/EtaZvtx_PVgt0"; // -- for INEL>0 (PV)
53+
static constexpr std::string_view EtaZvtxGen = "Tracks/EtaZvtxGen"; // eta vs vtx Z distribution of simulated tracks
54+
static constexpr std::string_view EtaZvtxGen_gt0 = "Tracks/EtaZvtxGen_gt0"; // -- for INEL>0 collisions
55+
static constexpr std::string_view EtaZvtxGen_PVgt0 = "Tracks/EtaZvtxGen_PVgt0"; // -- for INEL>0 (PV)
56+
static constexpr std::string_view EtaZvtxGen_t = "Tracks/EtaZvtxGen_t"; // -- of particles
57+
static constexpr std::string_view EtaZvtxGen_gt0t = "Tracks/EtaZvtxGen_gt0t"; // -- of particles for INEL>0 events
58+
static constexpr std::string_view ReassignedEtaZvtx = "Tracks/Control/ReassignedEtaZvtx"; // -- of reassigned ambiguous tracks
59+
static constexpr std::string_view ExtraEtaZvtx = "Tracks/Control/ExtraEtaZvtx"; // -- of adopted orphan tracks
60+
static constexpr std::string_view PhiEta = "Tracks/PhiEta"; // eta vs phi distribution of tracks
61+
static constexpr std::string_view PhiEtaDuplicates = "Tracks/Control/PhiEtaDuplicates"; // -- of tracks belonging to the same particle
62+
static constexpr std::string_view PhiEtaGen = "Tracks/PhiEtaGen"; // -- of simulated tracks
63+
static constexpr std::string_view PhiEtaGenDuplicates = "Tracks/Control/PhiEtaGenDuplicates"; // -- of multi-reconstructed particles
64+
static constexpr std::string_view ReassignedPhiEta = "Tracks/Control/ReassignedPhiEta"; // -- of reassigned ambiguous tracks
65+
static constexpr std::string_view ExtraPhiEta = "Tracks/Control/ExtraPhiEta"; // -- of adopted orphaned tracks
66+
static constexpr std::string_view PtEta = "Tracks/Control/PtEta"; // Pt vs eta distribution of tracks
67+
static constexpr std::string_view PtEtaGen = "Tracks/Control/PtEtaGen"; // Pt vs eta distribution of simulated tracks
68+
static constexpr std::string_view DCAXYPt = "Tracks/Control/DCAXYPt"; // transversal DCA vs Pt distribution of tracks
69+
static constexpr std::string_view ReassignedDCAXYPt = "Tracks/Control/ReassignedDCAXYPt"; // -- of reassigned ambiguous tracks
70+
static constexpr std::string_view ExtraDCAXYPt = "Tracks/Control/ExtraDCAXYPt"; // -- of adopted orphan tracks
71+
static constexpr std::string_view DCAZPt = "Tracks/Control/DCAZPt"; // longitudal DCA vs Pt distribution of tracks
72+
static constexpr std::string_view ReassignedDCAZPt = "Tracks/Control/ReassignedDCAZPt"; // -- of reassigned ambiguous tracks
73+
static constexpr std::string_view ExtraDCAZPt = "Tracks/Control/ExtraDCAZPt"; // -- of adopted orphan tracks
74+
static constexpr std::string_view ReassignedZvtxCorr = "Tracks/Control/ReassignedZvtxCorr"; // original vs reassigned vtx Z correlation for reassigned ambiguous tracks
75+
76+
// efficiencies
77+
static constexpr std::string_view PtGen = "Tracks/Control/PtGen"; // pt distribution of particles
78+
static constexpr std::string_view PtGenF = "Tracks/Control/{}/PtGen"; // -- format placeholder
79+
static constexpr std::string_view PtGenIdx = "Tracks/Control/PtGenI"; // -- for the indexed efficiency
80+
static constexpr std::string_view PtGenIdxF = "Tracks/Control/{}/PtGenI"; // -- format placeholder
81+
static constexpr std::string_view PtGenNoEtaCut = "Tracks/Control/PtGenNoEtaCut"; // -- with no eta restriction
82+
static constexpr std::string_view PtGenIdxNoEtaCut = "Tracks/Control/PtGenINoEtaCut"; // -- for the indexed eff. with no eta restriction
83+
static constexpr std::string_view PtEfficiency = "Tracks/Control/PtEfficiency"; // generator-level pt distribution of selected tracks
84+
static constexpr std::string_view PtEfficiencyF = "Tracks/Control/{}/PtEfficiency"; // -- format placeholder
85+
static constexpr std::string_view PtEfficiencyIdx = "Tracks/Control/PtEfficiencyI"; // -- for the indexed efficiency
86+
static constexpr std::string_view PtEfficiencyIdxF = "Tracks/Control/{}/PtEfficiencyI"; // -- format placeholder
87+
static constexpr std::string_view PtEfficiencyNoEtaCut = "Tracks/Control/PtEfficiencyNoEtaCut"; // -- with no eta restriction
88+
static constexpr std::string_view PtEfficiencyIdxNoEtaCut = "Tracks/Control/PtEfficiencyINoEtaCut"; // -- for the indexed eff. with no eta restriction
89+
static constexpr std::string_view PtEfficiencyFakes = "Tracks/Control/PtFakes"; // pt distribution of fake tracks
90+
static constexpr std::string_view PtEfficiencySecondariesIdx = "Tracks/Control/PtSecondariesI"; // generator-level pt distribution of secondary particles
91+
static constexpr std::string_view PtEfficiencySecondariesIdxNoEtaCut = "Tracks/Control/PtSecondariesINoEtaCut"; // -- for the indexed efficiency
92+
93+
// misc.
94+
static constexpr std::string_view Mask = "Tracks/Control/Mask"; // reco status bitmask
95+
static constexpr std::string_view ITSlayers = "Tracks/Control/ITSLayers"; // ITS layers hit distribution
96+
} // namespace histograms
97+
} // namespace pwgmm::mult
98+
99+
#endif // PWGMM_MULT_CORE_INCLUDE_HISTOGRAMS_H_
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
#ifndef PWGMM_MULT_CORE_INCLUDE_SELECTIONS_H_
13+
#define PWGMM_MULT_CORE_INCLUDE_SELECTIONS_H_
14+
#include "Common/DataModel/TrackSelectionTables.h"
15+
16+
namespace pwgmm::mult
17+
{
18+
using namespace o2::aod::track;
19+
20+
// default quality criteria for tracks with ITS contribution
21+
static constexpr TrackSelectionFlags::flagtype trackSelectionITS =
22+
TrackSelectionFlags::kITSNCls | TrackSelectionFlags::kITSChi2NDF |
23+
TrackSelectionFlags::kITSHits;
24+
25+
// default quality criteria for tracks with TPC contribution
26+
static constexpr TrackSelectionFlags::flagtype trackSelectionTPC =
27+
TrackSelectionFlags::kTPCNCls |
28+
TrackSelectionFlags::kTPCCrossedRowsOverNCls |
29+
TrackSelectionFlags::kTPCChi2NDF;
30+
31+
// default standard DCA cuts
32+
static constexpr TrackSelectionFlags::flagtype trackSelectionDCA =
33+
TrackSelectionFlags::kDCAz | TrackSelectionFlags::kDCAxy;
34+
35+
// default standard transversal-only DCA cuts
36+
static constexpr TrackSelectionFlags::flagtype trackSelectionDCAXYonly =
37+
TrackSelectionFlags::kDCAxy;
38+
} // namespace pwgmm::mult
39+
40+
#endif // PWGMM_MULT_CORE_INCLUDE_SELECTIONS_H_

0 commit comments

Comments
 (0)