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
13 changes: 5 additions & 8 deletions PWGCF/Femto/Core/FemtoFlowAngularContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@

#include "Common/Core/RecoDecay.h"

#include "Framework/HistogramRegistry.h"

#include "Math/Vector4D.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/O2DatabasePDGPlugin.h"

#include "Math/Vector4D.h"
#include "TMath.h"

#include <fairlogger/Logger.h>
Expand Down Expand Up @@ -156,8 +155,6 @@ class FemtoFlowAngularContainer
mPDGTwo = pdg2;
}



/// Pass a pair to the container and compute all the relevant observables
/// Called by setPair both in case of data/ and Monte Carlo reconstructed and for Monte Carlo truth
/// \tparam T type of the femtoflowparticle
Expand All @@ -174,7 +171,7 @@ class FemtoFlowAngularContainer
deltaPhi = part1.phi() - part2.phi();

deltaPhi = RecoDecay::constrainAngle(deltaPhi, mPhiLow, 1);

// while (deltaPhi < mPhiLow) {
// deltaPhi += o2::constants::math::TwoPI;
// }
Expand Down Expand Up @@ -246,7 +243,7 @@ class FemtoFlowAngularContainer
}

protected:
o2::framework::HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output
o2::framework::HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output
static constexpr std::string_view FolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to EventType
static constexpr femto_flow_angular_container::Observable FemtoObs = obs; ///< Femtoscopic observable to be computed (according to femto_flow_angular_container::Observable)
static constexpr int EventType = eventType; ///< Type of the event (same/mixed, according to femto_flow_angular_container::EventType)
Expand Down
217 changes: 108 additions & 109 deletions PWGCF/Femto/Core/FemtoFlowCollisionSelection.h

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions PWGCF/Femto/Core/FemtoFlowDetaDphiStar.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@

#include "PWGCF/Femto/Core/FemtoFlowAngularContainer.h"
#include "PWGCF/Femto/Core/FemtoFlowFemtoContainer.h"
#include "PWGCF/Femto/Core/FemtoFlowTrackSelection.h"
#include "PWGCF/Femto/DataModel/FemtoDerived.h"

#include "Common/Core/RecoDecay.h"

#include "Framework/HistogramRegistry.h"

#include "TMath.h"

#include <memory>
#include <string>
#include <vector>
#include "PWGCF/Femto/Core/FemtoFlowTrackSelection.h"

#include "Framework/HistogramRegistry.h"

