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
5 changes: 4 additions & 1 deletion PWGCF/DataModel/CorrelationsDerived.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

namespace cfmcparticle
{
DECLARE_SOA_INDEX_COLUMN(CFMcCollision, cfMcCollision); //! Index to reduced MC collision

Check failure on line 34 in PWGCF/DataModel/CorrelationsDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Pt, pt, float); //! pT (GeV/c)
DECLARE_SOA_COLUMN(Eta, eta, float); //! Pseudorapidity
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi angle
Expand All @@ -48,7 +48,7 @@

namespace cfcollision
{
DECLARE_SOA_INDEX_COLUMN(CFMcCollision, cfMcCollision); //! Index to reduced MC collision

Check failure on line 51 in PWGCF/DataModel/CorrelationsDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Centrality/multiplicity value
} // namespace cfcollision
DECLARE_SOA_TABLE(CFCollisions, "AOD", "CFCOLLISION", //! Reduced collision table
Expand All @@ -64,8 +64,8 @@

namespace cftrack
{
DECLARE_SOA_INDEX_COLUMN(CFCollision, cfCollision); //! Index to collision

Check failure on line 67 in PWGCF/DataModel/CorrelationsDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_INDEX_COLUMN(CFMcParticle, cfMCParticle); //! Index to MC particle

Check failure on line 68 in PWGCF/DataModel/CorrelationsDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Pt, pt, float); //! pT (GeV/c)
DECLARE_SOA_COLUMN(Eta, eta, float); //! Pseudorapidity
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi angle
Expand Down Expand Up @@ -94,9 +94,12 @@
CentFT0C = 0x1,
MultFV0A = 0x2,
MultNTracksPV = 0x4,
MultNTracksGlobal = 0x8
MultNTracksGlobal = 0x8,
CentFT0M = 0x10,
};

inline constexpr uint32_t NMultiplicityEstimators = __builtin_ctz(CentFT0M) + 1;

} // namespace cfmultset
DECLARE_SOA_TABLE(CFMultSets, "AOD", "CFMULTSET", cfmultset::Multiplicities); //! Auxilary multiplicity set table

Expand Down Expand Up @@ -127,8 +130,8 @@

namespace cf2prongtrack
{
DECLARE_SOA_INDEX_COLUMN_FULL(CFTrackProng0, cfTrackProng0, int, CFTracks, "_0"); //! Index to prong 1 CFTrack

Check failure on line 133 in PWGCF/DataModel/CorrelationsDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_INDEX_COLUMN_FULL(CFTrackProng1, cfTrackProng1, int, CFTracks, "_1"); //! Index to prong 2 CFTrack

Check failure on line 134 in PWGCF/DataModel/CorrelationsDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Pt, pt, float); //! pT (GeV/c)
DECLARE_SOA_COLUMN(Eta, eta, float); //! Pseudorapidity
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi angle
Expand Down Expand Up @@ -179,8 +182,8 @@

namespace cf2prongmcpart
{
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle

Check failure on line 185 in PWGCF/DataModel/CorrelationsDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle

Check failure on line 186 in PWGCF/DataModel/CorrelationsDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay and flags
DECLARE_SOA_DYNAMIC_COLUMN(McDecay, mcDecay, [](uint8_t decay) -> uint8_t { return decay & 0x7f; }); //! MC particle decay
enum ParticleDecayFlags {
Expand Down
6 changes: 5 additions & 1 deletion PWGCF/TableProducer/filterCorrelations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,14 @@
multiplicities.push_back(collision.multNTracksPV());
if (cfgEstimatorBitMask & aod::cfmultset::MultNTracksGlobal)
multiplicities.push_back(collision.multNTracksGlobal());
if (cfgEstimatorBitMask & aod::cfmultset::CentFT0M)
multiplicities.push_back(collision.centFT0M());
outputMultSets(multiplicities);
}

if (cfgTransientTables)
outputCollRefs(collision.globalIndex());
for (auto& track : tracks) {

Check failure on line 282 in PWGCF/TableProducer/filterCorrelations.cxx

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 ((std::abs(track.dcaXY()) > dcaxymax) || (std::abs(track.dcaZ()) > dcazmax)) {
continue;
}
Expand All @@ -303,7 +305,7 @@
}
PROCESS_SWITCH(FilterCF, processDataPid, "Process data with PID", false);

void processDataMults(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CFMultiplicities, aod::CentFT0Cs, aod::PVMults, aod::FV0Mults, aod::MultsGlobal>>::iterator const& collision, aod::BCsWithTimestamps const&, soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA>> const& tracks)
void processDataMults(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CFMultiplicities, aod::CentFT0Ms, aod::CentFT0Cs, aod::PVMults, aod::FV0Mults, aod::MultsGlobal>>::iterator const& collision, aod::BCsWithTimestamps const&, soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA>> const& tracks)
{
processDataT(collision, tracks);
}
Expand Down Expand Up @@ -332,7 +334,7 @@
}

