Skip to content

Commit ef72c9b

Browse files
gitchrishub-ossChristopher Klummalibuild
authored
[PWGCF] Implementation of Phi and K0Short (#12738)
Co-authored-by: Christopher Klumm <ge48xun@nidoking.ktas.ph.tum.de> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent eb33730 commit ef72c9b

File tree

8 files changed

+2397
-35
lines changed

8 files changed

+2397
-35
lines changed

PWGCF/DataModel/FemtoDerived.h

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11-
1211
#ifndef PWGCF_DATAMODEL_FEMTODERIVED_H_
1312
#define PWGCF_DATAMODEL_FEMTODERIVED_H_
1413

15-
#include <cmath>
16-
#include "Framework/ASoA.h"
17-
#include "MathUtils/Utils.h"
18-
#include "Framework/DataTypes.h"
1914
#include "PWGHF/Core/HfHelper.h"
2015
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
2116
#include "PWGHF/DataModel/CandidateSelectionTables.h"
17+
2218
#include "Common/DataModel/Multiplicity.h"
19+
#include "Common/DataModel/PIDResponse.h"
20+
#include "Common/DataModel/TrackSelectionTables.h"
21+
22+
#include "Framework/ASoA.h"
2323
#include "Framework/AnalysisDataModel.h"
24+
#include "Framework/DataTypes.h"
2425
#include "Framework/Expressions.h"
25-
#include "Common/DataModel/TrackSelectionTables.h"
26-
#include "Common/DataModel/PIDResponse.h"
26+
#include "MathUtils/Utils.h"
27+
28+
#include <cmath>
2729

2830
namespace o2::aod
2931
{
@@ -96,17 +98,23 @@ DECLARE_SOA_TABLE_STAGED(FDMCCollLabels, "FDMCCollLabel", mcfdcolllabel::FDMCCol
9698
/// FemtoDreamTrack
9799
namespace femtodreamparticle
98100
{
99-
/// Distinuishes the different particle types
101+
/// Distinguishes the different particle types
100102
enum ParticleType {
101103
kTrack, //! Track
102104
kV0, //! V0
103105
kV0Child, //! Child track of a V0
104106
kCascade, //! Cascade
105107
kCascadeV0,
106108
kCascadeV0Child,
107-
kCascadeBachelor, //! Bachelor track of a cascade
108-
kCharmHadron, //! Bachelor track of a cascade
109-
kNParticleTypes //! Number of particle types
109+
kCascadeBachelor, //! Bachelor track of a cascade
110+
kCharmHadron, //! Bachelor track of a cascade
111+
kReso, //! Resonances (phi)
112+
kResoChild, // Child track of a Resonance
113+
kResoPosdaughTPC_NegdaughTPC, // cases for Phi-daughters for TPC or TOF combinations
114+
kResoPosdaughTPC_NegdaughTOF,
115+
kResoPosdaughTOF_NegdaughTPC,
116+
kResoPosdaughTOF_NegdaughTOF,
117+
kNParticleTypes //! Number of particle types
110118
};
111119

112120
enum MomentumType {
@@ -115,8 +123,9 @@ enum MomentumType {
115123
kPtpc //! momentum at the inner wall of the TPC (useful for PID plots)
116124
};
117125

118-
static constexpr std::string_view ParticleTypeName[kNParticleTypes] = {"Tracks", "V0", "V0Child", "Cascade", "CascadeV0", "CascadeV0Child", "CascadeBachelor", "CharmHadron"}; //! Naming of the different particle types
119-
static constexpr std::string_view TempFitVarName[kNParticleTypes] = {"/hDCAxy", "/hCPA", "/hDCAxy", "/hCPA", "/hCPA", "/hDCAxy", "/hDCAxy", "/hCPA"};
126+
static constexpr std::string_view ParticleTypeName[kNParticleTypes] = {"Track", "V0", "V0Child", "Cascade", "CascadeV0", "CascadeV0Child", "CascadeBachelor", "CharmHadron", "Reso", "ResoChild", "ResoPosdaughTPC_NegdaughTPC", "ResoPosdaughTPC_NegdaughTOF", "ResoPosdaughTOF_NegdaughTPC", "ResoPosdaughTOF_NegdaughTOF"}; //! Naming of the different particle types
127+
128+
static constexpr std::string_view TempFitVarName[kNParticleTypes] = {"/hDCAxy", "/hCPA", "/hDCAxy", "/hCPA", "/hCPA", "/hDCAxy", "/hDCAxy", "/hCPA", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy", "/hDCAxy"};
120129

121130
using cutContainerType = uint32_t; //! Definition of the data type for the bit-wise container for the different selection criteria
122131

PWGCF/FemtoDream/Core/femtoDreamObjectSelection.h

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019-2025 CERN and copyright holders of ALICE O2.
1+
// Copyright 2019-2022 CERN and copyright holders of ALICE O2.
22
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
33
// All rights not expressly granted are reserved.
44
//
@@ -16,15 +16,16 @@
1616
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMOBJECTSELECTION_H_
1717
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMOBJECTSELECTION_H_
1818

19+
#include "PWGCF/DataModel/FemtoDerived.h"
20+
#include "PWGCF/FemtoDream/Core/femtoDreamSelection.h"
21+
22+
#include "Framework/HistogramRegistry.h"
23+
#include "ReconstructionDataFormats/PID.h"
24+
1925
#include <algorithm>
2026
#include <string>
2127
#include <vector>
2228

23-
#include "PWGCF/FemtoDream/Core/femtoDreamSelection.h"
24-
#include "ReconstructionDataFormats/PID.h"
25-
#include "Framework/HistogramRegistry.h"
26-
#include "PWGCF/DataModel/FemtoDerived.h"
27-
2829
using namespace o2;
2930
using namespace o2::framework;
3031

@@ -69,7 +70,7 @@ class FemtoDreamObjectSelection
6970
{
7071
std::vector<selValDataType> tmpSelVals = selVals; // necessary due to some features of the Configurable
7172
std::vector<FemtoDreamSelection<selValDataType, selVariable>> tempVec;
72-
for (const selValDataType selVal : tmpSelVals) {
73+
for (const selValDataType& selVal : tmpSelVals) {
7374
tempVec.push_back(FemtoDreamSelection<selValDataType, selVariable>(selVal, selVar, selType));
7475
}
7576
setSelection(tempVec);
@@ -97,7 +98,7 @@ class FemtoDreamObjectSelection
9798
}
9899

99100
/// Then, the sorted selections are added to the overall container of cuts
100-
for (auto& sel : sels) {
101+
for (const auto& sel : sels) {
101102
mSelections.push_back(sel);
102103
}
103104
}
@@ -121,7 +122,7 @@ class FemtoDreamObjectSelection
121122
break;
122123
}
123124

124-
for (auto sel : mSelections) {
125+
for (auto& sel : mSelections) {
125126
if (sel.getSelectionVariable() == selVar) {
126127
switch (sel.getSelectionType()) {
127128
case (femtoDreamSelection::SelectionType::kUpperLimit):
@@ -164,7 +165,7 @@ class FemtoDreamObjectSelection
164165
std::vector<FemtoDreamSelection<selValDataType, selVariable>> getSelections(selVariable selVar)
165166
{
166167
std::vector<FemtoDreamSelection<selValDataType, selVariable>> selValVec;
167-
for (auto it : mSelections) {
168+
for (auto& it : mSelections) {
168169
if (it.getSelectionVariable() == selVar) {
169170
selValVec.push_back(it);
170171
}
@@ -177,9 +178,11 @@ class FemtoDreamObjectSelection
177178
std::vector<selVariable> getSelectionVariables()
178179
{
179180
std::vector<selVariable> selVarVec;
180-
for (auto it : mSelections) {
181+
for (auto& it : mSelections) {
181182
auto selVar = it.getSelectionVariable();
182-
if (std::none_of(selVarVec.begin(), selVarVec.end(), [selVar](selVariable a) { return a == selVar; })) {
183+
if (std::none_of(selVarVec.begin(),
184+
selVarVec.end(),
185+
[selVar](selVariable a) { return a == selVar; })) {
183186
selVarVec.push_back(selVar);
184187
}
185188
}

0 commit comments

Comments
 (0)