namespace o2::analysis
{
Expand Down Expand Up @@ -173,7 +174,7 @@ class FemtoFlowDetaDphiStar
magfield = lmagfield;

const int numEvtType = 2;

if constexpr (kPartOneType == o2::aod::femtoflowparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtoflowparticle::ParticleType::kTrack) {
/// Track-Track combination
// check if provided particles are in agreement with the class instantiation
Expand Down Expand Up @@ -299,7 +300,7 @@ class FemtoFlowDetaDphiStar
auto daughter = particles.begin() + indexOfDaughter;
auto deta = part1.eta() - daughter.eta();
auto dphiAvg = averagePhiStar(part1, *daughter, i); // auto dphiAvg = calculateDphiStar(part1, *daughter);
dphiAvg = RecoDecay::constrainAngle(dphiAvg, -1*o2::constants::math::PI, 1);
dphiAvg = RecoDecay::constrainAngle(dphiAvg, -1 * o2::constants::math::PI, 1);
if (ChosenEventType == femto_flow_femto_container::EventType::same) {
histdetadpisame[i][0]->Fill(deta, dphiAvg);
} else if (ChosenEventType == femto_flow_femto_container::EventType::mixed) {
Expand Down Expand Up @@ -419,7 +420,7 @@ class FemtoFlowDetaDphiStar
/// Magnetic field to be provided in Tesla
template <typename T>
void phiAtRadiiTPC(const T& part, std::vector<float>& tmpVec)
{
{

float phi0 = part.phi();
// Start: Get the charge from cutcontainer using masks
Expand Down Expand Up @@ -465,7 +466,7 @@ class FemtoFlowDetaDphiStar
} else {
dphi = 0;
}
dphi = RecoDecay::constrainAngle(dphi, -1*o2::constants::math::PI, 1);
dphi = RecoDecay::constrainAngle(dphi, -1 * o2::constants::math::PI, 1);
dPhiAvg += dphi;
if (plotForEveryRadii) {
histdetadpiRadii[iHist][i]->Fill(part1.eta() - part2.eta(), dphi);
Expand Down
17 changes: 8 additions & 9 deletions PWGCF/Femto/Core/FemtoFlowFemtoContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@

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

#include "Framework/HistogramRegistry.h"

#include "Math/Vector4D.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/O2DatabasePDGPlugin.h"

#include "Math/Vector4D.h"
#include "TMath.h"

#include <fairlogger/Logger.h>
Expand Down Expand Up @@ -319,13 +318,13 @@
}

protected:
o2::framework::HistogramRegistry* HistogramRegistry = nullptr; ///< For QA output
o2::framework::HistogramRegistry* HistogramRegistry = nullptr; ///< For QA output

Check failure on line 321 in PWGCF/Femto/Core/FemtoFlowFemtoContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
static constexpr std::string_view FolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to kEventType
static constexpr femto_flow_femto_container::Observable FemtoObs = obs; ///< Femtoscopic observable to be computed (according to femto_flow_femto_container::Observable)
static constexpr int kEventType = eventType; ///< Type of the event (same/mixed, according to femto_flow_femto_container::EventType)
float kMassOne = 0.f; ///< PDG mass of particle 1
float kMassTwo = 0.f; ///< PDG mass of particle 2
int kPDGOne = 0; ///< PDG code of particle 1
static constexpr int kEventType = eventType; ///< Type of the event (same/mixed, according to femto_flow_femto_container::EventType)
float kMassOne = 0.f; ///< PDG mass of particle 1
float kMassTwo = 0.f; ///< PDG mass of particle 2
int kPDGOne = 0; ///< PDG code of particle 1
int kPDGTwo = 0;
int numqnBins = 10; ///< Max num of devided qn bins
};
Expand Down
2 changes: 1 addition & 1 deletion PWGCF/Femto/Core/FemtoFlowObjectSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
break;
}

for (auto& sel : mSelections) {

Check failure on line 133 in PWGCF/Femto/Core/FemtoFlowObjectSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (sel.getSelectionVariable() == selVar) {
switch (sel.getSelectionType()) {
case (femto_flow_selection::SelectionType::kUpperLimit):
Expand Down Expand Up @@ -173,7 +173,7 @@
std::vector<FemtoFlowSelection<selValDataType, selVariable>> getSelections(selVariable selVar)
{
std::vector<FemtoFlowSelection<selValDataType, selVariable>> selValVec;
for (auto& it : mSelections) {

Check failure on line 176 in PWGCF/Femto/Core/FemtoFlowObjectSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (it.getSelectionVariable() == selVar) {
selValVec.push_back(it);
}
Expand All @@ -186,7 +186,7 @@
std::vector<selVariable> getSelectionVariables()
{
std::vector<selVariable> selVarVec;
for (auto& it : mSelections) {

Check failure on line 189 in PWGCF/Femto/Core/FemtoFlowObjectSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto selVar = it.getSelectionVariable();
if (std::none_of(selVarVec.begin(), selVarVec.end(), [selVar](selVariable a) { return a == selVar; })) {
selVarVec.push_back(selVar);
Expand All @@ -196,7 +196,7 @@
}

protected:
o2::framework::HistogramRegistry* mHistogramRegistry; ///< For QA output
o2::framework::HistogramRegistry* mHistogramRegistry; ///< For QA output
std::vector<FemtoFlowSelection<selValDataType, selVariable>> mSelections; ///< Vector containing all selections
};

Expand Down
2 changes: 1 addition & 1 deletion PWGCF/Femto/Core/FemtoFlowPairCleaner.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class FemtoFlowPairCleaner
}

private:
o2::framework::HistogramRegistry* mHistogramRegistry; ///< For QA output
o2::framework::HistogramRegistry* mHistogramRegistry; ///< For QA output
static constexpr o2::aod::femtoflowparticle::ParticleType kPartOneType = partOne; ///< Type of particle 1
static constexpr o2::aod::femtoflowparticle::ParticleType kPartTwoType = partTwo; ///< Type of particle 2
};
Expand Down
4 changes: 2 additions & 2 deletions PWGCF/Femto/Core/FemtoFlowParticleHisto.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
/// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. tempFitVar plots
/// \param tempFitVarAxis axis object for the tempFitVar axis
template <o2::aod::femtoflow_mc_particle::MCType mc, typename T>
void init_base(std::string folderName, std::string tempFitVarAxisTitle, T& tempFitVarpTAxis, T& tempFitVarAxis) // o2-linter: disable=name/function-variable

Check failure on line 56 in PWGCF/Femto/Core/FemtoFlowParticleHisto.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
{
using namespace o2::framework;

Expand All @@ -72,7 +72,7 @@

// comment
template <o2::aod::femtoflow_mc_particle::MCType mc>
void init_debug(std::string folderName) // o2-linter: disable=name/function-variable

Check failure on line 75 in PWGCF/Femto/Core/FemtoFlowParticleHisto.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
{
using namespace o2::framework;

Expand Down Expand Up @@ -137,7 +137,7 @@
/// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. tempFitVar plots
/// \param tempFitVarAxis axis object for the tempFitVar axis
template <typename T>
void init_MC(std::string folderName, std::string /*tempFitVarAxisTitle*/, T& tempFitVarpTAxis, T& tempFitVarAxis, bool isDebug) // o2-linter: disable=name/function-variable

Check failure on line 140 in PWGCF/Femto/Core/FemtoFlowParticleHisto.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
{
using namespace o2::framework;

Expand Down Expand Up @@ -265,7 +265,7 @@
/// \tparam T Data type of the particle
/// \param part Particle
template <o2::aod::femtoflow_mc_particle::MCType mc, typename T, typename H>
void fillQA_base(T const& part, H const& histFolder) // o2-linter: disable=name/function-variable

Check failure on line 268 in PWGCF/Femto/Core/FemtoFlowParticleHisto.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
{
using namespace o2::framework;

Expand Down Expand Up @@ -456,9 +456,9 @@
} else if (confPDG == mConfPDGCodePart[1]) {
binPDG = 1;
} else if (confPDG == mConfPDGCodePart[2]) {
binPDG = 2;

Check failure on line 459 in PWGCF/Femto/Core/FemtoFlowParticleHisto.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
} else {
binPDG = 3;

Check failure on line 461 in PWGCF/Femto/Core/FemtoFlowParticleHisto.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
}
if (std::abs(pdgcode) == PDG_t::kPiPlus) {
mHistogramRegistry->fill(histFolder + HIST("_MC/hMisidentification"),
Expand Down Expand Up @@ -523,7 +523,7 @@
/// \param part particle for which the histograms should be filled
template <bool isMC, bool isDebug, typename T>
void fillQAMisIden(T const& part, int confPDG)
{
{
using namespace o2::framework;

fillQABaseMisiden<isMC, isDebug, T>(part, HIST(o2::aod::femtoflowparticle::ParticleTypeName[kParticleType]) + HIST(kFolderSuffix[kFolderSuffixType]), confPDG);
Expand All @@ -545,7 +545,7 @@
}

private:
o2::framework::HistogramRegistry* mHistogramRegistry; ///< For QA output
o2::framework::HistogramRegistry* mHistogramRegistry; ///< For QA output
static constexpr o2::aod::femtoflowparticle::ParticleType kParticleType = particleType; ///< Type of the particle under analysis // o2-linter: disable=name/constexpr-constant
static constexpr int kFolderSuffixType = suffixType; ///< Counter for the folder suffix specified below // o2-linter: disable=name/constexpr-constant
static constexpr std::string_view kFolderSuffix[5] = {"_debug", "_one", "_two", "_pos", "_neg"}; ///< Suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C) // o2-linter: disable=name/constexpr-constant
Expand Down
Loading