diff --git a/PWGDQ.zip b/PWGDQ.zip new file mode 100644 index 00000000000..28310eeaa0a Binary files /dev/null and b/PWGDQ.zip differ diff --git a/PWGDQ/Core/HistogramsLibrary.cxx b/PWGDQ/Core/HistogramsLibrary.cxx index 662a89f514e..0401d5412ad 100644 --- a/PWGDQ/Core/HistogramsLibrary.cxx +++ b/PWGDQ/Core/HistogramsLibrary.cxx @@ -121,6 +121,26 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h if (subGroupStr.Contains("randomplane")) { hm->AddHistogram(histClass, "random plane angle", "random Psi", false, 100, -TMath::Pi() / 2, TMath::Pi() / 2, VarManager::kRandomPsi2); } + if (subGroupStr.Contains("spherocity")) { + hm->AddHistogram(histClass, "Spherocity", "Transverse Spherocity", false, 100, 0.0, 1.0, VarManager::kSpherocity); + hm->AddHistogram(histClass, "SpherocityPtWeighted", "pT-weighted Spherocity", false, 100, 0.0, 1.0, VarManager::kSpherocityPtWeighted); // Spherocity vs event properties + hm->AddHistogram(histClass, "Spherocity_VtxZ", "Spherocity vs Vtx Z", false, 100, 0.0, 1.0, VarManager::kSpherocity, 60, -15.0, 15.0, VarManager::kVtxZ); + hm->AddHistogram(histClass, "MultITSTPC_VtxZ", "MultITSTPC vs Vtx Z", false, 200, 0.0, 200.0, VarManager::kMultNTracksITSTPC, 60, -15.0, 15.0, VarManager::kVtxZ); + hm->AddHistogram(histClass, "Spherocity_VtxNContrib", "Spherocity vs Vtx n contributors", false, 100, 0.0, 1.0, VarManager::kSpherocity, 100, 0.0, 100.0, VarManager::kVtxNcontrib); + hm->AddHistogram(histClass, "MultITSTPC_VtxNContrib", "MultITSTPC vs Vtx n contributors", false, 200, 0.0, 200.0, VarManager::kMultNTracksITSTPC, 100, 0.0, 100.0, VarManager::kVtxNcontrib); + hm->AddHistogram(histClass, "Spherocity_MultITS", "Spherocity vs ITS only Multiplicity", false, 100, 0.0, 1.0, VarManager::kSpherocity, 250, 0.0, 250.0, VarManager::kMultNTracksITSOnly); + hm->AddHistogram(histClass, "Spherocity_MultTPC", "Spherocity vs TPC only Multiplicity", false, 100, 0.0, 1.0, VarManager::kSpherocity, 250, 0.0, 5000.0, VarManager::kMultTPC); + hm->AddHistogram(histClass, "Spherocity_MultITSTPC", "Spherocity vs ITS-TPC Multiplicity", false, 100, 0.0, 1.0, VarManager::kSpherocity, 250, 0.0, 250.0, VarManager::kMultNTracksITSTPC); + hm->AddHistogram(histClass, "Spherocity_CentFT0C", "Spherocity vs Centrality FT0C", false, 100, 0.0, 1.0, VarManager::kSpherocity, 20, 0.0, 100.0, VarManager::kCentFT0C); + hm->AddHistogram(histClass, "SpherocityPtWeighted_CentFT0C", "pT-weighted Spherocity vs Centrality FT0C", false, 100, 0.0, 1.0, VarManager::kSpherocityPtWeighted, 20, 0.0, 100.0, VarManager::kCentFT0C); + hm->AddHistogram(histClass, "Spherocity_CentFT0C_3D", "Spherocity vs Centrality vs Mult", false, 50, 0.0, 1.0, VarManager::kSpherocity, 20, 0.0, 100.0, VarManager::kCentFT0C, 100, 0.0, 50000.0, VarManager::kMultTPC); + + if (subGroupStr.Contains("mySpheroCent")) { + hm->AddHistogram(histClass, "Spherocity_CentFT0C", "Spherocity vs Centrality FT0C", false, 100, 0.0, 1.0, VarManager::kSpherocity, 20, 0.0, 100.0, VarManager::kCentFT0C); + hm->AddHistogram(histClass, "SpherocityPtWeighted_CentFT0C", "pT-weighted Spherocity vs Centrality FT0C", false, 100, 0.0, 1.0, VarManager::kSpherocityPtWeighted, 20, 0.0, 100.0, VarManager::kCentFT0C); + hm->AddHistogram(histClass, "Spherocity_CentFT0C_3D", "Spherocity vs Centrality vs Mult", false, 50, 0.0, 1.0, VarManager::kSpherocity, 20, 0.0, 100.0, VarManager::kCentFT0C, 100, 0.0, 50000.0, VarManager::kMultTPC); + } + } if (subGroupStr.Contains("mult")) { if (subGroupStr.Contains("pp")) { hm->AddHistogram(histClass, "MultTPC", "MultTPC", false, 250, 0.0, 500.0, VarManager::kMultTPC); @@ -1632,6 +1652,15 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h hm->AddHistogram(histClass, "Mass_Pt", "", false, 750, 0.0, 15.0, VarManager::kMass, 120, 0.0, 30.0, VarManager::kPt); hm->AddHistogram(histClass, "Mass_Rapidity", "", false, 750, 0.0, 15.0, VarManager::kMass, 150, 2.5, 4.0, VarManager::kRap); hm->AddHistogram(histClass, "Mass_Phi", "", false, 750, 0.0, 15.0, VarManager::kMass, 180, constants::math::PI, 2 * constants::math::PI, VarManager::kPhi); + hm->AddHistogram(histClass, "Mass", "", false, 750, 0.0, 5.0, VarManager::kMass); + if (subGroupStr.Contains("dimuon-spherocity")) { + hm->AddHistogram(histClass, "Spherocity", "Transverse Spherocity", false, 100, 0.0, 1.0, VarManager::kSpherocity); + hm->AddHistogram(histClass, "SpherocityPtWeighted", "pT-weighted Spherocity", false, 100, 0.0, 1.0, VarManager::kSpherocityPtWeighted); + hm->AddHistogram(histClass, "Mass_Spherocity", "", false, 750, 0.0, 5.0, VarManager::kMass, 100, 0.0, 1.0, VarManager::kSpherocity); + hm->AddHistogram(histClass, "Mass_SpherocityPtWeighted", "", false, 750, 0.0, 5.0, VarManager::kMass, 100, 0.0, 1.0, VarManager::kSpherocityPtWeighted); + hm->AddHistogram(histClass, "Mass_Pt_Spherocity", "", false, 750, 0.0, 5.0, VarManager::kMass, 120, 0.0, 30.0, VarManager::kPt, 100, 0.0, 1.0, VarManager::kSpherocity); + hm->AddHistogram(histClass, "Mass_Pt_SpherocityPtWeighted", "", false, 200, 0.0, 5.0, VarManager::kMass, 30, 0.0, 30.0, VarManager::kPt, 50, 0.0, 1.0, VarManager::kSpherocityPtWeighted); + } if (subGroupStr.Contains("dimuon-tag-and-probe")) { hm->AddHistogram(histClass, "Mass_PtProbe", "mass vs probe pT", false, 750, 0.0, 15.0, VarManager::kMass, 120, 0.0, 30.0, VarManager::kPt2); // Warning: in the tag-and-probe task t2 is always the probe hm->AddHistogram(histClass, "Mass_EtaProbe", "mass vs probe eta", false, 750, 0.0, 15.0, VarManager::kMass, 120, 0.0, 30.0, VarManager::kEta2); // Warning: in the tag-and-probe task t2 is always the probe diff --git a/PWGDQ/Core/VarManager.cxx b/PWGDQ/Core/VarManager.cxx index d1b193ec12c..c6ad5b099ee 100644 --- a/PWGDQ/Core/VarManager.cxx +++ b/PWGDQ/Core/VarManager.cxx @@ -816,6 +816,10 @@ void VarManager::SetDefaultVarNames() fgVariableUnits[kMultDimuonsME] = ""; fgVariableNames[kCentFT0C] = "Centrality FT0C"; fgVariableUnits[kCentFT0C] = "%"; + fgVariableNames[kSpherocity] = "Spherocity"; + fgVariableUnits[kSpherocity] = ""; + fgVariableNames[kSpherocityPtWeighted] = "SpherocityPtWeighted"; + fgVariableUnits[kSpherocityPtWeighted] = ""; fgVariableNames[kMCEventGeneratorId] = "MC Generator ID"; fgVariableNames[kMCEventSubGeneratorId] = "MC SubGenerator ID"; fgVariableNames[kMCVtxX] = "MC Vtx X"; @@ -2096,6 +2100,8 @@ void VarManager::SetDefaultVarNames() fgVarNamesMap["kVtxChi2"] = kVtxChi2; fgVarNamesMap["kCentVZERO"] = kCentVZERO; fgVarNamesMap["kCentFT0C"] = kCentFT0C; + fgVarNamesMap["kSpherocity"] = kSpherocity; + fgVarNamesMap["kSpherocityPtWeighted"] = kSpherocityPtWeighted; fgVarNamesMap["kCentFT0A"] = kCentFT0A; fgVarNamesMap["kCentFT0M"] = kCentFT0M; fgVarNamesMap["kMultTPC"] = kMultTPC; diff --git a/PWGDQ/Core/VarManager.h b/PWGDQ/Core/VarManager.h index ed09b758655..ba3dfe46faa 100644 --- a/PWGDQ/Core/VarManager.h +++ b/PWGDQ/Core/VarManager.h @@ -118,6 +118,7 @@ class VarManager : public TObject RapidityGapFilter = BIT(21), Fit = BIT(22), ReducedFit = BIT(23), + ReducedEventSpherocity = BIT(24), Track = BIT(0), TrackCov = BIT(1), TrackExtra = BIT(2), @@ -283,6 +284,8 @@ class VarManager : public TObject kMultNTracksITSTPC, kMultNTracksPVeta1, kMultNTracksPVetaHalf, + kSpherocity, // transverse spherocity + kSpherocityPtWeighted, // pT-weighted transverse spherocity kTrackOccupancyInTimeRange, kFT0COccupancyInTimeRange, kNoCollInTimeRangeStandard, @@ -1438,6 +1441,10 @@ class VarManager : public TObject { return RecoDecay::constrainAngle(psi1 - psi2, -o2::constants::math::PI / harmonic, harmonic); } + + template + static float CalculateSpherocity(T const& tracks, float ptMin = 0.15, float ptMax = 10.0, float etaMin = -0.8, float etaMax = 0.8, int minMult = 10, bool usePtWeight = false); + template static o2::dataformats::VertexBase RecalculatePrimaryVertex(T const& track0, T const& track1, const T1& collision); @@ -2316,6 +2323,11 @@ void VarManager::FillEvent(T const& event, float* values) } } + if constexpr ((fillMap & ObjTypes::ReducedEventSpherocity) > 0) { + values[kSpherocity] = event.spherocity(); + values[kSpherocityPtWeighted] = event.spherocityPtWeighted(); + } + if constexpr ((fillMap & ReducedEventVtxCov) > 0) { values[kVtxCovXX] = event.covXX(); values[kVtxCovXY] = event.covXY(); @@ -7996,5 +8008,75 @@ void VarManager::FillTripletVertexingALICE3(C const& collision, T const& t1, T c values[kVertexingTauxyzProjected] = values[kVertexingLxyzProjected] * v123.M() / (v123.P()); } } +template +float VarManager::CalculateSpherocity(T const& tracks, float ptMin, float ptMax, float etaMin, float etaMax, int minMult, bool usePtWeight) +{ + std::vector pxNorm; + std::vector pyNorm; + std::vector ptValues; + float sumPt = 0.0; + int nTracks = 0; + + // Collect valid tracks + for (const auto& track : tracks) { + float pt = track.pt(); + float eta = track.eta(); + + if (pt < ptMin || pt > ptMax) + continue; + if (eta < etaMin || eta > etaMax) + continue; + + float px = track.px(); + float py = track.py(); + + if (pt <= 0.f) { + continue; + } + pxNorm.push_back(px / pt); + pyNorm.push_back(py / pt); + ptValues.push_back(pt); + sumPt += pt; + nTracks++; + } + + // Check minimum multiplicity + if (nTracks < minMult) { + return -1.0f; + } + + // Minimize over azimuthal angle, hence nSteps = 360 for 1 degree steps + float spherocity = 5.0f; + const int nSteps = 360; + + for (int iStep = 0; iStep < nSteps; iStep++) { + float phi = 2.0f * M_PI * static_cast(iStep) / static_cast(nSteps); + float nx = std::cos(phi); + float ny = std::sin(phi); + + float numerator = 0.0f; + float denominator = 0.0f; + + for (int iTrk = 0; iTrk < nTracks; iTrk++) { + float crossProduct = std::abs(pxNorm[iTrk] * ny - pyNorm[iTrk] * nx); // Cross product magnitude: |p_T x n| = |px*ny - py*nx| + + if (usePtWeight) { + numerator += ptValues[iTrk] * crossProduct; + denominator += ptValues[iTrk]; + } else { + numerator += crossProduct; + denominator += 1.0f; + } + } + + float sph = std::pow(numerator / denominator, 2); + if (sph < spherocity) { + spherocity = sph; + } + } + + spherocity *= (M_PI * M_PI / 4.0f); + return spherocity; +} #endif // PWGDQ_CORE_VARMANAGER_H_ diff --git a/PWGDQ/DataModel/ReducedInfoTables.h b/PWGDQ/DataModel/ReducedInfoTables.h index eeed55d4886..65178247aac 100644 --- a/PWGDQ/DataModel/ReducedInfoTables.h +++ b/PWGDQ/DataModel/ReducedInfoTables.h @@ -69,6 +69,8 @@ DECLARE_SOA_COLUMN(NTPCoccupMeanTimeShortA, nTPCoccupMeanTimeShortA, float); DECLARE_SOA_COLUMN(NTPCoccupMeanTimeShortC, nTPCoccupMeanTimeShortC, float); //! TPC pileup mean time on C side (short time range) DECLARE_SOA_COLUMN(NTPCoccupMedianTimeShortA, nTPCoccupMedianTimeShortA, float); //! TPC pileup median time on A side (short time range) DECLARE_SOA_COLUMN(NTPCoccupMedianTimeShortC, nTPCoccupMedianTimeShortC, float); //! TPC pileup median time on C side (short time range) +DECLARE_SOA_COLUMN(Spherocity, spherocity, float); //! transverse spherocity +DECLARE_SOA_COLUMN(SpherocityPtWeighted, spherocityPtWeighted, float); //! pT-weighted transverse spherocity DECLARE_SOA_COLUMN(DCAzBimodalityCoefficient, dcazBimodalityCoefficient, float); //! Bimodality coefficient of the DCAz distribution of the tracks in the event DECLARE_SOA_COLUMN(DCAzBimodalityCoefficientBinned, dcazBimodalityCoefficientBinned, float); //! Bimodality coefficient of the DCAz distribution of the tracks in the event, binned DECLARE_SOA_COLUMN(DCAzBimodalityCoefficientBinnedTrimmed1, dcazBimodalityCoefficientBinnedTrimmed1, float); //! Bimodality coefficient of the DCAz distribution of the tracks in the event, binned and trimmed 1 @@ -179,6 +181,10 @@ DECLARE_SOA_TABLE_VERSIONED(ReducedEventsExtended_001, "AOD", "REEXTENDED", 1, / using ReducedEventsExtended = ReducedEventsExtended_001; +DECLARE_SOA_TABLE(ReducedEventsSpherocity, "AOD", "RESPHEROCITY", + reducedevent::Spherocity, + reducedevent::SpherocityPtWeighted); + DECLARE_SOA_TABLE(ReducedEventsMultPV_000, "AOD", "REMULTPV", //! Multiplicity information for primary vertex mult::MultNTracksHasITS, mult::MultNTracksHasTPC, mult::MultNTracksHasTOF, mult::MultNTracksHasTRD, mult::MultNTracksITSOnly, mult::MultNTracksTPCOnly, mult::MultNTracksITSTPC, diff --git a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx index 8ba2ee20340..d66d6c34f06 100644 --- a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx +++ b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx @@ -222,6 +222,7 @@ struct TableMaker { // Q-vector related tables, to be filled only if the user selects the corresponding option Produces eventQvectorCentr; Produces eventQvectorCentrExtra; + Produces eventSpherocity; } outTables; OutputObj fOutputList{"output"}; //! the histogram manager output list @@ -333,6 +334,17 @@ struct TableMaker { Configurable fExcludeShort{"cfgTPCExcludeShort", true, "Exclude short term from long term occupancy (micro-seconds)"}; } fConfigVariousOptions; + // Spherocity configurables + struct : ConfigurableGroup { + Configurable fConfigSpherocityCompute{"cfgSpherocityCompute", false, "Compute and store event spherocity (off by default)"}; + Configurable fConfigSpherocityPtMin{"cfgSpherocityPtMin", 0.15f, "Min pT for spherocity calculation"}; + Configurable fConfigSpherocityPtMax{"cfgSpherocityPtMax", 10.0f, "Max pT for spherocity calculation"}; + Configurable fConfigSpherocityEtaMin{"cfgSpherocityEtaMin", -0.8f, "Min eta for spherocity calculation"}; + Configurable fConfigSpherocityEtaMax{"cfgSpherocityEtaMax", 0.8f, "Max eta for spherocity calculation"}; + Configurable fConfigSpherocityMinMult{"cfgSpherocityMinMult", 5, "Min multiplicity for spherocity calculation"}; + Configurable fConfigSpherocityUsePtWeight{"cfgSpherocityUsePtWeight", false, "Use pT weighting for spherocity"}; + } fConfigSpherocity; + Service fCCDB{}; o2::ccdb::CcdbApi fCCDBApi; @@ -1033,10 +1045,11 @@ struct TableMaker { } } - template + template void skimCollisions(TEvents const& collisions, TBCs const& bcs, TZdcs const& /*zdcs*/, - TFt0s const& ft0s, TFv0as const& fv0as, TFdds const& fdds) + TFt0s const& ft0s, TFv0as const& fv0as, TFdds const& fdds, + TTrackAssoc const& trackAssocs, TTracks const& tracksBarrel) { // Skim collisions // NOTE: So far, collisions are filtered based on the user specified analysis cuts AND the filterPP or Zorro event filter. @@ -1222,6 +1235,55 @@ struct TableMaker { } (dynamic_cast(fStatsList->At(kStatsEvent)))->Fill(3.0, static_cast(o2::aod::evsel::kNsel)); + // Calculate spherocity for this collision + float spherocityValue = -1.0f; + float spherocityPtWeighted = -1.0f; + + if (fConfigSpherocity.fConfigSpherocityCompute) { + if constexpr (static_cast(TTrackFillMap)) { + auto groupedTrackIndices = trackAssocs.sliceBy(trackIndicesPerCollision, collision.globalIndex()); + + if (static_cast(groupedTrackIndices.size()) >= fConfigSpherocity.fConfigSpherocityMinMult) { + std::vector> trackVec; + trackVec.reserve(groupedTrackIndices.size()); + + int validTracks = 0; + for (auto const& assoc : groupedTrackIndices) { + if (assoc.trackId() < tracksBarrel.size()) { + auto track = tracksBarrel.rawIteratorAt(assoc.trackId()); + trackVec.push_back(track); + validTracks++; + } + } + + if (validTracks >= fConfigSpherocity.fConfigSpherocityMinMult) { + // Calculate unweighted spherocity + spherocityValue = VarManager::CalculateSpherocity( + trackVec, + fConfigSpherocity.fConfigSpherocityPtMin, + fConfigSpherocity.fConfigSpherocityPtMax, + fConfigSpherocity.fConfigSpherocityEtaMin, + fConfigSpherocity.fConfigSpherocityEtaMax, + fConfigSpherocity.fConfigSpherocityMinMult, + false); + + // Calculate pT-weighted spherocity + spherocityPtWeighted = VarManager::CalculateSpherocity( + trackVec, + fConfigSpherocity.fConfigSpherocityPtMin, + fConfigSpherocity.fConfigSpherocityPtMax, + fConfigSpherocity.fConfigSpherocityEtaMin, + fConfigSpherocity.fConfigSpherocityEtaMax, + fConfigSpherocity.fConfigSpherocityMinMult, + true); + } + } + } + } + + VarManager::fgValues[VarManager::kSpherocity] = spherocityValue; + VarManager::fgValues[VarManager::kSpherocityPtWeighted] = spherocityPtWeighted; + fHistMan->FillHistClass("Event_AfterCuts", dqtablemaker_helpers::varValues()); // create the event tables @@ -1248,6 +1310,7 @@ struct TableMaker { multTPC, multFV0A, multFV0C, multFT0A, multFT0C, multFDDA, multFDDC, multZNA, multZNC, multTracklets, multTracksPV, centFT0C, centFT0A, centFT0M); outTables.eventVtxCov(collision.covXX(), collision.covXY(), collision.covXZ(), collision.covYY(), collision.covYZ(), collision.covZZ(), collision.chi2()); outTables.eventInfo(collision.globalIndex()); + outTables.eventSpherocity(spherocityValue, spherocityPtWeighted); if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { if (fConfigQvector.fConfigQvectCalibAvailable) { @@ -1914,8 +1977,9 @@ struct TableMaker { outTables.event.reserve(collisions.size()); outTables.eventExtended.reserve(collisions.size()); outTables.eventVtxCov.reserve(collisions.size()); + outTables.eventSpherocity.reserve(collisions.size()); - skimCollisions(collisions, bcs, zdcs, ft0s, fv0as, fdds); + skimCollisions(collisions, bcs, zdcs, ft0s, fv0as, fdds, trackAssocs, tracksBarrel); if (fCollIndexMap.empty()) { return; } diff --git a/PWGDQ/Tasks/tableReader_withAssoc.h b/PWGDQ/Tasks/tableReader_withAssoc.h index e7952a1fdad..eae21321624 100644 --- a/PWGDQ/Tasks/tableReader_withAssoc.h +++ b/PWGDQ/Tasks/tableReader_withAssoc.h @@ -217,24 +217,24 @@ DECLARE_SOA_TABLE(JPsieeCandidates, "AOD", "DQPSEUDOPROPER", } // namespace o2::aod // Declarations of various short names -using MyEvents = o2::soa::Join; -using MyEventsBasic = o2::soa::Join; -using MyEventsMultExtraNoQvector = o2::soa::Join; -using MyEventsMultExtra = o2::soa::Join; -using MyEventsMultExtraQVector = o2::soa::Join; -using MyEventsZdc = o2::soa::Join; -using MyEventsMultExtraZdc = o2::soa::Join; -using MyEventsMultExtraZdcFit = o2::soa::Join; -using MyEventsSelected = o2::soa::Join; -using MyEventsMultExtraSelected = o2::soa::Join; -using MyEventsVtxCovSelectedMultExtra = o2::soa::Join; -using MyEventsHashSelected = o2::soa::Join; -using MyEventsVtxCov = o2::soa::Join; -using MyEventsVtxCovSelected = o2::soa::Join; -using MyEventsVtxCovSelectedInfo = o2::soa::Join; -using MyEventsVtxCovSelectedQvector = o2::soa::Join; -using MyEventsVtxCovSelectedQvectorWithHash = o2::soa::Join; -using MyEventsVtxCovZdcFitSelected = o2::soa::Join; +using MyEvents = o2::soa::Join; +using MyEventsBasic = o2::soa::Join; +using MyEventsMultExtraNoQvector = o2::soa::Join; +using MyEventsMultExtra = o2::soa::Join; +using MyEventsMultExtraQVector = o2::soa::Join; +using MyEventsZdc = o2::soa::Join; +using MyEventsMultExtraZdc = o2::soa::Join; +using MyEventsMultExtraZdcFit = o2::soa::Join; +using MyEventsSelected = o2::soa::Join; +using MyEventsMultExtraSelected = o2::soa::Join; +using MyEventsVtxCovSelectedMultExtra = o2::soa::Join; +using MyEventsHashSelected = o2::soa::Join; +using MyEventsVtxCov = o2::soa::Join; +using MyEventsVtxCovSelected = o2::soa::Join; +using MyEventsVtxCovSelectedInfo = o2::soa::Join; +using MyEventsVtxCovSelectedQvector = o2::soa::Join; +using MyEventsVtxCovSelectedQvectorWithHash = o2::soa::Join; +using MyEventsVtxCovZdcFitSelected = o2::soa::Join; using MyEventsVtxCovZdcFitSelectedMultExtra = o2::soa::Join; using MyEventsQvector = o2::soa::Join; using MyEventsHashSelectedQvector = o2::soa::Join; @@ -259,12 +259,12 @@ using MyMuonTracksWithCovWithAmbiguities = o2::soa::Join; // bit maps used for the Fill functions of the VarManager -constexpr static uint32_t gkEventFillMap = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended; -constexpr static uint32_t gkEventFillMapWithZdc = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ReducedZdc; -constexpr static uint32_t gkEventFillMapWithCov = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventVtxCov; +constexpr static uint32_t gkEventFillMap = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventSpherocity; +constexpr static uint32_t gkEventFillMapWithZdc = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ReducedZdc | VarManager::ObjTypes::ReducedEventSpherocity; +constexpr static uint32_t gkEventFillMapWithCov = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventVtxCov | VarManager::ObjTypes::ReducedEventSpherocity; // constexpr static uint32_t gkEventFillMapWithCovFlow = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventVtxCov | VarManager::ObjTypes::ReducedEventQvector; -constexpr static uint32_t gkEventFillMapWithCovZdcFit = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventVtxCov | VarManager::ReducedZdc | VarManager::ReducedFit; -constexpr static uint32_t gkEventFillMapWithMultExtra = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventMultExtra; +constexpr static uint32_t gkEventFillMapWithCovZdcFit = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventVtxCov | VarManager::ReducedZdc | VarManager::ReducedFit | VarManager::ObjTypes::ReducedEventSpherocity; +constexpr static uint32_t gkEventFillMapWithMultExtra = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventMultExtra | VarManager::ObjTypes::ReducedEventSpherocity; // New fillmap constexpr static uint32_t gkEventFillMapWithMultExtraWithQVector = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventMultExtra | VarManager::ObjTypes::CollisionQvect; // constexpr static uint32_t gkEventFillMapWithMultExtraWithQVector = VarManager::ObjTypes::ReducedEvent | VarManager::ObjTypes::ReducedEventExtended | VarManager::ObjTypes::ReducedEventMultExtra | VarManager::ObjTypes::ReducedEventQvector; @@ -322,7 +322,7 @@ struct AnalysisEventSelection { o2::framework::Configurable fConfigMixingVariablesJson{"cfgMixingVarsJSON", "", "Mixing configs in JSON format"}; o2::framework::Configurable fConfigEventCuts{"cfgEventCuts", "eventStandard", "Event selection"}; o2::framework::Configurable fConfigEventCutsJSON{"cfgEventCutsJSON", "", "Additional event cuts specified in JSON format"}; - o2::framework::Configurable fConfigAddEventHistogram{"cfgAddEventHistogram", "", "Comma separated list of histograms"}; + o2::framework::Configurable fConfigAddEventHistogram{"cfgAddEventHistogram", "spherocity", "Comma separated list of histograms"}; o2::framework::Configurable fConfigAddJSONHistograms{"cfgAddJSONHistograms", "", "Add event histograms defined via JSON formatting (see HistogramsLibrary)"}; o2::framework::Configurable fConfigQA{"cfgQA", true, "If true, QA histograms will be created and filled"}; @@ -456,6 +456,12 @@ struct AnalysisEventSelection { VarManager::fgValues[VarManager::kInteractionRate] = rateFetcher.fetch(fCCDB.service, event.timestamp(), fCurrentRun, fConfigIRSource.value, true) / 1000.; // kHz } + // Fill spherocity if available + if constexpr ((TEventFillMap & VarManager::ObjTypes::ReducedEventSpherocity) > 0) { + VarManager::fgValues[VarManager::kSpherocity] = event.spherocity(); + VarManager::fgValues[VarManager::kSpherocityPtWeighted] = event.spherocityPtWeighted(); + } + bool decision = false; // Fill histograms in the class Event, before cuts if (fConfigQA) {