Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions PWGCF/Femto/Core/baseSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@

#include "PWGCF/Femto/Core/selectionContainer.h"

#include "Framework/HistogramRegistry.h"
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/Logger.h>

#include "fairlogger/Logger.h"
#include <TH1.h>

#include <climits>
#include <cstddef>
Expand Down
10 changes: 5 additions & 5 deletions PWGCF/Femto/Core/cascadeBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include "PWGCF/Femto/Core/selectionContainer.h"
#include "PWGCF/Femto/DataModel/FemtoTables.h"

#include "CommonConstants/MathConstants.h"
#include "Framework/AnalysisHelpers.h"
#include "Framework/Configurable.h"

#include "fairlogger/Logger.h"
#include <CommonConstants/MathConstants.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/Logger.h>

#include <algorithm>
#include <array>
Expand Down
13 changes: 9 additions & 4 deletions PWGCF/Femto/Core/cascadeHistManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@
#include "PWGCF/Femto/Core/modes.h"
#include "PWGCF/Femto/Core/trackHistManager.h"

#include "CommonConstants/MathConstants.h"
#include "Framework/Configurable.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/HistogramSpec.h"
#include <CommonConstants/MathConstants.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/Logger.h>

#include <TH1.h>
#include <TPDGCode.h>

#include <array>
#include <cstddef>
#include <map>
#include <string>
#include <string_view>
Expand Down
14 changes: 9 additions & 5 deletions PWGCF/Femto/Core/closePairRejection.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,24 @@
#ifndef PWGCF_FEMTO_CORE_CLOSEPAIRREJECTION_H_
#define PWGCF_FEMTO_CORE_CLOSEPAIRREJECTION_H_

#include "RecoDecay.h"

#include "PWGCF/Femto/Core/histManager.h"

#include "Framework/Configurable.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/HistogramSpec.h"
#include <Common/Core/RecoDecay.h>

#include <CommonConstants/MathConstants.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/Logger.h>

#include <array>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <map>
#include <numeric>
#include <optional>
#include <random>
#include <string>
#include <vector>
Expand Down
4 changes: 2 additions & 2 deletions PWGCF/Femto/Core/closeTripletRejection.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "PWGCF/Femto/Core/closePairRejection.h"

#include "Framework/HistogramRegistry.h"
#include "Framework/HistogramSpec.h"
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>

#include <cmath>
#include <map>
Expand Down
18 changes: 9 additions & 9 deletions PWGCF/Femto/Core/collisionBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
#include "PWGCF/Femto/Core/selectionContainer.h"
#include "PWGCF/Femto/DataModel/FemtoTables.h"

#include "Common/CCDB/EventSelectionParams.h"
#include "Common/CCDB/RCTSelectionFlags.h"
#include "Common/Core/Zorro.h"

#include "DataFormatsParameters/GRPMagField.h"
#include "Framework/AnalysisHelpers.h"
#include "Framework/Configurable.h"

#include "fairlogger/Logger.h"
#include <Common/CCDB/EventSelectionParams.h>
#include <Common/CCDB/RCTSelectionFlags.h>
#include <Common/Core/Zorro.h>

#include <DataFormatsParameters/GRPMagField.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/Logger.h>

#include <algorithm>
#include <cmath>
Expand Down
8 changes: 5 additions & 3 deletions PWGCF/Femto/Core/collisionHistManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
#include "PWGCF/Femto/Core/histManager.h"
#include "PWGCF/Femto/Core/modes.h"

#include "Framework/Configurable.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/HistogramSpec.h"
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>

#include <array>
#include <cstddef>
#include <cstdint>
#include <map>
#include <string>
#include <string_view>
Expand Down
26 changes: 14 additions & 12 deletions PWGCF/Femto/Core/femtoUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,19 @@
#ifndef PWGCF_FEMTO_CORE_FEMTOUTILS_H_
#define PWGCF_FEMTO_CORE_FEMTOUTILS_H_

#include "Common/Core/TableHelper.h"
#include <Common/Core/TableHelper.h>

#include "CommonConstants/MathConstants.h"
#include "CommonConstants/PhysicsConstants.h"
#include "Framework/InitContext.h"
#include <CommonConstants/PhysicsConstants.h>
#include <Framework/InitContext.h>
#include <Framework/Logger.h>

#include "TPDGCode.h"

#include "fairlogger/Logger.h"
#include <TPDGCode.h>

#include <cmath>
#include <concepts>
#include <cstdint>
#include <experimental/type_traits>
#include <optional>
#include <unordered_map>
#include <utility>