// PASS 1 on collisions: check which particles are kept
for (auto& collision : allCollisions) {

Check failure on line 337 in PWGCF/TableProducer/filterCorrelations.cxx

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 groupedTracks = tracks.sliceBy(perCollision, collision.globalIndex());
if (cfgVerbosity > 0) {
LOGF(info, "processMC: Tracks for collision %d: %d | Vertex: %.1f (%d) | INT7: %d", collision.globalIndex(), groupedTracks.size(), collision.posZ(), collision.flags(), collision.sel7());
Expand Down Expand Up @@ -418,6 +420,8 @@
multiplicities.push_back(collision.multNTracksPV());
if (cfgEstimatorBitMask & aod::cfmultset::MultNTracksGlobal)
multiplicities.push_back(collision.multNTracksGlobal());
if (cfgEstimatorBitMask & aod::cfmultset::CentFT0M)
multiplicities.push_back(collision.centFT0M());
outputMultSets(multiplicities);
}

Expand Down
8 changes: 4 additions & 4 deletions PWGCF/Tasks/correlations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct CorrelationTask {
O2_DEFINE_CONFIGURABLE(cfgCentBinsForMC, int, 0, "0 = OFF and 1 = ON for data like multiplicity/centrality bins for MC steps");
O2_DEFINE_CONFIGURABLE(cfgTrackBitMask, uint16_t, 0, "BitMask for track selection systematics; refer to the enum TrackSelectionCuts in filtering task");
O2_DEFINE_CONFIGURABLE(cfgMultCorrelationsMask, uint16_t, 0, "Selection bitmask for the multiplicity correlations. This should match the filter selection cfgEstimatorBitMask.")
O2_DEFINE_CONFIGURABLE(cfgMultCutFormula, std::string, "", "Multiplicity correlations cut formula. A result greater than zero results in accepted event. Parameters: [cFT0C] FT0C centrality, [mFV0A] V0A multiplicity, [mGlob] global track multiplicity, [mPV] PV track multiplicity")
O2_DEFINE_CONFIGURABLE(cfgMultCutFormula, std::string, "", "Multiplicity correlations cut formula. A result greater than zero results in accepted event. Parameters: [cFT0C] FT0C centrality, [mFV0A] V0A multiplicity, [mGlob] global track multiplicity, [mPV] PV track multiplicity, [cFT0M] FT0M centrality")

// Suggested values: Photon: 0.004; K0 and Lambda: 0.005
Configurable<LabeledArray<float>> cfgPairCut{"cfgPairCut", {kCfgPairCutDefaults[0], 5, {"Photon", "K0", "Lambda", "Phi", "Rho"}}, "Pair cuts on various particles"};
Expand Down Expand Up @@ -147,7 +147,7 @@ struct CorrelationTask {
std::vector<int> p2indexCache;

std::unique_ptr<TFormula> multCutFormula;
std::array<uint, 4> multCutFormulaParamIndex;
std::array<uint, aod::cfmultset::NMultiplicityEstimators> multCutFormulaParamIndex;

struct Config {
bool mPairCuts = false;
Expand Down Expand Up @@ -229,7 +229,7 @@ struct CorrelationTask {
if (!cfgMultCutFormula.value.empty()) {
multCutFormula = std::make_unique<TFormula>("multCutFormula", cfgMultCutFormula.value.c_str());
std::fill_n(multCutFormulaParamIndex.begin(), std::size(multCutFormulaParamIndex), ~0u);
std::array<std::string, 4> pars = {"cFT0C", "mFV0A", "mPV", "mGlob"}; // must correspond the order of MultiplicityEstimators
std::array<std::string, aod::cfmultset::NMultiplicityEstimators> pars = {"cFT0C", "mFV0A", "mPV", "mGlob", "cFT0M"}; // must correspond the order of MultiplicityEstimators
for (uint i = 0, n = multCutFormula->GetNpar(); i < n; ++i) {
auto m = std::find(pars.begin(), pars.end(), multCutFormula->GetParName(i));
if (m == pars.end()) {
Expand Down Expand Up @@ -462,7 +462,7 @@ struct CorrelationTask {
{
if (cfgMultCutFormula.value.empty())
return true;
for (uint i = 0; i < 4; ++i) {
for (uint i = 0; i < aod::cfmultset::NMultiplicityEstimators; ++i) {
if ((cfgMultCorrelationsMask.value & (1u << i)) == 0 || multCutFormulaParamIndex[i] == ~0u)
continue;
auto estIndex = std::popcount(cfgMultCorrelationsMask.value & ((1u << i) - 1));
Expand Down
Loading