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: 3 additions & 3 deletions PWGCF/Femto/Core/closePairRejection.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ class CloseTrackRejection
{
double arg = 0.3 * (0.1 * magfield) * (0.01 * radius) / (2. * signedPt);
if (std::fabs(arg) <= 1.) {
double phistar = phi - std::asin(arg);
return static_cast<float>(RecoDecay::constrainAngle(phistar));
double angle = phi - std::asin(arg);
return static_cast<float>(RecoDecay::constrainAngle(angle));
}
return std::nullopt;
}
Expand Down Expand Up @@ -558,7 +558,7 @@ class ClosePairRejectionTrackCascade
bool
isClosePair() const
{
return mCtrBachelor.isClosePair() || mCtrBachelor.isClosePair();
return mCtrBachelor.isClosePair();
}

void fill(float kstar)
Expand Down
49 changes: 11 additions & 38 deletions PWGCF/Femto/Core/collisionHistManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ enum ColHist {
kCentVsMult,
kCentVsSphericity,
kMultVsSphericity,
// particle number correlation
kNpart1VsNpart2,
kNpart1VsNpart2VsNpart3,
// mc
kTrueCentVsCent,
kTrueMultVsMult,
Expand Down Expand Up @@ -84,21 +81,16 @@ constexpr std::array<histmanager::HistInfo<ColHist>, kColHistLast> HistTable = {
{kCentVsMult, o2::framework::kTH2F, "hCentVsMult", "Centrality vs Multiplicity; Centrality (%); Multiplicity"},
{kMultVsSphericity, o2::framework::kTH2F, "hMultVsSphericity", "Multiplicity vs Sphericity; Multiplicity; Sphericity"},
{kCentVsSphericity, o2::framework::kTH2F, "hCentVsSphericity", "Centrality vs Sphericity; Centrality (%); Sphericity"},
// particle number correlation
{kNpart1VsNpart2, o2::framework::kTH2F, "hNpart1VsNpart2", "# particle 1 vs # particle 2; # particle 1; # particle 2"},
{kNpart1VsNpart2VsNpart3, o2::framework::kTHnSparseF, "hNpart1VsNpart2VsNpart3", "# particle 1 vs # particle 2 vs particle 3; # particle 1; # particle 2; # particle 3"},
// mc
{kTrueCentVsCent, o2::framework::kTH2F, "hTrueCentVsCent", "True centrality vs centrality; Centrality_{True} (%); Centrality (%)"},
{kTrueMultVsMult, o2::framework::kTH2F, "hTrueMultVsMult", "True multiplicity vs multiplicity; Multiplicity_{True}; Multiplicity"},
}};

#define COL_HIST_ANALYSIS_MAP(conf) \
{kPosZ, {conf.vtxZ}}, \
{kMult, {conf.mult}}, \
{kCent, {conf.cent}}, \
{kMagField, {conf.magField}}, \
{kNpart1VsNpart2, {conf.particleCorrelation, conf.particleCorrelation}}, \
{kNpart1VsNpart2VsNpart3, {conf.particleCorrelation, conf.particleCorrelation, conf.particleCorrelation}},
#define COL_HIST_ANALYSIS_MAP(conf) \
{kPosZ, {conf.vtxZ}}, \
{kMult, {conf.mult}}, \
{kCent, {conf.cent}}, \
{kMagField, {conf.magField}},

#define COL_HIST_QA_MAP(confAnalysis, confQa) \
{kPosX, {confQa.vtxXY}}, \
Expand Down Expand Up @@ -158,9 +150,6 @@ struct ConfCollisionBinning : o2::framework::ConfigurableGroup {
o2::framework::ConfigurableAxis mult{"mult", {200, 0, 200}, "Multiplicity binning"};
o2::framework::ConfigurableAxis cent{"cent", {100, 0.0f, 100.0f}, "Centrality (multiplicity percentile) binning"};
o2::framework::ConfigurableAxis magField{"magField", {11, -5.5, 5.5}, "Magnetic field binning"};
o2::framework::Configurable<bool> plotParticlePairCorrelation{"plotParticlePairCorrelation", false, "Plot particle number correlation for pairs"};
o2::framework::Configurable<bool> plotParticleTripletCorrelation{"plotParticleTripletCorrelation", false, "Plot particle number correlation for triplets"};
o2::framework::ConfigurableAxis particleCorrelation{"particleCorrelation", {6, -0.5f, 5.5f}, "Binning for particle number correlation of pairs/triplets"};
};

struct ConfCollisionQaBinning : o2::framework::ConfigurableGroup {
Expand All @@ -181,11 +170,9 @@ class CollisionHistManager
template <modes::Mode mode, typename T>
void init(o2::framework::HistogramRegistry* registry,
std::map<ColHist, std::vector<o2::framework::AxisSpec>> const& Specs,
T const& ConfCollisionBinning)
T const& /*ConfCollisionBinning*/)
{
mHistogramRegistry = registry;
mPlotPairCorrelation = ConfCollisionBinning.plotParticlePairCorrelation.value;
mPlotTripletCorrelation = ConfCollisionBinning.plotParticleTripletCorrelation.value;
if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) {
initAnalysis(Specs);
}
Expand Down Expand Up @@ -214,21 +201,21 @@ class CollisionHistManager
}