namespace o2::analysis::femto
{
Expand Down Expand Up @@ -209,11 +206,16 @@ inline bool enableTable(const char* tableName, int userSetting, o2::framework::I
return required;
}

template <typename T>
using HasMass = decltype(std::declval<T&>().mass());
// template <typename T>
// using HasMass = decltype(std::declval<T&>().mass());
//
// template <typename T>
// using HasSign = decltype(std::declval<T&>().sign());

template <typename T>
using HasSign = decltype(std::declval<T&>().sign());
concept HasMass = requires(T t) {
{ t.mass() } -> std::convertible_to<float>; // or double, whatever mass() returns
};

template <typename T>
inline int signum(T x)
Expand Down
2 changes: 1 addition & 1 deletion PWGCF/Femto/Core/histManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#ifndef PWGCF_FEMTO_CORE_HISTMANAGER_H_
#define PWGCF_FEMTO_CORE_HISTMANAGER_H_

#include "Framework/HistogramSpec.h"
#include <Framework/HistogramSpec.h>

#include <string>
#include <string_view>
Expand Down
12 changes: 6 additions & 6 deletions PWGCF/Femto/Core/kinkBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
#include "PWGCF/Femto/Core/selectionContainer.h"
#include "PWGCF/Femto/DataModel/FemtoTables.h"

#include "Common/Core/RecoDecay.h"
#include <Common/Core/RecoDecay.h>

#include "CommonConstants/MathConstants.h"
#include "Framework/AnalysisHelpers.h"
#include "Framework/Configurable.h"

#include "fairlogger/Logger.h"
#include <CommonConstants/MathConstants.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/Logger.h>

#include <algorithm>
#include <array>
Expand Down
13 changes: 9 additions & 4 deletions PWGCF/Femto/Core/kinkHistManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@
#include "PWGCF/Femto/Core/modes.h"
#include "PWGCF/Femto/Core/trackHistManager.h"

#include "CommonConstants/MathConstants.h"
#include "Framework/Configurable.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/HistogramSpec.h"
#include <CommonConstants/MathConstants.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/Logger.h>

#include <TH1.h>
#include <TPDGCode.h>

#include <array>
#include <cstddef>
#include <map>
#include <string>
#include <string_view>
Expand Down
7 changes: 4 additions & 3 deletions PWGCF/Femto/Core/mcBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
#include "PWGCF/Femto/Core/modes.h"
#include "PWGCF/Femto/DataModel/FemtoTables.h"

#include "Framework/AnalysisHelpers.h"
#include "Framework/Configurable.h"
#include <Framework/AnalysisHelpers.h>
#include <Framework/Configurable.h>
#include <Framework/Logger.h>

#include "fairlogger/Logger.h"
#include <TPDGCode.h>

#include <cmath>
#include <cstdint>
Expand Down
14 changes: 0 additions & 14 deletions PWGCF/Femto/Core/modes.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,6 @@ constexpr const char* mcOriginToString(McOrigin origin)
}
}

constexpr bool
hasMass(Particle p)
{
switch (p) {
case Particle::kV0:
case Particle::kTwoTrackResonance:
case Particle::kKink:
case Particle::kCascade:
return true;
default:
return false;
}
}

enum class Track : o2::aod::femtodatatypes::TrackType {
kTrack,
kV0Daughter,
Expand Down
7 changes: 3 additions & 4 deletions PWGCF/Femto/Core/pairBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@
#include "PWGCF/Femto/Core/v0HistManager.h"
#include "PWGCF/Femto/DataModel/FemtoTables.h"

#include "Framework/HistogramRegistry.h"
#include "Framework/HistogramSpec.h"

#include "fairlogger/Logger.h"
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/Logger.h>

#include <chrono>
#include <cstdint>
Expand Down
2 changes: 1 addition & 1 deletion PWGCF/Femto/Core/pairCleaner.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "PWGCF/Femto/Core/modes.h"

#include "fairlogger/Logger.h"
#include <Framework/Logger.h>

namespace o2::analysis::femto
{
Expand Down
45 changes: 16 additions & 29 deletions PWGCF/Femto/Core/pairHistManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
#include "PWGCF/Femto/Core/histManager.h"
#include "PWGCF/Femto/Core/modes.h"

#include "Framework/Configurable.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/HistogramSpec.h"
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/Logger.h>

#include <Math/GenVector/Boost.h>
#include <Math/Vector4D.h>
#include <Math/Vector4D.h> // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h)
#include <Math/Vector4Dfwd.h>

#include <array>
#include <cmath>
Expand Down Expand Up @@ -126,8 +128,8 @@ struct ConfPairBinning : o2::framework::ConfigurableGroup {
o2::framework::ConfigurableAxis centrality{"centrality", {{10, 0, 100}}, "centrality (mult. percentile)"};
o2::framework::ConfigurableAxis pt1{"pt1", {{100, 0, 6}}, "Pt binning for particle 1"};
o2::framework::ConfigurableAxis pt2{"pt2", {{100, 0, 6}}, "Pt binning for particle 2"};
o2::framework::ConfigurableAxis mass1{"mass1", {{100, 0, 2}}, "Mass binning for particle 1 (if particle has mass getter)"};
o2::framework::ConfigurableAxis mass2{"mass2", {{100, 0, 2}}, "Mass binning for particle 2 (if particle has mass getter)"};
o2::framework::ConfigurableAxis mass1{"mass1", {{100, 0, 2}}, "Mass binning for particle 1 (if particle has mass getter, otherwise PDG mass)"};
o2::framework::ConfigurableAxis mass2{"mass2", {{100, 0, 2}}, "Mass binning for particle 2 (if particle has mass getter, otherwise PDG mass)"};
o2::framework::Configurable<int> transverseMassType{"transverseMassType", static_cast<int>(modes::TransverseMassType::kAveragePdgMass), "Type of transverse mass (0-> Average Pdg Mass, 1-> Reduced Pdg Mass, 2-> Mt from combined 4 vector)"};
};

Expand Down Expand Up @@ -353,11 +355,11 @@ class PairHistManager
// if one of the particles has a mass getter (like lambda), we cache the value for the filling later
// otherwise we continue to use the pdg mass
mMass1 = mPdgMass1;
if constexpr (modes::hasMass(particleType1)) {
if constexpr (utils::HasMass<T1>) {
mMass1 = particle1.mass();
}
mMass2 = mPdgMass2;
if constexpr (modes::hasMass(particleType2)) {
if constexpr (utils::HasMass<T2>) {
mMass2 = particle2.mass();
}
}
Expand Down Expand Up @@ -478,17 +480,9 @@ class PairHistManager
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMt, HistTable), getHistDesc(kKstarVsMt, HistTable), getHistType(kKstarVsMt, HistTable), {Specs.at(kKstarVsMt)});
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMult, HistTable), getHistDesc(kKstarVsMult, HistTable), getHistType(kKstarVsMult, HistTable), {Specs.at(kKstarVsMult)});
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsCent, HistTable), getHistDesc(kKstarVsCent, HistTable), getHistType(kKstarVsCent, HistTable), {Specs.at(kKstarVsCent)});

// special care for mass plots since not all particles have "mass"
if constexpr (modes::hasMass(particleType1)) {
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMass1, HistTable), getHistDesc(kKstarVsMass1, HistTable), getHistType(kKstarVsMass1, HistTable), {Specs.at(kKstarVsMass1)});
}
if constexpr (modes::hasMass(particleType2)) {
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMass2, HistTable), getHistDesc(kKstarVsMass2, HistTable), getHistType(kKstarVsMass2, HistTable), {Specs.at(kKstarVsMass2)});
}
if constexpr (modes::hasMass(particleType1) && modes::hasMass(particleType2)) {
mHistogramRegistry->add(analysisDir + getHistNameV2(kMass1VsMass2, HistTable), getHistDesc(kMass1VsMass2, HistTable), getHistType(kMass1VsMass2, HistTable), {Specs.at(kMass1VsMass2)});
}
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMass1, HistTable), getHistDesc(kKstarVsMass1, HistTable), getHistType(kKstarVsMass1, HistTable), {Specs.at(kKstarVsMass1)});
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMass2, HistTable), getHistDesc(kKstarVsMass2, HistTable), getHistType(kKstarVsMass2, HistTable), {Specs.at(kKstarVsMass2)});
mHistogramRegistry->add(analysisDir + getHistNameV2(kMass1VsMass2, HistTable), getHistDesc(kMass1VsMass2, HistTable), getHistType(kMass1VsMass2, HistTable), {Specs.at(kMass1VsMass2)});
}

// higher dimensional histograms
Expand Down Expand Up @@ -559,16 +553,9 @@ class PairHistManager
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMult, HistTable)), mKstar, mMult);
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsCent, HistTable)), mKstar, mCent);

// // special care for mass plots since not all particles have "mass"
if constexpr (modes::hasMass(particleType1)) {
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMass1, HistTable)), mKstar, mMass1);
}
if constexpr (modes::hasMass(particleType2)) {
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMass2, HistTable)), mKstar, mMass2);
}
if constexpr (modes::hasMass(particleType1) && modes::hasMass(particleType2)) {
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kMass1VsMass2, HistTable)), mMass1, mMass2);
}
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMass1, HistTable)), mKstar, mMass1);
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMass2, HistTable)), mKstar, mMass2);
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kMass1VsMass2, HistTable)), mMass1, mMass2);
}

// n-D histograms are only filled if enabled
Expand Down
4 changes: 3 additions & 1 deletion PWGCF/Femto/Core/pairProcessHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#include "PWGCF/Femto/Core/modes.h"
#include "PWGCF/Femto/DataModel/FemtoTables.h"

#include "Framework/ASoAHelpers.h"
#include <Framework/ASoAHelpers.h>

#include <cstdint>

namespace o2::analysis::femto
{
Expand Down
2 changes: 1 addition & 1 deletion PWGCF/Femto/Core/particleCleaner.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#ifndef PWGCF_FEMTO_CORE_PARTICLECLEANER_H_
#define PWGCF_FEMTO_CORE_PARTICLECLEANER_H_

#include "Framework/Configurable.h"
#include <Framework/Configurable.h>

#include <string>
#include <vector>
Expand Down
Loading
Loading