template <modes::Mode mode, typename T>
void fill(T const& col, int64_t nSlice1, int64_t nSlice2, int64_t nSlice3)
void fill(T const& col)
{
if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) {
fillAnalysis(col, nSlice1, nSlice2, nSlice3);
fillAnalysis(col);
}
if constexpr (isFlagSet(mode, modes::Mode::kQa)) {
fillQa(col);
}
}

template <modes::Mode mode, typename T1, typename T2>
void fill(T1 const& col, T2 const& mcCols, int64_t nSlice1, int64_t nSlice2, int64_t nSlice3)
void fill(T1 const& col, T2 const& mcCols)
{
if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) {
fillAnalysis(col, nSlice1, nSlice2, nSlice3);
fillAnalysis(col);
}
if constexpr (isFlagSet(mode, modes::Mode::kQa)) {
fillQa(col);
Expand All @@ -246,12 +233,6 @@ class CollisionHistManager
mHistogramRegistry->add(analysisDir + getHistNameV2(kMult, HistTable), getHistDesc(kMult, HistTable), getHistType(kMult, HistTable), {Specs.at(kMult)});
mHistogramRegistry->add(analysisDir + getHistNameV2(kCent, HistTable), getHistDesc(kCent, HistTable), getHistType(kCent, HistTable), {Specs.at(kCent)});
mHistogramRegistry->add(analysisDir + getHistNameV2(kMagField, HistTable), getHistDesc(kMagField, HistTable), getHistType(kMagField, HistTable), {Specs.at(kMagField)});
if (mPlotPairCorrelation) {
mHistogramRegistry->add(analysisDir + getHistNameV2(kNpart1VsNpart2, HistTable), getHistDesc(kNpart1VsNpart2, HistTable), getHistType(kNpart1VsNpart2, HistTable), {Specs.at(kNpart1VsNpart2)});
}
if (mPlotTripletCorrelation) {
mHistogramRegistry->add(analysisDir + getHistNameV2(kNpart1VsNpart2VsNpart3, HistTable), getHistDesc(kNpart1VsNpart2VsNpart3, HistTable), getHistType(kNpart1VsNpart2VsNpart3, HistTable), {Specs.at(kNpart1VsNpart2VsNpart3)});
}
}

void initQa(std::map<ColHist, std::vector<o2::framework::AxisSpec>> const& Specs)
Expand Down Expand Up @@ -279,18 +260,12 @@ class CollisionHistManager
}

template <typename T>
void fillAnalysis(T const& col, size_t nSlice1, size_t nSlice2, size_t nSlice3)
void fillAnalysis(T const& col)
{
mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kPosZ, HistTable)), col.posZ());
mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kMult, HistTable)), col.mult());
mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kCent, HistTable)), col.cent());
mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kMagField, HistTable)), col.magField());
if (mPlotPairCorrelation) {
mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kNpart1VsNpart2, HistTable)), nSlice1, nSlice2);
}
if (mPlotTripletCorrelation) {
mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kNpart1VsNpart2VsNpart3, HistTable)), nSlice1, nSlice2, nSlice3);
}
}

template <typename T>
Expand Down Expand Up @@ -323,8 +298,6 @@ class CollisionHistManager

o2::framework::HistogramRegistry* mHistogramRegistry = nullptr;
bool mPlot2d = false;
bool mPlotPairCorrelation = false;
bool mPlotTripletCorrelation = false;
}; // namespace femtounitedcolhistmanager
}; // namespace colhistmanager
}; // namespace o2::analysis::femto
Expand Down
3 changes: 1 addition & 2 deletions PWGCF/Femto/Core/mcBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ class McBuilder
// Not yet created → create it
auto mcCol = col.template mcCollision_as<T3>();
this->fillMcCollision<system>(mcCol, mcProducts);
it = mCollisionMap.find(originalIndex);
}
// Add label
mcProducts.producedCollisionLabels(it->second);
mcProducts.producedCollisionLabels(mCollisionMap.at(originalIndex)); // mc collsions has been added so we can now safely retrieve the index
} else {
// If no MC collision associated, fill empty label
mcProducts.producedCollisionLabels(-1);
Expand Down
6 changes: 6 additions & 0 deletions PWGCF/Femto/Core/modes.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ enum class Mode : uint32_t {
kAnalysis = BIT(0),
kQa = BIT(1),
kMc = BIT(2),
kSe = BIT(3),
kMe = BIT(4),
kAnalysis_Qa = kAnalysis | kQa,
kAnalysis_Mc = kAnalysis | kMc,
kAnalysis_Qa_Mc = kAnalysis | kQa | kMc,
kSe_Analysis = kAnalysis | kSe,
kMe_Analysis = kAnalysis | kMe,
kSe_Analysis_Mc = kAnalysis | kSe | kMc,
kMe_Analysis_Mc = kAnalysis | kMe | kMc,
};

enum class System : uint32_t {
Expand Down
Loading
Loading