diff --git a/CODEOWNERS b/CODEOWNERS index 5974be54430..ea2fc514796 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -17,7 +17,7 @@ /ALICE3 @alibuild @njacazio @hscheid /DPG @alibuild @chiarazampolli @alcaliva @catalinristea /DPG/Tasks/AOTEvent @alibuild @ekryshen @strogolo @altsybee -/DPG/Tasks/AOTTrack @alibuild @mfaggin @iouribelikov @njacazio +/DPG/Tasks/AOTTrack @alibuild @mfaggin @iouribelikov @njacazio @lbariogl @f3sch /DPG/Tasks/TOF @alibuild @noferini @njacazio /DPG/Tasks/FT0 @alibuild @afurs /EventFiltering @alibuild @mpuccio @lietava diff --git a/Common/CCDB/EventSelectionParams.cxx b/Common/CCDB/EventSelectionParams.cxx index 43eb6d00b72..2259c916787 100644 --- a/Common/CCDB/EventSelectionParams.cxx +++ b/Common/CCDB/EventSelectionParams.cxx @@ -9,6 +9,13 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +/// \file EventSelectionParams.cxx +/// \brief Event selection parameters +/// +/// \author Evgeny Kryshen and Igor Altsybeev + +// o2-linter: disable=name/workflow-file + #include "EventSelectionParams.h" namespace o2::aod::evsel @@ -61,7 +68,10 @@ const char* selectionLabels[kNsel] = { "kNoCollInTimeRangeVzDependent", "kNoCollInRofStrict", "kNoCollInRofStandard", - "kNoHighMultCollInPrevRof"}; + "kNoHighMultCollInPrevRof", + "kIsGoodITSLayer3", + "kIsGoodITSLayer0123", + "kIsGoodITSLayersAll"}; } // namespace o2::aod::evsel using namespace o2::aod::evsel; @@ -166,7 +176,7 @@ EventSelectionParams::EventSelectionParams(int system, int run) } } -void EventSelectionParams::DisableOutOfBunchPileupCuts() +void EventSelectionParams::disableOutOfBunchPileupCuts() { selectionBarrel[kNoV0MOnVsOfPileup] = 0; selectionBarrel[kNoSPDOnVsOfPileup] = 0; @@ -184,7 +194,7 @@ void EventSelectionParams::DisableOutOfBunchPileupCuts() selectionMuonWithoutPileupCuts[kNoV0PFPileup] = 0; } -void EventSelectionParams::SetOnVsOfParams(float newV0MOnVsOfA, float newV0MOnVsOfB, float newSPDOnVsOfA, float newSPDOnVsOfB) +void EventSelectionParams::setOnVsOfParams(float newV0MOnVsOfA, float newV0MOnVsOfB, float newSPDOnVsOfA, float newSPDOnVsOfB) { fV0MOnVsOfA = newV0MOnVsOfA; fV0MOnVsOfB = newV0MOnVsOfB; @@ -192,7 +202,7 @@ void EventSelectionParams::SetOnVsOfParams(float newV0MOnVsOfA, float newV0MOnVs fSPDOnVsOfB = newSPDOnVsOfB; } -bool* EventSelectionParams::GetSelection(int iSelection) +bool* EventSelectionParams::getSelection(int iSelection) { if (iSelection == 0) { return selectionBarrel; diff --git a/Common/CCDB/EventSelectionParams.h b/Common/CCDB/EventSelectionParams.h index b5e1f44b91c..afd8dcbf081 100644 --- a/Common/CCDB/EventSelectionParams.h +++ b/Common/CCDB/EventSelectionParams.h @@ -9,6 +9,11 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +/// \file EventSelectionParams.h +/// \brief Event selection parameters +/// +/// \author Evgeny Kryshen and Igor Altsybeev + #ifndef COMMON_CCDB_EVENTSELECTIONPARAMS_H_ #define COMMON_CCDB_EVENTSELECTIONPARAMS_H_ @@ -67,6 +72,9 @@ enum EventSelectionFlags { kNoCollInRofStrict, // no other collisions in this Readout Frame kNoCollInRofStandard, // no other collisions in this Readout Frame with per-collision multiplicity above threshold kNoHighMultCollInPrevRof, // veto an event if FT0C amplitude in previous ITS ROF is above threshold + kIsGoodITSLayer3, // number of inactive chips on ITS layer 3 is below maximum allowed value + kIsGoodITSLayer0123, // numbers of inactive chips on ITS layers 0-3 are below maximum allowed values + kIsGoodITSLayersAll, // numbers of inactive chips on all ITS layers are below maximum allowed values kNsel // counter }; @@ -77,10 +85,10 @@ extern const char* selectionLabels[kNsel]; class EventSelectionParams { public: - explicit EventSelectionParams(int system = 0, int run = 2); - void DisableOutOfBunchPileupCuts(); - void SetOnVsOfParams(float newV0MOnVsOfA, float newV0MOnVsOfB, float newSPDOnVsOfA, float newSPDOnVsOfB); - bool* GetSelection(int iSelection); + explicit EventSelectionParams(int system = 0, int run = 2); // o2-linter: disable=name/function-variable + void disableOutOfBunchPileupCuts(); + void setOnVsOfParams(float newV0MOnVsOfA, float newV0MOnVsOfB, float newSPDOnVsOfA, float newSPDOnVsOfB); + bool* getSelection(int iSelection); bool selectionBarrel[o2::aod::evsel::kNsel]; bool selectionMuonWithPileupCuts[o2::aod::evsel::kNsel]; @@ -154,7 +162,7 @@ class EventSelectionParams int fITSROFrameStartBorderMargin = 10; // number of bcs to cut in the beginning of ITS readout frame int fITSROFrameEndBorderMargin = 20; // number of bcs to cut in the end of ITS readout frame - ClassDefNV(EventSelectionParams, 6) + ClassDefNV(EventSelectionParams, 7) }; #endif // COMMON_CCDB_EVENTSELECTIONPARAMS_H_ diff --git a/Common/TableProducer/Converters/CMakeLists.txt b/Common/TableProducer/Converters/CMakeLists.txt index eda31568123..646a0b5ade9 100644 --- a/Common/TableProducer/Converters/CMakeLists.txt +++ b/Common/TableProducer/Converters/CMakeLists.txt @@ -93,3 +93,14 @@ o2physics_add_dpl_workflow(trackqa-converter-002 SOURCES trackQA002Converter.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(run2bcinfos-converter + SOURCES run2bcinfosConverter.cxx + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(run2-tracks-extra-converter + SOURCES run2tracksExtraConverter.cxx + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + diff --git a/Common/TableProducer/Converters/run2bcinfosConverter.cxx b/Common/TableProducer/Converters/run2bcinfosConverter.cxx new file mode 100644 index 00000000000..6257d371824 --- /dev/null +++ b/Common/TableProducer/Converters/run2bcinfosConverter.cxx @@ -0,0 +1,40 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +#include "Framework/runDataProcessing.h" +#include "Framework/AnalysisTask.h" +#include "Framework/AnalysisDataModel.h" + +using namespace o2; +using namespace o2::framework; + +struct Run2BCInfosConverter { + Produces Run2BCInfos_001; + void process(aod::Run2BCInfos_000 const& Run2BCInfos_000) + { + + for (const auto& entry : Run2BCInfos_000) { + Run2BCInfos_001(entry.eventCuts(), + entry.triggerMaskNext50(), entry.l0TriggerInputMask(), + entry.spdClustersL0(), entry.spdClustersL1(), + entry.spdFiredChipsL0(), entry.spdFiredChipsL1(), + entry.spdFiredFastOrL0(), entry.spdFiredFastOrL1(), + entry.v0TriggerChargeA(), entry.v0TriggerChargeC(), + 0, 0); + } + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{ + adaptAnalysisTask(cfgc)}; +} diff --git a/Common/TableProducer/Converters/run2tracksExtraConverter.cxx b/Common/TableProducer/Converters/run2tracksExtraConverter.cxx new file mode 100644 index 00000000000..28ae54c4367 --- /dev/null +++ b/Common/TableProducer/Converters/run2tracksExtraConverter.cxx @@ -0,0 +1,34 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +#include "Framework/runDataProcessing.h" +#include "Framework/AnalysisTask.h" +#include "Framework/AnalysisDataModel.h" + +using namespace o2; +using namespace o2::framework; + +struct Run2TracksExtraConverter { + Produces Run2TrackExtras_001; + void process(aod::Run2TrackExtras_000 const& Run2TrackExtras_000) + { + + for (const auto& track0 : Run2TrackExtras_000) { + Run2TrackExtras_001(track0.itsSignal(), 0); + } + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{ + adaptAnalysisTask(cfgc)}; +} diff --git a/Common/TableProducer/Converters/tracksExtraV002Converter.cxx b/Common/TableProducer/Converters/tracksExtraV002Converter.cxx index 51d06085809..7765daa9e5e 100644 --- a/Common/TableProducer/Converters/tracksExtraV002Converter.cxx +++ b/Common/TableProducer/Converters/tracksExtraV002Converter.cxx @@ -88,7 +88,7 @@ struct TracksExtraV002Converter { track1.trackTimeRes()); } } - PROCESS_SWITCH(TracksExtraV002Converter, processV001ToV002, "process v001-to-v002 conversion", false); + PROCESS_SWITCH(TracksExtraV002Converter, processV001ToV002, "process v001-to-v002 conversion", true); }; /// Spawn the extended table for TracksExtra002 to avoid the call to the internal spawner and a consequent circular dependency diff --git a/Common/TableProducer/eventSelection.cxx b/Common/TableProducer/eventSelection.cxx index bc9cf1d0fe2..6c323c86952 100644 --- a/Common/TableProducer/eventSelection.cxx +++ b/Common/TableProducer/eventSelection.cxx @@ -8,6 +8,12 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. + +/// \file eventSelection.cxx +/// \brief Event selection task +/// +/// \author Evgeny Kryshen and Igor Altsybeev + #include #include @@ -27,6 +33,9 @@ #include "ITSMFTBase/DPLAlpideParam.h" #include "MetadataHelper.h" #include "DataFormatsParameters/AggregatedRunInfo.h" +#include "DataFormatsITSMFT/NoiseMap.h" // missing include in TimeDeadMap.h +#include "DataFormatsITSMFT/TimeDeadMap.h" +#include "ITSMFTReconstruction/ChipMappingITS.h" #include "TH1D.h" @@ -42,26 +51,41 @@ using BCsWithBcSelsRun2 = soa::Join; using FullTracks = soa::Join; using FullTracksIU = soa::Join; -const double bcNS = o2::constants::lhc::LHCBunchSpacingNS; +static const double bcNS = o2::constants::lhc::LHCBunchSpacingNS; +static const int32_t nBCsPerOrbit = o2::constants::lhc::LHCMaxBunches; struct BcSelectionTask { Produces bcsel; Service ccdb; HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; - Configurable confTriggerBcShift{"triggerBcShift", 999, "set to 294 for apass2/apass3 in LHC22o-t"}; - Configurable confITSROFrameStartBorderMargin{"ITSROFrameStartBorderMargin", -1, "Number of bcs at the start of ITS RO Frame border. Take from CCDB if -1"}; - Configurable confITSROFrameEndBorderMargin{"ITSROFrameEndBorderMargin", -1, "Number of bcs at the end of ITS RO Frame border. Take from CCDB if -1"}; - Configurable confTimeFrameStartBorderMargin{"TimeFrameStartBorderMargin", -1, "Number of bcs to cut at the start of the Time Frame. Take from CCDB if -1"}; - Configurable confTimeFrameEndBorderMargin{"TimeFrameEndBorderMargin", -1, "Number of bcs to cut at the end of the Time Frame. Take from CCDB if -1"}; - Configurable confCheckRunDurationLimits{"checkRunDurationLimits", false, "Check if the BCs are within the run duration limits"}; - - int lastRunNumber = -1; - int64_t bcSOR = -1; // global bc of the start of the first orbit + Configurable confTriggerBcShift{"triggerBcShift", 999, "set to 294 for apass2/apass3 in LHC22o-t"}; // o2-linter: disable=name/configurable + Configurable confITSROFrameStartBorderMargin{"ITSROFrameStartBorderMargin", -1, "Number of bcs at the start of ITS RO Frame border. Take from CCDB if -1"}; // o2-linter: disable=name/configurable + Configurable confITSROFrameEndBorderMargin{"ITSROFrameEndBorderMargin", -1, "Number of bcs at the end of ITS RO Frame border. Take from CCDB if -1"}; // o2-linter: disable=name/configurable + Configurable confTimeFrameStartBorderMargin{"TimeFrameStartBorderMargin", -1, "Number of bcs to cut at the start of the Time Frame. Take from CCDB if -1"}; // o2-linter: disable=name/configurable + Configurable confTimeFrameEndBorderMargin{"TimeFrameEndBorderMargin", -1, "Number of bcs to cut at the end of the Time Frame. Take from CCDB if -1"}; // o2-linter: disable=name/configurable + Configurable confCheckRunDurationLimits{"checkRunDurationLimits", false, "Check if the BCs are within the run duration limits"}; // o2-linter: disable=name/configurable + Configurable> maxInactiveChipsPerLayer{"maxInactiveChipsPerLayer", {8, 8, 8, 111, 111, 195, 195}, "Maximum allowed number of inactive ITS chips per layer"}; + + int lastRun = -1; + uint64_t sorTimestamp = 0; // default SOR timestamp + uint64_t eorTimestamp = 1; // default EOR timestamp + int64_t bcSOR = -1; // global bc of the start of run int64_t nBCsPerTF = -1; // duration of TF in bcs, should be 128*3564 or 32*3564 + int rofOffset = -1; // ITS ROF offset, in bc + int rofLength = -1; // ITS ROF length, in bc int mITSROFrameStartBorderMargin = 10; // default value int mITSROFrameEndBorderMargin = 20; // default value int mTimeFrameStartBorderMargin = 300; // default value int mTimeFrameEndBorderMargin = 4000; // default value + bool isPP = 1; // default value + TriggerAliases* aliases = nullptr; + EventSelectionParams* par = nullptr; + std::map> mapInactiveChips; // number of inactive chips vs orbit per layer + int64_t prevOrbitForInactiveChips = 0; // cached next stored orbit in the inactive chip map + int64_t nextOrbitForInactiveChips = 0; // cached previous stored orbit in the inactive chip map + bool isGoodITSLayer3 = true; // default value + bool isGoodITSLayer0123 = true; // default value + bool isGoodITSLayersAll = true; // default value void init(InitContext&) { @@ -108,19 +132,19 @@ struct BcSelectionTask { { bcsel.reserve(bcs.size()); - for (auto& bc : bcs) { - EventSelectionParams* par = ccdb->getForTimeStamp("EventSelection/EventSelectionParams", bc.timestamp()); - TriggerAliases* aliases = ccdb->getForTimeStamp("EventSelection/TriggerAliases", bc.timestamp()); + for (const auto& bc : bcs) { + par = ccdb->getForTimeStamp("EventSelection/EventSelectionParams", bc.timestamp()); + aliases = ccdb->getForTimeStamp("EventSelection/TriggerAliases", bc.timestamp()); // fill fired aliases uint32_t alias{0}; uint64_t triggerMask = bc.triggerMask(); - for (auto& al : aliases->GetAliasToTriggerMaskMap()) { + for (const auto& al : aliases->GetAliasToTriggerMaskMap()) { if (triggerMask & al.second) { alias |= BIT(al.first); } } uint64_t triggerMaskNext50 = bc.triggerMaskNext50(); - for (auto& al : aliases->GetAliasToTriggerMaskNext50Map()) { + for (const auto& al : aliases->GetAliasToTriggerMaskNext50Map()) { if (triggerMaskNext50 & al.second) { alias |= BIT(al.first); } @@ -156,9 +180,9 @@ struct BcSelectionTask { selection |= (timeT0C > par->fT0CBBlower && timeT0C < par->fT0CBBupper) ? BIT(kIsBBT0C) : 0; selection |= (timeZNA > par->fZNABBlower && timeZNA < par->fZNABBupper) ? BIT(kIsBBZNA) : 0; selection |= (timeZNC > par->fZNCBBlower && timeZNC < par->fZNCBBupper) ? BIT(kIsBBZNC) : 0; - selection |= !(fabs(timeZNA) > par->fZNABGlower && fabs(timeZNA) < par->fZNABGupper) ? BIT(kNoBGZNA) : 0; - selection |= !(fabs(timeZNC) > par->fZNCBGlower && fabs(timeZNC) < par->fZNCBGupper) ? BIT(kNoBGZNC) : 0; - selection |= (pow((timeZNA + timeZNC - par->fZNSumMean) / par->fZNSumSigma, 2) + pow((timeZNA - timeZNC - par->fZNDifMean) / par->fZNDifSigma, 2) < 1) ? BIT(kIsBBZAC) : 0; + selection |= !(std::fabs(timeZNA) > par->fZNABGlower && std::fabs(timeZNA) < par->fZNABGupper) ? BIT(kNoBGZNA) : 0; + selection |= !(std::fabs(timeZNC) > par->fZNCBGlower && std::fabs(timeZNC) < par->fZNCBGupper) ? BIT(kNoBGZNC) : 0; + selection |= (std::pow((timeZNA + timeZNC - par->fZNSumMean) / par->fZNSumSigma, 2) + std::pow((timeZNA - timeZNC - par->fZNDifMean) / par->fZNDifSigma, 2) < 1) ? BIT(kIsBBZAC) : 0; // Calculate V0 multiplicity per ring float multRingV0A[5] = {0.}; @@ -232,56 +256,83 @@ struct BcSelectionTask { { if (bcs.size() == 0) return; - bcsel.reserve(bcs.size()); - // extract ITS time frame parameters + int run = bcs.iteratorAt(0).runNumber(); - auto timestamps = ccdb->getRunDuration(run, true); /// fatalise if timestamps are not found - int64_t sorTimestamp = timestamps.first; // timestamp of the SOR/SOX/STF in ms - int64_t eorTimestamp = timestamps.second; // timestamp of the EOR/EOX/ETF in ms - int64_t ts = eorTimestamp / 2 + sorTimestamp / 2; // timestamp of the middle of the run - auto alppar = ccdb->getForTimeStamp>("ITS/Config/AlpideParam", ts); - EventSelectionParams* par = ccdb->getForTimeStamp("EventSelection/EventSelectionParams", ts); - TriggerAliases* aliases = ccdb->getForTimeStamp("EventSelection/TriggerAliases", ts); + + if (run != lastRun && run >= 500000) { + lastRun = run; + auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), run); + // first bc of the first orbit + bcSOR = runInfo.orbitSOR * nBCsPerOrbit; + // duration of TF in bcs + nBCsPerTF = runInfo.orbitsPerTF * nBCsPerOrbit; + // SOR and EOR timestamps + sorTimestamp = runInfo.sor; + eorTimestamp = runInfo.eor; + // timestamp of the middle of the run used to access run-wise CCDB entries + int64_t ts = runInfo.sor / 2 + runInfo.eor / 2; + // access ITSROF and TF border margins + par = ccdb->getForTimeStamp("EventSelection/EventSelectionParams", ts); + mITSROFrameStartBorderMargin = confITSROFrameStartBorderMargin < 0 ? par->fITSROFrameStartBorderMargin : confITSROFrameStartBorderMargin; + mITSROFrameEndBorderMargin = confITSROFrameEndBorderMargin < 0 ? par->fITSROFrameEndBorderMargin : confITSROFrameEndBorderMargin; + mTimeFrameStartBorderMargin = confTimeFrameStartBorderMargin < 0 ? par->fTimeFrameStartBorderMargin : confTimeFrameStartBorderMargin; + mTimeFrameEndBorderMargin = confTimeFrameEndBorderMargin < 0 ? par->fTimeFrameEndBorderMargin : confTimeFrameEndBorderMargin; + // ITSROF parameters + auto alppar = ccdb->getForTimeStamp>("ITS/Config/AlpideParam", ts); + rofOffset = alppar->roFrameBiasInBC; + rofLength = alppar->roFrameLengthInBC; + // Trigger aliases + aliases = ccdb->getForTimeStamp("EventSelection/TriggerAliases", ts); + // Collision system info + auto grplhcif = ccdb->getForTimeStamp("GLO/Config/GRPLHCIF", ts); + int beamZ1 = grplhcif->getBeamZ(o2::constants::lhc::BeamA); + int beamZ2 = grplhcif->getBeamZ(o2::constants::lhc::BeamC); + isPP = beamZ1 == 1 && beamZ2 == 1; + // prepare map of inactive chips + auto itsDeadMap = ccdb->getForTimeStamp("ITS/Calib/TimeDeadMap", ts); + auto itsDeadMapOrbits = itsDeadMap->getEvolvingMapKeys(); // roughly every second, ~350 TFs = 350x32 orbits + std::vector vClosest; // temporary vector of inactive chip ids for the current orbit range + for (const auto& orbit : itsDeadMapOrbits) { + itsDeadMap->getMapAtOrbit(orbit, vClosest); + // insert initial (orbit,vector) pair for each layer + mapInactiveChips[orbit].resize(o2::itsmft::ChipMappingITS::NLayers, 0); + + // fill map of inactive chips + for (size_t iel = 0; iel < vClosest.size(); iel++) { + uint16_t w1 = vClosest[iel]; + bool isLastInSequence = (w1 & 0x8000) == 0; + uint16_t w2 = isLastInSequence ? w1 + 1 : vClosest[iel + 1]; + uint16_t chipId1 = w1 & 0x7FFF; + uint16_t chipId2 = w2 & 0x7FFF; + for (int chipId = chipId1; chipId < chipId2; chipId++) { + auto layer = o2::itsmft::ChipMappingITS::getLayer(chipId); + mapInactiveChips[orbit][layer]++; + } + } // loop over vector of inactive chip ids + } // loop over orbits + } + // map from GlobalBC to BcId needed to find triggerBc std::map mapGlobalBCtoBcId; - for (auto& bc : bcs) { + for (const auto& bc : bcs) { mapGlobalBCtoBcId[bc.globalBC()] = bc.globalIndex(); } + int triggerBcShift = confTriggerBcShift; if (confTriggerBcShift == 999) { triggerBcShift = (run <= 526766 || (run >= 526886 && run <= 527237) || (run >= 527259 && run <= 527518) || run == 527523 || run == 527734 || run >= 534091) ? 0 : 294; } - // extract run number and related information - if (run != lastRunNumber) { - lastRunNumber = run; // do it only once - if (run >= 500000) { // access CCDB for data or anchored MC only - int64_t ts = bcs.iteratorAt(0).timestamp(); - // access orbitShift, ITSROF and TF border margins - EventSelectionParams* par = ccdb->getForTimeStamp("EventSelection/EventSelectionParams", ts); - mITSROFrameStartBorderMargin = confITSROFrameStartBorderMargin < 0 ? par->fITSROFrameStartBorderMargin : confITSROFrameStartBorderMargin; - mITSROFrameEndBorderMargin = confITSROFrameEndBorderMargin < 0 ? par->fITSROFrameEndBorderMargin : confITSROFrameEndBorderMargin; - mTimeFrameStartBorderMargin = confTimeFrameStartBorderMargin < 0 ? par->fTimeFrameStartBorderMargin : confTimeFrameStartBorderMargin; - mTimeFrameEndBorderMargin = confTimeFrameEndBorderMargin < 0 ? par->fTimeFrameEndBorderMargin : confTimeFrameEndBorderMargin; - - auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), run); - // first bc of the first orbit - bcSOR = runInfo.orbitSOR * o2::constants::lhc::LHCMaxBunches; - // duration of TF in bcs - nBCsPerTF = runInfo.orbitsPerTF * o2::constants::lhc::LHCMaxBunches; - } - } - // bc loop - for (auto bc : bcs) { + for (auto bc : bcs) { // o2-linter: disable=const-ref-in-for-loop uint32_t alias{0}; // workaround for pp2022 (trigger info is shifted by -294 bcs) int32_t triggerBcId = mapGlobalBCtoBcId[bc.globalBC() + triggerBcShift]; - if (triggerBcId) { + if (triggerBcId && aliases) { auto triggerBc = bcs.iteratorAt(triggerBcId); uint64_t triggerMask = triggerBc.triggerMask(); - for (auto& al : aliases->GetAliasToTriggerMaskMap()) { + for (const auto& al : aliases->GetAliasToTriggerMaskMap()) { if (triggerMask & al.second) { alias |= BIT(al.first); } @@ -340,21 +391,53 @@ struct BcSelectionTask { selection |= (timeT0C > par->fT0CBBlower && timeT0C < par->fT0CBBupper) ? BIT(kIsBBT0C) : 0; selection |= (timeZNA > par->fZNABBlower && timeZNA < par->fZNABBupper) ? BIT(kIsBBZNA) : 0; selection |= (timeZNC > par->fZNCBBlower && timeZNC < par->fZNCBBupper) ? BIT(kIsBBZNC) : 0; - selection |= (pow((timeZNA + timeZNC - par->fZNSumMean) / par->fZNSumSigma, 2) + pow((timeZNA - timeZNC - par->fZNDifMean) / par->fZNDifSigma, 2) < 1) ? BIT(kIsBBZAC) : 0; - selection |= !(fabs(timeZNA) > par->fZNABGlower && fabs(timeZNA) < par->fZNABGupper) ? BIT(kNoBGZNA) : 0; - selection |= !(fabs(timeZNC) > par->fZNCBGlower && fabs(timeZNC) < par->fZNCBGupper) ? BIT(kNoBGZNC) : 0; + selection |= (std::pow((timeZNA + timeZNC - par->fZNSumMean) / par->fZNSumSigma, 2) + std::pow((timeZNA - timeZNC - par->fZNDifMean) / par->fZNDifSigma, 2) < 1) ? BIT(kIsBBZAC) : 0; + selection |= !(std::fabs(timeZNA) > par->fZNABGlower && std::fabs(timeZNA) < par->fZNABGupper) ? BIT(kNoBGZNA) : 0; + selection |= !(std::fabs(timeZNC) > par->fZNCBGlower && std::fabs(timeZNC) < par->fZNCBGupper) ? BIT(kNoBGZNC) : 0; selection |= (bc.has_ft0() ? (bc.ft0().triggerMask() & BIT(o2::ft0::Triggers::bitVertex)) > 0 : 0) ? BIT(kIsTriggerTVX) : 0; // check if bc is far from start and end of the ITS RO Frame border - uint16_t bcInITSROF = (globalBC + 3564 - alppar->roFrameBiasInBC) % alppar->roFrameLengthInBC; + uint16_t bcInITSROF = (globalBC + nBCsPerOrbit - rofOffset) % rofLength; LOGP(debug, "bcInITSROF={}", bcInITSROF); - selection |= bcInITSROF > mITSROFrameStartBorderMargin && bcInITSROF < alppar->roFrameLengthInBC - mITSROFrameEndBorderMargin ? BIT(kNoITSROFrameBorder) : 0; + selection |= bcInITSROF > mITSROFrameStartBorderMargin && bcInITSROF < rofLength - mITSROFrameEndBorderMargin ? BIT(kNoITSROFrameBorder) : 0; // check if bc is far from the Time Frame borders int64_t bcInTF = (globalBC - bcSOR) % nBCsPerTF; LOGP(debug, "bcInTF={}", bcInTF); selection |= bcInTF > mTimeFrameStartBorderMargin && bcInTF < nBCsPerTF - mTimeFrameEndBorderMargin ? BIT(kNoTimeFrameBorder) : 0; + // check number of inactive chips and set kIsGoodITSLayer3, kIsGoodITSLayer0123, kIsGoodITSLayersAll flags + int64_t orbit = globalBC / nBCsPerOrbit; + if (mapInactiveChips.size() > 0 && (orbit < prevOrbitForInactiveChips || orbit > nextOrbitForInactiveChips)) { + auto it = mapInactiveChips.upper_bound(orbit); + bool isEnd = (it == mapInactiveChips.end()); + if (isEnd) + it--; + nextOrbitForInactiveChips = isEnd ? orbit : it->first; // setting current orbit in case we reached the end of mapInactiveChips + auto vNextInactiveChips = it->second; + if (it != mapInactiveChips.begin() && !isEnd) + it--; + prevOrbitForInactiveChips = it->first; + auto vPrevInactiveChips = it->second; + LOGP(debug, "orbit: {}, previous orbit: {}, next orbit: {} ", orbit, prevOrbitForInactiveChips, nextOrbitForInactiveChips); + LOGP(debug, "next inactive chips: {} {} {} {} {} {} {}", vNextInactiveChips[0], vNextInactiveChips[1], vNextInactiveChips[2], vNextInactiveChips[3], vNextInactiveChips[4], vNextInactiveChips[5], vNextInactiveChips[6]); + LOGP(debug, "prev inactive chips: {} {} {} {} {} {} {}", vPrevInactiveChips[0], vPrevInactiveChips[1], vPrevInactiveChips[2], vPrevInactiveChips[3], vPrevInactiveChips[4], vPrevInactiveChips[5], vPrevInactiveChips[6]); + isGoodITSLayer3 = vPrevInactiveChips[3] <= maxInactiveChipsPerLayer->at(3) && vNextInactiveChips[3] <= maxInactiveChipsPerLayer->at(3); + isGoodITSLayer0123 = true; + for (int i = 0; i < 3; i++) { + isGoodITSLayer0123 &= vPrevInactiveChips[i] <= maxInactiveChipsPerLayer->at(i) && vNextInactiveChips[i] <= maxInactiveChipsPerLayer->at(i); + } + isGoodITSLayersAll = true; + for (int i = 0; i < o2::itsmft::ChipMappingITS::NLayers; i++) { + isGoodITSLayersAll &= vPrevInactiveChips[i] <= maxInactiveChipsPerLayer->at(i) && vNextInactiveChips[i] <= maxInactiveChipsPerLayer->at(i); + } + } + + selection |= isGoodITSLayer3 ? BIT(kIsGoodITSLayer3) : 0; + selection |= isGoodITSLayer0123 ? BIT(kIsGoodITSLayer0123) : 0; + selection |= isGoodITSLayersAll ? BIT(kIsGoodITSLayersAll) : 0; + + // fill found indices int32_t foundFT0 = bc.has_ft0() ? bc.ft0().globalIndex() : -1; int32_t foundFV0 = bc.has_fv0a() ? bc.fv0a().globalIndex() : -1; int32_t foundFDD = bc.has_fdd() ? bc.fdd().globalIndex() : -1; @@ -363,10 +446,7 @@ struct BcSelectionTask { // Temporary workaround to get visible cross section. TODO: store run-by-run visible cross sections in CCDB const char* srun = Form("%d", run); - auto grplhcif = ccdb->getForTimeStamp("GLO/Config/GRPLHCIF", bc.timestamp()); - int beamZ1 = grplhcif->getBeamZ(o2::constants::lhc::BeamA); - int beamZ2 = grplhcif->getBeamZ(o2::constants::lhc::BeamC); - bool isPP = beamZ1 == 1 && beamZ2 == 1; + bool injectionEnergy = (run >= 500000 && run <= 520099) || (run >= 534133 && run <= 534468); // Cross sections in ub. Using dummy -1 if lumi estimator is not reliable float csTVX = isPP ? (injectionEnergy ? 0.0355e6 : 0.0594e6) : -1.; @@ -416,7 +496,7 @@ struct BcSelectionTask { } } - if (bc.timestamp() < static_cast(sorTimestamp) || bc.timestamp() > static_cast(eorTimestamp)) { + if (bc.timestamp() < sorTimestamp || bc.timestamp() > eorTimestamp) { histos.get(HIST("hCounterInvalidBCTimestamp"))->Fill(srun, 1); if (confCheckRunDurationLimits.value) { LOGF(warn, "Invalid BC timestamp: %d, run: %d, sor: %d, eor: %d", bc.timestamp(), run, sorTimestamp, eorTimestamp); @@ -441,15 +521,15 @@ struct EventSelectionTask { Configurable confSigmaBCforHighPtTracks{"confSigmaBCforHighPtTracks", 4, "Custom sigma (in bcs) for collisions with high-pt tracks"}; // configurables for occupancy-based event selection - Configurable confTimeIntervalForOccupancyCalculationMin{"TimeIntervalForOccupancyCalculationMin", -40, "Min time diff window for TPC occupancy calculation, us"}; - Configurable confTimeIntervalForOccupancyCalculationMax{"TimeIntervalForOccupancyCalculationMax", 100, "Max time diff window for TPC occupancy calculation, us"}; - Configurable confTimeRangeVetoOnCollStandard{"TimeRangeVetoOnCollStandard", 10.0, "Exclusion of a collision if there are other collisions nearby, +/- us"}; - Configurable confTimeRangeVetoOnCollNarrow{"TimeRangeVetoOnCollNarrow", 2.0, "Exclusion of a collision if there are other collisions nearby, +/- us"}; - Configurable confFT0CamplCutVetoOnCollInTimeRange{"FT0CamplPerCollCutVetoOnCollInTimeRange", 8000, "Max allowed FT0C amplitude for each nearby collision in +/- time range"}; - Configurable confEpsilonDistanceForVzDependentVetoTPC{"EpsilonDistanceForVzDependentVetoTPC", 2.5, "Epsilon for vZ-dependent veto on drifting TPC tracks from nearby collisions, cm"}; - Configurable confFT0CamplCutVetoOnCollInROF{"FT0CamplPerCollCutVetoOnCollInROF", 5000, "Max allowed FT0C amplitude for each nearby collision inside this ITS ROF"}; - Configurable confEpsilonVzDiffVetoInROF{"EpsilonVzDiffVetoInROF", 0.3, "Minumum distance to nearby collisions along z inside this ITS ROF, cm"}; - Configurable confUseWeightsForOccupancyVariable{"UseWeightsForOccupancyEstimator", 1, "Use or not the delta-time weights for the occupancy estimator"}; + Configurable confTimeIntervalForOccupancyCalculationMin{"TimeIntervalForOccupancyCalculationMin", -40, "Min time diff window for TPC occupancy calculation, us"}; // o2-linter: disable=name/configurable + Configurable confTimeIntervalForOccupancyCalculationMax{"TimeIntervalForOccupancyCalculationMax", 100, "Max time diff window for TPC occupancy calculation, us"}; // o2-linter: disable=name/configurable + Configurable confTimeRangeVetoOnCollStandard{"TimeRangeVetoOnCollStandard", 10.0, "Exclusion of a collision if there are other collisions nearby, +/- us"}; // o2-linter: disable=name/configurable + Configurable confTimeRangeVetoOnCollNarrow{"TimeRangeVetoOnCollNarrow", 2.0, "Exclusion of a collision if there are other collisions nearby, +/- us"}; // o2-linter: disable=name/configurable + Configurable confFT0CamplCutVetoOnCollInTimeRange{"FT0CamplPerCollCutVetoOnCollInTimeRange", 8000, "Max allowed FT0C amplitude for each nearby collision in +/- time range"}; // o2-linter: disable=name/configurable + Configurable confEpsilonDistanceForVzDependentVetoTPC{"EpsilonDistanceForVzDependentVetoTPC", 2.5, "Epsilon for vZ-dependent veto on drifting TPC tracks from nearby collisions, cm"}; // o2-linter: disable=name/configurable + Configurable confFT0CamplCutVetoOnCollInROF{"FT0CamplPerCollCutVetoOnCollInROF", 5000, "Max allowed FT0C amplitude for each nearby collision inside this ITS ROF"}; // o2-linter: disable=name/configurable + Configurable confEpsilonVzDiffVetoInROF{"EpsilonVzDiffVetoInROF", 0.3, "Minumum distance to nearby collisions along z inside this ITS ROF, cm"}; // o2-linter: disable=name/configurable + Configurable confUseWeightsForOccupancyVariable{"UseWeightsForOccupancyEstimator", 1, "Use or not the delta-time weights for the occupancy estimator"}; // o2-linter: disable=name/configurable Partition tracklets = (aod::track::trackType == static_cast(o2::aod::track::TrackTypeEnum::Run2Tracklet)); @@ -459,8 +539,8 @@ struct EventSelectionTask { Service ccdb; HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; - int lastRun = -1; // last run number (needed to access ccdb only if run!=lastRun) - std::bitset bcPatternB; // bc pattern of colliding bunches + int lastRun = -1; // last run number (needed to access ccdb only if run!=lastRun) + std::bitset bcPatternB; // bc pattern of colliding bunches int64_t bcSOR = -1; // global bc of the start of the first orbit int64_t nBCsPerTF = -1; // duration of TF in bcs, should be 128*3564 or 32*3564 @@ -500,7 +580,7 @@ struct EventSelectionTask { int64_t maxBC = meanBC + 3 * sigmaBC; // TODO: use ITS ROF bounds to reduce the search range? - float zVtxSigma = 2.7 * pow(nContrib, -0.466) + 0.024; + float zVtxSigma = 2.7 * std::pow(nContrib, -0.466) + 0.024; zVtxSigma += 1.0; // additional uncertainty due to imperfectections of FT0 time calibration auto itMin = mapGlobalBcVtxZ.lower_bound(minBC); @@ -509,7 +589,7 @@ struct EventSelectionTask { float bestChi2 = 1e+10; int64_t bestGlobalBC = 0; for (std::map::iterator it = itMin; it != itMax; ++it) { - float chi2 = pow((it->second - zVtxCol) / zVtxSigma, 2) + pow(static_cast(it->first - meanBC) / sigmaBC, 2.); + float chi2 = std::pow((it->second - zVtxCol) / zVtxSigma, 2) + std::pow(static_cast(it->first - meanBC) / sigmaBC, 2.); if (chi2 < bestChi2) { bestChi2 = chi2; bestGlobalBC = it->first; @@ -558,7 +638,7 @@ struct EventSelectionTask { { auto bc = col.bc_as(); EventSelectionParams* par = ccdb->getForTimeStamp("EventSelection/EventSelectionParams", bc.timestamp()); - bool* applySelection = par->GetSelection(muonSelection); + bool* applySelection = par->getSelection(muonSelection); if (isMC == 1) { applySelection[kIsBBZAC] = 0; applySelection[kNoV0MOnVsOfPileup] = 0; @@ -635,9 +715,9 @@ struct EventSelectionTask { lastRun = run; auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), run); // first bc of the first orbit - bcSOR = runInfo.orbitSOR * o2::constants::lhc::LHCMaxBunches; + bcSOR = runInfo.orbitSOR * nBCsPerOrbit; // duration of TF in bcs - nBCsPerTF = runInfo.orbitsPerTF * o2::constants::lhc::LHCMaxBunches; + nBCsPerTF = runInfo.orbitsPerTF * nBCsPerOrbit; // colliding bc pattern int64_t ts = bcs.iteratorAt(0).timestamp(); auto grplhcif = ccdb->getForTimeStamp("GLO/Config/GRPLHCIF", ts); @@ -648,16 +728,16 @@ struct EventSelectionTask { rofOffset = alppar->roFrameBiasInBC; rofLength = alppar->roFrameLengthInBC; LOGP(debug, "ITS ROF Offset={} ITS ROF Length={}", rofOffset, rofLength); - } + } // if run != lastRun // create maps from globalBC to bc index for TVX-fired bcs // to be used for closest TVX searches std::map mapGlobalBcWithTVX; std::map mapGlobalBcVtxZ; - for (auto& bc : bcs) { + for (const auto& bc : bcs) { int64_t globalBC = bc.globalBC(); // skip non-colliding bcs for data and anchored runs - if (run >= 500000 && bcPatternB[globalBC % o2::constants::lhc::LHCMaxBunches] == 0) { + if (run >= 500000 && bcPatternB[globalBC % nBCsPerOrbit] == 0) { continue; } if (bc.selection_bit(kIsTriggerTVX)) { @@ -669,7 +749,7 @@ struct EventSelectionTask { // protection against empty FT0 maps if (mapGlobalBcWithTVX.size() == 0) { LOGP(error, "FT0 table is empty or corrupted. Filling evsel table with dummy values"); - for (auto& col : cols) { + for (const auto& col : cols) { auto bc = col.bc_as(); int32_t foundBC = bc.globalIndex(); int32_t foundFT0 = bc.foundFT0Id(); @@ -708,7 +788,7 @@ struct EventSelectionTask { std::vector vTrackTimesTRDnoTOF; // first loop to match collisions to TVX, also extract other per-collision information for further use - for (auto& col : cols) { + for (const auto& col : cols) { int32_t colIndex = col.globalIndex(); auto bc = col.bc_as(); @@ -724,7 +804,7 @@ struct EventSelectionTask { int nPvTracksTPCnoTOFnoTRD = 0; int nPvTracksHighPtTPCnoTOFnoTRD = 0; float sumTime = 0, sumW = 0, sumHighPtTime = 0, sumHighPtW = 0; - for (auto& track : colPvTracks) { + for (const auto& track : colPvTracks) { float trackTime = track.trackTime(); if (track.itsNCls() >= 5) vTracksITS567perColl[colIndex]++; @@ -752,7 +832,7 @@ struct EventSelectionTask { } } vWeightedTimesTPCnoTOFnoTRD[colIndex] = sumW > 0 ? sumTime / sumW : 0; - vWeightedSigmaTPCnoTOFnoTRD[colIndex] = sumW > 0 ? sqrt(1. / sumW) : 0; + vWeightedSigmaTPCnoTOFnoTRD[colIndex] = sumW > 0 ? std::sqrt(1. / sumW) : 0; vNcontributors[colIndex] = colPvTracks.size(); int nPvTracksTOF = vTrackTimesTOF.size(); int nPvTracksTRDnoTOF = vTrackTimesTRDnoTOF.size(); @@ -805,7 +885,7 @@ struct EventSelectionTask { } // second loop to match remaining low-pt TPCnoTOFnoTRD collisions - for (auto& col : cols) { + for (const auto& col : cols) { int32_t colIndex = col.globalIndex(); if (vIsVertexTPC[colIndex] > 0 && vIsVertexTOF[colIndex] == 0 && vIsVertexHighPtTPC[colIndex] == 0) { float weightedTime = vWeightedTimesTPCnoTOFnoTRD[colIndex]; @@ -827,15 +907,15 @@ struct EventSelectionTask { std::vector> vCollsInPrevITSROF; std::vector> vCollsInTimeWin; std::vector> vTimeDeltaForColls; // delta time wrt a given collision - for (auto& col : cols) { + for (const auto& col : cols) { int32_t colIndex = col.globalIndex(); int64_t foundGlobalBC = vFoundGlobalBC[colIndex]; auto bc = bcs.iteratorAt(vFoundBCindex[colIndex]); if (bc.has_foundFT0()) vAmpFT0CperColl[colIndex] = bc.foundFT0().sumAmpC(); - int64_t TFid = (foundGlobalBC - bcSOR) / nBCsPerTF; - int64_t rofId = (foundGlobalBC + 3564 - rofOffset) / rofLength; + int64_t tfId = (foundGlobalBC - bcSOR) / nBCsPerTF; + int64_t rofId = (foundGlobalBC + nBCsPerOrbit - rofOffset) / rofLength; // ### for in-ROF occupancy std::vector vAssocCollInSameROF; @@ -845,10 +925,10 @@ struct EventSelectionTask { int64_t thisBC = vFoundGlobalBC[minColIndex]; // check if this is still the same TF int64_t thisTFid = (thisBC - bcSOR) / nBCsPerTF; - if (thisTFid != TFid) + if (thisTFid != tfId) break; // int thisRofIdInTF = (thisBC - rofOffset) / rofLength; - int64_t thisRofId = (thisBC + 3564 - rofOffset) / rofLength; + int64_t thisRofId = (thisBC + nBCsPerOrbit - rofOffset) / rofLength; // check if we are within the same ROF if (thisRofId != rofId) @@ -861,9 +941,9 @@ struct EventSelectionTask { while (maxColIndex < cols.size()) { int64_t thisBC = vFoundGlobalBC[maxColIndex]; int64_t thisTFid = (thisBC - bcSOR) / nBCsPerTF; - if (thisTFid != TFid) + if (thisTFid != tfId) break; - int64_t thisRofId = (thisBC + 3564 - rofOffset) / rofLength; + int64_t thisRofId = (thisBC + nBCsPerOrbit - rofOffset) / rofLength; if (thisRofId != rofId) break; vAssocCollInSameROF.push_back(maxColIndex); @@ -878,9 +958,9 @@ struct EventSelectionTask { int64_t thisBC = vFoundGlobalBC[minColIndex]; // check if this is still the same TF int64_t thisTFid = (thisBC - bcSOR) / nBCsPerTF; - if (thisTFid != TFid) + if (thisTFid != tfId) break; - int64_t thisRofId = (thisBC + 3564 - rofOffset) / rofLength; + int64_t thisRofId = (thisBC + nBCsPerOrbit - rofOffset) / rofLength; if (thisRofId == rofId - 1) vAssocCollInPrevROF.push_back(minColIndex); else if (thisRofId < rofId - 1) @@ -904,7 +984,7 @@ struct EventSelectionTask { int64_t thisBC = vFoundGlobalBC[minColIndex]; // check if this is still the same TF int64_t thisTFid = (thisBC - bcSOR) / nBCsPerTF; - if (thisTFid != TFid) + if (thisTFid != tfId) break; float dt = (thisBC - foundGlobalBC) * bcNS; // ns // check if we are within the chosen time range @@ -919,7 +999,7 @@ struct EventSelectionTask { while (maxColIndex < cols.size()) { int64_t thisBC = vFoundGlobalBC[maxColIndex]; int64_t thisTFid = (thisBC - bcSOR) / nBCsPerTF; - if (thisTFid != TFid) + if (thisTFid != tfId) break; float dt = (thisBC - foundGlobalBC) * bcNS; // ns if (dt > timeWinOccupancyCalcMaxNS) @@ -946,7 +1026,7 @@ struct EventSelectionTask { std::vector vNoCollInSameRofWithCloseVz(cols.size(), 0); // to veto events with nearby collisions with close vZ std::vector vNoHighMultCollInPrevRof(cols.size(), 0); // veto events if FT0C amplitude in previous ITS ROF is above threshold - for (auto& col : cols) { + for (const auto& col : cols) { int32_t colIndex = col.globalIndex(); float vZ = col.posZ(); @@ -960,7 +1040,7 @@ struct EventSelectionTask { nITS567tracksForSameRofVetoStrict += vTracksITS567perColl[thisColIndex]; if (vAmpFT0CperColl[thisColIndex] > confFT0CamplCutVetoOnCollInROF) nCollsInRofWithFT0CAboveVetoStandard++; - if (fabs(vCollVz[thisColIndex] - vZ) < confEpsilonVzDiffVetoInROF) + if (std::fabs(vCollVz[thisColIndex] - vZ) < confEpsilonVzDiffVetoInROF) nITS567tracksForRofVetoOnCloseVz += vTracksITS567perColl[thisColIndex]; } // in-ROF occupancy flags @@ -1015,35 +1095,35 @@ struct EventSelectionTask { sumAmpFT0CInFullTimeWindow += wOccup * vAmpFT0CperColl[thisColIndex]; // counting tracks from other collisions in fixed time windows - if (fabs(dt) < confTimeRangeVetoOnCollNarrow) + if (std::fabs(dt) < confTimeRangeVetoOnCollNarrow) nITS567tracksForVetoNarrow += vTracksITS567perColl[thisColIndex]; - if (fabs(dt) < confTimeRangeVetoOnCollStandard) + if (std::fabs(dt) < confTimeRangeVetoOnCollStandard) nITS567tracksForVetoStrict += vTracksITS567perColl[thisColIndex]; // standard cut on other collisions vs delta-times - const float driftV = 2.5; // drift velocity in cm/us, TPC drift_length / drift_time = 250 cm / 100 us - if (fabs(dt) < 2.0) { // us, complete veto on other collisions + const float driftV = 2.5; // drift velocity in cm/us, TPC drift_length / drift_time = 250 cm / 100 us + if (std::fabs(dt) < 2.0) { // us, complete veto on other collisions nCollsWithFT0CAboveVetoStandard++; } else if (dt > -4.0 && dt <= -2.0) { // us, strict veto to suppress fake ITS-TPC matches more if (vAmpFT0CperColl[thisColIndex] > confFT0CamplCutVetoOnCollInTimeRange / 5) nCollsWithFT0CAboveVetoStandard++; - } else if (fabs(dt) < 8 + fabs(vZ) / driftV) { // loose veto, 8 us corresponds to maximum possible |vZ|, which is ~20 cm + } else if (std::fabs(dt) < 8 + std::fabs(vZ) / driftV) { // loose veto, 8 us corresponds to maximum possible |vZ|, which is ~20 cm // counting number of other collisions with multiplicity above threshold if (vAmpFT0CperColl[thisColIndex] > confFT0CamplCutVetoOnCollInTimeRange) nCollsWithFT0CAboveVetoStandard++; } // vZ-dependent time cut to avoid collinear tracks from other collisions (experimental) - if (fabs(dt) < 8 + fabs(vZ) / driftV) { + if (std::fabs(dt) < 8 + std::fabs(vZ) / driftV) { if (dt < 0) { // check distance between given vZ and (moving in two directions) vZ of drifting tracks from past collisions - if ((fabs(vCollVz[thisColIndex] - fabs(dt) * driftV - vZ) < confEpsilonDistanceForVzDependentVetoTPC) || - (fabs(vCollVz[thisColIndex] + fabs(dt) * driftV - vZ) < confEpsilonDistanceForVzDependentVetoTPC)) + if ((std::fabs(vCollVz[thisColIndex] - std::fabs(dt) * driftV - vZ) < confEpsilonDistanceForVzDependentVetoTPC) || + (std::fabs(vCollVz[thisColIndex] + std::fabs(dt) * driftV - vZ) < confEpsilonDistanceForVzDependentVetoTPC)) nITS567tracksForVetoVzDependent += vTracksITS567perColl[thisColIndex]; } else { // dt>0 // check distance between drifted vZ of given collision (in two directions) and vZ of future collisions - if ((fabs(vZ - dt * driftV - vCollVz[thisColIndex]) < confEpsilonDistanceForVzDependentVetoTPC) || - (fabs(vZ + dt * driftV - vCollVz[thisColIndex]) < confEpsilonDistanceForVzDependentVetoTPC)) + if ((std::fabs(vZ - dt * driftV - vCollVz[thisColIndex]) < confEpsilonDistanceForVzDependentVetoTPC) || + (std::fabs(vZ + dt * driftV - vCollVz[thisColIndex]) < confEpsilonDistanceForVzDependentVetoTPC)) nITS567tracksForVetoVzDependent += vTracksITS567perColl[thisColIndex]; } } @@ -1057,7 +1137,7 @@ struct EventSelectionTask { vNoCollInVzDependentTimeRange[colIndex] = (nITS567tracksForVetoVzDependent == 0); // experimental } - for (auto& col : cols) { + for (const auto& col : cols) { int32_t colIndex = col.globalIndex(); int32_t foundBC = vFoundBCindex[colIndex]; auto bc = bcs.iteratorAt(foundBC); @@ -1067,7 +1147,7 @@ struct EventSelectionTask { int32_t foundZDC = bc.foundZDCId(); // compare zVtx from FT0 and from PV - bool isGoodZvtxFT0vsPV = bc.has_foundFT0() ? fabs(bc.foundFT0().posZ() - col.posZ()) < maxDiffZvtxFT0vsPV : 0; + bool isGoodZvtxFT0vsPV = bc.has_foundFT0() ? std::fabs(bc.foundFT0().posZ() - col.posZ()) < maxDiffZvtxFT0vsPV : 0; // copy alias decisions from bcsel table uint32_t alias = bc.alias_raw(); diff --git a/DPG/Tasks/AOTEvent/eventSelectionQa.cxx b/DPG/Tasks/AOTEvent/eventSelectionQa.cxx index f378cb2acd2..de37d37c00b 100644 --- a/DPG/Tasks/AOTEvent/eventSelectionQa.cxx +++ b/DPG/Tasks/AOTEvent/eventSelectionQa.cxx @@ -342,7 +342,7 @@ struct EventSelectionQaTask { lastRun = run; auto firstBC = bcs.iteratorAt(0); EventSelectionParams* par = ccdb->getForTimeStamp("EventSelection/EventSelectionParams", firstBC.timestamp()); - bool* applySelection = par->GetSelection(0); + bool* applySelection = par->getSelection(0); for (int i = 0; i < kNsel; i++) { histos.get(HIST("hSelMask"))->SetBinContent(i + 1, applySelection[i]); } @@ -577,80 +577,78 @@ struct EventSelectionQaTask { } // fill ITS dead maps - std::map metadata; - metadata["runNumber"] = Form("%d", run); - o2::itsmft::TimeDeadMap* itsDeadMap = ccdb->getSpecific("ITS/Calib/TimeDeadMap", (tsSOR + tsEOR) / 2, metadata); - + o2::itsmft::TimeDeadMap* itsDeadMap = ccdb->getForTimeStamp("ITS/Calib/TimeDeadMap", (tsSOR + tsEOR) / 2); auto itsDeadMapOrbits = itsDeadMap->getEvolvingMapKeys(); // roughly every second, ~350 TFs = 350x32 orbits - std::vector itsDeadMapOrbitsDouble(itsDeadMapOrbits.begin(), itsDeadMapOrbits.end()); - const AxisSpec axisItsDeadMapOrbits{itsDeadMapOrbitsDouble}; - - for (int l = 0; l < o2::itsmft::ChipMappingITS::NLayers; l++) { - int nChips = o2::itsmft::ChipMappingITS::getNChipsOnLayer(l); - double idFirstChip = o2::itsmft::ChipMappingITS::getFirstChipsOnLayer(l); - // int nStaves = o2::itsmft::ChipMappingITS::getNStavesOnLr(l); - // double idFirstStave = o2::itsmft::ChipMappingITS::getFirstStavesOnLr(l); - histos.add(Form("hDeadChipsVsOrbitL%d", l), Form(";orbit; chip; Layer %d", l), kTH2C, {axisItsDeadMapOrbits, {nChips, idFirstChip, idFirstChip + nChips}}); - histos.add(Form("hNumberOfInactiveChipsVsOrbitL%d", l), Form(";orbit; Layer %d", l), kTH1I, {axisItsDeadMapOrbits}); - } + if (itsDeadMapOrbits.size() > 0) { + std::vector itsDeadMapOrbitsDouble(itsDeadMapOrbits.begin(), itsDeadMapOrbits.end()); + const AxisSpec axisItsDeadMapOrbits{itsDeadMapOrbitsDouble}; + + for (int l = 0; l < o2::itsmft::ChipMappingITS::NLayers; l++) { + int nChips = o2::itsmft::ChipMappingITS::getNChipsOnLayer(l); + double idFirstChip = o2::itsmft::ChipMappingITS::getFirstChipsOnLayer(l); + // int nStaves = o2::itsmft::ChipMappingITS::getNStavesOnLr(l); + // double idFirstStave = o2::itsmft::ChipMappingITS::getFirstStavesOnLr(l); + histos.add(Form("hDeadChipsVsOrbitL%d", l), Form(";orbit; chip; Layer %d", l), kTH2C, {axisItsDeadMapOrbits, {nChips, idFirstChip, idFirstChip + nChips}}); + histos.add(Form("hNumberOfInactiveChipsVsOrbitL%d", l), Form(";orbit; Layer %d", l), kTH1I, {axisItsDeadMapOrbits}); + } - std::vector vClosest; - std::bitset alwaysDeadChips; - std::bitset deadChips; - alwaysDeadChips.set(); - for (const auto& orbit : itsDeadMapOrbits) { - itsDeadMap->getMapAtOrbit(orbit, vClosest); - deadChips.reset(); - for (size_t iel = 0; iel < vClosest.size(); iel++) { - uint16_t w1 = vClosest[iel]; - bool isLastInSequence = (w1 & 0x8000) == 0; - uint16_t w2 = isLastInSequence ? w1 + 1 : vClosest[iel + 1]; - uint16_t chipId1 = w1 & 0x7FFF; - uint16_t chipId2 = w2 & 0x7FFF; - // dead chips are stored as ranges - // vClosest contains first and last chip ids in the range - // last chip id in the range is marked with 0x8000 bit set to 1 - for (int chipId = chipId1; chipId < chipId2; chipId++) { - histos.fill(HIST("hDeadChipsVsOrbitL0"), orbit, chipId, 1); - histos.fill(HIST("hDeadChipsVsOrbitL1"), orbit, chipId, 1); - histos.fill(HIST("hDeadChipsVsOrbitL2"), orbit, chipId, 1); - histos.fill(HIST("hDeadChipsVsOrbitL3"), orbit, chipId, 1); - histos.fill(HIST("hDeadChipsVsOrbitL4"), orbit, chipId, 1); - histos.fill(HIST("hDeadChipsVsOrbitL5"), orbit, chipId, 1); - histos.fill(HIST("hDeadChipsVsOrbitL6"), orbit, chipId, 1); - deadChips.set(chipId); + std::vector vClosest; + std::bitset alwaysDeadChips; + std::bitset deadChips; + alwaysDeadChips.set(); + for (const auto& orbit : itsDeadMapOrbits) { + itsDeadMap->getMapAtOrbit(orbit, vClosest); + deadChips.reset(); + for (size_t iel = 0; iel < vClosest.size(); iel++) { + uint16_t w1 = vClosest[iel]; + bool isLastInSequence = (w1 & 0x8000) == 0; + uint16_t w2 = isLastInSequence ? w1 + 1 : vClosest[iel + 1]; + uint16_t chipId1 = w1 & 0x7FFF; + uint16_t chipId2 = w2 & 0x7FFF; + // dead chips are stored as ranges + // vClosest contains first and last chip ids in the range + // last chip id in the range is marked with 0x8000 bit set to 1 + for (int chipId = chipId1; chipId < chipId2; chipId++) { + histos.fill(HIST("hDeadChipsVsOrbitL0"), orbit, chipId, 1); + histos.fill(HIST("hDeadChipsVsOrbitL1"), orbit, chipId, 1); + histos.fill(HIST("hDeadChipsVsOrbitL2"), orbit, chipId, 1); + histos.fill(HIST("hDeadChipsVsOrbitL3"), orbit, chipId, 1); + histos.fill(HIST("hDeadChipsVsOrbitL4"), orbit, chipId, 1); + histos.fill(HIST("hDeadChipsVsOrbitL5"), orbit, chipId, 1); + histos.fill(HIST("hDeadChipsVsOrbitL6"), orbit, chipId, 1); + deadChips.set(chipId); + } } + alwaysDeadChips &= deadChips; // chips active in the current orbit are set to 0 } - alwaysDeadChips &= deadChips; // chips active in the current orbit are set to 0 - } - // std::cout << alwaysDeadChips << std::endl; - - // filling histograms with number of inactive chips per layer vs orbit (ignoring always inactive) - for (const auto& orbit : itsDeadMapOrbits) { - itsDeadMap->getMapAtOrbit(orbit, vClosest); - std::vector nInactiveChips(o2::itsmft::ChipMappingITS::NLayers, 0); - for (size_t iel = 0; iel < vClosest.size(); iel++) { - uint16_t w1 = vClosest[iel]; - bool isLastInSequence = (w1 & 0x8000) == 0; - uint16_t w2 = isLastInSequence ? w1 + 1 : vClosest[iel + 1]; - uint16_t chipId1 = w1 & 0x7FFF; - uint16_t chipId2 = w2 & 0x7FFF; - for (int chipId = chipId1; chipId < chipId2; chipId++) { - if (alwaysDeadChips[chipId]) // skip always inactive chips - continue; - int32_t layer = o2::itsmft::ChipMappingITS::getLayer(chipId); - nInactiveChips[layer]++; + // std::cout << alwaysDeadChips << std::endl; + + // filling histograms with number of inactive chips per layer vs orbit (ignoring always inactive) + for (const auto& orbit : itsDeadMapOrbits) { + itsDeadMap->getMapAtOrbit(orbit, vClosest); + std::vector nInactiveChips(o2::itsmft::ChipMappingITS::NLayers, 0); + for (size_t iel = 0; iel < vClosest.size(); iel++) { + uint16_t w1 = vClosest[iel]; + bool isLastInSequence = (w1 & 0x8000) == 0; + uint16_t w2 = isLastInSequence ? w1 + 1 : vClosest[iel + 1]; + uint16_t chipId1 = w1 & 0x7FFF; + uint16_t chipId2 = w2 & 0x7FFF; + for (int chipId = chipId1; chipId < chipId2; chipId++) { + if (alwaysDeadChips[chipId]) // skip always inactive chips + continue; + int32_t layer = o2::itsmft::ChipMappingITS::getLayer(chipId); + nInactiveChips[layer]++; + } } + histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL0"), orbit, nInactiveChips[0]); + histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL1"), orbit, nInactiveChips[1]); + histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL2"), orbit, nInactiveChips[2]); + histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL3"), orbit, nInactiveChips[3]); + histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL4"), orbit, nInactiveChips[4]); + histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL5"), orbit, nInactiveChips[5]); + histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL6"), orbit, nInactiveChips[6]); } - histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL0"), orbit, nInactiveChips[0]); - histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL1"), orbit, nInactiveChips[1]); - histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL2"), orbit, nInactiveChips[2]); - histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL3"), orbit, nInactiveChips[3]); - histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL4"), orbit, nInactiveChips[4]); - histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL5"), orbit, nInactiveChips[5]); - histos.fill(HIST("hNumberOfInactiveChipsVsOrbitL6"), orbit, nInactiveChips[6]); } - } // run >= 500000 // create orbit-axis histograms on the fly with binning based on info from GRP if GRP is available diff --git a/DPG/Tasks/AOTTrack/qaEfficiency.cxx b/DPG/Tasks/AOTTrack/qaEfficiency.cxx index 20edd0ace9f..e202302c950 100644 --- a/DPG/Tasks/AOTTrack/qaEfficiency.cxx +++ b/DPG/Tasks/AOTTrack/qaEfficiency.cxx @@ -1156,12 +1156,13 @@ struct QaEfficiency { for (const auto& pdgToCheck : mothersPDGs.value) { if (mother.pdgCode() == pdgToCheck) { motherIsAccepted = true; - break; - } - if (motherIsAccepted) { // Calculate the decay length double decayLength = std::sqrt(std::pow(mother.vx() - mother.mcCollision().posX(), 2) + std::pow(mother.vy() - mother.mcCollision().posY(), 2) + std::pow(mother.vz() - mother.mcCollision().posZ(), 2)); hdecaylengthmother[histogramIndex]->Fill(decayLength); + break; + } + if (motherIsAccepted) { + break; } } } @@ -1260,10 +1261,11 @@ struct QaEfficiency { for (const auto& pdgToCheck : mothersPDGs.value) { if (mother.pdgCode() == pdgToCheck) { motherIsAccepted = true; // Mother matches the list of specified PDGs + hPtmotherGenerated[histogramIndex]->Fill(mother.pt()); // Fill generated pT for mother break; } if (motherIsAccepted) { - hPtmotherGenerated[histogramIndex]->Fill(mother.pt()); // Fill generated pT for mother + break; } } } diff --git a/EventFiltering/PWGHF/HFFilterHelpers.h b/EventFiltering/PWGHF/HFFilterHelpers.h index 6accb5e755c..73df6b6fa8d 100644 --- a/EventFiltering/PWGHF/HFFilterHelpers.h +++ b/EventFiltering/PWGHF/HFFilterHelpers.h @@ -198,7 +198,7 @@ static const std::array massAxisB = // channels to trigger on for femto constexpr int activeFemtoChannels[2][5] = {{1, 1, 1, 1, 0}, // pD0, pD+, pDs, pLc, pXic {0, 0, 0, 1, 0}}; // only for deLc -static const std::vector labelsColumnsFemtoChannels = {"protonDZero", "protonDPlus", "protonDs", "protonLc", "protonXic"}; +static const std::vector labelsColumnsFemtoChannels = {"DZero", "DPlus", "Ds", "Lc", "Xic"}; static const std::vector labelsRowsFemtoChannels = {"protonCharmFemto", "deuteronCharmFemto"}; constexpr float cutsPtThresholdsForFemto[1][2] = {{8., 1.4}}; // proton, deuteron static const std::vector labelsColumnsPtThresholdsForFemto = {"Proton", "Deuteron"}; @@ -206,14 +206,14 @@ static const std::vector labelsColumnsPtThresholdsForFemto = {"Prot // min and max pT for all tracks combined (except for V0 and cascades) constexpr float cutsPt[2][7] = {{1., 0.1, 0.8, 0.5, 0.1, 0.2, 0.4}, {100000., 100000., 5., 100000., 100000., 100000., 100000.}}; // beauty, D*, femto, SigmaC, Xic*+ -> SigmaC++K- -static const std::vector labelsColumnsCutsPt = {"Beauty", "DstarPlus", "FemtoProton", "CharmBaryon", "SoftPiSigmaC", "SoftKaonXicResoToSigmaC", "FemtoDeuteron"}; +static const std::vector labelsColumnsCutsPt = {"Beauty", "DstarPlus", "PrForFemto", "CharmBaryon", "SoftPiSigmaC", "SoftKaonXicResoToSigmaC", "DeForFemto"}; static const std::vector labelsRowsCutsPt = {"Minimum", "Maximum"}; // PID cuts constexpr float cutsNsigma[3][7] = {{3., 3., 3., 5., 3., 3., 5.}, // TPC proton from Lc, pi/K from D0, K from 3-prong, femto selected proton, pi/K from Xic/Omegac, K from Xic*->SigmaC-Kaon, femto selected deuteron {3., 3., 3., 2.5, 3., 3., 5.}, // TOF proton from Lc, pi/K from D0, K from 3-prong, femto selected proton, pi/K from Xic/Omegac, K from Xic*->SigmaC-Kaon, femto selected deuteron {999., 999., 999., 2.5, 999., 999., 5.}}; // Sum in quadrature of TPC and TOF (used only for femto selected proton and deuteron for pT < 4 GeV/c) -static const std::vector labelsColumnsNsigma = {"PrFromLc", "PiKaFromDZero", "KaFrom3Prong", "FemtoProton", "PiKaFromCharmBaryon", "SoftKaonFromXicResoToSigmaC", "FemtoDeuteron"}; +static const std::vector labelsColumnsNsigma = {"PrFromLc", "PiKaFromDZero", "KaFrom3Prong", "PrForFemto", "PiKaFromCharmBaryon", "SoftKaonFromXicResoToSigmaC", "DeForFemto"}; static const std::vector labelsRowsNsigma = {"TPC", "TOF", "Comb"}; // high pt @@ -1111,7 +1111,7 @@ inline int8_t HfFilterHelper::isSelectedSigmaCInDeltaMassRange(const T& pTrackSa return retValue; } -/// Mass selection of Xic candidates to build Lb candidates +/// Mass selection of Xic candidates to build Xib candidates /// \param pTrackSameChargeFirst is the first same-charge track momentum /// \param pTrackSameChargeSecond is the second same-charge track momentum /// \param pTrackOppositeCharge is the opposite charge track momentum diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverse3DContainer.h b/PWGCF/FemtoUniverse/Core/FemtoUniverse3DContainer.h index c08c131ab99..9d5eee9d2f5 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverse3DContainer.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverse3DContainer.h @@ -29,10 +29,10 @@ using namespace o2::framework; -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -namespace femtoUniverse3DContainer +namespace femto_universe3d_container { /// Femtoscopic observable to be computed enum Observable { kstar ///< kstar @@ -42,7 +42,7 @@ enum Observable { kstar ///< kstar enum EventType { same, ///< Pair from same event mixed ///< Pair from mixed event }; -}; // namespace femtoUniverse3DContainer +}; // namespace femto_universe3d_container /// \class FemtoUniverse3DContainer /// \brief Container for all histogramming related to the correlation function. The two @@ -50,7 +50,7 @@ enum EventType { same, ///< Pair from same event /// are filled according to the specified observable /// \tparam eventType Type of the event (same/mixed) /// \tparam obs Observable to be computed (k*/Q_inv/...) -template +template class FemtoUniverse3DContainer { public: @@ -75,7 +75,7 @@ class FemtoUniverse3DContainer /// \param use3dplots Flag to fill 3D plots /// \param isiden Identical or non-identical particle pair template - void init_base(std::string folderName, std::string femtoObs1D, std::string femtoObsKout, std::string femtoObsKside, std::string femtoObsKlong, T femtoObsAxis1D, T femtoObsAxisOut, T femtoObsAxisSide, T femtoObsAxisLong, T multAxis, T kTAxis, T mTAxis, T multAxis3D, T mTAxis3D, bool use3dplots, bool isiden) + void initBase(std::string folderName, std::string femtoObs1D, std::string femtoObsKout, std::string femtoObsKside, std::string femtoObsKlong, T femtoObsAxis1D, T femtoObsAxisOut, T femtoObsAxisSide, T femtoObsAxisLong, T multAxis, T kTAxis, T mTAxis, T multAxis3D, T mTAxis3D, bool use3dplots, bool isiden) { mHistogramRegistry->add((folderName + "/relPairMom3D").c_str(), ("; " + femtoObsKout + "; " + femtoObsKside + "; " + femtoObsKlong).c_str(), kTH3F, {femtoObsAxisOut, femtoObsAxisSide, femtoObsAxisLong}); mHistogramRegistry->add((folderName + "/relPairMomOut").c_str(), ("; " + femtoObsKout + "; Entries").c_str(), kTH1F, {femtoObsAxisOut}); @@ -105,7 +105,7 @@ class FemtoUniverse3DContainer } /// Templated function to initialize the histograms for the task - /// Always calls init_base to initialize the histograms for data/ Monte Carlo reconstructed + /// Always calls initBase to initialize the histograms for data/ Monte Carlo reconstructed /// \tparam T type of the configurable for the axis configuration /// \param registry Histogram registry to be passed /// \param kstarBins k* binning for the histograms @@ -145,9 +145,9 @@ class FemtoUniverse3DContainer framework::AxisSpec multAxis3D = {multBins3D, "Multiplicity"}; framework::AxisSpec mTAxis3D = {mTBins3D, "#it{m}_{T} (GeV/#it{c})"}; - std::string folderName = static_cast(mFolderSuffix[mEventType]) + static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]); + std::string folderName = static_cast(FolderSuffix[EventType]) + static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]); - init_base(folderName, femtoObs1D, femtoObsKout, femtoObsKside, femtoObsKlong, femtoObsAxis1D, femtoObsAxisOut, femtoObsAxisSide, femtoObsAxisLong, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, use3dplots, isiden); + initBase(folderName, femtoObs1D, femtoObsKout, femtoObsKside, femtoObsKlong, femtoObsAxis1D, femtoObsAxisOut, femtoObsAxisSide, femtoObsAxisLong, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, use3dplots, isiden); } /// Set the PDG codes of the two particles involved @@ -167,44 +167,44 @@ class FemtoUniverse3DContainer /// \param part1 Particle one /// \param part2 Particle two /// \param mult Multiplicity of the event - template - void setPair_base(const float femtoObsKout, const float femtoObsKside, const float femtoObsKlong, const float femtoObs1D, const float kT, const float mT, T const& part1, T const& part2, const int mult, bool use3dplots, const float isiden) + template + void setPairBase(const float femtoObsKout, const float femtoObsKside, const float femtoObsKlong, const float femtoObs1D, const float kT, const float mT, T const& part1, T const& part2, const int mult, bool use3dplots, const float isiden) { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairMomOut"), femtoObsKout); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairMomSide"), femtoObsKside); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairMomLong"), femtoObsKlong); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairMom3D"), femtoObsKout, femtoObsKside, femtoObsKlong); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/MultPtPart1"), part1.pt(), mult); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/MultPtPart2"), part2.pt(), mult); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/PtPart1PtPart2"), part1.pt(), part2.pt()); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairMomOut"), femtoObsKout); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairMomSide"), femtoObsKside); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairMomLong"), femtoObsKlong); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairMom3D"), femtoObsKout, femtoObsKside, femtoObsKlong); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/MultPtPart1"), part1.pt(), mult); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/MultPtPart2"), part2.pt(), mult); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/PtPart1PtPart2"), part1.pt(), part2.pt()); if (isiden) { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairMom1D"), (2.0 * femtoObs1D)); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkT"), kT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarkT"), (2.0 * femtoObs1D), kT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarmT"), (2.0 * femtoObs1D), mT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarMult"), (2.0 * femtoObs1D), mult); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/kstarPtPart1"), (2.0 * femtoObs1D), part1.pt()); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/kstarPtPart2"), (2.0 * femtoObs1D), part2.pt()); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairMom1D"), (2.0 * femtoObs1D)); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkT"), kT); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarkT"), (2.0 * femtoObs1D), kT); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmT"), (2.0 * femtoObs1D), mT); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarMult"), (2.0 * femtoObs1D), mult); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/kstarPtPart1"), (2.0 * femtoObs1D), part1.pt()); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/kstarPtPart2"), (2.0 * femtoObs1D), part2.pt()); if (use3dplots) { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarmTMult"), (2.0 * femtoObs1D), mT, mult); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmTMult"), (2.0 * femtoObs1D), mT, mult); } } else { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairMom1D"), femtoObs1D); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkT"), kT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarkT"), femtoObs1D, kT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarmT"), femtoObs1D, mT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarMult"), femtoObs1D, mult); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/kstarPtPart1"), femtoObs1D, part1.pt()); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/kstarPtPart2"), femtoObs1D, part2.pt()); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairMom1D"), femtoObs1D); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkT"), kT); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarkT"), femtoObs1D, kT); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmT"), femtoObs1D, mT); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarMult"), femtoObs1D, mult); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/kstarPtPart1"), femtoObs1D, part1.pt()); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/kstarPtPart2"), femtoObs1D, part2.pt()); if (use3dplots) { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarmTMult"), femtoObs1D, mT, mult); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmTMult"), femtoObs1D, mT, mult); } } } /// Templated function to compute the necessary observables and fill the respective histograms - /// Always calls setPair_base to compute the observables with reconstructed data + /// Always calls setPairBase to compute the observables with reconstructed data /// \tparam T type of the femtouniverseparticle /// \param part1 Particle one /// \param part2 Particle two @@ -227,37 +227,37 @@ class FemtoUniverse3DContainer const float femtoObsKlong = f3d[3]; if (mHistogramRegistry) { - setPair_base(femtoObsKout, femtoObsKside, femtoObsKlong, femtoObs1D, kT, mT, part1, part2, mult, use3dplots, isiden); + setPairBase(femtoObsKout, femtoObsKside, femtoObsKlong, femtoObs1D, kT, mT, part1, part2, mult, use3dplots, isiden); if (!isiden) { if (femtoObsKout > 0.0) { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]) + HIST("/KStarOutP"), femtoObs1D); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/KStarOutP"), femtoObs1D); } else { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]) + HIST("/KStarOutN"), femtoObs1D); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/KStarOutN"), femtoObs1D); } if (femtoObsKside > 0.0) { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]) + HIST("/KStarSideP"), femtoObs1D); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/KStarSideP"), femtoObs1D); } else { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]) + HIST("/KStarSideN"), femtoObs1D); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/KStarSideN"), femtoObs1D); } if (femtoObsKlong > 0.0) { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]) + HIST("/KStarLongP"), femtoObs1D); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/KStarLongP"), femtoObs1D); } else { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]) + HIST("/KStarLongN"), femtoObs1D); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]) + HIST("/KStarLongN"), femtoObs1D); } } } } protected: - HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output - static constexpr std::string_view mFolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to mEventType - static constexpr int mEventType = eventType; ///< Type of the event (same/mixed, according to femtoUniverse3DContainer::EventType) - float mMassOne = 0.f; ///< PDG mass of particle 1 - float mMassTwo = 0.f; ///< PDG mass of particle 2 - int mPDGOne = 0; ///< PDG code of particle 1 - int mPDGTwo = 0; ///< PDG code of particle 2 + 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 int EventType = eventType; ///< Type of the event (same/mixed, according to femto_universe3d_container::EventType) + float mMassOne = 0.f; ///< PDG mass of particle 1 + float mMassTwo = 0.f; ///< PDG mass of particle 2 + int mPDGOne = 0; ///< PDG code of particle 1 + int mPDGTwo = 0; ///< PDG code of particle 2 }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSE3DCONTAINER_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h index 2f29f3df474..3ea392eebe7 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h @@ -25,6 +25,7 @@ #include #include "Framework/HistogramRegistry.h" +#include "Common/Core/RecoDecay.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h" #include "Math/Vector4D.h" @@ -33,10 +34,10 @@ using namespace o2::framework; -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -namespace femtoUniverseAngularContainer +namespace femto_universe_angular_container { /// Femtoscopic observable to be computed enum Observable { kstar ///< kstar @@ -46,7 +47,7 @@ enum Observable { kstar ///< kstar enum EventType { same, ///< Pair from same event mixed ///< Pair from mixed event }; -}; // namespace femtoUniverseAngularContainer +}; // namespace femto_universe_angular_container /// \class FemtoUniverseAngularContainer /// \brief Container for all histogramming related to the correlation function. The two @@ -54,7 +55,7 @@ enum EventType { same, ///< Pair from same event /// are filled according to the specified observable /// \tparam eventType Type of the event (same/mixed) /// \tparam obs Observable to be computed (k*/Q_inv/...) -template +template class FemtoUniverseAngularContainer { public: @@ -71,7 +72,7 @@ class FemtoUniverseAngularContainer /// \param kTAxis axis object for the kT axis /// \param mTAxis axis object for the mT axis template - void init_base(std::string folderName, std::string /*femtoObs*/, T /*femtoObsAxis*/, T /*multAxis*/, T /*kTAxis*/, T /*mTAxis*/, T /*multAxis3D*/, T /*mTAxis3D*/, T etaAxis, T phiAxis, bool use3dplots) + void initBase(std::string folderName, std::string /*femtoObs*/, T /*femtoObsAxis*/, T /*multAxis*/, T /*kTAxis*/, T /*mTAxis*/, T /*multAxis3D*/, T /*mTAxis3D*/, T etaAxis, T phiAxis, bool use3dplots) { mHistogramRegistry->add((folderName + "/DeltaEtaDeltaPhi").c_str(), "; #Delta#varphi (rad); #Delta#eta", kTH2F, {phiAxis, etaAxis}); if (use3dplots) { @@ -85,13 +86,13 @@ class FemtoUniverseAngularContainer /// \param folderName Name of the directory in the output file (no suffix for reconstructed data/ Monte Carlo; "_MC" for Monte Carlo Truth) /// \param femtoObsAxis axis object for the femto observable axis template - void init_MC(std::string /*folderName*/, std::string /*femtoObs*/, T /*femtoObsAxis*/, T /*multAxis*/, T /*mTAxis*/) + void initMC(std::string /*folderName*/, std::string /*femtoObs*/, T /*femtoObsAxis*/, T /*multAxis*/, T /*mTAxis*/) { } /// Templated function to initialize the histograms for the task - /// Always calls init_base to initialize the histograms for data/ Monte Carlo reconstructed - /// In case of Monte Carlo, calls init_base again for Monte Carlo truth and the specialized function init_MC for additional histogramms + /// Always calls initBase to initialize the histograms for data/ Monte Carlo reconstructed + /// In case of Monte Carlo, calls initBase again for Monte Carlo truth and the specialized function initMC for additional histogramms /// \tparam T type of the configurable for the axis configuration /// \param registry Histogram registry to be passed /// \param kstarBins k* binning for the histograms @@ -106,7 +107,7 @@ class FemtoUniverseAngularContainer { mHistogramRegistry = registry; std::string femtoObs; - if constexpr (mFemtoObs == femtoUniverseAngularContainer::Observable::kstar) { + if constexpr (FemtoObs == femto_universe_angular_container::Observable::kstar) { femtoObs = "#it{k*} (GeV/#it{c})"; } @@ -120,18 +121,18 @@ class FemtoUniverseAngularContainer framework::AxisSpec mTAxis3D = {mTBins3D, "#it{m}_{T} (GeV/#it{c})"}; // angular correlations - mPhiLow = (-static_cast(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins; - mPhiHigh = 2 * o2::constants::math::PI + (-static_cast(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins; + mPhiLow = (-static_cast(phiBins / 4) + 0.5) * o2::constants::math::TwoPI / phiBins; + mPhiHigh = o2::constants::math::TwoPI + (-static_cast(phiBins / 4) + 0.5) * o2::constants::math::TwoPI / phiBins; framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh}; framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0}; - std::string folderName = static_cast(mFolderSuffix[mEventType]) + static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]); + std::string folderName = static_cast(FolderSuffix[EventType]) + static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]); - init_base(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, etaAxis, phiAxis, use3dplots); + initBase(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, etaAxis, phiAxis, use3dplots); if (isMC) { - folderName = static_cast(mFolderSuffix[mEventType]) + static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]); - init_base(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, etaAxis, phiAxis, use3dplots); - init_MC(folderName, femtoObs, femtoObsAxis, multAxis, mTAxis); + folderName = static_cast(FolderSuffix[EventType]) + static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]); + initBase(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, etaAxis, phiAxis, use3dplots); + initMC(folderName, femtoObs, femtoObsAxis, multAxis, mTAxis); } } @@ -152,20 +153,15 @@ class FemtoUniverseAngularContainer /// \param part1 Particle one /// \param part2 Particle two /// \param mult Multiplicity of the event - template - void setPair_base(const float /*femtoObs*/, const float /*mT*/, T const& part1, T const& part2, const int /*mult*/, bool use3dplots, float weight = 1.0f) + template + void setPairBase(const float /*femtoObs*/, const float /*mT*/, T const& part1, T const& part2, const int /*mult*/, bool use3dplots, float weight = 1.0f) { - delta_eta = part1.eta() - part2.eta(); - delta_phi = part1.phi() - part2.phi(); + deltaEta = part1.eta() - part2.eta(); - while (delta_phi < mPhiLow) { - delta_phi += o2::constants::math::TwoPI; - } - while (delta_phi > mPhiHigh) { - delta_phi -= o2::constants::math::TwoPI; - } + deltaPhi = part1.phi() - part2.phi(); + deltaPhi = RecoDecay::constrainAngle(deltaPhi, 0); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/DeltaEtaDeltaPhi"), delta_phi, delta_eta, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/DeltaEtaDeltaPhi"), deltaPhi, deltaEta, weight); if (use3dplots) { // use 3d plots } @@ -175,11 +171,11 @@ class FemtoUniverseAngularContainer /// Fills MC truth specific histogramms: /// - kstar distribution plots with RECONSTRUCTED information but ONLY for non-fake candidates; needed for purity calculations of tracks /// - kstar resolution matrix - /// Note: Standard histogramms with MC truth information are filled with the setPair_base function + /// Note: Standard histogramms with MC truth information are filled with the setPairBase function /// \param part1 Particle one /// \param part2 Particle two /// \param mult Multiplicity of the event - void setPair_MC(const float /*femtoObsMC*/, const float /*femtoObs*/, const float /*mT*/, const int /*mult*/) + void setPairMC(const float /*femtoObsMC*/, const float /*femtoObs*/, const float /*mT*/, const int /*mult*/) { if (mHistogramRegistry) { // Fill the kstar distributions with the reconstructed information but only for particles with the right PDG code @@ -187,8 +183,8 @@ class FemtoUniverseAngularContainer } /// Templated function to handle data/ Monte Carlo reconstructed and Monte Carlo truth - /// Always calls setPair_base to compute the observables with reconstructed data - /// In case of Monte Carlo, calls setPair_base with MC info and specialized function setPair_MC for additional histogramms + /// Always calls setPairBase to compute the observables with reconstructed data + /// In case of Monte Carlo, calls setPairBase with MC info and specialized function setPairMC for additional histogramms /// \tparam T type of the femtouniverseparticle /// \param part1 Particle one /// \param part2 Particle two @@ -198,25 +194,25 @@ class FemtoUniverseAngularContainer { float femtoObs, femtoObsMC; // Calculate femto observable and the mT with reconstructed information - if constexpr (mFemtoObs == femtoUniverseAngularContainer::Observable::kstar) { + if constexpr (FemtoObs == femto_universe_angular_container::Observable::kstar) { femtoObs = FemtoUniverseMath::getkstar(part1, mMassOne, part2, mMassTwo); } const float mT = FemtoUniverseMath::getmT(part1, mMassOne, part2, mMassTwo); if (mHistogramRegistry) { - setPair_base(femtoObs, mT, part1, part2, mult, use3dplots); + setPairBase(femtoObs, mT, part1, part2, mult, use3dplots); if constexpr (isMC) { if (part1.has_fdMCParticle() && part2.has_fdMCParticle()) { // calculate the femto observable and the mT with MC truth information - if constexpr (mFemtoObs == femtoUniverseAngularContainer::Observable::kstar) { + if constexpr (FemtoObs == femto_universe_angular_container::Observable::kstar) { femtoObsMC = FemtoUniverseMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo); } const float mTMC = FemtoUniverseMath::getmT(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo); - if (abs(part1.fdMCParticle().pdgMCTruth()) == abs(mPDGOne) && abs(part2.fdMCParticle().pdgMCTruth()) == abs(mPDGTwo)) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates - setPair_base(femtoObsMC, mTMC, part1.fdMCParticle(), part2.fdMCParticle(), mult, use3dplots, weight); - setPair_MC(femtoObsMC, femtoObs, mT, mult); + if (std::abs(part1.fdMCParticle().pdgMCTruth()) == std::abs(mPDGOne) && std::abs(part2.fdMCParticle().pdgMCTruth()) == std::abs(mPDGTwo)) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates + setPairBase(femtoObsMC, mTMC, part1.fdMCParticle(), part2.fdMCParticle(), mult, use3dplots, weight); + setPairMC(femtoObsMC, femtoObs, mT, mult); } else { } @@ -227,20 +223,20 @@ class FemtoUniverseAngularContainer } protected: - HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output - static constexpr std::string_view mFolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to mEventType - static constexpr femtoUniverseAngularContainer::Observable mFemtoObs = obs; ///< Femtoscopic observable to be computed (according to femtoUniverseAngularContainer::Observable) - static constexpr int mEventType = eventType; ///< Type of the event (same/mixed, according to femtoUniverseAngularContainer::EventType) - float mMassOne = 0.f; ///< PDG mass of particle 1 - float mMassTwo = 0.f; ///< PDG mass of particle 2 - int mPDGOne = 0; ///< PDG code of particle 1 - int mPDGTwo = 0; ///< PDG code of particle 2 + 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_universe_angular_container::Observable FemtoObs = obs; ///< Femtoscopic observable to be computed (according to femto_universe_angular_container::Observable) + static constexpr int EventType = eventType; ///< Type of the event (same/mixed, according to femto_universe_angular_container::EventType) + float mMassOne = 0.f; ///< PDG mass of particle 1 + float mMassTwo = 0.f; ///< PDG mass of particle 2 + int mPDGOne = 0; ///< PDG code of particle 1 + int mPDGTwo = 0; ///< PDG code of particle 2 double mPhiLow; double mPhiHigh; - double delta_eta; - double delta_phi; + double deltaEta; + double deltaPhi; }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEANGULARCONTAINER_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h index 972305765c5..38209e8bc8f 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h @@ -10,7 +10,7 @@ // or submit itself to any jurisdiction. /// \file FemtoUniverseCascadeSelection.h -/// \brief Definition of the femtoUniverseCascadeSelection +/// \brief Definition of the femto_universe_cascade_selection /// \author Valentina Mantovani Sarti, TU München valentina.mantovani-sarti@tum.de /// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de /// \author Luca Barioglio, TU München, luca.barioglio@cern.ch @@ -32,9 +32,9 @@ #include "Framework/HistogramRegistry.h" #include "ReconstructionDataFormats/PID.h" -namespace o2::analysis::femtoUniverse // o2-linter: disable=name/namespace +namespace o2::analysis::femto_universe // o2-linter: disable=name/namespace { -namespace femtoUniverseCascadeSelection // o2-linter: disable=name/namespace +namespace femto_universe_cascade_selection // o2-linter: disable=name/namespace { /// The different selections this task is capable of doing enum CascadeSel { @@ -72,12 +72,12 @@ enum ChildTrackType { kPosTrack, kNegPID, }; /// Position in the full VO cut container (for cutculator) */ -} // namespace femtoUniverseCascadeSelection +} // namespace femto_universe_cascade_selection /// \class FemtoUniverseCascadeSelection /// \brief Cut class to contain and execute all cuts applied to Cascades class FemtoUniverseCascadeSelection - : public FemtoUniverseObjectSelection + : public FemtoUniverseObjectSelection { // do cutculatora @@ -101,27 +101,27 @@ class FemtoUniverseCascadeSelection void fillQA(Col const& col, Casc const& cascade, Track const& posTrack, Track const& negTrack, Track const& bachTrack); template - void setChildCuts(femtoUniverseCascadeSelection::ChildTrackType child, T1 selVal, - T2 selVar, femtoUniverseSelection::SelectionType selType) + void setChildCuts(femto_universe_cascade_selection::ChildTrackType child, T1 selVal, + T2 selVar, femto_universe_selection::SelectionType selType) { - if (child == femtoUniverseCascadeSelection::kPosTrack) { + if (child == femto_universe_cascade_selection::kPosTrack) { posDaughTrack.setSelection(selVal, selVar, selType); - } else if (child == femtoUniverseCascadeSelection::kNegTrack) { + } else if (child == femto_universe_cascade_selection::kNegTrack) { negDaughTrack.setSelection(selVal, selVar, selType); - } else if (child == femtoUniverseCascadeSelection::kBachTrack) { + } else if (child == femto_universe_cascade_selection::kBachTrack) { bachTrackSel.setSelection(selVal, selVar, selType); } } template - void setChildPIDSpecies(femtoUniverseCascadeSelection::ChildTrackType child, + void setChildPIDSpecies(femto_universe_cascade_selection::ChildTrackType child, T& pids) { - if (child == femtoUniverseCascadeSelection::kPosTrack) { + if (child == femto_universe_cascade_selection::kPosTrack) { posDaughTrack.setPIDSpecies(pids); - } else if (child == femtoUniverseCascadeSelection::kNegTrack) { + } else if (child == femto_universe_cascade_selection::kNegTrack) { negDaughTrack.setPIDSpecies(pids); - } else if (child == femtoUniverseCascadeSelection::kBachTrack) { + } else if (child == femto_universe_cascade_selection::kBachTrack) { bachTrackSel.setPIDSpecies(pids); } } @@ -130,7 +130,7 @@ class FemtoUniverseCascadeSelection /// \param iSel Track selection variable to be examined /// \param prefix Additional prefix for the name of the configurable /// \param suffix Additional suffix for the name of the configurable - static std::string getSelectionName(femtoUniverseCascadeSelection::CascadeSel iSel, + static std::string getSelectionName(femto_universe_cascade_selection::CascadeSel iSel, std::string_view prefix = "", std::string_view suffix = "") { @@ -144,7 +144,7 @@ class FemtoUniverseCascadeSelection /// for consistent description of the configurables /// \param iSel Track selection variable to be examined /// \param prefix Additional prefix for the output of the configurable - static std::string getSelectionHelper(femtoUniverseCascadeSelection::CascadeSel iSel, + static std::string getSelectionHelper(femto_universe_cascade_selection::CascadeSel iSel, std::string_view prefix = "") { std::string outString = static_cast(prefix); @@ -235,28 +235,28 @@ class FemtoUniverseCascadeSelection "kV0MassMin", "V0MassMax"}; ///< Name of the different ///< selections - static constexpr femtoUniverseSelection::SelectionType + static constexpr femto_universe_selection::SelectionType mSelectionTypes[kNcascadeSelection]{ - femtoUniverseSelection::kEqual, // sign - femtoUniverseSelection::kLowerLimit, // pt min - femtoUniverseSelection::kUpperLimit, // pt max - femtoUniverseSelection::kUpperLimit, // eta max - femtoUniverseSelection::kUpperLimit, // DCA v0 daughters max - femtoUniverseSelection::kLowerLimit, // v0 cos PA min - femtoUniverseSelection::kLowerLimit, // v0 tran rad min - femtoUniverseSelection::kUpperLimit, // v0 tran rad max - femtoUniverseSelection::kUpperLimit, // v0 maximum distance of decay vertex to PV - femtoUniverseSelection::kUpperLimit, // DCA cascade daughters max - femtoUniverseSelection::kLowerLimit, // cascade cos PA min - femtoUniverseSelection::kLowerLimit, // cascade tran rad min - femtoUniverseSelection::kUpperLimit, // cascade tran rad max - femtoUniverseSelection::kUpperLimit, // cascade maximum distance of decay vertex to PV - femtoUniverseSelection::kLowerLimit, // DCA pos to PV max - femtoUniverseSelection::kLowerLimit, // DCA neg to PV max - femtoUniverseSelection::kLowerLimit, // DCA bach to PV max - femtoUniverseSelection::kLowerLimit, // DCA v0 to PV max - femtoUniverseSelection::kLowerLimit, // v0 mass min - femtoUniverseSelection::kUpperLimit, // v0 mass max + femto_universe_selection::kEqual, // sign + femto_universe_selection::kLowerLimit, // pt min + femto_universe_selection::kUpperLimit, // pt max + femto_universe_selection::kUpperLimit, // eta max + femto_universe_selection::kUpperLimit, // DCA v0 daughters max + femto_universe_selection::kLowerLimit, // v0 cos PA min + femto_universe_selection::kLowerLimit, // v0 tran rad min + femto_universe_selection::kUpperLimit, // v0 tran rad max + femto_universe_selection::kUpperLimit, // v0 maximum distance of decay vertex to PV + femto_universe_selection::kUpperLimit, // DCA cascade daughters max + femto_universe_selection::kLowerLimit, // cascade cos PA min + femto_universe_selection::kLowerLimit, // cascade tran rad min + femto_universe_selection::kUpperLimit, // cascade tran rad max + femto_universe_selection::kUpperLimit, // cascade maximum distance of decay vertex to PV + femto_universe_selection::kLowerLimit, // DCA pos to PV max + femto_universe_selection::kLowerLimit, // DCA neg to PV max + femto_universe_selection::kLowerLimit, // DCA bach to PV max + femto_universe_selection::kLowerLimit, // DCA v0 to PV max + femto_universe_selection::kLowerLimit, // v0 mass min + femto_universe_selection::kUpperLimit, // v0 mass max }; ///< Map to match a variable with ///< its type @@ -283,7 +283,7 @@ class FemtoUniverseCascadeSelection "Maximum V0 mass"}; ///< Helper information for the ///< different selections -}; // namespace femtoUniverse +}; // namespace femto_universe template void FemtoUniverseCascadeSelection::init(HistogramRegistry* registry, bool isSelectCascOmega) @@ -351,63 +351,63 @@ void FemtoUniverseCascadeSelection::init(HistogramRegistry* registry, bool isSel /// check whether the most open cuts are fulfilled - most of this should have /// already be done by the filters - nPtCascadeMinSel = getNSelections(femtoUniverseCascadeSelection::kCascadepTMin); - nPtCascadeMaxSel = getNSelections(femtoUniverseCascadeSelection::kCascadepTMax); - nEtaCascadeMaxSel = getNSelections(femtoUniverseCascadeSelection::kCascadeetaMax); - nDCAV0DaughMax = getNSelections(femtoUniverseCascadeSelection::kCascadeV0DCADaughMax); - nCPAV0Min = getNSelections(femtoUniverseCascadeSelection::kCascadeV0CPAMin); - nTranRadV0Min = getNSelections(femtoUniverseCascadeSelection::kCascadeV0TranRadMin); - nTranRadV0Max = getNSelections(femtoUniverseCascadeSelection::kCascadeV0TranRadMax); - nV0DecVtxMax = getNSelections(femtoUniverseCascadeSelection::kCascadeV0DecVtxMax); - nDCACascadeDaughMax = getNSelections(femtoUniverseCascadeSelection::kCascadeDCADaughMax); - nCPACascadeMin = getNSelections(femtoUniverseCascadeSelection::kCascadeCPAMin); - nTranRadCascadeMin = getNSelections(femtoUniverseCascadeSelection::kCascadeTranRadMin); - nTranRadCascadeMax = getNSelections(femtoUniverseCascadeSelection::kCascadeTranRadMax); - nDecVtxMax = getNSelections(femtoUniverseCascadeSelection::kCascadeDecVtxMax); - nDCAPosToPV = getNSelections(femtoUniverseCascadeSelection::kCascadeDCAPosToPV); - nDCANegToPV = getNSelections(femtoUniverseCascadeSelection::kCascadeDCANegToPV); - nDCABachToPV = getNSelections(femtoUniverseCascadeSelection::kCascadeDCABachToPV); - nDCAV0ToPV = getNSelections(femtoUniverseCascadeSelection::kCascadeDCAV0ToPV); + nPtCascadeMinSel = getNSelections(femto_universe_cascade_selection::kCascadepTMin); + nPtCascadeMaxSel = getNSelections(femto_universe_cascade_selection::kCascadepTMax); + nEtaCascadeMaxSel = getNSelections(femto_universe_cascade_selection::kCascadeetaMax); + nDCAV0DaughMax = getNSelections(femto_universe_cascade_selection::kCascadeV0DCADaughMax); + nCPAV0Min = getNSelections(femto_universe_cascade_selection::kCascadeV0CPAMin); + nTranRadV0Min = getNSelections(femto_universe_cascade_selection::kCascadeV0TranRadMin); + nTranRadV0Max = getNSelections(femto_universe_cascade_selection::kCascadeV0TranRadMax); + nV0DecVtxMax = getNSelections(femto_universe_cascade_selection::kCascadeV0DecVtxMax); + nDCACascadeDaughMax = getNSelections(femto_universe_cascade_selection::kCascadeDCADaughMax); + nCPACascadeMin = getNSelections(femto_universe_cascade_selection::kCascadeCPAMin); + nTranRadCascadeMin = getNSelections(femto_universe_cascade_selection::kCascadeTranRadMin); + nTranRadCascadeMax = getNSelections(femto_universe_cascade_selection::kCascadeTranRadMax); + nDecVtxMax = getNSelections(femto_universe_cascade_selection::kCascadeDecVtxMax); + nDCAPosToPV = getNSelections(femto_universe_cascade_selection::kCascadeDCAPosToPV); + nDCANegToPV = getNSelections(femto_universe_cascade_selection::kCascadeDCANegToPV); + nDCABachToPV = getNSelections(femto_universe_cascade_selection::kCascadeDCABachToPV); + nDCAV0ToPV = getNSelections(femto_universe_cascade_selection::kCascadeDCAV0ToPV); // dodac V0 mass min i max - pTCascadeMin = getMinimalSelection(femtoUniverseCascadeSelection::kCascadepTMin, - femtoUniverseSelection::kLowerLimit); - pTCascadeMax = getMinimalSelection(femtoUniverseCascadeSelection::kCascadepTMax, - femtoUniverseSelection::kUpperLimit); - etaCascadeMax = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeetaMax, - femtoUniverseSelection::kAbsUpperLimit); - fDCAV0DaughMax = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeV0DCADaughMax, - femtoUniverseSelection::kUpperLimit); - fCPAV0Min = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeV0CPAMin, - femtoUniverseSelection::kLowerLimit); - fTranRadV0Min = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeV0TranRadMin, - femtoUniverseSelection::kLowerLimit); - fTranRadV0Max = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeV0TranRadMax, - femtoUniverseSelection::kUpperLimit); - fV0DecVtxMax = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeV0DecVtxMax, - femtoUniverseSelection::kAbsUpperLimit); - fDCACascadeDaughMax = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeDCADaughMax, - femtoUniverseSelection::kUpperLimit); - fCPACascadeMin = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeCPAMin, - femtoUniverseSelection::kLowerLimit); - fTranRadCascadeMin = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeTranRadMin, - femtoUniverseSelection::kLowerLimit); - fTranRadCascadeMax = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeTranRadMax, - femtoUniverseSelection::kUpperLimit); - fDecVtxMax = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeDecVtxMax, - femtoUniverseSelection::kAbsUpperLimit); - fDCAPosToPV = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeDCAPosToPV, - femtoUniverseSelection::kLowerLimit); - fDCANegToPV = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeDCANegToPV, - femtoUniverseSelection::kLowerLimit); - fDCABachToPV = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeDCABachToPV, - femtoUniverseSelection::kLowerLimit); - fDCAV0ToPV = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeDCAV0ToPV, - femtoUniverseSelection::kLowerLimit); - fV0InvMassLowLimit = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeV0MassMin, - femtoUniverseSelection::kLowerLimit); - fV0InvMassUpLimit = getMinimalSelection(femtoUniverseCascadeSelection::kCascadeV0MassMax, - femtoUniverseSelection::kUpperLimit); + pTCascadeMin = getMinimalSelection(femto_universe_cascade_selection::kCascadepTMin, + femto_universe_selection::kLowerLimit); + pTCascadeMax = getMinimalSelection(femto_universe_cascade_selection::kCascadepTMax, + femto_universe_selection::kUpperLimit); + etaCascadeMax = getMinimalSelection(femto_universe_cascade_selection::kCascadeetaMax, + femto_universe_selection::kAbsUpperLimit); + fDCAV0DaughMax = getMinimalSelection(femto_universe_cascade_selection::kCascadeV0DCADaughMax, + femto_universe_selection::kUpperLimit); + fCPAV0Min = getMinimalSelection(femto_universe_cascade_selection::kCascadeV0CPAMin, + femto_universe_selection::kLowerLimit); + fTranRadV0Min = getMinimalSelection(femto_universe_cascade_selection::kCascadeV0TranRadMin, + femto_universe_selection::kLowerLimit); + fTranRadV0Max = getMinimalSelection(femto_universe_cascade_selection::kCascadeV0TranRadMax, + femto_universe_selection::kUpperLimit); + fV0DecVtxMax = getMinimalSelection(femto_universe_cascade_selection::kCascadeV0DecVtxMax, + femto_universe_selection::kAbsUpperLimit); + fDCACascadeDaughMax = getMinimalSelection(femto_universe_cascade_selection::kCascadeDCADaughMax, + femto_universe_selection::kUpperLimit); + fCPACascadeMin = getMinimalSelection(femto_universe_cascade_selection::kCascadeCPAMin, + femto_universe_selection::kLowerLimit); + fTranRadCascadeMin = getMinimalSelection(femto_universe_cascade_selection::kCascadeTranRadMin, + femto_universe_selection::kLowerLimit); + fTranRadCascadeMax = getMinimalSelection(femto_universe_cascade_selection::kCascadeTranRadMax, + femto_universe_selection::kUpperLimit); + fDecVtxMax = getMinimalSelection(femto_universe_cascade_selection::kCascadeDecVtxMax, + femto_universe_selection::kAbsUpperLimit); + fDCAPosToPV = getMinimalSelection(femto_universe_cascade_selection::kCascadeDCAPosToPV, + femto_universe_selection::kLowerLimit); + fDCANegToPV = getMinimalSelection(femto_universe_cascade_selection::kCascadeDCANegToPV, + femto_universe_selection::kLowerLimit); + fDCABachToPV = getMinimalSelection(femto_universe_cascade_selection::kCascadeDCABachToPV, + femto_universe_selection::kLowerLimit); + fDCAV0ToPV = getMinimalSelection(femto_universe_cascade_selection::kCascadeDCAV0ToPV, + femto_universe_selection::kLowerLimit); + fV0InvMassLowLimit = getMinimalSelection(femto_universe_cascade_selection::kCascadeV0MassMin, + femto_universe_selection::kLowerLimit); + fV0InvMassUpLimit = getMinimalSelection(femto_universe_cascade_selection::kCascadeV0MassMax, + femto_universe_selection::kUpperLimit); isCascOmega = isSelectCascOmega; } @@ -581,6 +581,6 @@ void FemtoUniverseCascadeSelection::fillQA(Col const& /*col*/, Casc const& /*cas aod::femtouniverseparticle::TrackType::kBachelor>(bachTrack); } -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSECASCADESELECTION_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseCollisionSelection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseCollisionSelection.h index c75b09e8153..fc33b37ad9a 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseCollisionSelection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseCollisionSelection.h @@ -19,14 +19,13 @@ #define PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSECOLLISIONSELECTION_H_ #include -#include #include "Common/CCDB/TriggerAliases.h" #include "Framework/HistogramRegistry.h" #include "Framework/Logger.h" using namespace o2::framework; -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { /// \class FemtoUniverseCollisionSelection @@ -160,33 +159,33 @@ class FemtoUniverseCollisionSelection template float computeSphericity(T1 const& /*col*/, T2 const& tracks) { - double S00 = 0; - double S11 = 0; - double S10 = 0; + double kS00 = 0; + double kS11 = 0; + double kS10 = 0; double sumPt = 0; int partNumber = 0; double spher = 0; - for (auto& p : tracks) { + for (const auto& p : tracks) { double phi = p.phi(); double pT = p.pt(); - double px = pT * TMath::Cos(phi); - double py = pT * TMath::Sin(phi); + double px = pT * std::cos(phi); + double py = pT * std::sin(phi); - S00 = S00 + px * px / pT; - S11 = S11 + py * py / pT; - S10 = S10 + px * py / pT; + kS00 = kS00 + px * px / pT; + kS11 = kS11 + py * py / pT; + kS10 = kS10 + px * py / pT; sumPt = sumPt + pT; partNumber++; } if (sumPt != 0) { - S00 = S00 / sumPt; - S11 = S11 / sumPt; - S10 = S10 / sumPt; + kS00 = kS00 / sumPt; + kS11 = kS11 / sumPt; + kS10 = kS10 / sumPt; - double lambda1 = (S00 + S11 + TMath::Sqrt((S00 + S11) * (S00 + S11) - 4.0 * (S00 * S11 - S10 * S10))) / 2.0; - double lambda2 = (S00 + S11 - TMath::Sqrt((S00 + S11) * (S00 + S11) - 4.0 * (S00 * S11 - S10 * S10))) / 2.0; + double lambda1 = (kS00 + kS11 + std::sqrt((kS00 + kS11) * (kS00 + kS11) - 4.0 * (kS00 * kS11 - kS10 * kS10))) / 2.0; + double lambda2 = (kS00 + kS11 - std::sqrt((kS00 + kS11) * (kS00 + kS11) - 4.0 * (kS00 * kS11 - kS10 * kS10))) / 2.0; if ((lambda1 + lambda2) != 0 && partNumber > 2) { spher = 2 * lambda2 / (lambda1 + lambda2); @@ -215,6 +214,6 @@ class FemtoUniverseCollisionSelection float mCentMin = 0.0; ///< Minimum centrality value float mCentMax = 100.0; ///< Maximum centrality value }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSECOLLISIONSELECTION_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h index e3f9c0feee6..ceacc7fbf3e 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h @@ -25,6 +25,7 @@ #include #include "Framework/HistogramRegistry.h" +#include "Common/Core/RecoDecay.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h" #include "Math/Vector4D.h" @@ -33,10 +34,10 @@ using namespace o2::framework; -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -namespace femtoUniverseContainer +namespace femto_universe_container { /// Femtoscopic observable to be computed enum Observable { kstar ///< kstar @@ -46,7 +47,7 @@ enum Observable { kstar ///< kstar enum EventType { same, ///< Pair from same event mixed ///< Pair from mixed event }; -}; // namespace femtoUniverseContainer +}; // namespace femto_universe_container /// \class FemtoUniverseContainer /// \brief Container for all histogramming related to the correlation function. The two @@ -54,7 +55,7 @@ enum EventType { same, ///< Pair from same event /// are filled according to the specified observable /// \tparam eventType Type of the event (same/mixed) /// \tparam obs Observable to be computed (k*/Q_inv/...) -template +template class FemtoUniverseContainer { public: @@ -71,7 +72,7 @@ class FemtoUniverseContainer /// \param kTAxis axis object for the kT axis /// \param mTAxis axis object for the mT axis template - void init_base(std::string folderName, std::string femtoObs, T femtoObsAxis, T multAxis, T kTAxis, T mTAxis, T multAxis3D, T mTAxis3D, T etaAxis, T phiAxis, bool use3dplots) + void initBase(std::string folderName, std::string femtoObs, T femtoObsAxis, T multAxis, T kTAxis, T mTAxis, T multAxis3D, T mTAxis3D, T etaAxis, T phiAxis, bool use3dplots) { mHistogramRegistry->add((folderName + "/relPairDist").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis}); mHistogramRegistry->add((folderName + "/relPairkT").c_str(), "; #it{k}_{T} (GeV/#it{c}); Entries", kTH1F, {kTAxis}); @@ -95,7 +96,7 @@ class FemtoUniverseContainer /// \param folderName Name of the directory in the output file (no suffix for reconstructed data/ Monte Carlo; "_MC" for Monte Carlo Truth) /// \param femtoObsAxis axis object for the femto observable axis template - void init_MC(std::string folderName, std::string femtoObs, T femtoObsAxis, T multAxis, T mTAxis) + void initMC(std::string folderName, std::string femtoObs, T femtoObsAxis, T multAxis, T mTAxis) { mHistogramRegistry->add((folderName + "/relPairDist_ReconNoFake").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis}); mHistogramRegistry->add((folderName + "/relPairkstarmT_ReconNoFake").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2})").c_str(), kTH2F, {femtoObsAxis, mTAxis}); @@ -106,8 +107,8 @@ class FemtoUniverseContainer } /// Templated function to initialize the histograms for the task - /// Always calls init_base to initialize the histograms for data/ Monte Carlo reconstructed - /// In case of Monte Carlo, calls init_base again for Monte Carlo truth and the specialized function init_MC for additional histogramms + /// Always calls initBase to initialize the histograms for data/ Monte Carlo reconstructed + /// In case of Monte Carlo, calls initBase again for Monte Carlo truth and the specialized function initMC for additional histogramms /// \tparam T type of the configurable for the axis configuration /// \param registry Histogram registry to be passed /// \param kstarBins k* binning for the histograms @@ -122,7 +123,7 @@ class FemtoUniverseContainer { mHistogramRegistry = registry; std::string femtoObs; - if constexpr (mFemtoObs == femtoUniverseContainer::Observable::kstar) { + if constexpr (FemtoObs == femto_universe_container::Observable::kstar) { femtoObs = "#it{k*} (GeV/#it{c})"; } std::vector tmpVecMult = multBins; @@ -135,18 +136,18 @@ class FemtoUniverseContainer framework::AxisSpec mTAxis3D = {mTBins3D, "#it{m}_{T} (GeV/#it{c})"}; // angular correlations - mPhiLow = (-static_cast(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins; - mPhiHigh = 2 * o2::constants::math::PI + (-static_cast(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins; + mPhiLow = (-static_cast(phiBins / 4) + 0.5) * o2::constants::math::TwoPI / phiBins; + mPhiHigh = o2::constants::math::TwoPI + (-static_cast(phiBins / 4) + 0.5) * o2::constants::math::TwoPI / phiBins; framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh}; framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0}; - std::string folderName = static_cast(mFolderSuffix[mEventType]) + static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]); + std::string folderName = static_cast(FolderSuffix[EventType]) + static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]); - init_base(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, etaAxis, phiAxis, use3dplots); + initBase(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, etaAxis, phiAxis, use3dplots); if (isMC) { - folderName = static_cast(mFolderSuffix[mEventType]) + static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]); - init_base(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, etaAxis, phiAxis, use3dplots); - init_MC(folderName, femtoObs, femtoObsAxis, multAxis, mTAxis); + folderName = static_cast(FolderSuffix[EventType]) + static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]); + initBase(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, etaAxis, phiAxis, use3dplots); + initMC(folderName, femtoObs, femtoObsAxis, multAxis, mTAxis); } } @@ -167,33 +168,28 @@ class FemtoUniverseContainer /// \param part1 Particle one /// \param part2 Particle two /// \param mult Multiplicity of the event - template - void setPair_base(const float femtoObs, const float mT, T const& part1, T const& part2, const int mult, bool use3dplots, float weight = 1.0f) + template + void setPairBase(const float femtoObs, const float mT, T const& part1, T const& part2, const int mult, bool use3dplots, float weight = 1.0f) { const float kT = FemtoUniverseMath::getkT(part1, mMassOne, part2, mMassTwo); - delta_eta = part1.eta() - part2.eta(); - delta_phi = part1.phi() - part2.phi(); + deltaEta = part1.eta() - part2.eta(); + deltaPhi = part1.phi() - part2.phi(); - while (delta_phi < mPhiLow) { - delta_phi += o2::constants::math::TwoPI; - } - while (delta_phi > mPhiHigh) { - delta_phi -= o2::constants::math::TwoPI; - } + deltaPhi = RecoDecay::constrainAngle(deltaPhi, 0); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairDist"), femtoObs, weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkT"), kT, weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarkT"), femtoObs, kT, weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarmT"), femtoObs, mT, weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarMult"), femtoObs, mult, weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/kstarPtPart1"), femtoObs, part1.pt(), weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/kstarPtPart2"), femtoObs, part2.pt(), weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/MultPtPart1"), part1.pt(), mult, weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/MultPtPart2"), part2.pt(), mult, weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/PtPart1PtPart2"), part1.pt(), part2.pt(), weight); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/DeltaEtaDeltaPhi"), delta_phi, delta_eta, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairDist"), femtoObs, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkT"), kT, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarkT"), femtoObs, kT, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmT"), femtoObs, mT, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarMult"), femtoObs, mult, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/kstarPtPart1"), femtoObs, part1.pt(), weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/kstarPtPart2"), femtoObs, part2.pt(), weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/MultPtPart1"), part1.pt(), mult, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/MultPtPart2"), part2.pt(), mult, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/PtPart1PtPart2"), part1.pt(), part2.pt(), weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/DeltaEtaDeltaPhi"), deltaPhi, deltaEta, weight); if (use3dplots) { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarmTMult"), femtoObs, mT, mult, weight); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmTMult"), femtoObs, mT, mult, weight); } } @@ -201,25 +197,25 @@ class FemtoUniverseContainer /// Fills MC truth specific histogramms: /// - kstar distribution plots with RECONSTRUCTED information but ONLY for non-fake candidates; needed for purity calculations of tracks /// - kstar resolution matrix - /// Note: Standard histogramms with MC truth information are filled with the setPair_base function + /// Note: Standard histogramms with MC truth information are filled with the setPairBase function /// \param part1 Particle one /// \param part2 Particle two /// \param mult Multiplicity of the event - void setPair_MC(const float femtoObsMC, const float femtoObs, const float mT, const int mult) + void setPairMC(const float femtoObsMC, const float femtoObs, const float mT, const int mult) { if (mHistogramRegistry) { // Fill the kstar distributions with the reconstructed information but only for particles with the right PDG code - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/relPairDist_ReconNoFake"), femtoObs); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/relPairkstarmT_ReconNoFake"), femtoObs, mT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/relPairkstarMult_ReconNoFake"), femtoObs, mult); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/relPairDist_ReconNoFake"), femtoObs); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/relPairkstarmT_ReconNoFake"), femtoObs, mT); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/relPairkstarMult_ReconNoFake"), femtoObs, mult); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/kstar_resolution"), femtoObsMC, femtoObs); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/kstar_resolution"), femtoObsMC, femtoObs); } } /// Templated function to handle data/ Monte Carlo reconstructed and Monte Carlo truth - /// Always calls setPair_base to compute the observables with reconstructed data - /// In case of Monte Carlo, calls setPair_base with MC info and specialized function setPair_MC for additional histogramms + /// Always calls setPairBase to compute the observables with reconstructed data + /// In case of Monte Carlo, calls setPairBase with MC info and specialized function setPairMC for additional histogramms /// \tparam T type of the femtouniverseparticle /// \param part1 Particle one /// \param part2 Particle two @@ -229,51 +225,51 @@ class FemtoUniverseContainer { float femtoObs, femtoObsMC; // Calculate femto observable and the mT with reconstructed information - if constexpr (mFemtoObs == femtoUniverseContainer::Observable::kstar) { + if constexpr (FemtoObs == femto_universe_container::Observable::kstar) { femtoObs = FemtoUniverseMath::getkstar(part1, mMassOne, part2, mMassTwo); } const float mT = FemtoUniverseMath::getmT(part1, mMassOne, part2, mMassTwo); if (mHistogramRegistry) { - setPair_base(femtoObs, mT, part1, part2, mult, use3dplots, weight); + setPairBase(femtoObs, mT, part1, part2, mult, use3dplots, weight); if constexpr (isMC) { if (part1.has_fdMCParticle() && part2.has_fdMCParticle()) { // calculate the femto observable and the mT with MC truth information - if constexpr (mFemtoObs == femtoUniverseContainer::Observable::kstar) { + if constexpr (FemtoObs == femto_universe_container::Observable::kstar) { femtoObsMC = FemtoUniverseMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo); } const float mTMC = FemtoUniverseMath::getmT(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo); - if (abs(part1.fdMCParticle().pdgMCTruth()) == abs(mPDGOne) && abs(part2.fdMCParticle().pdgMCTruth()) == abs(mPDGTwo)) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates - setPair_base(femtoObsMC, mTMC, part1.fdMCParticle(), part2.fdMCParticle(), mult, use3dplots, weight); - setPair_MC(femtoObsMC, femtoObs, mT, mult); + if (std::abs(part1.fdMCParticle().pdgMCTruth()) == std::abs(mPDGOne) && std::abs(part2.fdMCParticle().pdgMCTruth()) == std::abs(mPDGTwo)) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates + setPairBase(femtoObsMC, mTMC, part1.fdMCParticle(), part2.fdMCParticle(), mult, use3dplots, weight); + setPairMC(femtoObsMC, femtoObs, mT, mult); } else { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/hFakePairsCounter"), 0); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/hFakePairsCounter"), 0); } } else { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/hNoMCtruthPairsCounter"), 0); + mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/hNoMCtruthPairsCounter"), 0); } } } } protected: - HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output - static constexpr std::string_view mFolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to mEventType - static constexpr femtoUniverseContainer::Observable mFemtoObs = obs; ///< Femtoscopic observable to be computed (according to femtoUniverseContainer::Observable) - static constexpr int mEventType = eventType; ///< Type of the event (same/mixed, according to femtoUniverseContainer::EventType) - float mMassOne = 0.f; ///< PDG mass of particle 1 - float mMassTwo = 0.f; ///< PDG mass of particle 2 - int mPDGOne = 0; ///< PDG code of particle 1 - int mPDGTwo = 0; ///< PDG code of particle 2 + 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_universe_container::Observable FemtoObs = obs; ///< Femtoscopic observable to be computed (according to femto_universe_container::Observable) + static constexpr int EventType = eventType; ///< Type of the event (same/mixed, according to femto_universe_container::EventType) + float mMassOne = 0.f; ///< PDG mass of particle 1 + float mMassTwo = 0.f; ///< PDG mass of particle 2 + int mPDGOne = 0; ///< PDG code of particle 1 + int mPDGTwo = 0; ///< PDG code of particle 2 double mPhiLow; double mPhiHigh; - double delta_eta; - double delta_phi; + double deltaEta; + double deltaPhi; }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSECONTAINER_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseCutculator.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseCutculator.h index 8a18e3c9f8c..3417045e100 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseCutculator.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseCutculator.h @@ -32,7 +32,7 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h" -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { /// \class FemtoUniverseCutculator @@ -45,23 +45,23 @@ class FemtoUniverseCutculator /// femtouniverse-producer task void init(const char* configFile) { - std::cout << "Welcome to the CutCulator!" << std::endl; + LOGF(info, "Welcome to the CutCulator!"); + // std::cout << "Welcome to the CutCulator!" << std::endl; boost::property_tree::ptree root; try { boost::property_tree::read_json(configFile, root); } catch (const boost::property_tree::ptree_error& e) { - std::cout - << "Failed to read JSON config file " << configFile << " (" - << e.what() << ")" << std::endl; + // LOGF(fatal, "Failed to read JSON config file %s (%s)", configFile, e.what()); + std::cout << "Failed to read JSON config file " << configFile << " (" << e.what() << ")" << std::endl; } // check the config file for all known producer task - std::vector ProducerTasks = { - "femto-universe-producer-task"}; - for (auto& Producer : ProducerTasks) { + std::vector producerTasks = {"femto-universe-producer-task"}; + for (const auto& Producer : producerTasks) { if (root.count(Producer) > 0) { mConfigTree = root.get_child(Producer); + // LOGF(info, "Found %s in %s", Producer, configFile); std::cout << "Found " << Producer << " in " << configFile << std::endl; break; } @@ -76,16 +76,15 @@ class FemtoUniverseCutculator { try { boost::property_tree::ptree& selections = mConfigTree.get_child(name); - boost::property_tree::ptree& selectionsValues = - selections.get_child("values"); + boost::property_tree::ptree& selectionsValues = selections.get_child("values"); std::vector tmpVec; for (boost::property_tree::ptree::value_type& val : selectionsValues) { tmpVec.push_back(std::stof(val.second.data())); } return tmpVec; } catch (const boost::property_tree::ptree_error& e) { - std::cout << "Selection " << name << " not available (" << e.what() << ")" - << std::endl; + // LOGF(fatal, "Selection %s not available (%s)", name, e.what()); + std::cout << "Selection " << name << " not available (" << e.what() << ")" << std::endl; return {}; } } @@ -96,12 +95,11 @@ class FemtoUniverseCutculator /// \param obs Observable of the track selection /// \param type Type of the track selection /// \param prefix Prefix which is added to the name of the Configurable - void setTrackSelection(femtoUniverseTrackSelection::TrackSel obs, - femtoUniverseSelection::SelectionType type, + void setTrackSelection(femto_universe_track_selection::TrackSel obs, + femto_universe_selection::SelectionType type, const char* prefix) { - auto tmpVec = - setSelection(FemtoUniverseTrackSelection::getSelectionName(obs, prefix)); + auto tmpVec = setSelection(FemtoUniverseTrackSelection::getSelectionName(obs, prefix)); if (tmpVec.size() > 0) { mTrackSel.setSelection(tmpVec, obs, type); } @@ -112,17 +110,17 @@ class FemtoUniverseCutculator void setTrackSelectionFromFile(const char* prefix) { for (const auto& sel : mConfigTree) { - std::string sel_name = sel.first; - femtoUniverseTrackSelection::TrackSel obs; - if (sel_name.find(prefix) != std::string::npos) { + std::string selName = sel.first; + femto_universe_track_selection::TrackSel obs; + if (selName.find(prefix) != std::string::npos) { int index = FemtoUniverseTrackSelection::findSelectionIndex( - std::string_view(sel_name), prefix); + std::string_view(selName), prefix); if (index >= 0) { - obs = femtoUniverseTrackSelection::TrackSel(index); + obs = femto_universe_track_selection::TrackSel(index); } else { continue; } - if (obs == femtoUniverseTrackSelection::TrackSel::kPIDnSigmaMax) + if (obs == femto_universe_track_selection::TrackSel::kPIDnSigmaMax) continue; // kPIDnSigmaMax is a special case setTrackSelection(obs, FemtoUniverseTrackSelection::getSelectionType(obs), prefix); @@ -134,23 +132,23 @@ class FemtoUniverseCutculator /// \param prefix Prefix which is added to the name of the Configurable void setPIDSelectionFromFile(const char* prefix) { - std::string PIDnodeName = std::string(prefix) + "PIDspecies"; - std::string PIDNsigmaNodeName = std::string(prefix) + "PIDnSigmaMax"; + std::string mPIDnodeName = std::string(prefix) + "PIDspecies"; + std::string mPIDNsigmaNodeName = std::string(prefix) + "PIDnSigmaMax"; try { - boost::property_tree::ptree& pidNode = mConfigTree.get_child(PIDnodeName); + boost::property_tree::ptree& pidNode = mConfigTree.get_child(mPIDnodeName); boost::property_tree::ptree& pidValues = pidNode.get_child("values"); - for (auto& val : pidValues) { + for (const auto& val : pidValues) { mPIDspecies.push_back( static_cast(std::stoi(val.second.data()))); } - boost::property_tree::ptree& pidNsigmaNode = mConfigTree.get_child(PIDNsigmaNodeName); + boost::property_tree::ptree& pidNsigmaNode = mConfigTree.get_child(mPIDNsigmaNodeName); boost::property_tree::ptree& pidNsigmaValues = pidNsigmaNode.get_child("values"); - for (auto& val : pidNsigmaValues) { + for (const auto& val : pidNsigmaValues) { mPIDValues.push_back(std::stof(val.second.data())); } } catch (const boost::property_tree::ptree_error& e) { - std::cout << "PID selection not avalible for these skimmed data." - << std::endl; + // LOGF(fatal, "PID selection not avalible for these skimmed data."); + std::cout << "PID selection not avalible for these skimmed data." << std::endl; } } @@ -160,8 +158,8 @@ class FemtoUniverseCutculator /// \param obs Observable of the track selection /// \param type Type of the track selection /// \param prefix Prefix which is added to the name of the Configurable - void setV0Selection(femtoUniverseV0Selection::V0Sel obs, - femtoUniverseSelection::SelectionType type, + void setV0Selection(femto_universe_v0_selection::V0Sel obs, + femto_universe_selection::SelectionType type, const char* prefix) { auto tmpVec = @@ -176,13 +174,13 @@ class FemtoUniverseCutculator void setV0SelectionFromFile(const char* prefix) { for (const auto& sel : mConfigTree) { - std::string sel_name = sel.first; - femtoUniverseV0Selection::V0Sel obs; - if (sel_name.find(prefix) != std::string::npos) { + std::string selName = sel.first; + femto_universe_v0_selection::V0Sel obs; + if (selName.find(prefix) != std::string::npos) { int index = FemtoUniverseV0Selection::findSelectionIndex( - std::string_view(sel_name), prefix); + std::string_view(selName), prefix); if (index >= 0) { - obs = femtoUniverseV0Selection::V0Sel(index); + obs = femto_universe_v0_selection::V0Sel(index); } else { continue; } @@ -207,8 +205,7 @@ class FemtoUniverseCutculator bool SysChecks, float sign) { /// Output of the available selections and user input - std::cout << "Selection: " - << objectSelection.getSelectionHelper(selectionType) << " - ("; + std::cout << "Selection: " << objectSelection.getSelectionHelper(selectionType) << " - ("; auto selVec = objectSelection.getSelections(selectionType); for (auto selIt : selVec) { std::cout << selIt.getSelectionValue() << " "; @@ -255,19 +252,19 @@ class FemtoUniverseCutculator /// If the input is sane, the selection bit is put together if (inputSane) { - int internal_index = 0; + int internalIndex = 0; for (auto sel : selVec) { double signOffset; switch (sel.getSelectionType()) { - case femtoUniverseSelection::SelectionType::kEqual: + case femto_universe_selection::SelectionType::kEqual: signOffset = 0.; break; - case (femtoUniverseSelection::SelectionType::kLowerLimit): - case (femtoUniverseSelection::SelectionType::kAbsLowerLimit): + case (femto_universe_selection::SelectionType::kLowerLimit): + case (femto_universe_selection::SelectionType::kAbsLowerLimit): signOffset = 1.; break; - case (femtoUniverseSelection::SelectionType::kUpperLimit): - case (femtoUniverseSelection::SelectionType::kAbsUpperLimit): + case (femto_universe_selection::SelectionType::kUpperLimit): + case (femto_universe_selection::SelectionType::kAbsUpperLimit): signOffset = -1.; break; } @@ -276,16 +273,16 @@ class FemtoUniverseCutculator /// the cut is actually fulfilled if (sel.isSelected(input + signOffset * 1.e-6 * input)) { output |= 1UL << counter; - for (int i = internal_index; i > 0; i--) { + for (int i = internalIndex; i > 0; i--) { output &= ~(1UL << (counter - i)); } } ++counter; - ++internal_index; + ++internalIndex; } } else { - std::cout << "Choice " << in << " not recognized - repeating" - << std::endl; + // LOGF(info, "Choice %s not recognized - repeating", in); + std::cout << "Choice " << in << " not recognized - repeating" << std::endl; checkForSelection(output, counter, objectSelection, selectionType, SysChecks, sign); } } @@ -297,8 +294,7 @@ class FemtoUniverseCutculator /// container that will be put to the user task incorporating the user choice /// of selections template - aod::femtouniverseparticle::cutContainerType iterateSelection(T objectSelection, - bool SysChecks, float sign) + aod::femtouniverseparticle::cutContainerType iterateSelection(T objectSelection, bool SysChecks, float sign) { aod::femtouniverseparticle::cutContainerType output = 0; size_t counter = 0; @@ -319,12 +315,17 @@ class FemtoUniverseCutculator } else if (choice == std::string("V")) { output = iterateSelection(mV0Sel, SysChecks, sign); } else { - std::cout << "Option " << choice - << " not recognized - available options are (T/V)" << std::endl; + // LOGF(info, "Option %s not recognized - available options are (T/V)", choice); + std::cout << "Option " << choice << " not recognized - available options are (T/V)" << std::endl; return; } std::bitset<8 * sizeof(aod::femtouniverseparticle::cutContainerType)> bitOutput = output; + // LOGF(info, "+++++++++++++++++++++++++++++++++"); + // LOGF(info, "CutCulator has spoken - your selection bit is"); + // LOGF(info, "%s (bitwise)", bitOutput); + // LOGF(info, "%s (number representation)", output); + // LOGF(info, "PID for these species is stored:"); std::cout << "+++++++++++++++++++++++++++++++++" << std::endl; std::cout << "CutCulator has spoken - your selection bit is" << std::endl; std::cout << bitOutput << " (bitwise)" << std::endl; @@ -332,6 +333,7 @@ class FemtoUniverseCutculator std::cout << "PID for these species is stored:" << std::endl; int index = 0; for (auto id : mPIDspecies) { + // LOGF(info, "%s : %d", o2::track::PID::getName(id), index++); std::cout << o2::track::PID::getName(id) << " : " << index++ << std::endl; if (SysChecks) { // Seed the random number generator @@ -357,6 +359,6 @@ class FemtoUniverseCutculator std::vector mPIDValues; ///< list of nsigma values for which PID is stored }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSECUTCULATOR_H_ */ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h index d89aeef295f..f891823ccf5 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h @@ -29,15 +29,9 @@ #include "Framework/HistogramRegistry.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" -using namespace o2; -using namespace o2::analysis::femtoUniverse; -using namespace o2::framework; -using namespace o2::framework::expressions; -using namespace o2::soa; - namespace o2::analysis { -namespace femtoUniverse +namespace femto_universe { /// \class FemtoUniverseDetaDphiStar @@ -54,86 +48,86 @@ class FemtoUniverseDetaDphiStar /// Initialization of the histograms and setting required values void init(HistogramRegistry* registry, HistogramRegistry* registryQA, float ldeltaphistarcutmin, float ldeltaphistarcutmax, float ldeltaetacutmin, float ldeltaetacutmax, float lchosenradii, bool lplotForEveryRadii, float lPhiMassMin = 1.014, float lPhiMassMax = 1.026) { - ChosenRadii = lchosenradii; - CutDeltaPhiStarMax = ldeltaphistarcutmax; - CutDeltaPhiStarMin = ldeltaphistarcutmin; - CutDeltaEtaMax = ldeltaetacutmax; - CutDeltaEtaMin = ldeltaetacutmin; + chosenRadii = lchosenradii; + cutDeltaPhiStarMax = ldeltaphistarcutmax; + cutDeltaPhiStarMin = ldeltaphistarcutmin; + cutDeltaEtaMax = ldeltaetacutmax; + cutDeltaEtaMin = ldeltaetacutmin; plotForEveryRadii = lplotForEveryRadii; mHistogramRegistry = registry; mHistogramRegistryQA = registryQA; - CutPhiInvMassLow = lPhiMassMin; - CutPhiInvMassHigh = lPhiMassMax; + cutPhiInvMassLow = lPhiMassMin; + cutPhiInvMassHigh = lPhiMassMax; - if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { - std::string dirName = static_cast(dirNames[0]); - histdetadpisame[0][0] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[0][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpisame[0][1] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[1][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpimixed[0][0] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[0][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpimixed[0][1] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[1][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { + std::string dirName = static_cast(DirNames[0]); + histdetadpisame[0][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[0][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpisame[0][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[1][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpimixed[0][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[0][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpimixed[0][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[1][0])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); if (plotForEveryRadii) { for (int i = 0; i < 9; i++) { - histdetadpiRadii[0][i] = mHistogramRegistryQA->add((dirName + static_cast(histNamesRadii[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpiRadii[0][i] = mHistogramRegistryQA->add((dirName + static_cast(HistNamesRadii[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); } } } - if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { for (int i = 0; i < 2; i++) { - std::string dirName = static_cast(dirNames[1]); - histdetadpisame[i][0] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpisame[i][1] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpimixed[i][0] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpimixed[i][1] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + std::string dirName = static_cast(DirNames[1]); + histdetadpisame[i][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpisame[i][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpimixed[i][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpimixed[i][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); if (plotForEveryRadii) { for (int j = 0; j < 9; j++) { - histdetadpiRadii[i][j] = mHistogramRegistryQA->add((dirName + static_cast(histNamesRadii[i][j])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpiRadii[i][j] = mHistogramRegistryQA->add((dirName + static_cast(HistNamesRadii[i][j])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); } } } } - if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kV0 && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kV0 && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { /// V0-V0 combination for (int k = 0; k < 2; k++) { - std::string dirName = static_cast(dirNames[2]); - histdetadpisame[k][0] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpisame[k][1] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpimixed[k][0] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpimixed[k][1] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + std::string dirName = static_cast(DirNames[2]); + histdetadpisame[k][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpisame[k][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpimixed[k][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[0][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpimixed[k][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[1][k])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); if (plotForEveryRadii) { for (int l = 0; l < 9; l++) { - histdetadpiRadii[k][l] = mHistogramRegistryQA->add((dirName + static_cast(histNamesRadii[k][l])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpiRadii[k][l] = mHistogramRegistryQA->add((dirName + static_cast(HistNamesRadii[k][l])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); } } } } - if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { + if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { for (int i = 0; i < 2; i++) { - std::string dirName = static_cast(dirNames[3]); - histdetadpisame[i][0] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[0][i])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{400, -0.30, 0.30}, {400, -0.30, 0.30}}); - histdetadpisame[i][1] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[1][i])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{400, -0.30, 0.30}, {400, -0.30, 0.30}}); - histdetadpimixed[i][0] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[0][i])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{400, -0.30, 0.30}, {400, -0.30, 0.30}}); - histdetadpimixed[i][1] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[1][i])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{400, -0.30, 0.30}, {400, -0.30, 0.30}}); + std::string dirName = static_cast(DirNames[3]); + histdetadpisame[i][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[0][i])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{400, -0.30, 0.30}, {400, -0.30, 0.30}}); + histdetadpisame[i][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[1][i])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{400, -0.30, 0.30}, {400, -0.30, 0.30}}); + histdetadpimixed[i][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[0][i])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{400, -0.30, 0.30}, {400, -0.30, 0.30}}); + histdetadpimixed[i][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[1][i])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{400, -0.30, 0.30}, {400, -0.30, 0.30}}); if (plotForEveryRadii) { for (int j = 0; j < 9; j++) { - histdetadpiRadii[i][j] = mHistogramRegistryQA->add((dirName + static_cast(histNamesRadii[i][j])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpiRadii[i][j] = mHistogramRegistryQA->add((dirName + static_cast(HistNamesRadii[i][j])).c_str(), "; #Delta #eta; #Delta #varphi*", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); } } } } - if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) { + if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) { for (int i = 0; i < 2; i++) { - std::string dirName = static_cast(dirNames[4]); - histdetadpisame[i][0] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpisame[i][1] = mHistogramRegistry->add((dirName + static_cast(histNamesSame[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpimixed[i][0] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); - histdetadpimixed[i][1] = mHistogramRegistry->add((dirName + static_cast(histNamesMixed[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + std::string dirName = static_cast(DirNames[4]); + histdetadpisame[i][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpisame[i][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesSame[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpimixed[i][0] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpimixed[i][1] = mHistogramRegistry->add((dirName + static_cast(HistNamesMixed[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); if (plotForEveryRadii) { for (int j = 0; j < 9; j++) { - histdetadpiRadii[i][j] = mHistogramRegistryQA->add((dirName + static_cast(histNamesRadii[i][j])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadpiRadii[i][j] = mHistogramRegistryQA->add((dirName + static_cast(HistNamesRadii[i][j])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); } } } @@ -146,7 +140,7 @@ class FemtoUniverseDetaDphiStar { magfield = lmagfield; - if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { + if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { /// Track-Track combination // check if provided particles are in agreement with the class instantiation if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack) { @@ -154,21 +148,21 @@ class FemtoUniverseDetaDphiStar return false; } auto deta = part1.eta() - part2.eta(); - auto dphiAvg = AveragePhiStar(part1, part2, 0); - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + auto dphiAvg = averagePhiStar(part1, part2, 0); + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[0][0]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[0][0]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; } - if (pow(dphiAvg, 2) / pow(CutDeltaPhiStarMax, 2) + pow(deta, 2) / pow(CutDeltaEtaMax, 2) < 1.) { + if (std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMax, 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMax, 2) < 1.) { return true; } else { - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[0][1]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[0][1]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; @@ -176,7 +170,7 @@ class FemtoUniverseDetaDphiStar return false; } - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { /// Track-V0 combination // check if provided particles are in agreement with the class instantiation if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0) { @@ -186,25 +180,25 @@ class FemtoUniverseDetaDphiStar bool pass = false; for (int i = 0; i < 2; i++) { - auto indexOfDaughter = (ChosenEventType == femtoUniverseContainer::EventType::mixed ? part2.globalIndex() : part2.index()) - 2 + i; + auto indexOfDaughter = (ChosenEventType == femto_universe_container::EventType::mixed ? part2.globalIndex() : part2.index()) - 2 + i; // auto indexOfDaughter = part2.globalIndex() - 2 + i; auto daughter = particles.begin() + indexOfDaughter; auto deta = part1.eta() - daughter.eta(); - auto dphiAvg = AveragePhiStar(part1, *daughter, i); - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + auto dphiAvg = averagePhiStar(part1, *daughter, i); + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[i][0]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[i][0]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; } - if (pow(dphiAvg, 2) / pow(CutDeltaPhiStarMax, 2) + pow(deta, 2) / pow(CutDeltaEtaMax, 2) < 1.) { + if (std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMax, 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMax, 2) < 1.) { pass = true; } else { - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[i][1]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[i][1]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; @@ -213,7 +207,7 @@ class FemtoUniverseDetaDphiStar } return pass; - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kV0 && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kV0 && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { /// V0-V0 combination // check if provided particles are in agreement with the class instantiation if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0 || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0) { @@ -223,27 +217,27 @@ class FemtoUniverseDetaDphiStar bool pass = false; for (int i = 0; i < 2; i++) { - auto indexOfDaughterpart1 = (ChosenEventType == femtoUniverseContainer::EventType::mixed ? part1.globalIndex() : part1.index()) - 2 + i; - auto indexOfDaughterpart2 = (ChosenEventType == femtoUniverseContainer::EventType::mixed ? part2.globalIndex() : part2.index()) - 2 + i; + auto indexOfDaughterpart1 = (ChosenEventType == femto_universe_container::EventType::mixed ? part1.globalIndex() : part1.index()) - 2 + i; + auto indexOfDaughterpart2 = (ChosenEventType == femto_universe_container::EventType::mixed ? part2.globalIndex() : part2.index()) - 2 + i; auto daughterpart1 = particles.begin() + indexOfDaughterpart1; auto daughterpart2 = particles.begin() + indexOfDaughterpart2; auto deta = daughterpart1.eta() - daughterpart2.eta(); - auto dphiAvg = AveragePhiStar(*daughterpart1, *daughterpart2, i); - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + auto dphiAvg = averagePhiStar(*daughterpart1, *daughterpart2, i); + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[i][0]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[i][0]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; } - // if (pow(dphiAvg, 2) / pow(CutDeltaPhiStarMax, 2) + pow(deta, 2) / pow(CutDeltaEtaMax, 2) < 1.) { - if ((dphiAvg > CutDeltaPhiStarMin) && (dphiAvg < CutDeltaPhiStarMax) && (deta > CutDeltaEtaMin) && (deta < CutDeltaEtaMax)) { + // if (std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMax, 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMax, 2) < 1.) { + if ((dphiAvg > cutDeltaPhiStarMin) && (dphiAvg < cutDeltaPhiStarMax) && (deta > cutDeltaEtaMin) && (deta < cutDeltaEtaMax)) { pass = true; } else { - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[i][1]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[i][1]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; @@ -252,7 +246,7 @@ class FemtoUniverseDetaDphiStar } return pass; - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) { /// Track-D0 combination // check if provided particles are in agreement with the class instantiation if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kD0) { @@ -263,30 +257,30 @@ class FemtoUniverseDetaDphiStar bool pass = false; for (int i = 0; i < 2; i++) { auto indexOfDaughter = 0; - if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + if (ChosenEventType == femto_universe_container::EventType::mixed) { indexOfDaughter = part2.globalIndex() - 2 + i; - } else if (ChosenEventType == femtoUniverseContainer::EventType::same) { + } else if (ChosenEventType == femto_universe_container::EventType::same) { indexOfDaughter = part2.index() - 2 + i; } auto daughter = particles.begin() + indexOfDaughter; auto deta = part1.eta() - daughter.eta(); - auto dphiAvg = AveragePhiStar(part1, *daughter, i); // auto dphiAvg = CalculateDphiStar(part1, *daughter); + auto dphiAvg = averagePhiStar(part1, *daughter, i); // auto dphiAvg = calculateDphiStar(part1, *daughter); dphiAvg = TVector2::Phi_mpi_pi(dphiAvg); - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[i][0]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[i][0]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; } - if ((dphiAvg > CutDeltaPhiStarMin) && (dphiAvg < CutDeltaPhiStarMax) && (deta > CutDeltaEtaMin) && (deta < CutDeltaEtaMax)) { + if ((dphiAvg > cutDeltaPhiStarMin) && (dphiAvg < cutDeltaPhiStarMax) && (deta > cutDeltaEtaMin) && (deta < cutDeltaEtaMax)) { pass = true; // pair is close } else { - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[i][1]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[i][1]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; @@ -294,7 +288,7 @@ class FemtoUniverseDetaDphiStar } } return pass; - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { /// Track-Phi combination // check if provided particles are in agreement with the class instantiation if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kPhi) { @@ -305,19 +299,19 @@ class FemtoUniverseDetaDphiStar bool pass = false; for (int i = 0; i < 2; i++) { auto indexOfDaughter = 0; - if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + if (ChosenEventType == femto_universe_container::EventType::mixed) { indexOfDaughter = part2.globalIndex() - 2 + i; - } else if (ChosenEventType == femtoUniverseContainer::EventType::same) { + } else if (ChosenEventType == femto_universe_container::EventType::same) { indexOfDaughter = part2.index() - 2 + i; } auto daughter = particles.begin() + indexOfDaughter; auto deta = part1.eta() - daughter.eta(); - auto dphiAvg = AveragePhiStar(part1, *daughter, i); // CalculateDphiStar(part1, *daughter); + auto dphiAvg = averagePhiStar(part1, *daughter, i); // calculateDphiStar(part1, *daughter); dphiAvg = TVector2::Phi_mpi_pi(dphiAvg); - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[i][0]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[i][0]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; @@ -326,24 +320,24 @@ class FemtoUniverseDetaDphiStar // REMOVING THE "RING" -- CALCULATING THE INVARIANT MASS TLorentzVector part1Vec; TLorentzVector part2Vec; - float mMassOne = TDatabasePDG::Instance()->GetParticle(321)->Mass(); - float mMassTwo = TDatabasePDG::Instance()->GetParticle(321)->Mass(); + float mMassOne = o2::constants::physics::MassKPlus; + float mMassTwo = o2::constants::physics::MassKMinus; part1Vec.SetPtEtaPhiM(part1.pt(), part1.eta(), part1.phi(), mMassOne); part2Vec.SetPtEtaPhiM(daughter.pt(), daughter.eta(), daughter.phi(), mMassTwo); TLorentzVector sumVec(part1Vec); sumVec += part2Vec; float phiM = sumVec.M(); - if ((phiM > CutPhiInvMassLow) && (phiM < CutPhiInvMassHigh)) { + if ((phiM > cutPhiInvMassLow) && (phiM < cutPhiInvMassHigh)) { pass = true; // pair comes from Phi meson decay } // APPLYING THE CUTS - if ((dphiAvg > CutDeltaPhiStarMin) && (dphiAvg < CutDeltaPhiStarMax) && (deta > CutDeltaEtaMin) && (deta < CutDeltaEtaMax)) { + if ((dphiAvg > cutDeltaPhiStarMin) && (dphiAvg < cutDeltaPhiStarMax) && (deta > cutDeltaEtaMin) && (deta < cutDeltaEtaMax)) { pass = true; // pair is close } else { - if (ChosenEventType == femtoUniverseContainer::EventType::same) { + if (ChosenEventType == femto_universe_container::EventType::same) { histdetadpisame[i][1]->Fill(deta, dphiAvg); - } else if (ChosenEventType == femtoUniverseContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { histdetadpimixed[i][1]->Fill(deta, dphiAvg); } else { LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; @@ -360,47 +354,47 @@ class FemtoUniverseDetaDphiStar private: HistogramRegistry* mHistogramRegistry = nullptr; ///< For main output HistogramRegistry* mHistogramRegistryQA = nullptr; ///< For QA output - static constexpr std::string_view dirNames[5] = {"kTrack_kTrack/", "kTrack_kV0/", "kV0_kV0/", "kTrack_kPhi/", "kTrack_kD0/"}; + static constexpr std::string_view DirNames[5] = {"kTrack_kTrack/", "kTrack_kV0/", "kV0_kV0/", "kTrack_kPhi/", "kTrack_kD0/"}; - static constexpr std::string_view histNamesSame[2][2] = {{"detadphidetadphi0BeforeSame_0", "detadphidetadphi0BeforeSame_1"}, + static constexpr std::string_view HistNamesSame[2][2] = {{"detadphidetadphi0BeforeSame_0", "detadphidetadphi0BeforeSame_1"}, {"detadphidetadphi0AfterSame_0", "detadphidetadphi0AfterSame_1"}}; - static constexpr std::string_view histNamesMixed[2][2] = {{"detadphidetadphi0BeforeMixed_0", "detadphidetadphi0BeforeMixed_1"}, + static constexpr std::string_view HistNamesMixed[2][2] = {{"detadphidetadphi0BeforeMixed_0", "detadphidetadphi0BeforeMixed_1"}, {"detadphidetadphi0AfterMixed_0", "detadphidetadphi0AfterMixed_1"}}; - static constexpr std::string_view histNamesRadii[2][9] = {{"detadphidetadphi0Before_0_0", "detadphidetadphi0Before_0_1", "detadphidetadphi0Before_0_2", + static constexpr std::string_view HistNamesRadii[2][9] = {{"detadphidetadphi0Before_0_0", "detadphidetadphi0Before_0_1", "detadphidetadphi0Before_0_2", "detadphidetadphi0Before_0_3", "detadphidetadphi0Before_0_4", "detadphidetadphi0Before_0_5", "detadphidetadphi0Before_0_6", "detadphidetadphi0Before_0_7", "detadphidetadphi0Before_0_8"}, {"detadphidetadphi0Before_1_0", "detadphidetadphi0Before_1_1", "detadphidetadphi0Before_1_2", "detadphidetadphi0Before_1_3", "detadphidetadphi0Before_1_4", "detadphidetadphi0Before_1_5", "detadphidetadphi0Before_1_6", "detadphidetadphi0Before_1_7", "detadphidetadphi0Before_1_8"}}; - static constexpr o2::aod::femtouniverseparticle::ParticleType mPartOneType = partOne; ///< Type of particle 1 - static constexpr o2::aod::femtouniverseparticle::ParticleType mPartTwoType = partTwo; ///< Type of particle 2 + static constexpr o2::aod::femtouniverseparticle::ParticleType kPartOneType = partOne; ///< Type of particle 1 + static constexpr o2::aod::femtouniverseparticle::ParticleType kPartTwoType = partTwo; ///< Type of particle 2 - static constexpr float tmpRadiiTPC[9] = {85., 105., 125., 145., 165., 185., 205., 225., 245.}; + static constexpr float TmpRadiiTPC[9] = {85., 105., 125., 145., 165., 185., 205., 225., 245.}; static constexpr uint32_t kSignMinusMask = 1; static constexpr uint32_t kSignPlusMask = 1 << 1; static constexpr uint32_t kValue0 = 0; - float ChosenRadii; - float CutDeltaPhiStarMax; - float CutDeltaPhiStarMin; - float CutDeltaEtaMax; - float CutDeltaEtaMin; + float chosenRadii; + float cutDeltaPhiStarMax; + float cutDeltaPhiStarMin; + float cutDeltaEtaMax; + float cutDeltaEtaMin; float magfield; bool plotForEveryRadii = false; - float CutPhiInvMassLow; - float CutPhiInvMassHigh; + float cutPhiInvMassLow; + float cutPhiInvMassHigh; std::array, 2>, 2> histdetadpisame{}; std::array, 2>, 2> histdetadpimixed{}; std::array, 9>, 2> histdetadpiRadii{}; - /// Calculate phi at all required radii stored in tmpRadiiTPC + /// Calculate phi at all required radii stored in TmpRadiiTPC /// Magnetic field to be provided in Tesla template - void PhiAtRadiiTPC(const T& part, std::vector& tmpVec) + void phiAtRadiiTPC(const T& part, std::vector& tmpVec) { float phi0 = part.phi(); @@ -418,8 +412,8 @@ class FemtoUniverseDetaDphiStar // End: Get the charge from cutcontainer using masks float pt = part.pt(); for (size_t i = 0; i < 9; i++) { - double arg = 0.3 * charge * magfield * tmpRadiiTPC[i] * 0.01 / (2. * pt); - if (abs(arg) < 1.0) { + double arg = 0.3 * charge * magfield * TmpRadiiTPC[i] * 0.01 / (2. * pt); + if (std::abs(arg) < 1.0) { tmpVec.push_back(phi0 - std::asin(arg)); } else { tmpVec.push_back(999.0); @@ -429,12 +423,12 @@ class FemtoUniverseDetaDphiStar /// Calculate average phi template - float AveragePhiStar(const T1& part1, const T2& part2, int iHist) + float averagePhiStar(const T1& part1, const T2& part2, int iHist) { std::vector tmpVec1; std::vector tmpVec2; - PhiAtRadiiTPC(part1, tmpVec1); - PhiAtRadiiTPC(part2, tmpVec2); + phiAtRadiiTPC(part1, tmpVec1); + phiAtRadiiTPC(part2, tmpVec2); int num = tmpVec1.size(); float dPhiAvg = 0; float dphi = 0; @@ -457,7 +451,7 @@ class FemtoUniverseDetaDphiStar // Get particle charge from mask template - float GetCharge(const T1& part) + float getCharge(const T1& part) { float charge = 0; if ((part.cut() & kSignMinusMask) == kValue0 && (part.cut() & kSignPlusMask) == kValue0) { @@ -474,25 +468,25 @@ class FemtoUniverseDetaDphiStar // Calculate phi* as in https://github.com/alisw/AliPhysics/blob/master/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoPairCutRadialDistance.cxx template - double CalculateDphiStar(const T1& part1, const T2& part2) + double calculateDphiStar(const T1& part1, const T2& part2) { - float charge1 = GetCharge(part1); - float charge2 = GetCharge(part2); + float charge1 = getCharge(part1); + float charge2 = getCharge(part2); double deltaphiconstFD = 0.3 / 2; // double deltaphiconstAF = 0.15; - double afsi0b = deltaphiconstFD * magfield * charge1 * ChosenRadii / part1.pt(); - double afsi1b = deltaphiconstFD * magfield * charge2 * ChosenRadii / part2.pt(); + double afsi0b = deltaphiconstFD * magfield * charge1 * chosenRadii / part1.pt(); + double afsi1b = deltaphiconstFD * magfield * charge2 * chosenRadii / part2.pt(); double dphis = 0.0; - if (abs(afsi0b) < 1.0 && abs(afsi0b) < 1.0) { - dphis = part2.phi() - part1.phi() + TMath::ASin(afsi1b) - TMath::ASin(afsi0b); + if (std::abs(afsi0b) < 1.0 && std::abs(afsi0b) < 1.0) { + dphis = part2.phi() - part1.phi() + std::asin(afsi1b) - std::asin(afsi0b); } return dphis; } }; -} /* namespace femtoUniverse */ +} /* namespace femto_universe */ } /* namespace o2::analysis */ #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEDETADPHISTAR_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseEventHisto.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseEventHisto.h index b49c2480710..36e81e81e76 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseEventHisto.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseEventHisto.h @@ -21,7 +21,7 @@ #include "Framework/HistogramRegistry.h" using namespace o2::framework; -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { /// \class FemtoUniverseEventHisto /// \brief Class for histogramming event properties @@ -36,9 +36,9 @@ class FemtoUniverseEventHisto { mHistogramRegistry = registry; mHistogramRegistry->add("Event/zvtxhist", "; vtx_{z} (cm); Entries", kTH1F, {{250, -12.5, 12.5}}); - mHistogramRegistry->add("Event/MultV0M", "; vMultV0M; Entries", kTH1F, {{1500, 0, 30000}}); + mHistogramRegistry->add("Event/MultV0M", "; vMultV0M; Entries", kTH1F, {{2000, 0, 20000}}); mHistogramRegistry->add("Event/MultNTr", "; vMultNTr; Entries", kTH1F, {{20, 0, 200}}); - mHistogramRegistry->add("Event/MultNTrVSMultV0M", "; vMultNTr; MultV0M", kTH2F, {{200, 0, 4000}, {1500, 0, 30000}}); + mHistogramRegistry->add("Event/MultNTrVSMultV0M", "; vMultNTr; MultV0M", kTH2F, {{200, 0, 4000}, {2000, 0, 20000}}); mHistogramRegistry->add("Event/zvtxhist_MultNTr", "; zvtxhist; MultNTr", kTH2F, {{250, -12.5, 12.5}, {20, 0, 200}}); } @@ -60,6 +60,6 @@ class FemtoUniverseEventHisto private: HistogramRegistry* mHistogramRegistry; ///< For QA output }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEEVENTHISTO_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h index e921bb719df..e973cadee90 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h @@ -33,10 +33,10 @@ using namespace o2::framework; -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -namespace femtoUniverseFemtoContainer +namespace femto_universe_femto_container { /// Femtoscopic observable to be computed enum Observable { kstar ///< kstar @@ -46,7 +46,7 @@ enum Observable { kstar ///< kstar enum EventType { same, ///< Pair from same event mixed ///< Pair from mixed event }; -}; // namespace femtoUniverseFemtoContainer +}; // namespace femto_universe_femto_container /// \class FemtoUniverseFemtoContainer /// \brief Container for all histogramming related to the correlation function. The two @@ -54,7 +54,7 @@ enum EventType { same, ///< Pair from same event /// are filled according to the specified observable /// \tparam eventType Type of the event (same/mixed) /// \tparam obs Observable to be computed (k*/Q_inv/...) -template +template class FemtoUniverseFemtoContainer { public: @@ -71,20 +71,20 @@ class FemtoUniverseFemtoContainer /// \param kTAxis axis object for the kT axis /// \param mTAxis axis object for the mT axis template - void init_base(std::string folderName, std::string femtoObs, T femtoObsAxis, T multAxis, T kTAxis, T mTAxis, T multAxis3D, T mTAxis3D, bool use3dplots) + void initBase(std::string folderName, std::string femtoObs, T femtoObsAxis, T multAxis, T kTAxis, T mTAxis, T multAxis3D, T mTAxis3D, bool use3dplots) { - mHistogramRegistry->add((folderName + "/relPairDist").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis}); - mHistogramRegistry->add((folderName + "/relPairkT").c_str(), "; #it{k}_{T} (GeV/#it{c}); Entries", kTH1F, {kTAxis}); - mHistogramRegistry->add((folderName + "/relPairkstarkT").c_str(), ("; " + femtoObs + "; #it{k}_{T} (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, kTAxis}); - mHistogramRegistry->add((folderName + "/relPairkstarmT").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2})").c_str(), kTH2F, {femtoObsAxis, mTAxis}); - mHistogramRegistry->add((folderName + "/relPairkstarMult").c_str(), ("; " + femtoObs + "; Multiplicity").c_str(), kTH2F, {femtoObsAxis, multAxis}); - mHistogramRegistry->add((folderName + "/kstarPtPart1").c_str(), ("; " + femtoObs + "; #it{p} _{T} Particle 1 (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, {375, 0., 7.5}}); - mHistogramRegistry->add((folderName + "/kstarPtPart2").c_str(), ("; " + femtoObs + "; #it{p} _{T} Particle 2 (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, {375, 0., 7.5}}); - mHistogramRegistry->add((folderName + "/MultPtPart1").c_str(), "; #it{p} _{T} Particle 1 (GeV/#it{c}); Multiplicity", kTH2F, {{375, 0., 7.5}, multAxis}); - mHistogramRegistry->add((folderName + "/MultPtPart2").c_str(), "; #it{p} _{T} Particle 2 (GeV/#it{c}); Multiplicity", kTH2F, {{375, 0., 7.5}, multAxis}); - mHistogramRegistry->add((folderName + "/PtPart1PtPart2").c_str(), "; #it{p} _{T} Particle 1 (GeV/#it{c}); #it{p} _{T} Particle 2 (GeV/#it{c})", kTH2F, {{375, 0., 7.5}, {375, 0., 7.5}}); + kHistogramRegistry->add((folderName + "/relPairDist").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis}); + kHistogramRegistry->add((folderName + "/relPairkT").c_str(), "; #it{k}_{T} (GeV/#it{c}); Entries", kTH1F, {kTAxis}); + kHistogramRegistry->add((folderName + "/relPairkstarkT").c_str(), ("; " + femtoObs + "; #it{k}_{T} (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, kTAxis}); + kHistogramRegistry->add((folderName + "/relPairkstarmT").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2})").c_str(), kTH2F, {femtoObsAxis, mTAxis}); + kHistogramRegistry->add((folderName + "/relPairkstarMult").c_str(), ("; " + femtoObs + "; Multiplicity").c_str(), kTH2F, {femtoObsAxis, multAxis}); + kHistogramRegistry->add((folderName + "/kstarPtPart1").c_str(), ("; " + femtoObs + "; #it{p} _{T} Particle 1 (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, {375, 0., 7.5}}); + kHistogramRegistry->add((folderName + "/kstarPtPart2").c_str(), ("; " + femtoObs + "; #it{p} _{T} Particle 2 (GeV/#it{c})").c_str(), kTH2F, {femtoObsAxis, {375, 0., 7.5}}); + kHistogramRegistry->add((folderName + "/MultPtPart1").c_str(), "; #it{p} _{T} Particle 1 (GeV/#it{c}); Multiplicity", kTH2F, {{375, 0., 7.5}, multAxis}); + kHistogramRegistry->add((folderName + "/MultPtPart2").c_str(), "; #it{p} _{T} Particle 2 (GeV/#it{c}); Multiplicity", kTH2F, {{375, 0., 7.5}, multAxis}); + kHistogramRegistry->add((folderName + "/PtPart1PtPart2").c_str(), "; #it{p} _{T} Particle 1 (GeV/#it{c}); #it{p} _{T} Particle 2 (GeV/#it{c})", kTH2F, {{375, 0., 7.5}, {375, 0., 7.5}}); if (use3dplots) { - mHistogramRegistry->add((folderName + "/relPairkstarmTMult").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2}); Multiplicity").c_str(), kTH3F, {femtoObsAxis, mTAxis3D, multAxis3D}); + kHistogramRegistry->add((folderName + "/relPairkstarmTMult").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2}); Multiplicity").c_str(), kTH3F, {femtoObsAxis, mTAxis3D, multAxis3D}); } } @@ -94,19 +94,19 @@ class FemtoUniverseFemtoContainer /// \param folderName Name of the directory in the output file (no suffix for reconstructed data/ Monte Carlo; "_MC" for Monte Carlo Truth) /// \param femtoObsAxis axis object for the femto observable axis template - void init_MC(std::string folderName, std::string femtoObs, T femtoObsAxis, T multAxis, T mTAxis) + void initMC(std::string folderName, std::string femtoObs, T femtoObsAxis, T multAxis, T mTAxis) { - mHistogramRegistry->add((folderName + "/relPairDist_ReconNoFake").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis}); - mHistogramRegistry->add((folderName + "/relPairkstarmT_ReconNoFake").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2})").c_str(), kTH2F, {femtoObsAxis, mTAxis}); - mHistogramRegistry->add((folderName + "/relPairkstarMult_ReconNoFake").c_str(), ("; " + femtoObs + "; Multiplicity").c_str(), kTH2F, {femtoObsAxis, multAxis}); - mHistogramRegistry->add((folderName + "/hNoMCtruthPairsCounter").c_str(), "; Counter; Entries", kTH1I, {{1, 0, 1}}); - mHistogramRegistry->add((folderName + "/hFakePairsCounter").c_str(), "; Counter; Entries", kTH1I, {{1, 0, 1}}); - mHistogramRegistry->add((folderName + "/kstar_resolution").c_str(), "; #it{k} _{T} reconstructed (GeV/#it{c}); #it{k} _{T} truth (GeV/#it{c})", kTH2F, {femtoObsAxis, femtoObsAxis}); + kHistogramRegistry->add((folderName + "/relPairDist_ReconNoFake").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis}); + kHistogramRegistry->add((folderName + "/relPairkstarmT_ReconNoFake").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2})").c_str(), kTH2F, {femtoObsAxis, mTAxis}); + kHistogramRegistry->add((folderName + "/relPairkstarMult_ReconNoFake").c_str(), ("; " + femtoObs + "; Multiplicity").c_str(), kTH2F, {femtoObsAxis, multAxis}); + kHistogramRegistry->add((folderName + "/hNoMCtruthPairsCounter").c_str(), "; Counter; Entries", kTH1I, {{1, 0, 1}}); + kHistogramRegistry->add((folderName + "/hFakePairsCounter").c_str(), "; Counter; Entries", kTH1I, {{1, 0, 1}}); + kHistogramRegistry->add((folderName + "/kstar_resolution").c_str(), "; #it{k} _{T} reconstructed (GeV/#it{c}); #it{k} _{T} truth (GeV/#it{c})", kTH2F, {femtoObsAxis, femtoObsAxis}); } /// Templated function to initialize the histograms for the task - /// Always calls init_base to initialize the histograms for data/ Monte Carlo reconstructed - /// In case of Monte Carlo, calls init_base again for Monte Carlo truth and the specialized function init_MC for additional histogramms + /// Always calls initBase to initialize the histograms for data/ Monte Carlo reconstructed + /// In case of Monte Carlo, calls initBase again for Monte Carlo truth and the specialized function initMC for additional histogramms /// \tparam T type of the configurable for the axis configuration /// \param registry Histogram registry to be passed /// \param kstarBins k* binning for the histograms @@ -117,9 +117,9 @@ class FemtoUniverseFemtoContainer template void init(HistogramRegistry* registry, T& kstarBins, T& multBins, T& kTBins, T& mTBins, T& multBins3D, T& mTBins3D, bool isMC, bool use3dplots) { - mHistogramRegistry = registry; + kHistogramRegistry = registry; std::string femtoObs; - if constexpr (mFemtoObs == femtoUniverseFemtoContainer::Observable::kstar) { + if constexpr (kFemtoObs == femto_universe_femto_container::Observable::kstar) { femtoObs = "#it{k*} (GeV/#it{c})"; } std::vector tmpVecMult = multBins; @@ -131,13 +131,13 @@ class FemtoUniverseFemtoContainer framework::AxisSpec multAxis3D = {multBins3D, "Multiplicity"}; framework::AxisSpec mTAxis3D = {mTBins3D, "#it{m}_{T} (GeV/#it{c})"}; - std::string folderName = static_cast(mFolderSuffix[mEventType]) + static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]); + std::string folderName = static_cast(kFolderSuffix[kEventType]) + static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]); - init_base(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, use3dplots); + initBase(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, use3dplots); if (isMC) { - folderName = static_cast(mFolderSuffix[mEventType]) + static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]); - init_base(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, use3dplots); - init_MC(folderName, femtoObs, femtoObsAxis, multAxis, mTAxis); + folderName = static_cast(kFolderSuffix[kEventType]) + static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]); + initBase(folderName, femtoObs, femtoObsAxis, multAxis, kTAxis, mTAxis, multAxis3D, mTAxis3D, use3dplots); + initMC(folderName, femtoObs, femtoObsAxis, multAxis, mTAxis); } } @@ -146,10 +146,10 @@ class FemtoUniverseFemtoContainer /// \param pdg2 PDG code of particle two void setPDGCodes(const int pdg1, const int pdg2) { - mMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass(); - mMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass(); - mPDGOne = pdg1; - mPDGTwo = pdg2; + kMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass(); + kMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass(); + kPDGOne = pdg1; + kPDGTwo = pdg2; } /// Pass a pair to the container and compute all the relevant observables @@ -158,23 +158,23 @@ class FemtoUniverseFemtoContainer /// \param part1 Particle one /// \param part2 Particle two /// \param mult Multiplicity of the event - template - void setPair_base(const float femtoObs, const float mT, T const& part1, T const& part2, const int mult, bool use3dplots) + template + void setPairBase(const float femtoObs, const float mT, T const& part1, T const& part2, const int mult, bool use3dplots) { - const float kT = FemtoUniverseMath::getkT(part1, mMassOne, part2, mMassTwo); + const float kT = FemtoUniverseMath::getkT(part1, kMassOne, part2, kMassTwo); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairDist"), femtoObs); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkT"), kT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarkT"), femtoObs, kT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarmT"), femtoObs, mT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarMult"), femtoObs, mult); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/kstarPtPart1"), femtoObs, part1.pt()); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/kstarPtPart2"), femtoObs, part2.pt()); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/MultPtPart1"), part1.pt(), mult); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/MultPtPart2"), part2.pt(), mult); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/PtPart1PtPart2"), part1.pt(), part2.pt()); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairDist"), femtoObs); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkT"), kT); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarkT"), femtoObs, kT); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmT"), femtoObs, mT); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarMult"), femtoObs, mult); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/kstarPtPart1"), femtoObs, part1.pt()); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/kstarPtPart2"), femtoObs, part2.pt()); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/MultPtPart1"), part1.pt(), mult); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/MultPtPart2"), part2.pt(), mult); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/PtPart1PtPart2"), part1.pt(), part2.pt()); if (use3dplots) { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairkstarmTMult"), femtoObs, mT, mult); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmTMult"), femtoObs, mT, mult); } } @@ -182,25 +182,25 @@ class FemtoUniverseFemtoContainer /// Fills MC truth specific histogramms: /// - kstar distribution plots with RECONSTRUCTED information but ONLY for non-fake candidates; needed for purity calculations of tracks /// - kstar resolution matrix - /// Note: Standard histogramms with MC truth information are filled with the setPair_base function + /// Note: Standard histogramms with MC truth information are filled with the setPairBase function /// \param part1 Particle one /// \param part2 Particle two /// \param mult Multiplicity of the event - void setPair_MC(const float femtoObsMC, const float femtoObs, const float mT, const int mult) + void setPairMC(const float femtoObsMC, const float femtoObs, const float mT, const int mult) { - if (mHistogramRegistry) { + if (kHistogramRegistry) { // Fill the kstar distributions with the reconstructed information but only for particles with the right PDG code - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/relPairDist_ReconNoFake"), femtoObs); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/relPairkstarmT_ReconNoFake"), femtoObs, mT); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/relPairkstarMult_ReconNoFake"), femtoObs, mult); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/relPairDist_ReconNoFake"), femtoObs); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/relPairkstarmT_ReconNoFake"), femtoObs, mT); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/relPairkstarMult_ReconNoFake"), femtoObs, mult); - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/kstar_resolution"), femtoObsMC, femtoObs); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/kstar_resolution"), femtoObsMC, femtoObs); } } /// Templated function to handle data/ Monte Carlo reconstructed and Monte Carlo truth - /// Always calls setPair_base to compute the observables with reconstructed data - /// In case of Monte Carlo, calls setPair_base with MC info and specialized function setPair_MC for additional histogramms + /// Always calls setPairBase to compute the observables with reconstructed data + /// In case of Monte Carlo, calls setPairBase with MC info and specialized function setPairMC for additional histogramms /// \tparam T type of the femtouniverseparticle /// \param part1 Particle one /// \param part2 Particle two @@ -210,47 +210,47 @@ class FemtoUniverseFemtoContainer { float femtoObs, femtoObsMC; // Calculate femto observable and the mT with reconstructed information - if constexpr (mFemtoObs == femtoUniverseFemtoContainer::Observable::kstar) { - femtoObs = FemtoUniverseMath::getkstar(part1, mMassOne, part2, mMassTwo); + if constexpr (kFemtoObs == femto_universe_femto_container::Observable::kstar) { + femtoObs = FemtoUniverseMath::getkstar(part1, kMassOne, part2, kMassTwo); } - const float mT = FemtoUniverseMath::getmT(part1, mMassOne, part2, mMassTwo); + const float mT = FemtoUniverseMath::getmT(part1, kMassOne, part2, kMassTwo); - if (mHistogramRegistry) { - setPair_base(femtoObs, mT, part1, part2, mult, use3dplots); + if (kHistogramRegistry) { + setPairBase(femtoObs, mT, part1, part2, mult, use3dplots); if constexpr (isMC) { if (part1.has_fdMCParticle() && part2.has_fdMCParticle()) { // calculate the femto observable and the mT with MC truth information - if constexpr (mFemtoObs == femtoUniverseFemtoContainer::Observable::kstar) { - femtoObsMC = FemtoUniverseMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo); + if constexpr (kFemtoObs == femto_universe_femto_container::Observable::kstar) { + femtoObsMC = FemtoUniverseMath::getkstar(part1.fdMCParticle(), kMassOne, part2.fdMCParticle(), kMassTwo); } - const float mTMC = FemtoUniverseMath::getmT(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo); + const float mTMC = FemtoUniverseMath::getmT(part1.fdMCParticle(), kMassOne, part2.fdMCParticle(), kMassTwo); - if (abs(part1.fdMCParticle().pdgMCTruth()) == abs(mPDGOne) && abs(part2.fdMCParticle().pdgMCTruth()) == abs(mPDGTwo)) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates - setPair_base(femtoObsMC, mTMC, part1.fdMCParticle(), part2.fdMCParticle(), mult, use3dplots); - setPair_MC(femtoObsMC, femtoObs, mT, mult); + if (std::abs(part1.fdMCParticle().pdgMCTruth()) == std::abs(kPDGOne) && std::abs(part2.fdMCParticle().pdgMCTruth()) == std::abs(kPDGTwo)) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates + setPairBase(femtoObsMC, mTMC, part1.fdMCParticle(), part2.fdMCParticle(), mult, use3dplots); + setPairMC(femtoObsMC, femtoObs, mT, mult); } else { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/hFakePairsCounter"), 0); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/hFakePairsCounter"), 0); } } else { - mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]) + HIST("/hNoMCtruthPairsCounter"), 0); + kHistogramRegistry->fill(HIST(kFolderSuffix[kEventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]) + HIST("/hNoMCtruthPairsCounter"), 0); } } } } protected: - HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output - static constexpr std::string_view mFolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to mEventType - static constexpr femtoUniverseFemtoContainer::Observable mFemtoObs = obs; ///< Femtoscopic observable to be computed (according to femtoUniverseFemtoContainer::Observable) - static constexpr int mEventType = eventType; ///< Type of the event (same/mixed, according to femtoUniverseFemtoContainer::EventType) - float mMassOne = 0.f; ///< PDG mass of particle 1 - float mMassTwo = 0.f; ///< PDG mass of particle 2 - int mPDGOne = 0; ///< PDG code of particle 1 - int mPDGTwo = 0; ///< PDG code of particle 2 + HistogramRegistry* kHistogramRegistry = nullptr; ///< For QA output + static constexpr std::string_view kFolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to kEventType + static constexpr femto_universe_femto_container::Observable kFemtoObs = obs; ///< Femtoscopic observable to be computed (according to femto_universe_femto_container::Observable) + static constexpr int kEventType = eventType; ///< Type of the event (same/mixed, according to femto_universe_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; ///< PDG code of particle 2 }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEFEMTOCONTAINER_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h index 957fe316eb7..556f075d819 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h @@ -19,7 +19,6 @@ #ifndef PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEMATH_H_ #define PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEMATH_H_ -#include #include #include @@ -28,7 +27,7 @@ #include "TLorentzVector.h" #include "TMath.h" -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { /// \class FemtoUniverseMath @@ -54,14 +53,14 @@ class FemtoUniverseMath const float betay = beta * std::sin(trackSum.Phi()) * std::sin(trackSum.Theta()); const float betaz = beta * std::cos(trackSum.Theta()); - ROOT::Math::PxPyPzMVector PartOneCMS(vecpart1); - ROOT::Math::PxPyPzMVector PartTwoCMS(vecpart2); + ROOT::Math::PxPyPzMVector partOneCMS(vecpart1); + ROOT::Math::PxPyPzMVector partTwoCMS(vecpart2); const ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-betax, -betay, -betaz); - PartOneCMS = boostPRF(PartOneCMS); - PartTwoCMS = boostPRF(PartTwoCMS); + partOneCMS = boostPRF(partOneCMS); + partTwoCMS = boostPRF(partTwoCMS); - const ROOT::Math::PxPyPzMVector trackRelK = PartOneCMS - PartTwoCMS; + const ROOT::Math::PxPyPzMVector trackRelK = partOneCMS - partTwoCMS; return 0.5 * trackRelK.P(); } @@ -82,17 +81,17 @@ class FemtoUniverseMath const float betay = beta * std::sin(trackSum.Phi()) * std::sin(trackSum.Theta()); const float betaz = beta * std::cos(trackSum.Theta()); - ROOT::Math::PxPyPzMVector PartOneCMS(vecpart1); - ROOT::Math::PxPyPzMVector PartTwoCMS(vecpart2); + ROOT::Math::PxPyPzMVector partOneCMS(vecpart1); + ROOT::Math::PxPyPzMVector partTwoCMS(vecpart2); const ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-betax, -betay, -betaz); - PartOneCMS = boostPRF(PartOneCMS); - PartTwoCMS = boostPRF(PartTwoCMS); + partOneCMS = boostPRF(partOneCMS); + partTwoCMS = boostPRF(partTwoCMS); - const ROOT::Math::PtEtaPhiMVector PartOneCMSGeo(PartOneCMS); - const ROOT::Math::PtEtaPhiMVector PartTwoCMSGeo(PartTwoCMS); + const ROOT::Math::PtEtaPhiMVector partOneCMSGeo(partOneCMS); + const ROOT::Math::PtEtaPhiMVector partTwoCMSGeo(partTwoCMS); - return (PartOneCMSGeo.Theta() - PartTwoCMSGeo.Theta()); + return (partOneCMSGeo.Theta() - partTwoCMSGeo.Theta()); } /// Compute the qij of a pair of particles @@ -128,21 +127,21 @@ class FemtoUniverseMath template static float getQ3(const T& part1, const float mass1, const T& part2, const float mass2, const T& part3, const float mass3) { - float E1 = sqrt(pow(part1.px(), 2) + pow(part1.py(), 2) + pow(part1.pz(), 2) + pow(mass1, 2)); - float E2 = sqrt(pow(part2.px(), 2) + pow(part2.py(), 2) + pow(part2.pz(), 2) + pow(mass2, 2)); - float E3 = sqrt(pow(part3.px(), 2) + pow(part3.py(), 2) + pow(part3.pz(), 2) + pow(mass3, 2)); + float e1 = std::sqrt(std::pow(part1.px(), 2) + std::pow(part1.py(), 2) + std::pow(part1.pz(), 2) + std::pow(mass1, 2)); + float e2 = std::sqrt(std::pow(part2.px(), 2) + std::pow(part2.py(), 2) + std::pow(part2.pz(), 2) + std::pow(mass2, 2)); + float e3 = std::sqrt(std::pow(part3.px(), 2) + std::pow(part3.py(), 2) + std::pow(part3.pz(), 2) + std::pow(mass3, 2)); - const ROOT::Math::PxPyPzEVector vecpart1(part1.px(), part1.py(), part1.pz(), E1); - const ROOT::Math::PxPyPzEVector vecpart2(part2.px(), part2.py(), part2.pz(), E2); - const ROOT::Math::PxPyPzEVector vecpart3(part3.px(), part3.py(), part3.pz(), E3); + const ROOT::Math::PxPyPzEVector vecpart1(part1.px(), part1.py(), part1.pz(), e1); + const ROOT::Math::PxPyPzEVector vecpart2(part2.px(), part2.py(), part2.pz(), e2); + const ROOT::Math::PxPyPzEVector vecpart3(part3.px(), part3.py(), part3.pz(), e3); ROOT::Math::PxPyPzEVector q12 = getqij(vecpart1, vecpart2); ROOT::Math::PxPyPzEVector q23 = getqij(vecpart2, vecpart3); ROOT::Math::PxPyPzEVector q31 = getqij(vecpart3, vecpart1); - float Q32 = q12.M2() + q23.M2() + q31.M2(); + float q32 = q12.M2() + q23.M2() + q31.M2(); - return sqrt(-Q32); + return std::sqrt(-q32); } /// Compute the transverse momentum of a pair of particles @@ -182,11 +181,11 @@ class FemtoUniverseMath template static std::vector newpairfunc(const T& part1, const float mass1, const T& part2, const float mass2, bool isiden) { - const double E1 = sqrt(pow(part1.px(), 2) + pow(part1.py(), 2) + pow(part1.pz(), 2) + pow(mass1, 2)); - const double E2 = sqrt(pow(part2.px(), 2) + pow(part2.py(), 2) + pow(part2.pz(), 2) + pow(mass2, 2)); + const double e1 = std::sqrt(std::pow(part1.px(), 2) + std::pow(part1.py(), 2) + std::pow(part1.pz(), 2) + std::pow(mass1, 2)); + const double e2 = std::sqrt(std::pow(part2.px(), 2) + std::pow(part2.py(), 2) + std::pow(part2.pz(), 2) + std::pow(mass2, 2)); - const ROOT::Math::PxPyPzEVector vecpart1(part1.px(), part1.py(), part1.pz(), E1); - const ROOT::Math::PxPyPzEVector vecpart2(part2.px(), part2.py(), part2.pz(), E2); + const ROOT::Math::PxPyPzEVector vecpart1(part1.px(), part1.py(), part1.pz(), e1); + const ROOT::Math::PxPyPzEVector vecpart2(part2.px(), part2.py(), part2.pz(), e2); const ROOT::Math::PxPyPzEVector trackSum = vecpart1 + vecpart2; std::vector vect; @@ -198,9 +197,9 @@ class FemtoUniverseMath const double tPtSq = (tPx * tPx + tPy * tPy); const double tMtSq = (tE * tE - tPz * tPz); - const double tM = sqrt(tMtSq - tPtSq); - const double tMt = sqrt(tMtSq); - const double tPt = sqrt(tPtSq); + const double tM = std::sqrt(tMtSq - tPtSq); + const double tMt = std::sqrt(tMtSq); + const double tPt = std::sqrt(tPtSq); // Boost to LCMS @@ -209,8 +208,8 @@ class FemtoUniverseMath const double fDKOut = (part1.px() * tPx + part1.py() * tPy) / tPt; const double fDKSide = (-part1.px() * tPy + part1.py() * tPx) / tPt; - const double fDKLong = gamma * (part1.pz() - beta * E1); - const double fDE = gamma * (E1 - beta * part1.pz()); + const double fDKLong = gamma * (part1.pz() - beta * e1); + const double fDE = gamma * (e1 - beta * part1.pz()); const double px1LCMS = fDKOut; const double py1LCMS = fDKSide; @@ -219,8 +218,8 @@ class FemtoUniverseMath const double px2LCMS = (part2.px() * tPx + part2.py() * tPy) / tPt; const double py2LCMS = (part2.py() * tPx - part2.px() * tPy) / tPt; - const double pz2LCMS = gamma * (part2.pz() - beta * E2); - const double pE2LCMS = gamma * (E2 - beta * part2.pz()); + const double pz2LCMS = gamma * (part2.pz() - beta * e2); + const double pE2LCMS = gamma * (e2 - beta * part2.pz()); const double fDKOutLCMS = px1LCMS - px2LCMS; const double fDKSideLCMS = py1LCMS - py2LCMS; @@ -236,9 +235,9 @@ class FemtoUniverseMath const double fDKLongPRF = fDKLongLCMS; const double fKOut = gammaOut * (fDKOut - betaOut * fDE); - const double qlcms = sqrt(fDKOutLCMS * fDKOutLCMS + fDKSideLCMS * fDKSideLCMS + fDKLongLCMS * fDKLongLCMS); - const double qinv = sqrt(fDKOutPRF * fDKOutPRF + fDKSidePRF * fDKSidePRF + fDKLongPRF * fDKLongPRF); - const double kstar = sqrt(fKOut * fKOut + fDKSide * fDKSide + fDKLong * fDKLong); + const double qlcms = std::sqrt(fDKOutLCMS * fDKOutLCMS + fDKSideLCMS * fDKSideLCMS + fDKLongLCMS * fDKLongLCMS); + const double qinv = std::sqrt(fDKOutPRF * fDKOutPRF + fDKSidePRF * fDKSidePRF + fDKLongPRF * fDKLongPRF); + const double kstar = std::sqrt(fKOut * fKOut + fDKSide * fDKSide + fDKLong * fDKLong); if (isiden) { vect.push_back(qinv); @@ -256,6 +255,6 @@ class FemtoUniverseMath } }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEMATH_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h index acf802c161e..18281ac198b 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h @@ -31,7 +31,7 @@ using namespace o2::framework; namespace o2::analysis { -namespace femtoUniverse +namespace femto_universe { /// \class FemtoUniverseObjectSelection @@ -67,7 +67,7 @@ class FemtoUniverseObjectSelection /// \param selVar Variable to be employed for the selection /// \param selType Type of the selection to be employed template - void setSelection(T& selVals, selVariable selVar, femtoUniverseSelection::SelectionType selType) + void setSelection(T& selVals, selVariable selVar, femto_universe_selection::SelectionType selType) { std::vector tmpSelVals = selVals; // necessary due to some features of the Configurable std::vector> tempVec; @@ -83,15 +83,15 @@ class FemtoUniverseObjectSelection { /// First the selection is sorted so that the most open cuts are conducted first switch (sels.at(0).getSelectionType()) { - case (femtoUniverseSelection::SelectionType::kUpperLimit): - case (femtoUniverseSelection::SelectionType::kAbsUpperLimit): + case (femto_universe_selection::SelectionType::kUpperLimit): + case (femto_universe_selection::SelectionType::kAbsUpperLimit): std::sort(sels.begin(), sels.end(), [](FemtoUniverseSelection a, FemtoUniverseSelection b) { return a.getSelectionValue() > b.getSelectionValue(); }); break; - case (femtoUniverseSelection::SelectionType::kLowerLimit): - case (femtoUniverseSelection::SelectionType::kAbsLowerLimit): - case (femtoUniverseSelection::SelectionType::kEqual): + case (femto_universe_selection::SelectionType::kLowerLimit): + case (femto_universe_selection::SelectionType::kAbsLowerLimit): + case (femto_universe_selection::SelectionType::kEqual): std::sort(sels.begin(), sels.end(), [](FemtoUniverseSelection a, FemtoUniverseSelection b) { return a.getSelectionValue() < b.getSelectionValue(); }); @@ -108,17 +108,17 @@ class FemtoUniverseObjectSelection /// \param selVar Selection variable under consideration /// \param selType Type of the selection variable /// \return The most open selection of the selection variable given to the class - selValDataType getMinimalSelection(selVariable selVar, femtoUniverseSelection::SelectionType selType) + selValDataType getMinimalSelection(selVariable selVar, femto_universe_selection::SelectionType selType) { selValDataType minimalSel{}; switch (selType) { - case (femtoUniverseSelection::SelectionType::kUpperLimit): - case (femtoUniverseSelection::SelectionType::kAbsUpperLimit): + case (femto_universe_selection::SelectionType::kUpperLimit): + case (femto_universe_selection::SelectionType::kAbsUpperLimit): minimalSel = -999.e9; break; - case (femtoUniverseSelection::SelectionType::kLowerLimit): - case (femtoUniverseSelection::SelectionType::kAbsLowerLimit): - case (femtoUniverseSelection::SelectionType::kEqual): + case (femto_universe_selection::SelectionType::kLowerLimit): + case (femto_universe_selection::SelectionType::kAbsLowerLimit): + case (femto_universe_selection::SelectionType::kEqual): minimalSel = 999.e9; break; } @@ -126,15 +126,15 @@ class FemtoUniverseObjectSelection for (auto sel : mSelections) { if (sel.getSelectionVariable() == selVar) { switch (sel.getSelectionType()) { - case (femtoUniverseSelection::SelectionType::kUpperLimit): - case (femtoUniverseSelection::SelectionType::kAbsUpperLimit): + case (femto_universe_selection::SelectionType::kUpperLimit): + case (femto_universe_selection::SelectionType::kAbsUpperLimit): if (minimalSel < sel.getSelectionValue()) { minimalSel = sel.getSelectionValue(); } break; - case (femtoUniverseSelection::SelectionType::kLowerLimit): - case (femtoUniverseSelection::SelectionType::kAbsLowerLimit): - case (femtoUniverseSelection::SelectionType::kEqual): + case (femto_universe_selection::SelectionType::kLowerLimit): + case (femto_universe_selection::SelectionType::kAbsLowerLimit): + case (femto_universe_selection::SelectionType::kEqual): if (minimalSel > sel.getSelectionValue()) { minimalSel = sel.getSelectionValue(); } @@ -193,7 +193,7 @@ class FemtoUniverseObjectSelection std::vector> mSelections; ///< Vector containing all selections }; -} // namespace femtoUniverse +} // namespace femto_universe } // namespace o2::analysis #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEOBJECTSELECTION_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniversePairAngularWithCentMultKt.h b/PWGCF/FemtoUniverse/Core/FemtoUniversePairAngularWithCentMultKt.h index cc017bf192e..31b256f43f7 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniversePairAngularWithCentMultKt.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniversePairAngularWithCentMultKt.h @@ -8,26 +8,25 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +/// \file FemtoUniversePairAngularWithCentMultKt.h +/// \brief FemtoUniversePairAngularWithCentMultKt - Histogram class for angular pair tracks with centrality and multiplicity /// \author Deependra Sharma, IITB, deependra.sharma@cern.ch /// \author Alicja Płachta, WUT Warsaw, alicja.plachta.stud@pw.edu.pl +/// \author Zuzanna Chochulska, WUT Warsaw & CTU Prague, zchochul@cern.ch #ifndef PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPAIRANGULARWITHCENTMULTKT_H_ #define PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPAIRANGULARWITHCENTMULTKT_H_ #include -#include #include #include "Framework/HistogramRegistry.h" -using namespace o2; -using namespace o2::framework; - -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -class PairWithCentMultKt +class FemtoUniversePairAngularWithCentMultKt { public: - virtual ~PairWithCentMultKt() = default; + virtual ~FemtoUniversePairAngularWithCentMultKt() = default; /// @brief /// @tparam t1 /// @param registry @@ -36,46 +35,46 @@ class PairWithCentMultKt template void init(HistogramRegistry* registry, t1& /*kstarbins*/, t1& centmultbins, t2& phiBins, t2& etaBins, bool processKT) { - PairWithCentMultKtRegistry = registry; + pairWithCentMultKtRegistry = registry; // AxisSpec kstarAxis = {kstarbins, "#it{k*} (GeV/#it{c})"}; - mPhiLow = (-static_cast(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins; - mPhiHigh = 2 * o2::constants::math::PI + (-static_cast(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins; - framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh}; + kPhiLow = (-static_cast(phiBins / 4) + 0.5) * o2::constants::math::TwoPI / phiBins; + kPhiHigh = o2::constants::math::TwoPI + (-static_cast(phiBins / 4) + 0.5) * o2::constants::math::TwoPI / phiBins; + framework::AxisSpec phiAxis = {phiBins, kPhiLow, kPhiHigh}; framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0}; - CentMultBins = centmultbins; - KtBins = {0.0f, 0.2f, 0.4f, 0.6f, 0.8f, 1.0f, 2.0f, 99999.f}; // temporary - KtBins.erase(KtBins.begin()); - CentMultBins.erase(CentMultBins.begin()); - UseKt = processKT; + kCentMultBins = centmultbins; + ktBins = {0.0f, 0.2f, 0.4f, 0.6f, 0.8f, 1.0f, 2.0f, 99999.f}; // temporary + ktBins.erase(ktBins.begin()); + kCentMultBins.erase(kCentMultBins.begin()); + useKt = processKT; - for (int i = 0; i < static_cast(CentMultBins.size() - 1); i++) { - int lowBin = static_cast((CentMultBins[i])); - int highBin = static_cast((CentMultBins[i + 1])); - std::string HistTitle = "mult_" + std::to_string(lowBin) + "-" + std::to_string(highBin); - std::string HistSuffix1 = static_cast(HistSuffix[i]); - std::string HistSuffix2 = static_cast(HistSuffix[i + 1]); - std::string HistFolderMult = "mult_" + HistSuffix1 + "_" + HistSuffix2; - std::string HistName = HistFolderMult + "/DeltaEtaDeltaPhi"; - PairWithCentMultKtRegistry->add(HistName.c_str(), HistTitle.c_str(), HistType::kTH2F, {phiAxis, etaAxis}); - if (UseKt) { - for (int i = 0; i < static_cast(KtBins.size() - 1); i++) { - std::string kt_bin1_string = std::to_string(KtBins[i]); - std::replace(kt_bin1_string.begin(), kt_bin1_string.end(), '.', '_'); - std::string kt_bin2_string = std::to_string(KtBins[i + 1]); - std::replace(kt_bin2_string.begin(), kt_bin2_string.end(), '.', '_'); - kt_bin1_string.resize(4); - kt_bin2_string.resize(4); - std::string HistTitleKt = "kt_" + kt_bin1_string + "-" + kt_bin2_string; - std::string HistSuffix1Kt = static_cast(HistSuffix[i]); - std::string HistSuffix2Kt = static_cast(HistSuffix[i + 1]); - std::string HistNameKt = HistFolderMult + "/DeltaEtaDeltaPhi" + HistSuffix1Kt + "_" + HistSuffix2Kt; - PairWithCentMultKtRegistry->add(HistNameKt.c_str(), HistTitleKt.c_str(), HistType::kTH2F, {phiAxis, etaAxis}); + for (int i = 0; i < static_cast(kCentMultBins.size() - 1); i++) { + int lowBin = static_cast((kCentMultBins[i])); + int highBin = static_cast((kCentMultBins[i + 1])); + std::string kHistTitle = "mult_" + std::to_string(lowBin) + "-" + std::to_string(highBin); + std::string kHistSuffix1 = static_cast(HistSuffix[i]); + std::string kHistSuffix2 = static_cast(HistSuffix[i + 1]); + std::string kHistFolderMult = "mult_" + kHistSuffix1 + "_" + kHistSuffix2; + std::string kHistName = kHistFolderMult + "/DeltaEtaDeltaPhi"; + pairWithCentMultKtRegistry->add(kHistName.c_str(), kHistTitle.c_str(), HistType::kTH2F, {phiAxis, etaAxis}); + if (useKt) { + for (int i = 0; i < static_cast(ktBins.size() - 1); i++) { + std::string ktBin1String = std::to_string(ktBins[i]); + std::replace(ktBin1String.begin(), ktBin1String.end(), '.', '_'); + std::string ktBin2String = std::to_string(ktBins[i + 1]); + std::replace(ktBin2String.begin(), ktBin2String.end(), '.', '_'); + ktBin1String.resize(4); + ktBin2String.resize(4); + std::string kHistTitleKt = "kt_" + ktBin1String + "-" + ktBin2String; + std::string kHistSuffix1Kt = static_cast(HistSuffix[i]); + std::string kHistSuffix2Kt = static_cast(HistSuffix[i + 1]); + std::string kHistNameKt = kHistFolderMult + "/DeltaEtaDeltaPhi" + kHistSuffix1Kt + "_" + kHistSuffix2Kt; + pairWithCentMultKtRegistry->add(kHistNameKt.c_str(), kHistTitleKt.c_str(), HistType::kTH2F, {phiAxis, etaAxis}); } } } - PairWithCentMultKtRegistry->add("Beyond_Max", "Beyond_Max", HistType::kTH2F, {phiAxis, etaAxis}); + pairWithCentMultKtRegistry->add("Beyond_Max", "Beyond_Max", HistType::kTH2F, {phiAxis, etaAxis}); } /// @brief @@ -86,59 +85,59 @@ class PairWithCentMultKt void fill(t1 kstar_value, t1 cent_mult_value, t1 d_phi_value, t1 d_eta_value) { - if (cent_mult_value > CentMultBins[CentMultBins.size() - 1] || cent_mult_value < CentMultBins[0]) { - PairWithCentMultKtRegistry->fill(HIST("Beyond_Max"), kstar_value); - } else if (cent_mult_value <= CentMultBins[1]) { - PairWithCentMultKtRegistry->fill(HIST("mult_0_1/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); - if (UseKt) { + if (cent_mult_value > kCentMultBins[kCentMultBins.size() - 1] || cent_mult_value < kCentMultBins[0]) { + pairWithCentMultKtRegistry->fill(HIST("Beyond_Max"), kstar_value); + } else if (cent_mult_value <= kCentMultBins[1]) { + pairWithCentMultKtRegistry->fill(HIST("mult_0_1/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); + if (useKt) { // auto histMultFolder = HIST("mult_0_1/"); // fill_kT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value <= CentMultBins[2]) { - PairWithCentMultKtRegistry->fill(HIST("mult_1_2/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); - if (UseKt) { + } else if (cent_mult_value <= kCentMultBins[2]) { + pairWithCentMultKtRegistry->fill(HIST("mult_1_2/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); + if (useKt) { // auto histMultFolder = HIST("mult_1_2/"); // fill_kT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value <= CentMultBins[3]) { - PairWithCentMultKtRegistry->fill(HIST("mult_2_3/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); - if (UseKt) { + } else if (cent_mult_value <= kCentMultBins[3]) { + pairWithCentMultKtRegistry->fill(HIST("mult_2_3/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); + if (useKt) { // auto histMultFolder = HIST("mult_2_3/"); // fill_kT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value <= CentMultBins[4]) { - PairWithCentMultKtRegistry->fill(HIST("mult_3_4/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); - if (UseKt) { + } else if (cent_mult_value <= kCentMultBins[4]) { + pairWithCentMultKtRegistry->fill(HIST("mult_3_4/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); + if (useKt) { // auto histMultFolder = HIST("mult_3_4/"); // fill_kT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value <= CentMultBins[5]) { - PairWithCentMultKtRegistry->fill(HIST("mult_4_5/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); - if (UseKt) { + } else if (cent_mult_value <= kCentMultBins[5]) { + pairWithCentMultKtRegistry->fill(HIST("mult_4_5/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); + if (useKt) { // auto histMultFolder = HIST("mult_4_5/"); // fill_kT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value <= CentMultBins[6]) { - PairWithCentMultKtRegistry->fill(HIST("mult_5_6/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); - if (UseKt) { + } else if (cent_mult_value <= kCentMultBins[6]) { + pairWithCentMultKtRegistry->fill(HIST("mult_5_6/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); + if (useKt) { // auto histMultFolder = HIST("mult_5_6/"); // fill_kT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value <= CentMultBins[7]) { - PairWithCentMultKtRegistry->fill(HIST("mult_6_7/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); - if (UseKt) { + } else if (cent_mult_value <= kCentMultBins[7]) { + pairWithCentMultKtRegistry->fill(HIST("mult_6_7/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); + if (useKt) { // auto histMultFolder = HIST("mult_6_7/"); // fill_kT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value <= CentMultBins[8]) { - PairWithCentMultKtRegistry->fill(HIST("mult_7_8/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); - if (UseKt) { + } else if (cent_mult_value <= kCentMultBins[8]) { + pairWithCentMultKtRegistry->fill(HIST("mult_7_8/DeltaEtaDeltaPhi"), d_phi_value, d_eta_value); + if (useKt) { // auto histMultFolder = HIST("mult_7_8/"); // fill_kT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value <= CentMultBins[9]) { - PairWithCentMultKtRegistry->fill(HIST("mult_8_9/kstar"), d_phi_value, d_eta_value); - if (UseKt) { + } else if (cent_mult_value <= kCentMultBins[9]) { + pairWithCentMultKtRegistry->fill(HIST("mult_8_9/kstar"), d_phi_value, d_eta_value); + if (useKt) { // auto histMultFolder = HIST("mult_8_9/"); // fill_kT(kstar_value, kt_value, histMultFolder); } @@ -154,38 +153,38 @@ class PairWithCentMultKt // template // void fill_kT(t1 kstar_value, t1 kt_value, t2 folder) // { - // if (kt_value <= KtBins[1]) { - // PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_0_1"), kstar_value); - // } else if (kt_value <= KtBins[2]) { - // PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_1_2"), kstar_value); - // } else if (kt_value <= KtBins[3]) { - // PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_2_3"), kstar_value); - // } else if (kt_value <= KtBins[4]) { - // PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_3_4"), kstar_value); - // } else if (kt_value <= KtBins[5]) { - // PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_4_5"), kstar_value); - // } else if (kt_value <= KtBins[6]) { - // PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_5_6"), kstar_value); - // } else if (kt_value <= KtBins[7]) { - // PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_6_7"), kstar_value); - // } else if (kt_value <= KtBins[8]) { - // PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_7_8"), kstar_value); - // } else if (kt_value <= KtBins[9]) { - // PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_8_9"), kstar_value); + // if (kt_value <= ktBins[1]) { + // pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_0_1"), kstar_value); + // } else if (kt_value <= ktBins[2]) { + // pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_1_2"), kstar_value); + // } else if (kt_value <= ktBins[3]) { + // pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_2_3"), kstar_value); + // } else if (kt_value <= ktBins[4]) { + // pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_3_4"), kstar_value); + // } else if (kt_value <= ktBins[5]) { + // pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_4_5"), kstar_value); + // } else if (kt_value <= ktBins[6]) { + // pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_5_6"), kstar_value); + // } else if (kt_value <= ktBins[7]) { + // pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_6_7"), kstar_value); + // } else if (kt_value <= ktBins[8]) { + // pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_7_8"), kstar_value); + // } else if (kt_value <= ktBins[9]) { + // pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_8_9"), kstar_value); // } // } protected: - HistogramRegistry* PairWithCentMultKtRegistry = nullptr; - std::vector CentMultBins; - std::vector KtBins; - bool UseKt = false; - double mPhiLow; - double mPhiHigh; - double delta_eta; - double delta_phi; + HistogramRegistry* pairWithCentMultKtRegistry = nullptr; + std::vector kCentMultBins; + std::vector ktBins; + bool useKt = false; + double kPhiLow; + double kPhiHigh; + double deltaEta; + double deltaPhi; static constexpr std::string_view HistSuffix[10] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}; }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPAIRANGULARWITHCENTMULTKT_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h b/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h index 29b8368f392..0a94c2c5a0c 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h @@ -21,9 +21,7 @@ #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" #include "Framework/HistogramRegistry.h" -using namespace o2::framework; - -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { /// \class FemtoUniversePairCleaner @@ -57,21 +55,21 @@ class FemtoUniversePairCleaner template bool isCleanPair(Part const& part1, Part const& part2, Parts const& particles) { - if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { + if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { /// Track-Track combination if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack) { LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide kTrack,kTrack candidates."; return false; } return part1.globalIndex() != part2.globalIndex(); - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { /// Track-Track combination if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide kMCTruthTrack,kMCTruthTrack candidates."; return false; } return part1.globalIndex() != part2.globalIndex(); - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { /// Track-V0 combination part1 is hadron and part2 is v0 if (part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0) { LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide second argument kV0 candidate."; @@ -84,7 +82,7 @@ class FemtoUniversePairCleaner return false; } return part1.globalIndex() != part2.globalIndex(); - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kV0 && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kV0 && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { /// V0-V0 combination both part1 and part2 are v0 if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0 || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0) { LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide first and second arguments kV0 candidate."; @@ -100,7 +98,7 @@ class FemtoUniversePairCleaner return false; } return part1.globalIndex() != part2.globalIndex(); - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { /// Track-Cascade combination part1 is hadron and part2 is cascade if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kCascade) { LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide first argument kTrack candidate and second argument kCascade candidate."; @@ -114,7 +112,7 @@ class FemtoUniversePairCleaner return false; } return part1.globalIndex() != part2.globalIndex(); - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) { /// Track-D0 combination part1 is hadron and part2 is D0 if (part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kD0) { LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide second argument kD0 candidate."; @@ -128,7 +126,7 @@ class FemtoUniversePairCleaner return true; } return false; - } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { + } else if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { /// Track-Phi combination part1 is Phi and part 2 is hadron if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kPhi) { LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide second argument kPhi candidate."; @@ -151,9 +149,9 @@ class FemtoUniversePairCleaner private: HistogramRegistry* mHistogramRegistry; ///< For QA output - static constexpr o2::aod::femtouniverseparticle::ParticleType mPartOneType = partOne; ///< Type of particle 1 - static constexpr o2::aod::femtouniverseparticle::ParticleType mPartTwoType = partTwo; ///< Type of particle 2 + static constexpr o2::aod::femtouniverseparticle::ParticleType kPartOneType = partOne; ///< Type of particle 1 + static constexpr o2::aod::femtouniverseparticle::ParticleType kPartTwoType = partTwo; ///< Type of particle 2 }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPAIRCLEANER_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h b/PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h index 771b1aed1ab..50885a02523 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h @@ -22,10 +22,7 @@ #include #include "Framework/HistogramRegistry.h" -using namespace o2; -using namespace o2::framework; - -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { /// \class FemtoUniversePairSHCentMultKt @@ -34,8 +31,8 @@ namespace o2::analysis::femtoUniverse /// the correlation function are filled according to the specified observable /// \tparam eventType Type of the event (same/mixed) /// \tparam obs Observable to be computed (k*/Q_inv/...) -template +template class PairSHCentMultKt { public: @@ -51,21 +48,21 @@ class PairSHCentMultKt void init(HistogramRegistry* registry, t1& kstarbins, t1& centmultbins, t1& ktbins, int /*maxl*/) { - PairSHCentMultKtRegistry = registry; + pairSHCentMultKtRegistry = registry; AxisSpec kstarAxis = {kstarbins, "#it{k*} (GeV/#it{c})"}; - KStarBins = kstarbins; + kStarBins = kstarbins; - CentMultBins = centmultbins; - KtBins = ktbins; - KtBins.erase(KtBins.begin()); - CentMultBins.erase(CentMultBins.begin()); + centMultBins = centmultbins; + ktBins = ktbins; + ktBins.erase(ktBins.begin()); + centMultBins.erase(centMultBins.begin()); std::string femtoObs1D; - std::vector fels(fMaxJM); - std::vector fems(fMaxJM); - std::vector felsi(fMaxJM); - std::vector femsi(fMaxJM); + std::vector fels(kMaxJM); + std::vector fems(kMaxJM); + std::vector felsi(kMaxJM); + std::vector femsi(kMaxJM); // Fill in els and ems table int el = 0; @@ -83,128 +80,105 @@ class PairSHCentMultKt el++; em = -el; } - } while (el <= fMaxL); + } while (el <= kMaxL); femtoObs1D = "#it{q} (GeV/#it{c})"; framework::AxisSpec femtoObsAxis1D = {kstarbins, femtoObs1D.c_str()}; - for (int i = 0; i < static_cast(CentMultBins.size() - 1); i++) { - int lowBin = static_cast((CentMultBins[i])); - int highBin = static_cast((CentMultBins[i + 1])); - - std::string HistTitle = - "mult_" + std::to_string(lowBin) + "-" + std::to_string(highBin); - std::string HistSuffix1 = - std::to_string(static_cast(CentMultBins[i])); - std::string HistSuffix2 = - std::to_string(static_cast(CentMultBins[i + 1])); - std::string HistFolderMult = "mult_" + HistSuffix1 + "_" + HistSuffix2; - - for (int j = 0; j < static_cast(KtBins.size() - 1); j++) { - int ktlowBin = static_cast(KtBins[j]); - int kthighBin = static_cast(KtBins[j + 1]); - - std::string HistTitlekT = - "kT_" + std::to_string(ktlowBin) + "-" + std::to_string(kthighBin); - std::string HistSuffixkT1 = - std::to_string(static_cast(KtBins[j] * 100.0)); - std::string HistSuffixkT2 = - std::to_string(static_cast(KtBins[j + 1] * 100.0)); - std::string HistFolderkT = "kT_" + HistSuffixkT1 + "_" + HistSuffixkT2; + for (int i = 0; i < static_cast(centMultBins.size() - 1); i++) { + int lowBin = static_cast((centMultBins[i])); + int highBin = static_cast((centMultBins[i + 1])); + + std::string histTitle = "mult_" + std::to_string(lowBin) + "-" + std::to_string(highBin); + std::string histSuffix1 = std::to_string(static_cast(centMultBins[i])); + std::string histSuffix2 = std::to_string(static_cast(centMultBins[i + 1])); + std::string histFolderMult = "mult_" + histSuffix1 + "_" + histSuffix2; + + for (int j = 0; j < static_cast(ktBins.size() - 1); j++) { + int ktlowBin = static_cast(ktBins[j]); + int kthighBin = static_cast(ktBins[j + 1]); + + std::string histTitlekT = "kT_" + std::to_string(ktlowBin) + "-" + std::to_string(kthighBin); + std::string histSuffixkT1 = std::to_string(static_cast(ktBins[j] * 100.0)); + std::string histSuffixkT2 = std::to_string(static_cast(ktBins[j + 1] * 100.0)); + std::string histFolderkT = "kT_" + histSuffixkT1 + "_" + histSuffixkT2; std::string suffix; - fbinctn[i][j] = new TH1D( - TString("BinCountNum"), "Bin Occupation (Numerator)", - static_cast(KStarBins[0]), KStarBins[1], KStarBins[2]); - fbinctd[i][j] = new TH1D( - TString("BinCountDen"), "Bin Occupation (Denominator)", - static_cast(KStarBins[0]), KStarBins[1], KStarBins[2]); - - for (int ihist = 0; ihist < fMaxJM; ihist++) { + fbinctn[i][j] = new TH1D(TString("BinCountNum"), "Bin Occupation (Numerator)", static_cast(kStarBins[0]), kStarBins[1], kStarBins[2]); + fbinctd[i][j] = new TH1D(TString("BinCountDen"), "Bin Occupation (Denominator)", static_cast(kStarBins[0]), kStarBins[1], kStarBins[2]); + + for (int ihist = 0; ihist < kMaxJM; ihist++) { if (femsi[ihist] < 0) { suffix = "Ylm" + std::to_string(felsi[ihist]) + std::to_string(felsi[ihist] - femsi[ihist]); } else { - suffix = "Ylm" + std::to_string(felsi[ihist]) + - std::to_string(femsi[ihist]); + suffix = "Ylm" + std::to_string(felsi[ihist]) + std::to_string(femsi[ihist]); } - if (mFolderSuffix[mEventType] == mFolderSuffix[0]) { - fnumsreal[i][j][ihist] = PairSHCentMultKtRegistry->add( - (HistFolderMult + "/" + HistFolderkT + "/" + "NumRe" + suffix) - .c_str(), - ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, - {femtoObsAxis1D}); - fnumsimag[i][j][ihist] = PairSHCentMultKtRegistry->add( - (HistFolderMult + "/" + HistFolderkT + "/" + "NumIm" + suffix) - .c_str(), - ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, - {femtoObsAxis1D}); + if (FolderSuffix[EventType] == FolderSuffix[0]) { + fnumsreal[i][j][ihist] = pairSHCentMultKtRegistry->add( + (histFolderMult + "/" + histFolderkT + "/" + "NumRe" + suffix).c_str(), + ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); + fnumsimag[i][j][ihist] = pairSHCentMultKtRegistry->add( + (histFolderMult + "/" + histFolderkT + "/" + "NumIm" + suffix).c_str(), + ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); } else { - fdensreal[i][j][ihist] = PairSHCentMultKtRegistry->add( - (HistFolderMult + "/" + HistFolderkT + "/" + "DenRe" + suffix) - .c_str(), - ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, - {femtoObsAxis1D}); - fdensimag[i][j][ihist] = PairSHCentMultKtRegistry->add( - (HistFolderMult + "/" + HistFolderkT + "/" + "DenIm" + suffix) - .c_str(), - ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, - {femtoObsAxis1D}); + fdensreal[i][j][ihist] = pairSHCentMultKtRegistry->add( + (histFolderMult + "/" + histFolderkT + "/" + "DenRe" + suffix).c_str(), + ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); + fdensimag[i][j][ihist] = pairSHCentMultKtRegistry->add( + (histFolderMult + "/" + histFolderkT + "/" + "DenIm" + suffix).c_str(), + ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); } } - if (mFolderSuffix[mEventType] == mFolderSuffix[0]) { + if (FolderSuffix[EventType] == FolderSuffix[0]) { std::string bufnameNum = "CovNum"; - fcovnum[i][j] = PairSHCentMultKtRegistry->add( - (HistFolderMult + "/" + HistFolderkT + "/" + bufnameNum).c_str(), - "; x; y; z", kTH3D, - {{kstarbins}, - {(fMaxJM * 2), -0.5, ((static_cast(fMaxJM) * 2.0 - 0.5))}, - {(fMaxJM * 2), -0.5, - ((static_cast(fMaxJM) * 2.0 - 0.5))}}); - } else if (mFolderSuffix[mEventType] == mFolderSuffix[1]) { + fcovnum[i][j] = pairSHCentMultKtRegistry->add((histFolderMult + "/" + histFolderkT + "/" + bufnameNum).c_str(), "; x; y; z", kTH3D, + {{kstarbins}, + {(kMaxJM * 2), -0.5, ((static_cast(kMaxJM) * 2.0 - 0.5))}, + {(kMaxJM * 2), -0.5, + ((static_cast(kMaxJM) * 2.0 - 0.5))}}); + } else if (FolderSuffix[EventType] == FolderSuffix[1]) { std::string bufnameDen = "CovDen"; - fcovden[i][j] = PairSHCentMultKtRegistry->add( - (HistFolderMult + "/" + HistFolderkT + "/" + bufnameDen).c_str(), - "; x; y; z", kTH3D, - {{kstarbins}, - {(fMaxJM * 2), -0.5, ((static_cast(fMaxJM) * 2.0 - 0.5))}, - {(fMaxJM * 2), -0.5, - ((static_cast(fMaxJM) * 2.0 - 0.5))}}); + fcovden[i][j] = pairSHCentMultKtRegistry->add((histFolderMult + "/" + histFolderkT + "/" + bufnameDen).c_str(), "; x; y; z", kTH3D, + {{kstarbins}, + {(kMaxJM * 2), -0.5, ((static_cast(kMaxJM) * 2.0 - 0.5))}, + {(kMaxJM * 2), -0.5, + ((static_cast(kMaxJM) * 2.0 - 0.5))}}); } } } } /// Templated function to access different multiplicity directory and call - /// fill_kT_NumDen \param part1 particle 1 \param part2 particle 2 \param + /// fillkTNumDen \param part1 particle 1 \param part2 particle 2 \param /// ChosenEventType Same or Mixed evet type \param maxl Maximum valie of L /// component of the spherical harmonics \param multval Multiplicity value /// \param ktval kT value template - void fill_mult_NumDen(T const& part1, T const& part2, uint8_t ChosenEventType, - int maxl, int multval, float ktval, bool isiden) + void fillMultNumDen(T const& part1, T const& part2, uint8_t ChosenEventType, + int maxl, int multval, float ktval, bool isiden) { int multbinval; int absmultval = multval; - if ((absmultval >= CentMultBins[0]) && (absmultval < CentMultBins[1])) { + if ((absmultval >= centMultBins[0]) && (absmultval < centMultBins[1])) { multbinval = 0; - } else if (absmultval < CentMultBins[2]) { + } else if (absmultval < centMultBins[2]) { multbinval = 1; - } else if (absmultval < CentMultBins[3]) { + } else if (absmultval < centMultBins[3]) { multbinval = 2; - } else if (absmultval < CentMultBins[4]) { + } else if (absmultval < centMultBins[4]) { multbinval = 3; } else { return; } // std::cout<<"multbinval "< - void fill_kT_NumDen(T const& part1, T const& part2, uint8_t ChosenEventType, - int maxl, int multval, float ktval, bool isiden) + void fillkTNumDen(T const& part1, T const& part2, uint8_t ChosenEventType, + int maxl, int multval, float ktval, bool isiden) { int ktbinval = -1; - if ((ktval >= KtBins[0]) && (ktval < KtBins[1])) { + if ((ktval >= ktBins[0]) && (ktval < ktBins[1])) { ktbinval = 0; - } else if (ktval < KtBins[2]) { + } else if (ktval < ktBins[2]) { ktbinval = 1; - } else if (ktval < KtBins[3]) { + } else if (ktval < ktBins[3]) { ktbinval = 2; - } else if (ktval < KtBins[4]) { + } else if (ktval < ktBins[4]) { ktbinval = 3; } else { return; } - AddEventPair(part1, part2, ChosenEventType, maxl, multval, ktbinval, isiden); + addEventPair(part1, part2, ChosenEventType, maxl, multval, ktbinval, isiden); } /// Set the PDG codes of the two particles involved @@ -247,9 +221,9 @@ class PairSHCentMultKt /// \param zeroimag /// \param ilmprim /// \param primimag - int GetBin(int qbin, int ilmzero, int zeroimag, int ilmprim, int primimag) + int getBin(int qbin, int ilmzero, int zeroimag, int ilmprim, int primimag) { - return qbin * fMaxJM * fMaxJM * 4 + (ilmprim * 2 + primimag) * fMaxJM * 2 + + return qbin * kMaxJM * kMaxJM * 4 + (ilmprim * 2 + primimag) * kMaxJM * 2 + ilmzero * 2 + zeroimag; } @@ -261,12 +235,12 @@ class PairSHCentMultKt /// \param multval Multiplicity value /// \param ktval kT value template - void AddEventPair(T const& part1, T const& part2, uint8_t ChosenEventType, + void addEventPair(T const& part1, T const& part2, uint8_t ChosenEventType, int /*maxl*/, int multval, int ktval, bool isiden) { int fMultBin = multval; int fKtBin = ktval; - std::vector> fYlmBuffer(fMaxJM); + std::vector> fYlmBuffer(kMaxJM); std::vector f3d; f3d = FemtoUniverseMath::newpairfunc(part1, mMassOne, part2, mMassTwo, isiden); @@ -275,48 +249,48 @@ class PairSHCentMultKt const float qside = f3d[2]; const float qlong = f3d[3]; - double kv = sqrt(qout * qout + qside * qside + qlong * qlong); + double kv = std::sqrt(qout * qout + qside * qside + qlong * qlong); int nqbin = fbinctn[0][0]->GetXaxis()->FindFixBin(kv) - 1; - FemtoUniverseSpherHarMath Ylm; - Ylm.YlmUpToL(fMaxL, qout, qside, qlong, fYlmBuffer.data()); + FemtoUniverseSpherHarMath kYlm; + kYlm.doYlmUpToL(kMaxL, qout, qside, qlong, fYlmBuffer.data()); - if (ChosenEventType == femtoUniverseSHContainer::EventType::same) { - for (int ihist = 0; ihist < fMaxJM; ihist++) { + if (ChosenEventType == femto_universe_sh_container::EventType::same) { + for (int ihist = 0; ihist < kMaxJM; ihist++) { fnumsreal[fMultBin][fKtBin][ihist]->Fill(kv, real(fYlmBuffer[ihist])); fnumsimag[fMultBin][fKtBin][ihist]->Fill(kv, -imag(fYlmBuffer[ihist])); fbinctn[fMultBin][fKtBin]->Fill(kv, 1.0); } if (nqbin < fbinctn[0][0]->GetNbinsX()) { - for (int ilmzero = 0; ilmzero < fMaxJM; ilmzero++) { - for (int ilmprim = 0; ilmprim < fMaxJM; ilmprim++) { - fcovmnum[fMultBin][fKtBin][GetBin(nqbin, ilmzero, 0, ilmprim, 0)] += + for (int ilmzero = 0; ilmzero < kMaxJM; ilmzero++) { + for (int ilmprim = 0; ilmprim < kMaxJM; ilmprim++) { + fcovmnum[fMultBin][fKtBin][getBin(nqbin, ilmzero, 0, ilmprim, 0)] += (real(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); - fcovmnum[fMultBin][fKtBin][GetBin(nqbin, ilmzero, 0, ilmprim, 1)] += + fcovmnum[fMultBin][fKtBin][getBin(nqbin, ilmzero, 0, ilmprim, 1)] += (real(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); - fcovmnum[fMultBin][fKtBin][GetBin(nqbin, ilmzero, 1, ilmprim, 0)] += + fcovmnum[fMultBin][fKtBin][getBin(nqbin, ilmzero, 1, ilmprim, 0)] += (-imag(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); - fcovmnum[fMultBin][fKtBin][GetBin(nqbin, ilmzero, 1, ilmprim, 1)] += + fcovmnum[fMultBin][fKtBin][getBin(nqbin, ilmzero, 1, ilmprim, 1)] += (-imag(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); } } } - } else if (ChosenEventType == femtoUniverseSHContainer::EventType::mixed) { - for (int ihist = 0; ihist < fMaxJM; ihist++) { + } else if (ChosenEventType == femto_universe_sh_container::EventType::mixed) { + for (int ihist = 0; ihist < kMaxJM; ihist++) { fdensreal[fMultBin][fKtBin][ihist]->Fill(kv, real(fYlmBuffer[ihist])); fdensimag[fMultBin][fKtBin][ihist]->Fill(kv, -imag(fYlmBuffer[ihist])); fbinctd[fMultBin][fKtBin]->Fill(kv, 1.0); } if (nqbin < fbinctd[0][0]->GetNbinsX()) { - for (int ilmzero = 0; ilmzero < fMaxJM; ilmzero++) { - for (int ilmprim = 0; ilmprim < fMaxJM; ilmprim++) { - fcovmden[fMultBin][fKtBin][GetBin(nqbin, ilmzero, 0, ilmprim, 0)] += + for (int ilmzero = 0; ilmzero < kMaxJM; ilmzero++) { + for (int ilmprim = 0; ilmprim < kMaxJM; ilmprim++) { + fcovmden[fMultBin][fKtBin][getBin(nqbin, ilmzero, 0, ilmprim, 0)] += (real(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); - fcovmden[fMultBin][fKtBin][GetBin(nqbin, ilmzero, 0, ilmprim, 1)] += + fcovmden[fMultBin][fKtBin][getBin(nqbin, ilmzero, 0, ilmprim, 1)] += (real(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); - fcovmden[fMultBin][fKtBin][GetBin(nqbin, ilmzero, 1, ilmprim, 0)] += + fcovmden[fMultBin][fKtBin][getBin(nqbin, ilmzero, 1, ilmprim, 0)] += (-imag(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); - fcovmden[fMultBin][fKtBin][GetBin(nqbin, ilmzero, 1, ilmprim, 1)] += + fcovmden[fMultBin][fKtBin][getBin(nqbin, ilmzero, 1, ilmprim, 1)] += (-imag(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); } } @@ -329,93 +303,81 @@ class PairSHCentMultKt /// \param MaxJM Maximum value of J /// \param multval Multiplicity value /// \param ktval kT value - void PackCov(uint8_t ChosenEventType, int /*MaxJM*/, int multval, int ktval) + void packCov(uint8_t ChosenEventType, int /*MaxJM*/, int multval, int ktval) { int fMultBin = multval; int fKtBin = ktval; - if (ChosenEventType == femtoUniverseSHContainer::EventType::same) { + if (ChosenEventType == femto_universe_sh_container::EventType::same) { for (int ibin = 1; ibin <= fcovnum[0][0]->GetNbinsX(); ibin++) { - for (int ilmz = 0; ilmz < fMaxJM * 2; ilmz++) { - for (int ilmp = 0; ilmp < fMaxJM * 2; ilmp++) { - auto bin = GetBin(ibin - 1, ilmz / 2, ilmz % 2, ilmp / 2, ilmp % 2); + for (int ilmz = 0; ilmz < kMaxJM * 2; ilmz++) { + for (int ilmp = 0; ilmp < kMaxJM * 2; ilmp++) { + auto bin = getBin(ibin - 1, ilmz / 2, ilmz % 2, ilmp / 2, ilmp % 2); auto value = fcovmnum[fMultBin][fKtBin][bin]; - fcovnum[fMultBin][fKtBin]->SetBinContent(ibin, ilmz + 1, ilmp + 1, - value); + fcovnum[fMultBin][fKtBin]->SetBinContent(ibin, ilmz + 1, ilmp + 1, value); } } } - } else if (ChosenEventType == femtoUniverseSHContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_sh_container::EventType::mixed) { for (int ibin = 1; ibin <= fcovden[0][0]->GetNbinsX(); ibin++) { - for (int ilmz = 0; ilmz < fMaxJM * 2; ilmz++) { - for (int ilmp = 0; ilmp < fMaxJM * 2; ilmp++) { - auto bin = GetBin(ibin - 1, ilmz / 2, ilmz % 2, ilmp / 2, ilmp % 2); + for (int ilmz = 0; ilmz < kMaxJM * 2; ilmz++) { + for (int ilmp = 0; ilmp < kMaxJM * 2; ilmp++) { + auto bin = getBin(ibin - 1, ilmz / 2, ilmz % 2, ilmp / 2, ilmp % 2); auto value = fcovmden[fMultBin][fKtBin][bin]; - fcovden[fMultBin][fKtBin]->SetBinContent(ibin, ilmz + 1, ilmp + 1, - value); + fcovden[fMultBin][fKtBin]->SetBinContent(ibin, ilmz + 1, ilmp + 1, value); } } } } } - /// Function to acces each multiplicity and kT directory and call PackCov + /// Function to acces each multiplicity and kT directory and call packCov /// \param ChosenEventType same or mixed event /// \param MaxJM Maximum value of J - void fill_mult_kT_Cov(uint8_t ChosenEventType, int MaxJM) + void fillMultkTCov(uint8_t ChosenEventType, int MaxJM) { for (int multbinvalcov = 0; - multbinvalcov < static_cast(CentMultBins.size() - 2); + multbinvalcov < static_cast(centMultBins.size() - 2); multbinvalcov++) { for (int ktbinvalcov = 0; - ktbinvalcov < static_cast(KtBins.size() - 1); ktbinvalcov++) { - PackCov(ChosenEventType, MaxJM, multbinvalcov, ktbinvalcov); + ktbinvalcov < static_cast(ktBins.size() - 1); ktbinvalcov++) { + packCov(ChosenEventType, MaxJM, multbinvalcov, ktbinvalcov); } } } private: - std::array, 10>, 4>, 4> - fnumsreal{}; - std::array, 10>, 4>, 4> - fnumsimag{}; - std::array, 10>, 4>, 4> - fdensreal{}; - std::array, 10>, 4>, 4> - fdensimag{}; + std::array, 10>, 4>, 4> fnumsreal{}; + std::array, 10>, 4>, 4> fnumsimag{}; + std::array, 10>, 4>, 4> fdensreal{}; + std::array, 10>, 4>, 4> fdensimag{}; TH1D* fbinctn[10][10]; TH1D* fbinctd[10][10]; - static constexpr int fMaxL = 2; - static constexpr int fMaxJM = (fMaxL + 1) * (fMaxL + 1); + static constexpr int kMaxL = 2; + static constexpr int kMaxJM = (kMaxL + 1) * (kMaxL + 1); - std::array, 4>, 4> - fcovmnum{}; ///< Covariance matrix for the numerator - std::array, 4>, 4> - fcovmden{}; ///< Covariance matrix for the numerator + std::array, 4>, 4> fcovmnum{}; ///< Covariance matrix for the numerator + std::array, 4>, 4> fcovmden{}; ///< Covariance matrix for the numerator std::array, 4>, 4> fcovnum{}; std::array, 4>, 4> fcovden{}; protected: - HistogramRegistry* PairSHCentMultKtRegistry = nullptr; - static constexpr std::string_view mFolderSuffix[2] = { - "SameEvent", - "MixedEvent"}; ///< Folder naming for the output according to mEventType - static constexpr int mEventType = - eventType; ///< Type of the event (same/mixed, according to - ///< FEMTOUNIVERSESHCONTAINER::EventType) - float mMassOne = 0.f; ///< PDG mass of particle 1 - float mMassTwo = 0.f; ///< PDG mass of particle 2 - int mPDGOne = 0; ///< PDG code of particle 1 - int mPDGTwo = 0; ///< PDG code of particle 2 - std::vector CentMultBins; - std::vector KtBins; - std::vector KStarBins; - bool UseKt = false; - bool Use3D = false; + HistogramRegistry* pairSHCentMultKtRegistry = nullptr; + static constexpr std::string_view FolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to EventType + static constexpr int EventType = eventType; ///< Type of the event (same/mixed, according to FEMTOUNIVERSESHCONTAINER::EventType) + float mMassOne = 0.f; ///< PDG mass of particle 1 + float mMassTwo = 0.f; ///< PDG mass of particle 2 + int mPDGOne = 0; ///< PDG code of particle 1 + int mPDGTwo = 0; ///< PDG code of particle 2 + std::vector centMultBins; + std::vector ktBins; + std::vector kStarBins; + bool useKt = false; + bool use3D = false; }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPAIRSHCENTMULTKT_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniversePairWithCentMultKt.h b/PWGCF/FemtoUniverse/Core/FemtoUniversePairWithCentMultKt.h index 6b52d810d43..923242451b0 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniversePairWithCentMultKt.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniversePairWithCentMultKt.h @@ -8,26 +8,25 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +/// \file FemtoUniversePairWithCentMultKt.h +/// \brief FemtoUniversePairWithCentMultKt - Histogram class for tracks with centrality and multiplicity /// \author Deependra Sharma, IITB, deependra.sharma@cern.ch /// \author Alicja Płachta, WUT Warsaw, alicja.plachta.stud@pw.edu.pl +/// \author Zuzanna Chochulska, WUT Warsaw & CTU Prague, zchochul@cern.ch #ifndef PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPAIRWITHCENTMULTKT_H_ #define PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPAIRWITHCENTMULTKT_H_ #include -#include #include #include "Framework/HistogramRegistry.h" -using namespace o2; -using namespace o2::framework; - -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -class PairWithCentMultKt +class FemtoUniversePairWithCentMultKt { public: - virtual ~PairWithCentMultKt() = default; + virtual ~FemtoUniversePairWithCentMultKt() = default; /// @brief /// @tparam t1 /// @param registry @@ -36,65 +35,65 @@ class PairWithCentMultKt template void init(HistogramRegistry* registry, t1& kstarbins, t1& centmultbins, t1& ktbins, bool processKT, bool process3D) { - PairWithCentMultKtRegistry = registry; + pairWithCentMultKtRegistry = registry; AxisSpec kstarAxis = {kstarbins, "#it{k*} (GeV/#it{c})"}; AxisSpec kOutAxis = {kstarbins, "#it{q}_{out} (GeV/#it{c})"}; AxisSpec kSideAxis = {kstarbins, "#it{q}_{side} (GeV/#it{c})"}; AxisSpec kLongAxis = {kstarbins, "#it{q}_{long} (GeV/#it{c})"}; - CentMultBins = centmultbins; - KtBins = ktbins; - KtBins.erase(KtBins.begin()); - CentMultBins.erase(CentMultBins.begin()); - UseKt = processKT; - Use3D = process3D; + centMultBins = centmultbins; + ktBins = ktbins; + ktBins.erase(ktBins.begin()); + centMultBins.erase(centMultBins.begin()); + useKt = processKT; + use3D = process3D; - for (int i = 0; i < static_cast(CentMultBins.size() - 1); i++) { - int lowBin = static_cast((CentMultBins[i])); - int highBin = static_cast((CentMultBins[i + 1])); - std::string HistTitle = "mult_" + std::to_string(lowBin) + "-" + std::to_string(highBin); - std::string HistSuffix1 = static_cast(HistSuffix[i]); - std::string HistSuffix2 = static_cast(HistSuffix[i + 1]); - std::cout << "HistSuffix1 " << HistSuffix1 << " HistSuffix2 " << HistSuffix2 << std::endl; - std::string HistFolderMult = "mult_" + HistSuffix1 + "_" + HistSuffix2; - std::string HistName = HistFolderMult + "/kstar"; - std::string HistName3D = HistFolderMult + "/q3D"; - PairWithCentMultKtRegistry->add(HistName.c_str(), HistTitle.c_str(), HistType::kTH1F, {kstarAxis}); - PairWithCentMultKtRegistry->add(HistName3D.c_str(), HistTitle.c_str(), HistType::kTH3F, {kOutAxis, kSideAxis, kLongAxis}); - if (UseKt) { - for (int i = 0; i < static_cast(KtBins.size() - 1); i++) { - std::string kt_bin1_string = std::to_string(KtBins[i]); - std::replace(kt_bin1_string.begin(), kt_bin1_string.end(), '.', '_'); - std::string kt_bin2_string = std::to_string(KtBins[i + 1]); - std::replace(kt_bin2_string.begin(), kt_bin2_string.end(), '.', '_'); - kt_bin1_string.resize(4); - kt_bin2_string.resize(4); - std::string HistTitleKt = "kt_" + kt_bin1_string + "-" + kt_bin2_string; - std::string HistSuffix1Kt = static_cast(HistSuffix[i]); - std::string HistSuffix2Kt = static_cast(HistSuffix[i + 1]); - std::string HistNameKt = HistFolderMult + "/kstar_kt_" + HistSuffix1Kt + "_" + HistSuffix2Kt; - std::cout << "HistNameKt " << HistNameKt << std::endl; - PairWithCentMultKtRegistry->add(HistNameKt.c_str(), HistTitleKt.c_str(), HistType::kTH1F, {kstarAxis}); + for (int i = 0; i < static_cast(centMultBins.size() - 1); i++) { + int lowBin = static_cast((centMultBins[i])); + int highBin = static_cast((centMultBins[i + 1])); + std::string histTitle = "mult_" + std::to_string(lowBin) + "-" + std::to_string(highBin); + std::string histSuffix1 = static_cast(HistSuffix[i]); + std::string histSuffix2 = static_cast(HistSuffix[i + 1]); + LOGF(info, "histSuffix1 %s histSuffix2", histSuffix1, histSuffix2); + std::string histFolderMult = "mult_" + histSuffix1 + "_" + histSuffix2; + std::string histName = histFolderMult + "/kstar"; + std::string histName3D = histFolderMult + "/q3D"; + pairWithCentMultKtRegistry->add(histName.c_str(), histTitle.c_str(), HistType::kTH1F, {kstarAxis}); + pairWithCentMultKtRegistry->add(histName3D.c_str(), histTitle.c_str(), HistType::kTH3F, {kOutAxis, kSideAxis, kLongAxis}); + if (useKt) { + for (int i = 0; i < static_cast(ktBins.size() - 1); i++) { + std::string ktBin1String = std::to_string(ktBins[i]); + std::replace(ktBin1String.begin(), ktBin1String.end(), '.', '_'); + std::string ktBin2String = std::to_string(ktBins[i + 1]); + std::replace(ktBin2String.begin(), ktBin2String.end(), '.', '_'); + ktBin1String.resize(4); + ktBin2String.resize(4); + std::string histTitleKt = "kt_" + ktBin1String + "-" + ktBin2String; + std::string histSuffix1Kt = static_cast(HistSuffix[i]); + std::string histSuffix2Kt = static_cast(HistSuffix[i + 1]); + std::string histNameKt = histFolderMult + "/kstar_kt_" + histSuffix1Kt + "_" + histSuffix2Kt; + LOGF(info, "histNameKt %s", histNameKt); + pairWithCentMultKtRegistry->add(histNameKt.c_str(), histTitleKt.c_str(), HistType::kTH1F, {kstarAxis}); } } - if (Use3D) { - for (int i = 0; i < static_cast(KtBins.size() - 1); i++) { - std::string kt_bin1_string = std::to_string(KtBins[i]); - std::replace(kt_bin1_string.begin(), kt_bin1_string.end(), '.', '_'); - std::string kt_bin2_string = std::to_string(KtBins[i + 1]); - std::replace(kt_bin2_string.begin(), kt_bin2_string.end(), '.', '_'); - kt_bin1_string.resize(4); - kt_bin2_string.resize(4); - std::string HistTitleKt = "kt_" + kt_bin1_string + "-" + kt_bin2_string; - std::string HistSuffix1Kt = static_cast(HistSuffix[i]); - std::string HistSuffix2Kt = static_cast(HistSuffix[i + 1]); - std::string HistNameKt = HistFolderMult + "/q3D_kt_" + HistSuffix1Kt + "_" + HistSuffix2Kt; - std::cout << "HistNameKt " << HistNameKt << std::endl; - PairWithCentMultKtRegistry->add(HistNameKt.c_str(), HistTitleKt.c_str(), HistType::kTH3F, {kOutAxis, kSideAxis, kLongAxis}); + if (use3D) { + for (int i = 0; i < static_cast(ktBins.size() - 1); i++) { + std::string ktBin1String = std::to_string(ktBins[i]); + std::replace(ktBin1String.begin(), ktBin1String.end(), '.', '_'); + std::string ktBin2String = std::to_string(ktBins[i + 1]); + std::replace(ktBin2String.begin(), ktBin2String.end(), '.', '_'); + ktBin1String.resize(4); + ktBin2String.resize(4); + std::string histTitleKt = "kt_" + ktBin1String + "-" + ktBin2String; + std::string histSuffix1Kt = static_cast(HistSuffix[i]); + std::string histSuffix2Kt = static_cast(HistSuffix[i + 1]); + std::string histNameKt = histFolderMult + "/q3D_kt_" + histSuffix1Kt + "_" + histSuffix2Kt; + LOGF(info, "histNameKt %s", histNameKt); + pairWithCentMultKtRegistry->add(histNameKt.c_str(), histTitleKt.c_str(), HistType::kTH3F, {kOutAxis, kSideAxis, kLongAxis}); } } } - PairWithCentMultKtRegistry->add("Beyond_Max", "Beyond_Max", HistType::kTH1F, {kstarAxis}); - PairWithCentMultKtRegistry->add("Beyond_Max_3D", "Beyond_Max_3D", HistType::kTH3F, {kOutAxis, kSideAxis, kLongAxis}); + pairWithCentMultKtRegistry->add("Beyond_Max", "Beyond_Max", HistType::kTH1F, {kstarAxis}); + pairWithCentMultKtRegistry->add("Beyond_Max_3D", "Beyond_Max_3D", HistType::kTH3F, {kOutAxis, kSideAxis, kLongAxis}); } /// @brief @@ -105,61 +104,61 @@ class PairWithCentMultKt void fill(t1 kstar_value, t1 cent_mult_value, t1 kt_value) { - if (cent_mult_value >= CentMultBins[CentMultBins.size() - 1] || cent_mult_value < CentMultBins[0]) { - PairWithCentMultKtRegistry->fill(HIST("Beyond_Max"), kstar_value); - } else if (cent_mult_value < CentMultBins[1]) { - PairWithCentMultKtRegistry->fill(HIST("mult_0_1/kstar"), kstar_value); - if (UseKt) { + if (cent_mult_value >= centMultBins[centMultBins.size() - 1] || cent_mult_value < centMultBins[0]) { + pairWithCentMultKtRegistry->fill(HIST("Beyond_Max"), kstar_value); + } else if (cent_mult_value < centMultBins[1]) { + pairWithCentMultKtRegistry->fill(HIST("mult_0_1/kstar"), kstar_value); + if (useKt) { auto histMultFolder = HIST("mult_0_1/"); - fill_kT(kstar_value, kt_value, histMultFolder); + fillkT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[2]) { - PairWithCentMultKtRegistry->fill(HIST("mult_1_2/kstar"), kstar_value); - if (UseKt) { + } else if (cent_mult_value < centMultBins[2]) { + pairWithCentMultKtRegistry->fill(HIST("mult_1_2/kstar"), kstar_value); + if (useKt) { auto histMultFolder = HIST("mult_1_2/"); - fill_kT(kstar_value, kt_value, histMultFolder); + fillkT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[3]) { - PairWithCentMultKtRegistry->fill(HIST("mult_2_3/kstar"), kstar_value); - if (UseKt) { + } else if (cent_mult_value < centMultBins[3]) { + pairWithCentMultKtRegistry->fill(HIST("mult_2_3/kstar"), kstar_value); + if (useKt) { auto histMultFolder = HIST("mult_2_3/"); - fill_kT(kstar_value, kt_value, histMultFolder); + fillkT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[4]) { - PairWithCentMultKtRegistry->fill(HIST("mult_3_4/kstar"), kstar_value); - if (UseKt) { + } else if (cent_mult_value < centMultBins[4]) { + pairWithCentMultKtRegistry->fill(HIST("mult_3_4/kstar"), kstar_value); + if (useKt) { auto histMultFolder = HIST("mult_3_4/"); - fill_kT(kstar_value, kt_value, histMultFolder); + fillkT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[5]) { - PairWithCentMultKtRegistry->fill(HIST("mult_4_5/kstar"), kstar_value); - if (UseKt) { + } else if (cent_mult_value < centMultBins[5]) { + pairWithCentMultKtRegistry->fill(HIST("mult_4_5/kstar"), kstar_value); + if (useKt) { auto histMultFolder = HIST("mult_4_5/"); - fill_kT(kstar_value, kt_value, histMultFolder); + fillkT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[6]) { - PairWithCentMultKtRegistry->fill(HIST("mult_5_6/kstar"), kstar_value); - if (UseKt) { + } else if (cent_mult_value < centMultBins[6]) { + pairWithCentMultKtRegistry->fill(HIST("mult_5_6/kstar"), kstar_value); + if (useKt) { auto histMultFolder = HIST("mult_5_6/"); - fill_kT(kstar_value, kt_value, histMultFolder); + fillkT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[7]) { - PairWithCentMultKtRegistry->fill(HIST("mult_6_7/kstar"), kstar_value); - if (UseKt) { + } else if (cent_mult_value < centMultBins[7]) { + pairWithCentMultKtRegistry->fill(HIST("mult_6_7/kstar"), kstar_value); + if (useKt) { auto histMultFolder = HIST("mult_6_7/"); - fill_kT(kstar_value, kt_value, histMultFolder); + fillkT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[8]) { - PairWithCentMultKtRegistry->fill(HIST("mult_7_8/kstar"), kstar_value); - if (UseKt) { + } else if (cent_mult_value < centMultBins[8]) { + pairWithCentMultKtRegistry->fill(HIST("mult_7_8/kstar"), kstar_value); + if (useKt) { auto histMultFolder = HIST("mult_7_8/"); - fill_kT(kstar_value, kt_value, histMultFolder); + fillkT(kstar_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[9]) { - PairWithCentMultKtRegistry->fill(HIST("mult_8_9/kstar"), kstar_value); - if (UseKt) { + } else if (cent_mult_value < centMultBins[9]) { + pairWithCentMultKtRegistry->fill(HIST("mult_8_9/kstar"), kstar_value); + if (useKt) { auto histMultFolder = HIST("mult_8_9/"); - fill_kT(kstar_value, kt_value, histMultFolder); + fillkT(kstar_value, kt_value, histMultFolder); } } } @@ -171,26 +170,26 @@ class PairWithCentMultKt /// @param kt_value /// @param folder template - void fill_kT(t1 kstar_value, t1 kt_value, t2 folder) + void fillkT(t1 kstar_value, t1 kt_value, t2 folder) { - if (kt_value < KtBins[1]) { - PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_0_1"), kstar_value); - } else if (kt_value < KtBins[2]) { - PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_1_2"), kstar_value); - } else if (kt_value < KtBins[3]) { - PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_2_3"), kstar_value); - } else if (kt_value < KtBins[4]) { - PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_3_4"), kstar_value); - } else if (kt_value < KtBins[5]) { - PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_4_5"), kstar_value); - } else if (kt_value < KtBins[6]) { - PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_5_6"), kstar_value); - } else if (kt_value < KtBins[7]) { - PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_6_7"), kstar_value); - } else if (kt_value < KtBins[8]) { - PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_7_8"), kstar_value); - } else if (kt_value < KtBins[9]) { - PairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_8_9"), kstar_value); + if (kt_value < ktBins[1]) { + pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_0_1"), kstar_value); + } else if (kt_value < ktBins[2]) { + pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_1_2"), kstar_value); + } else if (kt_value < ktBins[3]) { + pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_2_3"), kstar_value); + } else if (kt_value < ktBins[4]) { + pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_3_4"), kstar_value); + } else if (kt_value < ktBins[5]) { + pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_4_5"), kstar_value); + } else if (kt_value < ktBins[6]) { + pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_5_6"), kstar_value); + } else if (kt_value < ktBins[7]) { + pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_6_7"), kstar_value); + } else if (kt_value < ktBins[8]) { + pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_7_8"), kstar_value); + } else if (kt_value < ktBins[9]) { + pairWithCentMultKtRegistry->fill(folder + HIST("kstar_kt_8_9"), kstar_value); } } @@ -201,64 +200,64 @@ class PairWithCentMultKt /// @param qlong_value /// @param cent_mult_value template - void fill_3D(t1 qout_value, t1 qside_value, t1 qlong_value, t1 cent_mult_value, t1 kt_value) + void fill3D(t1 qout_value, t1 qside_value, t1 qlong_value, t1 cent_mult_value, t1 kt_value) { - if (cent_mult_value >= CentMultBins[CentMultBins.size() - 1] || cent_mult_value < CentMultBins[0]) { - PairWithCentMultKtRegistry->fill(HIST("Beyond_Max_3D"), qout_value, qside_value, qlong_value); - } else if (cent_mult_value < CentMultBins[1]) { - PairWithCentMultKtRegistry->fill(HIST("mult_0_1/q3D"), qout_value, qside_value, qlong_value); - if (Use3D) { + if (cent_mult_value >= centMultBins[centMultBins.size() - 1] || cent_mult_value < centMultBins[0]) { + pairWithCentMultKtRegistry->fill(HIST("Beyond_Max_3D"), qout_value, qside_value, qlong_value); + } else if (cent_mult_value < centMultBins[1]) { + pairWithCentMultKtRegistry->fill(HIST("mult_0_1/q3D"), qout_value, qside_value, qlong_value); + if (use3D) { auto histMultFolder = HIST("mult_0_1/"); - fill_kT_3d(qout_value, qside_value, qlong_value, kt_value, histMultFolder); + fillkT3D(qout_value, qside_value, qlong_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[2]) { - // PairWithCentMultKtRegistry->fill(HIST("mult_1_2/q3D"), qout_value, qside_value, qlong_value); - if (Use3D) { + } else if (cent_mult_value < centMultBins[2]) { + // pairWithCentMultKtRegistry->fill(HIST("mult_1_2/q3D"), qout_value, qside_value, qlong_value); + if (use3D) { auto histMultFolder = HIST("mult_1_2/"); - fill_kT_3d(qout_value, qside_value, qlong_value, kt_value, histMultFolder); + fillkT3D(qout_value, qside_value, qlong_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[3]) { - // PairWithCentMultKtRegistry->fill(HIST("mult_2_3/q3D"), qout_value, qside_value, qlong_value); - if (Use3D) { + } else if (cent_mult_value < centMultBins[3]) { + // pairWithCentMultKtRegistry->fill(HIST("mult_2_3/q3D"), qout_value, qside_value, qlong_value); + if (use3D) { auto histMultFolder = HIST("mult_2_3/"); - fill_kT_3d(qout_value, qside_value, qlong_value, kt_value, histMultFolder); + fillkT3D(qout_value, qside_value, qlong_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[4]) { - // PairWithCentMultKtRegistry->fill(HIST("mult_3_4/q3D"), qout_value, qside_value, qlong_value); - if (Use3D) { + } else if (cent_mult_value < centMultBins[4]) { + // pairWithCentMultKtRegistry->fill(HIST("mult_3_4/q3D"), qout_value, qside_value, qlong_value); + if (use3D) { auto histMultFolder = HIST("mult_3_4/"); - fill_kT_3d(qout_value, qside_value, qlong_value, kt_value, histMultFolder); + fillkT3D(qout_value, qside_value, qlong_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[5]) { - // PairWithCentMultKtRegistry->fill(HIST("mult_4_5/q3D"), qout_value, qside_value, qlong_value); - if (Use3D) { + } else if (cent_mult_value < centMultBins[5]) { + // pairWithCentMultKtRegistry->fill(HIST("mult_4_5/q3D"), qout_value, qside_value, qlong_value); + if (use3D) { auto histMultFolder = HIST("mult_4_5/"); - fill_kT_3d(qout_value, qside_value, qlong_value, kt_value, histMultFolder); + fillkT3D(qout_value, qside_value, qlong_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[6]) { - // PairWithCentMultKtRegistry->fill(HIST("mult_5_6/q3D"), qout_value, qside_value, qlong_value); - if (Use3D) { + } else if (cent_mult_value < centMultBins[6]) { + // pairWithCentMultKtRegistry->fill(HIST("mult_5_6/q3D"), qout_value, qside_value, qlong_value); + if (use3D) { auto histMultFolder = HIST("mult_5_6/"); - fill_kT_3d(qout_value, qside_value, qlong_value, kt_value, histMultFolder); + fillkT3D(qout_value, qside_value, qlong_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[7]) { - // PairWithCentMultKtRegistry->fill(HIST("mult_6_7/q3D"), qout_value, qside_value, qlong_value); - if (Use3D) { + } else if (cent_mult_value < centMultBins[7]) { + // pairWithCentMultKtRegistry->fill(HIST("mult_6_7/q3D"), qout_value, qside_value, qlong_value); + if (use3D) { auto histMultFolder = HIST("mult_6_7/"); - fill_kT_3d(qout_value, qside_value, qlong_value, kt_value, histMultFolder); + fillkT3D(qout_value, qside_value, qlong_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[8]) { - // PairWithCentMultKtRegistry->fill(HIST("mult_7_8/q3D"), qout_value, qside_value, qlong_value); - if (Use3D) { + } else if (cent_mult_value < centMultBins[8]) { + // pairWithCentMultKtRegistry->fill(HIST("mult_7_8/q3D"), qout_value, qside_value, qlong_value); + if (use3D) { auto histMultFolder = HIST("mult_7_8/"); - fill_kT_3d(qout_value, qside_value, qlong_value, kt_value, histMultFolder); + fillkT3D(qout_value, qside_value, qlong_value, kt_value, histMultFolder); } - } else if (cent_mult_value < CentMultBins[9]) { - // PairWithCentMultKtRegistry->fill(HIST("mult_8_9/q3D"), qout_value, qside_value, qlong_value); - if (Use3D) { + } else if (cent_mult_value < centMultBins[9]) { + // pairWithCentMultKtRegistry->fill(HIST("mult_8_9/q3D"), qout_value, qside_value, qlong_value); + if (use3D) { auto histMultFolder = HIST("mult_8_9/"); - fill_kT_3d(qout_value, qside_value, qlong_value, kt_value, histMultFolder); + fillkT3D(qout_value, qside_value, qlong_value, kt_value, histMultFolder); } } } @@ -271,25 +270,25 @@ class PairWithCentMultKt /// @param qlong_value /// @param folder template - void fill_kT_3d(t1 qout_value, t1 qside_value, t1 qlong_value, t1 kt_value, t2 folder) + void fillkT3D(t1 qout_value, t1 qside_value, t1 qlong_value, t1 kt_value, t2 folder) { - if (kt_value < KtBins[1]) { - PairWithCentMultKtRegistry->fill(folder + HIST("q3D_kt_0_1"), qout_value, qside_value, qlong_value); - } else if (kt_value < KtBins[2]) { - PairWithCentMultKtRegistry->fill(folder + HIST("q3D_kt_1_2"), qout_value, qside_value, qlong_value); - } else if (kt_value < KtBins[3]) { - PairWithCentMultKtRegistry->fill(folder + HIST("q3D_kt_2_3"), qout_value, qside_value, qlong_value); + if (kt_value < ktBins[1]) { + pairWithCentMultKtRegistry->fill(folder + HIST("q3D_kt_0_1"), qout_value, qside_value, qlong_value); + } else if (kt_value < ktBins[2]) { + pairWithCentMultKtRegistry->fill(folder + HIST("q3D_kt_1_2"), qout_value, qside_value, qlong_value); + } else if (kt_value < ktBins[3]) { + pairWithCentMultKtRegistry->fill(folder + HIST("q3D_kt_2_3"), qout_value, qside_value, qlong_value); } } protected: - HistogramRegistry* PairWithCentMultKtRegistry = nullptr; - std::vector CentMultBins; - std::vector KtBins; - bool UseKt = false; - bool Use3D = false; + HistogramRegistry* pairWithCentMultKtRegistry = nullptr; + std::vector centMultBins; + std::vector ktBins; + bool useKt = false; + bool use3D = false; static constexpr std::string_view HistSuffix[10] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}; }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPAIRWITHCENTMULTKT_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h index 81572be5cbb..fd64d685416 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h @@ -28,7 +28,7 @@ using namespace o2::framework; // o2-linter: disable=using-directive -namespace o2::analysis::femtoUniverse // o2-linter: disable=name/namespace +namespace o2::analysis::femto_universe // o2-linter: disable=name/namespace { /// \class FemtoUniverseParticleHisto @@ -50,10 +50,10 @@ class FemtoUniverseParticleHisto /// \param tempFitVarAxisTitle Title of the axis of the tempFitVar (DCA_xy in case of tracks, CPA in case of V0s, etc.) /// \param tempFitVarpTAxis axis object for the pT axis in the pT vs. tempFitVar plots /// \param tempFitVarAxis axis object for the tempFitVar axis - template + template void init_base(std::string folderName, std::string tempFitVarAxisTitle, T& tempFitVarpTAxis, T& tempFitVarAxis) // o2-linter: disable=name/function-variable { - std::string folderSuffix = static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[mc]).c_str(); + std::string folderSuffix = static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]).c_str(); /// Histograms of the kinematic properties mHistogramRegistry->add((folderName + folderSuffix + "/hPt").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {{240, 0, 6}}); mHistogramRegistry->add((folderName + folderSuffix + "/hEta").c_str(), "; #eta; Entries", kTH1F, {{200, -1.5, 1.5}}); @@ -61,16 +61,16 @@ class FemtoUniverseParticleHisto mHistogramRegistry->add((folderName + folderSuffix + "/hPhiEta").c_str(), "; #phi; #eta", kTH2F, {{200, 0, o2::constants::math::TwoPI}, {200, -1.5, 1.5}}); /// particle specific histogramms for the TempFitVar column in FemtoUniverseParticles - if constexpr (o2::aod::femtouniverseMCparticle::MCType::kRecon == mc) { + if constexpr (o2::aod::femtouniverse_mc_particle::MCType::kRecon == mc) { mHistogramRegistry->add((folderName + folderSuffix + static_cast(o2::aod::femtouniverseparticle::TempFitVarName[mParticleType])).c_str(), ("; #it{p}_{T} (GeV/#it{c}); " + tempFitVarAxisTitle).c_str(), kTH2F, {{tempFitVarpTAxis}, {tempFitVarAxis}}); } } // comment - template + template void init_debug(std::string folderName) // o2-linter: disable=name/function-variable { - std::string folderSuffix = static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[mc]).c_str(); + std::string folderSuffix = static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]).c_str(); if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { mHistogramRegistry->add((folderName + folderSuffix + "/hCharge").c_str(), "; Charge; Entries", kTH1F, {{5, -2.5, 2.5}}); mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfindable").c_str(), "; TPC findable clusters; Entries", kTH1F, {{163, -0.5, 162.5}}); @@ -130,7 +130,7 @@ class FemtoUniverseParticleHisto void init_MC(std::string folderName, std::string /*tempFitVarAxisTitle*/, T& tempFitVarpTAxis, T& tempFitVarAxis) // o2-linter: disable=name/function-variable { /// Particle-type specific histograms - std::string folderSuffix = static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kTruth]).c_str(); + std::string folderSuffix = static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kTruth]).c_str(); mHistogramRegistry->add((folderName + folderSuffix + "/hPt_ReconNoFake").c_str(), "; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F, {{240, 0, 6}}); @@ -206,12 +206,12 @@ class FemtoUniverseParticleHisto std::string folderName = flexibleFolder.value_or((static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[mParticleType]) + static_cast(mFolderSuffix[mFolderSuffixType]))); // Fill here the actual histogramms by calling init_base and init_MC - init_base(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); + init_base(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); if (isDebug) { - init_debug(folderName); + init_debug(folderName); } if (isMC) { - init_base(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); + init_base(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); init_MC(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis); } } @@ -221,70 +221,70 @@ class FemtoUniverseParticleHisto /// Called by init both in case of reconstructed data/ Monte Carlo, and for Monte Carlo Truth /// \tparam T Data type of the particle /// \param part Particle - template + template void fillQA_base(T const& part, H const& histFolder) // o2-linter: disable=name/function-variable { /// Histograms of the kinematic properties - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hPt"), part.pt()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hEta"), part.eta()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hPhi"), part.phi()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hPhiEta"), part.phi(), part.eta()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hPt"), part.pt()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hEta"), part.eta()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hPhi"), part.phi()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hPhiEta"), part.phi(), part.eta()); /// particle specific histogramms for the TempFitVar column in FemtoUniverseParticles - if constexpr (mc == o2::aod::femtouniverseMCparticle::MCType::kRecon) { - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST(o2::aod::femtouniverseparticle::TempFitVarName[mParticleType]), part.pt(), part.tempFitVar()); + if constexpr (mc == o2::aod::femtouniverse_mc_particle::MCType::kRecon) { + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST(o2::aod::femtouniverseparticle::TempFitVarName[mParticleType]), part.pt(), part.tempFitVar()); } } - template + template void fillQA_debug(T const& part, H const& histFolder) // o2-linter: disable=name/function-variable { // Histograms holding further debug information if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hCharge"), part.sign()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hTPCfindable"), part.tpcNClsFindable()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hTPCfound"), part.tpcNClsFound()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hTPCcrossedOverFindable"), part.tpcCrossedRowsOverFindableCls()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hTPCcrossedRows"), part.tpcNClsCrossedRows()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hTPCfindableVsCrossed"), part.tpcNClsFindable(), part.tpcNClsCrossedRows()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hTPCshared"), part.tpcNClsShared()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hITSclusters"), part.itsNCls()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hITSclustersIB"), part.itsNClsInnerBarrel()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDCAz"), part.pt(), part.dcaZ()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDCA"), part.pt(), std::sqrt(std::pow(part.dcaXY(), 2.) + std::pow(part.dcaZ(), 2.))); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hTPCdEdX"), part.p(), part.tpcSignal()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTPC_el"), part.p(), part.tpcNSigmaEl()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTPC_pi"), part.p(), part.tpcNSigmaPi()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTPC_K"), part.p(), part.tpcNSigmaKa()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTPC_p"), part.p(), part.tpcNSigmaPr()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTPC_d"), part.p(), part.tpcNSigmaDe()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTOF_el"), part.p(), part.tofNSigmaEl()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTOF_pi"), part.p(), part.tofNSigmaPi()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTOF_K"), part.p(), part.tofNSigmaKa()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTOF_p"), part.p(), part.tofNSigmaPr()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaTOF_d"), part.p(), part.tofNSigmaDe()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaComb_el"), part.p(), std::sqrt(part.tpcNSigmaEl() * part.tpcNSigmaEl() + part.tofNSigmaEl() * part.tofNSigmaEl())); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaComb_pi"), part.p(), std::sqrt(part.tpcNSigmaPi() * part.tpcNSigmaPi() + part.tofNSigmaPi() * part.tofNSigmaPi())); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaComb_K"), part.p(), std::sqrt(part.tpcNSigmaKa() * part.tpcNSigmaKa() + part.tofNSigmaKa() * part.tofNSigmaKa())); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaComb_p"), part.p(), std::sqrt(part.tpcNSigmaPr() * part.tpcNSigmaPr() + part.tofNSigmaPr() * part.tofNSigmaPr())); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/nSigmaComb_d"), part.p(), std::sqrt(part.tpcNSigmaDe() * part.tpcNSigmaDe() + part.tofNSigmaDe() * part.tofNSigmaDe())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hCharge"), part.sign()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfindable"), part.tpcNClsFindable()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfound"), part.tpcNClsFound()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCcrossedOverFindable"), part.tpcCrossedRowsOverFindableCls()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCcrossedRows"), part.tpcNClsCrossedRows()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfindableVsCrossed"), part.tpcNClsFindable(), part.tpcNClsCrossedRows()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCshared"), part.tpcNClsShared()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hITSclusters"), part.itsNCls()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hITSclustersIB"), part.itsNClsInnerBarrel()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDCAz"), part.pt(), part.dcaZ()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDCA"), part.pt(), std::sqrt(std::pow(part.dcaXY(), 2.) + std::pow(part.dcaZ(), 2.))); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCdEdX"), part.p(), part.tpcSignal()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_el"), part.p(), part.tpcNSigmaEl()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_pi"), part.p(), part.tpcNSigmaPi()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_K"), part.p(), part.tpcNSigmaKa()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_p"), part.p(), part.tpcNSigmaPr()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTPC_d"), part.p(), part.tpcNSigmaDe()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_el"), part.p(), part.tofNSigmaEl()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_pi"), part.p(), part.tofNSigmaPi()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_K"), part.p(), part.tofNSigmaKa()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_p"), part.p(), part.tofNSigmaPr()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaTOF_d"), part.p(), part.tofNSigmaDe()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_el"), part.p(), std::sqrt(part.tpcNSigmaEl() * part.tpcNSigmaEl() + part.tofNSigmaEl() * part.tofNSigmaEl())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_pi"), part.p(), std::sqrt(part.tpcNSigmaPi() * part.tpcNSigmaPi() + part.tofNSigmaPi() * part.tofNSigmaPi())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_K"), part.p(), std::sqrt(part.tpcNSigmaKa() * part.tpcNSigmaKa() + part.tofNSigmaKa() * part.tofNSigmaKa())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_p"), part.p(), std::sqrt(part.tpcNSigmaPr() * part.tpcNSigmaPr() + part.tofNSigmaPr() * part.tofNSigmaPr())); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/nSigmaComb_d"), part.p(), std::sqrt(part.tpcNSigmaDe() * part.tpcNSigmaDe() + part.tofNSigmaDe() * part.tofNSigmaDe())); } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0) { - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDaughDCA"), part.daughDCA()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hTransRadius"), part.transRadius()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDecayVtxX"), part.decayVtxX()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDecayVtxY"), part.decayVtxY()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDecayVtxZ"), part.decayVtxZ()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hInvMassLambda"), part.mLambda()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hInvMassAntiLambda"), part.mAntiLambda()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hInvMassLambdaAntiLambda"), part.mLambda(), part.mAntiLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDaughDCA"), part.daughDCA()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTransRadius"), part.transRadius()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxX"), part.decayVtxX()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxY"), part.decayVtxY()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxZ"), part.decayVtxZ()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassLambda"), part.mLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassAntiLambda"), part.mAntiLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassLambdaAntiLambda"), part.mLambda(), part.mAntiLambda()); } else if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDaughDCA"), part.daughDCA()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hTransRadius"), part.transRadius()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDecayVtxX"), part.decayVtxX()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDecayVtxY"), part.decayVtxY()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hDecayVtxZ"), part.decayVtxZ()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hInvMassCascade"), part.mLambda()); - mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/hInvMassAntiCascade"), part.mAntiLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDaughDCA"), part.daughDCA()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTransRadius"), part.transRadius()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxX"), part.decayVtxX()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxY"), part.decayVtxY()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDecayVtxZ"), part.decayVtxZ()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassCascade"), part.mLambda()); + mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hInvMassAntiCascade"), part.mAntiLambda()); } } @@ -309,27 +309,27 @@ class FemtoUniverseParticleHisto if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) { /// Track histograms switch (mctruthorigin) { - case (o2::aod::femtouniverseMCparticle::kPrimary): + case (o2::aod::femtouniverse_mc_particle::kPrimary): mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Primary"), part.pt(), part.tempFitVar()); break; - case (o2::aod::femtouniverseMCparticle::kDaughter): + case (o2::aod::femtouniverse_mc_particle::kDaughter): mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Daughter"), part.pt(), part.tempFitVar()); break; - case (o2::aod::femtouniverseMCparticle::kMaterial): + case (o2::aod::femtouniverse_mc_particle::kMaterial): mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Material"), part.pt(), part.tempFitVar()); break; - case (o2::aod::femtouniverseMCparticle::kFake): + case (o2::aod::femtouniverse_mc_particle::kFake): mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_Fake"), part.pt(), part.tempFitVar()); break; - case (o2::aod::femtouniverseMCparticle::kDaughterLambda): + case (o2::aod::femtouniverse_mc_particle::kDaughterLambda): mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterLambda"), part.pt(), part.tempFitVar()); break; - case (o2::aod::femtouniverseMCparticle::kDaughterSigmaplus): + case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaplus): mHistogramRegistry->fill(histFolder + HIST("_MC/hDCAxy_DaughterSigmaplus"), part.pt(), part.tempFitVar()); break; @@ -367,13 +367,13 @@ class FemtoUniverseParticleHisto { std::string tempFitVarName; if (mHistogramRegistry) { - fillQA_base(part, histFolder); + fillQA_base(part, histFolder); if constexpr (isDebug) { - fillQA_debug(part, histFolder); + fillQA_debug(part, histFolder); } if constexpr (isMC) { if (part.has_fdMCParticle()) { - fillQA_base(part.fdMCParticle(), histFolder); + fillQA_base(part.fdMCParticle(), histFolder); fillQA_MC(part, (part.fdMCParticle()).partOriginMCTruth(), (part.fdMCParticle()).pdgMCTruth(), histFolder); } else { mHistogramRegistry->fill(histFolder + HIST("_MC/hNoMCtruthCounter"), 0); @@ -389,6 +389,6 @@ class FemtoUniverseParticleHisto static constexpr std::string_view mFolderSuffix[5] = {"", "_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 int mPDG = 0; ///< PDG code of the selected particle }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPARTICLEHISTO_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniversePhiSelection.h b/PWGCF/FemtoUniverse/Core/FemtoUniversePhiSelection.h index d18988be907..2794bd96e80 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniversePhiSelection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniversePhiSelection.h @@ -19,12 +19,9 @@ #ifndef PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPHISELECTION_H_ #define PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPHISELECTION_H_ -#include #include #include -#include // FIXME - #include "PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" @@ -34,11 +31,9 @@ #include "ReconstructionDataFormats/PID.h" #include "TLorentzVector.h" -using namespace o2::framework; - -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -namespace femtoUniversePhiSelection +namespace femto_universe_phi_selection { /// The different selections this task is capable of doing enum PhiSel { @@ -62,18 +57,18 @@ enum PhiContainerPosition { kPosPID, kNegCuts, kNegPID, -}; /// Position in the full VO cut container +}; /// Position in the full Phi cut container -} // namespace femtoUniversePhiSelection +} // namespace femto_universe_phi_selection /// \class FemtoUniversePhiSelection /// \brief Cut class to contain and execute all cuts applied to Phis class FemtoUniversePhiSelection - : public FemtoUniverseObjectSelection + : public FemtoUniverseObjectSelection { public: FemtoUniversePhiSelection() - : nPtPhiMinSel(0), nPtPhiMaxSel(0), nEtaPhiMaxSel(0), nDCAPhiDaughMax(0), nCPAPhiMin(0), nTranRadPhiMin(0), nTranRadPhiMax(0), nDecVtxMax(0), pTPhiMin(9999999.), pTPhiMax(-9999999.), etaPhiMax(-9999999.), DCAPhiDaughMax(-9999999.), CPAPhiMin(9999999.), TranRadPhiMin(9999999.), TranRadPhiMax(-9999999.), DecVtxMax(-9999999.), fInvMassLowLimit(1.05), fInvMassUpLimit(1.3), fRejectKaon(false), fInvMassKaonLowLimit(0.48), fInvMassKaonUpLimit(0.515), nSigmaPIDOffsetTPC(0.) {} + : nPtPhiMinSel(0), nPtPhiMaxSel(0), nEtaPhiMaxSel(0), nDCAPhiDaughMax(0), nCPAPhiMin(0), nTranRadPhiMin(0), nTranRadPhiMax(0), nDecVtxMax(0), pTPhiMin(9999999.), pTPhiMax(-9999999.), etaPhiMax(-9999999.), kDCAPhiDaughMax(-9999999.), kCPAPhiMin(9999999.), kTranRadPhiMin(9999999.), kTranRadPhiMax(-9999999.), kDecVtxMax(-9999999.), fInvMassLowLimit(1.05), fInvMassUpLimit(1.3), fRejectKaon(false), fInvMassKaonLowLimit(0.48), fInvMassKaonUpLimit(0.515), nSigmaPIDOffsetTPC(0.) {} /// Initializes histograms for the task template - void setChildCuts(femtoUniversePhiSelection::ChildTrackType child, T1 selVal, - T2 selVar, femtoUniverseSelection::SelectionType selType) + void setChildCuts(femto_universe_phi_selection::ChildTrackType child, T1 selVal, + T2 selVar, femto_universe_selection::SelectionType selType) { - if (child == femtoUniversePhiSelection::kPosTrack) { - PosDaughTrack.setSelection(selVal, selVar, selType); - } else if (child == femtoUniversePhiSelection::kNegTrack) { - NegDaughTrack.setSelection(selVal, selVar, selType); + if (child == femto_universe_phi_selection::kPosTrack) { + posDaughTrack.setSelection(selVal, selVar, selType); + } else if (child == femto_universe_phi_selection::kNegTrack) { + negDaughTrack.setSelection(selVal, selVar, selType); } } template - void setChildPIDSpecies(femtoUniversePhiSelection::ChildTrackType child, + void setChildPIDSpecies(femto_universe_phi_selection::ChildTrackType child, T& pids) { - if (child == femtoUniversePhiSelection::kPosTrack) { - PosDaughTrack.setPIDSpecies(pids); - } else if (child == femtoUniversePhiSelection::kNegTrack) { - NegDaughTrack.setPIDSpecies(pids); + if (child == femto_universe_phi_selection::kPosTrack) { + posDaughTrack.setPIDSpecies(pids); + } else if (child == femto_universe_phi_selection::kNegTrack) { + negDaughTrack.setPIDSpecies(pids); } } @@ -125,12 +120,12 @@ class FemtoUniversePhiSelection /// \param iSel Track selection variable to be examined /// \param prefix Additional prefix for the name of the configurable /// \param suffix Additional suffix for the name of the configurable - static std::string getSelectionName(femtoUniversePhiSelection::PhiSel iSel, + static std::string getSelectionName(femto_universe_phi_selection::PhiSel iSel, std::string_view prefix = "", std::string_view suffix = "") { std::string outString = static_cast(prefix); - outString += static_cast(mSelectionNames[iSel]); + outString += static_cast(kSelectionNames[iSel]); outString += suffix; return outString; } @@ -143,7 +138,7 @@ class FemtoUniversePhiSelection { for (int index = 0; index < kNphiSelection; index++) { std::string comp = static_cast(prefix) + - static_cast(mSelectionNames[index]); + static_cast(kSelectionNames[index]); std::string_view cmp{comp}; if (obs.compare(cmp) == 0) return index; @@ -154,8 +149,7 @@ class FemtoUniversePhiSelection /// Helper function to obtain the type of a given selection variable for consistent naming of the configurables /// \param iSel Phi selection variable whose type is returned - static femtoUniverseSelection::SelectionType - getSelectionType(femtoUniversePhiSelection::PhiSel iSel) + static femto_universe_selection::SelectionType getSelectionType(femto_universe_phi_selection::PhiSel iSel) { return mSelectionTypes[iSel]; } @@ -164,11 +158,11 @@ class FemtoUniversePhiSelection /// for consistent description of the configurables /// \param iSel Track selection variable to be examined /// \param prefix Additional prefix for the output of the configurable - static std::string getSelectionHelper(femtoUniversePhiSelection::PhiSel iSel, + static std::string getSelectionHelper(femto_universe_phi_selection::PhiSel iSel, std::string_view prefix = "") { std::string outString = static_cast(prefix); - outString += static_cast(mSelectionHelper[iSel]); + outString += static_cast(kSelectionHelper[iSel]); return outString; } @@ -196,21 +190,21 @@ class FemtoUniversePhiSelection nSigmaPIDOffsetTPC = offsetTPC; } - void setChildRejectNotPropagatedTracks(femtoUniversePhiSelection::ChildTrackType child, bool reject) + void setChildRejectNotPropagatedTracks(femto_universe_phi_selection::ChildTrackType child, bool reject) { - if (child == femtoUniversePhiSelection::kPosTrack) { - PosDaughTrack.setRejectNotPropagatedTracks(reject); - } else if (child == femtoUniversePhiSelection::kNegTrack) { - NegDaughTrack.setRejectNotPropagatedTracks(reject); + if (child == femto_universe_phi_selection::kPosTrack) { + posDaughTrack.setRejectNotPropagatedTracks(reject); + } else if (child == femto_universe_phi_selection::kNegTrack) { + negDaughTrack.setRejectNotPropagatedTracks(reject); } } - void setChildnSigmaPIDOffset(femtoUniversePhiSelection::ChildTrackType child, float offsetTPC, float offsetTOF) + void setChildnSigmaPIDOffset(femto_universe_phi_selection::ChildTrackType child, float offsetTPC, float offsetTOF) { - if (child == femtoUniversePhiSelection::kPosTrack) { - PosDaughTrack.setnSigmaPIDOffset(offsetTPC, offsetTOF); - } else if (child == femtoUniversePhiSelection::kNegTrack) { - NegDaughTrack.setnSigmaPIDOffset(offsetTPC, offsetTOF); + if (child == femto_universe_phi_selection::kPosTrack) { + posDaughTrack.setnSigmaPIDOffset(offsetTPC, offsetTOF); + } else if (child == femto_universe_phi_selection::kNegTrack) { + negDaughTrack.setnSigmaPIDOffset(offsetTPC, offsetTOF); } } @@ -226,12 +220,11 @@ class FemtoUniversePhiSelection float pTPhiMin; float pTPhiMax; float etaPhiMax; - float DCAPhiDaughMax; - float CPAPhiMin; - float TranRadPhiMin; - float TranRadPhiMax; - float DecVtxMax; - + float kDCAPhiDaughMax; + float kCPAPhiMin; + float kTranRadPhiMin; + float kTranRadPhiMax; + float kDecVtxMax; float fInvMassLowLimit; float fInvMassUpLimit; @@ -241,30 +234,30 @@ class FemtoUniversePhiSelection float nSigmaPIDOffsetTPC; - FemtoUniverseTrackSelection PosDaughTrack; - FemtoUniverseTrackSelection NegDaughTrack; + FemtoUniverseTrackSelection posDaughTrack; + FemtoUniverseTrackSelection negDaughTrack; static constexpr int kNphiSelection = 9; - static constexpr std::string_view mSelectionNames[kNphiSelection] = { + static constexpr std::string_view kSelectionNames[kNphiSelection] = { "Sign", "PtMin", "PtMax", "EtaMax", "DCAdaughMax", "CPAMin", "TranRadMin", "TranRadMax", "DecVecMax"}; ///< Name of the different ///< selections - static constexpr femtoUniverseSelection::SelectionType + static constexpr femto_universe_selection::SelectionType mSelectionTypes[kNphiSelection]{ - femtoUniverseSelection::kEqual, - femtoUniverseSelection::kLowerLimit, - femtoUniverseSelection::kUpperLimit, - femtoUniverseSelection::kUpperLimit, - femtoUniverseSelection::kUpperLimit, - femtoUniverseSelection::kLowerLimit, - femtoUniverseSelection::kLowerLimit, - femtoUniverseSelection::kUpperLimit, - femtoUniverseSelection::kUpperLimit}; ///< Map to match a variable with - ///< its type - - static constexpr std::string_view mSelectionHelper[kNphiSelection] = { + femto_universe_selection::kEqual, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kUpperLimit}; ///< Map to match a variable with + ///< its type + + static constexpr std::string_view kSelectionHelper[kNphiSelection] = { "+1 for lambda, -1 for antilambda", "Minimum pT (GeV/c)", "Maximum pT (GeV/c)", @@ -276,7 +269,7 @@ class FemtoUniversePhiSelection "Maximum distance from primary vertex"}; ///< Helper information for the ///< different selections -}; // namespace femtoUniverse +}; // namespace femto_universe template add((folderName + "/hEta").c_str(), "; #eta; Entries", kTH1F, {{1000, -1, 1}}); mHistogramRegistry->add((folderName + "/hPhi").c_str(), "; #phi; Entries", - kTH1F, {{1000, 0, 2. * M_PI}}); + kTH1F, {{1000, 0, o2::constants::math::TwoPI}}); mHistogramRegistry->add((folderName + "/hInvMassPhi").c_str(), "", kTH1F, {massAxisPhi}); - PosDaughTrack.init( mHistogramRegistry); - NegDaughTrack.init( mHistogramRegistry); @@ -349,31 +342,31 @@ void FemtoUniversePhiSelection::init(HistogramRegistry* registry) } /// check whether the most open cuts are fulfilled - most of this should have /// already be done by the filters - nPtPhiMinSel = getNSelections(femtoUniversePhiSelection::kPhipTMin); - nPtPhiMaxSel = getNSelections(femtoUniversePhiSelection::kPhipTMax); - nEtaPhiMaxSel = getNSelections(femtoUniversePhiSelection::kPhietaMax); - nDCAPhiDaughMax = getNSelections(femtoUniversePhiSelection::kPhiDCADaughMax); - nCPAPhiMin = getNSelections(femtoUniversePhiSelection::kPhiCPAMin); - nTranRadPhiMin = getNSelections(femtoUniversePhiSelection::kPhiTranRadMin); - nTranRadPhiMax = getNSelections(femtoUniversePhiSelection::kPhiTranRadMax); - nDecVtxMax = getNSelections(femtoUniversePhiSelection::kPhiDecVtxMax); - - pTPhiMin = getMinimalSelection(femtoUniversePhiSelection::kPhipTMin, - femtoUniverseSelection::kLowerLimit); - pTPhiMax = getMinimalSelection(femtoUniversePhiSelection::kPhipTMax, - femtoUniverseSelection::kUpperLimit); - etaPhiMax = getMinimalSelection(femtoUniversePhiSelection::kPhietaMax, - femtoUniverseSelection::kAbsUpperLimit); - DCAPhiDaughMax = getMinimalSelection(femtoUniversePhiSelection::kPhiDCADaughMax, - femtoUniverseSelection::kUpperLimit); - CPAPhiMin = getMinimalSelection(femtoUniversePhiSelection::kPhiCPAMin, - femtoUniverseSelection::kLowerLimit); - TranRadPhiMin = getMinimalSelection(femtoUniversePhiSelection::kPhiTranRadMin, - femtoUniverseSelection::kLowerLimit); - TranRadPhiMax = getMinimalSelection(femtoUniversePhiSelection::kPhiTranRadMax, - femtoUniverseSelection::kUpperLimit); - DecVtxMax = getMinimalSelection(femtoUniversePhiSelection::kPhiDecVtxMax, - femtoUniverseSelection::kAbsUpperLimit); + nPtPhiMinSel = getNSelections(femto_universe_phi_selection::kPhipTMin); + nPtPhiMaxSel = getNSelections(femto_universe_phi_selection::kPhipTMax); + nEtaPhiMaxSel = getNSelections(femto_universe_phi_selection::kPhietaMax); + nDCAPhiDaughMax = getNSelections(femto_universe_phi_selection::kPhiDCADaughMax); + nCPAPhiMin = getNSelections(femto_universe_phi_selection::kPhiCPAMin); + nTranRadPhiMin = getNSelections(femto_universe_phi_selection::kPhiTranRadMin); + nTranRadPhiMax = getNSelections(femto_universe_phi_selection::kPhiTranRadMax); + nDecVtxMax = getNSelections(femto_universe_phi_selection::kPhiDecVtxMax); + + pTPhiMin = getMinimalSelection(femto_universe_phi_selection::kPhipTMin, + femto_universe_selection::kLowerLimit); + pTPhiMax = getMinimalSelection(femto_universe_phi_selection::kPhipTMax, + femto_universe_selection::kUpperLimit); + etaPhiMax = getMinimalSelection(femto_universe_phi_selection::kPhietaMax, + femto_universe_selection::kAbsUpperLimit); + kDCAPhiDaughMax = getMinimalSelection(femto_universe_phi_selection::kPhiDCADaughMax, + femto_universe_selection::kUpperLimit); + kCPAPhiMin = getMinimalSelection(femto_universe_phi_selection::kPhiCPAMin, + femto_universe_selection::kLowerLimit); + kTranRadPhiMin = getMinimalSelection(femto_universe_phi_selection::kPhiTranRadMin, + femto_universe_selection::kLowerLimit); + kTranRadPhiMax = getMinimalSelection(femto_universe_phi_selection::kPhiTranRadMax, + femto_universe_selection::kUpperLimit); + kDecVtxMax = getMinimalSelection(femto_universe_phi_selection::kPhiDecVtxMax, + femto_universe_selection::kAbsUpperLimit); } template @@ -419,42 +412,42 @@ bool FemtoUniversePhiSelection::isSelectedMinimal(C const& col, V const& phi, if (nEtaPhiMaxSel > 0 && std::abs(eta) > etaPhiMax) { return false; } - if (nDCAPhiDaughMax > 0 && dcaDaughphi > DCAPhiDaughMax) { + if (nDCAPhiDaughMax > 0 && dcaDaughphi > kDCAPhiDaughMax) { return false; } - if (nCPAPhiMin > 0 && cpaphi < CPAPhiMin) { + if (nCPAPhiMin > 0 && cpaphi < kCPAPhiMin) { return false; } - if (nTranRadPhiMin > 0 && tranRad < TranRadPhiMin) { + if (nTranRadPhiMin > 0 && tranRad < kTranRadPhiMin) { return false; } - if (nTranRadPhiMax > 0 && tranRad > TranRadPhiMax) { + if (nTranRadPhiMax > 0 && tranRad > kTranRadPhiMax) { return false; } for (size_t i = 0; i < decVtx.size(); i++) { - if (nDecVtxMax > 0 && decVtx.at(i) > DecVtxMax) { + if (nDecVtxMax > 0 && decVtx.at(i) > kDecVtxMax) { return false; } } - if (!PosDaughTrack.isSelectedMinimal(posTrack)) { + if (!posDaughTrack.isSelectedMinimal(posTrack)) { return false; } - if (!NegDaughTrack.isSelectedMinimal(negTrack)) { + if (!negDaughTrack.isSelectedMinimal(negTrack)) { return false; } // check that track combinations for Phi or antiPhi would be fulfilling PID - int nSigmaPIDMax = PosDaughTrack.getSigmaPIDMax(); + int nSigmaPIDMax = posDaughTrack.getSigmaPIDMax(); // antiPhi auto nSigmaPrNeg = negTrack.tpcNSigmaPr(); auto nSigmaPiPos = posTrack.tpcNSigmaPi(); // phi auto nSigmaPiNeg = negTrack.tpcNSigmaPi(); auto nSigmaPrPos = posTrack.tpcNSigmaPr(); - if (!(abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && - abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax) && - !(abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && - abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax)) { + if (!(std::abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && + std::abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax) && + !(std::abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && + std::abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax)) { return false; } @@ -499,24 +492,24 @@ void FemtoUniversePhiSelection::fillLambdaQA(C const& col, V const& phi, mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaEtaMax"), phi.mLambda()); } - if (dcaDaughphi < DCAPhiDaughMax) { + if (dcaDaughphi < kDCAPhiDaughMax) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaDCAPhiDaugh"), phi.mLambda()); } - if (cpaphi > CPAPhiMin) { + if (cpaphi > kCPAPhiMin) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaCPA"), phi.mLambda()); } - if (tranRad > TranRadPhiMin) { + if (tranRad > kTranRadPhiMin) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaTranRadMin"), phi.mLambda()); } - if (tranRad < TranRadPhiMax) { + if (tranRad < kTranRadPhiMax) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaTranRadMax"), phi.mLambda()); } bool write = true; for (size_t i = 0; i < decVtx.size(); i++) { - write = write && (decVtx.at(i) < DecVtxMax); + write = write && (decVtx.at(i) < kDecVtxMax); } if (write) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaDecVtxMax"), @@ -530,33 +523,33 @@ template std::array FemtoUniversePhiSelection::getCutContainer(C const& col, V const& phi, T const& posTrack, T const& negTrack) { - auto outputPosTrack = PosDaughTrack.getCutContainer(posTrack); - auto outputNegTrack = NegDaughTrack.getCutContainer(negTrack); + auto outputPosTrack = posDaughTrack.getCutContainer(posTrack); + auto outputNegTrack = negDaughTrack.getCutContainer(negTrack); cutContainerType output = 0; size_t counter = 0; - auto lambdaMassNominal = TDatabasePDG::Instance()->GetParticle(3122)->Mass(); // FIXME: Get from the common header + auto lambdaMassNominal = o2::constants::physics::MassPhi; auto lambdaMassHypothesis = phi.mLambda(); auto antiLambdaMassHypothesis = phi.mAntiLambda(); - auto diffLambda = abs(lambdaMassNominal - lambdaMassHypothesis); - auto diffAntiLambda = abs(antiLambdaMassHypothesis - lambdaMassHypothesis); + auto diffLambda = std::abs(lambdaMassNominal - lambdaMassHypothesis); + auto diffAntiLambda = std::abs(antiLambdaMassHypothesis - lambdaMassHypothesis); float sign = 0.; - int nSigmaPIDMax = PosDaughTrack.getSigmaPIDMax(); + int nSigmaPIDMax = posDaughTrack.getSigmaPIDMax(); auto nSigmaPrNeg = negTrack.tpcNSigmaPr(); auto nSigmaPiPos = posTrack.tpcNSigmaPi(); auto nSigmaPiNeg = negTrack.tpcNSigmaPi(); auto nSigmaPrPos = posTrack.tpcNSigmaPr(); // check the mass and the PID of daughters - if (abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && diffAntiLambda > diffLambda) { + if (std::abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && std::abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && diffAntiLambda > diffLambda) { sign = -1.; - } else if (abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && diffAntiLambda < diffLambda) { + } else if (std::abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && std::abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && diffAntiLambda < diffLambda) { sign = 1.; } else { // if it happens that none of these are true, ignore the invariant mass - if (abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax) { + if (std::abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && std::abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax) { sign = -1.; - } else if (abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax) { + } else if (std::abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && std::abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax) { sign = 1.; } } @@ -571,38 +564,38 @@ std::array float observable = 0.; for (auto& sel : mSelections) { const auto selVariable = sel.getSelectionVariable(); - if (selVariable == femtoUniversePhiSelection::kPhiDecVtxMax) { + if (selVariable == femto_universe_phi_selection::kPhiDecVtxMax) { for (size_t i = 0; i < decVtx.size(); ++i) { auto decVtxValue = decVtx.at(i); sel.checkSelectionSetBit(decVtxValue, output, counter); } } else { switch (selVariable) { - case (femtoUniversePhiSelection::kPhiSign): + case (femto_universe_phi_selection::kPhiSign): observable = sign; break; - case (femtoUniversePhiSelection::kPhipTMin): + case (femto_universe_phi_selection::kPhipTMin): observable = pT; break; - case (femtoUniversePhiSelection::kPhipTMax): + case (femto_universe_phi_selection::kPhipTMax): observable = pT; break; - case (femtoUniversePhiSelection::kPhietaMax): + case (femto_universe_phi_selection::kPhietaMax): observable = eta; break; - case (femtoUniversePhiSelection::kPhiDCADaughMax): + case (femto_universe_phi_selection::kPhiDCADaughMax): observable = dcaDaughphi; break; - case (femtoUniversePhiSelection::kPhiCPAMin): + case (femto_universe_phi_selection::kPhiCPAMin): observable = cpaphi; break; - case (femtoUniversePhiSelection::kPhiTranRadMin): + case (femto_universe_phi_selection::kPhiTranRadMin): observable = tranRad; break; - case (femtoUniversePhiSelection::kPhiTranRadMax): + case (femto_universe_phi_selection::kPhiTranRadMax): observable = tranRad; break; - case (femtoUniversePhiSelection::kPhiDecVtxMax): + case (femto_universe_phi_selection::kPhiDecVtxMax): break; } sel.checkSelectionSetBit(observable, output, counter); @@ -610,10 +603,10 @@ std::array } return { output, - outputPosTrack.at(femtoUniverseTrackSelection::TrackContainerPosition::kCuts), - outputPosTrack.at(femtoUniverseTrackSelection::TrackContainerPosition::kPID), - outputNegTrack.at(femtoUniverseTrackSelection::TrackContainerPosition::kCuts), - outputNegTrack.at(femtoUniverseTrackSelection::TrackContainerPosition::kPID)}; + outputPosTrack.at(femto_universe_track_selection::TrackContainerPosition::kCuts), + outputPosTrack.at(femto_universe_track_selection::TrackContainerPosition::kPID), + outputNegTrack.at(femto_universe_track_selection::TrackContainerPosition::kCuts), + outputNegTrack.at(femto_universe_track_selection::TrackContainerPosition::kPID)}; } template GetParticle(321)->Mass(); // FIXME: Get from the common header - float mMassTwo = TDatabasePDG::Instance()->GetParticle(321)->Mass(); // FIXME: Get from the common header + float mMassOne = o2::constants::physics::MassKPlus; + float mMassTwo = o2::constants::physics::MassKMinus; part1Vec.SetPtEtaPhiM(posTrack.pt(), posTrack.eta(), posTrack.phi(), mMassOne); part2Vec.SetPtEtaPhiM(negTrack.pt(), negTrack.eta(), negTrack.phi(), mMassTwo); @@ -635,13 +628,7 @@ void FemtoUniversePhiSelection::fillQA(C const& /*col*/, V const& /*phi*/, T con sumVec += part2Vec; float phiEta = sumVec.Eta(); float phiPt = sumVec.Pt(); - // float phiP = sumVec.P(); - float phiPhi = sumVec.Phi(); - if (sumVec.Phi() < 0) { - phiPhi = sumVec.Phi() + 2 * o2::constants::math::PI; - } else if (sumVec.Phi() >= 0) { - phiPhi = sumVec.Phi(); - } + float phiPhi = RecoDecay::constrainAngle(sumVec.Phi(), 0); float phiM = sumVec.M(); @@ -664,12 +651,12 @@ void FemtoUniversePhiSelection::fillQA(C const& /*col*/, V const& /*phi*/, T con phiM); } - PosDaughTrack.fillQA(posTrack); - NegDaughTrack.fillQA(negTrack); } -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEPHISELECTION_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseSHContainer.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseSHContainer.h index 4bc96996408..e4a0b9d11bd 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseSHContainer.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseSHContainer.h @@ -9,7 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file FemtoUniverseSHContainer..h +/// \file FemtoUniverseSHContainer.h /// \brief FemtoUniverseSHContainer - Fills the Spherical Harmonics components /// \remark This file is inherited from ~/FemtoUniverse/Core/FemtoUniverse3DContainer.h on 17/06/2024 /// \author Pritam Chakraborty, WUT Warsaw, pritam.chakraborty@pw.edu.pl8 @@ -30,12 +30,10 @@ #include "TMath.h" #include "TDatabasePDG.h" -using namespace o2::framework; - -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -namespace femtoUniverseSHContainer +namespace femto_universe_sh_container { /// Femtoscopic observable to be computed enum Observable { kstar ///< kstar @@ -45,15 +43,15 @@ enum Observable { kstar ///< kstar enum EventType { same, ///< Pair from same event mixed ///< Pair from mixed event }; -}; // namespace femtoUniverseSHContainer +}; // namespace femto_universe_sh_container -/// \class femtoUniverseSHContainer +/// \class femto_universe_sh_container /// \brief Container for all histogramming related to the correlation function. The two /// particles of the pair are passed here, and the correlation function and QA histograms /// are filled according to the specified observable /// \tparam eventType Type of the event (same/mixed) /// \tparam obs Observable to be computed (k*/Q_inv/...) -template +template class FemtoUniverseSHContainer { public: @@ -69,13 +67,13 @@ class FemtoUniverseSHContainer template void init(HistogramRegistry* registry, T& kstarbins, int /*maxl*/) { - KStarBins = kstarbins; + kStarBins = kstarbins; std::string femtoObs1D; - std::vector fels(fMaxJM); - std::vector fems(fMaxJM); - std::vector felsi(fMaxJM); - std::vector femsi(fMaxJM); + std::vector fels(kMaxJM); + std::vector fems(kMaxJM); + std::vector felsi(kMaxJM); + std::vector femsi(kMaxJM); // Fill in els and ems table int el = 0; @@ -93,41 +91,41 @@ class FemtoUniverseSHContainer el++; em = -el; } - } while (el <= fMaxL); + } while (el <= kMaxL); - mHistogramRegistry = registry; + kHistogramRegistry = registry; femtoObs1D = "#it{q} (GeV/#it{c})"; framework::AxisSpec femtoObsAxis1D = {kstarbins, femtoObs1D.c_str()}; - std::string folderName = static_cast(mFolderSuffix[mEventType]) + static_cast(o2::aod::femtouniverseMCparticle::MCTypeName[o2::aod::femtouniverseMCparticle::MCType::kRecon]); + std::string folderName = static_cast(kFolderSuffix[kEventType]) + static_cast(o2::aod::femtouniverse_mc_particle::MCTypeName[o2::aod::femtouniverse_mc_particle::MCType::kRecon]); std::string suffix; - for (int ihist = 0; ihist < fMaxJM; ihist++) { + for (int ihist = 0; ihist < kMaxJM; ihist++) { if (femsi[ihist] < 0) { suffix = "Ylm" + std::to_string(felsi[ihist]) + std::to_string(felsi[ihist] - femsi[ihist]); } else { suffix = "Ylm" + std::to_string(felsi[ihist]) + std::to_string(femsi[ihist]); } - if (mFolderSuffix[mEventType] == mFolderSuffix[0]) { - fnumsreal[ihist] = mHistogramRegistry->add(("NumRe" + suffix).c_str(), ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); - fnumsimag[ihist] = mHistogramRegistry->add(("NumIm" + suffix).c_str(), ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); + if (kFolderSuffix[kEventType] == kFolderSuffix[0]) { + fnumsreal[ihist] = kHistogramRegistry->add(("NumRe" + suffix).c_str(), ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); + fnumsimag[ihist] = kHistogramRegistry->add(("NumIm" + suffix).c_str(), ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); } else { - fdensreal[ihist] = mHistogramRegistry->add(("DenRe" + suffix).c_str(), ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); - fdensimag[ihist] = mHistogramRegistry->add(("DenIm" + suffix).c_str(), ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); + fdensreal[ihist] = kHistogramRegistry->add(("DenRe" + suffix).c_str(), ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); + fdensimag[ihist] = kHistogramRegistry->add(("DenIm" + suffix).c_str(), ("; " + femtoObs1D + "; Entries").c_str(), kTH1D, {femtoObsAxis1D}); } } - if (mFolderSuffix[mEventType] == mFolderSuffix[0]) { + if (kFolderSuffix[kEventType] == kFolderSuffix[0]) { std::string bufnameNum = "CovNum"; - fcovnum = mHistogramRegistry->add((bufnameNum).c_str(), "; x; y; z", kTH3D, {{kstarbins}, {(fMaxJM * 2), -0.5, ((static_cast(fMaxJM) * 2.0 - 0.5))}, {(fMaxJM * 2), -0.5, ((static_cast(fMaxJM) * 2.0 - 0.5))}}); - } else if (mFolderSuffix[mEventType] == mFolderSuffix[1]) { + fcovnum = kHistogramRegistry->add((bufnameNum).c_str(), "; x; y; z", kTH3D, {{kstarbins}, {(kMaxJM * 2), -0.5, ((static_cast(kMaxJM) * 2.0 - 0.5))}, {(kMaxJM * 2), -0.5, ((static_cast(kMaxJM) * 2.0 - 0.5))}}); + } else if (kFolderSuffix[kEventType] == kFolderSuffix[1]) { std::string bufnameDen = "CovDen"; - fcovden = mHistogramRegistry->add((bufnameDen).c_str(), "; x; y; z", kTH3D, {{kstarbins}, {(fMaxJM * 2), -0.5, ((static_cast(fMaxJM) * 2.0 - 0.5))}, {(fMaxJM * 2), -0.5, ((static_cast(fMaxJM) * 2.0 - 0.5))}}); + fcovden = kHistogramRegistry->add((bufnameDen).c_str(), "; x; y; z", kTH3D, {{kstarbins}, {(kMaxJM * 2), -0.5, ((static_cast(kMaxJM) * 2.0 - 0.5))}, {(kMaxJM * 2), -0.5, ((static_cast(kMaxJM) * 2.0 - 0.5))}}); } - fbinctn = new TH1D(TString("BinCountNum"), "Bin Occupation (Numerator)", static_cast(KStarBins[0]), KStarBins[1], KStarBins[2]); - fbinctd = new TH1D(TString("BinCountDen"), "Bin Occupation (Denominator)", static_cast(KStarBins[0]), KStarBins[1], KStarBins[2]); + fbinctn = new TH1D(TString("BinCountNum"), "Bin Occupation (Numerator)", static_cast(kStarBins[0]), kStarBins[1], kStarBins[2]); + fbinctd = new TH1D(TString("BinCountDen"), "Bin Occupation (Denominator)", static_cast(kStarBins[0]), kStarBins[1], kStarBins[2]); } /// Set the PDG codes of the two particles involved @@ -135,10 +133,10 @@ class FemtoUniverseSHContainer /// \param pdg2 PDG code of particle two void setPDGCodes(const int pdg1, const int pdg2) { - mMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass(); - mMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass(); - mPDGOne = pdg1; - mPDGTwo = pdg2; + kMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass(); + kMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass(); + kPDGOne = pdg1; + kPDGTwo = pdg2; } /// To compute the bin value for cavariance matrix @@ -147,9 +145,9 @@ class FemtoUniverseSHContainer /// \param zeroimag /// \param ilmprim /// \param primimag - int GetBin(int qbin, int ilmzero, int zeroimag, int ilmprim, int primimag) + int getBin(int qbin, int ilmzero, int zeroimag, int ilmprim, int primimag) { - return qbin * fMaxJM * fMaxJM * 4 + (ilmprim * 2 + primimag) * fMaxJM * 2 + ilmzero * 2 + zeroimag; + return qbin * kMaxJM * kMaxJM * 4 + (ilmprim * 2 + primimag) * kMaxJM * 2 + ilmzero * 2 + zeroimag; } /// Templated function to compute the necessary observables and fill the histograms for respective Spherical Harmonic @@ -159,11 +157,11 @@ class FemtoUniverseSHContainer /// \param ChosenEventType same or mixed event /// \param maxl Maximum valie of L component of the spherical harmonics template - void AddEventPair(T const& part1, T const& part2, uint8_t ChosenEventType, int /*maxl*/, bool isiden) + void addEventPair(T const& part1, T const& part2, uint8_t ChosenEventType, int /*maxl*/, bool isiden) { - std::vector> fYlmBuffer(fMaxJM); + std::vector> fYlmBuffer(kMaxJM); std::vector f3d; - f3d = FemtoUniverseMath::newpairfunc(part1, mMassOne, part2, mMassTwo, isiden); + f3d = FemtoUniverseMath::newpairfunc(part1, kMassOne, part2, kMassTwo, isiden); const float kv = f3d[0]; const float qout = f3d[1]; @@ -172,38 +170,38 @@ class FemtoUniverseSHContainer int nqbin = fbinctn->GetXaxis()->FindFixBin(kv) - 1; - FemtoUniverseSpherHarMath Ylm; - Ylm.YlmUpToL(fMaxL, qout, qside, qlong, fYlmBuffer.data()); + FemtoUniverseSpherHarMath kYlm; + kYlm.doYlmUpToL(kMaxL, qout, qside, qlong, fYlmBuffer.data()); - if (ChosenEventType == femtoUniverseSHContainer::EventType::same) { - for (int ihist = 0; ihist < fMaxJM; ihist++) { + if (ChosenEventType == femto_universe_sh_container::EventType::same) { + for (int ihist = 0; ihist < kMaxJM; ihist++) { fnumsreal[ihist]->Fill(kv, real(fYlmBuffer[ihist])); fnumsimag[ihist]->Fill(kv, -imag(fYlmBuffer[ihist])); fbinctn->Fill(kv, 1.0); } if (nqbin < fbinctn->GetNbinsX()) { - for (int ilmzero = 0; ilmzero < fMaxJM; ilmzero++) { - for (int ilmprim = 0; ilmprim < fMaxJM; ilmprim++) { - fcovmnum[GetBin(nqbin, ilmzero, 0, ilmprim, 0)] += (real(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); - fcovmnum[GetBin(nqbin, ilmzero, 0, ilmprim, 1)] += (real(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); - fcovmnum[GetBin(nqbin, ilmzero, 1, ilmprim, 0)] += (-imag(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); - fcovmnum[GetBin(nqbin, ilmzero, 1, ilmprim, 1)] += (-imag(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); + for (int ilmzero = 0; ilmzero < kMaxJM; ilmzero++) { + for (int ilmprim = 0; ilmprim < kMaxJM; ilmprim++) { + fcovmnum[getBin(nqbin, ilmzero, 0, ilmprim, 0)] += (real(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); + fcovmnum[getBin(nqbin, ilmzero, 0, ilmprim, 1)] += (real(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); + fcovmnum[getBin(nqbin, ilmzero, 1, ilmprim, 0)] += (-imag(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); + fcovmnum[getBin(nqbin, ilmzero, 1, ilmprim, 1)] += (-imag(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); } } } - } else if (ChosenEventType == femtoUniverseSHContainer::EventType::mixed) { - for (int ihist = 0; ihist < fMaxJM; ihist++) { + } else if (ChosenEventType == femto_universe_sh_container::EventType::mixed) { + for (int ihist = 0; ihist < kMaxJM; ihist++) { fdensreal[ihist]->Fill(kv, real(fYlmBuffer[ihist])); fdensimag[ihist]->Fill(kv, -imag(fYlmBuffer[ihist])); } if (nqbin < fbinctn->GetNbinsX()) { - for (int ilmzero = 0; ilmzero < fMaxJM; ilmzero++) { - for (int ilmprim = 0; ilmprim < fMaxJM; ilmprim++) { - fcovmden[GetBin(nqbin, ilmzero, 0, ilmprim, 0)] += (real(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); - fcovmden[GetBin(nqbin, ilmzero, 0, ilmprim, 1)] += (real(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); - fcovmden[GetBin(nqbin, ilmzero, 1, ilmprim, 0)] += (-imag(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); - fcovmden[GetBin(nqbin, ilmzero, 1, ilmprim, 1)] += (-imag(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); + for (int ilmzero = 0; ilmzero < kMaxJM; ilmzero++) { + for (int ilmprim = 0; ilmprim < kMaxJM; ilmprim++) { + fcovmden[getBin(nqbin, ilmzero, 0, ilmprim, 0)] += (real(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); + fcovmden[getBin(nqbin, ilmzero, 0, ilmprim, 1)] += (real(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); + fcovmden[getBin(nqbin, ilmzero, 1, ilmprim, 0)] += (-imag(fYlmBuffer[ilmzero]) * real(fYlmBuffer[ilmprim])); + fcovmden[getBin(nqbin, ilmzero, 1, ilmprim, 1)] += (-imag(fYlmBuffer[ilmzero]) * -imag(fYlmBuffer[ilmprim])); } } } @@ -213,23 +211,23 @@ class FemtoUniverseSHContainer /// Function to fill covariance matrix in 3D histograms /// \param ChosenEventType same or mixed event /// \param MaxJM Maximum value of J - void PackCov(uint8_t ChosenEventType, int /*MaxJM*/) + void packCov(uint8_t ChosenEventType, int /*MaxJM*/) { - if (ChosenEventType == femtoUniverseSHContainer::EventType::same) { + if (ChosenEventType == femto_universe_sh_container::EventType::same) { for (int ibin = 1; ibin <= fcovnum->GetNbinsX(); ibin++) { - for (int ilmz = 0; ilmz < fMaxJM * 2; ilmz++) { - for (int ilmp = 0; ilmp < fMaxJM * 2; ilmp++) { - auto bin = GetBin(ibin - 1, ilmz / 2, ilmz % 2, ilmp / 2, ilmp % 2); + for (int ilmz = 0; ilmz < kMaxJM * 2; ilmz++) { + for (int ilmp = 0; ilmp < kMaxJM * 2; ilmp++) { + auto bin = getBin(ibin - 1, ilmz / 2, ilmz % 2, ilmp / 2, ilmp % 2); auto value = fcovmnum[bin]; fcovnum->SetBinContent(ibin, ilmz + 1, ilmp + 1, value); } } } - } else if (ChosenEventType == femtoUniverseSHContainer::EventType::mixed) { + } else if (ChosenEventType == femto_universe_sh_container::EventType::mixed) { for (int ibin = 1; ibin <= fcovden->GetNbinsX(); ibin++) { - for (int ilmz = 0; ilmz < fMaxJM * 2; ilmz++) { - for (int ilmp = 0; ilmp < fMaxJM * 2; ilmp++) { - auto bin = GetBin(ibin - 1, ilmz / 2, ilmz % 2, ilmp / 2, ilmp % 2); + for (int ilmz = 0; ilmz < kMaxJM * 2; ilmz++) { + for (int ilmp = 0; ilmp < kMaxJM * 2; ilmp++) { + auto bin = getBin(ibin - 1, ilmz / 2, ilmz % 2, ilmp / 2, ilmp % 2); auto value = fcovmden[bin]; fcovden->SetBinContent(ibin, ilmz + 1, ilmp + 1, value); } @@ -250,23 +248,23 @@ class FemtoUniverseSHContainer TH1D* fbinctn; TH1D* fbinctd; - static constexpr int fMaxL = 1; - static constexpr int fMaxJM = (fMaxL + 1) * (fMaxL + 1); + static constexpr int kMaxL = 1; + static constexpr int kMaxJM = (kMaxL + 1) * (kMaxL + 1); - std::array fcovmnum{}; ///< Covariance matrix for the numerator - std::array fcovmden{}; ///< Covariance matrix for the numerator + std::array fcovmnum{}; ///< Covariance matrix for the numerator + std::array fcovmden{}; ///< Covariance matrix for the numerator protected: - HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output - static constexpr std::string_view mFolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to mEventType - static constexpr int mEventType = eventType; ///< Type of the event (same/mixed, according to FEMTOUNIVERSESHCONTAINER::EventType) - float mMassOne = 0.f; ///< PDG mass of particle 1 - float mMassTwo = 0.f; ///< PDG mass of particle 2 - int mPDGOne = 0; ///< PDG code of particle 1 - int mPDGTwo = 0; ///< PDG code of particle 2 - std::vector KStarBins; + HistogramRegistry* kHistogramRegistry = nullptr; ///< For QA output + static constexpr std::string_view kFolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to kEventType + static constexpr int kEventType = eventType; ///< Type of the event (same/mixed, according to FEMTOUNIVERSESHCONTAINER::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; ///< PDG code of particle 2 + std::vector kStarBins; }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSESHCONTAINER_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseSelection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseSelection.h index 4e97786092d..ac49b2d6f42 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseSelection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseSelection.h @@ -19,10 +19,10 @@ #include -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -namespace femtoUniverseSelection +namespace femto_universe_selection { /// Type of selection to be employed enum SelectionType { kUpperLimit, ///< simple upper limit for the value, e.g. p_T < 1 GeV/c @@ -32,7 +32,7 @@ enum SelectionType { kUpperLimit, ///< simple upper limit for the value, e.g. kEqual ///< values need to be equal, e.g. sign = 1 }; -} // namespace femtoUniverseSelection +} // namespace femto_universe_selection /// Simple class taking care of individual selections /// \todo In principle all cuts that fulfill the getMinimalSelection are done implicitly and can be removed from the vector containing all cuts @@ -49,7 +49,7 @@ class FemtoUniverseSelection /// \param selVal Value used for the selection /// \param selVar Variable used for the selection /// \param selType Type of selection to be employed - FemtoUniverseSelection(selValDataType selVal, selVariableDataType selVar, femtoUniverseSelection::SelectionType selType) + FemtoUniverseSelection(selValDataType selVal, selVariableDataType selVar, femto_universe_selection::SelectionType selType) : mSelVal(selVal), mSelVar(selVar), mSelType(selType) @@ -69,7 +69,7 @@ class FemtoUniverseSelection /// Get the type of selection to be employed /// \return Type of selection to be employed - femtoUniverseSelection::SelectionType getSelectionType() { return mSelType; } + femto_universe_selection::SelectionType getSelectionType() { return mSelType; } /// Check whether the selection is fulfilled or not /// \param observable Value of the variable to be checked @@ -77,17 +77,17 @@ class FemtoUniverseSelection bool isSelected(selValDataType observable) { switch (mSelType) { - case (femtoUniverseSelection::SelectionType::kUpperLimit): + case (femto_universe_selection::SelectionType::kUpperLimit): return (observable < mSelVal); - case (femtoUniverseSelection::SelectionType::kAbsUpperLimit): + case (femto_universe_selection::SelectionType::kAbsUpperLimit): return (std::abs(observable) < mSelVal); break; - case (femtoUniverseSelection::SelectionType::kLowerLimit): + case (femto_universe_selection::SelectionType::kLowerLimit): return (observable > mSelVal); - case (femtoUniverseSelection::SelectionType::kAbsLowerLimit): + case (femto_universe_selection::SelectionType::kAbsLowerLimit): return (std::abs(observable) > mSelVal); break; - case (femtoUniverseSelection::SelectionType::kEqual): + case (femto_universe_selection::SelectionType::kEqual): /// \todo can the comparison be done a bit nicer? return (std::abs(observable - mSelVal) < std::abs(mSelVal * 1e-6)); break; @@ -123,11 +123,11 @@ class FemtoUniverseSelection } private: - selValDataType mSelVal{0.f}; ///< Value used for the selection - selVariableDataType mSelVar; ///< Variable used for the selection - femtoUniverseSelection::SelectionType mSelType; ///< Type of selection employed + selValDataType mSelVal{0.f}; ///< Value used for the selection + selVariableDataType mSelVar; ///< Variable used for the selection + femto_universe_selection::SelectionType mSelType; ///< Type of selection employed }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSESELECTION_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseSpherHarMath.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseSpherHarMath.h index 07fe6f4e996..bb0e8bdaf22 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseSpherHarMath.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseSpherHarMath.h @@ -16,7 +16,6 @@ #ifndef PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSESPHERHARMATH_H_ #define PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSESPHERHARMATH_H_ -#include #include #include @@ -25,7 +24,7 @@ #include "TLorentzVector.h" #include "TMath.h" -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { /// \class FemtoUniverseMath @@ -34,39 +33,39 @@ class FemtoUniverseSpherHarMath { public: /// Values of various coefficients - void InitializeYlms() + void initializeYlms() { - double oneoversqrtpi = 1.0 / TMath::Sqrt(TMath::Pi()); + double oneoversqrtpi = 1.0 / std::sqrt(o2::constants::math::PI); // l=0 prefactors fgPrefactors[0] = 0.5 * oneoversqrtpi; // l=1 prefactors - fgPrefactors[1] = 0.5 * sqrt(3.0 / 2.0) * oneoversqrtpi; - fgPrefactors[2] = 0.5 * sqrt(3.0) * oneoversqrtpi; + fgPrefactors[1] = 0.5 * std::sqrt(3.0 / 2.0) * oneoversqrtpi; + fgPrefactors[2] = 0.5 * std::sqrt(3.0) * oneoversqrtpi; fgPrefactors[3] = -fgPrefactors[1]; // l=2 prefactors - fgPrefactors[4] = 0.25 * sqrt(15.0 / 2.0) * oneoversqrtpi; - fgPrefactors[5] = 0.5 * sqrt(15.0 / 2.0) * oneoversqrtpi; - fgPrefactors[6] = 0.25 * sqrt(5.0) * oneoversqrtpi; + fgPrefactors[4] = 0.25 * std::sqrt(15.0 / 2.0) * oneoversqrtpi; + fgPrefactors[5] = 0.5 * std::sqrt(15.0 / 2.0) * oneoversqrtpi; + fgPrefactors[6] = 0.25 * std::sqrt(5.0) * oneoversqrtpi; fgPrefactors[7] = -fgPrefactors[5]; fgPrefactors[8] = fgPrefactors[4]; // l=3 prefactors - fgPrefactors[9] = 0.125 * sqrt(35.0) * oneoversqrtpi; - fgPrefactors[10] = 0.25 * sqrt(105.0 / 2.0) * oneoversqrtpi; - fgPrefactors[11] = 0.125 * sqrt(21.0) * oneoversqrtpi; - fgPrefactors[12] = 0.25 * sqrt(7.0) * oneoversqrtpi; + fgPrefactors[9] = 0.125 * std::sqrt(35.0) * oneoversqrtpi; + fgPrefactors[10] = 0.25 * std::sqrt(105.0 / 2.0) * oneoversqrtpi; + fgPrefactors[11] = 0.125 * std::sqrt(21.0) * oneoversqrtpi; + fgPrefactors[12] = 0.25 * std::sqrt(7.0) * oneoversqrtpi; fgPrefactors[13] = -fgPrefactors[11]; fgPrefactors[14] = fgPrefactors[10]; fgPrefactors[15] = -fgPrefactors[9]; // l=4 prefactors - fgPrefactors[16] = 3.0 / 16.0 * sqrt(35.0 / 2.0) * oneoversqrtpi; - fgPrefactors[17] = 3.0 / 8.0 * sqrt(35.0) * oneoversqrtpi; - fgPrefactors[18] = 3.0 / 8.0 * sqrt(5.0 / 2.0) * oneoversqrtpi; - fgPrefactors[19] = 3.0 / 8.0 * sqrt(5.0) * oneoversqrtpi; + fgPrefactors[16] = 3.0 / 16.0 * std::sqrt(35.0 / 2.0) * oneoversqrtpi; + fgPrefactors[17] = 3.0 / 8.0 * std::sqrt(35.0) * oneoversqrtpi; + fgPrefactors[18] = 3.0 / 8.0 * std::sqrt(5.0 / 2.0) * oneoversqrtpi; + fgPrefactors[19] = 3.0 / 8.0 * std::sqrt(5.0) * oneoversqrtpi; fgPrefactors[20] = 3.0 / 16.0 * oneoversqrtpi; fgPrefactors[21] = -fgPrefactors[19]; fgPrefactors[22] = fgPrefactors[18]; @@ -74,12 +73,12 @@ class FemtoUniverseSpherHarMath fgPrefactors[24] = fgPrefactors[16]; // l=5 prefactors - fgPrefactors[25] = 3.0 / 32.0 * sqrt(77.0) * oneoversqrtpi; - fgPrefactors[26] = 3.0 / 16.0 * sqrt(385.0 / 2.0) * oneoversqrtpi; - fgPrefactors[27] = 1.0 / 32.0 * sqrt(385.0) * oneoversqrtpi; - fgPrefactors[28] = 1.0 / 8.0 * sqrt(1155.0 / 2.0) * oneoversqrtpi; - fgPrefactors[29] = 1.0 / 16.0 * sqrt(165.0 / 2.0) * oneoversqrtpi; - fgPrefactors[30] = 1.0 / 16.0 * sqrt(11.0) * oneoversqrtpi; + fgPrefactors[25] = 3.0 / 32.0 * std::sqrt(77.0) * oneoversqrtpi; + fgPrefactors[26] = 3.0 / 16.0 * std::sqrt(385.0 / 2.0) * oneoversqrtpi; + fgPrefactors[27] = 1.0 / 32.0 * std::sqrt(385.0) * oneoversqrtpi; + fgPrefactors[28] = 1.0 / 8.0 * std::sqrt(1155.0 / 2.0) * oneoversqrtpi; + fgPrefactors[29] = 1.0 / 16.0 * std::sqrt(165.0 / 2.0) * oneoversqrtpi; + fgPrefactors[30] = 1.0 / 16.0 * std::sqrt(11.0) * oneoversqrtpi; fgPrefactors[31] = -fgPrefactors[29]; fgPrefactors[32] = fgPrefactors[28]; fgPrefactors[33] = -fgPrefactors[27]; @@ -105,7 +104,7 @@ class FemtoUniverseSpherHarMath /// \param lmax Maximum value of L component /// \param ctheta Value of theta /// \param lbuf values of coefficients - void LegendreUpToYlm(int lmax, double ctheta, double* lbuf) + void legendreUpToYlm(int lmax, double ctheta, double* lbuf) { // Calculate a set of legendre polynomials up to a given l // with spherical input @@ -113,7 +112,7 @@ class FemtoUniverseSpherHarMath double coss[6]; sins[0] = 0.0; coss[0] = 1.0; - sins[1] = sqrt(1 - ctheta * ctheta); + sins[1] = std::sqrt(1 - ctheta * ctheta); coss[1] = ctheta; for (int iter = 2; iter < 6; iter++) { sins[iter] = sins[iter - 1] * sins[1]; @@ -165,21 +164,21 @@ class FemtoUniverseSpherHarMath } /// Function to calculate a set of Ylms up to a given l with cartesian input - void YlmUpToL(int lmax, double x, double y, double z, std::complex* ylms) + void doYlmUpToL(int lmax, double x, double y, double z, std::complex* ylms) { double ctheta, phi; - double r = sqrt(x * x + y * y + z * z); - if (r < 1e-10 || fabs(z) < 1e-10) + double r = std::sqrt(x * x + y * y + z * z); + if (r < 1e-10 || std::fabs(z) < 1e-10) ctheta = 0.0; else ctheta = z / r; - phi = atan2(y, x); - YlmUpToL(lmax, ctheta, phi, ylms); + phi = std::atan2(y, x); + doYlmUpToL(lmax, ctheta, phi, ylms); } /// Function to calculate a set of Ylms up to a given l with spherical input - void YlmUpToL(int lmax, double ctheta, double phi, std::complex* ylms) + void doYlmUpToL(int lmax, double ctheta, double phi, std::complex* ylms) { int lcur = 0; double lpol; @@ -188,12 +187,12 @@ class FemtoUniverseSpherHarMath double sins[6]; double lbuf[36]; - LegendreUpToYlm(lmax, ctheta, lbuf); - InitializeYlms(); + legendreUpToYlm(lmax, ctheta, lbuf); + initializeYlms(); for (int iter = 1; iter <= lmax; iter++) { - coss[iter - 1] = cos(iter * phi); - sins[iter - 1] = sin(iter * phi); + coss[iter - 1] = std::cos(iter * phi); + sins[iter - 1] = std::sin(iter * phi); } ylms[lcur++] = fgPrefactors[0] * lbuf[0] * std::complex(1, 0); @@ -212,13 +211,13 @@ class FemtoUniverseSpherHarMath } private: - static std::complex Ceiphi(double phi); + static std::complex fCeiphi(double phi); std::array fgPrefactors; std::array fgPrefshift; std::array fgPlmshift; }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSESPHERHARMATH_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h index 389273d0836..79ee6e167ca 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h @@ -9,8 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file FemtoUniverseTrackCuts.h -/// \brief Definition of the FemtoUniverseTrackCuts +/// \file FemtoUniverseTrackSelection.h +/// \brief Definition of the FemtoUniverseTrackSelection /// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de /// \author Luca Barioglio, TU München, luca.barioglio@cern.ch /// \author Zuzanna Chochulska, WUT Warsaw & CTU Prague, zchochul@cern.ch @@ -32,9 +32,9 @@ // using namespace o2::framework; -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -namespace femtoUniverseTrackSelection +namespace femto_universe_track_selection { /// The different selections this task is capable of doing enum TrackSel { kSign, ///< Sign of the track @@ -58,11 +58,11 @@ enum TrackContainerPosition { kPID }; /// Position in the full track cut container -} // namespace femtoUniverseTrackSelection +} // namespace femto_universe_track_selection /// \class FemtoUniverseTrackCuts /// \brief Cut class to contain and execute all cuts applied to tracks -class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection +class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection { public: FemtoUniverseTrackSelection() : nRejectNotPropagatedTracks(false), @@ -108,7 +108,7 @@ class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection tmpPids = pids; /// necessary due to some features of the configurable - for (o2::track::PID pid : tmpPids) { + for (const o2::track::PID pid : tmpPids) { kPIDspecies.push_back(pid); } } @@ -157,7 +157,7 @@ class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection(prefix); outString += static_cast(kSelectionNames[iSel]); @@ -181,7 +181,7 @@ class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection(prefix); outString += static_cast(kSelectionHelper[iSel]); @@ -258,20 +258,20 @@ class FemtoUniverseTrackSelection : public FemtoUniverseObjectSelection void FemtoUniverseTrackSelection::init(HistogramRegistry* registry) @@ -297,7 +297,7 @@ void FemtoUniverseTrackSelection::init(HistogramRegistry* registry) std::string folderName = static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + "/" + static_cast(o2::aod::femtouniverseparticle::TrackTypeName[tracktype]); /// check whether the number of selection exceeds the bitmap size - unsigned int nSelections = getNSelections() - getNSelections(femtoUniverseTrackSelection::kPIDnSigmaMax); + unsigned int nSelections = getNSelections() - getNSelections(femto_universe_track_selection::kPIDnSigmaMax); if (nSelections > 8 * sizeof(cutContainerType)) { LOG(fatal) << "FemtoUniverseTrackCuts: Number of selections too large for your container - quitting!"; } @@ -334,33 +334,33 @@ void FemtoUniverseTrackSelection::init(HistogramRegistry* registry) mHistogramRegistry->add((folderName + "/nSigmaComb_d").c_str(), "; #it{p} (GeV/#it{c}); n#sigma_{comb}^{d}", kTH2F, {{100, 0, 10}, {200, -4.975, 5.025}}); } /// set cuts - nPtMinSel = getNSelections(femtoUniverseTrackSelection::kpTMin); - nPtMaxSel = getNSelections(femtoUniverseTrackSelection::kpTMax); - nEtaSel = getNSelections(femtoUniverseTrackSelection::kEtaMax); - nTPCnMinSel = getNSelections(femtoUniverseTrackSelection::kTPCnClsMin); - nTPCfMinSel = getNSelections(femtoUniverseTrackSelection::kTPCfClsMin); - nTPCcMinSel = getNSelections(femtoUniverseTrackSelection::kTPCcRowsMin); - nTPCsMaxSel = getNSelections(femtoUniverseTrackSelection::kTPCsClsMax); - nITScMinSel = getNSelections(femtoUniverseTrackSelection::kITSnClsMin); - nITScIbMinSel = getNSelections(femtoUniverseTrackSelection::kITSnClsIbMin); - nDCAxyMaxSel = getNSelections(femtoUniverseTrackSelection::kDCAxyMax); - nDCAzMaxSel = getNSelections(femtoUniverseTrackSelection::kDCAzMax); - nDCAMinSel = getNSelections(femtoUniverseTrackSelection::kDCAMin); - nPIDnSigmaSel = getNSelections(femtoUniverseTrackSelection::kPIDnSigmaMax); - - pTMin = getMinimalSelection(femtoUniverseTrackSelection::kpTMin, femtoUniverseSelection::kLowerLimit); - pTMax = getMinimalSelection(femtoUniverseTrackSelection::kpTMax, femtoUniverseSelection::kUpperLimit); - etaMax = getMinimalSelection(femtoUniverseTrackSelection::kEtaMax, femtoUniverseSelection::kAbsUpperLimit); - nClsMin = getMinimalSelection(femtoUniverseTrackSelection::kTPCnClsMin, femtoUniverseSelection::kLowerLimit); - fClsMin = getMinimalSelection(femtoUniverseTrackSelection::kTPCfClsMin, femtoUniverseSelection::kLowerLimit); - cTPCMin = getMinimalSelection(femtoUniverseTrackSelection::kTPCcRowsMin, femtoUniverseSelection::kLowerLimit); - sTPCMax = getMinimalSelection(femtoUniverseTrackSelection::kTPCsClsMax, femtoUniverseSelection::kUpperLimit); - nITSclsMin = getMinimalSelection(femtoUniverseTrackSelection::kITSnClsMin, femtoUniverseSelection::kLowerLimit); - nITSclsIbMin = getMinimalSelection(femtoUniverseTrackSelection::kITSnClsIbMin, femtoUniverseSelection::kLowerLimit); - dcaXYMax = getMinimalSelection(femtoUniverseTrackSelection::kDCAxyMax, femtoUniverseSelection::kAbsUpperLimit); - dcaZMax = getMinimalSelection(femtoUniverseTrackSelection::kDCAzMax, femtoUniverseSelection::kAbsUpperLimit); - dcaMin = getMinimalSelection(femtoUniverseTrackSelection::kDCAMin, femtoUniverseSelection::kAbsLowerLimit); - nSigmaPIDMax = getMinimalSelection(femtoUniverseTrackSelection::kPIDnSigmaMax, femtoUniverseSelection::kAbsUpperLimit); + nPtMinSel = getNSelections(femto_universe_track_selection::kpTMin); + nPtMaxSel = getNSelections(femto_universe_track_selection::kpTMax); + nEtaSel = getNSelections(femto_universe_track_selection::kEtaMax); + nTPCnMinSel = getNSelections(femto_universe_track_selection::kTPCnClsMin); + nTPCfMinSel = getNSelections(femto_universe_track_selection::kTPCfClsMin); + nTPCcMinSel = getNSelections(femto_universe_track_selection::kTPCcRowsMin); + nTPCsMaxSel = getNSelections(femto_universe_track_selection::kTPCsClsMax); + nITScMinSel = getNSelections(femto_universe_track_selection::kITSnClsMin); + nITScIbMinSel = getNSelections(femto_universe_track_selection::kITSnClsIbMin); + nDCAxyMaxSel = getNSelections(femto_universe_track_selection::kDCAxyMax); + nDCAzMaxSel = getNSelections(femto_universe_track_selection::kDCAzMax); + nDCAMinSel = getNSelections(femto_universe_track_selection::kDCAMin); + nPIDnSigmaSel = getNSelections(femto_universe_track_selection::kPIDnSigmaMax); + + pTMin = getMinimalSelection(femto_universe_track_selection::kpTMin, femto_universe_selection::kLowerLimit); + pTMax = getMinimalSelection(femto_universe_track_selection::kpTMax, femto_universe_selection::kUpperLimit); + etaMax = getMinimalSelection(femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + nClsMin = getMinimalSelection(femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + fClsMin = getMinimalSelection(femto_universe_track_selection::kTPCfClsMin, femto_universe_selection::kLowerLimit); + cTPCMin = getMinimalSelection(femto_universe_track_selection::kTPCcRowsMin, femto_universe_selection::kLowerLimit); + sTPCMax = getMinimalSelection(femto_universe_track_selection::kTPCsClsMax, femto_universe_selection::kUpperLimit); + nITSclsMin = getMinimalSelection(femto_universe_track_selection::kITSnClsMin, femto_universe_selection::kLowerLimit); + nITSclsIbMin = getMinimalSelection(femto_universe_track_selection::kITSnClsIbMin, femto_universe_selection::kLowerLimit); + dcaXYMax = getMinimalSelection(femto_universe_track_selection::kDCAxyMax, femto_universe_selection::kAbsUpperLimit); + dcaZMax = getMinimalSelection(femto_universe_track_selection::kDCAzMax, femto_universe_selection::kAbsUpperLimit); + dcaMin = getMinimalSelection(femto_universe_track_selection::kDCAMin, femto_universe_selection::kAbsLowerLimit); + nSigmaPIDMax = getMinimalSelection(femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); } template @@ -396,7 +396,7 @@ bool FemtoUniverseTrackSelection::isSelectedMinimal(T const& track) const auto dca = track.dcaXY(); // Accordingly to FemtoUniverse in AliPhysics as well as LF analysis, // only dcaXY should be checked; NOT std::sqrt(pow(dcaXY, 2.) + pow(dcaZ, 2.)) std::vector pidTPC, pidTOF; - for (auto it : kPIDspecies) { + for (const auto it : kPIDspecies) { pidTPC.push_back(getNsigmaTPC(track, it)); pidTOF.push_back(getNsigmaTOF(track, it)); } @@ -484,7 +484,7 @@ std::array FemtoUniverseTrackSelection::getCutContainer(T c float observable = 0.; for (auto& sel : mSelections) { const auto selVariable = sel.getSelectionVariable(); - if (selVariable == femtoUniverseTrackSelection::kPIDnSigmaMax) { + if (selVariable == femto_universe_track_selection::kPIDnSigmaMax) { /// PID needs to be handled a bit differently since we may need more than one species for (size_t i = 0; i < kPIDspecies.size(); ++i) { auto pidTPCVal = pidTPC.at(i) - nSigmaPIDOffsetTPC; @@ -497,44 +497,44 @@ std::array FemtoUniverseTrackSelection::getCutContainer(T c } else { /// for the rest it's all the same switch (selVariable) { - case (femtoUniverseTrackSelection::kSign): + case (femto_universe_track_selection::kSign): observable = sign; break; - case (femtoUniverseTrackSelection::kpTMin): - case (femtoUniverseTrackSelection::kpTMax): + case (femto_universe_track_selection::kpTMin): + case (femto_universe_track_selection::kpTMax): observable = pT; break; - case (femtoUniverseTrackSelection::kEtaMax): + case (femto_universe_track_selection::kEtaMax): observable = eta; break; - case (femtoUniverseTrackSelection::kTPCnClsMin): + case (femto_universe_track_selection::kTPCnClsMin): observable = tpcNClsF; break; - case (femtoUniverseTrackSelection::kTPCfClsMin): + case (femto_universe_track_selection::kTPCfClsMin): observable = tpcRClsC; break; - case (femtoUniverseTrackSelection::kTPCcRowsMin): + case (femto_universe_track_selection::kTPCcRowsMin): observable = tpcNClsC; break; - case (femtoUniverseTrackSelection::kTPCsClsMax): + case (femto_universe_track_selection::kTPCsClsMax): observable = tpcNClsS; break; - case (femtoUniverseTrackSelection::kITSnClsMin): + case (femto_universe_track_selection::kITSnClsMin): observable = itsNCls; break; - case (femtoUniverseTrackSelection::kITSnClsIbMin): + case (femto_universe_track_selection::kITSnClsIbMin): observable = itsNClsIB; break; - case (femtoUniverseTrackSelection::kDCAxyMax): + case (femto_universe_track_selection::kDCAxyMax): observable = dcaXY; break; - case (femtoUniverseTrackSelection::kDCAzMax): + case (femto_universe_track_selection::kDCAzMax): observable = dcaZ; break; - case (femtoUniverseTrackSelection::kDCAMin): + case (femto_universe_track_selection::kDCAMin): observable = dca; break; - case (femtoUniverseTrackSelection::kPIDnSigmaMax): + case (femto_universe_track_selection::kPIDnSigmaMax): break; } sel.checkSelectionSetBit(observable, output, counter); @@ -580,6 +580,6 @@ void FemtoUniverseTrackSelection::fillQA(T const& track) } } -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSETRACKSELECTION_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h index 642b11c116f..87c0a1cc406 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h @@ -19,12 +19,9 @@ #ifndef PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEV0SELECTION_H_ #define PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEV0SELECTION_H_ -#include #include #include -#include // FIXME - #include "PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" @@ -33,11 +30,9 @@ #include "Framework/HistogramRegistry.h" #include "ReconstructionDataFormats/PID.h" -using namespace o2::framework; - -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -namespace femtoUniverseV0Selection +namespace femto_universe_v0_selection { /// The different selections this task is capable of doing enum V0Sel { @@ -63,16 +58,16 @@ enum V0ContainerPosition { kNegPID, }; /// Position in the full VO cut container -} // namespace femtoUniverseV0Selection +} // namespace femto_universe_v0_selection /// \class FemtoUniverseV0Selection /// \brief Cut class to contain and execute all cuts applied to V0s class FemtoUniverseV0Selection - : public FemtoUniverseObjectSelection + : public FemtoUniverseObjectSelection { public: FemtoUniverseV0Selection() - : nPtV0MinSel(0), nPtV0MaxSel(0), nEtaV0MaxSel(0), nDCAV0DaughMax(0), nCPAV0Min(0), nTranRadV0Min(0), nTranRadV0Max(0), nDecVtxMax(0), pTV0Min(9999999.), pTV0Max(-9999999.), etaV0Max(-9999999.), DCAV0DaughMax(-9999999.), CPAV0Min(9999999.), TranRadV0Min(9999999.), TranRadV0Max(-9999999.), DecVtxMax(-9999999.), fInvMassLowLimit(1.05), fInvMassUpLimit(1.3), fRejectKaon(false), fInvMassKaonLowLimit(0.48), fInvMassKaonUpLimit(0.515), nSigmaPIDOffsetTPC(0.) {} + : nPtV0MinSel(0), nPtV0MaxSel(0), nEtaV0MaxSel(0), nDCAV0DaughMax(0), nCPAV0Min(0), nTranRadV0Min(0), nTranRadV0Max(0), nDecVtxMax(0), pTV0Min(9999999.), pTV0Max(-9999999.), etaV0Max(-9999999.), kDCAV0DaughMax(-9999999.), kCPAV0Min(9999999.), kTranRadV0Min(9999999.), kTranRadV0Max(-9999999.), kDecVtxMax(-9999999.), fInvMassLowLimit(1.05), fInvMassUpLimit(1.3), fRejectKaon(false), fInvMassKaonLowLimit(0.48), fInvMassKaonUpLimit(0.515), nSigmaPIDOffsetTPC(0.) {} /// Initializes histograms for the task template - void setChildCuts(femtoUniverseV0Selection::ChildTrackType child, T1 selVal, - T2 selVar, femtoUniverseSelection::SelectionType selType) + void setChildCuts(femto_universe_v0_selection::ChildTrackType child, T1 selVal, + T2 selVar, femto_universe_selection::SelectionType selType) { - if (child == femtoUniverseV0Selection::kPosTrack) { - PosDaughTrack.setSelection(selVal, selVar, selType); - } else if (child == femtoUniverseV0Selection::kNegTrack) { - NegDaughTrack.setSelection(selVal, selVar, selType); + if (child == femto_universe_v0_selection::kPosTrack) { + posDaughTrack.setSelection(selVal, selVar, selType); + } else if (child == femto_universe_v0_selection::kNegTrack) { + negDaughTrack.setSelection(selVal, selVar, selType); } } template - void setChildPIDSpecies(femtoUniverseV0Selection::ChildTrackType child, + void setChildPIDSpecies(femto_universe_v0_selection::ChildTrackType child, T& pids) { - if (child == femtoUniverseV0Selection::kPosTrack) { - PosDaughTrack.setPIDSpecies(pids); - } else if (child == femtoUniverseV0Selection::kNegTrack) { - NegDaughTrack.setPIDSpecies(pids); + if (child == femto_universe_v0_selection::kPosTrack) { + posDaughTrack.setPIDSpecies(pids); + } else if (child == femto_universe_v0_selection::kNegTrack) { + negDaughTrack.setPIDSpecies(pids); } } @@ -124,12 +119,12 @@ class FemtoUniverseV0Selection /// \param iSel Track selection variable to be examined /// \param prefix Additional prefix for the name of the configurable /// \param suffix Additional suffix for the name of the configurable - static std::string getSelectionName(femtoUniverseV0Selection::V0Sel iSel, + static std::string getSelectionName(femto_universe_v0_selection::V0Sel iSel, std::string_view prefix = "", std::string_view suffix = "") { std::string outString = static_cast(prefix); - outString += static_cast(mSelectionNames[iSel]); + outString += static_cast(kSelectionNames[iSel]); outString += suffix; return outString; } @@ -142,7 +137,7 @@ class FemtoUniverseV0Selection { for (int index = 0; index < kNv0Selection; index++) { std::string comp = static_cast(prefix) + - static_cast(mSelectionNames[index]); + static_cast(kSelectionNames[index]); std::string_view cmp{comp}; if (obs.compare(cmp) == 0) return index; @@ -153,8 +148,7 @@ class FemtoUniverseV0Selection /// Helper function to obtain the type of a given selection variable for consistent naming of the configurables /// \param iSel V0 selection variable whose type is returned - static femtoUniverseSelection::SelectionType - getSelectionType(femtoUniverseV0Selection::V0Sel iSel) + static femto_universe_selection::SelectionType getSelectionType(femto_universe_v0_selection::V0Sel iSel) { return mSelectionTypes[iSel]; } @@ -163,11 +157,11 @@ class FemtoUniverseV0Selection /// for consistent description of the configurables /// \param iSel Track selection variable to be examined /// \param prefix Additional prefix for the output of the configurable - static std::string getSelectionHelper(femtoUniverseV0Selection::V0Sel iSel, + static std::string getSelectionHelper(femto_universe_v0_selection::V0Sel iSel, std::string_view prefix = "") { std::string outString = static_cast(prefix); - outString += static_cast(mSelectionHelper[iSel]); + outString += static_cast(kSelectionHelper[iSel]); return outString; } @@ -195,21 +189,21 @@ class FemtoUniverseV0Selection nSigmaPIDOffsetTPC = offsetTPC; } - void setChildRejectNotPropagatedTracks(femtoUniverseV0Selection::ChildTrackType child, bool reject) + void setChildRejectNotPropagatedTracks(femto_universe_v0_selection::ChildTrackType child, bool reject) { - if (child == femtoUniverseV0Selection::kPosTrack) { - PosDaughTrack.setRejectNotPropagatedTracks(reject); - } else if (child == femtoUniverseV0Selection::kNegTrack) { - NegDaughTrack.setRejectNotPropagatedTracks(reject); + if (child == femto_universe_v0_selection::kPosTrack) { + posDaughTrack.setRejectNotPropagatedTracks(reject); + } else if (child == femto_universe_v0_selection::kNegTrack) { + negDaughTrack.setRejectNotPropagatedTracks(reject); } } - void setChildnSigmaPIDOffset(femtoUniverseV0Selection::ChildTrackType child, float offsetTPC, float offsetTOF) + void setChildnSigmaPIDOffset(femto_universe_v0_selection::ChildTrackType child, float offsetTPC, float offsetTOF) { - if (child == femtoUniverseV0Selection::kPosTrack) { - PosDaughTrack.setnSigmaPIDOffset(offsetTPC, offsetTOF); - } else if (child == femtoUniverseV0Selection::kNegTrack) { - NegDaughTrack.setnSigmaPIDOffset(offsetTPC, offsetTOF); + if (child == femto_universe_v0_selection::kPosTrack) { + posDaughTrack.setnSigmaPIDOffset(offsetTPC, offsetTOF); + } else if (child == femto_universe_v0_selection::kNegTrack) { + negDaughTrack.setnSigmaPIDOffset(offsetTPC, offsetTOF); } } @@ -225,11 +219,11 @@ class FemtoUniverseV0Selection float pTV0Min; float pTV0Max; float etaV0Max; - float DCAV0DaughMax; - float CPAV0Min; - float TranRadV0Min; - float TranRadV0Max; - float DecVtxMax; + float kDCAV0DaughMax; + float kCPAV0Min; + float kTranRadV0Min; + float kTranRadV0Max; + float kDecVtxMax; float fInvMassLowLimit; float fInvMassUpLimit; @@ -240,30 +234,30 @@ class FemtoUniverseV0Selection float nSigmaPIDOffsetTPC; - FemtoUniverseTrackSelection PosDaughTrack; - FemtoUniverseTrackSelection NegDaughTrack; + FemtoUniverseTrackSelection posDaughTrack; + FemtoUniverseTrackSelection negDaughTrack; static constexpr int kNv0Selection = 9; - static constexpr std::string_view mSelectionNames[kNv0Selection] = { + static constexpr std::string_view kSelectionNames[kNv0Selection] = { "Sign", "PtMin", "PtMax", "EtaMax", "DCAdaughMax", "CPAMin", "TranRadMin", "TranRadMax", "DecVecMax"}; ///< Name of the different ///< selections - static constexpr femtoUniverseSelection::SelectionType + static constexpr femto_universe_selection::SelectionType mSelectionTypes[kNv0Selection]{ - femtoUniverseSelection::kEqual, - femtoUniverseSelection::kLowerLimit, - femtoUniverseSelection::kUpperLimit, - femtoUniverseSelection::kUpperLimit, - femtoUniverseSelection::kUpperLimit, - femtoUniverseSelection::kLowerLimit, - femtoUniverseSelection::kLowerLimit, - femtoUniverseSelection::kUpperLimit, - femtoUniverseSelection::kUpperLimit}; ///< Map to match a variable with - ///< its type - - static constexpr std::string_view mSelectionHelper[kNv0Selection] = { + femto_universe_selection::kEqual, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kLowerLimit, + femto_universe_selection::kUpperLimit, + femto_universe_selection::kUpperLimit}; ///< Map to match a variable with + ///< its type + + static constexpr std::string_view kSelectionHelper[kNv0Selection] = { "+1 for lambda, -1 for antilambda", "Minimum pT (GeV/c)", "Maximum pT (GeV/c)", @@ -275,7 +269,7 @@ class FemtoUniverseV0Selection "Maximum distance from primary vertex"}; ///< Helper information for the ///< different selections -}; // namespace femtoUniverse +}; // namespace femto_universe template add((folderName + "/hEta").c_str(), "; #eta; Entries", kTH1F, {{1000, -1, 1}}); mHistogramRegistry->add((folderName + "/hPhi").c_str(), "; #phi; Entries", - kTH1F, {{1000, 0, 2. * M_PI}}); + kTH1F, {{1000, 0, o2::constants::math::TwoPI}}); mHistogramRegistry->add((folderName + "/hDaughDCA").c_str(), "; DCA^{daugh} (cm); Entries", kTH1F, {{1000, 0, 10}}); @@ -336,11 +330,11 @@ void FemtoUniverseV0Selection::init(HistogramRegistry* registry) mHistogramRegistry->add((folderName + "/hInvMassLambdaAntiLambda").c_str(), "", kTH2F, {massAxisLambda, massAxisAntiLambda}); - PosDaughTrack.init( mHistogramRegistry); - NegDaughTrack.init( mHistogramRegistry); @@ -371,31 +365,31 @@ void FemtoUniverseV0Selection::init(HistogramRegistry* registry) } /// check whether the most open cuts are fulfilled - most of this should have /// already be done by the filters - nPtV0MinSel = getNSelections(femtoUniverseV0Selection::kV0pTMin); - nPtV0MaxSel = getNSelections(femtoUniverseV0Selection::kV0pTMax); - nEtaV0MaxSel = getNSelections(femtoUniverseV0Selection::kV0etaMax); - nDCAV0DaughMax = getNSelections(femtoUniverseV0Selection::kV0DCADaughMax); - nCPAV0Min = getNSelections(femtoUniverseV0Selection::kV0CPAMin); - nTranRadV0Min = getNSelections(femtoUniverseV0Selection::kV0TranRadMin); - nTranRadV0Max = getNSelections(femtoUniverseV0Selection::kV0TranRadMax); - nDecVtxMax = getNSelections(femtoUniverseV0Selection::kV0DecVtxMax); - - pTV0Min = getMinimalSelection(femtoUniverseV0Selection::kV0pTMin, - femtoUniverseSelection::kLowerLimit); - pTV0Max = getMinimalSelection(femtoUniverseV0Selection::kV0pTMax, - femtoUniverseSelection::kUpperLimit); - etaV0Max = getMinimalSelection(femtoUniverseV0Selection::kV0etaMax, - femtoUniverseSelection::kAbsUpperLimit); - DCAV0DaughMax = getMinimalSelection(femtoUniverseV0Selection::kV0DCADaughMax, - femtoUniverseSelection::kUpperLimit); - CPAV0Min = getMinimalSelection(femtoUniverseV0Selection::kV0CPAMin, - femtoUniverseSelection::kLowerLimit); - TranRadV0Min = getMinimalSelection(femtoUniverseV0Selection::kV0TranRadMin, - femtoUniverseSelection::kLowerLimit); - TranRadV0Max = getMinimalSelection(femtoUniverseV0Selection::kV0TranRadMax, - femtoUniverseSelection::kUpperLimit); - DecVtxMax = getMinimalSelection(femtoUniverseV0Selection::kV0DecVtxMax, - femtoUniverseSelection::kAbsUpperLimit); + nPtV0MinSel = getNSelections(femto_universe_v0_selection::kV0pTMin); + nPtV0MaxSel = getNSelections(femto_universe_v0_selection::kV0pTMax); + nEtaV0MaxSel = getNSelections(femto_universe_v0_selection::kV0etaMax); + nDCAV0DaughMax = getNSelections(femto_universe_v0_selection::kV0DCADaughMax); + nCPAV0Min = getNSelections(femto_universe_v0_selection::kV0CPAMin); + nTranRadV0Min = getNSelections(femto_universe_v0_selection::kV0TranRadMin); + nTranRadV0Max = getNSelections(femto_universe_v0_selection::kV0TranRadMax); + nDecVtxMax = getNSelections(femto_universe_v0_selection::kV0DecVtxMax); + + pTV0Min = getMinimalSelection(femto_universe_v0_selection::kV0pTMin, + femto_universe_selection::kLowerLimit); + pTV0Max = getMinimalSelection(femto_universe_v0_selection::kV0pTMax, + femto_universe_selection::kUpperLimit); + etaV0Max = getMinimalSelection(femto_universe_v0_selection::kV0etaMax, + femto_universe_selection::kAbsUpperLimit); + kDCAV0DaughMax = getMinimalSelection(femto_universe_v0_selection::kV0DCADaughMax, + femto_universe_selection::kUpperLimit); + kCPAV0Min = getMinimalSelection(femto_universe_v0_selection::kV0CPAMin, + femto_universe_selection::kLowerLimit); + kTranRadV0Min = getMinimalSelection(femto_universe_v0_selection::kV0TranRadMin, + femto_universe_selection::kLowerLimit); + kTranRadV0Max = getMinimalSelection(femto_universe_v0_selection::kV0TranRadMax, + femto_universe_selection::kUpperLimit); + kDecVtxMax = getMinimalSelection(femto_universe_v0_selection::kV0DecVtxMax, + femto_universe_selection::kAbsUpperLimit); } template @@ -441,42 +435,42 @@ bool FemtoUniverseV0Selection::isSelectedMinimal(C const& /*col*/, V const& v0, if (nEtaV0MaxSel > 0 && std::abs(eta) > etaV0Max) { return false; } - if (nDCAV0DaughMax > 0 && dcaDaughv0 > DCAV0DaughMax) { + if (nDCAV0DaughMax > 0 && dcaDaughv0 > kDCAV0DaughMax) { return false; } - if (nCPAV0Min > 0 && cpav0 < CPAV0Min) { + if (nCPAV0Min > 0 && cpav0 < kCPAV0Min) { return false; } - if (nTranRadV0Min > 0 && tranRad < TranRadV0Min) { + if (nTranRadV0Min > 0 && tranRad < kTranRadV0Min) { return false; } - if (nTranRadV0Max > 0 && tranRad > TranRadV0Max) { + if (nTranRadV0Max > 0 && tranRad > kTranRadV0Max) { return false; } for (size_t i = 0; i < decVtx.size(); i++) { - if (nDecVtxMax > 0 && decVtx.at(i) > DecVtxMax) { + if (nDecVtxMax > 0 && decVtx.at(i) > kDecVtxMax) { return false; } } - if (!PosDaughTrack.isSelectedMinimal(posTrack)) { + if (!posDaughTrack.isSelectedMinimal(posTrack)) { return false; } - if (!NegDaughTrack.isSelectedMinimal(negTrack)) { + if (!negDaughTrack.isSelectedMinimal(negTrack)) { return false; } // check that track combinations for V0 or antiV0 would be fulfilling PID - float nSigmaPIDMax = PosDaughTrack.getSigmaPIDMax(); + float nSigmaPIDMax = posDaughTrack.getSigmaPIDMax(); // antiV0 auto nSigmaPrNeg = negTrack.tpcNSigmaPr(); auto nSigmaPiPos = posTrack.tpcNSigmaPi(); // v0 auto nSigmaPiNeg = negTrack.tpcNSigmaPi(); auto nSigmaPrPos = posTrack.tpcNSigmaPr(); - if (!(abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && - abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax) && - !(abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && - abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax)) { + if (!(std::abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && + std::abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax) && + !(std::abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && + std::abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax)) { return false; } @@ -521,24 +515,24 @@ void FemtoUniverseV0Selection::fillLambdaQA(C const& /*col*/, V const& v0, mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaEtaMax"), v0.mLambda()); } - if (dcaDaughv0 < DCAV0DaughMax) { + if (dcaDaughv0 < kDCAV0DaughMax) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaDCAV0Daugh"), v0.mLambda()); } - if (cpav0 > CPAV0Min) { + if (cpav0 > kCPAV0Min) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaCPA"), v0.mLambda()); } - if (tranRad > TranRadV0Min) { + if (tranRad > kTranRadV0Min) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaTranRadMin"), v0.mLambda()); } - if (tranRad < TranRadV0Max) { + if (tranRad < kTranRadV0Max) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaTranRadMax"), v0.mLambda()); } bool write = true; for (size_t i = 0; i < decVtx.size(); i++) { - write = write && (decVtx.at(i) < DecVtxMax); + write = write && (decVtx.at(i) < kDecVtxMax); } if (write) { mHistogramRegistry->fill(HIST("LambdaQA/hInvMassLambdaDecVtxMax"), @@ -552,33 +546,33 @@ template std::array FemtoUniverseV0Selection::getCutContainer(C const& /*col*/, V const& v0, T const& posTrack, T const& negTrack) { - auto outputPosTrack = PosDaughTrack.getCutContainer(posTrack); - auto outputNegTrack = NegDaughTrack.getCutContainer(negTrack); + auto outputPosTrack = posDaughTrack.getCutContainer(posTrack); + auto outputNegTrack = negDaughTrack.getCutContainer(negTrack); cutContainerType output = 0; size_t counter = 0; - auto lambdaMassNominal = TDatabasePDG::Instance()->GetParticle(3122)->Mass(); // FIXME: Get from the common header + auto lambdaMassNominal = o2::constants::physics::MassLambda; // FIXME: Get from the common header auto lambdaMassHypothesis = v0.mLambda(); auto antiLambdaMassHypothesis = v0.mAntiLambda(); - auto diffLambda = abs(lambdaMassNominal - lambdaMassHypothesis); - auto diffAntiLambda = abs(antiLambdaMassHypothesis - lambdaMassHypothesis); + auto diffLambda = std::abs(lambdaMassNominal - lambdaMassHypothesis); + auto diffAntiLambda = std::abs(antiLambdaMassHypothesis - lambdaMassHypothesis); float sign = 0.; - float nSigmaPIDMax = PosDaughTrack.getSigmaPIDMax(); + float nSigmaPIDMax = posDaughTrack.getSigmaPIDMax(); auto nSigmaPrNeg = negTrack.tpcNSigmaPr(); auto nSigmaPiPos = posTrack.tpcNSigmaPi(); auto nSigmaPiNeg = negTrack.tpcNSigmaPi(); auto nSigmaPrPos = posTrack.tpcNSigmaPr(); // check the mass and the PID of daughters - if (abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && diffAntiLambda > diffLambda) { + if (std::abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && std::abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && diffAntiLambda > diffLambda) { sign = -1.; - } else if (abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && diffAntiLambda < diffLambda) { + } else if (std::abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && std::abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && diffAntiLambda < diffLambda) { sign = 1.; } else { // if it happens that none of these are true, ignore the invariant mass - if (abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax) { + if (std::abs(nSigmaPrNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax && std::abs(nSigmaPiPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax) { sign = -1.; - } else if (abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax) { + } else if (std::abs(nSigmaPrPos - nSigmaPIDOffsetTPC) < nSigmaPIDMax && std::abs(nSigmaPiNeg - nSigmaPIDOffsetTPC) < nSigmaPIDMax) { sign = 1.; } } @@ -593,38 +587,38 @@ std::array float observable = 0.; for (auto& sel : mSelections) { const auto selVariable = sel.getSelectionVariable(); - if (selVariable == femtoUniverseV0Selection::kV0DecVtxMax) { + if (selVariable == femto_universe_v0_selection::kV0DecVtxMax) { for (size_t i = 0; i < decVtx.size(); ++i) { auto decVtxValue = decVtx.at(i); sel.checkSelectionSetBit(decVtxValue, output, counter); } } else { switch (selVariable) { - case (femtoUniverseV0Selection::kV0Sign): + case (femto_universe_v0_selection::kV0Sign): observable = sign; break; - case (femtoUniverseV0Selection::kV0pTMin): + case (femto_universe_v0_selection::kV0pTMin): observable = pT; break; - case (femtoUniverseV0Selection::kV0pTMax): + case (femto_universe_v0_selection::kV0pTMax): observable = pT; break; - case (femtoUniverseV0Selection::kV0etaMax): + case (femto_universe_v0_selection::kV0etaMax): observable = eta; break; - case (femtoUniverseV0Selection::kV0DCADaughMax): + case (femto_universe_v0_selection::kV0DCADaughMax): observable = dcaDaughv0; break; - case (femtoUniverseV0Selection::kV0CPAMin): + case (femto_universe_v0_selection::kV0CPAMin): observable = cpav0; break; - case (femtoUniverseV0Selection::kV0TranRadMin): + case (femto_universe_v0_selection::kV0TranRadMin): observable = tranRad; break; - case (femtoUniverseV0Selection::kV0TranRadMax): + case (femto_universe_v0_selection::kV0TranRadMax): observable = tranRad; break; - case (femtoUniverseV0Selection::kV0DecVtxMax): + case (femto_universe_v0_selection::kV0DecVtxMax): break; } sel.checkSelectionSetBit(observable, output, counter); @@ -632,10 +626,10 @@ std::array } return { output, - outputPosTrack.at(femtoUniverseTrackSelection::TrackContainerPosition::kCuts), - outputPosTrack.at(femtoUniverseTrackSelection::TrackContainerPosition::kPID), - outputNegTrack.at(femtoUniverseTrackSelection::TrackContainerPosition::kCuts), - outputNegTrack.at(femtoUniverseTrackSelection::TrackContainerPosition::kPID)}; + outputPosTrack.at(femto_universe_track_selection::TrackContainerPosition::kCuts), + outputPosTrack.at(femto_universe_track_selection::TrackContainerPosition::kPID), + outputNegTrack.at(femto_universe_track_selection::TrackContainerPosition::kCuts), + outputNegTrack.at(femto_universe_track_selection::TrackContainerPosition::kPID)}; } template (posTrack); - NegDaughTrack.fillQA(negTrack); } -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEV0SELECTION_H_ diff --git a/PWGCF/FemtoUniverse/Core/FemtoUtils.h b/PWGCF/FemtoUniverse/Core/femtoUtils.h similarity index 80% rename from PWGCF/FemtoUniverse/Core/FemtoUtils.h rename to PWGCF/FemtoUniverse/Core/femtoUtils.h index 54dbbe4e02b..9fb075d6d53 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUtils.h +++ b/PWGCF/FemtoUniverse/Core/femtoUtils.h @@ -9,7 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file FemtoUtils.h +/// \file femtoUtils.h /// \brief Utilities for the FemtoUniverse framework /// \author Luca Barioglio, TU München, luca.barioglio@cern.ch /// \author Zuzanna Chochulska, WUT Warsaw & CTU Prague, zchochul@cern.ch @@ -23,10 +23,10 @@ #include "Framework/ASoAHelpers.h" #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" -namespace o2::analysis::femtoUniverse +namespace o2::analysis::femto_universe { -enum kDetector { kTPC, +enum KDetector { kTPC, kTPCTOF, kNdetectors }; @@ -51,19 +51,19 @@ int getPIDselection(float nSigma, std::vector vNsigma) /// \param nSpecies number of available selected species (output from cutculator), i.e. how many particle types were saved in the skimmed data /// \param nSigma Nsigma selection for PID (e.g. 3, for NsigmaTPC < 3 or NsigmaTPCTOF < 3) /// \param vNsigma vector with available n-sigma selections for PID (to check if chosen nSigma value is avialable + size to get the bit number) -/// \param kDetector enum corresponding to the PID technique +/// \param KDetector enum corresponding to the PID technique /// \return Whether the PID selection specified in the vectors is fulfilled bool isPIDSelected(aod::femtouniverseparticle::cutContainerType pidcut, int vSpecies, int nSpecies, float nSigma, std::vector vNsigma, - kDetector iDet) + KDetector iDet) { int iNsigma = getPIDselection(nSigma, vNsigma); - int nDet = static_cast(kDetector::kNdetectors); - int bit_to_check = 1 + (vNsigma.size() - (iNsigma + 1)) * nDet * nSpecies + (nSpecies - (vSpecies + 1)) * nSpecies + (nDet - 1 - iDet); - return ((pidcut >> (bit_to_check)) & 1) == 1; + int nDet = static_cast(KDetector::kNdetectors); + int bitToCheck = 1 + (vNsigma.size() - (iNsigma + 1)) * nDet * nSpecies + (nSpecies - (vSpecies + 1)) * nSpecies + (nDet - 1 - iDet); + return ((pidcut >> (bitToCheck)) & 1) == 1; }; /// function that checks whether the PID selection specified in the vectors is fulfilled, depending on the momentum TPC or TPC+TOF PID is conducted @@ -88,10 +88,10 @@ bool isFullPIDSelected(aod::femtouniverseparticle::cutContainerType const& pidCu bool pidSelection = true; if (momentum < pidThresh) { /// TPC PID only - pidSelection = isPIDSelected(pidCut, vSpecies, nSpecies, nSigmaTPC, vNsigma, kDetector::kTPC); + pidSelection = isPIDSelected(pidCut, vSpecies, nSpecies, nSigmaTPC, vNsigma, KDetector::kTPC); } else { /// TPC + TOF PID - pidSelection = isPIDSelected(pidCut, vSpecies, nSpecies, nSigmaTPCTOF, vNsigma, kDetector::kTPCTOF); + pidSelection = isPIDSelected(pidCut, vSpecies, nSpecies, nSigmaTPCTOF, vNsigma, KDetector::kTPCTOF); } return pidSelection; }; @@ -101,31 +101,31 @@ int checkDaughterType(o2::aod::femtouniverseparticle::ParticleType partType, int int partOrigin = 0; if (partType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { - switch (abs(motherPDG)) { + switch (std::abs(motherPDG)) { case 3122: - partOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kDaughterLambda; + partOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kDaughterLambda; break; case 3222: - partOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kDaughterSigmaplus; + partOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kDaughterSigmaplus; break; default: - partOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kDaughter; + partOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kDaughter; } // switch } else if (partType == o2::aod::femtouniverseparticle::ParticleType::kV0) { - partOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kDaughter; + partOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kDaughter; } else if (partType == o2::aod::femtouniverseparticle::ParticleType::kV0Child) { - partOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kDaughter; + partOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kDaughter; } else if (partType == o2::aod::femtouniverseparticle::ParticleType::kCascade) { - partOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kDaughter; + partOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kDaughter; } else if (partType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor) { - partOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kDaughter; + partOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kDaughter; } return partOrigin; }; -} // namespace o2::analysis::femtoUniverse +} // namespace o2::analysis::femto_universe #endif // PWGCF_FEMTOUNIVERSE_CORE_FEMTOUTILS_H_ diff --git a/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h b/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h index 7f43c675053..fd2f4f2b5b0 100644 --- a/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h +++ b/PWGCF/FemtoUniverse/DataModel/FemtoDerived.h @@ -9,6 +9,10 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +/// \file FemtoDerived.h +/// \brief Declaration of FemtoUniverse tables +/// \author Zuzanna Chochulska, WUT Warsaw & CTU Prague, zchochul@cern.ch + #ifndef PWGCF_FEMTOUNIVERSE_DATAMODEL_FEMTODERIVED_H_ #define PWGCF_FEMTOUNIVERSE_DATAMODEL_FEMTODERIVED_H_ @@ -243,7 +247,7 @@ DECLARE_SOA_TABLE(FDCascParticles, "AOD", "FDCASCPARTICLE", using FDCascParticle = FDCascParticles::iterator; /// FemtoUniverseTrackMC -namespace femtouniverseMCparticle +namespace femtouniverse_mc_particle { /// Distinuishes the different particle origins enum ParticleOriginMCTruth { @@ -281,19 +285,19 @@ DECLARE_SOA_COLUMN(PDGMCTruth, pdgMCTruth, int); //! Particle // debug variables DECLARE_SOA_COLUMN(MotherPDG, motherPDG, int); //! Checks mother PDG, where mother is the primary particle for that decay chain -} // namespace femtouniverseMCparticle +} // namespace femtouniverse_mc_particle DECLARE_SOA_TABLE(FDMCParticles, "AOD", "FDMCPARTICLE", o2::soa::Index<>, - femtouniverseMCparticle::PartOriginMCTruth, - femtouniverseMCparticle::PDGMCTruth, + femtouniverse_mc_particle::PartOriginMCTruth, + femtouniverse_mc_particle::PDGMCTruth, femtouniverseparticle::Pt, femtouniverseparticle::Eta, femtouniverseparticle::Phi); using FDMCParticle = FDMCParticles::iterator; DECLARE_SOA_TABLE(FDExtMCParticles, "AOD", "FDEXTMCPARTICLE", - femtouniverseMCparticle::MotherPDG); + femtouniverse_mc_particle::MotherPDG); using FDExtMCParticle = FDExtMCParticles::iterator; namespace mcfdlabel diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerMCTruthTask.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerMCTruthTask.cxx index 117b5c57624..9e68e923755 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerMCTruthTask.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerMCTruthTask.cxx @@ -26,7 +26,7 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniversePhiSelection.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "Framework/ASoAHelpers.h" #include "Framework/AnalysisDataModel.h" #include "Framework/AnalysisTask.h" @@ -40,7 +40,7 @@ #include "TLorentzVector.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerReducedTask.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerReducedTask.cxx index 9ab0fd70736..23b289e7876 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerReducedTask.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerReducedTask.cxx @@ -36,10 +36,10 @@ #include "DataFormatsParameters/GRPObject.h" #include "DataFormatsParameters/GRPMagField.h" #include "Math/Vector4D.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; @@ -92,19 +92,19 @@ struct femtoUniverseProducerReducedTask { Configurable ConfPDGCodeTrack{"ConfPDGCodeTrack", 2212, "PDG code of the selected track for Monte Carlo truth"}; // Track cuts FemtoUniverseTrackSelection trackCuts; - Configurable> ConfTrkCharge{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kSign, "ConfTrk"), std::vector{-1, 1}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kSign, "Track selection: ")}; - Configurable> ConfTrkPtmin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kpTMin, "ConfTrk"), std::vector{0.4f, 0.6f, 0.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kpTMin, "Track selection: ")}; - Configurable> ConfTrkPtmax{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kpTMax, "ConfTrk"), std::vector{5.4f, 5.6f, 5.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kpTMax, "Track selection: ")}; - Configurable> ConfTrkEta{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kEtaMax, "ConfTrk"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kEtaMax, "Track selection: ")}; - Configurable> ConfTrkTPCnclsMin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kTPCnClsMin, "ConfTrk"), std::vector{80.f, 70.f, 60.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kTPCnClsMin, "Track selection: ")}; - Configurable> ConfTrkTPCfCls{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kTPCfClsMin, "ConfTrk"), std::vector{0.7f, 0.83f, 0.9f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kTPCfClsMin, "Track selection: ")}; - Configurable> ConfTrkTPCcRowsMin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kTPCcRowsMin, "ConfTrk"), std::vector{70.f, 60.f, 80.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kTPCcRowsMin, "Track selection: ")}; - Configurable> ConfTrkTPCsCls{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kTPCsClsMax, "ConfTrk"), std::vector{0.1f, 160.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kTPCsClsMax, "Track selection: ")}; - Configurable> ConfTrkITSnclsMin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kITSnClsMin, "ConfTrk"), std::vector{-1.f, 2.f, 4.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kITSnClsMin, "Track selection: ")}; - Configurable> ConfTrkITSnclsIbMin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kITSnClsIbMin, "ConfTrk"), std::vector{-1.f, 1.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kITSnClsIbMin, "Track selection: ")}; - Configurable> ConfTrkDCAxyMax{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kDCAxyMax, "ConfTrk"), std::vector{0.1f, 0.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kDCAxyMax, "Track selection: ")}; /// here we need an open cut to do the DCA fits later on! - Configurable> ConfTrkDCAzMax{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kDCAzMax, "ConfTrk"), std::vector{0.2f, 0.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kDCAzMax, "Track selection: ")}; - Configurable> ConfTrkPIDnSigmaMax{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kPIDnSigmaMax, "Conf"), std::vector{3.5f, 3.f, 2.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kPIDnSigmaMax, "Track selection: ")}; + Configurable> ConfTrkCharge{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kSign, "ConfTrk"), std::vector{-1, 1}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kSign, "Track selection: ")}; + Configurable> ConfTrkPtmin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kpTMin, "ConfTrk"), std::vector{0.4f, 0.6f, 0.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kpTMin, "Track selection: ")}; + Configurable> ConfTrkPtmax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kpTMax, "ConfTrk"), std::vector{5.4f, 5.6f, 5.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kpTMax, "Track selection: ")}; + Configurable> ConfTrkEta{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kEtaMax, "ConfTrk"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kEtaMax, "Track selection: ")}; + Configurable> ConfTrkTPCnclsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCnClsMin, "ConfTrk"), std::vector{80.f, 70.f, 60.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCnClsMin, "Track selection: ")}; + Configurable> ConfTrkTPCfCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCfClsMin, "ConfTrk"), std::vector{0.7f, 0.83f, 0.9f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCfClsMin, "Track selection: ")}; + Configurable> ConfTrkTPCcRowsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCcRowsMin, "ConfTrk"), std::vector{70.f, 60.f, 80.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCcRowsMin, "Track selection: ")}; + Configurable> ConfTrkTPCsCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCsClsMax, "ConfTrk"), std::vector{0.1f, 160.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCsClsMax, "Track selection: ")}; + Configurable> ConfTrkITSnclsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kITSnClsMin, "ConfTrk"), std::vector{-1.f, 2.f, 4.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kITSnClsMin, "Track selection: ")}; + Configurable> ConfTrkITSnclsIbMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kITSnClsIbMin, "ConfTrk"), std::vector{-1.f, 1.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kITSnClsIbMin, "Track selection: ")}; + Configurable> ConfTrkDCAxyMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kDCAxyMax, "ConfTrk"), std::vector{0.1f, 0.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kDCAxyMax, "Track selection: ")}; /// here we need an open cut to do the DCA fits later on! + Configurable> ConfTrkDCAzMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kDCAzMax, "ConfTrk"), std::vector{0.2f, 0.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kDCAzMax, "Track selection: ")}; + Configurable> ConfTrkPIDnSigmaMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kPIDnSigmaMax, "Conf"), std::vector{3.5f, 3.f, 2.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kPIDnSigmaMax, "Track selection: ")}; // off set the center of the nsigma distribution to deal with bad TPC/TOF calibration Configurable ConfPIDnSigmaOffsetTPC{"ConfPIDnSigmaOffsetTPC", 0., "Offset for TPC nSigma because of bad calibration"}; Configurable ConfPIDnSigmaOffsetTOF{"ConfPIDnSigmaOffsetTOF", 0., "Offset for TOF nSigma because of bad calibration"}; @@ -121,19 +121,19 @@ struct femtoUniverseProducerReducedTask { colCuts.setCuts(ConfEvtZvtx, ConfEvtTriggerCheck, ConfEvtTriggerSel, ConfEvtOfflineCheck, ConfIsRun3, ConfCentFT0Min, ConfCentFT0Max); colCuts.init(&qaRegistry); - trackCuts.setSelection(ConfTrkCharge, femtoUniverseTrackSelection::kSign, femtoUniverseSelection::kEqual); - trackCuts.setSelection(ConfTrkPtmin, femtoUniverseTrackSelection::kpTMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(ConfTrkPtmax, femtoUniverseTrackSelection::kpTMax, femtoUniverseSelection::kUpperLimit); - trackCuts.setSelection(ConfTrkEta, femtoUniverseTrackSelection::kEtaMax, femtoUniverseSelection::kAbsUpperLimit); - trackCuts.setSelection(ConfTrkTPCnclsMin, femtoUniverseTrackSelection::kTPCnClsMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(ConfTrkTPCfCls, femtoUniverseTrackSelection::kTPCfClsMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(ConfTrkTPCcRowsMin, femtoUniverseTrackSelection::kTPCcRowsMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(ConfTrkTPCsCls, femtoUniverseTrackSelection::kTPCsClsMax, femtoUniverseSelection::kUpperLimit); - trackCuts.setSelection(ConfTrkITSnclsMin, femtoUniverseTrackSelection::kITSnClsMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(ConfTrkITSnclsIbMin, femtoUniverseTrackSelection::kITSnClsIbMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(ConfTrkDCAxyMax, femtoUniverseTrackSelection::kDCAxyMax, femtoUniverseSelection::kAbsUpperLimit); - trackCuts.setSelection(ConfTrkDCAzMax, femtoUniverseTrackSelection::kDCAzMax, femtoUniverseSelection::kAbsUpperLimit); - trackCuts.setSelection(ConfTrkPIDnSigmaMax, femtoUniverseTrackSelection::kPIDnSigmaMax, femtoUniverseSelection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + trackCuts.setSelection(ConfTrkPtmin, femto_universe_track_selection::kpTMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkPtmax, femto_universe_track_selection::kpTMax, femto_universe_selection::kUpperLimit); + trackCuts.setSelection(ConfTrkEta, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkTPCnclsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkTPCfCls, femto_universe_track_selection::kTPCfClsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkTPCcRowsMin, femto_universe_track_selection::kTPCcRowsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkTPCsCls, femto_universe_track_selection::kTPCsClsMax, femto_universe_selection::kUpperLimit); + trackCuts.setSelection(ConfTrkITSnclsMin, femto_universe_track_selection::kITSnClsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkITSnclsIbMin, femto_universe_track_selection::kITSnClsIbMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(ConfTrkDCAxyMax, femto_universe_track_selection::kDCAxyMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkDCAzMax, femto_universe_track_selection::kDCAzMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(ConfTrkPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); trackCuts.setPIDSpecies(ConfPIDspecies); trackCuts.setnSigmaPIDOffset(ConfPIDnSigmaOffsetTPC, ConfPIDnSigmaOffsetTOF); trackCuts.init> confTrkCharge{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kSign, "ConfTrk"), std::vector{-1, 1}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kSign, "Track selection: ")}; - Configurable> confTrkPtmin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kpTMin, "ConfTrk"), std::vector{0.5f, 0.4f, 0.6f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kpTMin, "Track selection: ")}; - Configurable> confTrkPtmax{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kpTMax, "ConfTrk"), std::vector{5.4f, 5.6f, 5.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kpTMax, "Track selection: ")}; - Configurable> confTrkEta{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kEtaMax, "ConfTrk"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kEtaMax, "Track selection: ")}; - Configurable> confTrkTPCnclsMin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kTPCnClsMin, "ConfTrk"), std::vector{70.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kTPCnClsMin, "Track selection: ")}; - Configurable> confTrkTPCfCls{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kTPCfClsMin, "ConfTrk"), std::vector{0.83f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kTPCfClsMin, "Track selection: ")}; - Configurable> confTrkTPCcRowsMin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kTPCcRowsMin, "ConfTrk"), std::vector{70.f, 60.f, 80.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kTPCcRowsMin, "Track selection: ")}; - Configurable> confTrkTPCsCls{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kTPCsClsMax, "ConfTrk"), std::vector{0.1f, 160.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kTPCsClsMax, "Track selection: ")}; - Configurable> confTrkITSnclsMin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kITSnClsMin, "ConfTrk"), std::vector{-1.f, 2.f, 4.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kITSnClsMin, "Track selection: ")}; - Configurable> confTrkITSnclsIbMin{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kITSnClsIbMin, "ConfTrk"), std::vector{-1.f, 1.f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kITSnClsIbMin, "Track selection: ")}; - Configurable> confTrkDCAxyMax{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kDCAxyMax, "ConfTrk"), std::vector{0.1f, 3.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kDCAxyMax, "Track selection: ")}; - Configurable> confTrkDCAzMax{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kDCAzMax, "ConfTrk"), std::vector{0.2f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kDCAzMax, "Track selection: ")}; /// \todo Reintegrate PID to the general selection container - Configurable> confTrkPIDnSigmaMax{FemtoUniverseTrackSelection::getSelectionName(femtoUniverseTrackSelection::kPIDnSigmaMax, "ConfTrk"), std::vector{3.5f, 3.f, 2.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femtoUniverseTrackSelection::kPIDnSigmaMax, "Track selection: ")}; + Configurable> confTrkCharge{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kSign, "ConfTrk"), std::vector{-1, 1}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kSign, "Track selection: ")}; + Configurable> confTrkPtmin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kpTMin, "ConfTrk"), std::vector{0.5f, 0.4f, 0.6f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kpTMin, "Track selection: ")}; + Configurable> confTrkPtmax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kpTMax, "ConfTrk"), std::vector{5.4f, 5.6f, 5.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kpTMax, "Track selection: ")}; + Configurable> confTrkEta{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kEtaMax, "ConfTrk"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kEtaMax, "Track selection: ")}; + Configurable> confTrkTPCnclsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCnClsMin, "ConfTrk"), std::vector{70.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCnClsMin, "Track selection: ")}; + Configurable> confTrkTPCfCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCfClsMin, "ConfTrk"), std::vector{0.83f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCfClsMin, "Track selection: ")}; + Configurable> confTrkTPCcRowsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCcRowsMin, "ConfTrk"), std::vector{70.f, 60.f, 80.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCcRowsMin, "Track selection: ")}; + Configurable> confTrkTPCsCls{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kTPCsClsMax, "ConfTrk"), std::vector{0.1f, 160.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kTPCsClsMax, "Track selection: ")}; + Configurable> confTrkITSnclsMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kITSnClsMin, "ConfTrk"), std::vector{-1.f, 2.f, 4.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kITSnClsMin, "Track selection: ")}; + Configurable> confTrkITSnclsIbMin{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kITSnClsIbMin, "ConfTrk"), std::vector{-1.f, 1.f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kITSnClsIbMin, "Track selection: ")}; + Configurable> confTrkDCAxyMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kDCAxyMax, "ConfTrk"), std::vector{0.1f, 3.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kDCAxyMax, "Track selection: ")}; + Configurable> confTrkDCAzMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kDCAzMax, "ConfTrk"), std::vector{0.2f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kDCAzMax, "Track selection: ")}; /// \todo Reintegrate PID to the general selection container + Configurable> confTrkPIDnSigmaMax{FemtoUniverseTrackSelection::getSelectionName(femto_universe_track_selection::kPIDnSigmaMax, "ConfTrk"), std::vector{3.5f, 3.f, 2.5f}, FemtoUniverseTrackSelection::getSelectionHelper(femto_universe_track_selection::kPIDnSigmaMax, "Track selection: ")}; Configurable confTrkPIDnSigmaOffsetTPC{"confTrkPIDnSigmaOffsetTPC", 0., "Offset for TPC nSigma because of bad calibration"}; Configurable confTrkPIDnSigmaOffsetTOF{"confTrkPIDnSigmaOffsetTOF", 0., "Offset for TOF nSigma because of bad calibration"}; Configurable> confTrkPIDspecies{"confTrkPIDspecies", std::vector{o2::track::PID::Pion, o2::track::PID::Kaon, o2::track::PID::Proton, o2::track::PID::Deuteron}, "Trk sel: Particles species for PID (Pion=2, Kaon=3, Proton=4, Deuteron=5)"}; @@ -185,15 +185,15 @@ struct FemtoUniverseProducerTask { FemtoUniverseV0Selection v0Cuts; struct : o2::framework::ConfigurableGroup { // Configurable confIsFillV0s{"confIsFillV0s", false, "Choice to fill V0s"}; //Commented: not used configurable - Configurable> confV0Sign{FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0Sign, "ConfV0"), std::vector{-1, 1}, FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0Sign, "V0 selection: ")}; - Configurable> confV0PtMin{FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0pTMin, "ConfV0"), std::vector{0.3f, 0.4f, 0.5f}, FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0pTMin, "V0 selection: ")}; - Configurable> confV0PtMax{FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0pTMax, "ConfV0"), std::vector{3.3f, 3.4f, 3.5f}, FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0pTMax, "V0 selection: ")}; - Configurable> confV0EtaMax{FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0etaMax, "ConfV0"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0etaMax, "V0 selection: ")}; - Configurable> confV0DCADaughMax{FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0DCADaughMax, "ConfV0"), std::vector{1.2f, 1.5f}, FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0DCADaughMax, "V0 selection: ")}; - Configurable> confV0CPAMin{FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0CPAMin, "ConfV0"), std::vector{0.99f, 0.995f}, FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0CPAMin, "V0 selection: ")}; - Configurable> confV0TranRadMin{FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0TranRadMin, "ConfV0"), std::vector{0.2f}, FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0TranRadMin, "V0 selection: ")}; - Configurable> confV0TranRadMax{FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0TranRadMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0TranRadMax, "V0 selection: ")}; - Configurable> confV0DecVtxMax{FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0DecVtxMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0DecVtxMax, "V0 selection: ")}; + Configurable> confV0Sign{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0Sign, "ConfV0"), std::vector{-1, 1}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0Sign, "V0 selection: ")}; + Configurable> confV0PtMin{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0pTMin, "ConfV0"), std::vector{0.3f, 0.4f, 0.5f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0pTMin, "V0 selection: ")}; + Configurable> confV0PtMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0pTMax, "ConfV0"), std::vector{3.3f, 3.4f, 3.5f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0pTMax, "V0 selection: ")}; + Configurable> confV0EtaMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0etaMax, "ConfV0"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0etaMax, "V0 selection: ")}; + Configurable> confV0DCADaughMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0DCADaughMax, "ConfV0"), std::vector{1.2f, 1.5f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0DCADaughMax, "V0 selection: ")}; + Configurable> confV0CPAMin{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0CPAMin, "ConfV0"), std::vector{0.99f, 0.995f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0CPAMin, "V0 selection: ")}; + Configurable> confV0TranRadMin{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0TranRadMin, "ConfV0"), std::vector{0.2f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0TranRadMin, "V0 selection: ")}; + Configurable> confV0TranRadMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0TranRadMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0TranRadMax, "V0 selection: ")}; + Configurable> confV0DecVtxMax{FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0DecVtxMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0DecVtxMax, "V0 selection: ")}; Configurable> confChildCharge{"confChildCharge", std::vector{-1, 1}, "V0 Child sel: Charge"}; Configurable> confChildEtaMax{"confChildEtaMax", std::vector{0.8f}, "V0 Child sel: max eta"}; @@ -234,27 +234,27 @@ struct FemtoUniverseProducerTask { FemtoUniverseCascadeSelection cascadeCuts; struct : o2::framework::ConfigurableGroup { // Configurable confIsFillCascades{"confIsFillCascades", false, "Choice to fill cascades"}; //Commented: not used configurable - Configurable> confCascSign{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeSign, "ConfCasc"), std::vector{-1, 1}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeSign, "Cascade selection: ")}; - Configurable> confCascPtMin{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadepTMin, "ConfCasc"), std::vector{0.3f, 0.4f, 0.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadepTMin, "Cascade selection: ")}; - Configurable> confCascPtMax{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadepTMax, "ConfCasc"), std::vector{3.3f, 3.4f, 3.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadepTMax, "Cascade selection: ")}; - Configurable> confCascEtaMax{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeetaMax, "ConfCasc"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeetaMax, "Cascade selection: ")}; - Configurable> confCascV0DCADaughMax{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeV0DCADaughMax, "ConfCasc"), std::vector{1.f, 1.2f, 1.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeV0DCADaughMax, "Cascade selection: ")}; - Configurable> confCascV0CPAMin{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeV0CPAMin, "ConfCasc"), std::vector{0.99f, 0.95f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeV0CPAMin, "Cascade selection: ")}; - Configurable> confCascV0TranRadMin{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeV0TranRadMin, "ConfCasc"), std::vector{0.2f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeV0TranRadMin, "Cascade selection: ")}; - Configurable> confCascV0TranRadMax{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeV0TranRadMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeV0TranRadMax, "Cascade selection: ")}; - Configurable> confCascV0DecVtxMax{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeV0DecVtxMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeV0DecVtxMax, "Cascade selection: ")}; - Configurable> confCascDCADaughMax{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeDCADaughMax, "ConfCasc"), std::vector{1.f, 1.2f, 1.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeDCADaughMax, "Cascade selection: ")}; - Configurable> confCascCPAMin{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeCPAMin, "ConfCasc"), std::vector{0.99f, 0.95f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeCPAMin, "Cascade selection: ")}; - Configurable> confCascTranRadMin{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeTranRadMin, "ConfCasc"), std::vector{0.2f, 0.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeTranRadMin, "Cascade selection: ")}; - Configurable> confCascTranRadMax{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeTranRadMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeTranRadMax, "Cascade selection: ")}; - Configurable> confCascDecVtxMax{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeDecVtxMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeDecVtxMax, "Cascade selection: ")}; - - Configurable> confCascDCAPosToPV{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeDCAPosToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeDCAPosToPV, "Cascade selection: ")}; - Configurable> confCascDCANegToPV{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeDCANegToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeDCANegToPV, "Cascade selection: ")}; - Configurable> confCascDCABachToPV{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeDCABachToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeDCABachToPV, "Cascade selection: ")}; - Configurable> confCascDCAV0ToPV{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeDCAV0ToPV, "ConfCasc"), std::vector{0.01f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeDCAV0ToPV, "Cascade selection: ")}; - Configurable> confCascV0MassLowLimit{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeV0MassMin, "ConfCasc"), std::vector{1.05f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeV0MassMin, "Cascade selection: ")}; - Configurable> confCascV0MassUpLimit{FemtoUniverseCascadeSelection::getSelectionName(femtoUniverseCascadeSelection::kCascadeV0MassMax, "ConfCasc"), std::vector{1.30f}, FemtoUniverseCascadeSelection::getSelectionHelper(femtoUniverseCascadeSelection::kCascadeV0MassMax, "Cascade selection: ")}; + Configurable> confCascSign{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeSign, "ConfCasc"), std::vector{-1, 1}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeSign, "Cascade selection: ")}; + Configurable> confCascPtMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadepTMin, "ConfCasc"), std::vector{0.3f, 0.4f, 0.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadepTMin, "Cascade selection: ")}; + Configurable> confCascPtMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadepTMax, "ConfCasc"), std::vector{3.3f, 3.4f, 3.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadepTMax, "Cascade selection: ")}; + Configurable> confCascEtaMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeetaMax, "ConfCasc"), std::vector{0.8f, 0.7f, 0.9f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeetaMax, "Cascade selection: ")}; + Configurable> confCascV0DCADaughMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0DCADaughMax, "ConfCasc"), std::vector{1.f, 1.2f, 1.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0DCADaughMax, "Cascade selection: ")}; + Configurable> confCascV0CPAMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0CPAMin, "ConfCasc"), std::vector{0.99f, 0.95f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0CPAMin, "Cascade selection: ")}; + Configurable> confCascV0TranRadMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0TranRadMin, "ConfCasc"), std::vector{0.2f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0TranRadMin, "Cascade selection: ")}; + Configurable> confCascV0TranRadMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0TranRadMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0TranRadMax, "Cascade selection: ")}; + Configurable> confCascV0DecVtxMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0DecVtxMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0DecVtxMax, "Cascade selection: ")}; + Configurable> confCascDCADaughMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCADaughMax, "ConfCasc"), std::vector{1.f, 1.2f, 1.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCADaughMax, "Cascade selection: ")}; + Configurable> confCascCPAMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeCPAMin, "ConfCasc"), std::vector{0.99f, 0.95f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeCPAMin, "Cascade selection: ")}; + Configurable> confCascTranRadMin{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeTranRadMin, "ConfCasc"), std::vector{0.2f, 0.5f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeTranRadMin, "Cascade selection: ")}; + Configurable> confCascTranRadMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeTranRadMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeTranRadMax, "Cascade selection: ")}; + Configurable> confCascDecVtxMax{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDecVtxMax, "ConfCasc"), std::vector{100.f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDecVtxMax, "Cascade selection: ")}; + + Configurable> confCascDCAPosToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCAPosToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCAPosToPV, "Cascade selection: ")}; + Configurable> confCascDCANegToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCANegToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCANegToPV, "Cascade selection: ")}; + Configurable> confCascDCABachToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCABachToPV, "ConfCasc"), std::vector{0.1f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCABachToPV, "Cascade selection: ")}; + Configurable> confCascDCAV0ToPV{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeDCAV0ToPV, "ConfCasc"), std::vector{0.01f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeDCAV0ToPV, "Cascade selection: ")}; + Configurable> confCascV0MassLowLimit{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0MassMin, "ConfCasc"), std::vector{1.05f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0MassMin, "Cascade selection: ")}; + Configurable> confCascV0MassUpLimit{FemtoUniverseCascadeSelection::getSelectionName(femto_universe_cascade_selection::kCascadeV0MassMax, "ConfCasc"), std::vector{1.30f}, FemtoUniverseCascadeSelection::getSelectionHelper(femto_universe_cascade_selection::kCascadeV0MassMax, "Cascade selection: ")}; Configurable> confCascChildCharge{"confCascChildCharge", std::vector{-1, 1}, "Cascade Child sel: Charge"}; Configurable> confCascChildEtaMax{"confCascChildEtaMax", std::vector{0.8f}, "Cascade Child sel: max eta"}; @@ -468,19 +468,19 @@ struct FemtoUniverseProducerTask { colCuts.setCuts(confEvtZvtx, confEvtTriggerCheck, confEvtTriggerSel, confEvtOfflineCheck, confIsRun3, confCentFT0Min, confCentFT0Max); colCuts.init(&qaRegistry); - trackCuts.setSelection(confTrkCharge, femtoUniverseTrackSelection::kSign, femtoUniverseSelection::kEqual); - trackCuts.setSelection(confTrkPtmin, femtoUniverseTrackSelection::kpTMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(confTrkPtmax, femtoUniverseTrackSelection::kpTMax, femtoUniverseSelection::kUpperLimit); - trackCuts.setSelection(confTrkEta, femtoUniverseTrackSelection::kEtaMax, femtoUniverseSelection::kAbsUpperLimit); - trackCuts.setSelection(confTrkTPCnclsMin, femtoUniverseTrackSelection::kTPCnClsMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(confTrkTPCfCls, femtoUniverseTrackSelection::kTPCfClsMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(confTrkTPCcRowsMin, femtoUniverseTrackSelection::kTPCcRowsMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(confTrkTPCsCls, femtoUniverseTrackSelection::kTPCsClsMax, femtoUniverseSelection::kUpperLimit); - trackCuts.setSelection(confTrkITSnclsMin, femtoUniverseTrackSelection::kITSnClsMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(confTrkITSnclsIbMin, femtoUniverseTrackSelection::kITSnClsIbMin, femtoUniverseSelection::kLowerLimit); - trackCuts.setSelection(confTrkDCAxyMax, femtoUniverseTrackSelection::kDCAxyMax, femtoUniverseSelection::kAbsUpperLimit); - trackCuts.setSelection(confTrkDCAzMax, femtoUniverseTrackSelection::kDCAzMax, femtoUniverseSelection::kAbsUpperLimit); - trackCuts.setSelection(confTrkPIDnSigmaMax, femtoUniverseTrackSelection::kPIDnSigmaMax, femtoUniverseSelection::kAbsUpperLimit); + trackCuts.setSelection(confTrkCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + trackCuts.setSelection(confTrkPtmin, femto_universe_track_selection::kpTMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(confTrkPtmax, femto_universe_track_selection::kpTMax, femto_universe_selection::kUpperLimit); + trackCuts.setSelection(confTrkEta, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(confTrkTPCnclsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(confTrkTPCfCls, femto_universe_track_selection::kTPCfClsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(confTrkTPCcRowsMin, femto_universe_track_selection::kTPCcRowsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(confTrkTPCsCls, femto_universe_track_selection::kTPCsClsMax, femto_universe_selection::kUpperLimit); + trackCuts.setSelection(confTrkITSnclsMin, femto_universe_track_selection::kITSnClsMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(confTrkITSnclsIbMin, femto_universe_track_selection::kITSnClsIbMin, femto_universe_selection::kLowerLimit); + trackCuts.setSelection(confTrkDCAxyMax, femto_universe_track_selection::kDCAxyMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(confTrkDCAzMax, femto_universe_track_selection::kDCAzMax, femto_universe_selection::kAbsUpperLimit); + trackCuts.setSelection(confTrkPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); trackCuts.setPIDSpecies(confTrkPIDspecies); trackCuts.setnSigmaPIDOffset(confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); trackCuts.init(&qaRegistry); @@ -488,39 +488,39 @@ struct FemtoUniverseProducerTask { /// \todo fix how to pass array to setSelection, getRow() passing a /// different type! // v0Cuts.setSelection(ConfV0Selection->getRow(0), - // femtoUniverseV0Selection::kDecVtxMax, femtoUniverseSelection::kAbsUpperLimit); + // femto_universe_v0_selection::kDecVtxMax, femto_universe_selection::kAbsUpperLimit); if (confIsActivateV0) { // initializing for V0 - v0Cuts.setSelection(ConfV0Selection.confV0Sign, femtoUniverseV0Selection::kV0Sign, femtoUniverseSelection::kEqual); - v0Cuts.setSelection(ConfV0Selection.confV0PtMin, femtoUniverseV0Selection::kV0pTMin, femtoUniverseSelection::kLowerLimit); - v0Cuts.setSelection(ConfV0Selection.confV0PtMax, femtoUniverseV0Selection::kV0pTMax, femtoUniverseSelection::kUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0EtaMax, femtoUniverseV0Selection::kV0etaMax, femtoUniverseSelection::kAbsUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0DCADaughMax, femtoUniverseV0Selection::kV0DCADaughMax, femtoUniverseSelection::kUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0CPAMin, femtoUniverseV0Selection::kV0CPAMin, femtoUniverseSelection::kLowerLimit); - v0Cuts.setSelection(ConfV0Selection.confV0TranRadMin, femtoUniverseV0Selection::kV0TranRadMin, femtoUniverseSelection::kLowerLimit); - v0Cuts.setSelection(ConfV0Selection.confV0TranRadMax, femtoUniverseV0Selection::kV0TranRadMax, femtoUniverseSelection::kUpperLimit); - v0Cuts.setSelection(ConfV0Selection.confV0DecVtxMax, femtoUniverseV0Selection::kV0DecVtxMax, femtoUniverseSelection::kUpperLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, ConfV0Selection.confChildCharge, femtoUniverseTrackSelection::kSign, femtoUniverseSelection::kEqual); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, ConfV0Selection.confChildEtaMax, femtoUniverseTrackSelection::kEtaMax, femtoUniverseSelection::kAbsUpperLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, ConfV0Selection.confChildTPCnClsMin, femtoUniverseTrackSelection::kTPCnClsMin, femtoUniverseSelection::kLowerLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, ConfV0Selection.confChildDCAMin, femtoUniverseTrackSelection::kDCAMin, femtoUniverseSelection::kAbsLowerLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, ConfV0Selection.confChildPIDnSigmaMax, femtoUniverseTrackSelection::kPIDnSigmaMax, femtoUniverseSelection::kAbsUpperLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, ConfV0Selection.confChildCharge, femtoUniverseTrackSelection::kSign, femtoUniverseSelection::kEqual); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, ConfV0Selection.confChildEtaMax, femtoUniverseTrackSelection::kEtaMax, femtoUniverseSelection::kAbsUpperLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, ConfV0Selection.confChildTPCnClsMin, femtoUniverseTrackSelection::kTPCnClsMin, femtoUniverseSelection::kLowerLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, ConfV0Selection.confChildDCAMin, femtoUniverseTrackSelection::kDCAMin, femtoUniverseSelection::kAbsLowerLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, ConfV0Selection.confChildPIDnSigmaMax, femtoUniverseTrackSelection::kPIDnSigmaMax, femtoUniverseSelection::kAbsUpperLimit); - v0Cuts.setChildPIDSpecies(femtoUniverseV0Selection::kPosTrack, ConfV0Selection.confChildPIDspecies); - v0Cuts.setChildPIDSpecies(femtoUniverseV0Selection::kNegTrack, ConfV0Selection.confChildPIDspecies); + v0Cuts.setSelection(ConfV0Selection.confV0Sign, femto_universe_v0_selection::kV0Sign, femto_universe_selection::kEqual); + v0Cuts.setSelection(ConfV0Selection.confV0PtMin, femto_universe_v0_selection::kV0pTMin, femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0Selection.confV0PtMax, femto_universe_v0_selection::kV0pTMax, femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0EtaMax, femto_universe_v0_selection::kV0etaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0DCADaughMax, femto_universe_v0_selection::kV0DCADaughMax, femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0CPAMin, femto_universe_v0_selection::kV0CPAMin, femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0Selection.confV0TranRadMin, femto_universe_v0_selection::kV0TranRadMin, femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0Selection.confV0TranRadMax, femto_universe_v0_selection::kV0TranRadMax, femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0Selection.confV0DecVtxMax, femto_universe_v0_selection::kV0DecVtxMax, femto_universe_selection::kUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildDCAMin, femto_universe_track_selection::kDCAMin, femto_universe_selection::kAbsLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildDCAMin, femto_universe_track_selection::kDCAMin, femto_universe_selection::kAbsLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kPosTrack, ConfV0Selection.confChildPIDspecies); + v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kNegTrack, ConfV0Selection.confChildPIDspecies); v0Cuts.init(&qaRegistry); v0Cuts.setInvMassLimits(ConfV0Selection.confV0InvMassLowLimit, ConfV0Selection.confV0InvMassUpLimit); - v0Cuts.setChildRejectNotPropagatedTracks(femtoUniverseV0Selection::kPosTrack, confTrkRejectNotPropagated); - v0Cuts.setChildRejectNotPropagatedTracks(femtoUniverseV0Selection::kNegTrack, confTrkRejectNotPropagated); + v0Cuts.setChildRejectNotPropagatedTracks(femto_universe_v0_selection::kPosTrack, confTrkRejectNotPropagated); + v0Cuts.setChildRejectNotPropagatedTracks(femto_universe_v0_selection::kNegTrack, confTrkRejectNotPropagated); v0Cuts.setnSigmaPIDOffsetTPC(confTrkPIDnSigmaOffsetTPC); - v0Cuts.setChildnSigmaPIDOffset(femtoUniverseV0Selection::kPosTrack, confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); - v0Cuts.setChildnSigmaPIDOffset(femtoUniverseV0Selection::kNegTrack, confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); + v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kPosTrack, confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); + v0Cuts.setChildnSigmaPIDOffset(femto_universe_v0_selection::kNegTrack, confTrkPIDnSigmaOffsetTPC, confTrkPIDnSigmaOffsetTOF); if (ConfV0Selection.confV0RejectKaons) { v0Cuts.setKaonInvMassLimits(ConfV0Selection.confV0InvKaonMassLowLimit, ConfV0Selection.confV0InvKaonMassUpLimit); @@ -534,46 +534,46 @@ struct FemtoUniverseProducerTask { if (confIsActivateCascade) { // initializing for cascades - cascadeCuts.setSelection(ConfCascadeSelection.confCascSign, femtoUniverseCascadeSelection::kCascadeSign, femtoUniverseSelection::kEqual); - cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMin, femtoUniverseCascadeSelection::kCascadepTMin, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMax, femtoUniverseCascadeSelection::kCascadepTMax, femtoUniverseSelection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascEtaMax, femtoUniverseCascadeSelection::kCascadeetaMax, femtoUniverseSelection::kAbsUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascSign, femto_universe_cascade_selection::kCascadeSign, femto_universe_selection::kEqual); + cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMin, femto_universe_cascade_selection::kCascadepTMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascPtMax, femto_universe_cascade_selection::kCascadepTMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascEtaMax, femto_universe_cascade_selection::kCascadeetaMax, femto_universe_selection::kAbsUpperLimit); // v0 child cuts - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0DCADaughMax, femtoUniverseCascadeSelection::kCascadeV0DCADaughMax, femtoUniverseSelection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0CPAMin, femtoUniverseCascadeSelection::kCascadeV0CPAMin, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0TranRadMin, femtoUniverseCascadeSelection::kCascadeV0TranRadMin, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0TranRadMax, femtoUniverseCascadeSelection::kCascadeV0TranRadMax, femtoUniverseSelection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0DecVtxMax, femtoUniverseCascadeSelection::kCascadeV0DecVtxMax, femtoUniverseSelection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0DCADaughMax, femto_universe_cascade_selection::kCascadeV0DCADaughMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0CPAMin, femto_universe_cascade_selection::kCascadeV0CPAMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0TranRadMin, femto_universe_cascade_selection::kCascadeV0TranRadMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0TranRadMax, femto_universe_cascade_selection::kCascadeV0TranRadMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0DecVtxMax, femto_universe_cascade_selection::kCascadeV0DecVtxMax, femto_universe_selection::kUpperLimit); // cascade cuts - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCADaughMax, femtoUniverseCascadeSelection::kCascadeDCADaughMax, femtoUniverseSelection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascCPAMin, femtoUniverseCascadeSelection::kCascadeCPAMin, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascTranRadMin, femtoUniverseCascadeSelection::kCascadeTranRadMin, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascTranRadMax, femtoUniverseCascadeSelection::kCascadeTranRadMax, femtoUniverseSelection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDecVtxMax, femtoUniverseCascadeSelection::kCascadeDecVtxMax, femtoUniverseSelection::kUpperLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCAPosToPV, femtoUniverseCascadeSelection::kCascadeDCAPosToPV, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCANegToPV, femtoUniverseCascadeSelection::kCascadeDCANegToPV, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCABachToPV, femtoUniverseCascadeSelection::kCascadeDCABachToPV, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascDCAV0ToPV, femtoUniverseCascadeSelection::kCascadeDCAV0ToPV, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0MassLowLimit, femtoUniverseCascadeSelection::kCascadeV0MassMin, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setSelection(ConfCascadeSelection.confCascV0MassUpLimit, femtoUniverseCascadeSelection::kCascadeV0MassMax, femtoUniverseSelection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCADaughMax, femto_universe_cascade_selection::kCascadeDCADaughMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascCPAMin, femto_universe_cascade_selection::kCascadeCPAMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascTranRadMin, femto_universe_cascade_selection::kCascadeTranRadMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascTranRadMax, femto_universe_cascade_selection::kCascadeTranRadMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDecVtxMax, femto_universe_cascade_selection::kCascadeDecVtxMax, femto_universe_selection::kUpperLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCAPosToPV, femto_universe_cascade_selection::kCascadeDCAPosToPV, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCANegToPV, femto_universe_cascade_selection::kCascadeDCANegToPV, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCABachToPV, femto_universe_cascade_selection::kCascadeDCABachToPV, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascDCAV0ToPV, femto_universe_cascade_selection::kCascadeDCAV0ToPV, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0MassLowLimit, femto_universe_cascade_selection::kCascadeV0MassMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setSelection(ConfCascadeSelection.confCascV0MassUpLimit, femto_universe_cascade_selection::kCascadeV0MassMax, femto_universe_selection::kUpperLimit); // children cuts - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kPosTrack, ConfCascadeSelection.confCascChildCharge, femtoUniverseTrackSelection::kSign, femtoUniverseSelection::kEqual); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kPosTrack, ConfCascadeSelection.confCascChildEtaMax, femtoUniverseTrackSelection::kEtaMax, femtoUniverseSelection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kPosTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femtoUniverseTrackSelection::kTPCnClsMin, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kPosTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femtoUniverseTrackSelection::kPIDnSigmaMax, femtoUniverseSelection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kNegTrack, ConfCascadeSelection.confCascChildCharge, femtoUniverseTrackSelection::kSign, femtoUniverseSelection::kEqual); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kNegTrack, ConfCascadeSelection.confCascChildEtaMax, femtoUniverseTrackSelection::kEtaMax, femtoUniverseSelection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kNegTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femtoUniverseTrackSelection::kTPCnClsMin, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kNegTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femtoUniverseTrackSelection::kPIDnSigmaMax, femtoUniverseSelection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kBachTrack, ConfCascadeSelection.confCascChildCharge, femtoUniverseTrackSelection::kSign, femtoUniverseSelection::kEqual); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kBachTrack, ConfCascadeSelection.confCascChildEtaMax, femtoUniverseTrackSelection::kEtaMax, femtoUniverseSelection::kAbsUpperLimit); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kBachTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femtoUniverseTrackSelection::kTPCnClsMin, femtoUniverseSelection::kLowerLimit); - cascadeCuts.setChildCuts(femtoUniverseCascadeSelection::kBachTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femtoUniverseTrackSelection::kPIDnSigmaMax, femtoUniverseSelection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kPosTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kNegTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildCharge, femto_universe_track_selection::kSign, femto_universe_selection::kEqual); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildEtaMax, femto_universe_track_selection::kEtaMax, femto_universe_selection::kAbsUpperLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildTPCnClsMin, femto_universe_track_selection::kTPCnClsMin, femto_universe_selection::kLowerLimit); + cascadeCuts.setChildCuts(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildPIDnSigmaMax, femto_universe_track_selection::kPIDnSigmaMax, femto_universe_selection::kAbsUpperLimit); // TODO - cascadeCuts.setChildPIDSpecies(femtoUniverseCascadeSelection::kPosTrack, ConfV0Selection.confChildPIDspecies); - cascadeCuts.setChildPIDSpecies(femtoUniverseCascadeSelection::kNegTrack, ConfV0Selection.confChildPIDspecies); - cascadeCuts.setChildPIDSpecies(femtoUniverseCascadeSelection::kBachTrack, ConfCascadeSelection.confCascChildPIDspecies); + cascadeCuts.setChildPIDSpecies(femto_universe_cascade_selection::kPosTrack, ConfV0Selection.confChildPIDspecies); + cascadeCuts.setChildPIDSpecies(femto_universe_cascade_selection::kNegTrack, ConfV0Selection.confChildPIDspecies); + cascadeCuts.setChildPIDSpecies(femto_universe_cascade_selection::kBachTrack, ConfCascadeSelection.confCascChildPIDspecies); // check if works correctly for bachelor track cascadeCuts.init(&cascadeQaRegistry, confIsSelectCascOmega); @@ -690,16 +690,16 @@ struct FemtoUniverseProducerTask { if (std::abs(pdgCode) == std::abs(confPDGCodePartOne.value) || std::abs(pdgCode) == std::abs(confPDGCodePartTwo.value)) { if (particleMC.isPhysicalPrimary()) { - particleOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kPrimary; + particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; } else if (!motherparticlesMC.empty()) { auto motherparticleMC = motherparticlesMC.front(); if (motherparticleMC.producedByGenerator()) particleOrigin = checkDaughterType(fdparttype, motherparticleMC.pdgCode()); } else { - particleOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kMaterial; + particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kMaterial; } } else { - particleOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kFake; + particleOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } outputPartsMC(particleOrigin, pdgCode, particleMC.pt(), particleMC.eta(), particleMC.phi()); @@ -728,17 +728,17 @@ struct FemtoUniverseProducerTask { for (const auto& particleMotherOfNeg : motherskaon1MC) { for (const auto& particleMotherOfPos : motherskaon2MC) { if (particleMotherOfNeg == particleMotherOfPos && particleMotherOfNeg.pdgCode() == 333) { - phiOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kPrimary; + phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary; } else { - phiOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kFake; + phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } } } } else { - phiOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kFake; + phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } } else { - phiOrigin = aod::femtouniverseMCparticle::ParticleOriginMCTruth::kFake; + phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake; } TLorentzVector part1Vec; @@ -806,6 +806,7 @@ struct FemtoUniverseProducerTask { colCuts.fillQA(col); return true; } + return true; } template @@ -910,18 +911,18 @@ struct FemtoUniverseProducerTask { outputParts(outputCollision.lastIndex(), track.pt(), track.eta(), track.phi(), aod::femtouniverseparticle::ParticleType::kTrack, cutContainer.at( - femtoUniverseTrackSelection::TrackContainerPosition::kCuts), + femto_universe_track_selection::TrackContainerPosition::kCuts), cutContainer.at( - femtoUniverseTrackSelection::TrackContainerPosition::kPID), + femto_universe_track_selection::TrackContainerPosition::kPID), track.dcaXY(), childIDs, 0, track.sign()); // sign getter is mAntiLambda() } else { outputCascParts(outputCollision.lastIndex(), track.pt(), track.eta(), track.phi(), aod::femtouniverseparticle::ParticleType::kTrack, cutContainer.at( - femtoUniverseTrackSelection::TrackContainerPosition::kCuts), + femto_universe_track_selection::TrackContainerPosition::kCuts), cutContainer.at( - femtoUniverseTrackSelection::TrackContainerPosition::kPID), + femto_universe_track_selection::TrackContainerPosition::kPID), track.dcaXY(), childIDs, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } tmpIDtrack.push_back(track.globalIndex()); @@ -973,8 +974,8 @@ struct FemtoUniverseProducerTask { outputParts(outputCollision.lastIndex(), v0.positivept(), v0.positiveeta(), v0.positivephi(), aod::femtouniverseparticle::ParticleType::kV0Child, - cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kPosCuts), - cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kPosPID), + cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), 0., childIDs, 0, @@ -993,8 +994,8 @@ struct FemtoUniverseProducerTask { v0.negativeeta(), v0.negativephi(), aod::femtouniverseparticle::ParticleType::kV0Child, - cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kNegCuts), - cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kNegPID), + cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), 0., childIDs, 0, @@ -1009,7 +1010,7 @@ struct FemtoUniverseProducerTask { v0.eta(), v0.phi(), aod::femtouniverseparticle::ParticleType::kV0, - cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kV0), + cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kV0), 0, v0.v0cosPA(), indexChildID, @@ -1055,8 +1056,8 @@ struct FemtoUniverseProducerTask { casc.positiveeta(), casc.positivephi(), aod::femtouniverseparticle::ParticleType::kV0Child, - 0, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kPosCuts), - 0, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kPosPID), + 0, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + 0, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), 0., childIDs, 0, @@ -1086,8 +1087,8 @@ struct FemtoUniverseProducerTask { casc.negativeeta(), casc.negativephi(), aod::femtouniverseparticle::ParticleType::kV0Child, - 0, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kNegCuts), - 0, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kNegPID), + 0, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + 0, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), 0., childIDs, 0, @@ -1118,8 +1119,8 @@ struct FemtoUniverseProducerTask { casc.bacheloreta(), casc.bachelorphi(), aod::femtouniverseparticle::ParticleType::kCascadeBachelor, - 0, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kNegCuts), - 0, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kNegPID), + 0, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + 0, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), 0., childIDs, 0, @@ -1142,7 +1143,7 @@ struct FemtoUniverseProducerTask { casc.eta(), casc.phi(), aod::femtouniverseparticle::ParticleType::kCascade, - 0, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kV0), + 0, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kV0), 0, 0, indexCascChildID, @@ -1227,8 +1228,8 @@ struct FemtoUniverseProducerTask { RecoDecay::eta(std::array{hfCand.pxProng0(), hfCand.pyProng0(), hfCand.pzProng0()}), // eta RecoDecay::phi(hfCand.pxProng0(), hfCand.pyProng0()), // phi aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kPosCuts), - -999, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kPosPID), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kPosPID), -999, childIDs, postrack.sign(), // D0 mass -> positive daughter of D0/D0bar @@ -1249,8 +1250,8 @@ struct FemtoUniverseProducerTask { RecoDecay::eta(std::array{hfCand.pxProng1(), hfCand.pyProng1(), hfCand.pzProng1()}), // eta RecoDecay::phi(hfCand.pxProng1(), hfCand.pyProng1()), // phi aod::femtouniverseparticle::ParticleType::kD0Child, - -999, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kNegCuts), - -999, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kNegPID), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegCuts), + -999, // cutContainerV0.at(femto_universe_v0_selection::V0ContainerPosition::kNegPID), -999, childIDs, negtrack.sign(), // negative daughter of D0/D0bar diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx index f2edc136e3d..f834a51b49d 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx @@ -36,7 +36,7 @@ #include "TMath.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; @@ -109,60 +109,60 @@ struct femtoUniverseProducerTaskV0Only { /// \todo Labeled array (see Track-Track task) Configurable> ConfV0Sign{ - FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0Sign, + FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0Sign, "ConfV0"), std::vector{-1, 1}, - FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0Sign, + FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0Sign, "V0 selection: ")}; Configurable> ConfV0PtMin{ - FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0pTMin, + FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0pTMin, "ConfV0"), std::vector{0.3f}, - FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0pTMin, + FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0pTMin, "V0 selection: ")}; Configurable> ConfV0PtMax{ - FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0pTMax, + FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0pTMax, "ConfV0"), std::vector{6.f}, - FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0pTMax, + FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0pTMax, "V0 selection: ")}; Configurable> ConfV0EtaMax{ - FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0etaMax, + FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0etaMax, "ConfV0"), std::vector{6.f}, - FemtoUniverseV0Selection::getSelectionHelper(femtoUniverseV0Selection::kV0etaMax, + FemtoUniverseV0Selection::getSelectionHelper(femto_universe_v0_selection::kV0etaMax, "V0 selection: ")}; Configurable> ConfDCAV0DaughMax{ FemtoUniverseV0Selection::getSelectionName( - femtoUniverseV0Selection::kV0DCADaughMax, "ConfV0"), + femto_universe_v0_selection::kV0DCADaughMax, "ConfV0"), std::vector{1.5f}, FemtoUniverseV0Selection::getSelectionHelper( - femtoUniverseV0Selection::kV0DCADaughMax, "V0 selection: ")}; + femto_universe_v0_selection::kV0DCADaughMax, "V0 selection: ")}; Configurable> ConfCPAV0Min{ - FemtoUniverseV0Selection::getSelectionName(femtoUniverseV0Selection::kV0CPAMin, + FemtoUniverseV0Selection::getSelectionName(femto_universe_v0_selection::kV0CPAMin, "ConfV0"), std::vector{0.99f}, FemtoUniverseV0Selection::getSelectionHelper( - femtoUniverseV0Selection::kV0CPAMin, "V0 selection: ")}; + femto_universe_v0_selection::kV0CPAMin, "V0 selection: ")}; Configurable> V0TranRadV0Min{ FemtoUniverseV0Selection::getSelectionName( - femtoUniverseV0Selection::kV0TranRadMin, "ConfV0"), + femto_universe_v0_selection::kV0TranRadMin, "ConfV0"), std::vector{0.2f}, FemtoUniverseV0Selection::getSelectionHelper( - femtoUniverseV0Selection::kV0TranRadMin, "V0 selection: ")}; + femto_universe_v0_selection::kV0TranRadMin, "V0 selection: ")}; Configurable> V0TranRadV0Max{ FemtoUniverseV0Selection::getSelectionName( - femtoUniverseV0Selection::kV0TranRadMax, "ConfV0"), + femto_universe_v0_selection::kV0TranRadMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper( - femtoUniverseV0Selection::kV0TranRadMax, "V0 selection: ")}; + femto_universe_v0_selection::kV0TranRadMax, "V0 selection: ")}; Configurable> V0DecVtxMax{ FemtoUniverseV0Selection::getSelectionName( - femtoUniverseV0Selection::kV0DecVtxMax, "ConfV0"), + femto_universe_v0_selection::kV0DecVtxMax, "ConfV0"), std::vector{100.f}, FemtoUniverseV0Selection::getSelectionHelper( - femtoUniverseV0Selection::kV0DecVtxMax, "V0 selection: ")}; + femto_universe_v0_selection::kV0DecVtxMax, "V0 selection: ")}; Configurable> ConfV0DaughCharge{ "ConfV0DaughCharge", std::vector{-1, 1}, "V0 Daugh sel: Charge"}; @@ -223,67 +223,67 @@ struct femtoUniverseProducerTaskV0Only { /// \todo fix how to pass array to setSelection, getRow() passing a /// different type! // v0Cuts.setSelection(ConfV0Selection->getRow(0), - // femtoUniverseV0Selection::kDecVtxMax, femtoUniverseSelection::kAbsUpperLimit); + // femto_universe_v0_selection::kDecVtxMax, femto_universe_selection::kAbsUpperLimit); if (ConfStoreV0) { - v0Cuts.setSelection(ConfV0Sign, femtoUniverseV0Selection::kV0Sign, - femtoUniverseSelection::kEqual); - v0Cuts.setSelection(ConfV0PtMin, femtoUniverseV0Selection::kV0pTMin, - femtoUniverseSelection::kLowerLimit); - v0Cuts.setSelection(ConfV0PtMax, femtoUniverseV0Selection::kV0pTMax, - femtoUniverseSelection::kUpperLimit); - v0Cuts.setSelection(ConfV0EtaMax, femtoUniverseV0Selection::kV0etaMax, - femtoUniverseSelection::kUpperLimit); + v0Cuts.setSelection(ConfV0Sign, femto_universe_v0_selection::kV0Sign, + femto_universe_selection::kEqual); + v0Cuts.setSelection(ConfV0PtMin, femto_universe_v0_selection::kV0pTMin, + femto_universe_selection::kLowerLimit); + v0Cuts.setSelection(ConfV0PtMax, femto_universe_v0_selection::kV0pTMax, + femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfV0EtaMax, femto_universe_v0_selection::kV0etaMax, + femto_universe_selection::kUpperLimit); v0Cuts.setSelection(ConfDCAV0DaughMax, - femtoUniverseV0Selection::kV0DCADaughMax, - femtoUniverseSelection::kUpperLimit); - v0Cuts.setSelection(ConfCPAV0Min, femtoUniverseV0Selection::kV0CPAMin, - femtoUniverseSelection::kLowerLimit); - - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, ConfV0DaughCharge, - femtoUniverseTrackSelection::kSign, - femtoUniverseSelection::kEqual); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, ConfDaughEta, - femtoUniverseTrackSelection::kEtaMax, - femtoUniverseSelection::kAbsUpperLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, + femto_universe_v0_selection::kV0DCADaughMax, + femto_universe_selection::kUpperLimit); + v0Cuts.setSelection(ConfCPAV0Min, femto_universe_v0_selection::kV0CPAMin, + femto_universe_selection::kLowerLimit); + + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0DaughCharge, + femto_universe_track_selection::kSign, + femto_universe_selection::kEqual); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfDaughEta, + femto_universe_track_selection::kEtaMax, + femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0DaughTPCnclsMin, - femtoUniverseTrackSelection::kTPCnClsMin, - femtoUniverseSelection::kLowerLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, ConfV0DaughDCAMin, - femtoUniverseTrackSelection::kDCAMin, - femtoUniverseSelection::kAbsLowerLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kPosTrack, + femto_universe_track_selection::kTPCnClsMin, + femto_universe_selection::kLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0DaughDCAMin, + femto_universe_track_selection::kDCAMin, + femto_universe_selection::kAbsLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kPosTrack, ConfV0DaughPIDnSigmaMax, - femtoUniverseTrackSelection::kPIDnSigmaMax, - femtoUniverseSelection::kAbsUpperLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, ConfV0DaughCharge, - femtoUniverseTrackSelection::kSign, - femtoUniverseSelection::kEqual); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, ConfDaughEta, - femtoUniverseTrackSelection::kEtaMax, - femtoUniverseSelection::kAbsUpperLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, + femto_universe_track_selection::kPIDnSigmaMax, + femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0DaughCharge, + femto_universe_track_selection::kSign, + femto_universe_selection::kEqual); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfDaughEta, + femto_universe_track_selection::kEtaMax, + femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0DaughTPCnclsMin, - femtoUniverseTrackSelection::kTPCnClsMin, - femtoUniverseSelection::kLowerLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, ConfV0DaughDCAMin, - femtoUniverseTrackSelection::kDCAMin, - femtoUniverseSelection::kAbsLowerLimit); - v0Cuts.setChildCuts(femtoUniverseV0Selection::kNegTrack, + femto_universe_track_selection::kTPCnClsMin, + femto_universe_selection::kLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0DaughDCAMin, + femto_universe_track_selection::kDCAMin, + femto_universe_selection::kAbsLowerLimit); + v0Cuts.setChildCuts(femto_universe_v0_selection::kNegTrack, ConfV0DaughPIDnSigmaMax, - femtoUniverseTrackSelection::kPIDnSigmaMax, - femtoUniverseSelection::kAbsUpperLimit); - v0Cuts.setChildPIDSpecies(femtoUniverseV0Selection::kPosTrack, + femto_universe_track_selection::kPIDnSigmaMax, + femto_universe_selection::kAbsUpperLimit); + v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kPosTrack, ConfV0DaughTPIDspecies); - v0Cuts.setChildPIDSpecies(femtoUniverseV0Selection::kNegTrack, + v0Cuts.setChildPIDSpecies(femto_universe_v0_selection::kNegTrack, ConfV0DaughTPIDspecies); v0Cuts.init(&qaRegistry); v0Cuts.setInvMassLimits(ConfInvMassLowLimit, ConfInvMassUpLimit); - v0Cuts.setChildRejectNotPropagatedTracks(femtoUniverseV0Selection::kPosTrack, + v0Cuts.setChildRejectNotPropagatedTracks(femto_universe_v0_selection::kPosTrack, ConfRejectNotPropagatedTracks); - v0Cuts.setChildRejectNotPropagatedTracks(femtoUniverseV0Selection::kNegTrack, + v0Cuts.setChildRejectNotPropagatedTracks(femto_universe_v0_selection::kNegTrack, ConfRejectNotPropagatedTracks); if (ConfRejectKaons) { v0Cuts.setKaonInvMassLimits(ConfInvKaonMassLowLimit, @@ -423,11 +423,11 @@ struct femtoUniverseProducerTaskV0Only { col, v0, postrack, negtrack); if ((cutContainerV0.at( - femtoUniverseV0Selection::V0ContainerPosition::kV0) > 0) && + femto_universe_v0_selection::V0ContainerPosition::kV0) > 0) && (cutContainerV0.at( - femtoUniverseV0Selection::V0ContainerPosition::kPosCuts) > 0) && + femto_universe_v0_selection::V0ContainerPosition::kPosCuts) > 0) && (cutContainerV0.at( - femtoUniverseV0Selection::V0ContainerPosition::kNegCuts) > 0)) { + femto_universe_v0_selection::V0ContainerPosition::kNegCuts) > 0)) { int postrackID = v0.posTrackId(); int rowInPrimaryTrackTablePos = -1; rowInPrimaryTrackTablePos = getRowDaughters(postrackID, tmpIDtrack); @@ -437,9 +437,9 @@ struct femtoUniverseProducerTaskV0Only { v0.positiveeta(), v0.positivephi(), aod::femtouniverseparticle::ParticleType::kV0Child, cutContainerV0.at( - femtoUniverseV0Selection::V0ContainerPosition::kPosCuts), + femto_universe_v0_selection::V0ContainerPosition::kPosCuts), cutContainerV0.at( - femtoUniverseV0Selection::V0ContainerPosition::kPosPID), + femto_universe_v0_selection::V0ContainerPosition::kPosPID), 0., childIDs, 0, 0); const int rowOfPosTrack = outputParts.lastIndex(); int negtrackID = v0.negTrackId(); @@ -451,16 +451,16 @@ struct femtoUniverseProducerTaskV0Only { v0.negativeeta(), v0.negativephi(), aod::femtouniverseparticle::ParticleType::kV0Child, cutContainerV0.at( - femtoUniverseV0Selection::V0ContainerPosition::kNegCuts), + femto_universe_v0_selection::V0ContainerPosition::kNegCuts), cutContainerV0.at( - femtoUniverseV0Selection::V0ContainerPosition::kNegPID), + femto_universe_v0_selection::V0ContainerPosition::kNegPID), 0., childIDs, 0, 0); const int rowOfNegTrack = outputParts.lastIndex(); std::vector indexChildID = {rowOfPosTrack, rowOfNegTrack}; outputParts(outputCollision.lastIndex(), v0.pt(), v0.eta(), v0.phi(), aod::femtouniverseparticle::ParticleType::kV0, cutContainerV0.at( - femtoUniverseV0Selection::V0ContainerPosition::kV0), + femto_universe_v0_selection::V0ContainerPosition::kV0), 0, v0.v0cosPA(), indexChildID, v0.mLambda(), v0.mAntiLambda()); if (ConfDebugOutput) { diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseCutCulator.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseCutCulator.cxx index a13c35fa3e3..45edb854cc2 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseCutCulator.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseCutCulator.cxx @@ -22,7 +22,7 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; /// The function takes the path to the dpl-config.json as a argument and the /// does a Q&A session for the user to find the appropriate selection criteria @@ -55,8 +55,8 @@ int main(int /*argc*/, char* argv[]) return 2; } /// \todo factor out the pid here - /// cut.setTrackSelection(femtoUniverseTrackSelection::kPIDnSigmaMax, - /// femtoUniverseSelection::kAbsUpperLimit, "ConfTrk"); + /// cut.setTrackSelection(femto_universe_track_selection::kPIDnSigmaMax, + /// femto_universe_selection::kAbsUpperLimit, "ConfTrk"); std::cout << "Do you want to manually select cuts or create systematic " "variations(M/V)? >"; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugTrack.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugTrack.cxx index 94a0d58a646..444469de52b 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugTrack.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugTrack.cxx @@ -24,12 +24,12 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseEventHisto.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugV0.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugV0.cxx index fc987815989..c1d1bef3122 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugV0.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseDebugV0.cxx @@ -29,10 +29,10 @@ #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseEventHisto.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx index b071bc71f62..c357fa284f7 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyBase.cxx @@ -25,7 +25,7 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyTask.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyTask.cxx index b1c4493470f..fcd9c56d452 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyTask.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseEfficiencyTask.cxx @@ -35,7 +35,7 @@ #include "TPDGCode.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::track; using namespace o2::framework; using namespace o2::framework::expressions; @@ -73,7 +73,7 @@ struct femtoUniverseEficiencyTask { Configurable cfgDcaXY{"cfgDcaXY", 2.4, "Value of max. DCA_XY"}; Configurable cfgDcaZ{"cfgDcaZ", 3.2, "Value of max. DCA_Z"}; /// Event cuts - o2::analysis::femtoUniverse::FemtoUniverseCollisionSelection colCuts; + o2::analysis::femto_universe::FemtoUniverseCollisionSelection colCuts; Configurable ConfEvtZvtx{"ConfEvtZvtx", 10.f, "Evt sel: Max. z-Vertex (cm)"}; Configurable ConfEvtTriggerCheck{"ConfEvtTriggerCheck", true, "Evt sel: check for trigger"}; Configurable ConfEvtTriggerSel{"ConfEvtTriggerSel", kINT7, "Evt sel: trigger"}; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniverseHashTask.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniverseHashTask.cxx index f33657f0dca..773f6649d97 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniverseHashTask.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniverseHashTask.cxx @@ -9,9 +9,8 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file femtoUniverseReaderTask.cxx +/// \file femtoUniverseHashTask.cxx /// \brief Tasks that reads the track tables used for the pairing -/// This task is common for all femto analyses /// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de /// \author Zuzanna Chochulska, WUT Warsaw & CTU Prague, zchochul@cern.ch @@ -24,34 +23,34 @@ using namespace o2; using namespace o2::framework; -struct femtoUniversePairHashTask { +struct FemtoUniverseHashTask { - Configurable> CfgVtxBins{"CfgVtxBins", std::vector{-10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; - Configurable> CfgMultBins{"CfgMultBins", std::vector{0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; - // Configurable> CfgMultBins{"CfgMultBins", std::vector{0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; + Configurable> cfgVtxBins{"cfgVtxBins", std::vector{-10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; + Configurable> cfgMultBins{"cfgMultBins", std::vector{0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; + // Configurable> cfgMultBins{"cfgMultBins", std::vector{0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; - std::vector CastCfgVtxBins, CastCfgMultBins; + std::vector castCfgVtxBins, castCfgMultBins; Produces hashes; void init(InitContext&) { /// here the Configurables are passed to std::vectors - CastCfgVtxBins = (std::vector)CfgVtxBins; - CastCfgMultBins = (std::vector)CfgMultBins; + castCfgVtxBins = (std::vector)cfgVtxBins; + castCfgMultBins = (std::vector)cfgMultBins; } void process(o2::aod::FDCollision const& col) { /// the hash of the collision is computed and written to table - hashes(eventmixing::getMixingBin(CastCfgVtxBins, CastCfgMultBins, col.posZ(), col.multV0M())); + hashes(eventmixing::getMixingBin(castCfgVtxBins, castCfgMultBins, col.posZ(), col.multV0M())); } }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { WorkflowSpec workflow{ - adaptAnalysisTask(cfgc)}; + adaptAnalysisTask(cfgc)}; return workflow; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx index e0197fb8958..926ac6d8a94 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx @@ -28,13 +28,13 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" using namespace o2; using namespace o2::soa; using namespace o2::framework; using namespace o2::framework::expressions; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::aod::pidutils; struct femtoUniversePairTaskTrackCascadeExtended { // o2-linter: disable=name/struct @@ -105,8 +105,8 @@ struct femtoUniversePairTaskTrackCascadeExtended { // o2-linter: disable=name/st FemtoUniverseParticleHisto bachHistos; FemtoUniverseParticleHisto cascQAHistos; - FemtoUniverseContainer sameEventCont; - FemtoUniverseContainer mixedEventCont; + FemtoUniverseContainer sameEventCont; + FemtoUniverseContainer mixedEventCont; FemtoUniversePairCleaner pairCleaner; HistogramRegistry rXiQA{"xi", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx index a994a047157..fc51aa9218e 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx @@ -28,6 +28,7 @@ #include "Framework/O2DatabasePDGPlugin.h" #include "ReconstructionDataFormats/PID.h" #include "Common/DataModel/PIDResponse.h" +#include "Common/Core/RecoDecay.h" #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h" @@ -36,7 +37,7 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGHF/Core/HfHelper.h" @@ -45,7 +46,7 @@ using namespace o2; using namespace o2::analysis; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; @@ -194,10 +195,10 @@ struct FemtoUniversePairTaskTrackD0 { Configurable confCPRdeltaEtaCutMin{"confCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"}; Configurable confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; - FemtoUniverseFemtoContainer sameEventFemtoCont; - FemtoUniverseFemtoContainer mixedEventFemtoCont; - FemtoUniverseAngularContainer sameEventAngularCont; - FemtoUniverseAngularContainer mixedEventAngularCont; + FemtoUniverseFemtoContainer sameEventFemtoCont; + FemtoUniverseFemtoContainer mixedEventFemtoCont; + FemtoUniverseAngularContainer sameEventAngularCont; + FemtoUniverseAngularContainer mixedEventAngularCont; FemtoUniversePairCleaner pairCleaner; FemtoUniverseDetaDphiStar pairCloseRejection; FemtoUniverseTrackSelection trackCuts; @@ -618,7 +619,7 @@ struct FemtoUniversePairTaskTrackD0 { } // // Close Pair Rejection if (confIsCPR.value) { - if (pairCloseRejection.isClosePair(track, d0candidate, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(track, d0candidate, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -704,7 +705,7 @@ struct FemtoUniversePairTaskTrackD0 { } // // Close Pair Rejection if (confIsCPR.value) { - if (pairCloseRejection.isClosePair(track, d0candidate, parts, magFieldTesla, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejection.isClosePair(track, d0candidate, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackNucleus.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackNucleus.cxx index 74b265cd766..595211f78ab 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackNucleus.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackNucleus.cxx @@ -36,13 +36,13 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairWithCentMultKt.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; @@ -202,33 +202,33 @@ struct femtoUniversePairTaskTrackNucleus { Configurable cfgProcessKtBins{"cfgProcessKtBins", true, "Process kstar histograms in kT bins (if 'cfgProcessMultBins' is false, it will not be processed regardless of 'cfgProcessKtBins' state)"}; Configurable cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and MultBins"}; - FemtoUniverseFemtoContainer sameEventContPP; - FemtoUniverseFemtoContainer mixedEventContPP; + FemtoUniverseFemtoContainer sameEventContPP; + FemtoUniverseFemtoContainer mixedEventContPP; - FemtoUniverseFemtoContainer sameEventContMM; - FemtoUniverseFemtoContainer mixedEventContMM; + FemtoUniverseFemtoContainer sameEventContMM; + FemtoUniverseFemtoContainer mixedEventContMM; - FemtoUniverseFemtoContainer sameEventContPM; - FemtoUniverseFemtoContainer mixedEventContPM; + FemtoUniverseFemtoContainer sameEventContPM; + FemtoUniverseFemtoContainer mixedEventContPM; - FemtoUniverseFemtoContainer sameEventContMP; - FemtoUniverseFemtoContainer mixedEventContMP; + FemtoUniverseFemtoContainer sameEventContMP; + FemtoUniverseFemtoContainer mixedEventContMP; FemtoUniversePairCleaner pairCleaner; FemtoUniverseDetaDphiStar pairCloseRejection; FemtoUniverseTrackSelection trackCuts; - PairWithCentMultKt sameEventMultContPP; - PairWithCentMultKt mixedEventMultContPP; + FemtoUniversePairWithCentMultKt sameEventMultContPP; + FemtoUniversePairWithCentMultKt mixedEventMultContPP; - PairWithCentMultKt sameEventMultContMM; - PairWithCentMultKt mixedEventMultContMM; + FemtoUniversePairWithCentMultKt sameEventMultContMM; + FemtoUniversePairWithCentMultKt mixedEventMultContMM; - PairWithCentMultKt sameEventMultContPM; - PairWithCentMultKt mixedEventMultContPM; + FemtoUniversePairWithCentMultKt sameEventMultContPM; + FemtoUniversePairWithCentMultKt mixedEventMultContPM; - PairWithCentMultKt sameEventMultContMP; - PairWithCentMultKt mixedEventMultContMP; + FemtoUniversePairWithCentMultKt sameEventMultContMP; + FemtoUniversePairWithCentMultKt mixedEventMultContMP; float mass1 = -1; float mass2 = -1; @@ -525,7 +525,7 @@ struct femtoUniversePairTaskTrackNucleus { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -680,7 +680,7 @@ struct femtoUniversePairTaskTrackNucleus { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx index eedf16489c9..4ee98317da0 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackPhi.cxx @@ -34,14 +34,14 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include #include #include "CCDB/BasicCCDBManager.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; @@ -161,8 +161,8 @@ struct FemtoUniversePairTaskTrackPhi { ConfigurableAxis confBinskT{"confBinskT", {150, 0., 9.}, "binning kT"}; ConfigurableAxis confBinsmT{"confBinsmT", {225, 0., 7.5}, "binning mT"}; - FemtoUniverseAngularContainer sameEventAngularCont; - FemtoUniverseAngularContainer mixedEventAngularCont; + FemtoUniverseAngularContainer sameEventAngularCont; + FemtoUniverseAngularContainer mixedEventAngularCont; FemtoUniversePairCleaner pairCleaner; FemtoUniverseDetaDphiStar pairCloseRejection; FemtoUniverseTrackSelection trackCuts; @@ -544,7 +544,7 @@ struct FemtoUniversePairTaskTrackPhi { // Close Pair Rejection if (ConfCPR.confCPRIsEnabled.value) { - if (pairCloseRejection.isClosePair(track, phicandidate, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(track, phicandidate, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -654,7 +654,7 @@ struct FemtoUniversePairTaskTrackPhi { } if (ConfCPR.confCPRIsEnabled.value) { - if (pairCloseRejection.isClosePair(track, phicandidate, parts, magFieldTesla, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejection.isClosePair(track, phicandidate, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } @@ -779,7 +779,7 @@ struct FemtoUniversePairTaskTrackPhi { continue; // no MC particle const auto& mcpart = mcparts.iteratorAt(mcPartId); if (part.partType() == aod::femtouniverseparticle::ParticleType::kPhi) { - if ((mcpart.pdgMCTruth() == 333) && (mcpart.partOriginMCTruth() == aod::femtouniverseMCparticle::ParticleOriginMCTruth::kPrimary)) { + if ((mcpart.pdgMCTruth() == 333) && (mcpart.partOriginMCTruth() == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary)) { registryMCreco.fill(HIST("MCrecoPhi"), mcpart.pt(), mcpart.eta()); // phi } } else if (part.partType() == aod::femtouniverseparticle::ParticleType::kTrack) { diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack.cxx index 72157d49253..7449aa4433c 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack.cxx @@ -14,6 +14,7 @@ /// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de /// \author Georgios Mantzaridis, TU München, georgios.mantzaridis@tum.de /// \author Anton Riedel, TU München, anton.riedel@tum.de +/// \author Zuzanna Chochulska, WUT Warsaw & CTU Prague, zchochul@cern.ch #include #include "Framework/AnalysisTask.h" @@ -23,7 +24,6 @@ #include "Framework/RunningWorkflowInfo.h" #include "Framework/StepTHn.h" #include "Framework/O2DatabasePDGPlugin.h" -#include "TDatabasePDG.h" #include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h" @@ -32,63 +32,63 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; namespace { -static constexpr int nPart = 2; -static constexpr int nCuts = 5; +static constexpr int NPart = 2; +static constexpr int NCuts = 5; static const std::vector partNames{"PartOne", "PartTwo"}; static const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", "nSigmaTPCTOF", "MaxP"}; -static const float cutsTable[nPart][nCuts]{ +static const float cutsTable[NPart][NCuts]{ {4.05f, 1.f, 3.f, 3.f, 100.f}, {4.05f, 1.f, 3.f, 3.f, 100.f}}; } // namespace -struct femtoUniversePairTaskTrackTrack { +struct FemtoUniversePairTaskTrackTrack { SliceCache cache; Preslice perCol = aod::femtouniverseparticle::fdCollisionId; /// Particle selection part /// Table for both particles - Configurable> ConfCutTable{"ConfCutTable", {cutsTable[0], nPart, nCuts, partNames, cutNames}, "Particle selections"}; - Configurable ConfNspecies{"ConfNspecies", 2, "Number of particle spieces with PID info"}; - Configurable ConfIsMC{"ConfIsMC", false, "Enable additional Histogramms in the case of a MonteCarlo Run"}; - Configurable> ConfTrkPIDnSigmaMax{"ConfTrkPIDnSigmaMax", std::vector{4.f, 3.f, 2.f}, "This configurable needs to be the same as the one used in the producer task"}; - Configurable ConfUse3D{"ConfUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; + Configurable> confCutTable{"confCutTable", {cutsTable[0], NPart, NCuts, partNames, cutNames}, "Particle selections"}; + Configurable confNspecies{"confNspecies", 2, "Number of particle spieces with PID info"}; + Configurable confIsMC{"confIsMC", false, "Enable additional Histogramms in the case of a MonteCarlo Run"}; + Configurable> confTrkPIDnSigmaMax{"confTrkPIDnSigmaMax", std::vector{4.f, 3.f, 2.f}, "This configurable needs to be the same as the one used in the producer task"}; + Configurable confUse3D{"confUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; /// Particle 1 - Configurable ConfPDGCodePartOne{"ConfPDGCodePartOne", 2212, "Particle 1 - PDG code"}; - Configurable ConfCutPartOne{"ConfCutPartOne", 5542474, "Particle 1 - Selection bit from cutCulator"}; - Configurable ConfPIDPartOne{"ConfPIDPartOne", 2, "Particle 1 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> + Configurable confPDGCodePartOne{"confPDGCodePartOne", 2212, "Particle 1 - PDG code"}; + Configurable confCutPartOne{"confCutPartOne", 5542474, "Particle 1 - Selection bit from cutCulator"}; + Configurable confPIDPartOne{"confPIDPartOne", 2, "Particle 1 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && ((aod::femtouniverseparticle::cut & ConfCutPartOne) == ConfCutPartOne); - Partition> partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && ((aod::femtouniverseparticle::cut & ConfCutPartOne) == ConfCutPartOne); + Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); + Partition> partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); /// Histogramming for particle 1 FemtoUniverseParticleHisto trackHistoPartOne; /// Particle 2 - Configurable ConfIsSame{"ConfIsSame", false, "Pairs of the same particle"}; - Configurable ConfPDGCodePartTwo{"ConfPDGCodePartTwo", 2212, "Particle 2 - PDG code"}; - Configurable ConfCutPartTwo{"ConfCutPartTwo", 5542474, "Particle 2 - Selection bit"}; - Configurable ConfPIDPartTwo{"ConfPIDPartTwo", 2, "Particle 2 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> + Configurable confIsSame{"confIsSame", false, "Pairs of the same particle"}; + Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 2212, "Particle 2 - PDG code"}; + Configurable confCutPartTwo{"confCutPartTwo", 5542474, "Particle 2 - Selection bit"}; + Configurable confPIDPartTwo{"confPIDPartTwo", 2, "Particle 2 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> /// Partition for particle 2 Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && // (aod::femtouniverseparticle::pt < cfgCutTable->get("PartTwo", "MaxPt")) && - ((aod::femtouniverseparticle::cut & ConfCutPartTwo) == ConfCutPartTwo); + ((aod::femtouniverseparticle::cut & confCutPartTwo) == confCutPartTwo); Partition> partsTwoMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && - ((aod::femtouniverseparticle::cut & ConfCutPartTwo) == ConfCutPartTwo); + ((aod::femtouniverseparticle::cut & confCutPartTwo) == confCutPartTwo); /// Histogramming for particle 2 FemtoUniverseParticleHisto trackHistoPartTwo; @@ -101,81 +101,80 @@ struct femtoUniversePairTaskTrackTrack { std::vector kNsigma; /// particle part - ConfigurableAxis ConfTempFitVarBins{"ConfDTempFitVarBins", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; - ConfigurableAxis ConfTempFitVarpTBins{"ConfTempFitVarpTBins", {20, 0.5, 4.05}, "pT binning of the pT vs. TempFitVar plot"}; + ConfigurableAxis confTempFitVarBins{"confTempFitVarBins", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; + ConfigurableAxis confTempFitVarpTBins{"confTempFitVarpTBins", {20, 0.5, 4.05}, "pT binning of the pT vs. TempFitVar plot"}; /// Correlation part - ConfigurableAxis ConfMultBins{"ConfMultBins", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; // \todo to be obtained from the hash task - // ConfigurableAxis ConfMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; - ConfigurableAxis ConfVtxBins{"ConfVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; - - ConfigurableAxis ConfmTBins3D{"ConfmTBins3D", {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; - ConfigurableAxis ConfmultBins3D{"ConfmultBins3D", {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; - - ColumnBinningPolicy colBinning{{ConfVtxBins, ConfMultBins}, true}; - - ConfigurableAxis ConfkstarBins{"ConfkstarBins", {1500, 0., 6.}, "binning kstar"}; - ConfigurableAxis ConfkTBins{"ConfkTBins", {150, 0., 9.}, "binning kT"}; - ConfigurableAxis ConfmTBins{"ConfmTBins", {225, 0., 7.5}, "binning mT"}; - Configurable ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"}; - Configurable ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"}; - Configurable ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"}; - Configurable ConfCPRdeltaPhiCutMax{"ConfCPRdeltaPhiCutMax", 0.0, "Delta Phi max cut for Close Pair Rejection"}; - Configurable ConfCPRdeltaPhiCutMin{"ConfCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"}; - Configurable ConfCPRdeltaEtaCutMax{"ConfCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"}; - Configurable ConfCPRdeltaEtaCutMin{"ConfCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"}; - Configurable ConfCPRChosenRadii{"ConfCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; - Configurable ConfPhiBins{"ConfPhiBins", 29, "Number of phi bins in deta dphi"}; - Configurable ConfEtaBins{"ConfEtaBins", 29, "Number of eta bins in deta dphi"}; - - FemtoUniverseFemtoContainer sameEventFemtoCont; - FemtoUniverseFemtoContainer mixedEventFemtoCont; - FemtoUniverseAngularContainer sameEventAngularCont; - FemtoUniverseAngularContainer mixedEventAngularCont; + ConfigurableAxis confMultBins{"confMultBins", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; // \todo to be obtained from the hash task + ConfigurableAxis confVtxBins{"confVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; + + ConfigurableAxis confmTBins3D{"confmTBins3D", {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; + ConfigurableAxis confMultBins3D{"confMultBins3D", {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; + + ColumnBinningPolicy colBinning{{confVtxBins, confMultBins}, true}; + + ConfigurableAxis confkstarBins{"confkstarBins", {1500, 0., 6.}, "binning kstar"}; + ConfigurableAxis confkTBins{"confkTBins", {150, 0., 9.}, "binning kT"}; + ConfigurableAxis confmTBins{"confmTBins", {225, 0., 7.5}, "binning mT"}; + Configurable confNEventsMix{"confNEventsMix", 5, "Number of events for mixing"}; + Configurable confIsCPR{"confIsCPR", true, "Close Pair Rejection"}; + Configurable confCPRPlotPerRadii{"confCPRPlotPerRadii", false, "Plot CPR per radii"}; + Configurable confCPRdeltaPhiCutMax{"confCPRdeltaPhiCutMax", 0.0, "Delta Phi max cut for Close Pair Rejection"}; + Configurable confCPRdeltaPhiCutMin{"confCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMax{"confCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMin{"confCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"}; + Configurable confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; + Configurable confPhiBins{"confPhiBins", 29, "Number of phi bins in deta dphi"}; + Configurable confEtaBins{"confEtaBins", 29, "Number of eta bins in deta dphi"}; + + FemtoUniverseFemtoContainer sameEventFemtoCont; + FemtoUniverseFemtoContainer mixedEventFemtoCont; + FemtoUniverseAngularContainer sameEventAngularCont; + FemtoUniverseAngularContainer mixedEventAngularCont; FemtoUniversePairCleaner pairCleaner; FemtoUniverseDetaDphiStar pairCloseRejection; /// Histogram output HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject}; HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject}; - HistogramRegistry MixQaRegistry{"MixQaRegistry", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry mixQaRegistry{"mixQaRegistry", {}, OutputObjHandlingPolicy::AnalysisObject}; void init(InitContext&) { eventHisto.init(&qaRegistry); - trackHistoPartOne.init(&qaRegistry, ConfTempFitVarpTBins, ConfTempFitVarBins, ConfIsMC, ConfPDGCodePartOne, false); - if (!ConfIsSame) { - trackHistoPartTwo.init(&qaRegistry, ConfTempFitVarpTBins, ConfTempFitVarBins, ConfIsMC, ConfPDGCodePartTwo, false); + trackHistoPartOne.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, confIsMC, confPDGCodePartOne, false); + if (!confIsSame) { + trackHistoPartTwo.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, confIsMC, confPDGCodePartTwo, false); } - MixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); - MixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + mixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + mixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); - sameEventFemtoCont.init(&resultRegistry, ConfkstarBins, ConfMultBins, ConfkTBins, ConfmTBins, ConfmultBins3D, ConfmTBins3D, ConfIsMC, ConfUse3D); - mixedEventFemtoCont.init(&resultRegistry, ConfkstarBins, ConfMultBins, ConfkTBins, ConfmTBins, ConfmultBins3D, ConfmTBins3D, ConfIsMC, ConfUse3D); - sameEventAngularCont.init(&resultRegistry, ConfkstarBins, ConfMultBins, ConfkTBins, ConfmTBins, ConfmultBins3D, ConfmTBins3D, ConfEtaBins, ConfPhiBins, ConfIsMC, ConfUse3D); - mixedEventAngularCont.init(&resultRegistry, ConfkstarBins, ConfMultBins, ConfkTBins, ConfmTBins, ConfmultBins3D, ConfmTBins3D, ConfEtaBins, ConfPhiBins, ConfIsMC, ConfUse3D); + sameEventFemtoCont.init(&resultRegistry, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confIsMC, confUse3D); + mixedEventFemtoCont.init(&resultRegistry, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confIsMC, confUse3D); + sameEventAngularCont.init(&resultRegistry, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D); + mixedEventAngularCont.init(&resultRegistry, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D); - sameEventFemtoCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); - mixedEventFemtoCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); - sameEventAngularCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); - mixedEventAngularCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); + sameEventFemtoCont.setPDGCodes(confPDGCodePartOne, confPDGCodePartTwo); + mixedEventFemtoCont.setPDGCodes(confPDGCodePartOne, confPDGCodePartTwo); + sameEventAngularCont.setPDGCodes(confPDGCodePartOne, confPDGCodePartTwo); + mixedEventAngularCont.setPDGCodes(confPDGCodePartOne, confPDGCodePartTwo); pairCleaner.init(&qaRegistry); - if (ConfIsCPR.value) { - pairCloseRejection.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiCutMin.value, ConfCPRdeltaPhiCutMax.value, ConfCPRdeltaEtaCutMin.value, ConfCPRdeltaEtaCutMax.value, ConfCPRChosenRadii.value, ConfCPRPlotPerRadii.value); + if (confIsCPR.value) { + pairCloseRejection.init(&resultRegistry, &qaRegistry, confCPRdeltaPhiCutMin.value, confCPRdeltaPhiCutMax.value, confCPRdeltaEtaCutMin.value, confCPRdeltaEtaCutMax.value, confCPRChosenRadii.value, confCPRPlotPerRadii.value); } - vPIDPartOne = ConfPIDPartOne.value; - vPIDPartTwo = ConfPIDPartTwo.value; - kNsigma = ConfTrkPIDnSigmaMax.value; + vPIDPartOne = confPIDPartOne.value; + vPIDPartTwo = confPIDPartTwo.value; + kNsigma = confTrkPIDnSigmaMax.value; } template void fillCollision(CollisionType col) { - MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinning.getBin({col.posZ(), col.multNtr()})); + mixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinning.getBin({col.posZ(), col.multNtr()})); eventHisto.fillQA(col); } @@ -194,68 +193,68 @@ struct femtoUniversePairTaskTrackTrack { { /// Histogramming same event - for (auto& part : groupPartsOne) { - if (part.p() > ConfCutTable->get("PartOne", "MaxP") || part.pt() > ConfCutTable->get("PartOne", "MaxPt")) { + for (const auto& part : groupPartsOne) { + if (part.p() > confCutTable->get("PartOne", "MaxP") || part.pt() > confCutTable->get("PartOne", "MaxPt")) { continue; } if (!isFullPIDSelected(part.pidcut(), part.p(), - ConfCutTable->get("PartOne", "PIDthr"), + confCutTable->get("PartOne", "PIDthr"), vPIDPartOne, - ConfNspecies, + confNspecies, kNsigma, - ConfCutTable->get("PartOne", "nSigmaTPC"), - ConfCutTable->get("PartOne", "nSigmaTPCTOF"))) { + confCutTable->get("PartOne", "nSigmaTPC"), + confCutTable->get("PartOne", "nSigmaTPCTOF"))) { continue; } trackHistoPartOne.fillQA(part); } - if (!ConfIsSame) { - for (auto& part : groupPartsTwo) { - if (part.p() > ConfCutTable->get("PartTwo", "MaxP") || part.pt() > ConfCutTable->get("PartTwo", "MaxPt")) { + if (!confIsSame) { + for (const auto& part : groupPartsTwo) { + if (part.p() > confCutTable->get("PartTwo", "MaxP") || part.pt() > confCutTable->get("PartTwo", "MaxPt")) { continue; } if (!isFullPIDSelected(part.pidcut(), part.p(), - ConfCutTable->get("PartTwo", "PIDthr"), + confCutTable->get("PartTwo", "PIDthr"), vPIDPartTwo, - ConfNspecies, + confNspecies, kNsigma, - ConfCutTable->get("PartTwo", "nSigmaTPC"), - ConfCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + confCutTable->get("PartTwo", "nSigmaTPC"), + confCutTable->get("PartTwo", "nSigmaTPCTOF"))) { continue; } trackHistoPartTwo.fillQA(part); } } /// Now build the combinations - for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (p1.p() > ConfCutTable->get("PartOne", "MaxP") || p1.pt() > ConfCutTable->get("PartOne", "MaxPt") || p2.p() > ConfCutTable->get("PartTwo", "MaxP") || p2.pt() > ConfCutTable->get("PartTwo", "MaxPt")) { + for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) { + if (p1.p() > confCutTable->get("PartOne", "MaxP") || p1.pt() > confCutTable->get("PartOne", "MaxPt") || p2.p() > confCutTable->get("PartTwo", "MaxP") || p2.pt() > confCutTable->get("PartTwo", "MaxPt")) { continue; } if (!isFullPIDSelected(p1.pidcut(), p1.p(), - ConfCutTable->get("PartOne", "PIDthr"), + confCutTable->get("PartOne", "PIDthr"), vPIDPartOne, - ConfNspecies, + confNspecies, kNsigma, - ConfCutTable->get("PartOne", "nSigmaTPC"), - ConfCutTable->get("PartOne", "nSigmaTPCTOF")) || + confCutTable->get("PartOne", "nSigmaTPC"), + confCutTable->get("PartOne", "nSigmaTPCTOF")) || !isFullPIDSelected(p2.pidcut(), p2.p(), - ConfCutTable->get("PartTwo", "PIDthr"), + confCutTable->get("PartTwo", "PIDthr"), vPIDPartTwo, - ConfNspecies, + confNspecies, kNsigma, - ConfCutTable->get("PartTwo", "nSigmaTPC"), - ConfCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + confCutTable->get("PartTwo", "nSigmaTPC"), + confCutTable->get("PartTwo", "nSigmaTPCTOF"))) { continue; } - if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (confIsCPR.value) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -265,16 +264,16 @@ struct femtoUniversePairTaskTrackTrack { continue; } - sameEventFemtoCont.setPair(p1, p2, multCol, ConfUse3D); - sameEventAngularCont.setPair(p1, p2, multCol, ConfUse3D); + sameEventFemtoCont.setPair(p1, p2, multCol, confUse3D); + sameEventAngularCont.setPair(p1, p2, multCol, confUse3D); } } /// process function for to call doSameEvent with Data /// \param col subscribe to the collision table (Data) /// \param parts subscribe to the femtoUniverseParticleTable - void processSameEvent(o2::aod::FDCollision& col, - o2::aod::FDParticles& parts) + void processSameEvent(const o2::aod::FDCollision& col, + const o2::aod::FDParticles& parts) { fillCollision(col); @@ -283,15 +282,15 @@ struct femtoUniversePairTaskTrackTrack { doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multNtr()); } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrack, processSameEvent, "Enable processing same event", true); + PROCESS_SWITCH(FemtoUniversePairTaskTrackTrack, processSameEvent, "Enable processing same event", true); /// process function for to call doSameEvent with Monte Carlo /// \param col subscribe to the collision table (Monte Carlo Reconstructed reconstructed) /// \param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth /// \param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table - void processSameEventMC(o2::aod::FDCollision& col, - soa::Join& parts, - o2::aod::FDMCParticles&) + void processSameEventMC(const o2::aod::FDCollision& col, + const soa::Join& parts, + const o2::aod::FDMCParticles&) { fillCollision(col); @@ -300,7 +299,7 @@ struct femtoUniversePairTaskTrackTrack { doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multNtr()); } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrack, processSameEventMC, "Enable processing same event for Monte Carlo", false); + PROCESS_SWITCH(FemtoUniversePairTaskTrackTrack, processSameEventMC, "Enable processing same event for Monte Carlo", false); /// This function processes the mixed event /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... @@ -316,50 +315,50 @@ struct femtoUniversePairTaskTrackTrack { void doMixedEvent(PartitionType groupPartsOne, PartitionType groupPartsTwo, PartType parts, float magFieldTesla, int multCol) { - for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (p1.p() > ConfCutTable->get("PartOne", "MaxP") || p1.pt() > ConfCutTable->get("PartOne", "MaxPt") || p2.p() > ConfCutTable->get("PartTwo", "MaxP") || p2.pt() > ConfCutTable->get("PartTwo", "MaxPt")) { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + if (p1.p() > confCutTable->get("PartOne", "MaxP") || p1.pt() > confCutTable->get("PartOne", "MaxPt") || p2.p() > confCutTable->get("PartTwo", "MaxP") || p2.pt() > confCutTable->get("PartTwo", "MaxPt")) { continue; } if (!isFullPIDSelected(p1.pidcut(), p1.p(), - ConfCutTable->get("PartOne", "PIDthr"), + confCutTable->get("PartOne", "PIDthr"), vPIDPartOne, - ConfNspecies, + confNspecies, kNsigma, - ConfCutTable->get("PartOne", "nSigmaTPC"), - ConfCutTable->get("PartOne", "nSigmaTPCTOF")) || + confCutTable->get("PartOne", "nSigmaTPC"), + confCutTable->get("PartOne", "nSigmaTPCTOF")) || !isFullPIDSelected(p2.pidcut(), p2.p(), - ConfCutTable->get("PartTwo", "PIDthr"), + confCutTable->get("PartTwo", "PIDthr"), vPIDPartTwo, - ConfNspecies, + confNspecies, kNsigma, - ConfCutTable->get("PartTwo", "nSigmaTPC"), - ConfCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + confCutTable->get("PartTwo", "nSigmaTPC"), + confCutTable->get("PartTwo", "nSigmaTPCTOF"))) { continue; } - if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::mixed)) { + if (confIsCPR.value) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } - mixedEventFemtoCont.setPair(p1, p2, multCol, ConfUse3D); - mixedEventAngularCont.setPair(p1, p2, multCol, ConfUse3D); + mixedEventFemtoCont.setPair(p1, p2, multCol, confUse3D); + mixedEventAngularCont.setPair(p1, p2, multCol, confUse3D); } } /// process function for to call doMixedEvent with Data /// @param cols subscribe to the collisions table (Data) /// @param parts subscribe to the femtoUniverseParticleTable - void processMixedEvent(o2::aod::FDCollisions& cols, - o2::aod::FDParticles& parts) + void processMixedEvent(const o2::aod::FDCollisions& cols, + const o2::aod::FDParticles& parts) { - for (auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { const int multiplicityCol = collision1.multNtr(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol})); + mixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol})); auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); @@ -376,20 +375,20 @@ struct femtoUniversePairTaskTrackTrack { doMixedEvent(groupPartsOne, groupPartsTwo, parts, magFieldTesla1, multiplicityCol); } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrack, processMixedEvent, "Enable processing mixed events", true); + PROCESS_SWITCH(FemtoUniversePairTaskTrackTrack, processMixedEvent, "Enable processing mixed events", true); /// brief process function for to call doMixedEvent with Monte Carlo /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed reconstructed) /// @param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth /// @param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table - void processMixedEventMC(o2::aod::FDCollisions& cols, - soa::Join& parts, - o2::aod::FDMCParticles&) + void processMixedEventMC(const o2::aod::FDCollisions& cols, + const soa::Join& parts, + const o2::aod::FDMCParticles&) { - for (auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { const int multiplicityCol = collision1.multNtr(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol})); + mixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol})); auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); @@ -406,13 +405,13 @@ struct femtoUniversePairTaskTrackTrack { doMixedEvent(groupPartsOne, groupPartsTwo, parts, magFieldTesla1, multiplicityCol); } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrack, processMixedEventMC, "Enable processing mixed events MC", false); + PROCESS_SWITCH(FemtoUniversePairTaskTrackTrack, processMixedEventMC, "Enable processing mixed events MC", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { WorkflowSpec workflow{ - adaptAnalysisTask(cfgc), + adaptAnalysisTask(cfgc), }; return workflow; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx index cdccc3bd327..8e10d1269a0 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx @@ -34,13 +34,13 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverse3DContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairWithCentMultKt.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; @@ -176,27 +176,27 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { Configurable cfgProcessKtBins{"cfgProcessKtBins", true, "Process kstar histograms in kT bins (if cfgProcessMultBins is set false, this will not be processed regardless this Configurable state)"}; Configurable cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and Mult bins"}; - FemtoUniverse3DContainer sameEventCont; - FemtoUniverse3DContainer mixedEventCont; + FemtoUniverse3DContainer sameEventCont; + FemtoUniverse3DContainer mixedEventCont; - FemtoUniverse3DContainer sameEventContPP; - FemtoUniverse3DContainer mixedEventContPP; + FemtoUniverse3DContainer sameEventContPP; + FemtoUniverse3DContainer mixedEventContPP; - FemtoUniverse3DContainer sameEventContMM; - FemtoUniverse3DContainer mixedEventContMM; + FemtoUniverse3DContainer sameEventContMM; + FemtoUniverse3DContainer mixedEventContMM; FemtoUniversePairCleaner pairCleaner; FemtoUniverseDetaDphiStar pairCloseRejection; FemtoUniverseTrackSelection trackCuts; - PairWithCentMultKt sameEventMultCont; - PairWithCentMultKt mixedEventMultCont; + FemtoUniversePairWithCentMultKt sameEventMultCont; + FemtoUniversePairWithCentMultKt mixedEventMultCont; - PairWithCentMultKt sameEventMultContPP; - PairWithCentMultKt mixedEventMultContPP; + FemtoUniversePairWithCentMultKt sameEventMultContPP; + FemtoUniversePairWithCentMultKt mixedEventMultContPP; - PairWithCentMultKt sameEventMultContMM; - PairWithCentMultKt mixedEventMultContMM; + FemtoUniversePairWithCentMultKt sameEventMultContMM; + FemtoUniversePairWithCentMultKt mixedEventMultContMM; float mass1 = -1; float mass2 = -1; @@ -470,7 +470,7 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -486,7 +486,7 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { sameEventCont.setPair(p1, p2, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { std::vector k3d = FemtoUniverseMath::newpairfunc(p1, mass1, p2, mass2, ConfIsIden); - sameEventMultCont.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + sameEventMultCont.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } } else { @@ -503,7 +503,7 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -524,14 +524,14 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { sameEventContPP.setPair(p1, p2, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { k3d = FemtoUniverseMath::newpairfunc(p1, mass1, p2, mass2, ConfIsIden); - sameEventMultContPP.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + sameEventMultContPP.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } else { if (!cfgProcessMultBins) { sameEventContPP.setPair(p2, p1, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { k3d = FemtoUniverseMath::newpairfunc(p2, mass2, p1, mass1, ConfIsIden); - sameEventMultContPP.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + sameEventMultContPP.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } break; @@ -547,14 +547,14 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { sameEventContMM.setPair(p1, p2, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { k3d = FemtoUniverseMath::newpairfunc(p1, mass1, p2, mass2, ConfIsIden); - sameEventMultContMM.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + sameEventMultContMM.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } else { if (!cfgProcessMultBins) { sameEventContMM.setPair(p2, p1, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { k3d = FemtoUniverseMath::newpairfunc(p2, mass2, p1, mass1, ConfIsIden); - sameEventMultContMM.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + sameEventMultContMM.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } break; @@ -649,7 +649,7 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } @@ -666,14 +666,14 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { mixedEventCont.setPair(p1, p2, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { std::vector k3d = FemtoUniverseMath::newpairfunc(p1, mass1, p2, mass2, ConfIsIden); - mixedEventMultCont.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + mixedEventMultCont.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } else { if (!cfgProcessMultBins) { mixedEventCont.setPair(p2, p1, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { std::vector k3d = FemtoUniverseMath::newpairfunc(p2, mass2, p1, mass1, ConfIsIden); - mixedEventMultCont.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + mixedEventMultCont.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } break; @@ -686,14 +686,14 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { mixedEventContPP.setPair(p1, p2, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { std::vector k3d = FemtoUniverseMath::newpairfunc(p1, mass1, p2, mass2, ConfIsIden); - mixedEventMultContPP.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + mixedEventMultContPP.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } else { if (!cfgProcessMultBins) { mixedEventContPP.setPair(p2, p1, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { std::vector k3d = FemtoUniverseMath::newpairfunc(p2, mass2, p1, mass1, ConfIsIden); - mixedEventMultContPP.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + mixedEventMultContPP.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } break; @@ -707,14 +707,14 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended { mixedEventContMM.setPair(p1, p2, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { std::vector k3d = FemtoUniverseMath::newpairfunc(p1, mass1, p2, mass2, ConfIsIden); - mixedEventMultContMM.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + mixedEventMultContMM.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } else { if (!cfgProcessMultBins) { mixedEventContMM.setPair(p2, p1, multCol, twotracksconfigs.ConfUse3D, ConfIsIden); } else { std::vector k3d = FemtoUniverseMath::newpairfunc(p2, mass2, p1, mass1, ConfIsIden); - mixedEventMultContMM.fill_3D(k3d[1], k3d[2], k3d[3], multCol, kT); + mixedEventMultContMM.fill3D(k3d[1], k3d[2], k3d[3], multCol, kT); } } break; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackExtended.cxx index 985c7466ce3..324d48d5bce 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackExtended.cxx @@ -24,7 +24,6 @@ #include "Framework/RunningWorkflowInfo.h" #include "Framework/StepTHn.h" #include "Framework/O2DatabasePDGPlugin.h" -#include "TDatabasePDG.h" #include "ReconstructionDataFormats/PID.h" #include "Common/DataModel/PIDResponse.h" @@ -34,48 +33,48 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; namespace { -static constexpr int nPart = 2; -static constexpr int nCuts = 5; +static constexpr int NPart = 2; +static constexpr int NCuts = 5; static const std::vector partNames{"PartOne", "PartTwo"}; static const std::vector cutNames{"MaxPt", "PIDthr", "nSigmaTPC", "nSigmaTPCTOF", "MaxP"}; -static const float cutsTable[nPart][nCuts]{ +static const float cutsTable[NPart][NCuts]{ {4.05f, 1.f, 3.f, 3.f, 100.f}, {4.05f, 1.f, 3.f, 3.f, 100.f}}; } // namespace -struct femtoUniversePairTaskTrackTrackExtended { +struct FemtoUniversePairTaskTrackTrackExtended { /// Particle selection part /// Table for both particles struct : o2::framework::ConfigurableGroup { - Configurable ConfNsigmaCombined{"ConfNsigmaCombined", 3.0f, "TPC and TOF Pion Sigma (combined) for momentum > ConfTOFPtMin"}; - Configurable ConfNsigmaTPC{"ConfNsigmaTPC", 3.0f, "TPC Pion Sigma for momentum < ConfTOFPtMin"}; - Configurable ConfTOFPtMin{"ConfTOFPtMin", 0.5f, "Min. Pt for which TOF is required for PID."}; - Configurable ConfEtaMax{"ConfEtaMax", 0.8f, "Higher limit for |Eta| (the same for both particles)"}; - - Configurable> ConfCutTable{"ConfCutTable", {cutsTable[0], nPart, nCuts, partNames, cutNames}, "Particle selections"}; - Configurable ConfNspecies{"ConfNspecies", 2, "Number of particle spieces with PID info"}; - Configurable ConfIsMC{"ConfIsMC", false, "Enable additional Histogramms in the case of a MonteCarlo Run"}; - Configurable> ConfTrkPIDnSigmaMax{"ConfTrkPIDnSigmaMax", std::vector{4.f, 3.f, 2.f}, "This configurable needs to be the same as the one used in the producer task"}; - Configurable ConfUse3D{"ConfUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; + Configurable confNsigmaCombined{"confNsigmaCombined", 3.0f, "TPC and TOF Pion Sigma (combined) for momentum > confTOFPtMin"}; + Configurable confNsigmaTPC{"confNsigmaTPC", 3.0f, "TPC Pion Sigma for momentum < confTOFPtMin"}; + Configurable confTOFPtMin{"confTOFPtMin", 0.5f, "Min. Pt for which TOF is required for PID."}; + Configurable confEtaMax{"confEtaMax", 0.8f, "Higher limit for |Eta| (the same for both particles)"}; + + Configurable> confCutTable{"confCutTable", {cutsTable[0], NPart, NCuts, partNames, cutNames}, "Particle selections"}; + Configurable confNspecies{"confNspecies", 2, "Number of particle spieces with PID info"}; + Configurable confIsMC{"confIsMC", false, "Enable additional Histogramms in the case of a MonteCarlo Run"}; + Configurable> confTrkPIDnSigmaMax{"confTrkPIDnSigmaMax", std::vector{4.f, 3.f, 2.f}, "This configurable needs to be the same as the one used in the producer task"}; + Configurable confUse3D{"confUse3D", false, "Enable three dimensional histogramms (to be used only for analysis with high statistics): k* vs mT vs multiplicity"}; } twotracksconfigs; using FemtoFullParticles = soa::Join; // Filters for selecting particles (both p1 and p2) Filter trackCutFilter = requireGlobalTrackInFilter(); // Global track cuts - Filter trackAdditionalfilter = (nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.ConfEtaMax); // example filtering on configurable + Filter trackAdditionalfilter = (nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.confEtaMax); // example filtering on configurable using FilteredFemtoFullParticles = soa::Filtered; // using FilteredFemtoFullParticles = FemtoFullParticles; //if no filtering is applied uncomment this option @@ -84,38 +83,37 @@ struct femtoUniversePairTaskTrackTrackExtended { /// Particle 1 struct : o2::framework::ConfigurableGroup { - Configurable ConfPDGCodePartOne{"ConfPDGCodePartOne", 2212, "Particle 1 - PDG code"}; - Configurable ConfIsTrackOneIdentified{"ConfIsTrackOneIdentified", true, "Enable PID for the track one"}; - // Configurable ConfCutPartOne{"ConfCutPartOne", 5542474, "Particle 1 - Selection bit from cutCulator"}; - Configurable ConfPIDPartOne{"ConfPIDPartOne", 2, "Particle 1 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> - Configurable ConfPtLowPart1{"ConfPtLowPart1", 0.5, "Lower limit for Pt for the first particle"}; - Configurable ConfPtHighPart1{"ConfPtHighPart1", 1.5, "Higher limit for Pt for the first particle"}; - Configurable ConfChargePart1{"ConfChargePart1", 1, "Particle 1 sign"}; + Configurable confPDGCodePartOne{"confPDGCodePartOne", 2212, "Particle 1 - PDG code"}; + Configurable confIsTrackOneIdentified{"confIsTrackOneIdentified", true, "Enable PID for the track one"}; + // Configurable confCutPartOne{"confCutPartOne", 5542474, "Particle 1 - Selection bit from cutCulator"}; + Configurable confPIDPartOne{"confPIDPartOne", 2, "Particle 1 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> + Configurable confPtLowPart1{"confPtLowPart1", 0.5, "Lower limit for Pt for the first particle"}; + Configurable confPtHighPart1{"confPtHighPart1", 1.5, "Higher limit for Pt for the first particle"}; + Configurable confChargePart1{"confChargePart1", 1, "Particle 1 sign"}; } trackonefilter; /// Partition for particle 1 - Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.ConfChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.ConfPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.ConfPtLowPart1; - Partition> partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.ConfChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.ConfPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.ConfPtLowPart1; - // && ((aod::femtouniverseparticle::cut & ConfCutPartOne) == ConfCutPartOne); + Partition partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.confChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + Partition> partsOneMC = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && aod::femtouniverseparticle::sign == trackonefilter.confChargePart1 && aod::femtouniverseparticle::pt < trackonefilter.confPtHighPart1 && aod::femtouniverseparticle::pt > trackonefilter.confPtLowPart1; + // && ((aod::femtouniverseparticle::cut & confCutPartOne) == confCutPartOne); /// Histogramming for particle 1 FemtoUniverseParticleHisto trackHistoPartOne; /// Particle 2 - Configurable ConfIsSame{"ConfIsSame", false, "Pairs of the same particle"}; + Configurable confIsSame{"confIsSame", false, "Pairs of the same particle"}; struct : o2::framework::ConfigurableGroup { - Configurable ConfPDGCodePartTwo{"ConfPDGCodePartTwo", 2212, "Particle 2 - PDG code"}; - Configurable ConfIsTrackTwoIdentified{"ConfIsTrackTwoIdentified", true, "Enable PID for the track two"}; - // Configurable ConfCutPartTwo{"ConfCutPartTwo", 5542474, "Particle 2 - Selection bit"}; - Configurable ConfPIDPartTwo{"ConfPIDPartTwo", 2, "Particle 2 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> - Configurable ConfPtLowPart2{"ConfPtLowPart2", 0.5, "Lower limit for Pt for the second particle"}; - Configurable ConfPtHighPart2{"ConfPtHighPart2", 1.5, "Higher limit for Pt for the second particle"}; - Configurable ConfChargePart2{"ConfChargePart2", -1, "Particle 2 sign"}; + Configurable confPDGCodePartTwo{"confPDGCodePartTwo", 2212, "Particle 2 - PDG code"}; + Configurable confIsTrackTwoIdentified{"confIsTrackTwoIdentified", true, "Enable PID for the track two"}; + Configurable confPIDPartTwo{"confPIDPartTwo", 2, "Particle 2 - Read from cutCulator"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> + Configurable confPtLowPart2{"confPtLowPart2", 0.5, "Lower limit for Pt for the second particle"}; + Configurable confPtHighPart2{"confPtHighPart2", 1.5, "Higher limit for Pt for the second particle"}; + Configurable confChargePart2{"confChargePart2", -1, "Particle 2 sign"}; } tracktwofilter; /// Partition for particle 2 - Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == tracktwofilter.ConfChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.ConfPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.ConfPtLowPart2; + Partition partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; - Partition> partsTwoMC = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == tracktwofilter.ConfChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.ConfPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.ConfPtLowPart2; + Partition> partsTwoMC = aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack) && (aod::femtouniverseparticle::sign == tracktwofilter.confChargePart2) && aod::femtouniverseparticle::pt < tracktwofilter.confPtHighPart2 && aod::femtouniverseparticle::pt > tracktwofilter.confPtLowPart2; /// Histogramming for particle 2 FemtoUniverseParticleHisto trackHistoPartTwo; @@ -128,64 +126,64 @@ struct femtoUniversePairTaskTrackTrackExtended { std::vector kNsigma; /// particle part - ConfigurableAxis ConfTempFitVarBins{"ConfDTempFitVarBins", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; - ConfigurableAxis ConfTempFitVarpTBins{"ConfTempFitVarpTBins", {20, 0.5, 4.05}, "pT binning of the pT vs. TempFitVar plot"}; + ConfigurableAxis confTempFitVarBins{"confTempFitVarBins", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"}; + ConfigurableAxis confTempFitVarpTBins{"confTempFitVarpTBins", {20, 0.5, 4.05}, "pT binning of the pT vs. TempFitVar plot"}; /// Correlation part - ConfigurableAxis ConfMultBins{"ConfMultBins", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; // \todo to be obtained from the hash task - // ConfigurableAxis ConfMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; - ConfigurableAxis ConfVtxBins{"ConfVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; - - ConfigurableAxis ConfmTBins3D{"ConfmTBins3D", {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; - ConfigurableAxis ConfmultBins3D{"ConfmultBins3D", {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; - - ColumnBinningPolicy colBinning{{ConfVtxBins, ConfMultBins}, true}; - - ConfigurableAxis ConfkstarBins{"ConfkstarBins", {1500, 0., 6.}, "binning kstar"}; - ConfigurableAxis ConfkTBins{"ConfkTBins", {150, 0., 9.}, "binning kT"}; - ConfigurableAxis ConfmTBins{"ConfmTBins", {225, 0., 7.5}, "binning mT"}; - Configurable ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"}; - Configurable ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"}; - Configurable ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"}; - Configurable ConfCPRdeltaPhiCutMax{"ConfCPRdeltaPhiCutMax", 0.0, "Delta Phi max cut for Close Pair Rejection"}; - Configurable ConfCPRdeltaPhiCutMin{"ConfCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"}; - Configurable ConfCPRdeltaEtaCutMax{"ConfCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"}; - Configurable ConfCPRdeltaEtaCutMin{"ConfCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"}; - Configurable ConfCPRChosenRadii{"ConfCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; - Configurable ConfPhiBins{"ConfPhiBins", 29, "Number of phi bins in deta dphi"}; - Configurable ConfEtaBins{"ConfEtaBins", 29, "Number of eta bins in deta dphi"}; - - FemtoUniverseContainer sameEventCont; - FemtoUniverseContainer mixedEventCont; + ConfigurableAxis confMultBins{"confMultBins", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; // \todo to be obtained from the hash task + // ConfigurableAxis confMultBins{"confMultBins", {VARIABLE_WIDTH, 0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; + ConfigurableAxis confVtxBins{"confVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; + + ConfigurableAxis confmTBins3D{"confmTBins3D", {VARIABLE_WIDTH, 1.02f, 1.14f, 1.20f, 1.26f, 1.38f, 1.56f, 1.86f, 4.50f}, "mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; + ConfigurableAxis confMultBins3D{"confMultBins3D", {VARIABLE_WIDTH, 0.0f, 20.0f, 30.0f, 40.0f, 99999.0f}, "multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <> to true in order to use)"}; + + ColumnBinningPolicy colBinning{{confVtxBins, confMultBins}, true}; + + ConfigurableAxis confkstarBins{"confkstarBins", {1500, 0., 6.}, "binning kstar"}; + ConfigurableAxis confkTBins{"confkTBins", {150, 0., 9.}, "binning kT"}; + ConfigurableAxis confmTBins{"confmTBins", {225, 0., 7.5}, "binning mT"}; + Configurable confNEventsMix{"confNEventsMix", 5, "Number of events for mixing"}; + Configurable confIsCPR{"confIsCPR", true, "Close Pair Rejection"}; + Configurable confCPRPlotPerRadii{"confCPRPlotPerRadii", false, "Plot CPR per radii"}; + Configurable confCPRdeltaPhiCutMax{"confCPRdeltaPhiCutMax", 0.0, "Delta Phi max cut for Close Pair Rejection"}; + Configurable confCPRdeltaPhiCutMin{"confCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMax{"confCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"}; + Configurable confCPRdeltaEtaCutMin{"confCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"}; + Configurable confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"}; + Configurable confPhiBins{"confPhiBins", 29, "Number of phi bins in deta dphi"}; + Configurable confEtaBins{"confEtaBins", 29, "Number of eta bins in deta dphi"}; + + FemtoUniverseContainer sameEventCont; + FemtoUniverseContainer mixedEventCont; FemtoUniversePairCleaner pairCleaner; FemtoUniverseDetaDphiStar pairCloseRejection; FemtoUniverseTrackSelection trackCuts; /// Histogram output HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject}; HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject}; - HistogramRegistry MixQaRegistry{"MixQaRegistry", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry mixQaRegistry{"mixQaRegistry", {}, OutputObjHandlingPolicy::AnalysisObject}; /// @brief Counter for particle swapping int fNeventsProcessed = 0; // PID for protons - bool IsProtonNSigma(float mom, float nsigmaTPCPr, float nsigmaTOFPr) // previous version from: https://github.com/alisw/AliPhysics/blob/master/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoMJTrackCut.cxx + bool isProtonNSigma(float mom, float nsigmaTPCPr, float nsigmaTOFPr) // previous version from: https://github.com/alisw/AliPhysics/blob/master/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoMJTrackCut.cxx { //|nsigma_TPC| < 3 for p < 0.5 GeV/c //|nsigma_combined| < 3 for p > 0.5 // using configurables: - // ConfTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed - // ConfNsigmaTPC -> TPC Sigma for momentum < ConfTOFPtMin - // ConfNsigmaCombined -> TPC and TOF Sigma (combined) for momentum > ConfTOFPtMin + // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed + // confNsigmaTPC -> TPC Sigma for momentum < confTOFPtMin + // confNsigmaCombined -> TPC and TOF Sigma (combined) for momentum > confTOFPtMin - if (mom < twotracksconfigs.ConfTOFPtMin) { - if (TMath::Abs(nsigmaTPCPr) < twotracksconfigs.ConfNsigmaTPC) { + if (mom < twotracksconfigs.confTOFPtMin) { + if (std::abs(nsigmaTPCPr) < twotracksconfigs.confNsigmaTPC) { return true; } else { return false; } } else { - if (TMath::Hypot(nsigmaTOFPr, nsigmaTPCPr) < twotracksconfigs.ConfNsigmaCombined) { + if (std::hypot(nsigmaTOFPr, nsigmaTPCPr) < twotracksconfigs.confNsigmaCombined) { return true; } else { return false; @@ -194,24 +192,24 @@ struct femtoUniversePairTaskTrackTrackExtended { return false; } - bool IsKaonNSigma(float mom, float nsigmaTPCK, float nsigmaTOFK) + bool isKaonNSigma(float mom, float nsigmaTPCK, float nsigmaTOFK) { //|nsigma_TPC| < 3 for p < 0.5 GeV/c //|nsigma_combined| < 3 for p > 0.5 // using configurables: - // ConfTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed - // ConfNsigmaTPC -> TPC Sigma for momentum < ConfTOFPtMin - // ConfNsigmaCombined -> TPC and TOF Sigma (combined) for momentum > ConfTOFPtMin + // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed + // confNsigmaTPC -> TPC Sigma for momentum < confTOFPtMin + // confNsigmaCombined -> TPC and TOF Sigma (combined) for momentum > confTOFPtMin if (true) { - if (mom < twotracksconfigs.ConfTOFPtMin) { - if (TMath::Abs(nsigmaTPCK) < twotracksconfigs.ConfNsigmaTPC) { + if (mom < twotracksconfigs.confTOFPtMin) { + if (std::abs(nsigmaTPCK) < twotracksconfigs.confNsigmaTPC) { return true; } else { return false; } } else { - if (TMath::Hypot(nsigmaTOFK, nsigmaTPCK) < twotracksconfigs.ConfNsigmaCombined) { + if (std::hypot(nsigmaTOFK, nsigmaTPCK) < twotracksconfigs.confNsigmaCombined) { return true; } else { return false; @@ -221,24 +219,24 @@ struct femtoUniversePairTaskTrackTrackExtended { return false; } - bool IsPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi) + bool isPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi) { //|nsigma_TPC| < 3 for p < 0.5 GeV/c //|nsigma_combined| < 3 for p > 0.5 // using configurables: - // ConfTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed - // ConfNsigmaTPC -> TPC Sigma for momentum < ConfTOFPtMin - // ConfNsigmaCombined -> TPC and TOF Sigma (combined) for momentum > ConfTOFPtMin + // confTOFPtMin - momentum value when we start using TOF; set to 1000 if TOF not needed + // confNsigmaTPC -> TPC Sigma for momentum < confTOFPtMin + // confNsigmaCombined -> TPC and TOF Sigma (combined) for momentum > confTOFPtMin if (true) { - if (mom < twotracksconfigs.ConfTOFPtMin) { - if (TMath::Abs(nsigmaTPCPi) < twotracksconfigs.ConfNsigmaTPC) { + if (mom < twotracksconfigs.confTOFPtMin) { + if (std::abs(nsigmaTPCPi) < twotracksconfigs.confNsigmaTPC) { return true; } else { return false; } } else { - if (TMath::Hypot(nsigmaTOFPi, nsigmaTPCPi) < twotracksconfigs.ConfNsigmaCombined) { + if (std::hypot(nsigmaTOFPi, nsigmaTPCPi) < twotracksconfigs.confNsigmaCombined) { return true; } else { return false; @@ -248,45 +246,45 @@ struct femtoUniversePairTaskTrackTrackExtended { return false; } - bool IsParticleNSigma(int8_t particle_number, float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK) + bool isParticleNSigma(int8_t particle_number, float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK) { if (particle_number == 1) { - switch (trackonefilter.ConfPDGCodePartOne) { + switch (trackonefilter.confPDGCodePartOne) { case 2212: // Proton case -2212: // anty Proton - return IsProtonNSigma(mom, nsigmaTPCPr, nsigmaTOFPr); + return isProtonNSigma(mom, nsigmaTPCPr, nsigmaTOFPr); break; case 211: // Pion case -211: // Pion- case 111: // Pion 0 - return IsPionNSigma(mom, nsigmaTPCPi, nsigmaTOFPi); + return isPionNSigma(mom, nsigmaTPCPi, nsigmaTOFPi); break; case 321: // Kaon+ case -321: // Kaon- case 130: // Kaon 0 LONG case 310: // Kaon 0 SHORT - return IsKaonNSigma(mom, nsigmaTPCK, nsigmaTOFK); + return isKaonNSigma(mom, nsigmaTPCK, nsigmaTOFK); break; default: return false; } return false; } else if (particle_number == 2) { - switch (tracktwofilter.ConfPDGCodePartTwo) { + switch (tracktwofilter.confPDGCodePartTwo) { case 2212: // Proton case -2212: // anty Proton - return IsProtonNSigma(mom, nsigmaTPCPr, nsigmaTOFPr); + return isProtonNSigma(mom, nsigmaTPCPr, nsigmaTOFPr); break; case 211: // Pion case -211: // Pion- case 111: // Pion 0 - return IsPionNSigma(mom, nsigmaTPCPi, nsigmaTOFPi); + return isPionNSigma(mom, nsigmaTPCPi, nsigmaTOFPi); break; case 321: // Kaon+ case -321: // Kaon- case 130: // Kaon 0 LONG case 310: // Kaon 0 SHORT - return IsKaonNSigma(mom, nsigmaTPCK, nsigmaTOFK); + return isKaonNSigma(mom, nsigmaTPCK, nsigmaTOFK); break; default: return false; @@ -301,32 +299,32 @@ struct femtoUniversePairTaskTrackTrackExtended { void init(InitContext&) { eventHisto.init(&qaRegistry); - trackHistoPartOne.init(&qaRegistry, ConfTempFitVarpTBins, ConfTempFitVarBins, twotracksconfigs.ConfIsMC, trackonefilter.ConfPDGCodePartOne, true); // last true = isDebug - if (!ConfIsSame) { - trackHistoPartTwo.init(&qaRegistry, ConfTempFitVarpTBins, ConfTempFitVarBins, twotracksconfigs.ConfIsMC, tracktwofilter.ConfPDGCodePartTwo, true); // last true = isDebug + trackHistoPartOne.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, twotracksconfigs.confIsMC, trackonefilter.confPDGCodePartOne, true); // last true = isDebug + if (!confIsSame) { + trackHistoPartTwo.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, twotracksconfigs.confIsMC, tracktwofilter.confPDGCodePartTwo, true); // last true = isDebug } - MixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); - MixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + mixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + mixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); - sameEventCont.init(&resultRegistry, ConfkstarBins, ConfMultBins, ConfkTBins, ConfmTBins, ConfmultBins3D, ConfmTBins3D, ConfEtaBins, ConfPhiBins, twotracksconfigs.ConfIsMC, twotracksconfigs.ConfUse3D); - mixedEventCont.init(&resultRegistry, ConfkstarBins, ConfMultBins, ConfkTBins, ConfmTBins, ConfmultBins3D, ConfmTBins3D, ConfEtaBins, ConfPhiBins, twotracksconfigs.ConfIsMC, twotracksconfigs.ConfUse3D); - sameEventCont.setPDGCodes(trackonefilter.ConfPDGCodePartOne, tracktwofilter.ConfPDGCodePartTwo); - mixedEventCont.setPDGCodes(trackonefilter.ConfPDGCodePartOne, tracktwofilter.ConfPDGCodePartTwo); + sameEventCont.init(&resultRegistry, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + mixedEventCont.init(&resultRegistry, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D); + sameEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); + mixedEventCont.setPDGCodes(trackonefilter.confPDGCodePartOne, tracktwofilter.confPDGCodePartTwo); pairCleaner.init(&qaRegistry); - if (ConfIsCPR.value) { - pairCloseRejection.init(&resultRegistry, &qaRegistry, ConfCPRdeltaPhiCutMin.value, ConfCPRdeltaPhiCutMax.value, ConfCPRdeltaEtaCutMin.value, ConfCPRdeltaEtaCutMax.value, ConfCPRChosenRadii.value, ConfCPRPlotPerRadii.value); + if (confIsCPR.value) { + pairCloseRejection.init(&resultRegistry, &qaRegistry, confCPRdeltaPhiCutMin.value, confCPRdeltaPhiCutMax.value, confCPRdeltaEtaCutMin.value, confCPRdeltaEtaCutMax.value, confCPRChosenRadii.value, confCPRPlotPerRadii.value); } - vPIDPartOne = trackonefilter.ConfPIDPartOne.value; - vPIDPartTwo = tracktwofilter.ConfPIDPartTwo.value; - kNsigma = twotracksconfigs.ConfTrkPIDnSigmaMax.value; + vPIDPartOne = trackonefilter.confPIDPartOne.value; + vPIDPartTwo = tracktwofilter.confPIDPartTwo.value; + kNsigma = twotracksconfigs.confTrkPIDnSigmaMax.value; } template void fillCollision(CollisionType col) { - MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinning.getBin({col.posZ(), col.multNtr()})); + mixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinning.getBin({col.posZ(), col.multNtr()})); eventHisto.fillQA(col); } @@ -348,22 +346,22 @@ struct femtoUniversePairTaskTrackTrackExtended { fNeventsProcessed++; /// Histogramming same event - for (auto& part : groupPartsOne) { - // if (part.p() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxP") || part.pt() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxPt")) { + for (const auto& part : groupPartsOne) { + // if (part.p() > twotracksconfigs.confCutTable->get("PartOne", "MaxP") || part.pt() > twotracksconfigs.confCutTable->get("PartOne", "MaxPt")) { // continue; // } // if (!isFullPIDSelected(part.pidcut(), // part.p(), - // twotracksconfigs.ConfCutTable->get("PartOne", "PIDthr"), + // twotracksconfigs.confCutTable->get("PartOne", "PIDthr"), // vPIDPartOne, - // twotracksconfigs.ConfNspecies, + // twotracksconfigs.confNspecies, // kNsigma, - // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPC"), - // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPCTOF"))) { + // twotracksconfigs.confCutTable->get("PartOne", "nSigmaTPC"), + // twotracksconfigs.confCutTable->get("PartOne", "nSigmaTPCTOF"))) { // continue; // } - if (trackonefilter.ConfIsTrackOneIdentified) { - if (!IsParticleNSigma((int8_t)1, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { + if (trackonefilter.confIsTrackOneIdentified) { + if (!isParticleNSigma((int8_t)1, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { continue; } } @@ -371,23 +369,23 @@ struct femtoUniversePairTaskTrackTrackExtended { trackHistoPartOne.fillQA(part); } - if (!ConfIsSame) { - for (auto& part : groupPartsTwo) { - // if (part.p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || part.pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) { + if (!confIsSame) { + for (const auto& part : groupPartsTwo) { + // if (part.p() > twotracksconfigs.confCutTable->get("PartTwo", "MaxP") || part.pt() > twotracksconfigs.confCutTable->get("PartTwo", "MaxPt")) { // continue; // } // if (!isFullPIDSelected(part.pidcut(), // part.p(), - // twotracksconfigs.ConfCutTable->get("PartTwo", "PIDthr"), + // twotracksconfigs.confCutTable->get("PartTwo", "PIDthr"), // vPIDPartTwo, - // twotracksconfigs.ConfNspecies, + // twotracksconfigs.confNspecies, // kNsigma, - // twotracksconfigs.ConfCutTable->get("PartTwo", "nSigmaTPC"), - // twotracksconfigs.ConfCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + // twotracksconfigs.confCutTable->get("PartTwo", "nSigmaTPC"), + // twotracksconfigs.confCutTable->get("PartTwo", "nSigmaTPCTOF"))) { // continue; // } - if (tracktwofilter.ConfIsTrackTwoIdentified) { - if (!IsParticleNSigma((int8_t)2, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { + if (tracktwofilter.confIsTrackTwoIdentified) { + if (!isParticleNSigma((int8_t)2, part.p(), trackCuts.getNsigmaTPC(part, o2::track::PID::Proton), trackCuts.getNsigmaTOF(part, o2::track::PID::Proton), trackCuts.getNsigmaTPC(part, o2::track::PID::Pion), trackCuts.getNsigmaTOF(part, o2::track::PID::Pion), trackCuts.getNsigmaTPC(part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon))) { continue; } } @@ -395,43 +393,43 @@ struct femtoUniversePairTaskTrackTrackExtended { } /// Now build the combinations for non-identical particle pairs - for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - // if (p1.p() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxP") || p1.pt() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxPt") || p2.p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || p2.pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + // if (p1.p() > twotracksconfigs.confCutTable->get("PartOne", "MaxP") || p1.pt() > twotracksconfigs.confCutTable->get("PartOne", "MaxPt") || p2.p() > twotracksconfigs.confCutTable->get("PartTwo", "MaxP") || p2.pt() > twotracksconfigs.confCutTable->get("PartTwo", "MaxPt")) { // continue; // } // if (!isFullPIDSelected(p1.pidcut(), // p1.p(), - // twotracksconfigs.ConfCutTable->get("PartOne", "PIDthr"), + // twotracksconfigs.confCutTable->get("PartOne", "PIDthr"), // vPIDPartOne, - // twotracksconfigs.ConfNspecies, + // twotracksconfigs.confNspecies, // kNsigma, - // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPC"), - // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPCTOF")) || + // twotracksconfigs.confCutTable->get("PartOne", "nSigmaTPC"), + // twotracksconfigs.confCutTable->get("PartOne", "nSigmaTPCTOF")) || // !isFullPIDSelected(p2.pidcut(), // p2.p(), - // twotracksconfigs.ConfCutTable->get("PartTwo", "PIDthr"), + // twotracksconfigs.confCutTable->get("PartTwo", "PIDthr"), // vPIDPartTwo, - // twotracksconfigs.ConfNspecies, + // twotracksconfigs.confNspecies, // kNsigma, - // twotracksconfigs.ConfCutTable->get("PartTwo", "nSigmaTPC"), - // twotracksconfigs.ConfCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + // twotracksconfigs.confCutTable->get("PartTwo", "nSigmaTPC"), + // twotracksconfigs.confCutTable->get("PartTwo", "nSigmaTPCTOF"))) { // continue; // } - if (trackonefilter.ConfIsTrackOneIdentified) { - if (!IsParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (trackonefilter.confIsTrackOneIdentified) { + if (!isParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } } - if (tracktwofilter.ConfIsTrackTwoIdentified) { - if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (tracktwofilter.confIsTrackTwoIdentified) { + if (!isParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } } - if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (confIsCPR.value) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -442,52 +440,52 @@ struct femtoUniversePairTaskTrackTrackExtended { } if (swpart) - sameEventCont.setPair(p1, p2, multCol, twotracksconfigs.ConfUse3D); + sameEventCont.setPair(p1, p2, multCol, twotracksconfigs.confUse3D); else - sameEventCont.setPair(p2, p1, multCol, twotracksconfigs.ConfUse3D); + sameEventCont.setPair(p2, p1, multCol, twotracksconfigs.confUse3D); swpart = !swpart; } } else { /// Now build the combinations for identical particle pairs (different combination policy than for non-identical!) - for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) { - // if (p1.p() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxP") || p1.pt() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxPt") || p2.p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || p2.pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) { + for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) { + // if (p1.p() > twotracksconfigs.confCutTable->get("PartOne", "MaxP") || p1.pt() > twotracksconfigs.confCutTable->get("PartOne", "MaxPt") || p2.p() > twotracksconfigs.confCutTable->get("PartTwo", "MaxP") || p2.pt() > twotracksconfigs.confCutTable->get("PartTwo", "MaxPt")) { // continue; // } // if (!isFullPIDSelected(p1.pidcut(), // p1.p(), - // twotracksconfigs.ConfCutTable->get("PartOne", "PIDthr"), + // twotracksconfigs.confCutTable->get("PartOne", "PIDthr"), // vPIDPartOne, - // twotracksconfigs.ConfNspecies, + // twotracksconfigs.confNspecies, // kNsigma, - // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPC"), - // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPCTOF")) || + // twotracksconfigs.confCutTable->get("PartOne", "nSigmaTPC"), + // twotracksconfigs.confCutTable->get("PartOne", "nSigmaTPCTOF")) || // !isFullPIDSelected(p2.pidcut(), // p2.p(), - // twotracksconfigs.ConfCutTable->get("PartTwo", "PIDthr"), + // twotracksconfigs.confCutTable->get("PartTwo", "PIDthr"), // vPIDPartTwo, - // twotracksconfigs.ConfNspecies, + // twotracksconfigs.confNspecies, // kNsigma, - // twotracksconfigs.ConfCutTable->get("PartTwo", "nSigmaTPC"), - // twotracksconfigs.ConfCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + // twotracksconfigs.confCutTable->get("PartTwo", "nSigmaTPC"), + // twotracksconfigs.confCutTable->get("PartTwo", "nSigmaTPCTOF"))) { // continue; // } - if (trackonefilter.ConfIsTrackOneIdentified) { - if (!IsParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (trackonefilter.confIsTrackOneIdentified) { + if (!isParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } } - if (tracktwofilter.ConfIsTrackTwoIdentified) { - if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (tracktwofilter.confIsTrackTwoIdentified) { + if (!isParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } } - if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (confIsCPR.value) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -496,7 +494,7 @@ struct femtoUniversePairTaskTrackTrackExtended { if (!pairCleaner.isCleanPair(p1, p2, parts)) { continue; } - sameEventCont.setPair(p1, p2, multCol, twotracksconfigs.ConfUse3D); + sameEventCont.setPair(p1, p2, multCol, twotracksconfigs.confUse3D); } } } @@ -504,8 +502,8 @@ struct femtoUniversePairTaskTrackTrackExtended { /// process function for to call doSameEvent with Data /// \param col subscribe to the collision table (Data) /// \param parts subscribe to the femtoUniverseParticleTable - void processSameEvent(o2::aod::FDCollision& col, - FilteredFemtoFullParticles& parts) + void processSameEvent(const o2::aod::FDCollision& col, + const FilteredFemtoFullParticles& parts) { fillCollision(col); @@ -514,15 +512,15 @@ struct femtoUniversePairTaskTrackTrackExtended { doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multNtr()); } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackExtended, processSameEvent, "Enable processing same event", true); + PROCESS_SWITCH(FemtoUniversePairTaskTrackTrackExtended, processSameEvent, "Enable processing same event", true); /// process function for to call doSameEvent with Monte Carlo /// \param col subscribe to the collision table (Monte Carlo Reconstructed reconstructed) /// \param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth /// \param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table - void processSameEventMC(o2::aod::FDCollision& col, - soa::Join& parts, - o2::aod::FDMCParticles&) + void processSameEventMC(const o2::aod::FDCollision& col, + const soa::Join& parts, + const o2::aod::FDMCParticles&) { fillCollision(col); @@ -531,7 +529,7 @@ struct femtoUniversePairTaskTrackTrackExtended { doSameEvent(thegroupPartsOne, thegroupPartsTwo, parts, col.magField(), col.multNtr()); } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackExtended, processSameEventMC, "Enable processing same event for Monte Carlo", false); + PROCESS_SWITCH(FemtoUniversePairTaskTrackTrackExtended, processSameEventMC, "Enable processing same event for Monte Carlo", false); /// This function processes the mixed event /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... @@ -551,50 +549,50 @@ struct femtoUniversePairTaskTrackTrackExtended { bool swpart = fNeventsProcessed % 2; fNeventsProcessed++; - for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - // if (p1.p() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxP") || p1.pt() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxPt") || p2.p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || p2.pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + // if (p1.p() > twotracksconfigs.confCutTable->get("PartOne", "MaxP") || p1.pt() > twotracksconfigs.confCutTable->get("PartOne", "MaxPt") || p2.p() > twotracksconfigs.confCutTable->get("PartTwo", "MaxP") || p2.pt() > twotracksconfigs.confCutTable->get("PartTwo", "MaxPt")) { // continue; // } // if (!isFullPIDSelected(p1.pidcut(), // p1.p(), - // twotracksconfigs.ConfCutTable->get("PartOne", "PIDthr"), + // twotracksconfigs.confCutTable->get("PartOne", "PIDthr"), // vPIDPartOne, - // twotracksconfigs.ConfNspecies, + // twotracksconfigs.confNspecies, // kNsigma, - // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPC"), - // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPCTOF")) || + // twotracksconfigs.confCutTable->get("PartOne", "nSigmaTPC"), + // twotracksconfigs.confCutTable->get("PartOne", "nSigmaTPCTOF")) || // !isFullPIDSelected(p2.pidcut(), // p2.p(), - // twotracksconfigs.ConfCutTable->get("PartTwo", "PIDthr"), + // twotracksconfigs.confCutTable->get("PartTwo", "PIDthr"), // vPIDPartTwo, - // twotracksconfigs.ConfNspecies, + // twotracksconfigs.confNspecies, // kNsigma, - // twotracksconfigs.ConfCutTable->get("PartTwo", "nSigmaTPC"), - // twotracksconfigs.ConfCutTable->get("PartTwo", "nSigmaTPCTOF"))) { + // twotracksconfigs.confCutTable->get("PartTwo", "nSigmaTPC"), + // twotracksconfigs.confCutTable->get("PartTwo", "nSigmaTPCTOF"))) { // continue; // } - if (trackonefilter.ConfIsTrackOneIdentified) { - if (!IsParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { + if (trackonefilter.confIsTrackOneIdentified) { + if (!isParticleNSigma((int8_t)1, p1.p(), trackCuts.getNsigmaTPC(p1, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p1, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p1, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p1, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p1, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p1, o2::track::PID::Kaon))) { continue; } } - if (tracktwofilter.ConfIsTrackTwoIdentified) { - if (!IsParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { + if (tracktwofilter.confIsTrackTwoIdentified) { + if (!isParticleNSigma((int8_t)2, p2.p(), trackCuts.getNsigmaTPC(p2, o2::track::PID::Proton), trackCuts.getNsigmaTOF(p2, o2::track::PID::Proton), trackCuts.getNsigmaTPC(p2, o2::track::PID::Pion), trackCuts.getNsigmaTOF(p2, o2::track::PID::Pion), trackCuts.getNsigmaTPC(p2, o2::track::PID::Kaon), trackCuts.getNsigmaTOF(p2, o2::track::PID::Kaon))) { continue; } } - if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::mixed)) { + if (confIsCPR.value) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } if (swpart) - mixedEventCont.setPair(p1, p2, multCol, twotracksconfigs.ConfUse3D); + mixedEventCont.setPair(p1, p2, multCol, twotracksconfigs.confUse3D); else - mixedEventCont.setPair(p2, p1, multCol, twotracksconfigs.ConfUse3D); + mixedEventCont.setPair(p2, p1, multCol, twotracksconfigs.confUse3D); swpart = !swpart; } @@ -603,13 +601,13 @@ struct femtoUniversePairTaskTrackTrackExtended { /// process function for to call doMixedEvent with Data /// @param cols subscribe to the collisions table (Data) /// @param parts subscribe to the femtoUniverseParticleTable - void processMixedEvent(o2::aod::FDCollisions& cols, - FilteredFemtoFullParticles& parts) + void processMixedEvent(const o2::aod::FDCollisions& cols, + const FilteredFemtoFullParticles& parts) { - for (auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { const int multiplicityCol = collision1.multNtr(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol})); + mixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol})); auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); @@ -626,20 +624,20 @@ struct femtoUniversePairTaskTrackTrackExtended { doMixedEvent(groupPartsOne, groupPartsTwo, parts, magFieldTesla1, multiplicityCol); } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackExtended, processMixedEvent, "Enable processing mixed events", true); + PROCESS_SWITCH(FemtoUniversePairTaskTrackTrackExtended, processMixedEvent, "Enable processing mixed events", true); /// brief process function for to call doMixedEvent with Monte Carlo /// @param cols subscribe to the collisions table (Monte Carlo Reconstructed reconstructed) /// @param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth /// @param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table - void processMixedEventMC(o2::aod::FDCollisions& cols, - soa::Join& parts, - o2::aod::FDMCParticles&) + void processMixedEventMC(const o2::aod::FDCollisions& cols, + const soa::Join& parts, + const o2::aod::FDMCParticles&) { - for (auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { const int multiplicityCol = collision1.multNtr(); - MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol})); + mixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol})); auto groupPartsOne = partsOneMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); auto groupPartsTwo = partsTwoMC->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); @@ -656,13 +654,13 @@ struct femtoUniversePairTaskTrackTrackExtended { doMixedEvent(groupPartsOne, groupPartsTwo, parts, magFieldTesla1, multiplicityCol); } } - PROCESS_SWITCH(femtoUniversePairTaskTrackTrackExtended, processMixedEventMC, "Enable processing mixed events MC", false); + PROCESS_SWITCH(FemtoUniversePairTaskTrackTrackExtended, processMixedEventMC, "Enable processing mixed events MC", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { WorkflowSpec workflow{ - adaptAnalysisTask(cfgc), + adaptAnalysisTask(cfgc), }; return workflow; } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMC.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMC.cxx index 2a9a1bb8153..c1ece63158b 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMC.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMC.cxx @@ -35,13 +35,13 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairAngularWithCentMultKt.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; @@ -167,27 +167,27 @@ struct femtoUniversePairTaskTrackTrackMC { Configurable cfgProcessMultBins{"cfgProcessMultBins", true, "Process kstar histograms in multiplicity bins (in multiplicity bins)"}; Configurable cfgProcessKtBins{"cfgProcessKtBins", true, "Process kstar histograms in kT bins (if cfgProcessMultBins is set false, this will not be processed regardless this Configurable state)"}; - FemtoUniverseContainer sameEventCont; - FemtoUniverseContainer mixedEventCont; + FemtoUniverseContainer sameEventCont; + FemtoUniverseContainer mixedEventCont; - FemtoUniverseContainer sameEventContPP; - FemtoUniverseContainer mixedEventContPP; + FemtoUniverseContainer sameEventContPP; + FemtoUniverseContainer mixedEventContPP; - FemtoUniverseContainer sameEventContMM; - FemtoUniverseContainer mixedEventContMM; + FemtoUniverseContainer sameEventContMM; + FemtoUniverseContainer mixedEventContMM; FemtoUniversePairCleaner pairCleaner; FemtoUniverseDetaDphiStar pairCloseRejection; FemtoUniverseTrackSelection trackCuts; - PairWithCentMultKt sameEventMultCont; - PairWithCentMultKt mixedEventMultCont; + FemtoUniversePairAngularWithCentMultKt sameEventMultCont; + FemtoUniversePairAngularWithCentMultKt mixedEventMultCont; - PairWithCentMultKt sameEventMultContPP; - PairWithCentMultKt mixedEventMultContPP; + FemtoUniversePairAngularWithCentMultKt sameEventMultContPP; + FemtoUniversePairAngularWithCentMultKt mixedEventMultContPP; - PairWithCentMultKt sameEventMultContMM; - PairWithCentMultKt mixedEventMultContMM; + FemtoUniversePairAngularWithCentMultKt sameEventMultContMM; + FemtoUniversePairAngularWithCentMultKt mixedEventMultContMM; float mass1 = -1; float mass2 = -1; @@ -449,7 +449,7 @@ struct femtoUniversePairTaskTrackTrackMC { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -481,7 +481,7 @@ struct femtoUniversePairTaskTrackTrackMC { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -595,7 +595,7 @@ struct femtoUniversePairTaskTrackTrackMC { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMcTruth.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMcTruth.cxx index 0ae10b8c65a..753f528d53f 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMcTruth.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMcTruth.cxx @@ -30,11 +30,11 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniverseEventHisto.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; @@ -106,8 +106,8 @@ struct femtoUniversePairTaskTrackTrackMcTruth { Configurable ConfPhiBins{"ConfPhiBins", 29, "Number of phi bins in deta dphi"}; Configurable ConfEtaBins{"ConfEtaBins", 29, "Number of eta bins in deta dphi"}; - FemtoUniverseContainer sameEventCont; - FemtoUniverseContainer mixedEventCont; + FemtoUniverseContainer sameEventCont; + FemtoUniverseContainer mixedEventCont; FemtoUniversePairCleaner pairCleaner; /// Histogram output HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject}; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx index 41bbc51b54e..d243bf9f96f 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx @@ -36,13 +36,13 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseFemtoContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairWithCentMultKt.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; @@ -174,27 +174,27 @@ struct femtoUniversePairTaskTrackTrackMultKtExtended { Configurable cfgProcessKtBins{"cfgProcessKtBins", true, "Process kstar histograms in kT bins (if 'cfgProcessMultBins' is false, it will not be processed regardless of 'cfgProcessKtBins' state)"}; Configurable cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and MultBins"}; - FemtoUniverseFemtoContainer sameEventCont; - FemtoUniverseFemtoContainer mixedEventCont; + FemtoUniverseFemtoContainer sameEventCont; + FemtoUniverseFemtoContainer mixedEventCont; - FemtoUniverseFemtoContainer sameEventContPP; - FemtoUniverseFemtoContainer mixedEventContPP; + FemtoUniverseFemtoContainer sameEventContPP; + FemtoUniverseFemtoContainer mixedEventContPP; - FemtoUniverseFemtoContainer sameEventContMM; - FemtoUniverseFemtoContainer mixedEventContMM; + FemtoUniverseFemtoContainer sameEventContMM; + FemtoUniverseFemtoContainer mixedEventContMM; FemtoUniversePairCleaner pairCleaner; FemtoUniverseDetaDphiStar pairCloseRejection; FemtoUniverseTrackSelection trackCuts; - PairWithCentMultKt sameEventMultCont; - PairWithCentMultKt mixedEventMultCont; + FemtoUniversePairWithCentMultKt sameEventMultCont; + FemtoUniversePairWithCentMultKt mixedEventMultCont; - PairWithCentMultKt sameEventMultContPP; - PairWithCentMultKt mixedEventMultContPP; + FemtoUniversePairWithCentMultKt sameEventMultContPP; + FemtoUniversePairWithCentMultKt mixedEventMultContPP; - PairWithCentMultKt sameEventMultContMM; - PairWithCentMultKt mixedEventMultContMM; + FemtoUniversePairWithCentMultKt sameEventMultContMM; + FemtoUniversePairWithCentMultKt mixedEventMultContMM; float mass1 = -1; float mass2 = -1; @@ -427,7 +427,7 @@ struct femtoUniversePairTaskTrackTrackMultKtExtended { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -457,7 +457,7 @@ struct femtoUniversePairTaskTrackTrackMultKtExtended { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -590,7 +590,7 @@ struct femtoUniversePairTaskTrackTrackMultKtExtended { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx index 2f1e8ee4712..93374bf2a16 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx @@ -34,13 +34,13 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseSHContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseMath.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairSHCentMultKt.h" using namespace o2; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::soa; @@ -181,27 +181,27 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { Configurable cfgProcessKtBins{"cfgProcessKtBins", true, "Process kstar histograms in kT bins (if cfgProcessMultBins is set false, this will not be processed regardless this Configurable state)"}; Configurable cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and Mult bins"}; - FemtoUniverseSHContainer sameEventCont; - FemtoUniverseSHContainer mixedEventCont; + FemtoUniverseSHContainer sameEventCont; + FemtoUniverseSHContainer mixedEventCont; - FemtoUniverseSHContainer sameEventContPP; - FemtoUniverseSHContainer mixedEventContPP; + FemtoUniverseSHContainer sameEventContPP; + FemtoUniverseSHContainer mixedEventContPP; - FemtoUniverseSHContainer sameEventContMM; - FemtoUniverseSHContainer mixedEventContMM; + FemtoUniverseSHContainer sameEventContMM; + FemtoUniverseSHContainer mixedEventContMM; FemtoUniversePairCleaner pairCleaner; FemtoUniverseDetaDphiStar pairCloseRejection; FemtoUniverseTrackSelection trackCuts; - PairSHCentMultKt sameEventMultCont; - PairSHCentMultKt mixedEventMultCont; + PairSHCentMultKt sameEventMultCont; + PairSHCentMultKt mixedEventMultCont; - PairSHCentMultKt sameEventMultContPP; - PairSHCentMultKt mixedEventMultContPP; + PairSHCentMultKt sameEventMultContPP; + PairSHCentMultKt mixedEventMultContPP; - PairSHCentMultKt sameEventMultContMM; - PairSHCentMultKt mixedEventMultContMM; + PairSHCentMultKt sameEventMultContMM; + PairSHCentMultKt mixedEventMultContMM; float mass1 = -1; float mass2 = -1; @@ -475,7 +475,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -485,7 +485,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { continue; } float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); - sameEventMultCont.fill_mult_NumDen(p1, p2, femtoUniverseSHContainer::EventType::same, 2, multCol, kT, ConfIsIden); + sameEventMultCont.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, kT, ConfIsIden); } } else { for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsOne))) { @@ -499,7 +499,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -516,18 +516,18 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { switch (ContType) { case 2: { if (rand > 0.5) { - sameEventMultContPP.fill_mult_NumDen(p1, p2, femtoUniverseSHContainer::EventType::same, 2, multCol, kT, ConfIsIden); + sameEventMultContPP.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, kT, ConfIsIden); } else if (rand <= 0.5) { - sameEventMultContPP.fill_mult_NumDen(p2, p1, femtoUniverseSHContainer::EventType::same, 2, multCol, kT, ConfIsIden); + sameEventMultContPP.fillMultNumDen(p2, p1, femto_universe_sh_container::EventType::same, 2, multCol, kT, ConfIsIden); } break; } case 3: { if (rand > 0.5) { - sameEventMultContMM.fill_mult_NumDen(p1, p2, femtoUniverseSHContainer::EventType::same, 2, multCol, kT, ConfIsIden); + sameEventMultContMM.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, kT, ConfIsIden); } else if (rand <= 0.5) { - sameEventMultContMM.fill_mult_NumDen(p2, p1, femtoUniverseSHContainer::EventType::same, 2, multCol, kT, ConfIsIden); + sameEventMultContMM.fillMultNumDen(p2, p1, femto_universe_sh_container::EventType::same, 2, multCol, kT, ConfIsIden); } break; } @@ -607,7 +607,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } if (ConfIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; } } @@ -619,27 +619,27 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { switch (ContType) { case 1: { if (rand > 0.5) { - mixedEventMultCont.fill_mult_NumDen(p1, p2, femtoUniverseSHContainer::EventType::mixed, 2, multCol, kT, ConfIsIden); + mixedEventMultCont.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, ConfIsIden); } else { - mixedEventMultCont.fill_mult_NumDen(p2, p1, femtoUniverseSHContainer::EventType::mixed, 2, multCol, kT, ConfIsIden); + mixedEventMultCont.fillMultNumDen(p2, p1, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, ConfIsIden); } break; } case 2: { if (rand > 0.5) { - mixedEventMultContPP.fill_mult_NumDen(p1, p2, femtoUniverseSHContainer::EventType::mixed, 2, multCol, kT, ConfIsIden); + mixedEventMultContPP.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, ConfIsIden); } else { - mixedEventMultContPP.fill_mult_NumDen(p2, p1, femtoUniverseSHContainer::EventType::mixed, 2, multCol, kT, ConfIsIden); + mixedEventMultContPP.fillMultNumDen(p2, p1, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, ConfIsIden); } break; } case 3: { if (rand > 0.5) { - mixedEventMultContMM.fill_mult_NumDen(p1, p2, femtoUniverseSHContainer::EventType::mixed, 2, multCol, kT, ConfIsIden); + mixedEventMultContMM.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, ConfIsIden); } else { - mixedEventMultContMM.fill_mult_NumDen(p2, p1, femtoUniverseSHContainer::EventType::mixed, 2, multCol, kT, ConfIsIden); + mixedEventMultContMM.fillMultNumDen(p2, p1, femto_universe_sh_container::EventType::mixed, 2, multCol, kT, ConfIsIden); } break; } @@ -697,14 +697,14 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { { int JMax = (ConfLMax + 1) * (ConfLMax + 1); if (cfgProcessMM) { - sameEventMultContMM.fill_mult_kT_Cov(femtoUniverseSHContainer::EventType::same, JMax); - mixedEventMultContMM.fill_mult_kT_Cov(femtoUniverseSHContainer::EventType::mixed, JMax); + sameEventMultContMM.fillMultkTCov(femto_universe_sh_container::EventType::same, JMax); + mixedEventMultContMM.fillMultkTCov(femto_universe_sh_container::EventType::mixed, JMax); } else if (cfgProcessPP) { - sameEventMultContPP.fill_mult_kT_Cov(femtoUniverseSHContainer::EventType::same, JMax); - mixedEventMultContPP.fill_mult_kT_Cov(femtoUniverseSHContainer::EventType::mixed, JMax); + sameEventMultContPP.fillMultkTCov(femto_universe_sh_container::EventType::same, JMax); + mixedEventMultContPP.fillMultkTCov(femto_universe_sh_container::EventType::mixed, JMax); } else if (cfgProcessPM) { - sameEventMultCont.fill_mult_kT_Cov(femtoUniverseSHContainer::EventType::same, JMax); - mixedEventMultCont.fill_mult_kT_Cov(femtoUniverseSHContainer::EventType::mixed, JMax); + sameEventMultCont.fillMultkTCov(femto_universe_sh_container::EventType::same, JMax); + mixedEventMultCont.fillMultkTCov(femto_universe_sh_container::EventType::mixed, JMax); } } PROCESS_SWITCH(femtoUniversePairTaskTrackTrackSpherHarMultKtExtended, processCov, "Enable processing same event covariance", true); diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx index a8f91141904..87706527e71 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx @@ -30,7 +30,7 @@ #include "PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h" #include "PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h" -#include "PWGCF/FemtoUniverse/Core/FemtoUtils.h" +#include "PWGCF/FemtoUniverse/Core/femtoUtils.h" #include "Framework/O2DatabasePDGPlugin.h" #include #include @@ -39,7 +39,7 @@ using namespace o2; using namespace o2::soa; using namespace o2::framework; using namespace o2::framework::expressions; -using namespace o2::analysis::femtoUniverse; +using namespace o2::analysis::femto_universe; using namespace o2::aod::pidutils; using namespace o2::track; @@ -144,8 +144,8 @@ struct FemtoUniversePairTaskTrackV0Extended { static constexpr unsigned int V0ChildTable[][2] = {{0, 1}, {1, 0}, {1, 1}}; // Table to select the V0 children - FemtoUniverseContainer sameEventCont; - FemtoUniverseContainer mixedEventCont; + FemtoUniverseContainer sameEventCont; + FemtoUniverseContainer mixedEventCont; FemtoUniversePairCleaner pairCleaner; FemtoUniversePairCleaner pairCleanerV0; FemtoUniverseDetaDphiStar pairCloseRejection; @@ -351,7 +351,7 @@ struct FemtoUniversePairTaskTrackV0Extended { continue; } if (confIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -431,7 +431,7 @@ struct FemtoUniversePairTaskTrackV0Extended { return; } if (confIsCPR.value) { - if (pairCloseRejectionV0.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejectionV0.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { return; } } @@ -508,7 +508,7 @@ struct FemtoUniversePairTaskTrackV0Extended { continue; // track cleaning if (confIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) { continue; } } @@ -598,7 +598,7 @@ struct FemtoUniversePairTaskTrackV0Extended { continue; } if (confIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla1, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) { continue; } } @@ -684,7 +684,7 @@ struct FemtoUniversePairTaskTrackV0Extended { continue; } if (confIsCPR.value) { - if (pairCloseRejectionV0.isClosePair(p1, p2, parts, magFieldTesla1, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejectionV0.isClosePair(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) { continue; } } @@ -731,7 +731,7 @@ struct FemtoUniversePairTaskTrackV0Extended { if ((confV0Type1 == 0 && pdgCode2 != 3122) || (confV0Type1 == 1 && pdgCode2 != -3122)) continue; if (confIsCPR.value) { - if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla1, femtoUniverseContainer::EventType::mixed)) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) { continue; } } diff --git a/PWGCF/Flow/Tasks/CMakeLists.txt b/PWGCF/Flow/Tasks/CMakeLists.txt index d6e288a4594..34a3dafcf30 100644 --- a/PWGCF/Flow/Tasks/CMakeLists.txt +++ b/PWGCF/Flow/Tasks/CMakeLists.txt @@ -15,12 +15,12 @@ o2physics_add_dpl_workflow(flow-pt-efficiency COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(flow-task - SOURCES FlowTask.cxx + SOURCES flowTask.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore COMPONENT_NAME Analysis) -o2physics_add_dpl_workflow(flow-runbyrun - SOURCES FlowRunbyRun.cxx +o2physics_add_dpl_workflow(flow-runby-run + SOURCES flowRunbyRun.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore COMPONENT_NAME Analysis) diff --git a/PWGCF/Flow/Tasks/FlowRunbyRun.cxx b/PWGCF/Flow/Tasks/flowRunbyRun.cxx similarity index 71% rename from PWGCF/Flow/Tasks/FlowRunbyRun.cxx rename to PWGCF/Flow/Tasks/flowRunbyRun.cxx index 4478ca9e0a7..0564bfc3cc1 100644 --- a/PWGCF/Flow/Tasks/FlowRunbyRun.cxx +++ b/PWGCF/Flow/Tasks/flowRunbyRun.cxx @@ -9,9 +9,11 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. // -// code author: Zhiyong Lu (zhiyong.lu@cern.ch) -// jira: PWGCF-254 -// Produce Run-by-Run QA plots and flow analysis for Run3 + +/// \file flowRunbyRun.cxx +/// \author Zhiyong Lu (zhiyong.lu@cern.ch) +/// \since Oct/30/2024 +/// \brief jira: PWGCF-254, produce Run-by-Run QA plots and flow analysis for Run3 #include #include @@ -76,8 +78,8 @@ struct FlowRunbyRun { // Connect to ccdb Service ccdb; - Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; - Configurable url{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; + Configurable ccdbNoLaterThan{"ccdbNoLaterThan", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; + Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; // Define output OutputObj fFC{FlowContainer("FlowContainer")}; @@ -91,10 +93,10 @@ struct FlowRunbyRun { TAxis* fPtAxis; TRandom3* fRndm = new TRandom3(0); int lastRunNumer = -1; - std::vector RunNumbers; // vector of run numbers - std::map>> TH1sList; // map of histograms for all runs - std::map>> ProfilesList; // map of profiles for all runs - std::map WeightsList; // map of weights for all runs + std::vector runNumbers; // vector of run numbers + std::map>> th1sList; // map of histograms for all runs + std::map>> profilesList; // map of profiles for all runs + std::map weightsList; // map of weights for all runs enum OutputTH1Names { // here are TProfiles for vn-pt correlations that are not implemented in GFW hPhi = 0, @@ -110,37 +112,37 @@ struct FlowRunbyRun { kCount_TProfileNames }; - using aodCollisions = soa::Filtered>; - using aodTracks = soa::Filtered>; + using AodCollisions = soa::Filtered>; + using AodTracks = soa::Filtered>; void init(InitContext const&) { - ccdb->setURL(url.value); + ccdb->setURL(ccdbUrl.value); ccdb->setCaching(true); - ccdb->setCreatedNotAfter(nolaterthan.value); + ccdb->setCreatedNotAfter(ccdbNoLaterThan.value); TList* weightlist = new TList(); weightlist->SetOwner(true); fWeightList.setObject(weightlist); // Add output histograms to the registry - RunNumbers = cfgRunNumbers; - for (auto& runNumber : RunNumbers) { - CreateOutputObjectsForRun(runNumber); + runNumbers = cfgRunNumbers; + for (const auto& runNumber : runNumbers) { + createOutputObjectsForRun(runNumber); } o2::framework::AxisSpec axis = axisPt; int nPtBins = axis.binEdges.size() - 1; - double* PtBins = &(axis.binEdges)[0]; - fPtAxis = new TAxis(nPtBins, PtBins); + double* ptBins = &(axis.binEdges)[0]; + fPtAxis = new TAxis(nPtBins, ptBins); // Create FlowContainer TObjArray* oba = new TObjArray(); - std::vector UserDefineGFWCorr = cfgUserDefineGFWCorr; - std::vector UserDefineGFWName = cfgUserDefineGFWName; - if (!UserDefineGFWCorr.empty() && !UserDefineGFWName.empty()) { - for (uint i = 0; i < UserDefineGFWName.size(); i++) { - oba->Add(new TNamed(UserDefineGFWName.at(i).c_str(), UserDefineGFWName.at(i).c_str())); + std::vector userDefineGFWCorr = cfgUserDefineGFWCorr; + std::vector userDefineGFWName = cfgUserDefineGFWName; + if (!userDefineGFWCorr.empty() && !userDefineGFWName.empty()) { + for (uint i = 0; i < userDefineGFWName.size(); i++) { + oba->Add(new TNamed(userDefineGFWName.at(i).c_str(), userDefineGFWName.at(i).c_str())); } } fFC->SetName("FlowContainer"); @@ -154,23 +156,23 @@ struct FlowRunbyRun { corrconfigs.resize(kCount_TProfileNames); corrconfigs[c22] = fGFW->GetCorrelatorConfig("full {2 -2}", "ChFull22", kFALSE); corrconfigs[c22_gap10] = fGFW->GetCorrelatorConfig("refN10 {2} refP10 {-2}", "Ch10Gap22", kFALSE); - if (!UserDefineGFWCorr.empty() && !UserDefineGFWName.empty()) { + if (!userDefineGFWCorr.empty() && !userDefineGFWName.empty()) { LOGF(info, "User adding GFW CorrelatorConfig:"); // attentaion: here we follow the index of cfgUserDefineGFWCorr - for (uint i = 0; i < UserDefineGFWCorr.size(); i++) { - if (i >= UserDefineGFWName.size()) { - LOGF(fatal, "The names you provided are more than configurations. UserDefineGFWName.size(): %d > UserDefineGFWCorr.size(): %d", UserDefineGFWName.size(), UserDefineGFWCorr.size()); + for (uint i = 0; i < userDefineGFWCorr.size(); i++) { + if (i >= userDefineGFWName.size()) { + LOGF(fatal, "The names you provided are more than configurations. userDefineGFWName.size(): %d > userDefineGFWCorr.size(): %d", userDefineGFWName.size(), userDefineGFWCorr.size()); break; } - LOGF(info, "%d: %s %s", i, UserDefineGFWCorr.at(i).c_str(), UserDefineGFWName.at(i).c_str()); - corrconfigsFC.push_back(fGFW->GetCorrelatorConfig(UserDefineGFWCorr.at(i).c_str(), UserDefineGFWName.at(i).c_str(), kFALSE)); + LOGF(info, "%d: %s %s", i, userDefineGFWCorr.at(i).c_str(), userDefineGFWName.at(i).c_str()); + corrconfigsFC.push_back(fGFW->GetCorrelatorConfig(userDefineGFWCorr.at(i).c_str(), userDefineGFWName.at(i).c_str(), kFALSE)); } } fGFW->CreateRegions(); } template - void FillProfile(const GFW::CorrConfig& corrconf, std::shared_ptr profile, const double& cent) + void fillProfile(const GFW::CorrConfig& corrconf, std::shared_ptr profile, const double& cent) { double dnx, val; dnx = fGFW->Calculate(corrconf, 0, kTRUE).real(); @@ -178,14 +180,14 @@ struct FlowRunbyRun { return; if (!corrconf.pTDif) { val = fGFW->Calculate(corrconf, 0, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) + if (std::fabs(val) < 1) profile->Fill(cent, val, dnx); return; } return; } - void FillFC(const GFW::CorrConfig& corrconf, const double& cent, const double& rndm) + void fillFC(const GFW::CorrConfig& corrconf, const double& cent, const double& rndm) { double dnx, val; dnx = fGFW->Calculate(corrconf, 0, kTRUE).real(); @@ -193,22 +195,22 @@ struct FlowRunbyRun { return; if (!corrconf.pTDif) { val = fGFW->Calculate(corrconf, 0, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) + if (std::fabs(val) < 1) fFC->FillProfile(corrconf.Head.c_str(), cent, val, dnx, rndm); return; } - for (Int_t i = 1; i <= fPtAxis->GetNbins(); i++) { + for (auto i = 1; i <= fPtAxis->GetNbins(); i++) { dnx = fGFW->Calculate(corrconf, i - 1, kTRUE).real(); if (dnx == 0) continue; val = fGFW->Calculate(corrconf, i - 1, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) + if (std::fabs(val) < 1) fFC->FillProfile(Form("%s_pt_%i", corrconf.Head.c_str(), i), cent, val, dnx, rndm); } return; } - void CreateOutputObjectsForRun(int runNumber) + void createOutputObjectsForRun(int runNumber) { std::vector> histos(kCount_TH1Names); histos[hPhi] = registry.add(Form("%d/hPhi", runNumber), "", {HistType::kTH1D, {axisPhi}}); @@ -216,25 +218,25 @@ struct FlowRunbyRun { histos[hVtxZ] = registry.add(Form("%d/hVtxZ", runNumber), "", {HistType::kTH1D, {axisVertex}}); histos[hMult] = registry.add(Form("%d/hMult", runNumber), "", {HistType::kTH1D, {{3000, 0.5, 3000.5}}}); histos[hCent] = registry.add(Form("%d/hCent", runNumber), "", {HistType::kTH1D, {{90, 0, 90}}}); - TH1sList.insert(std::make_pair(runNumber, histos)); + th1sList.insert(std::make_pair(runNumber, histos)); std::vector> profiles(kCount_TProfileNames); profiles[c22] = registry.add(Form("%d/c22", runNumber), "", {HistType::kTProfile, {axisIndependent}}); profiles[c22_gap10] = registry.add(Form("%d/c22_gap10", runNumber), "", {HistType::kTProfile, {axisIndependent}}); - ProfilesList.insert(std::make_pair(runNumber, profiles)); + profilesList.insert(std::make_pair(runNumber, profiles)); - // WeightsList + // weightsList o2::framework::AxisSpec axis = axisPt; int nPtBins = axis.binEdges.size() - 1; - double* PtBins = &(axis.binEdges)[0]; + double* ptBins = &(axis.binEdges)[0]; GFWWeights* weight = new GFWWeights(Form("weight_%d", runNumber)); - weight->SetPtBins(nPtBins, PtBins); + weight->SetPtBins(nPtBins, ptBins); weight->Init(true, false); fWeightList->Add(weight); - WeightsList.insert(std::make_pair(runNumber, weight)); + weightsList.insert(std::make_pair(runNumber, weight)); } - void process(aodCollisions::iterator const& collision, aod::BCsWithTimestamps const&, aodTracks const& tracks) + void process(AodCollisions::iterator const& collision, aod::BCsWithTimestamps const&, AodTracks const& tracks) { if (!collision.sel8()) return; @@ -243,51 +245,51 @@ struct FlowRunbyRun { // detect run number auto bc = collision.bc_as(); int runNumber = bc.runNumber(); - float l_Random = fRndm->Rndm(); + float lRandom = fRndm->Rndm(); if (runNumber != lastRunNumer) { lastRunNumer = runNumber; - if (std::find(RunNumbers.begin(), RunNumbers.end(), runNumber) == RunNumbers.end()) { + if (std::find(runNumbers.begin(), runNumbers.end(), runNumber) == runNumbers.end()) { // if run number is not in the preconfigured list, create new output histograms for this run - CreateOutputObjectsForRun(runNumber); - RunNumbers.push_back(runNumber); + createOutputObjectsForRun(runNumber); + runNumbers.push_back(runNumber); } - if (TH1sList.find(runNumber) == TH1sList.end()) { - LOGF(fatal, "RunNumber %d not found in TH1sList", runNumber); + if (th1sList.find(runNumber) == th1sList.end()) { + LOGF(fatal, "RunNumber %d not found in th1sList", runNumber); return; } } - TH1sList[runNumber][hVtxZ]->Fill(collision.posZ()); - TH1sList[runNumber][hMult]->Fill(tracks.size()); - TH1sList[runNumber][hCent]->Fill(collision.centFT0C()); + th1sList[runNumber][hVtxZ]->Fill(collision.posZ()); + th1sList[runNumber][hMult]->Fill(tracks.size()); + th1sList[runNumber][hCent]->Fill(collision.centFT0C()); fGFW->Clear(); const auto cent = collision.centFT0C(); float weff = 1, wacc = 1; - for (auto& track : tracks) { - TH1sList[runNumber][hPhi]->Fill(track.phi()); - TH1sList[runNumber][hEta]->Fill(track.eta()); + for (const auto& track : tracks) { + th1sList[runNumber][hPhi]->Fill(track.phi()); + th1sList[runNumber][hEta]->Fill(track.eta()); // bool WithinPtPOI = (cfgCutPtPOIMin < track.pt()) && (track.pt() < cfgCutPtPOIMax); // within POI pT range - bool WithinPtRef = (cfgCutPtRefMin < track.pt()) && (track.pt() < cfgCutPtRefMax); // within RF pT range - if (WithinPtRef) { + bool withinPtRef = (cfgCutPtRefMin < track.pt()) && (track.pt() < cfgCutPtRefMax); // within RF pT range + if (withinPtRef) { fGFW->Fill(track.eta(), 1, track.phi(), wacc * weff, 1); } if (cfgOutputNUAWeightsRefPt) { - if (WithinPtRef) - WeightsList[runNumber]->Fill(track.phi(), track.eta(), collision.posZ(), track.pt(), cent, 0); + if (withinPtRef) + weightsList[runNumber]->Fill(track.phi(), track.eta(), collision.posZ(), track.pt(), cent, 0); } else { - WeightsList[runNumber]->Fill(track.phi(), track.eta(), collision.posZ(), track.pt(), cent, 0); + weightsList[runNumber]->Fill(track.phi(), track.eta(), collision.posZ(), track.pt(), cent, 0); } } // Filling TProfile for (uint i = 0; i < kCount_TProfileNames; ++i) { - FillProfile(corrconfigs[i], ProfilesList[runNumber][i], cent); + fillProfile(corrconfigs[i], profilesList[runNumber][i], cent); } // Filling Flow Container for (uint l_ind = 0; l_ind < corrconfigsFC.size(); l_ind++) { - FillFC(corrconfigsFC.at(l_ind), cent, l_Random); + fillFC(corrconfigsFC.at(l_ind), cent, lRandom); } } }; diff --git a/PWGCF/Flow/Tasks/flowSP.cxx b/PWGCF/Flow/Tasks/flowSP.cxx index f89d0728364..2de9aab6396 100644 --- a/PWGCF/Flow/Tasks/flowSP.cxx +++ b/PWGCF/Flow/Tasks/flowSP.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include "Framework/runDataProcessing.h" #include "Framework/AnalysisTask.h" @@ -70,13 +71,20 @@ struct FlowSP { O2_DEFINE_CONFIGURABLE(cfgMultCut, bool, true, "Use additional evenr cut on mult correlations"); O2_DEFINE_CONFIGURABLE(cfgTVXinTRD, bool, false, "Use kTVXinTRD (reject TRD triggered events)"); O2_DEFINE_CONFIGURABLE(cfgIsVertexITSTPC, bool, true, "Selects collisions with at least one ITS-TPC track"); + O2_DEFINE_CONFIGURABLE(cfgCCDBdir, std::string, "Users/c/ckoster/ZDC/LHC23_zzh_pass4_small/meanQQ", "ccdb dir for average QQ values in 1% centrality bins"); + O2_DEFINE_CONFIGURABLE(cfgLoadAverageQQ, bool, true, "Load average values for QQ (in centrality bins)"); + O2_DEFINE_CONFIGURABLE(cfgHarm, int, 1, "Flow harmonic n for ux and uy: (Cos(n*phi), Sin(n*phi))"); + O2_DEFINE_CONFIGURABLE(cfgLoadSPPlaneRes, bool, false, "Load ZDC spectator plane resolution"); + O2_DEFINE_CONFIGURABLE(cfgCCDBdir_SP, std::string, "Users/c/ckoster/ZDC/LHC23_zzh_pass4_small/SPPlaneRes", "ccdb dir for average event plane resolution in 1% centrality bins"); ConfigurableAxis axisDCAz{"axisDCAz", {200, -.5, .5}, "DCA_{z} (cm)"}; ConfigurableAxis axisDCAxy{"axisDCAxy", {200, -.5, .5}, "DCA_{xy} (cm)"}; ConfigurableAxis axisPhiMod = {"axisPhiMod", {100, 0, constants::math::PI / 9}, "fmod(#varphi,#pi/9)"}; ConfigurableAxis axisPhi = {"axisPhi", {60, 0, constants::math::TwoPI}, "#varphi"}; ConfigurableAxis axisEta = {"axisEta", {64, -1, 1}, "#eta"}; - ConfigurableAxis axisEtaV1 = {"axisEtaV1", {8, -.8, .8}, "#eta"}; + ConfigurableAxis axisEtaVn = {"axisEtaVn", {8, -.8, .8}, "#eta"}; + ConfigurableAxis axisVx = {"axisVx", {40, -0.01, 0.01}, "v_{x}"}; + ConfigurableAxis axisVy = {"axisVy", {40, -0.01, 0.01}, "v_{y}"}; ConfigurableAxis axisVz = {"axisVz", {40, -10, 10}, "v_{z}"}; ConfigurableAxis axisCent = {"axisCent", {90, 0, 90}, "Centrality(%)"}; ConfigurableAxis axisPhiPlane = {"axisPhiPlane", {100, -constants::math::PI, constants::math::PI}, "#Psi"}; @@ -124,7 +132,7 @@ struct FlowSP { registry.add("hSinPhiASinPhiC", "hSinPhiASinPhiC; Centrality(%); #LT Sin(#Psi^{A})Sin(#Psi^{C})#GT", kTProfile, {axisCent}); registry.add("hSinPhiACosPhiC", "hSinPhiACosPhiC; Centrality(%); #LT Sin(#Psi^{A})Cos(#Psi^{C})#GT", kTProfile, {axisCent}); registry.add("hCosPhiASinsPhiC", "hCosPhiASinsPhiC; Centrality(%); #LT Cos(#Psi^{A})Sin(#Psi^{C})#GT", kTProfile, {axisCent}); - registry.add("hFullEvPlaneRes", "hFullEvPlaneRes; Centrality(%); #sqrt{2#LT Cos(#Psi^{A} - #Psi^{C})#GT} ", kTProfile, {axisCent}); + registry.add("hFullEvPlaneRes", "hFullEvPlaneRes; Centrality(%); -#LT Cos(#Psi^{A} - #Psi^{C})#GT ", kTProfile, {axisCent}); registry.add("QA/after/hCent", "", {HistType::kTH1D, {axisCent}}); registry.add("QA/after/globalTracks_centT0C", "", {HistType::kTH2D, {axisCent, nchAxis}}); @@ -134,6 +142,23 @@ struct FlowSP { registry.add("QA/after/globalTracks_multV0A", "", {HistType::kTH2D, {t0aAxis, nchAxis}}); registry.add("QA/after/multV0A_multT0A", "", {HistType::kTH2D, {t0aAxis, t0aAxis}}); registry.add("QA/after/multT0C_centT0C", "", {HistType::kTH2D, {axisCent, t0cAxis}}); + + registry.add("QA/after/PsiA_vs_Cent", "", {HistType::kTH2D, {axisPhiPlane, axisCent}}); + registry.add("QA/after/PsiC_vs_Cent", "", {HistType::kTH2D, {axisPhiPlane, axisCent}}); + registry.add("QA/after/PsiFull_vs_Cent", "", {HistType::kTH2D, {axisPhiPlane, axisCent}}); + + registry.add("QA/after/PsiA_vs_Vx", "", {HistType::kTH2D, {axisPhiPlane, axisVx}}); + registry.add("QA/after/PsiC_vs_Vx", "", {HistType::kTH2D, {axisPhiPlane, axisVx}}); + registry.add("QA/after/PsiFull_vs_Vx", "", {HistType::kTH2D, {axisPhiPlane, axisVx}}); + + registry.add("QA/after/PsiA_vs_Vy", "", {HistType::kTH2D, {axisPhiPlane, axisVy}}); + registry.add("QA/after/PsiC_vs_Vy", "", {HistType::kTH2D, {axisPhiPlane, axisVy}}); + registry.add("QA/after/PsiFull_vs_Vy", "", {HistType::kTH2D, {axisPhiPlane, axisVy}}); + + registry.add("QA/after/PsiA_vs_Vz", "", {HistType::kTH2D, {axisPhiPlane, axisVz}}); + registry.add("QA/after/PsiC_vs_Vz", "", {HistType::kTH2D, {axisPhiPlane, axisVz}}); + registry.add("QA/after/PsiFull_vs_Vz", "", {HistType::kTH2D, {axisPhiPlane, axisVz}}); + registry.addClone("QA/after/", "QA/before/"); registry.add("QA/after/pt_phi_bef", "", {HistType::kTH2D, {axisPt, axisPhiMod}}); @@ -143,29 +168,38 @@ struct FlowSP { registry.add("QA/after/hDCAz", "", {HistType::kTH1D, {axisDCAz}}); // track properties per centrality and per eta, pt bin - registry.add("uxqxA_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("uyqyA_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("uxqxC_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("uyqyC_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("v1A_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("v1C_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("v1Full_eta_pt", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - - registry.add("uxqxA_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("uyqyA_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("uxqxC_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("uyqyC_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("v1A_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("v1C_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("v1Full_eta_pt_pos", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - - registry.add("uxqxA_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("uyqyA_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("uxqxC_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("uyqyC_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("v1A_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("v1C_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); - registry.add("v1Full_eta_pt_neg", "", kTProfile3D, {axisEtaV1, axisPt, axisCent}); + registry.add("incl/vnAx_eta", "", kTProfile, {axisEtaVn}); + registry.add("incl/vnAy_eta", "", kTProfile, {axisEtaVn}); + registry.add("incl/vnCx_eta", "", kTProfile, {axisEtaVn}); + registry.add("incl/vnCy_eta", "", kTProfile, {axisEtaVn}); + registry.add("incl/vnC_eta", "", kTProfile, {axisEtaVn}); + registry.add("incl/vnA_eta", "", kTProfile, {axisEtaVn}); + registry.add("incl/vnA_eta_EP", "", kTProfile, {axisEtaVn}); + registry.add("incl/vnC_eta_EP", "", kTProfile, {axisEtaVn}); + registry.add("incl/vnFull_eta_EP", "", kTProfile, {axisEtaVn}); + + registry.add("incl/vnAx_pt", "", kTProfile, {axisPt}); + registry.add("incl/vnAy_pt", "", kTProfile, {axisPt}); + registry.add("incl/vnCx_pt", "", kTProfile, {axisPt}); + registry.add("incl/vnCy_pt", "", kTProfile, {axisPt}); + registry.add("incl/vnC_pt", "", kTProfile, {axisPt}); + registry.add("incl/vnA_pt", "", kTProfile, {axisPt}); + registry.add("incl/vnA_pt_EP", "", kTProfile, {axisPt}); + registry.add("incl/vnC_pt_EP", "", kTProfile, {axisPt}); + registry.add("incl/vnFull_pt_EP", "", kTProfile, {axisPt}); + + registry.add("incl/vnAx_cent", "", kTProfile, {axisCent}); + registry.add("incl/vnAy_cent", "", kTProfile, {axisCent}); + registry.add("incl/vnCx_cent", "", kTProfile, {axisCent}); + registry.add("incl/vnCy_cent", "", kTProfile, {axisCent}); + registry.add("incl/vnC_cent", "", kTProfile, {axisCent}); + registry.add("incl/vnA_cent", "", kTProfile, {axisCent}); + registry.add("incl/vnA_cent_EP", "", kTProfile, {axisCent}); + registry.add("incl/vnC_cent_EP", "", kTProfile, {axisCent}); + registry.add("incl/vnFull_cent_EP", "", kTProfile, {axisCent}); + + registry.addClone("incl/", "pos/"); + registry.addClone("incl/", "neg/"); registry.add("qAqCX", "", kTProfile, {axisCent}); registry.add("qAqCY", "", kTProfile, {axisCent}); @@ -337,6 +371,23 @@ struct FlowSP { registry.fill(HIST("QA/after/globalTracks_multV0A"), collision.multFV0A(), tracks.size()); registry.fill(HIST("QA/after/multV0A_multT0A"), collision.multFT0A(), collision.multFV0A()); registry.fill(HIST("QA/after/multT0C_centT0C"), collision.centFT0C(), collision.multFT0C()); + + double psiA = 1.0 * std::atan2(collision.qyA(), collision.qxA()); + double psiC = 1.0 * std::atan2(collision.qyC(), collision.qxC()); + double psiFull = 1.0 * std::atan2(collision.qyA() + collision.qyC(), collision.qxA() + collision.qxC()); + + registry.fill(HIST("QA/after/PsiA_vs_Cent"), psiA, collision.centFT0C()); + registry.fill(HIST("QA/after/PsiC_vs_Cent"), psiC, collision.centFT0C()); + registry.fill(HIST("QA/after/PsiFull_vs_Cent"), psiFull, collision.centFT0C()); + registry.fill(HIST("QA/after/PsiA_vs_Vx"), psiA, collision.vx()); + registry.fill(HIST("QA/after/PsiC_vs_Vx"), psiC, collision.vx()); + registry.fill(HIST("QA/after/PsiFull_vs_Vx"), psiFull, collision.vx()); + registry.fill(HIST("QA/after/PsiA_vs_Vy"), psiA, collision.vy()); + registry.fill(HIST("QA/after/PsiC_vs_Vy"), psiC, collision.vy()); + registry.fill(HIST("QA/after/PsiFull_vs_Vy"), psiFull, collision.vy()); + registry.fill(HIST("QA/after/PsiA_vs_Vz"), psiA, collision.posZ()); + registry.fill(HIST("QA/after/PsiC_vs_Vz"), psiC, collision.posZ()); + registry.fill(HIST("QA/after/PsiFull_vs_Vz"), psiFull, collision.posZ()); } return; } @@ -364,8 +415,6 @@ struct FlowSP { registry.fill(HIST("hEventCount"), 10.5); - fillEventQA(collision, tracks, false); - double qxA = collision.qxA(); double qyA = collision.qyA(); double qxC = collision.qxC(); @@ -377,22 +426,38 @@ struct FlowSP { double psiC = 1.0 * std::atan2(qyC, qxC); registry.fill(HIST("hSPplaneC"), psiC, 1); - // https://twiki.cern.ch/twiki/pub/ALICE/DirectedFlowAnalysisNote/v1_ZDC_ALICE_INT_NOTE_version02.pdf + // https://twiki.cern.ch/twiki/pub/ALICE/DirectedFlowAnalysisNote/vn_ZDC_ALICE_INT_NOTE_version02.pdf double psiFull = 1.0 * std::atan2(qyA + qyC, qxA + qxC); registry.fill(HIST("hSPplaneFull"), psiFull, 1); + fillEventQA(collision, tracks, false); + registry.fill(HIST("hCosPhiACosPhiC"), centrality, std::cos(psiA) * std::cos(psiC)); registry.fill(HIST("hSinPhiASinPhiC"), centrality, std::sin(psiA) * std::sin(psiC)); registry.fill(HIST("hSinPhiACosPhiC"), centrality, std::sin(psiA) * std::cos(psiC)); registry.fill(HIST("hCosPhiASinsPhiC"), centrality, std::cos(psiA) * std::sin(psiC)); - if (std::cos(psiA) - std::cos(psiC) < 0) - registry.fill(HIST("hFullEvPlaneRes"), centrality, std::sqrt(-2. * (std::cos(psiA) - std::cos(psiC)))); + registry.fill(HIST("hFullEvPlaneRes"), centrality, -1 * std::cos(psiA - psiC)); registry.fill(HIST("qAqCXY"), centrality, qxA * qxC + qyA * qyC); registry.fill(HIST("qAqCX"), centrality, qxA * qxC); registry.fill(HIST("qAqCY"), centrality, qyA * qyC); + double corrQQ = 1.; + if (cfgLoadAverageQQ) { + TProfile* hcorrQQ = ccdb->getForTimeStamp(cfgCCDBdir.value, bc.timestamp()); + corrQQ = hcorrQQ->GetBinContent(hcorrQQ->FindBin(centrality)); + } + + double evPlaneRes = 1.; + if (cfgLoadSPPlaneRes) { + TProfile* hEvPlaneRes = ccdb->getForTimeStamp(cfgCCDBdir_SP.value, bc.timestamp()); + evPlaneRes = hEvPlaneRes->GetBinContent(hEvPlaneRes->FindBin(centrality)); + if (evPlaneRes < 0) + LOGF(fatal, " > 0 for centrality %.2f! Cannot determine resolution.. Change centrality ranges!!!", centrality); + evPlaneRes = std::sqrt(evPlaneRes); + } + for (const auto& track : tracks) { if (!trackSelected(track, field)) continue; @@ -405,46 +470,113 @@ struct FlowSP { auto phi = RecoDecay::constrainAngle(track.phi(), 0); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - auto ux = std::cos(phi); - auto uy = std::sin(phi); + auto ux = std::cos(cfgHarm * phi); + auto uy = std::sin(cfgHarm * phi); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - double uxqxA = ux * qxA; - double uyqyA = uy * qyA; - - registry.fill(HIST("uxqxA_eta_pt"), track.eta(), track.pt(), centrality, uxqxA); - registry.fill(HIST("uyqyA_eta_pt"), track.eta(), track.pt(), centrality, uyqyA); - - double uxqxC = ux * qxC; - double uyqyC = uy * qyC; - - registry.fill(HIST("uxqxC_eta_pt"), track.eta(), track.pt(), centrality, uxqxC); - registry.fill(HIST("uyqyC_eta_pt"), track.eta(), track.pt(), centrality, uyqyC); - - double v1A = std::cos(phi - psiA); - double v1C = std::cos(phi - psiC); - double v1Full = std::cos(phi - psiFull); - - registry.fill(HIST("v1A_eta_pt"), track.eta(), track.pt(), centrality, v1A); - registry.fill(HIST("v1C_eta_pt"), track.eta(), track.pt(), centrality, v1C); - registry.fill(HIST("v1Full_eta_pt"), track.eta(), track.pt(), centrality, v1Full); + registry.fill(HIST("incl/vnAx_eta"), track.eta(), (ux * qxA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnAy_eta"), track.eta(), (uy * qyA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnCx_eta"), track.eta(), (ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnCy_eta"), track.eta(), (uy * qyC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnA_eta"), track.eta(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnC_eta"), track.eta(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + + registry.fill(HIST("incl/vnAx_pt"), track.pt(), (ux * qxA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnAy_pt"), track.pt(), (uy * qyA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnCx_pt"), track.pt(), (ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnCy_pt"), track.pt(), (uy * qyC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnA_pt"), track.pt(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnC_pt"), track.pt(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + + registry.fill(HIST("incl/vnAx_cent"), centrality, (ux * qxA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnAy_cent"), centrality, (uy * qyA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnCx_cent"), centrality, (ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnCy_cent"), centrality, (uy * qyC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnA_cent"), centrality, (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("incl/vnC_cent"), centrality, (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + + double vnA = std::cos(cfgHarm * (phi - psiA)) / evPlaneRes; + double vnC = std::cos(cfgHarm * (phi - psiC)) / evPlaneRes; + double vnFull = std::cos(cfgHarm * (phi - psiFull)) / evPlaneRes; + + registry.fill(HIST("incl/vnA_eta_EP"), track.eta(), vnA); + registry.fill(HIST("incl/vnC_eta_EP"), track.eta(), vnC); + registry.fill(HIST("incl/vnFull_eta_EP"), track.eta(), vnFull); + + registry.fill(HIST("incl/vnA_pt_EP"), track.pt(), vnA); + registry.fill(HIST("incl/vnC_pt_EP"), track.pt(), vnC); + registry.fill(HIST("incl/vnFull_pt_EP"), track.pt(), vnFull); + + registry.fill(HIST("incl/vnA_cent_EP"), centrality, vnA); + registry.fill(HIST("incl/vnC_cent_EP"), centrality, vnC); + registry.fill(HIST("incl/vnFull_cent_EP"), centrality, vnFull); if (pos) { - registry.fill(HIST("uxqxA_eta_pt_pos"), track.eta(), track.pt(), centrality, uxqxA); - registry.fill(HIST("uyqyA_eta_pt_pos"), track.eta(), track.pt(), centrality, uyqyA); - registry.fill(HIST("uxqxC_eta_pt_pos"), track.eta(), track.pt(), centrality, uxqxC); - registry.fill(HIST("uyqyC_eta_pt_pos"), track.eta(), track.pt(), centrality, uyqyC); - registry.fill(HIST("v1A_eta_pt_pos"), track.eta(), track.pt(), centrality, v1A); - registry.fill(HIST("v1C_eta_pt_pos"), track.eta(), track.pt(), centrality, v1C); - registry.fill(HIST("v1Full_eta_pt_pos"), track.eta(), track.pt(), centrality, v1Full); + registry.fill(HIST("pos/vnAx_eta"), track.eta(), (ux * qxA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnAy_eta"), track.eta(), (uy * qyA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnCx_eta"), track.eta(), (ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnCy_eta"), track.eta(), (uy * qyC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnA_eta"), track.eta(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnC_eta"), track.eta(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + + registry.fill(HIST("pos/vnAx_pt"), track.pt(), (ux * qxA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnAy_pt"), track.pt(), (uy * qyA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnCx_pt"), track.pt(), (ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnCy_pt"), track.pt(), (uy * qyC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnA_pt"), track.pt(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnC_pt"), track.pt(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + + registry.fill(HIST("pos/vnAx_cent"), centrality, (ux * qxA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnAy_cent"), centrality, (uy * qyA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnCx_cent"), centrality, (ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnCy_cent"), centrality, (uy * qyC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnA_cent"), centrality, (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("pos/vnC_cent"), centrality, (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + + registry.fill(HIST("pos/vnA_eta_EP"), track.eta(), vnA); + registry.fill(HIST("pos/vnC_eta_EP"), track.eta(), vnC); + registry.fill(HIST("pos/vnFull_eta_EP"), track.eta(), vnFull); + + registry.fill(HIST("pos/vnA_pt_EP"), track.pt(), vnA); + registry.fill(HIST("pos/vnC_pt_EP"), track.pt(), vnC); + registry.fill(HIST("pos/vnFull_pt_EP"), track.pt(), vnFull); + + registry.fill(HIST("pos/vnA_cent_EP"), centrality, vnA); + registry.fill(HIST("pos/vnC_cent_EP"), centrality, vnC); + registry.fill(HIST("pos/vnFull_cent_EP"), centrality, vnFull); + } else { - registry.fill(HIST("uxqxA_eta_pt_neg"), track.eta(), track.pt(), centrality, uxqxA); - registry.fill(HIST("uyqyA_eta_pt_neg"), track.eta(), track.pt(), centrality, uyqyA); - registry.fill(HIST("uxqxC_eta_pt_neg"), track.eta(), track.pt(), centrality, uxqxC); - registry.fill(HIST("uyqyC_eta_pt_neg"), track.eta(), track.pt(), centrality, uyqyC); - registry.fill(HIST("v1A_eta_pt_neg"), track.eta(), track.pt(), centrality, v1A); - registry.fill(HIST("v1C_eta_pt_neg"), track.eta(), track.pt(), centrality, v1C); - registry.fill(HIST("v1Full_eta_pt_neg"), track.eta(), track.pt(), centrality, v1Full); + registry.fill(HIST("neg/vnAx_eta"), track.eta(), (ux * qxA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnAy_eta"), track.eta(), (uy * qyA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnCx_eta"), track.eta(), (ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnCy_eta"), track.eta(), (uy * qyC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnA_eta"), track.eta(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnC_eta"), track.eta(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + + registry.fill(HIST("neg/vnAx_pt"), track.pt(), (ux * qxA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnAy_pt"), track.pt(), (uy * qyA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnCx_pt"), track.pt(), (ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnCy_pt"), track.pt(), (uy * qyC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnA_pt"), track.pt(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnC_pt"), track.pt(), (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnAx_cent"), centrality, (ux * qxA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnAy_cent"), centrality, (uy * qyA) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnCx_cent"), centrality, (ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnCy_cent"), centrality, (uy * qyC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnA_cent"), centrality, (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + registry.fill(HIST("neg/vnC_cent"), centrality, (uy * qyC + ux * qxC) / std::sqrt(std::fabs(corrQQ))); + + registry.fill(HIST("neg/vnA_eta_EP"), track.eta(), vnA); + registry.fill(HIST("neg/vnC_eta_EP"), track.eta(), vnC); + registry.fill(HIST("neg/vnFull_eta_EP"), track.eta(), vnFull); + + registry.fill(HIST("neg/vnA_pt_EP"), track.pt(), vnA); + registry.fill(HIST("neg/vnC_pt_EP"), track.pt(), vnC); + registry.fill(HIST("neg/vnFull_pt_EP"), track.pt(), vnFull); + + registry.fill(HIST("neg/vnA_cent_EP"), centrality, vnA); + registry.fill(HIST("neg/vnC_cent_EP"), centrality, vnC); + registry.fill(HIST("neg/vnFull_cent_EP"), centrality, vnFull); } // QA plots registry.fill(HIST("QA/after/hPhi_Eta_vz"), track.phi(), track.eta(), collision.posZ()); diff --git a/PWGCF/Flow/Tasks/FlowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx similarity index 85% rename from PWGCF/Flow/Tasks/FlowTask.cxx rename to PWGCF/Flow/Tasks/flowTask.cxx index 55a5bfc40ba..60e13dde9bc 100644 --- a/PWGCF/Flow/Tasks/FlowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -8,9 +8,11 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -// -// code author: Zhiyong Lu (zhiyong.lu@cern.ch) -// jira: PWGCF-254 + +/// \file flowTask.cxx +/// \author Zhiyong Lu (zhiyong.lu@cern.ch) +/// \since Dec/10/2023 +/// \brief jira: PWGCF-254, task to measure flow observables with cumulant method #include #include @@ -118,8 +120,8 @@ struct FlowTask { // Connect to ccdb Service ccdb; - Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; - Configurable url{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; + Configurable ccdbNoLaterThan{"ccdbNoLaterThan", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; + Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; // Define output OutputObj fFC{FlowContainer("FlowContainer")}; @@ -131,7 +133,7 @@ struct FlowTask { std::vector corrconfigs; TAxis* fPtAxis; TRandom3* fRndm = new TRandom3(0); - std::vector>> BootstrapArray; + std::vector>> bootstrapArray; enum ExtraProfile { // here are TProfiles for vn-pt correlations that are not implemented in GFW kMeanPt_InGap08 = 0, @@ -149,8 +151,8 @@ struct FlowTask { ctpRateFetcher mRateFetcher; TH2* gCurrentHadronicRate; - using aodCollisions = soa::Filtered>; - using aodTracks = soa::Filtered>; + using AodCollisions = soa::Filtered>; + using AodTracks = soa::Filtered>; // Track selection TrackSelection myTrackSel; @@ -167,9 +169,9 @@ struct FlowTask { void init(InitContext const&) { - ccdb->setURL(url.value); + ccdb->setURL(ccdbUrl.value); ccdb->setCaching(true); - ccdb->setCreatedNotAfter(nolaterthan.value); + ccdb->setCreatedNotAfter(ccdbNoLaterThan.value); // Add some output objects to the histogram registry // Event QA @@ -223,26 +225,26 @@ struct FlowTask { registry.add("PtVariance_partB_WithinGap08", "", {HistType::kTProfile, {axisIndependent}}); // initial array - BootstrapArray.resize(cfgNbootstrap); + bootstrapArray.resize(cfgNbootstrap); for (int i = 0; i < cfgNbootstrap; i++) { - BootstrapArray[i].resize(kCount_ExtraProfile); + bootstrapArray[i].resize(kCount_ExtraProfile); } for (int i = 0; i < cfgNbootstrap; i++) { - BootstrapArray[i][kMeanPt_InGap08] = registry.add(Form("BootstrapContainer_%d/hMeanPtWithinGap08", i), "", {HistType::kTProfile, {axisIndependent}}); - BootstrapArray[i][kC22_Gap08_Weff] = registry.add(Form("BootstrapContainer_%d/c22_gap08_Weff", i), "", {HistType::kTProfile, {axisIndependent}}); - BootstrapArray[i][kC22_Gap08_MeanPt] = registry.add(Form("BootstrapContainer_%d/c22_gap08_trackMeanPt", i), "", {HistType::kTProfile, {axisIndependent}}); - BootstrapArray[i][kPtVarParA_InGap08] = registry.add(Form("BootstrapContainer_%d/PtVariance_partA_WithinGap08", i), "", {HistType::kTProfile, {axisIndependent}}); - BootstrapArray[i][kPtVarParB_InGap08] = registry.add(Form("BootstrapContainer_%d/PtVariance_partB_WithinGap08", i), "", {HistType::kTProfile, {axisIndependent}}); + bootstrapArray[i][kMeanPt_InGap08] = registry.add(Form("BootstrapContainer_%d/hMeanPtWithinGap08", i), "", {HistType::kTProfile, {axisIndependent}}); + bootstrapArray[i][kC22_Gap08_Weff] = registry.add(Form("BootstrapContainer_%d/c22_gap08_Weff", i), "", {HistType::kTProfile, {axisIndependent}}); + bootstrapArray[i][kC22_Gap08_MeanPt] = registry.add(Form("BootstrapContainer_%d/c22_gap08_trackMeanPt", i), "", {HistType::kTProfile, {axisIndependent}}); + bootstrapArray[i][kPtVarParA_InGap08] = registry.add(Form("BootstrapContainer_%d/PtVariance_partA_WithinGap08", i), "", {HistType::kTProfile, {axisIndependent}}); + bootstrapArray[i][kPtVarParB_InGap08] = registry.add(Form("BootstrapContainer_%d/PtVariance_partB_WithinGap08", i), "", {HistType::kTProfile, {axisIndependent}}); } } o2::framework::AxisSpec axis = axisPt; int nPtBins = axis.binEdges.size() - 1; - double* PtBins = &(axis.binEdges)[0]; - fPtAxis = new TAxis(nPtBins, PtBins); + double* ptBins = &(axis.binEdges)[0]; + fPtAxis = new TAxis(nPtBins, ptBins); if (cfgOutputNUAWeights) { - fWeights->SetPtBins(nPtBins, PtBins); + fWeights->SetPtBins(nPtBins, ptBins); fWeights->Init(true, false); } @@ -254,29 +256,29 @@ struct FlowTask { oba->Add(new TNamed("ChFull42", "ChFull42")); oba->Add(new TNamed("ChFull24", "ChFull24")); oba->Add(new TNamed("ChFull26", "ChFull26")); - for (Int_t i = 0; i < fPtAxis->GetNbins(); i++) + for (auto i = 0; i < fPtAxis->GetNbins(); i++) oba->Add(new TNamed(Form("ChFull22_pt_%i", i + 1), "ChFull22_pTDiff")); - for (Int_t i = 0; i < fPtAxis->GetNbins(); i++) + for (auto i = 0; i < fPtAxis->GetNbins(); i++) oba->Add(new TNamed(Form("ChFull24_pt_%i", i + 1), "ChFull24_pTDiff")); oba->Add(new TNamed("Ch04Gap22", "Ch04Gap22")); oba->Add(new TNamed("Ch06Gap22", "Ch06Gap22")); oba->Add(new TNamed("Ch08Gap22", "Ch08Gap22")); oba->Add(new TNamed("Ch10Gap22", "Ch10Gap22")); - for (Int_t i = 0; i < fPtAxis->GetNbins(); i++) + for (auto i = 0; i < fPtAxis->GetNbins(); i++) oba->Add(new TNamed(Form("Ch10Gap22_pt_%i", i + 1), "Ch10Gap22_pTDiff")); oba->Add(new TNamed("Ch12Gap22", "Ch12Gap22")); oba->Add(new TNamed("Ch04Gap32", "Ch04Gap32")); oba->Add(new TNamed("Ch06Gap32", "Ch06Gap32")); oba->Add(new TNamed("Ch08Gap32", "Ch08Gap32")); oba->Add(new TNamed("Ch10Gap32", "Ch10Gap32")); - for (Int_t i = 0; i < fPtAxis->GetNbins(); i++) + for (auto i = 0; i < fPtAxis->GetNbins(); i++) oba->Add(new TNamed(Form("Ch10Gap32_pt_%i", i + 1), "Ch10Gap32_pTDiff")); oba->Add(new TNamed("Ch12Gap32", "Ch12Gap32")); oba->Add(new TNamed("Ch04Gap42", "Ch04Gap42")); oba->Add(new TNamed("Ch06Gap42", "Ch06Gap42")); oba->Add(new TNamed("Ch08Gap42", "Ch08Gap42")); oba->Add(new TNamed("Ch10Gap42", "Ch10Gap42")); - for (Int_t i = 0; i < fPtAxis->GetNbins(); i++) + for (auto i = 0; i < fPtAxis->GetNbins(); i++) oba->Add(new TNamed(Form("Ch10Gap42_pt_%i", i + 1), "Ch10Gap42_pTDiff")); oba->Add(new TNamed("Ch12Gap42", "Ch12Gap42")); oba->Add(new TNamed("ChFull422", "ChFull422")); @@ -292,11 +294,11 @@ struct FlowTask { oba->Add(new TNamed("Ch10Gap3232", "Ch10Gap3232")); oba->Add(new TNamed("Ch10Gap4242", "Ch10Gap4242")); oba->Add(new TNamed("Ch10Gap24", "Ch10Gap24")); - std::vector UserDefineGFWCorr = cfgUserDefineGFWCorr; - std::vector UserDefineGFWName = cfgUserDefineGFWName; - if (!UserDefineGFWCorr.empty() && !UserDefineGFWName.empty()) { - for (uint i = 0; i < UserDefineGFWName.size(); i++) { - oba->Add(new TNamed(UserDefineGFWName.at(i).c_str(), UserDefineGFWName.at(i).c_str())); + std::vector userDefineGFWCorr = cfgUserDefineGFWCorr; + std::vector userDefineGFWName = cfgUserDefineGFWName; + if (!userDefineGFWCorr.empty() && !userDefineGFWName.empty()) { + for (uint i = 0; i < userDefineGFWName.size(); i++) { + oba->Add(new TNamed(userDefineGFWName.at(i).c_str(), userDefineGFWName.at(i).c_str())); } } fFC->SetName("FlowContainer"); @@ -371,16 +373,16 @@ struct FlowTask { corrconfigs.push_back(fGFW->GetCorrelatorConfig("refN10 {3 2} refP10 {-3 -2}", "Ch10Gap3232", kFALSE)); corrconfigs.push_back(fGFW->GetCorrelatorConfig("refN10 {4 2} refP10 {-4 -2}", "Ch10Gap4242", kFALSE)); corrconfigs.push_back(fGFW->GetCorrelatorConfig("refN10 {2 2} refP10 {-2 -2}", "Ch10Gap24", kFALSE)); - if (!UserDefineGFWCorr.empty() && !UserDefineGFWName.empty()) { + if (!userDefineGFWCorr.empty() && !userDefineGFWName.empty()) { LOGF(info, "User adding GFW CorrelatorConfig:"); // attentaion: here we follow the index of cfgUserDefineGFWCorr - for (uint i = 0; i < UserDefineGFWCorr.size(); i++) { - if (i >= UserDefineGFWName.size()) { - LOGF(fatal, "The names you provided are more than configurations. UserDefineGFWName.size(): %d > UserDefineGFWCorr.size(): %d", UserDefineGFWName.size(), UserDefineGFWCorr.size()); + for (uint i = 0; i < userDefineGFWCorr.size(); i++) { + if (i >= userDefineGFWName.size()) { + LOGF(fatal, "The names you provided are more than configurations. userDefineGFWName.size(): %d > userDefineGFWCorr.size(): %d", userDefineGFWName.size(), userDefineGFWCorr.size()); break; } - LOGF(info, "%d: %s %s", i, UserDefineGFWCorr.at(i).c_str(), UserDefineGFWName.at(i).c_str()); - corrconfigs.push_back(fGFW->GetCorrelatorConfig(UserDefineGFWCorr.at(i).c_str(), UserDefineGFWName.at(i).c_str(), kFALSE)); + LOGF(info, "%d: %s %s", i, userDefineGFWCorr.at(i).c_str(), userDefineGFWName.at(i).c_str()); + corrconfigs.push_back(fGFW->GetCorrelatorConfig(userDefineGFWCorr.at(i).c_str(), userDefineGFWName.at(i).c_str(), kFALSE)); } } fGFW->CreateRegions(); @@ -418,7 +420,7 @@ struct FlowTask { } template - void FillProfile(const GFW::CorrConfig& corrconf, const ConstStr& tarName, const double& cent) + void fillProfile(const GFW::CorrConfig& corrconf, const ConstStr& tarName, const double& cent) { double dnx, val; dnx = fGFW->Calculate(corrconf, 0, kTRUE).real(); @@ -426,7 +428,7 @@ struct FlowTask { return; if (!corrconf.pTDif) { val = fGFW->Calculate(corrconf, 0, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) + if (std::fabs(val) < 1) registry.fill(tarName, cent, val, dnx); return; } @@ -434,7 +436,7 @@ struct FlowTask { } template - void FillpTvnProfile(const GFW::CorrConfig& corrconf, const double& sum_pt, const double& WeffEvent, const ConstStr& vnWeff, const ConstStr& vnpT, const double& cent) + void fillpTvnProfile(const GFW::CorrConfig& corrconf, const double& sum_pt, const double& WeffEvent, const ConstStr& vnWeff, const ConstStr& vnpT, const double& cent) { double meanPt = sum_pt / WeffEvent; double dnx, val; @@ -443,7 +445,7 @@ struct FlowTask { return; if (!corrconf.pTDif) { val = fGFW->Calculate(corrconf, 0, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) { + if (std::fabs(val) < 1) { registry.fill(vnWeff, cent, val, dnx * WeffEvent); registry.fill(vnpT, cent, val * meanPt, dnx * WeffEvent); } @@ -452,7 +454,7 @@ struct FlowTask { return; } - void FillpTvnProfile(const GFW::CorrConfig& corrconf, const double& sum_pt, const double& WeffEvent, std::shared_ptr vnWeff, std::shared_ptr vnpT, const double& cent) + void fillpTvnProfile(const GFW::CorrConfig& corrconf, const double& sum_pt, const double& WeffEvent, std::shared_ptr vnWeff, std::shared_ptr vnpT, const double& cent) { double meanPt = sum_pt / WeffEvent; double dnx, val; @@ -461,7 +463,7 @@ struct FlowTask { return; if (!corrconf.pTDif) { val = fGFW->Calculate(corrconf, 0, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) { + if (std::fabs(val) < 1) { vnWeff->Fill(cent, val, dnx * WeffEvent); vnpT->Fill(cent, val * meanPt, dnx * WeffEvent); } @@ -470,7 +472,7 @@ struct FlowTask { return; } - void FillFC(const GFW::CorrConfig& corrconf, const double& cent, const double& rndm) + void fillFC(const GFW::CorrConfig& corrconf, const double& cent, const double& rndm) { double dnx, val; dnx = fGFW->Calculate(corrconf, 0, kTRUE).real(); @@ -478,16 +480,16 @@ struct FlowTask { return; if (!corrconf.pTDif) { val = fGFW->Calculate(corrconf, 0, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) + if (std::fabs(val) < 1) fFC->FillProfile(corrconf.Head.c_str(), cent, val, dnx, rndm); return; } - for (Int_t i = 1; i <= fPtAxis->GetNbins(); i++) { + for (auto i = 1; i <= fPtAxis->GetNbins(); i++) { dnx = fGFW->Calculate(corrconf, i - 1, kTRUE).real(); if (dnx == 0) continue; val = fGFW->Calculate(corrconf, i - 1, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) + if (std::fabs(val) < 1) fFC->FillProfile(Form("%s_pt_%i", corrconf.Head.c_str(), i), cent, val, dnx, rndm); } return; @@ -569,7 +571,7 @@ struct FlowTask { } // V0A T0A 5 sigma cut - if (cfgEvSelV0AT0ACut && (fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > 5 * fT0AV0ASigma->Eval(collision.multFT0A()))) + if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > 5 * fT0AV0ASigma->Eval(collision.multFT0A()))) return 0; return 1; @@ -592,7 +594,7 @@ struct FlowTask { template bool trackSelected(TTrack track) { - if (cfgCutDCAzPtDepEnabled && (fabs(track.dcaZ()) > (0.004f + 0.013f / track.pt()))) + if (cfgCutDCAzPtDepEnabled && (std::fabs(track.dcaZ()) > (0.004f + 0.013f / track.pt()))) return false; if (cfgTrkSelSwitch) { @@ -603,18 +605,19 @@ struct FlowTask { } template - bool RejectionTPCoverlap(TTrack track, const int field) + bool rejectionTPCoverlap(TTrack track, const int field) { double phimodn = track.phi(); if (field < 0) // for negative polarity field - phimodn = TMath::TwoPi() - phimodn; + phimodn = o2::constants::math::TwoPI - phimodn; if (track.sign() < 0) // for negative charge - phimodn = TMath::TwoPi() - phimodn; + phimodn = o2::constants::math::TwoPI - phimodn; if (phimodn < 0) LOGF(warning, "phi < 0: %g", phimodn); - phimodn += TMath::Pi() / 18.0; // to center gap in the middle - phimodn = fmod(phimodn, TMath::Pi() / 9.0); + float middle = o2::constants::math::TwoPI / 18.0; + phimodn += middle; // to center gap in the middle + phimodn = fmod(phimodn, o2::constants::math::TwoPI / 9.0); registry.fill(HIST("pt_phi_bef"), track.pt(), phimodn); if (cfgRejectionTPCsectorOverlap) { if (phimodn < fPhiCutHigh->Eval(track.pt()) && phimodn > fPhiCutLow->Eval(track.pt())) @@ -641,7 +644,7 @@ struct FlowTask { gCurrentHadronicRate = gHadronicRate[mRunNumber]; } - void process(aodCollisions::iterator const& collision, aod::BCsWithTimestamps const&, aodTracks const& tracks) + void process(AodCollisions::iterator const& collision, aod::BCsWithTimestamps const&, AodTracks const& tracks) { registry.fill(HIST("hEventCount"), 0.5); if (!collision.sel8()) @@ -651,7 +654,7 @@ struct FlowTask { registry.fill(HIST("hEventCount"), 1.5); auto bc = collision.bc_as(); int currentRunNumber = bc.runNumber(); - for (auto& ExcludedRun : cfgRunRemoveList.value) { + for (const auto& ExcludedRun : cfgRunRemoveList.value) { if (currentRunNumber == ExcludedRun) { return; } @@ -670,7 +673,7 @@ struct FlowTask { if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent)) return; registry.fill(HIST("hEventCount"), 3.5); - float l_Random = fRndm->Rndm(); + float lRandom = fRndm->Rndm(); float vtxz = collision.posZ(); registry.fill(HIST("hVtxZ"), vtxz); registry.fill(HIST("hMult"), tracks.size()); @@ -702,29 +705,29 @@ struct FlowTask { float weff = 1, wacc = 1; double weffEvent = 0; double ptSum = 0., ptSum_Gap08 = 0.; - double weffEvent_WithinGap08 = 0., weffEventSquare_WithinGap08 = 0.; - double sum_ptSquare_wSquare_WithinGap08 = 0., sum_pt_wSquare_WithinGap08 = 0.; - int Magnetfield = 0; - double NTracksCorrected = 0; + double weffEventWithinGap08 = 0., weffEventSquareWithinGap08 = 0.; + double sumptSquarewSquareWithinGap08 = 0., sumptwSquareWithinGap08 = 0.; + int magnetfield = 0; + double nTracksCorrected = 0; if (cfgShowTPCsectorOverlap) { // magnet field dependence cut - Magnetfield = getMagneticField(bc.timestamp()); + magnetfield = getMagneticField(bc.timestamp()); } float independent = cent; if (cfgUseNch) independent = static_cast(tracks.size()); - for (auto& track : tracks) { + for (const auto& track : tracks) { if (!trackSelected(track)) continue; - if (cfgShowTPCsectorOverlap && !RejectionTPCoverlap(track, Magnetfield)) + if (cfgShowTPCsectorOverlap && !rejectionTPCoverlap(track, magnetfield)) continue; - bool WithinPtPOI = (cfgCutPtPOIMin < track.pt()) && (track.pt() < cfgCutPtPOIMax); // within POI pT range - bool WithinPtRef = (cfgCutPtRefMin < track.pt()) && (track.pt() < cfgCutPtRefMax); // within RF pT range - bool WithinEtaGap08 = (track.eta() >= -0.4) && (track.eta() <= 0.4); + bool withinPtPOI = (cfgCutPtPOIMin < track.pt()) && (track.pt() < cfgCutPtPOIMax); // within POI pT range + bool withinPtRef = (cfgCutPtRefMin < track.pt()) && (track.pt() < cfgCutPtRefMax); // within RF pT range + bool withinEtaGap08 = (track.eta() >= -0.4) && (track.eta() <= 0.4); if (cfgOutputNUAWeights) { if (cfgOutputNUAWeightsRefPt) { - if (WithinPtRef) + if (withinPtRef) fWeights->Fill(track.phi(), track.eta(), vtxz, track.pt(), cent, 0); } else { fWeights->Fill(track.phi(), track.eta(), vtxz, track.pt(), cent, 0); @@ -733,7 +736,7 @@ struct FlowTask { if (!setCurrentParticleWeights(weff, wacc, track.phi(), track.eta(), track.pt(), vtxz)) continue; registry.fill(HIST("hPt"), track.pt()); - if (WithinPtRef) { + if (withinPtRef) { registry.fill(HIST("hPhi"), track.phi()); registry.fill(HIST("hPhiWeighted"), track.phi(), wacc); registry.fill(HIST("hEta"), track.eta()); @@ -746,65 +749,65 @@ struct FlowTask { registry.fill(HIST("hDCAxy"), track.dcaXY(), track.pt()); weffEvent += weff; ptSum += weff * track.pt(); - NTracksCorrected += weff; - if (WithinEtaGap08) { + nTracksCorrected += weff; + if (withinEtaGap08) { ptSum_Gap08 += weff * track.pt(); - sum_pt_wSquare_WithinGap08 += weff * weff * track.pt(); - sum_ptSquare_wSquare_WithinGap08 += weff * weff * track.pt() * track.pt(); - weffEvent_WithinGap08 += weff; - weffEventSquare_WithinGap08 += weff * weff; + sumptwSquareWithinGap08 += weff * weff * track.pt(); + sumptSquarewSquareWithinGap08 += weff * weff * track.pt() * track.pt(); + weffEventWithinGap08 += weff; + weffEventSquareWithinGap08 += weff * weff; } } - if (WithinPtRef) + if (withinPtRef) fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 1); - if (WithinPtPOI) + if (withinPtPOI) fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 2); - if (WithinPtPOI && WithinPtRef) + if (withinPtPOI && withinPtRef) fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 4); } - registry.fill(HIST("hTrackCorrection2d"), tracks.size(), NTracksCorrected); + registry.fill(HIST("hTrackCorrection2d"), tracks.size(), nTracksCorrected); if (!cfgUseSmallMemory) { - double WeffEvent_diff_WithGap08 = weffEvent_WithinGap08 * weffEvent_WithinGap08 - weffEventSquare_WithinGap08; + double weffEventDiffWithGap08 = weffEventWithinGap08 * weffEventWithinGap08 - weffEventSquareWithinGap08; // Filling TProfile // MeanPt if (weffEvent > 1e-6) registry.fill(HIST("hMeanPt"), independent, ptSum / weffEvent, weffEvent); - if (weffEvent_WithinGap08 > 1e-6) - registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEvent_WithinGap08, weffEvent_WithinGap08); + if (weffEventWithinGap08 > 1e-6) + registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, weffEventWithinGap08); // v22-Pt // c22_gap8 * pt_withGap8 - if (weffEvent_WithinGap08 > 1e-6) - FillpTvnProfile(corrconfigs.at(7), ptSum_Gap08, weffEvent_WithinGap08, HIST("c22_gap08_Weff"), HIST("c22_gap08_trackMeanPt"), independent); + if (weffEventWithinGap08 > 1e-6) + fillpTvnProfile(corrconfigs.at(7), ptSum_Gap08, weffEventWithinGap08, HIST("c22_gap08_Weff"), HIST("c22_gap08_trackMeanPt"), independent); // PtVariance - if (WeffEvent_diff_WithGap08 > 1e-6) { + if (weffEventDiffWithGap08 > 1e-6) { registry.fill(HIST("PtVariance_partA_WithinGap08"), independent, - (ptSum_Gap08 * ptSum_Gap08 - sum_ptSquare_wSquare_WithinGap08) / WeffEvent_diff_WithGap08, - WeffEvent_diff_WithGap08); + (ptSum_Gap08 * ptSum_Gap08 - sumptSquarewSquareWithinGap08) / weffEventDiffWithGap08, + weffEventDiffWithGap08); registry.fill(HIST("PtVariance_partB_WithinGap08"), independent, - (weffEvent_WithinGap08 * ptSum_Gap08 - sum_pt_wSquare_WithinGap08) / WeffEvent_diff_WithGap08, - WeffEvent_diff_WithGap08); + (weffEventWithinGap08 * ptSum_Gap08 - sumptwSquareWithinGap08) / weffEventDiffWithGap08, + weffEventDiffWithGap08); } // Filling Bootstrap Samples - int SampleIndex = static_cast(cfgNbootstrap * l_Random); - if (weffEvent_WithinGap08 > 1e-6) - BootstrapArray[SampleIndex][kMeanPt_InGap08]->Fill(independent, ptSum_Gap08 / weffEvent_WithinGap08, weffEvent_WithinGap08); - if (weffEvent_WithinGap08 > 1e-6) - FillpTvnProfile(corrconfigs.at(7), ptSum_Gap08, weffEvent_WithinGap08, BootstrapArray[SampleIndex][kC22_Gap08_Weff], BootstrapArray[SampleIndex][kC22_Gap08_MeanPt], independent); - if (WeffEvent_diff_WithGap08 > 1e-6) { - BootstrapArray[SampleIndex][kPtVarParA_InGap08]->Fill(independent, - (ptSum_Gap08 * ptSum_Gap08 - sum_ptSquare_wSquare_WithinGap08) / WeffEvent_diff_WithGap08, - WeffEvent_diff_WithGap08); - BootstrapArray[SampleIndex][kPtVarParB_InGap08]->Fill(independent, - (weffEvent_WithinGap08 * ptSum_Gap08 - sum_pt_wSquare_WithinGap08) / WeffEvent_diff_WithGap08, - WeffEvent_diff_WithGap08); + int sampleIndex = static_cast(cfgNbootstrap * lRandom); + if (weffEventWithinGap08 > 1e-6) + bootstrapArray[sampleIndex][kMeanPt_InGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, weffEventWithinGap08); + if (weffEventWithinGap08 > 1e-6) + fillpTvnProfile(corrconfigs.at(7), ptSum_Gap08, weffEventWithinGap08, bootstrapArray[sampleIndex][kC22_Gap08_Weff], bootstrapArray[sampleIndex][kC22_Gap08_MeanPt], independent); + if (weffEventDiffWithGap08 > 1e-6) { + bootstrapArray[sampleIndex][kPtVarParA_InGap08]->Fill(independent, + (ptSum_Gap08 * ptSum_Gap08 - sumptSquarewSquareWithinGap08) / weffEventDiffWithGap08, + weffEventDiffWithGap08); + bootstrapArray[sampleIndex][kPtVarParB_InGap08]->Fill(independent, + (weffEventWithinGap08 * ptSum_Gap08 - sumptwSquareWithinGap08) / weffEventDiffWithGap08, + weffEventDiffWithGap08); } } // Filling Flow Container for (uint l_ind = 0; l_ind < corrconfigs.size(); l_ind++) { - FillFC(corrconfigs.at(l_ind), independent, l_Random); + fillFC(corrconfigs.at(l_ind), independent, lRandom); } } }; diff --git a/PWGCF/TableProducer/dptdptfilter.cxx b/PWGCF/TableProducer/dptdptfilter.cxx index c96ad0356e8..6c2482fffda 100644 --- a/PWGCF/TableProducer/dptdptfilter.cxx +++ b/PWGCF/TableProducer/dptdptfilter.cxx @@ -368,7 +368,14 @@ struct DptDptFilter { Configurable cfgTriggSel{"triggsel", "MB", "Trigger selection: MB,VTXTOFMATCHED,VTXTRDMATCHED,VTXTRDTOFMATCHED,None. Default MB"}; Configurable cfgCentSpec{"centralities", "00-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80", "Centrality/multiplicity ranges in min-max separated by commas"}; Configurable cfgOverallMinP{"overallminp", 0.0f, "The overall minimum momentum for the analysis. Default: 0.0"}; - Configurable cfgTpcExclusionMethod{"cfgTpcExclusionMethod", 0, "The method for excluding tracks within the TPC. 0: no exclusion; 1: static; 2: dynamic. Default: 0"}; + struct : ConfigurableGroup { + std::string prefix = "cfgTpcExclusion"; + Configurable method{"method", 0, "The method for excluding tracks within the TPC. 0: no exclusion; 1: static; 2: dynamic. Default: 0"}; + Configurable positiveLowCut{"positiveLowCut", "0.0787/x - 0.0236", "The lower cut function for positive tracks"}; + Configurable positiveUpCut{"positiveUpCut", "0.0892/x + 0.0251", "The upper cut function for positive tracks"}; + Configurable negativeLowCut{"negativeLowCut", "pi/9.0 - (0.0892/x + 0.0251)", "The lower cut function for negative tracks"}; + Configurable negativeUpCut{"negativeUpCut", "pi/9 - (0.0787/x - 0.0236)", "The upper cut function for negative tracks"}; + } cfgTpcExclusion; Configurable cfgBinning{"binning", {28, -7.0, 7.0, 18, 0.2, 2.0, 16, -0.8, 0.8, 72, 0.5}, "triplets - nbins, min, max - for z_vtx, pT, eta and phi, binning plus bin fraction of phi origin shift"}; @@ -807,9 +814,17 @@ struct DptDptFilterTracks { getTaskOptionValue(initContext, "dpt-dpt-filter", "binning.mPhibinshift", phibinshift, false); TpcExclusionMethod tpcExclude = kNOEXCLUSION; ///< exclude tracks within the TPC according to this method + std::string pLowCut; + std::string pUpCut; + std::string nLowCut; + std::string nUpCut; { int tmpTpcExclude = 0; - getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgTpcExclusionMethod", tmpTpcExclude, false); + getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgTpcExclusion.method", tmpTpcExclude, false); + getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgTpcExclusion.positiveLowCut", pLowCut, false); + getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgTpcExclusion.positiveUpCut", pUpCut, false); + getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgTpcExclusion.negativeLowCut", nLowCut, false); + getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgTpcExclusion.negativeUpCut", nUpCut, false); tpcExclude = static_cast(tmpTpcExclude); } /* self configure the CCDB access to the input file */ @@ -828,6 +843,7 @@ struct DptDptFilterTracks { /* the TPC excluder object instance */ tpcExcluder = TpcExcludeTrack(tpcExclude); + tpcExcluder.setCuts(pLowCut, pUpCut, nLowCut, nUpCut); /* self configure system type and data type */ /* if the system type is not known at this time, we have to put the initialization somewhere else */ diff --git a/PWGCF/TableProducer/dptdptfilter.h b/PWGCF/TableProducer/dptdptfilter.h index 0a824103934..16904455a9e 100644 --- a/PWGCF/TableProducer/dptdptfilter.h +++ b/PWGCF/TableProducer/dptdptfilter.h @@ -17,6 +17,7 @@ #define PWGCF_TABLEPRODUCER_DPTDPTFILTER_H_ #include +#include #include #include #include @@ -1017,7 +1018,6 @@ struct TpcExcludeTrack { } break; case kDYNAMIC: - LOGF(fatal, "Dynamic TPC exclusion method still not implemented"); method = m; break; default: @@ -1040,6 +1040,9 @@ struct TpcExcludeTrack { template bool exclude(TrackObject const& track) { + constexpr int kNoOfTpcSectors = 18; + constexpr float kTpcPhiSectorWidth = (constants::math::TwoPI) / kNoOfTpcSectors; + switch (method) { case kNOEXCLUSION: { return false; @@ -1054,15 +1057,33 @@ struct TpcExcludeTrack { } } break; case kDYNAMIC: { - return false; + float phiInTpcSector = std::fmod(track.phi(), kTpcPhiSectorWidth); + if (track.sign() > 0) { + return (phiInTpcSector < positiveUpCut->Eval(track.pt())) && (positiveLowCut->Eval(track.pt()) < phiInTpcSector); + } else { + return (phiInTpcSector < negativeUpCut->Eval(track.pt())) && (negativeLowCut->Eval(track.pt()) < phiInTpcSector); + } } break; default: return false; } } + void setCuts(std::string pLowCut, std::string pUpCut, std::string nLowCut, std::string nUpCut) + { + LOGF(info, "Setting the TPC exclusion cuts: pLow=%s, pUp=%s, nLow=%s, nUp=%s", pLowCut, pUpCut, nLowCut, nUpCut); + positiveLowCut = new TF1("posLowCut", pLowCut.c_str(), ptlow, ptup); + positiveUpCut = new TF1("posUpCut", pUpCut.c_str(), ptlow, ptup); + negativeLowCut = new TF1("negLowCut", nLowCut.c_str(), ptlow, ptup); + negativeUpCut = new TF1("negUpCut", nUpCut.c_str(), ptlow, ptup); + } + TpcExclusionMethod method = kNOEXCLUSION; float phibinwidth = 0.0; + TF1* positiveLowCut = nullptr; + TF1* positiveUpCut = nullptr; + TF1* negativeLowCut = nullptr; + TF1* negativeUpCut = nullptr; }; template diff --git a/PWGCF/Tasks/CMakeLists.txt b/PWGCF/Tasks/CMakeLists.txt index fdc35cf2ef6..233cb351d13 100644 --- a/PWGCF/Tasks/CMakeLists.txt +++ b/PWGCF/Tasks/CMakeLists.txt @@ -14,13 +14,13 @@ o2physics_add_dpl_workflow(dptdptcorrelations PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis) -o2physics_add_dpl_workflow(dptdpt-filter-qa - SOURCES dptdptfilterqa.cxx +o2physics_add_dpl_workflow(dpt-dpt-filter-qa + SOURCES dptDptFilterQa.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(match-reco-gen - SOURCES match-reco-gen.cxx + SOURCES matchRecoGen.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis) diff --git a/PWGCF/Tasks/dptdptfilterqa.cxx b/PWGCF/Tasks/dptDptFilterQa.cxx similarity index 69% rename from PWGCF/Tasks/dptdptfilterqa.cxx rename to PWGCF/Tasks/dptDptFilterQa.cxx index a8479d20d1a..ebb50785a61 100644 --- a/PWGCF/Tasks/dptdptfilterqa.cxx +++ b/PWGCF/Tasks/dptDptFilterQa.cxx @@ -9,7 +9,12 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +/// \file dptDptFilterQa.cxx +/// \brief basic checks for the behavior of the filter task +/// \author victor.gonzalez.sebastian@gmail.com + #include +#include #include "Framework/ASoAHelpers.h" #include "Framework/AnalysisDataModel.h" @@ -30,12 +35,12 @@ namespace o2::analysis::dptdptfilterqa { typedef enum { kRECO = 0, kGEN } innerdatatype; -static constexpr std::string_view dirname[] = {"reconstructed/", "generated/"}; +static constexpr std::string_view Dirname[] = {"reconstructed/", "generated/"}; } // namespace o2::analysis::dptdptfilterqa // Checking the filtered tables -struct DptDptFilterQA { - Configurable cfgDataType{"datatype", "data", "Data type: data, MC, FastMC, OnTheFlyMC. Default data"}; +struct DptDptFilterQa { + Configurable cfgDataType{"cfgDataType", "data", "Data type: data, MC, FastMC, OnTheFlyMC. Default data"}; HistogramRegistry histos{"DptDptFilterQA", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; o2::analysis::dptdptfilter::DataType datatype; @@ -45,17 +50,17 @@ struct DptDptFilterQA { using namespace o2::analysis::dptdptfilterqa; - histos.add(TString::Format("%s%s", dirname[dir].data(), "TracksOne").Data(), "Tracks as track one", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); - histos.add(TString::Format("%s%s", dirname[dir].data(), "TracksTwo").Data(), "Tracks as track two", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); - histos.add(TString::Format("%s%s", dirname[dir].data(), "TracksOneAndTwo").Data(), "Tracks as track one and as track two", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); - histos.add(TString::Format("%s%s", dirname[dir].data(), "TracksNone").Data(), "Not selected tracks", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); - histos.add(TString::Format("%s%s", dirname[dir].data(), "TracksOneUnsel").Data(), "Tracks as track one", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); - histos.add(TString::Format("%s%s", dirname[dir].data(), "TracksTwoUnsel").Data(), "Tracks as track two", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); - histos.add(TString::Format("%s%s", dirname[dir].data(), "TracksOneAndTwoUnsel").Data(), "Tracks as track one and as track two", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); - histos.add(TString::Format("%s%s", dirname[dir].data(), "TracksNoneUnsel").Data(), "Not selected tracks", kTH1F, {{1500, 0.0, 1500.0}}); - histos.add(TString::Format("%s%s", dirname[dir].data(), "SelectedEvents").Data(), "Selected events", kTH1F, {{2, 0.0, 2.0}}); - histos.get(HIST(dirname[dir]) + HIST("SelectedEvents"))->GetXaxis()->SetBinLabel(1, "Not selected events"); - histos.get(HIST(dirname[dir]) + HIST("SelectedEvents"))->GetXaxis()->SetBinLabel(2, "Selected events"); + histos.add(TString::Format("%s%s", Dirname[dir].data(), "TracksOne").Data(), "Tracks as track one", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); + histos.add(TString::Format("%s%s", Dirname[dir].data(), "TracksTwo").Data(), "Tracks as track two", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); + histos.add(TString::Format("%s%s", Dirname[dir].data(), "TracksOneAndTwo").Data(), "Tracks as track one and as track two", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); + histos.add(TString::Format("%s%s", Dirname[dir].data(), "TracksNone").Data(), "Not selected tracks", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); + histos.add(TString::Format("%s%s", Dirname[dir].data(), "TracksOneUnsel").Data(), "Tracks as track one", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); + histos.add(TString::Format("%s%s", Dirname[dir].data(), "TracksTwoUnsel").Data(), "Tracks as track two", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); + histos.add(TString::Format("%s%s", Dirname[dir].data(), "TracksOneAndTwoUnsel").Data(), "Tracks as track one and as track two", kTH1F, {{1500, 0.0, 1500.0, "number of tracks"}}); + histos.add(TString::Format("%s%s", Dirname[dir].data(), "TracksNoneUnsel").Data(), "Not selected tracks", kTH1F, {{1500, 0.0, 1500.0}}); + histos.add(TString::Format("%s%s", Dirname[dir].data(), "SelectedEvents").Data(), "Selected events", kTH1F, {{2, 0.0, 2.0}}); + histos.get(HIST(Dirname[dir]) + HIST("SelectedEvents"))->GetXaxis()->SetBinLabel(1, "Not selected events"); + histos.get(HIST(Dirname[dir]) + HIST("SelectedEvents"))->GetXaxis()->SetBinLabel(2, "Selected events"); }; void init(InitContext const&) @@ -88,40 +93,40 @@ struct DptDptFilterQA { using namespace o2::analysis::dptdptfilterqa; if (collision.collisionaccepted() != uint8_t(true)) { - histos.fill(HIST(dirname[dir]) + HIST("SelectedEvents"), 0.5); + histos.fill(HIST(Dirname[dir]) + HIST("SelectedEvents"), 0.5); } else { - histos.fill(HIST(dirname[dir]) + HIST("SelectedEvents"), 1.5); + histos.fill(HIST(Dirname[dir]) + HIST("SelectedEvents"), 1.5); } - int ntracks_one = 0; - int ntracks_two = 0; - int ntracks_one_and_two = 0; - int ntracks_none = 0; - for (auto& track : tracks) { + int nTracksOne = 0; + int nTracksTwo = 0; + int nTracksOneAndTwo = 0; + int nTracksNone = 0; + for (auto const& track : tracks) { if (!(track.trackacceptedid() < 0) && !(track.trackacceptedid() < 2)) { LOGF(fatal, "Task not prepared for identified particles"); } if (track.trackacceptedid() != 0 && track.trackacceptedid() != 1) { - ntracks_none++; + nTracksNone++; } if (track.trackacceptedid() == 0) { - ntracks_one++; + nTracksOne++; } if (track.trackacceptedid() == 1) { - ntracks_two++; + nTracksTwo++; } } if (collision.collisionaccepted() != uint8_t(true)) { /* control for non selected events */ - histos.fill(HIST(dirname[dir]) + HIST("TracksOneUnsel"), ntracks_one); - histos.fill(HIST(dirname[dir]) + HIST("TracksTwoUnsel"), ntracks_two); - histos.fill(HIST(dirname[dir]) + HIST("TracksNoneUnsel"), ntracks_none); - histos.fill(HIST(dirname[dir]) + HIST("TracksOneAndTwoUnsel"), ntracks_one_and_two); + histos.fill(HIST(Dirname[dir]) + HIST("TracksOneUnsel"), nTracksOne); + histos.fill(HIST(Dirname[dir]) + HIST("TracksTwoUnsel"), nTracksTwo); + histos.fill(HIST(Dirname[dir]) + HIST("TracksNoneUnsel"), nTracksNone); + histos.fill(HIST(Dirname[dir]) + HIST("TracksOneAndTwoUnsel"), nTracksOneAndTwo); } else { - histos.fill(HIST(dirname[dir]) + HIST("TracksOne"), ntracks_one); - histos.fill(HIST(dirname[dir]) + HIST("TracksTwo"), ntracks_two); - histos.fill(HIST(dirname[dir]) + HIST("TracksNone"), ntracks_none); - histos.fill(HIST(dirname[dir]) + HIST("TracksOneAndTwo"), ntracks_one_and_two); + histos.fill(HIST(Dirname[dir]) + HIST("TracksOne"), nTracksOne); + histos.fill(HIST(Dirname[dir]) + HIST("TracksTwo"), nTracksTwo); + histos.fill(HIST(Dirname[dir]) + HIST("TracksNone"), nTracksNone); + histos.fill(HIST(Dirname[dir]) + HIST("TracksOneAndTwo"), nTracksOneAndTwo); } } @@ -134,7 +139,7 @@ struct DptDptFilterQA { LOGF(DPTDPTFILTERLOGCOLLISIONS, "New filtered generated collision with BC id %d and with %d accepted tracks", collision.bcId(), tracks.size()); processQATask(collision, tracks); } - PROCESS_SWITCH(DptDptFilterQA, processGeneratorLevel, "Process generator level filter task QA", true); + PROCESS_SWITCH(DptDptFilterQa, processGeneratorLevel, "Process generator level filter task QA", true); void processDetectorLevel(soa::Filtered::iterator const& collision, soa::Filtered const& tracks) { @@ -142,11 +147,11 @@ struct DptDptFilterQA { LOGF(DPTDPTFILTERLOGCOLLISIONS, "New filtered collision with BC id %d and with %d accepted tracks", collision.bcId(), tracks.size()); processQATask(collision, tracks); } - PROCESS_SWITCH(DptDptFilterQA, processDetectorLevel, "Process detector level filter task QA", true); + PROCESS_SWITCH(DptDptFilterQa, processDetectorLevel, "Process detector level filter task QA", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - WorkflowSpec workflow{adaptAnalysisTask(cfgc)}; + WorkflowSpec workflow{adaptAnalysisTask(cfgc)}; return workflow; } diff --git a/PWGCF/Tasks/match-reco-gen.cxx b/PWGCF/Tasks/matchRecoGen.cxx similarity index 79% rename from PWGCF/Tasks/match-reco-gen.cxx rename to PWGCF/Tasks/matchRecoGen.cxx index 43adb1b63b0..4e1022acd2f 100644 --- a/PWGCF/Tasks/match-reco-gen.cxx +++ b/PWGCF/Tasks/matchRecoGen.cxx @@ -9,12 +9,17 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +/// \file matchRecoGen.cxx +/// \brief basic check for the matching between generator level and detector level +/// \author victor.gonzalez.sebastian@gmail.com + #include #include #include #include "Common/Core/TrackSelection.h" #include "Common/Core/TrackSelectionDefaults.h" +#include "Common/Core/RecoDecay.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" #include "Common/DataModel/PIDResponse.h" @@ -57,24 +62,27 @@ TpcExcludeTrack tpcExcluder; ///< the TPC excluder object instance } // namespace o2::analysis::dptdptfilter /// \brief Checks the correspondence generator level <=> detector level -struct CheckGeneratorLevelVsDetectorLevel { - Configurable cfgTrackType{"trktype", 1, "Type of selected tracks: 0 = no selection, 1 = global tracks FB96"}; - Configurable cfgCentMultEstimator{"centmultestimator", "V0M", "Centrality/multiplicity estimator detector: V0M, NOCM: none. Default V0M"}; - Configurable cfgSystem{"syst", "PbPb", "System: pp, PbPb, Pbp, pPb, XeXe, ppRun3. Default PbPb"}; - Configurable cfgDataType{"datatype", "data", "Data type: data, datanoevsel, MC, FastMC, OnTheFlyMC. Default data"}; - Configurable cfgTriggSel{"triggsel", "MB", "Trigger selection: MB, None. Default MB"}; - Configurable cfgOverallMinP{"overallminp", 0.0f, "The overall minimum momentum for the analysis. Default: 0.0"}; - Configurable cfgBinning{"binning", +struct MatchRecoGen { + Configurable cfgTrackType{"cfgTrackType", 1, "Type of selected tracks: 0 = no selection, 1 = global tracks FB96"}; + Configurable cfgCentMultEstimator{"cfgCentMultEstimator", "V0M", "Centrality/multiplicity estimator detector: V0M, NOCM: none. Default V0M"}; + Configurable cfgSystem{"cfgSystem", "PbPb", "System: pp, PbPb, Pbp, pPb, XeXe, ppRun3. Default PbPb"}; + Configurable cfgDataType{"cfgDataType", "data", "Data type: data, datanoevsel, MC, FastMC, OnTheFlyMC. Default data"}; + Configurable cfgTriggSel{"cfgTriggSel", "MB", "Trigger selection: MB, None. Default MB"}; + Configurable cfgOverallMinP{"cfgOverallMinP", 0.0f, "The overall minimum momentum for the analysis. Default: 0.0"}; + Configurable cfgBinning{"cfgBinning", {28, -7.0, 7.0, 18, 0.2, 2.0, 16, -0.8, 0.8, 72, 0.5}, "triplets - nbins, min, max - for z_vtx, pT, eta and phi, binning plus bin fraction of phi origin shift"}; - Configurable cfgTpcExclusionMethod{"cfgTpcExclusionMethod", 0, "The method for excluding tracks within the TPC. 0: no exclusion; 1: static; 2: dynamic. Default: 0"}; - Configurable cfgTraceDCAOutliers{"trackdcaoutliers", {false, 0.0, 0.0}, "Track the generator level DCAxy outliers: false/true, low dcaxy, up dcaxy. Default {false,0.0,0.0}"}; - Configurable cfgTraceOutOfSpeciesParticles{"trackoutparticles", false, "Track the particles which are not e,mu,pi,K,p: false/true. Default false"}; - Configurable cfgRecoIdMethod{"recoidmethod", 0, "Method for identifying reconstructed tracks: 0 PID, 1 mcparticle. Default 0"}; - Configurable cfgTuneTrackSelection{"tunetracksel", {}, "Track selection: {useit: true/false, tpccls-useit, tpcxrws-useit, tpcxrfc-useit, dcaxy-useit, dcaz-useit}. Default {false,0.70,false,0.8,false,2.4,false,3.2,false}"}; - Configurable cfgTraceCollId0{"tracecollid0", false, "Trace particles in collisions id 0. Default false"}; - Configurable cfgTrackMultiRec{"trackmultirec", false, "Track muli-reconstructed particles: true, false. Default false"}; - Configurable cfgTrackCollAssoc{"trackcollassoc", false, "Track collision id association, track-mcparticle-mccollision vs. track-collision-mccollision: true, false. Default false"}; + struct : ConfigurableGroup { + std::string prefix = "cfgTpcExclusion"; + Configurable method{"method", 0, "The method for excluding tracks within the TPC. 0: no exclusion; 1: static; 2: dynamic. Default: 0"}; + } cfgTpcExclusion; + Configurable cfgTraceDCAOutliers{"cfgTraceDCAOutliers", {false, 0.0, 0.0}, "Track the generator level DCAxy outliers: false/true, low dcaxy, up dcaxy. Default {false,0.0,0.0}"}; + Configurable cfgTraceOutOfSpeciesParticles{"cfgTraceOutOfSpeciesParticles", false, "Track the particles which are not e,mu,pi,K,p: false/true. Default false"}; + Configurable cfgRecoIdMethod{"cfgRecoIdMethod", 0, "Method for identifying reconstructed tracks: 0 PID, 1 mcparticle. Default 0"}; + Configurable cfgTuneTrackSelection{"cfgTuneTrackSelection", {}, "Track selection: {useit: true/false, tpccls-useit, tpcxrws-useit, tpcxrfc-useit, dcaxy-useit, dcaz-useit}. Default {false,0.70,false,0.8,false,2.4,false,3.2,false}"}; + Configurable cfgTraceCollId0{"cfgTraceCollId0", false, "Trace particles in collisions id 0. Default false"}; + Configurable cfgTrackMultiRec{"cfgTrackMultiRec", false, "Track muli-reconstructed particles: true, false. Default false"}; + Configurable cfgTrackCollAssoc{"cfgTrackCollAssoc", false, "Track collision id association, track-mcparticle-mccollision vs. track-collision-mccollision: true, false. Default false"}; HistogramRegistry histos{"RecoGenHistograms", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; Service fPDG; @@ -107,7 +115,7 @@ struct CheckGeneratorLevelVsDetectorLevel { /* the TPC excluder object instance */ TpcExclusionMethod tpcExclude = kNOEXCLUSION; ///< exclude tracks within the TPC according to this method - tpcExclude = static_cast(cfgTpcExclusionMethod.value); + tpcExclude = static_cast(cfgTpcExclusion.method.value); tpcExcluder = TpcExcludeTrack(tpcExclude); /* the track types and combinations */ @@ -183,23 +191,23 @@ struct CheckGeneratorLevelVsDetectorLevel { { using namespace o2::analysis::recogenmap; - static constexpr std::string_view dir[] = {"before/", "after/"}; - static constexpr std::string_view colldir[] = {"positivecolid/", "negativecolid/"}; + static constexpr std::string_view Dir[] = {"before/", "after/"}; + static constexpr std::string_view Colldir[] = {"positivecolid/", "negativecolid/"}; - int nrec_poslabel = 0; - int nrec_neglabel = 0; - int nrec_poslabel_crosscoll = 0; + int nRecPosLabel = 0; + int nRecNegLabel = 0; + int nRecPosLabelCrossColl = 0; for (int ixpart = 0; ixpart < mcParticles.size(); ++ixpart) { auto particle = mcParticles.iteratorAt(ixpart); /* multireconstructed tracks only for positive labels */ int nrec = mclabelpos[collsign][ixpart].size(); - nrec_poslabel += mclabelpos[collsign][ixpart].size(); - nrec_neglabel += mclabelneg[collsign][ixpart].size(); + nRecPosLabel += mclabelpos[collsign][ixpart].size(); + nRecNegLabel += mclabelneg[collsign][ixpart].size(); if (nrec > 1) { /* multireconstruction only from positive labels */ - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("multirec"), nrec); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("multirec"), nrec); if (collsign == kPOSITIVE) { /* check the cross collision reconstruction */ @@ -213,7 +221,7 @@ struct CheckGeneratorLevelVsDetectorLevel { auto track2 = tracks.iteratorAt(mclabelpos[collsign][ixpart][j]); if (track1.collisionId() != track2.collisionId()) { - nrec_poslabel_crosscoll++; + nRecPosLabelCrossColl++; crosscollfound = true; } } @@ -252,7 +260,7 @@ struct CheckGeneratorLevelVsDetectorLevel { "END multi-reconstructed: " "=================================================================="); } - histos.get(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("pdgcodemr")) + histos.get(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("pdgcodemr")) ->Fill(TString::Format("%d", particle.pdgCode()).Data(), 1.0); } } @@ -264,52 +272,47 @@ struct CheckGeneratorLevelVsDetectorLevel { float deltaeta = track1.eta() - track2.eta(); float deltaphi = track1.phi() - track2.phi(); - if (deltaphi < 0) { - deltaphi += constants::math::TwoPI; - } - if (deltaphi > constants::math::TwoPI) { - deltaphi -= constants::math::TwoPI; - } + deltaphi = RecoDecay::constrainAngle(deltaphi, 0.0f); float deltapt = (track1.pt() > track2.pt()) ? track1.pt() - track2.pt() : track2.pt() - track1.pt(); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("mrDeltaEta"), deltaeta); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("mrDeltaPhi"), deltaphi); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("mrDeltaPt"), deltapt); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("mrDeltaEta"), deltaeta); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("mrDeltaPhi"), deltaphi); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("mrDeltaPt"), deltapt); } - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("recomreta"), track1.eta()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("recomrphi"), track1.phi()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("recomrpt"), track1.pt()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("detectormapmr"), track1.detectorMap()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("dcaxymr"), track1.dcaXY()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("dcazmr"), track1.dcaZ()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("recomreta"), track1.eta()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("recomrphi"), track1.phi()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("recomrpt"), track1.pt()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("detectormapmr"), track1.detectorMap()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("dcaxymr"), track1.dcaXY()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("dcazmr"), track1.dcaZ()); if (track1.dcaXY() < 1.0) { - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("finedcaxymr"), track1.dcaXY()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("finedcaxymr"), track1.dcaXY()); } if (track1.dcaZ() < 1.0) { - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("finedcazmr"), track1.dcaZ()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("finedcazmr"), track1.dcaZ()); } - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("genrecomreta"), track1.eta(), particle.eta()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("genrecomrphi"), track1.phi(), particle.phi()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("genrecomrpt"), track1.pt(), particle.pt()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("genrecomreta"), track1.eta(), particle.eta()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("genrecomrphi"), track1.phi(), particle.phi()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("genrecomrpt"), track1.pt(), particle.pt()); if (particle.mcCollisionId() != colls.iteratorAt(track1.collisionId()).mcCollisionId()) { - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("matchcollidmr"), static_cast(kDONTMATCH) + 0.5f); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("matchcollidmr"), static_cast(kDONTMATCH) + 0.5f); } else { - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("matchcollidmr"), static_cast(kMATCH) + 0.5f); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("matchcollidmr"), static_cast(kMATCH) + 0.5f); } } } else if (nrec > 0) { auto track = tracks.iteratorAt(mclabelpos[collsign][ixpart][0]); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("genrecoeta"), track.eta(), particle.eta()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("genrecophi"), track.phi(), particle.phi()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("genrecopt"), track.pt(), particle.pt()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("detectormap"), track.detectorMap()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("dcaxy"), track.dcaXY()); - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("dcaz"), track.dcaZ()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("genrecoeta"), track.eta(), particle.eta()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("genrecophi"), track.phi(), particle.phi()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("genrecopt"), track.pt(), particle.pt()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("detectormap"), track.detectorMap()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("dcaxy"), track.dcaXY()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("dcaz"), track.dcaZ()); if (track.dcaXY() < 1.0) { - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("finedcaxy"), track.dcaXY()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("finedcaxy"), track.dcaXY()); } if (track.dcaZ() < 1.0) { - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("finedcaz"), track.dcaZ()); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("finedcaz"), track.dcaZ()); } if (particle.mcCollisionId() != colls.iteratorAt(track.collisionId()).mcCollisionId()) { if ((ba == kAFTER) && (collsign == kPOSITIVE) && cfgTrackCollAssoc) { @@ -319,19 +322,19 @@ struct CheckGeneratorLevelVsDetectorLevel { LOGF(info, " associated to track with index %d and label %d assigned to collision %d, with associated MC collision %d", track.globalIndex(), ixpart, track.collisionId(), colls.iteratorAt(track.collisionId()).mcCollisionId()); } - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("matchcollid"), static_cast(kDONTMATCH) + 0.5f); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("matchcollid"), static_cast(kDONTMATCH) + 0.5f); } else { - histos.fill(HIST(dir[ba]) + HIST(colldir[collsign]) + HIST("matchcollid"), static_cast(kMATCH) + 0.5f); + histos.fill(HIST(Dir[ba]) + HIST(Colldir[collsign]) + HIST("matchcollid"), static_cast(kMATCH) + 0.5f); } } } if (collsign == kPOSITIVE) { LOGF(info, "Reconstructed tracks (%s) with positive collision ID: %d with positive label, %d with negative label, %d with cross collision", - ba == kAFTER ? "after" : "before", nrec_poslabel, nrec_neglabel, nrec_poslabel_crosscoll); + ba == kAFTER ? "after" : "before", nRecPosLabel, nRecNegLabel, nRecPosLabelCrossColl); } else { LOGF(info, "Reconstructed tracks (%s) with negative collision ID: %d with positive label, %d with negative label", - ba == kAFTER ? "after" : "before", nrec_poslabel, nrec_neglabel); + ba == kAFTER ? "after" : "before", nRecPosLabel, nRecNegLabel); } } @@ -365,7 +368,7 @@ struct CheckGeneratorLevelVsDetectorLevel { // For the time being we are only interested in the information based on the reconstructed tracks LOGF(info, "New dataframe (DF) with %d generated charged particles and %d reconstructed tracks", ngen, nreco); - for (auto& track : tracks) { + for (auto const& track : tracks) { int64_t recix = track.globalIndex(); int32_t label = track.mcParticleId(); @@ -405,7 +408,7 @@ struct CheckGeneratorLevelVsDetectorLevel { size_t nreco = 0; size_t ngen = 0; - for (auto& part : mcParticles) { + for (auto const& part : mcParticles) { auto pdgpart = fPDG->GetParticle(part.pdgCode()); if (pdgpart != nullptr) { float charge = getCharge(pdgpart->Charge()); @@ -416,7 +419,7 @@ struct CheckGeneratorLevelVsDetectorLevel { } // Let's go through the reco-gen mapping to detect multi-reconstructed particles - for (auto& track : tracks) { + for (auto const& track : tracks) { int64_t recix = track.globalIndex(); int32_t label = track.mcParticleId(); if (!(label < 0)) { @@ -447,7 +450,7 @@ struct CheckGeneratorLevelVsDetectorLevel { processMapChecksBeforeCuts(tracks, collisions, mcParticles); processMapChecksAfterCuts(tracks, collisions, mcParticles); } - PROCESS_SWITCH(CheckGeneratorLevelVsDetectorLevel, processMapChecksWithCent, "Process detector <=> generator levels with centrality/multiplicity information", false); + PROCESS_SWITCH(MatchRecoGen, processMapChecksWithCent, "Process detector <=> generator levels with centrality/multiplicity information", false); void processMapChecksWithoutCent(soa::Join const& tracks, soa::Join const& collisions, @@ -456,11 +459,11 @@ struct CheckGeneratorLevelVsDetectorLevel { processMapChecksBeforeCuts(tracks, collisions, mcParticles); processMapChecksAfterCuts(tracks, collisions, mcParticles); } - PROCESS_SWITCH(CheckGeneratorLevelVsDetectorLevel, processMapChecksWithoutCent, "Process detector <=> generator levels without centrality/multiplicity information", true); + PROCESS_SWITCH(MatchRecoGen, processMapChecksWithoutCent, "Process detector <=> generator levels without centrality/multiplicity information", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - WorkflowSpec workflow{adaptAnalysisTask(cfgc)}; + WorkflowSpec workflow{adaptAnalysisTask(cfgc)}; return workflow; } diff --git a/PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx b/PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx index 927464b65ca..fe70e5dcfb5 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx @@ -555,7 +555,7 @@ struct PidDataCollectingEngine { } template - void fillAllSpeciesPID(uint ix, TrackObject const& track, float mom) + void fillAllSpeciesPID(uint ix, TrackObject const& track, float tpcmom, float tofmom) { if (track.sign() < 0) { ix = 2 * ix + 1; @@ -563,8 +563,8 @@ struct PidDataCollectingEngine { ix = 2 * ix; } for (uint when = 0; when < 2; ++when) { - fhTPCnSigmasVsP[when][ix]->Fill(mom, o2::aod::pidutils::tpcNSigma(track)); - fhTOFnSigmasVsP[when][ix]->Fill(mom, o2::aod::pidutils::tofNSigma(track)); + fhTPCnSigmasVsP[when][ix]->Fill(tpcmom, o2::aod::pidutils::tpcNSigma(track)); + fhTOFnSigmasVsP[when][ix]->Fill(tofmom, o2::aod::pidutils::tofNSigma(track)); if (track.trackacceptedid() < 0) { /* track not accepted */ return; @@ -573,7 +573,7 @@ struct PidDataCollectingEngine { } template - void fillSpeciesPID(uint ix, TrackObject const& track, float mom) + void fillSpeciesPID(uint ix, TrackObject const& track, float tpcmom, float tofmom) { if (track.sign() < 0) { ix = 2 * ix + 1; @@ -581,9 +581,9 @@ struct PidDataCollectingEngine { ix = 2 * ix; } for (uint when = 0; when < 2; ++when) { - fhTPCdEdxSignalDiffVsP[when][ix]->Fill(mom, o2::aod::pidutils::tpcExpSignalDiff(track)); - fhTOFSignalDiffVsP[when][ix]->Fill(mom, o2::aod::pidutils::tofExpSignalDiff(track)); - fhTPCTOFSigmaVsP[when][ix]->Fill(mom, o2::aod::pidutils::tpcNSigma(track), o2::aod::pidutils::tofNSigma(track)); + fhTPCdEdxSignalDiffVsP[when][ix]->Fill(tpcmom, o2::aod::pidutils::tpcExpSignalDiff(track)); + fhTOFSignalDiffVsP[when][ix]->Fill(tofmom, o2::aod::pidutils::tofExpSignalDiff(track)); + fhTPCTOFSigmaVsP[when][ix]->Fill(tpcmom, o2::aod::pidutils::tpcNSigma(track), o2::aod::pidutils::tofNSigma(track)); if (track.trackacceptedid() < 0) { /* track not accepted */ return; @@ -592,12 +592,16 @@ struct PidDataCollectingEngine { } template - void fillPID(TrackObject const& track, float mom) + void fillPID(TrackObject const& track, float tpcmom, float tofmom) { for (uint when = 0; when < 2; ++when) { - fhTPCdEdxSignalVsP[when]->Fill(mom, track.tpcSignal()); - fhTOFSignalVsP[when]->Fill(mom, track.beta()); - fhPvsTOFSqMass[when]->Fill(track.mass() * track.mass(), mom); + if constexpr (framework::has_type_v) { + fhTPCdEdxSignalVsP[when]->Fill(tpcmom, track.mcTunedTPCSignal()); + } else { + fhTPCdEdxSignalVsP[when]->Fill(tpcmom, track.tpcSignal()); + } + fhTOFSignalVsP[when]->Fill(tofmom, track.beta()); + fhPvsTOFSqMass[when]->Fill(track.mass() * track.mass(), tofmom); if (track.trackacceptedid() < 0) { /* track not accepted */ return; @@ -606,20 +610,20 @@ struct PidDataCollectingEngine { } template - void processTrack(TrackObject const& track, float mom) + void processTrack(TrackObject const& track, float tpcmom, float tofmom) { using namespace efficiencyandqatask; if constexpr (kindOfData == kReco) { - fillPID(track, mom); - fillSpeciesPID(0, track, mom); - fillSpeciesPID(1, track, mom); - fillSpeciesPID(2, track, mom); - fillAllSpeciesPID(0, track, mom); - fillAllSpeciesPID(1, track, mom); - fillAllSpeciesPID(2, track, mom); - fillAllSpeciesPID(3, track, mom); - fillAllSpeciesPID(4, track, mom); + fillPID(track, tpcmom, tofmom); + fillSpeciesPID(0, track, tpcmom, tofmom); + fillSpeciesPID(1, track, tpcmom, tofmom); + fillSpeciesPID(2, track, tpcmom, tofmom); + fillAllSpeciesPID(0, track, tpcmom, tofmom); + fillAllSpeciesPID(1, track, tpcmom, tofmom); + fillAllSpeciesPID(2, track, tpcmom, tofmom); + fillAllSpeciesPID(3, track, tpcmom, tofmom); + fillAllSpeciesPID(4, track, tpcmom, tofmom); } } }; @@ -688,7 +692,7 @@ struct PidExtraDataCollectingEngine { } template - void fillAllSpeciesPID(uint ix, TrackObject const& track, float mom) + void fillAllSpeciesPID(uint ix, TrackObject const& track, float tpcmom, float tofmom) { if (track.trackacceptedid() < 0) { /* track not accepted */ @@ -699,46 +703,54 @@ struct PidExtraDataCollectingEngine { } else { ix = 2 * ix; } - fhIdTPCnSigmasVsP[track.trackacceptedid()][ix]->Fill(mom, o2::aod::pidutils::tpcNSigma(track)); - fhIdTOFnSigmasVsP[track.trackacceptedid()][ix]->Fill(mom, o2::aod::pidutils::tofNSigma(track)); + fhIdTPCnSigmasVsP[track.trackacceptedid()][ix]->Fill(tpcmom, o2::aod::pidutils::tpcNSigma(track)); + fhIdTOFnSigmasVsP[track.trackacceptedid()][ix]->Fill(tofmom, o2::aod::pidutils::tofNSigma(track)); if (efficiencyandqatask::pidselector.isGlobalSpecies(track.trackacceptedid() / 2, id)) { /* only if the species of the selected track matches the target of the number of sigmas */ - fpIdTPCdEdxSignalVsPSigmas[track.trackacceptedid()]->Fill(mom, track.tpcSignal(), o2::aod::pidutils::tpcNSigma(track)); - fpIdTOFSignalVsPSigmas[track.trackacceptedid()]->Fill(mom, track.beta(), o2::aod::pidutils::tofNSigma(track)); + if constexpr (framework::has_type_v) { + fpIdTPCdEdxSignalVsPSigmas[track.trackacceptedid()]->Fill(tpcmom, track.mcTunedTPCSignal(), o2::aod::pidutils::tpcNSigma(track)); + } else { + fpIdTPCdEdxSignalVsPSigmas[track.trackacceptedid()]->Fill(tpcmom, track.tpcSignal(), o2::aod::pidutils::tpcNSigma(track)); + } + fpIdTOFSignalVsPSigmas[track.trackacceptedid()]->Fill(tofmom, track.beta(), o2::aod::pidutils::tofNSigma(track)); } } template - void fillSpeciesPID(uint, TrackObject const&, float) + void fillSpeciesPID(uint, TrackObject const&, float, float) { } template - void fillPID(TrackObject const& track, float mom) + void fillPID(TrackObject const& track, float tpcmom, float tofmom) { if (track.trackacceptedid() < 0) { /* track not accepted */ return; } - fhIdTPCdEdxSignalVsP[track.trackacceptedid()]->Fill(mom, track.tpcSignal()); - fhIdTOFSignalVsP[track.trackacceptedid()]->Fill(mom, track.beta()); + if constexpr (framework::has_type_v) { + fhIdTPCdEdxSignalVsP[track.trackacceptedid()]->Fill(tpcmom, track.mcTunedTPCSignal()); + } else { + fhIdTPCdEdxSignalVsP[track.trackacceptedid()]->Fill(tpcmom, track.tpcSignal()); + } + fhIdTOFSignalVsP[track.trackacceptedid()]->Fill(tofmom, track.beta()); } template - void processTrack(TrackObject const& track, float mom) + void processTrack(TrackObject const& track, float tpcmom, float tofmom) { using namespace efficiencyandqatask; if constexpr (kindOfData == kReco) { - fillPID(track, mom); - fillSpeciesPID(0, track, mom); - fillSpeciesPID(1, track, mom); - fillSpeciesPID(2, track, mom); - fillAllSpeciesPID(0, track, mom); - fillAllSpeciesPID(1, track, mom); - fillAllSpeciesPID(2, track, mom); - fillAllSpeciesPID(3, track, mom); - fillAllSpeciesPID(4, track, mom); + fillPID(track, tpcmom, tofmom); + fillSpeciesPID(0, track, tpcmom, tofmom); + fillSpeciesPID(1, track, tpcmom, tofmom); + fillSpeciesPID(2, track, tpcmom, tofmom); + fillAllSpeciesPID(0, track, tpcmom, tofmom); + fillAllSpeciesPID(1, track, tpcmom, tofmom); + fillAllSpeciesPID(2, track, tpcmom, tofmom); + fillAllSpeciesPID(3, track, tpcmom, tofmom); + fillAllSpeciesPID(4, track, tpcmom, tofmom); } } }; @@ -973,20 +985,21 @@ struct DptDptEfficiencyAndQc { int ixDCE = getDCEindex(collision); if (!(ixDCE < 0)) { for (auto const& track : tracks) { - float mom = track.p(); + float tpcmom = track.p(); + float tofmom = track.p(); if (useTPCInnerWallMomentum.value) { if constexpr (!framework::has_type_v) { - mom = track.tpcInnerParam(); + tpcmom = track.tpcInnerParam(); } } if constexpr (kindOfProcess == kBASIC) { qaDataCE[ixDCE]->processTrack(collision.posZ(), track); } if constexpr (kindOfProcess == kPID) { - pidDataCE[ixDCE]->processTrack(track, mom); + pidDataCE[ixDCE]->processTrack(track, tpcmom, tofmom); } if constexpr (kindOfProcess == kPIDEXTRA) { - pidExtraDataCE[ixDCE]->processTrack(track, mom); + pidExtraDataCE[ixDCE]->processTrack(track, tpcmom, tofmom); } } } diff --git a/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx index ed063e4812a..324f344f0ab 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx @@ -158,24 +158,27 @@ struct LambdaCorrTableProducer { // Tracks Configurable cTrackMinPt{"cTrackMinPt", 0.2, "p_{T} minimum"}; - Configurable cTrackMaxPt{"cTrackMaxPt", 4.0, "p_{T} minimum"}; + Configurable cTrackMaxPt{"cTrackMaxPt", 999.0, "p_{T} minimum"}; Configurable cTrackEtaCut{"cTrackEtaCut", 0.8, "Pseudorapidity cut"}; Configurable cMinTpcCrossedRows{"cMinTpcCrossedRows", 70, "min crossed rows"}; Configurable cTpcNsigmaCut{"cTpcNsigmaCut", 2.0, "TPC NSigma Selection Cut"}; Configurable cTrackMinDcaXY{"cTrackMinDcaXY", 0.05, "Minimum DcaXY of Daughter Tracks"}; + Configurable cIsGlobalTrackWoDca{"cIsGlobalTrackWoDca", true, "Check for Global Track"}; // V0s - Configurable cMinV0DcaDaughters{"cMinV0DcaDaughters", 1.4, "min DCA between V0 daughters"}; + Configurable cMinV0DcaDaughters{"cMinV0DcaDaughters", 0., "Minimum DCA between V0 daughters"}; + Configurable cMaxV0DcaDaughters{"cMaxV0DcaDaughters", 1.4, "Maximum DCA between V0 daughters"}; Configurable cMinDcaPosToPV{"cMinDcaPosToPV", 0.1, "Minimum V0 Positive Track DCAr cut to PV"}; Configurable cMinDcaNegToPV{"cMinDcaNegToPV", 0.1, "Minimum V0 Negative Track DCAr cut to PV"}; - Configurable cMinDcaV0ToPV{"cMinDcaV0ToPV", 3.0, "Minimum DCA V0 to PV"}; + Configurable cMinDcaV0ToPV{"cMinDcaV0ToPV", 0.0, "Minimum DCA V0 to PV"}; + Configurable cMaxDcaV0ToPV{"cMaxDcaV0ToPV", 999.0, "Maximum DCA V0 to PV"}; Configurable cMinV0TransRadius{"cMinV0TransRadius", 0.2, "Minimum V0 radius from PV"}; - Configurable cMaxV0TransRadius{"cMaxV0TransRadius", 200.0, "Maximum V0 radius from PV"}; + Configurable cMaxV0TransRadius{"cMaxV0TransRadius", 100.0, "Maximum V0 radius from PV"}; Configurable cMinV0CTau{"cMinV0CTau", 0.0, "Minimum ctau"}; Configurable cMaxV0CTau{"cMaxV0CTau", 30.0, "Maximum ctau"}; Configurable cMinV0CosPA{"cMinV0CosPA", 0.998, "Minimum V0 CosPA to PV"}; - Configurable cLambdaMassWindow{"cLambdaMassWindow", 0.007, "Mass Window to select Lambda"}; - Configurable cKshortRejMassWindow{"cKshortRejMassWindow", 0.005, "Reject K0Short Candidates"}; + Configurable cLambdaMassWindow{"cLambdaMassWindow", 0.005, "Mass Window to select Lambda"}; + Configurable cKshortRejMassWindow{"cKshortRejMassWindow", 0.017, "Reject K0Short Candidates"}; Configurable cKshortRejFlag{"cKshortRejFlag", false, "K0short Mass Rej Flag"}; Configurable cArmPodCutValue{"cArmPodCutValue", 0.5, "Armentros-Podolanski Slope Parameter"}; Configurable cArmPodCutFlag{"cArmPodCutFlag", true, "Armentros-Podolanski Cut Flag"}; @@ -183,7 +186,7 @@ struct LambdaCorrTableProducer { // V0s kinmatic acceptance Configurable cMinV0Pt{"cMinV0Pt", 0.8, "Minimum V0 pT"}; Configurable cMaxV0Pt{"cMaxV0Pt", 3.2, "Minimum V0 pT"}; - Configurable cMaxV0Rap{"cMaxV0Rap", 0.8, "|rap| cut"}; + Configurable cMaxV0Rap{"cMaxV0Rap", 0.6, "|rap| cut"}; // V0s MC Configurable cHasMcFlag{"cHasMcFlag", true, "Has Mc Tag"}; @@ -218,7 +221,7 @@ struct LambdaCorrTableProducer { ccdb->setCaching(true); // initialize axis specifications - const AxisSpec axisCol(20, 0, 20, ""); + const AxisSpec axisCol(25, 0, 25, ""); const AxisSpec axisCent(105, 0, 105, "FT0M (%)"); const AxisSpec axisMult(10, 0, 10, "N_{#Lambda}"); const AxisSpec axisVz(220, -11, 11, "V_{z} (cm)"); @@ -308,7 +311,7 @@ struct LambdaCorrTableProducer { template bool selCollision(C const& col) { - if (col.posZ() < cMinZVtx || col.posZ() >= cMaxZVtx) { + if (col.posZ() <= cMinZVtx || col.posZ() >= cMaxZVtx) { return false; } @@ -346,7 +349,7 @@ struct LambdaCorrTableProducer { template bool selDaughterTracks(T const& track) { - if (track.pt() < cTrackMinPt || track.pt() > cTrackMaxPt) { + if (track.pt() <= cTrackMinPt || track.pt() >= cTrackMaxPt) { return false; } @@ -354,11 +357,15 @@ struct LambdaCorrTableProducer { return false; } - if (track.tpcNClsCrossedRows() < cMinTpcCrossedRows) { + if (track.tpcNClsCrossedRows() <= cMinTpcCrossedRows) { return false; } - if (std::abs(track.dcaXY()) < cTrackMinDcaXY) { + if (std::abs(track.dcaXY()) <= cTrackMinDcaXY) { + return false; + } + + if (cIsGlobalTrackWoDca && !track.isGlobalTrackWoDCA()) { return false; } @@ -377,7 +384,7 @@ struct LambdaCorrTableProducer { histos.fill(HIST("Tracks/h1f_tracks_info"), 2.5); - if (v0.dcaV0daughters() > cMinV0DcaDaughters) { + if (v0.dcaV0daughters() <= cMinV0DcaDaughters || v0.dcaV0daughters() >= cMaxV0DcaDaughters) { return false; } @@ -389,22 +396,22 @@ struct LambdaCorrTableProducer { return false; } - if (v0.dcav0topv() > cMinDcaV0ToPV) { + if (v0.dcav0topv() <= cMinDcaV0ToPV || v0.dcav0topv() >= cMaxDcaV0ToPV) { return false; } - if ((v0.v0radius() > cMaxV0TransRadius) || (v0.v0radius() < cMinV0TransRadius)) { + if (v0.v0radius() <= cMinV0TransRadius || v0.v0radius() >= cMaxV0TransRadius) { return false; } // ctau float ctau = v0.distovertotmom(col.posX(), col.posY(), col.posZ()) * MassLambda0; - if (ctau < cMinV0CTau || ctau > cMaxV0CTau) { + if (ctau <= cMinV0CTau || ctau >= cMaxV0CTau) { return false; } // cosine of pointing angle - if (v0.v0cosPA() < cMinV0CosPA) { + if (v0.v0cosPA() <= cMinV0CosPA) { return false; } @@ -581,12 +588,16 @@ struct LambdaCorrTableProducer { float retVal = 0.; if (std::string(obj->ClassName()) == "TH1F") { + histos.fill(HIST("Tracks/h1f_tracks_info"), 21.5); retVal = hist->GetBinContent(hist->FindBin(v0.pt())); } else if (std::string(obj->ClassName()) == "TH2F") { + histos.fill(HIST("Tracks/h1f_tracks_info"), 22.5); retVal = hist->GetBinContent(hist->FindBin(v0.pt(), v0.yLambda())); } else if (std::string(obj->ClassName()) == "TH3F") { + histos.fill(HIST("Tracks/h1f_tracks_info"), 23.5); retVal = hist->GetBinContent(hist->FindBin(v0.pt(), v0.yLambda(), col.posZ())); } else { + histos.fill(HIST("Tracks/h1f_tracks_info"), 24.5); LOGF(warning, "CCDB OBJECT IS NOT A HISTOGRAM !!!"); retVal = 1.; } @@ -674,7 +685,7 @@ struct LambdaCorrTableProducer { // check for corresponding MCGen Particle if constexpr (dmc == kMC) { histos.fill(HIST("Tracks/h1f_tracks_info"), 0.5); - if (!v0.has_mcParticle()) { + if (!v0.has_mcParticle() || !v0.template posTrack_as().has_mcParticle() || !v0.template negTrack_as().has_mcParticle()) { continue; } } @@ -757,7 +768,7 @@ struct LambdaCorrTableProducer { histos.fill(HIST("McGen/h1f_collisions_info"), 1.5); // apply collision cuts - if (mcCollision.posZ() < cMinZVtx || mcCollision.posZ() > cMaxZVtx) { + if (mcCollision.posZ() <= cMinZVtx || mcCollision.posZ() >= cMaxZVtx) { return; } @@ -800,6 +811,16 @@ struct LambdaCorrTableProducer { continue; } + if (v0type == kLambda) { + histos.fill(HIST("McGen/h1f_lambda_daughter_PDG"), daughterPDGs[0], mcpart.pt()); + histos.fill(HIST("McGen/h1f_lambda_daughter_PDG"), daughterPDGs[1], mcpart.pt()); + histos.fill(HIST("McGen/h1f_lambda_daughter_PDG"), mcpart.pdgCode(), mcpart.pt()); + } else { + histos.fill(HIST("McGen/h1f_antilambda_daughter_PDG"), daughterPDGs[0], mcpart.pt()); + histos.fill(HIST("McGen/h1f_antilambda_daughter_PDG"), daughterPDGs[1], mcpart.pt()); + histos.fill(HIST("McGen/h1f_antilambda_daughter_PDG"), mcpart.pdgCode(), mcpart.pt()); + } + lambdaMCGenTrackTable(lambdaMCGenCollisionTable.lastIndex(), mcpart.px(), mcpart.py(), mcpart.pz(), mcpart.pt(), mcpart.eta(), mcpart.phi(), mcpart.y(), RecoDecay::m(mcpart.p(), mcpart.e()), daughterIDs[0], daughterIDs[1], (int8_t)v0type, -999., -999., 1.); @@ -854,7 +875,7 @@ struct LambdaR2Correlation { const AxisSpec axisCent(105, 0, 105, "FT0M (%)"); const AxisSpec axisMult(10, 0, 10, "N_{#Lambda}"); const AxisSpec axisMass(100, 1.06, 1.16, "Inv Mass (GeV/#it{c}^{2})"); - const AxisSpec axisPt(64, 0.2, 3.4, "p_{T} (GeV/#it{c})"); + const AxisSpec axisPt(32, 0.2, 3.4, "p_{T} (GeV/#it{c})"); const AxisSpec axisEta(24, -1.2, 1.2, "#eta"); const AxisSpec axisCPA(100, 0.99, 1.0, "cos(#theta_{PA})"); const AxisSpec axisDcaDau(75, 0., 1.5, "Daug DCA (#sigma)"); @@ -900,12 +921,14 @@ struct LambdaR2Correlation { // single and two particle densities // 1D Histograms + histos.add("Reco/h1d_n1_mass_LaP", "#rho_{1}^{#Lambda}", kTH1D, {axisMass}); + histos.add("Reco/h1d_n1_mass_LaM", "#rho_{1}^{#bar{#Lambda}}", kTH1D, {axisMass}); histos.add("Reco/h1d_n1_pt_LaP", "#rho_{1}^{#Lambda}", kTH1D, {axisPt}); histos.add("Reco/h1d_n1_pt_LaM", "#rho_{1}^{#bar{#Lambda}}", kTH1D, {axisPt}); histos.add("Reco/h1d_n1_eta_LaP", "#rho_{1}^{#Lambda}", kTH1D, {axisEta}); histos.add("Reco/h1d_n1_eta_LaM", "#rho_{1}^{#bar{#Lambda}}", kTH1D, {axisEta}); - histos.add("Reco/h1d_n1_rap_LaP", "#rho_{1}^{#Lambda}", kTH1D, {axisEta}); - histos.add("Reco/h1d_n1_rap_LaM", "#rho_{1}^{#bar{#Lambda}}", kTH1D, {axisEta}); + histos.add("Reco/h1d_n1_rap_LaP", "#rho_{1}^{#Lambda}", kTH1D, {axisRap}); + histos.add("Reco/h1d_n1_rap_LaM", "#rho_{1}^{#bar{#Lambda}}", kTH1D, {axisRap}); histos.add("Reco/h1d_n1_phi_LaP", "#rho_{1}^{#Lambda}", kTH1D, {axisPhi}); histos.add("Reco/h1d_n1_phi_LaM", "#rho_{1}^{#bar{#Lambda}}", kTH1D, {axisPhi}); @@ -1041,6 +1064,7 @@ struct LambdaR2Correlation { ++ntrk3; // QA Plots + histos.fill(HIST(SubDirRecGen[rec_gen]) + HIST("h1d_n1_mass_") + HIST(SubDirHist[part]), track.mass()); histos.fill(HIST(SubDirRecGen[rec_gen]) + HIST("h1d_n1_pt_") + HIST(SubDirHist[part]), track.pt(), track.corrFact()); histos.fill(HIST(SubDirRecGen[rec_gen]) + HIST("h1d_n1_eta_") + HIST(SubDirHist[part]), track.eta(), track.corrFact()); histos.fill(HIST(SubDirRecGen[rec_gen]) + HIST("h1d_n1_phi_") + HIST(SubDirHist[part]), track.phi(), track.corrFact()); diff --git a/PWGDQ/Core/CutsLibrary.cxx b/PWGDQ/Core/CutsLibrary.cxx index 2f6ad8a958e..e8e1321b2e6 100644 --- a/PWGDQ/Core/CutsLibrary.cxx +++ b/PWGDQ/Core/CutsLibrary.cxx @@ -3266,6 +3266,27 @@ AnalysisCompositeCut* o2::aod::dqcuts::GetCompositeCut(const char* cutName) return cut; } + if (!nameStr.compare("emu_electron_test1")) { + cut->AddCut(GetAnalysisCut("jpsiStandardKine")); + cut->AddCut(GetAnalysisCut("electronStandardQualityForO2MCdebug4")); + cut->AddCut(GetAnalysisCut("electronPIDnsigmaOpen")); + return cut; + } + + if (!nameStr.compare("emu_electron_test2")) { + cut->AddCut(GetAnalysisCut("jpsiStandardKine2")); + cut->AddCut(GetAnalysisCut("electronStandardQualityForO2MCdebug4")); + cut->AddCut(GetAnalysisCut("electronPIDnsigmaOpen")); + return cut; + } + + if (!nameStr.compare("emu_electron_test3")) { + cut->AddCut(GetAnalysisCut("jpsiKineSkimmed")); + cut->AddCut(GetAnalysisCut("electronStandardQualityForO2MCdebug4")); + cut->AddCut(GetAnalysisCut("electronPIDnsigmaOpen")); + return cut; + } + if (!nameStr.compare("muonLooseTriggerTestCuts")) { cut->AddCut(GetAnalysisCut("muonLooseTriggerTestCuts")); return cut; diff --git a/PWGDQ/Core/HistogramsLibrary.cxx b/PWGDQ/Core/HistogramsLibrary.cxx index c8eac97666b..1b08b6c0a60 100644 --- a/PWGDQ/Core/HistogramsLibrary.cxx +++ b/PWGDQ/Core/HistogramsLibrary.cxx @@ -1270,9 +1270,8 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h hm->AddHistogram(histClass, "DeltaPhiPair", "", false, 130, -6.5, 6.5, VarManager::kDeltaPhiPair); } if (subGroupStr.Contains("correlation-emu")) { - hm->AddHistogram(histClass, "DeltaPhiPair2", "", false, 600, -o2::constants::math::PIHalf, 1.5 * o2::constants::math::PI, VarManager::kDeltaPhiPair2); - hm->AddHistogram(histClass, "DeltaEtaPair2", "", false, 350, 1.5, 5.0, VarManager::kDeltaEtaPair2); hm->AddHistogram(histClass, "DeltaPhiPair2_DeltaEtaPair2", "", false, 600, -o2::constants::math::PIHalf, 1.5 * o2::constants::math::PI, VarManager::kDeltaPhiPair2, 350, 1.5, 5.0, VarManager::kDeltaEtaPair2); + hm->AddHistogram(histClass, "DeltaPhiPair2_Pt", "", false, 600, -o2::constants::math::PIHalf, 1.5 * o2::constants::math::PI, VarManager::kDeltaPhiPair2, 200, 0.0, 20.0, VarManager::kPt); } if (subGroupStr.Contains("dielectrons")) { if (subGroupStr.Contains("prefilter")) { diff --git a/PWGDQ/Core/VarManager.h b/PWGDQ/Core/VarManager.h index 50755cd301c..02a7ffa4929 100644 --- a/PWGDQ/Core/VarManager.h +++ b/PWGDQ/Core/VarManager.h @@ -1510,30 +1510,6 @@ void VarManager::FillEvent(T const& event, float* values) values[kVtxY] = event.posY(); values[kVtxZ] = event.posZ(); values[kVtxNcontrib] = event.numContrib(); - if (fgUsedVars[kIsNoITSROFBorder]) { - values[kIsNoITSROFBorder] = (event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) > 0); - } - if (fgUsedVars[kIsNoTFBorder]) { - values[kIsNoTFBorder] = (event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) > 0); - } - if (fgUsedVars[kNoCollInTimeRangeStandard]) { - values[kNoCollInTimeRangeStandard] = (event.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) > 0); - } - if (fgUsedVars[kIsNoSameBunch]) { - values[kIsNoSameBunch] = (event.selection_bit(o2::aod::evsel::kNoSameBunchPileup) > 0); - } - if (fgUsedVars[kIsGoodZvtxFT0vsPV]) { - values[kIsGoodZvtxFT0vsPV] = (event.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV) > 0); - } - if (fgUsedVars[kIsVertexITSTPC]) { - values[kIsVertexITSTPC] = (event.selection_bit(o2::aod::evsel::kIsVertexITSTPC) > 0); - } - if (fgUsedVars[kIsVertexTOFmatched]) { - values[kIsVertexTOFmatched] = (event.selection_bit(o2::aod::evsel::kIsVertexTOFmatched) > 0); - } - if (fgUsedVars[kIsSel8]) { - values[kIsSel8] = event.selection_bit(o2::aod::evsel::kIsTriggerTVX) && event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder); - } if (fgUsedVars[kIsDoubleGap]) { values[kIsDoubleGap] = (event.tag_bit(56 + kDoubleGap) > 0); } @@ -1560,6 +1536,30 @@ void VarManager::FillEvent(T const& event, float* values) uint16_t bcInITSROF = (event.globalBC() + 3564 - fgITSROFbias) % fgITSROFlength; values[kIsNoITSROFBorderRecomputed] = bcInITSROF > fgITSROFBorderMarginLow && bcInITSROF < fgITSROFlength - fgITSROFBorderMarginHigh ? 1.0 : 0.0; } + if (fgUsedVars[kIsNoITSROFBorder]) { + values[kIsNoITSROFBorder] = (event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) > 0); + } + if (fgUsedVars[kIsNoTFBorder]) { + values[kIsNoTFBorder] = (event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) > 0); + } + if (fgUsedVars[kNoCollInTimeRangeStandard]) { + values[kNoCollInTimeRangeStandard] = (event.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) > 0); + } + if (fgUsedVars[kIsNoSameBunch]) { + values[kIsNoSameBunch] = (event.selection_bit(o2::aod::evsel::kNoSameBunchPileup) > 0); + } + if (fgUsedVars[kIsGoodZvtxFT0vsPV]) { + values[kIsGoodZvtxFT0vsPV] = (event.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV) > 0); + } + if (fgUsedVars[kIsVertexITSTPC]) { + values[kIsVertexITSTPC] = (event.selection_bit(o2::aod::evsel::kIsVertexITSTPC) > 0); + } + if (fgUsedVars[kIsVertexTOFmatched]) { + values[kIsVertexTOFmatched] = (event.selection_bit(o2::aod::evsel::kIsVertexTOFmatched) > 0); + } + if (fgUsedVars[kIsSel8]) { + values[kIsSel8] = event.selection_bit(o2::aod::evsel::kIsTriggerTVX) && event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder); + } if (fgUsedVars[kIsINT7]) { values[kIsINT7] = (event.alias_bit(kINT7) > 0); } @@ -1657,8 +1657,10 @@ void VarManager::FillEvent(T const& event, float* values) if constexpr ((fillMap & ReducedEventRefFlow) > 0) { values[kM1111REF] = event.m1111ref(); values[kM11REF] = event.m11ref(); + values[kM11REFetagap] = event.m11refetagap(); values[kM11M1111REF] = event.m11ref() * event.m1111ref(); values[kCORR2REF] = event.corr2ref(); + values[kCORR2REFetagap] = event.corr2refetagap(); values[kCORR4REF] = event.corr4ref(); values[kCORR2CORR4REF] = event.corr2ref() * event.corr4ref(); values[kMultA] = event.multa(); diff --git a/PWGDQ/DataModel/ReducedInfoTables.h b/PWGDQ/DataModel/ReducedInfoTables.h index 2c868f0873b..86e38033136 100644 --- a/PWGDQ/DataModel/ReducedInfoTables.h +++ b/PWGDQ/DataModel/ReducedInfoTables.h @@ -112,9 +112,11 @@ DECLARE_SOA_COLUMN(S12A, s12a, float); //! Weighted multiplicity (p = 1, DECLARE_SOA_COLUMN(S13A, s13a, float); //! Weighted multiplicity (p = 1, k = 3) DECLARE_SOA_COLUMN(S31A, s31a, float); //! Weighted multiplicity (p = 3, k = 1) DECLARE_SOA_COLUMN(CORR2REF, corr2ref, float); //! Ref Flow correlator <2> +DECLARE_SOA_COLUMN(CORR2REFetagap, corr2refetagap, float); //! Ref Flow correlator <2> DECLARE_SOA_COLUMN(CORR4REF, corr4ref, float); //! Ref Flow correlator <4> DECLARE_SOA_COLUMN(M11REF, m11ref, float); //! Weighted multiplicity of <<2>> for reference flow DECLARE_SOA_COLUMN(M1111REF, m1111ref, float); //! Weighted multiplicity of <<4>> for reference flow +DECLARE_SOA_COLUMN(M11REFetagap, m11refetagap, float); //! Weighted multiplicity of <<2>> etagap for reference flow } // namespace reducedevent DECLARE_SOA_TABLE_STAGED(ReducedEvents, "REDUCEDEVENT", //! Main event information table @@ -166,7 +168,7 @@ DECLARE_SOA_TABLE(ReducedEventsQvectorCentrExtra, "AOD", "REQVECCTREXTA", //! reducedevent::QvecBAllRe, reducedevent::QvecBAllIm, reducedevent::NTrkBAll); DECLARE_SOA_TABLE(ReducedEventsRefFlow, "AOD", "REREFFLOW", //! Event Ref Flow information - reducedevent::M11REF, reducedevent::M1111REF, reducedevent::CORR2REF, reducedevent::CORR4REF, cent::CentFT0C); + reducedevent::M11REF, reducedevent::M11REFetagap, reducedevent::M1111REF, reducedevent::CORR2REF, reducedevent::CORR2REFetagap, reducedevent::CORR4REF, cent::CentFT0C); DECLARE_SOA_TABLE(ReducedEventsQvectorZN, "AOD", "REQVECTORZN", //! Event Q-vector information from ZNs detectors reducedevent::Q1ZNAX, reducedevent::Q1ZNAY, reducedevent::Q1ZNCX, reducedevent::Q1ZNCY); @@ -639,6 +641,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(Index0, index0, int, ReducedTracks, "_0"); //! Ind DECLARE_SOA_INDEX_COLUMN_FULL(Index1, index1, int, ReducedTracks, "_1"); //! Index to second prong DECLARE_SOA_INDEX_COLUMN_FULL(Prong0, prong0, int, Tracks, "_0"); //! Index of first prong in Tracks table DECLARE_SOA_INDEX_COLUMN_FULL(Prong1, prong1, int, Tracks, "_1"); //! Index of second prong in Tracks table +DECLARE_SOA_BITMAP_COLUMN(EventSelection, evSelection, 8); //! Event selection bits (ambiguity, splitting candidate) DECLARE_SOA_COLUMN(Mass, mass, float); //! DECLARE_SOA_COLUMN(Pt, pt, float); //! DECLARE_SOA_COLUMN(Eta, eta, float); //! @@ -781,6 +784,7 @@ DECLARE_SOA_TABLE(DielectronsAll, "AOD", "RTDIELECTRONALL", //! DECLARE_SOA_TABLE(DimuonsAll, "AOD", "RTDIMUONALL", //! collision::PosX, collision::PosY, collision::PosZ, collision::NumContrib, + evsel::Selection, reducedpair::EventSelection, reducedevent::MCPosX, reducedevent::MCPosY, reducedevent::MCPosZ, reducedpair::Mass, reducedpair::McDecision, diff --git a/PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx b/PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx index c85d44a4a19..14d844e3393 100644 --- a/PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx +++ b/PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx @@ -476,7 +476,9 @@ struct TableMakerMC { VarManager::ResetValues(0, VarManager::kNEventWiseVariables); VarManager::FillBC(bc); VarManager::FillEvent(collision); // extract event information and place it in the fValues array - VarManager::FillEvent(collision.mcCollision()); + if (collision.has_mcCollision()) { + VarManager::FillEvent(collision.mcCollision()); + } if (fDoDetailedQA) { fHistMan->FillHistClass("Event_BeforeCuts", VarManager::fgValues); } diff --git a/PWGDQ/Tasks/dqEfficiency.cxx b/PWGDQ/Tasks/dqEfficiency.cxx index f8f2a992d61..8532525b834 100644 --- a/PWGDQ/Tasks/dqEfficiency.cxx +++ b/PWGDQ/Tasks/dqEfficiency.cxx @@ -840,6 +840,7 @@ struct AnalysisSameEventPairing { if constexpr ((TPairType == VarManager::kDecayToMuMu) && muonHasCov) { if (fConfigFlatTables.value) { dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(), + event.selection_raw(), 0, event.reducedMCevent().mcPosX(), event.reducedMCevent().mcPosY(), event.reducedMCevent().mcPosZ(), VarManager::fgValues[VarManager::kMass], dileptonMcDecision, diff --git a/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx b/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx index 7cdb426d55e..28ff0dcfe0c 100644 --- a/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx +++ b/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx @@ -217,7 +217,9 @@ struct AnalysisEventSelection { // Reset the fValues array and fill event observables VarManager::ResetValues(0, VarManager::kNEventWiseVariables); VarManager::FillEvent(event); - VarManager::FillEvent(event.reducedMCevent()); + if (event.has_reducedMCevent()) { + VarManager::FillEvent(event.reducedMCevent()); + } bool decision = false; // if QA is requested fill histograms before event selections @@ -1504,6 +1506,7 @@ struct AnalysisSameEventPairing { if (!event.isEventSelected_bit(0)) { continue; } + uint8_t evSel = event.isEventSelected_raw(); // Reset the fValues array VarManager::ResetValues(0, VarManager::kNVars); VarManager::FillEvent(event, VarManager::fgValues); @@ -1646,6 +1649,7 @@ struct AnalysisSameEventPairing { dimuonsExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauz], VarManager::fgValues[VarManager::kVertexingLz], VarManager::fgValues[VarManager::kVertexingLxy]); if (fConfigOptions.flatTables.value) { dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(), + event.selection_raw(), evSel, -999., -999., -999., VarManager::fgValues[VarManager::kMass], mcDecision, diff --git a/PWGDQ/Tasks/dqFlow.cxx b/PWGDQ/Tasks/dqFlow.cxx index b29efd014b8..b5e855d3d13 100644 --- a/PWGDQ/Tasks/dqFlow.cxx +++ b/PWGDQ/Tasks/dqFlow.cxx @@ -507,7 +507,7 @@ struct DQEventQvector { if (fEventCut->IsSelected(VarManager::fgValues)) { eventQvector(VarManager::fgValues[VarManager::kQ1X0A], VarManager::fgValues[VarManager::kQ1Y0A], VarManager::fgValues[VarManager::kQ1X0B], VarManager::fgValues[VarManager::kQ1Y0B], VarManager::fgValues[VarManager::kQ1X0C], VarManager::fgValues[VarManager::kQ1Y0C], VarManager::fgValues[VarManager::kQ2X0A], VarManager::fgValues[VarManager::kQ2Y0A], VarManager::fgValues[VarManager::kQ2X0B], VarManager::fgValues[VarManager::kQ2Y0B], VarManager::fgValues[VarManager::kQ2X0C], VarManager::fgValues[VarManager::kQ2Y0C], VarManager::fgValues[VarManager::kMultA], VarManager::fgValues[VarManager::kMultB], VarManager::fgValues[VarManager::kMultC], VarManager::fgValues[VarManager::kQ3X0A], VarManager::fgValues[VarManager::kQ3Y0A], VarManager::fgValues[VarManager::kQ3X0B], VarManager::fgValues[VarManager::kQ3Y0B], VarManager::fgValues[VarManager::kQ3X0C], VarManager::fgValues[VarManager::kQ3Y0C], VarManager::fgValues[VarManager::kQ4X0A], VarManager::fgValues[VarManager::kQ4Y0A], VarManager::fgValues[VarManager::kQ4X0B], VarManager::fgValues[VarManager::kQ4Y0B], VarManager::fgValues[VarManager::kQ4X0C], VarManager::fgValues[VarManager::kQ4Y0C]); eventQvectorExtra(VarManager::fgValues[VarManager::kQ42XA], VarManager::fgValues[VarManager::kQ42YA], VarManager::fgValues[VarManager::kQ23XA], VarManager::fgValues[VarManager::kQ23YA], VarManager::fgValues[VarManager::kS11A], VarManager::fgValues[VarManager::kS12A], VarManager::fgValues[VarManager::kS13A], VarManager::fgValues[VarManager::kS31A]); - eventRefFlow(VarManager::fgValues[VarManager::kM11REF], VarManager::fgValues[VarManager::kM1111REF], VarManager::fgValues[VarManager::kCORR2REF], VarManager::fgValues[VarManager::kCORR4REF], centrality); + eventRefFlow(VarManager::fgValues[VarManager::kM11REF], VarManager::fgValues[VarManager::kM11REFetagap], VarManager::fgValues[VarManager::kM1111REF], VarManager::fgValues[VarManager::kCORR2REF], VarManager::fgValues[VarManager::kCORR2REFetagap], VarManager::fgValues[VarManager::kCORR4REF], centrality); } if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { diff --git a/PWGDQ/Tasks/tableReader.cxx b/PWGDQ/Tasks/tableReader.cxx index 8ed3cd6eeef..600ac3ec440 100644 --- a/PWGDQ/Tasks/tableReader.cxx +++ b/PWGDQ/Tasks/tableReader.cxx @@ -97,6 +97,7 @@ using MyEventsVtxCov = soa::Join; using MyEventsVtxCovSelectedMultExtra = soa::Join; using MyEventsVtxCovSelectedQvector = soa::Join; +using MyEventsVtxCovQvectorExtraWithRefFlow = soa::Join; using MyEventsVtxCovSelectedQvectorExtraWithRefFlow = soa::Join; using MyEventsVtxCovSelectedQvectorCentr = soa::Join; using MyEventsQvector = soa::Join; @@ -277,6 +278,10 @@ struct AnalysisEventSelection { { runEventSelection(event); } + void processSkimmedQVectorExtraRef(MyEventsVtxCovQvectorExtraWithRefFlow::iterator const& event) + { + runEventSelection(event); + } void processDummy(MyEvents&) { // do nothing @@ -287,6 +292,7 @@ struct AnalysisEventSelection { PROCESS_SWITCH(AnalysisEventSelection, processSkimmedQVectorCentr, "Run event selection on DQ skimmed events with Q vector from CFW", false); PROCESS_SWITCH(AnalysisEventSelection, processSkimmedQVectorMultExtra, "Run event selection on DQ skimmed events with Q vector from GFW and MultPV", false); PROCESS_SWITCH(AnalysisEventSelection, processSkimmedQVectorCentrMultExtra, "Run event selection on DQ skimmed events with Q vector from CFW and MultPV", false); + PROCESS_SWITCH(AnalysisEventSelection, processSkimmedQVectorExtraRef, "Run event selection on DQ skimmed events with Q vector and subscribing to reference flow table", false); PROCESS_SWITCH(AnalysisEventSelection, processDummy, "Dummy function", false); // TODO: Add process functions subscribing to Framework Collision }; @@ -1308,6 +1314,7 @@ struct AnalysisSameEventPairing { dimuonExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauz], VarManager::fgValues[VarManager::kVertexingLz], VarManager::fgValues[VarManager::kVertexingLxy]); if (fConfigFlatTables.value) { dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(), + event.selection_raw(), 0, -999., -999., -999., VarManager::fgValues[VarManager::kMass], false, diff --git a/PWGDQ/Tasks/tableReader_withAssoc.cxx b/PWGDQ/Tasks/tableReader_withAssoc.cxx index 7d4c90fcefc..4f9980dd8e6 100644 --- a/PWGDQ/Tasks/tableReader_withAssoc.cxx +++ b/PWGDQ/Tasks/tableReader_withAssoc.cxx @@ -1423,6 +1423,7 @@ struct AnalysisSameEventPairing { if (!event.isEventSelected_bit(0)) { continue; } + uint8_t evSel = event.isEventSelected_raw(); // Reset the fValues array VarManager::ResetValues(0, VarManager::kNVars); VarManager::FillEvent(event, VarManager::fgValues); @@ -1548,6 +1549,7 @@ struct AnalysisSameEventPairing { dimuonsExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauz], VarManager::fgValues[VarManager::kVertexingLz], VarManager::fgValues[VarManager::kVertexingLxy]); if (fConfigOptions.flatTables.value) { dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(), + event.selection_raw(), evSel, -999., -999., -999., VarManager::fgValues[VarManager::kMass], false, diff --git a/PWGEM/Dilepton/Core/Dilepton.h b/PWGEM/Dilepton/Core/Dilepton.h index f0a9ff8fc2b..949f6efcb5d 100644 --- a/PWGEM/Dilepton/Core/Dilepton.h +++ b/PWGEM/Dilepton/Core/Dilepton.h @@ -173,15 +173,12 @@ struct Dilepton { Configurable cfg_apply_detadphi{"cfg_apply_detadphi", false, "flag to apply deta-dphi elliptic cut"}; Configurable cfg_min_deta{"cfg_min_deta", 0.02, "min deta between 2 electrons (elliptic cut)"}; Configurable cfg_min_dphi{"cfg_min_dphi", 0.2, "min dphi between 2 electrons (elliptic cut)"}; - Configurable cfg_apply_dzrdphi_geom{"cfg_apply_dzrdphi_geom", false, "flag to apply generator dz-rdphi elliptic cut"}; - Configurable cfg_min_dz_geom{"cfg_min_dz_geom", 5, "geometrical min dz between 2 electrons (elliptic cut) in cm"}; - Configurable cfg_min_rdphi_geom{"cfg_min_rdphi_geom", 20, "geometrical min rdphi between 2 electrons (elliptic cut) in cm"}; Configurable cfg_min_opang{"cfg_min_opang", 0.0, "min opening angle"}; Configurable cfg_max_opang{"cfg_max_opang", 6.4, "max opening angle"}; Configurable cfg_require_diff_sides{"cfg_require_diff_sides", false, "flag to require 2 tracks are from different sides."}; Configurable cfg_apply_cuts_from_prefilter{"cfg_apply_cuts_from_prefilter", false, "flag to apply phiv cut inherited from prefilter"}; - Configurable cfg_prefilter_bits{"cfg_prefilter_bits", 0, "prefilter bits [kNone : 0, kMee : 1, kPhiV : 2, kSplitOrMergedTrackLS : 4, kSplitOrMergedTrackULS : 8, kSplitOrMergedTrackLSGeom : 16, kSplitOrMergedTrackULSGeom : 32] Please consider logical-OR among them."}; // see PairUtilities.h + Configurable cfg_prefilter_bits{"cfg_prefilter_bits", 0, "prefilter bits [kNone : 0, kMee : 1, kPhiV : 2, kSplitOrMergedTrackLS : 4, kSplitOrMergedTrackULS : 8] Please consider logical-OR among them."}; // see PairUtilities.h Configurable cfg_min_pt_track{"cfg_min_pt_track", 0.2, "min pT for single track"}; Configurable cfg_max_pt_track{"cfg_max_pt_track", 1e+10, "max pT for single track"}; @@ -206,7 +203,6 @@ struct Dilepton { Configurable cfg_max_p_its_cluster_size{"cfg_max_p_its_cluster_size", 0.0, "max p to apply ITS cluster size cut"}; Configurable cfg_min_rel_diff_pin{"cfg_min_rel_diff_pin", -1e+10, "min rel. diff. between pin and ppv"}; Configurable cfg_max_rel_diff_pin{"cfg_max_rel_diff_pin", +1e+10, "max rel. diff. between pin and ppv"}; - Configurable cfg_x_to_go{"cfg_x_to_go", -1, "x (cm) to be propagated in local coordinate"}; Configurable cfg_pid_scheme{"cfg_pid_scheme", static_cast(DielectronCut::PIDSchemes::kTPChadrejORTOFreq), "pid scheme [kTOFreq : 0, kTPChadrej : 1, kTPChadrejORTOFreq : 2, kTPConly : 3, kTOFif : 4, kPIDML : 5, kTPChadrejORTOFreq_woTOFif : 6]"}; Configurable cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -2.0, "min. TPC n sigma for electron inclusion"}; @@ -532,7 +528,6 @@ struct Dilepton { if (cfgAnalysisType == static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kQC)) { fRegistry.add("Pair/same/uls/hs", "dilepton", kTHnSparseD, {axis_mass, axis_pt, axis_dca}, true); fRegistry.add("Pair/same/uls/hDeltaEtaDeltaPhi", "#Delta#eta-#Delta#varphi between 2 tracks;#Delta#varphi (rad.);#Delta#eta;", kTH2D, {{180, -M_PI, M_PI}, {200, -1, +1}}, true); - fRegistry.add("Pair/same/uls/hGeomDeltaZRDeltaPhi", Form("difference in z-r#varphi plane between 2 tracks at r = %2.1f cm;r#Delta#varphi (cm);#Deltaz (cm);", dielectroncuts.cfg_x_to_go.value), kTH2D, {{200, -100, 100}, {200, -10, 10}}, true); if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { fRegistry.add("Pair/same/uls/hMvsPhiV", "m_{ee} vs. #varphi_{V};#varphi_{V} (rad.);m_{ee} (GeV/c^{2})", kTH2D, {{90, 0, M_PI}, {100, 0.0f, 1.0f}}, true); // phiv is only for dielectron fRegistry.add("Pair/same/uls/hMvsOpAng", "m_{ee} vs. angle between 2 tracks;#omega (rad.);m_{ee} (GeV/c^{2})", kTH2D, {{90, 0, M_PI}, {100, 0.0f, 1.0f}}, true); @@ -776,28 +771,6 @@ struct Dilepton { } } - std::map, float> map_z_prop; // map -> geometrical z position at propagated point - std::map, float> map_phi_prop; // map -> geometrical phi position at propagated point - - template - void propagateElectron(TTracks const& tracks) - { - // this has to be called after initCCDB for bz. - for (auto& track : tracks) { - auto track_par_cov = getTrackParCov(track); - track_par_cov.setPID(o2::track::PID::Electron); - o2::base::Propagator::Instance()->propagateToX(track_par_cov, dielectroncuts.cfg_x_to_go, d_bz, o2::base::PropagatorImpl::MAX_SIN_PHI, o2::base::PropagatorImpl::MAX_STEP, matCorr); - auto xyz = track_par_cov.getXYZGlo(); - // float eta = RecoDecay::eta(std::array{xyz.X(), xyz.Y(), xyz.Z()}); - float phi = RecoDecay::phi(std::array{xyz.X(), xyz.Y()}); - o2::math_utils::bringTo02Pi(phi); - map_z_prop[std::make_tuple(ndf, track.emeventId(), track.globalIndex())] = xyz.Z(); - map_phi_prop[std::make_tuple(ndf, track.emeventId(), track.globalIndex())] = phi; - // std::array pxpypz_prop = {0, 0, 0}; // px, py, pz - // getPxPyPz(track_par_cov, pxpypz_prop); - } - } - template bool fillPairInfo(TCollision const& collision, TTrack1 const& t1, TTrack2 const& t2, TCut const& cut) { @@ -843,25 +816,10 @@ struct Dilepton { } } - float dphi_geom = 999.f, dz_geom = 999.f, rdphi_geom = 999.f; if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { if (!cut.template IsSelectedPair(t1, t2, d_bz)) { return false; } - if constexpr (ev_id == 0) { - dz_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? map_z_prop[std::make_tuple(ndf, t1.emeventId(), t1.globalIndex())] - map_z_prop[std::make_tuple(ndf, t2.emeventId(), t2.globalIndex())] : map_z_prop[std::make_tuple(ndf, t2.emeventId(), t2.globalIndex())] - map_z_prop[std::make_tuple(ndf, t1.emeventId(), t1.globalIndex())]; - dphi_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? map_phi_prop[std::make_tuple(ndf, t1.emeventId(), t1.globalIndex())] - map_phi_prop[std::make_tuple(ndf, t2.emeventId(), t2.globalIndex())] : map_phi_prop[std::make_tuple(ndf, t2.emeventId(), t2.globalIndex())] - map_phi_prop[std::make_tuple(ndf, t1.emeventId(), t1.globalIndex())]; - o2::math_utils::bringToPMPi(dphi_geom); - rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - } else { // mixed event - dz_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? map_z_prop[std::make_tuple(t1.dfId(), t1.collisionId(), t1.globalIndex())] - map_z_prop[std::make_tuple(t2.dfId(), t2.collisionId(), t2.globalIndex())] : map_z_prop[std::make_tuple(t2.dfId(), t2.collisionId(), t2.globalIndex())] - map_z_prop[std::make_tuple(t1.dfId(), t1.collisionId(), t1.globalIndex())]; - dphi_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? map_phi_prop[std::make_tuple(t1.dfId(), t1.collisionId(), t1.globalIndex())] - map_phi_prop[std::make_tuple(t2.dfId(), t2.collisionId(), t2.globalIndex())] : map_phi_prop[std::make_tuple(t2.dfId(), t2.collisionId(), t2.globalIndex())] - map_phi_prop[std::make_tuple(t1.dfId(), t1.collisionId(), t1.globalIndex())]; - o2::math_utils::bringToPMPi(dphi_geom); - rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - } - if (dielectroncuts.cfg_x_to_go > 0.f && dielectroncuts.cfg_apply_dzrdphi_geom && std::pow(dz_geom / dielectroncuts.cfg_min_dz_geom, 2) + std::pow(rdphi_geom / dielectroncuts.cfg_min_rdphi_geom, 2) < 1.f) { - return false; - } } else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) { if (!cut.template IsSelectedPair(t1, t2)) { return false; @@ -921,7 +879,6 @@ struct Dilepton { if (t1.sign() * t2.sign() < 0) { // ULS fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), pair_dca, weight); fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hDeltaEtaDeltaPhi"), dphi, deta, weight); - fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hGeomDeltaZRDeltaPhi"), rdphi_geom, dz_geom, weight); if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hMvsPhiV"), phiv, v12.M(), weight); fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hMvsOpAng"), opAng, v12.M(), weight); @@ -929,7 +886,6 @@ struct Dilepton { } else if (t1.sign() > 0 && t2.sign() > 0) { // LS++ fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lspp/hs"), v12.M(), v12.Pt(), pair_dca, weight); fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lspp/hDeltaEtaDeltaPhi"), dphi, deta, weight); - fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lspp/hGeomDeltaZRDeltaPhi"), rdphi_geom, dz_geom, weight); if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lspp/hMvsPhiV"), phiv, v12.M(), weight); fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lspp/hMvsOpAng"), opAng, v12.M(), weight); @@ -937,7 +893,6 @@ struct Dilepton { } else if (t1.sign() < 0 && t2.sign() < 0) { // LS-- fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lsmm/hs"), v12.M(), v12.Pt(), pair_dca, weight); fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lsmm/hDeltaEtaDeltaPhi"), dphi, deta, weight); - fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lsmm/hGeomDeltaZRDeltaPhi"), rdphi_geom, dz_geom, weight); if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lsmm/hMvsPhiV"), phiv, v12.M(), weight); fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("lsmm/hMvsOpAng"), opAng, v12.M(), weight); @@ -1139,9 +1094,7 @@ struct Dilepton { ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kMee))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kMee))) <= static_cast(0), true) && ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kPhiV))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kPhiV))) <= static_cast(0), true) && ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLS))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLS))) <= static_cast(0), true) && - ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS))) <= static_cast(0), true) && - ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLSGeom))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLSGeom))) <= static_cast(0), true) && - ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULSGeom))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULSGeom))) <= static_cast(0), true), + ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS))) <= static_cast(0), true), o2::aod::emprimaryelectron::pfbpi0 >= static_cast(0)); Partition positive_electrons = o2::aod::emprimaryelectron::sign > int8_t(0); @@ -1236,13 +1189,6 @@ struct Dilepton { auto negTracks_per_coll = negTracks.sliceByCached(perCollision, collision.globalIndex(), cache); // LOGF(info, "collision.globalIndex() = %d , collision.posZ() = %f , collision.numContrib() = %d, centrality = %f , posTracks_per_coll.size() = %d, negTracks_per_coll.size() = %d", collision.globalIndex(), collision.posZ(), collision.numContrib(), centralities[cfgCentEstimator], posTracks_per_coll.size(), negTracks_per_coll.size()); - if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { - if (dielectroncuts.cfg_x_to_go > 0.f) { - propagateElectron(posTracks_per_coll); - propagateElectron(negTracks_per_coll); - } - } - int nuls = 0, nlspp = 0, nlsmm = 0; for (auto& [pos, neg] : combinations(CombinationsFullIndexPolicy(posTracks_per_coll, negTracks_per_coll))) { // ULS bool is_pair_ok = fillPairInfo<0>(collision, pos, neg, cut); @@ -1393,14 +1339,6 @@ struct Dilepton { if (!cut.template IsSelectedPair(t1, t2, d_bz)) { return false; } - float dz_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? map_z_prop[std::make_tuple(ndf, t1.emeventId(), t1.globalIndex())] - map_z_prop[std::make_tuple(ndf, t2.emeventId(), t2.globalIndex())] : map_z_prop[std::make_tuple(ndf, t2.emeventId(), t2.globalIndex())] - map_z_prop[std::make_tuple(ndf, t1.emeventId(), t1.globalIndex())]; - float dphi_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? map_phi_prop[std::make_tuple(ndf, t1.emeventId(), t1.globalIndex())] - map_phi_prop[std::make_tuple(ndf, t2.emeventId(), t2.globalIndex())] : map_phi_prop[std::make_tuple(ndf, t2.emeventId(), t2.globalIndex())] - map_phi_prop[std::make_tuple(ndf, t1.emeventId(), t1.globalIndex())]; - o2::math_utils::bringToPMPi(dphi_geom); - float rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - - if (dielectroncuts.cfg_x_to_go > 0.f && dielectroncuts.cfg_apply_dzrdphi_geom && std::pow(dz_geom / dielectroncuts.cfg_min_dz_geom, 2) + std::pow(rdphi_geom / dielectroncuts.cfg_min_rdphi_geom, 2) < 1.f) { - return false; - } } else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) { if (!cut.template IsSelectedPair(t1, t2)) { return false; @@ -1459,12 +1397,6 @@ struct Dilepton { auto posTracks_per_coll = posTracks.sliceByCached(perCollision, collision.globalIndex(), cache); auto negTracks_per_coll = negTracks.sliceByCached(perCollision, collision.globalIndex(), cache); - if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { - if (dielectroncuts.cfg_x_to_go > 0.f) { - propagateElectron(posTracks_per_coll); - propagateElectron(negTracks_per_coll); - } - } for (auto& [pos, neg] : combinations(CombinationsFullIndexPolicy(posTracks_per_coll, negTracks_per_coll))) { // ULS if (isPairOK(collision, pos, neg, cut)) { @@ -1597,6 +1529,18 @@ struct Dilepton { if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 12.0); } + if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 13.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 14.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 15.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 16.0); + } if (!fEMEventCut.IsSelected(collision)) { continue; } diff --git a/PWGEM/Dilepton/Core/DileptonMC.h b/PWGEM/Dilepton/Core/DileptonMC.h index c6dca140962..9d030d1e8ae 100644 --- a/PWGEM/Dilepton/Core/DileptonMC.h +++ b/PWGEM/Dilepton/Core/DileptonMC.h @@ -151,15 +151,12 @@ struct DileptonMC { Configurable cfg_apply_detadphi{"cfg_apply_detadphi", false, "flag to apply deta-dphi elliptic cut"}; Configurable cfg_min_deta{"cfg_min_deta", 0.02, "min deta between 2 electrons (elliptic cut)"}; Configurable cfg_min_dphi{"cfg_min_dphi", 0.2, "min dphi between 2 electrons (elliptic cut)"}; - Configurable cfg_apply_dzrdphi_geom{"cfg_apply_dzrdphi_geom", false, "flag to apply generator dz-rdphi elliptic cut"}; - Configurable cfg_min_dz_geom{"cfg_min_dz_geom", 5, "geometrical min deta between 2 electrons (elliptic cut)"}; - Configurable cfg_min_rdphi_geom{"cfg_min_rdphi_geom", 20, "geometrical min dphi between 2 electrons (elliptic cut)"}; Configurable cfg_min_opang{"cfg_min_opang", 0.0, "min opening angle"}; Configurable cfg_max_opang{"cfg_max_opang", 6.4, "max opening angle"}; Configurable cfg_require_diff_sides{"cfg_require_diff_sides", false, "flag to require 2 tracks are from different sides."}; Configurable cfg_apply_cuts_from_prefilter{"cfg_apply_cuts_from_prefilter", false, "flag to apply phiv cut inherited from prefilter"}; - Configurable cfg_prefilter_bits{"cfg_prefilter_bits", 0, "prefilter bits [kNone : 0, kMee : 1, kPhiV : 2, kSplitOrMergedTrackLS : 4, kSplitOrMergedTrackULS : 8, kSplitOrMergedTrackLSGeom : 16, kSplitOrMergedTrackULSGeom : 32] Please consider logical-OR among them."}; // see PairUtilities.h + Configurable cfg_prefilter_bits{"cfg_prefilter_bits", 0, "prefilter bits [kNone : 0, kMee : 1, kPhiV : 2, kSplitOrMergedTrackLS : 4, kSplitOrMergedTrackULS : 8] Please consider logical-OR among them."}; // see PairUtilities.h Configurable cfg_min_pt_track{"cfg_min_pt_track", 0.2, "min pT for single track"}; Configurable cfg_max_pt_track{"cfg_max_pt_track", 1e+10, "max pT for single track"}; @@ -184,7 +181,6 @@ struct DileptonMC { Configurable cfg_max_p_its_cluster_size{"cfg_max_p_its_cluster_size", 0.0, "max p to apply ITS cluster size cut"}; Configurable cfg_min_rel_diff_pin{"cfg_min_rel_diff_pin", -1e+10, "min rel. diff. between pin and ppv"}; Configurable cfg_max_rel_diff_pin{"cfg_max_rel_diff_pin", +1e+10, "max rel. diff. between pin and ppv"}; - Configurable cfg_x_to_go{"cfg_x_to_go", -1, "x (cm) to be propagated in local coordinate"}; Configurable cfg_pid_scheme{"cfg_pid_scheme", static_cast(DielectronCut::PIDSchemes::kTPChadrejORTOFreq), "pid scheme [kTOFreq : 0, kTPChadrej : 1, kTPChadrejORTOFreq : 2, kTPConly : 3, kTOFif = 4, kPIDML = 5]"}; Configurable cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -2.0, "min. TPC n sigma for electron inclusion"}; @@ -271,6 +267,8 @@ struct DileptonMC { { // event info o2::aod::pwgem::dilepton::utils::eventhistogram::addEventHistograms(&fRegistry); + fRegistry.add("MCEvent/before/hZvtx", "vertex z; Z_{vtx} (cm)", kTH1F, {{100, -50, +50}}, false); + fRegistry.addClone("MCEvent/before/", "MCEvent/after/"); std::string mass_axis_title = "m_{ll} (GeV/c^{2})"; std::string pair_pt_axis_title = "p_{T,ll} (GeV/c)"; @@ -725,34 +723,6 @@ struct DileptonMC { if (!cut.template IsSelectedPair(t1, t2, d_bz)) { return false; } - - if (dielectroncuts.cfg_x_to_go > 0.f) { - auto track_par_cov1 = getTrackParCov(t1); - track_par_cov1.setPID(o2::track::PID::Electron); - o2::base::Propagator::Instance()->propagateToX(track_par_cov1, dielectroncuts.cfg_x_to_go, d_bz, o2::base::PropagatorImpl::MAX_SIN_PHI, o2::base::PropagatorImpl::MAX_STEP, matCorr); - auto xyz1 = track_par_cov1.getXYZGlo(); - float z1 = xyz1.Z(); - // float eta1 = RecoDecay::eta(std::array{xyz1.X(), xyz1.Y(), xyz1.Z()}); - float phi1 = RecoDecay::phi(std::array{xyz1.X(), xyz1.Y()}); - o2::math_utils::bringTo02Pi(phi1); - - auto track_par_cov2 = getTrackParCov(t2); - track_par_cov2.setPID(o2::track::PID::Electron); - o2::base::Propagator::Instance()->propagateToX(track_par_cov2, dielectroncuts.cfg_x_to_go, d_bz, o2::base::PropagatorImpl::MAX_SIN_PHI, o2::base::PropagatorImpl::MAX_STEP, matCorr); - auto xyz2 = track_par_cov2.getXYZGlo(); - float z2 = xyz2.Z(); - // float eta2 = RecoDecay::eta(std::array{xyz2.X(), xyz2.Y(), xyz2.Z()}); - float phi2 = RecoDecay::phi(std::array{xyz2.X(), xyz2.Y()}); - o2::math_utils::bringTo02Pi(phi2); - - float dz_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? z1 - z2 : z2 - z1; - float dphi_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? phi1 - phi2 : phi2 - phi1; - o2::math_utils::bringToPMPi(dphi_geom); - float rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - if (dielectroncuts.cfg_apply_dzrdphi_geom && std::pow(dz_geom / dielectroncuts.cfg_min_dz_geom, 2) + std::pow(rdphi_geom / dielectroncuts.cfg_min_rdphi_geom, 2) < 1.f) { - return false; - } - } } else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) { if (!cut.template IsSelectedTrack(t1) || !cut.template IsSelectedTrack(t2)) { return false; @@ -1064,9 +1034,7 @@ struct DileptonMC { ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kMee))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kMee))) <= static_cast(0), true) && ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kPhiV))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kPhiV))) <= static_cast(0), true) && ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLS))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLS))) <= static_cast(0), true) && - ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS))) <= static_cast(0), true) && - ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLSGeom))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLSGeom))) <= static_cast(0), true) && - ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULSGeom))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULSGeom))) <= static_cast(0), true), + ifnode((dielectroncuts.cfg_prefilter_bits.node() & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS))) > static_cast(0), (o2::aod::emprimaryelectron::pfbpi0 & static_cast(1 << int(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS))) <= static_cast(0), true), o2::aod::emprimaryelectron::pfbpi0 >= static_cast(0)); Preslice perCollision_muon = aod::emprimarymuon::emeventId; @@ -1123,6 +1091,7 @@ struct DileptonMC { if (cfgEventGeneratorType >= 0 && mccollision.getSubGeneratorId() != cfgEventGeneratorType) { continue; } + fRegistry.fill(HIST("MCEvent/before/hZvtx"), mccollision.posZ()); auto rec_colls_per_mccoll = collisions.sliceBy(recColperMcCollision, mccollision.globalIndex()); uint32_t maxNumContrib = 0; @@ -1146,6 +1115,7 @@ struct DileptonMC { if (!fEMEventCut.IsSelected(collision)) { continue; } + fRegistry.fill(HIST("MCEvent/after/hZvtx"), mccollision.posZ()); auto posTracks_per_coll = posTracksMC.sliceByCachedUnsorted(aod::emmcparticle::emmceventId, mccollision.globalIndex(), cache); auto negTracks_per_coll = negTracksMC.sliceByCachedUnsorted(aod::emmcparticle::emmceventId, mccollision.globalIndex(), cache); @@ -1650,33 +1620,6 @@ struct DileptonMC { if (!cut.template IsSelectedPair(t1, t2, d_bz)) { return false; } - if (dielectroncuts.cfg_x_to_go > 0.f) { - auto track_par_cov1 = getTrackParCov(t1); - track_par_cov1.setPID(o2::track::PID::Electron); - o2::base::Propagator::Instance()->propagateToX(track_par_cov1, dielectroncuts.cfg_x_to_go, d_bz, o2::base::PropagatorImpl::MAX_SIN_PHI, o2::base::PropagatorImpl::MAX_STEP, matCorr); - auto xyz1 = track_par_cov1.getXYZGlo(); - float z1 = xyz1.Z(); - // float eta1 = RecoDecay::eta(std::array{xyz1.X(), xyz1.Y(), xyz1.Z()}); - float phi1 = RecoDecay::phi(std::array{xyz1.X(), xyz1.Y()}); - o2::math_utils::bringTo02Pi(phi1); - - auto track_par_cov2 = getTrackParCov(t2); - track_par_cov2.setPID(o2::track::PID::Electron); - o2::base::Propagator::Instance()->propagateToX(track_par_cov2, dielectroncuts.cfg_x_to_go, d_bz, o2::base::PropagatorImpl::MAX_SIN_PHI, o2::base::PropagatorImpl::MAX_STEP, matCorr); - auto xyz2 = track_par_cov2.getXYZGlo(); - float z2 = xyz2.Z(); - // float eta2 = RecoDecay::eta(std::array{xyz2.X(), xyz2.Y(), xyz2.Z()}); - float phi2 = RecoDecay::phi(std::array{xyz2.X(), xyz2.Y()}); - o2::math_utils::bringTo02Pi(phi2); - - float dz_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? z1 - z2 : z2 - z1; - float dphi_geom = t1.sign() * t1.pt() > t2.sign() * t2.pt() ? phi1 - phi2 : phi2 - phi1; - o2::math_utils::bringToPMPi(dphi_geom); - float rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - if (dielectroncuts.cfg_apply_dzrdphi_geom && std::pow(dz_geom / dielectroncuts.cfg_min_dz_geom, 2) + std::pow(rdphi_geom / dielectroncuts.cfg_min_rdphi_geom, 2) < 1.f) { - return false; - } - } } else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) { if (!cut.template IsSelectedPair(t1, t2)) { return false; @@ -2290,6 +2233,18 @@ struct DileptonMC { if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 12.0); } + if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 13.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 14.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 15.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 16.0); + } if (!fEMEventCut.IsSelected(collision)) { continue; } diff --git a/PWGEM/Dilepton/Core/SingleTrackQCMC.h b/PWGEM/Dilepton/Core/SingleTrackQCMC.h index bd16f85f0e7..e21c1fcf84b 100644 --- a/PWGEM/Dilepton/Core/SingleTrackQCMC.h +++ b/PWGEM/Dilepton/Core/SingleTrackQCMC.h @@ -205,6 +205,8 @@ struct SingleTrackQCMC { { // event info o2::aod::pwgem::dilepton::utils::eventhistogram::addEventHistograms<-1>(&fRegistry); + fRegistry.add("MCEvent/before/hZvtx", "vertex z; Z_{vtx} (cm)", kTH1F, {{100, -50, +50}}, false); + fRegistry.addClone("MCEvent/before/", "MCEvent/after/"); if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { const AxisSpec axis_pt{ConfPtlBins, "p_{T,e} (GeV/c)"}; @@ -759,6 +761,7 @@ struct SingleTrackQCMC { if (cfgEventGeneratorType >= 0 && mccollision.getSubGeneratorId() != cfgEventGeneratorType) { continue; } + fRegistry.fill(HIST("MCEvent/before/hZvtx"), mccollision.posZ()); auto rec_colls_per_mccoll = collisions.sliceBy(recColperMcCollision, mccollision.globalIndex()); uint32_t maxNumContrib = 0; @@ -780,10 +783,10 @@ struct SingleTrackQCMC { if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) { continue; } - if (!fEMEventCut.IsSelected(collision)) { continue; } + fRegistry.fill(HIST("MCEvent/after/hZvtx"), mccollision.posZ()); auto leptonsMC_per_coll = leptonsMC.sliceByCachedUnsorted(o2::aod::emmcparticle::emmceventId, mccollision.globalIndex(), cache); for (auto& lepton : leptonsMC_per_coll) { diff --git a/PWGEM/Dilepton/Tasks/lmeeLFCocktail.cxx b/PWGEM/Dilepton/Tasks/lmeeLFCocktail.cxx index b06daf77aff..1cac2727e98 100644 --- a/PWGEM/Dilepton/Tasks/lmeeLFCocktail.cxx +++ b/PWGEM/Dilepton/Tasks/lmeeLFCocktail.cxx @@ -59,7 +59,9 @@ struct lmeelfcocktail { {113, {"rho/", {-1}}}, {223, {"omega/", {-1, 111}}}, {333, {"phi/", {-1, 111, 221}}}, - {443, {"Jpsi/", {-1}}}}; + {443, {"Jpsi/", {-1}}}, + {100443, {"psi2S/", {-1}}}, + {553, {"Upsilon/", {-1}}}}; std::map histogramId; @@ -320,12 +322,12 @@ struct lmeelfcocktail { addHistogram1D("OpAng", opAng_axis, i); addHistogram1D("Mee", mass_axis, i); addHistogram1D("Ptee", ptee_axis, i); - addHistogram1D_stage("Dca", dca_axis, i, "rec/"); - addHistogram1D_stage("Dcaee", dcaee_axis, i, "rec/"); + // addHistogram1D_stage("Dca", dca_axis, i, "rec/"); + // addHistogram1D_stage("Dcaee", dcaee_axis, i, "rec/"); i = -1; - addHistogram2D_stage("DcaVsPt", dca_axis, pt_axis, i, "rec/"); - addHistogram2D_stage("DcaeeVsPtee", dcaee_axis, ptee_axis, i, "rec/"); - addHistogram2D_stage("DcaeeVsMee", dcaee_axis, mass_axis, i, "rec/"); + // addHistogram2D_stage("DcaVsPt", dca_axis, pt_axis, i, "rec/"); + // addHistogram2D_stage("DcaeeVsPtee", dcaee_axis, ptee_axis, i, "rec/"); + // addHistogram2D_stage("DcaeeVsMee", dcaee_axis, mass_axis, i, "rec/"); i = -1; addHistogramND("MeeVsPteeVsCos2DPhiRP", std::vector{mass_axis, ptee_axis, cos2dphi_axis}, i); } @@ -352,7 +354,7 @@ struct lmeelfcocktail { int nPos = 0; ROOT::Math::PtEtaPhiMVector pEleGen, pPosGen, pEleRec, pPosRec; - float weight(1.), effEle(1.), effPos(1.), dcaEle(0.), dcaPos(0.); + float weight(1.), effEle(1.), effPos(1.); //, dcaEle(0.), dcaPos(0.); for (const auto& daughter : particle.daughters_as()) { int temp_pdg = daughter.pdgCode(); if (temp_pdg == 11) { @@ -362,7 +364,7 @@ struct lmeelfcocktail { pEleRec = temp_p; weight = daughter.weight(); effEle = daughter.efficiency(); - dcaEle = daughter.dca(); + // dcaEle = daughter.dca(); nEle++; continue; } @@ -372,7 +374,7 @@ struct lmeelfcocktail { pPosGen = temp_p_gen; pPosRec = temp_p; effPos = daughter.efficiency(); - dcaPos = daughter.dca(); + // dcaPos = daughter.dca(); nPos++; continue; } @@ -436,12 +438,12 @@ struct lmeelfcocktail { if (s == kRec) { // dca only at rec. level if (acceptedEle) { - fillHistogram1D("Dca", s, pdg, other_daughter_pdg, dcaEle, weightEle); - fillHistogram2D("DcaVsPt", s, pdg, other_daughter_pdg, dcaEle, pEle.Pt(), weightEle); + // fillHistogram1D("Dca", s, pdg, other_daughter_pdg, dcaEle, weightEle); + // fillHistogram2D("DcaVsPt", s, pdg, other_daughter_pdg, dcaEle, pEle.Pt(), weightEle); } if (acceptedPos) { - fillHistogram1D("Dca", s, pdg, other_daughter_pdg, dcaPos, weightPos); - fillHistogram2D("DcaVsPt", s, pdg, other_daughter_pdg, dcaPos, pPos.Pt(), weightPos); + // fillHistogram1D("Dca", s, pdg, other_daughter_pdg, dcaPos, weightPos); + // fillHistogram2D("DcaVsPt", s, pdg, other_daughter_pdg, dcaPos, pPos.Pt(), weightPos); } } @@ -459,7 +461,7 @@ struct lmeelfcocktail { float ptee = p12.Pt(); float opAng = o2::aod::pwgem::dilepton::utils::pairutil::getOpeningAngle(pPos.Px(), pPos.Py(), pPos.Pz(), pEle.Px(), pEle.Py(), pEle.Pz()); float phiV = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair(pPos.Px(), pPos.Py(), pPos.Pz(), pEle.Px(), pEle.Py(), pEle.Pz(), 1, -1, 1); - float dcaee = sqrt((pow(dcaEle, 2) + pow(dcaPos, 2)) / 2); + // float dcaee = sqrt((pow(dcaEle, 2) + pow(dcaPos, 2)) / 2); float cos2dphi = std::cos(2.f * p12.Phi()); // PsiRP = 0 rad. double values[3] = {mee, ptee, cos2dphi}; fillHistogramND("MeeVsPteeVsCos2DPhiRP", s, pdg, other_daughter_pdg, values, pairWeight); @@ -468,9 +470,9 @@ struct lmeelfcocktail { fillHistogram1D("PhiV", s, pdg, other_daughter_pdg, phiV, pairWeight); fillHistogram1D("OpAng", s, pdg, other_daughter_pdg, opAng, pairWeight); if (s == kRec) { // dca only at rec. level - fillHistogram1D("Dcaee", s, pdg, other_daughter_pdg, dcaee, pairWeight); - fillHistogram2D("DcaeeVsPtee", s, pdg, other_daughter_pdg, dcaee, ptee, pairWeight); - fillHistogram2D("DcaeeVsMee", s, pdg, other_daughter_pdg, dcaee, mee, pairWeight); + // fillHistogram1D("Dcaee", s, pdg, other_daughter_pdg, dcaee, pairWeight); + // fillHistogram2D("DcaeeVsPtee", s, pdg, other_daughter_pdg, dcaee, ptee, pairWeight); + // fillHistogram2D("DcaeeVsMee", s, pdg, other_daughter_pdg, dcaee, mee, pairWeight); } } } diff --git a/PWGEM/Dilepton/Tasks/prefilterDielectron.cxx b/PWGEM/Dilepton/Tasks/prefilterDielectron.cxx index 1a129a0d70b..a34896e5031 100644 --- a/PWGEM/Dilepton/Tasks/prefilterDielectron.cxx +++ b/PWGEM/Dilepton/Tasks/prefilterDielectron.cxx @@ -108,14 +108,6 @@ struct prefilterDielectron { Configurable cfg_min_deta_uls{"cfg_min_deta_uls", 0.04, "deta between 2 electrons (elliptic cut)"}; // region to be rejected Configurable cfg_min_dphi_uls{"cfg_min_dphi_uls", 0.2, "dphi between 2 electrons (elliptic cut)"}; // region to be rejected - // for dz-rdphi prefilter - Configurable cfg_apply_dzrdphi_geom_uls{"cfg_apply_dzrdphi_geom_uls", false, "flag to apply generator dz-rdphi elliptic cut in ULS"}; // region to be rejected - Configurable cfg_apply_dzrdphi_geom_ls{"cfg_apply_dzrdphi_geom_ls", false, "flag to apply generator dz-rdphi elliptic cut in LS"}; // region to be rejected - Configurable cfg_min_dz_geom_ls{"cfg_min_dz_geom_ls", 3, "geometrical min dz between 2 electrons (elliptic cut) in cm"}; // region to be rejected - Configurable cfg_min_rdphi_geom_ls{"cfg_min_rdphi_geom_ls", 10, "geometrical min rdphi between 2 electrons (elliptic cut) in cm"}; // region to be rejected - Configurable cfg_min_dz_geom_uls{"cfg_min_dz_geom_uls", 3, "geometrical min dz between 2 electrons (elliptic cut) in cm"}; // region to be rejected - Configurable cfg_min_rdphi_geom_uls{"cfg_min_rdphi_geom_uls", 10, "geometrical min rdphi between 2 electrons (elliptic cut) in cm"}; // region to be rejected - Configurable cfg_min_pt_track{"cfg_min_pt_track", 0.2, "min pT for single track"}; Configurable cfg_max_pt_track{"cfg_max_pt_track", 1e+10, "max pT for single track"}; Configurable cfg_min_eta_track{"cfg_min_eta_track", -0.9, "min eta for single track"}; @@ -139,7 +131,6 @@ struct prefilterDielectron { Configurable cfg_max_p_its_cluster_size{"cfg_max_p_its_cluster_size", 0.0, "max p to apply ITS cluster size cut"}; Configurable cfg_min_rel_diff_pin{"cfg_min_rel_diff_pin", -1e+10, "min rel. diff. between pin and ppv"}; Configurable cfg_max_rel_diff_pin{"cfg_max_rel_diff_pin", +1e+10, "max rel. diff. between pin and ppv"}; - Configurable cfg_x_to_go{"cfg_x_to_go", -1, "x (cm) to be propagated in local coordinate"}; Configurable cfg_pid_scheme{"cfg_pid_scheme", static_cast(DielectronCut::PIDSchemes::kTPChadrejORTOFreq), "pid scheme [kTOFreq : 0, kTPChadrej : 1, kTPChadrejORTOFreq : 2, kTPConly : 3, kTOFif : 4, kPIDML : 5, kTPChadrejORTOFreq_woTOFif : 6]"}; Configurable cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -2.0, "min. TPC n sigma for electron inclusion"}; @@ -245,7 +236,6 @@ struct prefilterDielectron { fRegistry.add("Pair/before/uls/hMvsPt", "m_{ee} vs. p_{T,ee}", kTH2D, {axis_mass, axis_pair_pt}, true); fRegistry.add("Pair/before/uls/hMvsPhiV", "m_{ee} vs. #varphi_{V};#varphi_{V} (rad.);m_{ee} (GeV/c^{2})", kTH2D, {axis_phiv, {200, 0, 1}}, true); fRegistry.add("Pair/before/uls/hDeltaEtaDeltaPhi", "#Delta#eta-#Delta#varphi between 2 tracks;#Delta#varphi (rad.);#Delta#eta;", kTH2D, {{180, -M_PI, M_PI}, {200, -1, +1}}, true); - fRegistry.add("Pair/before/uls/hGeomDeltaZRDeltaPhi", Form("difference in z-r#varphi plane between 2 tracks at r = %2.1f cm;r#Delta#varphi (cm);#Deltaz (cm);", dielectroncuts.cfg_x_to_go.value), kTH2D, {{200, -100, 100}, {200, -10, 10}}, true); fRegistry.addClone("Pair/before/uls/", "Pair/before/lspp/"); fRegistry.addClone("Pair/before/uls/", "Pair/before/lsmm/"); fRegistry.addClone("Pair/before/", "Pair/after/"); @@ -335,26 +325,6 @@ struct prefilterDielectron { } // end of PID ML } - std::map, float> map_z_prop; // map -> geometrical z position at propagated point - std::map, float> map_phi_prop; // map -> geometrical phi position at propagated point - - template - void propagateElectron(TTracks const& tracks) - { - // this has to be called after initCCDB for bz. - for (auto& track : tracks) { - auto track_par_cov = getTrackParCov(track); - track_par_cov.setPID(o2::track::PID::Electron); - o2::base::Propagator::Instance()->propagateToX(track_par_cov, dielectroncuts.cfg_x_to_go, d_bz, o2::base::PropagatorImpl::MAX_SIN_PHI, o2::base::PropagatorImpl::MAX_STEP, matCorr); - auto xyz = track_par_cov.getXYZGlo(); - // float eta = RecoDecay::eta(std::array{xyz.X(), xyz.Y(), xyz.Z()}); - float phi = RecoDecay::phi(std::array{xyz.X(), xyz.Y()}); - o2::math_utils::bringTo02Pi(phi); - map_z_prop[std::make_tuple(ndf, track.emeventId(), track.globalIndex())] = xyz.Z(); - map_phi_prop[std::make_tuple(ndf, track.emeventId(), track.globalIndex())] = phi; - } - } - std::unordered_map map_pfb; // map track.globalIndex -> prefilter bit SliceCache cache; @@ -395,11 +365,6 @@ struct prefilterDielectron { continue; } - if (dielectroncuts.cfg_x_to_go > 0.f) { - propagateElectron(posTracks_per_coll); - propagateElectron(negTracks_per_coll); - } - // LOGF(info, "centrality = %f , posTracks_per_coll.size() = %d, negTracks_per_coll.size() = %d", centralities[cfgCentEstimator], posTracks_per_coll.size(), negTracks_per_coll.size()); for (auto& [pos, ele] : combinations(CombinationsFullIndexPolicy(posTracks_per_coll, negTracks_per_coll))) { // ULS @@ -416,15 +381,9 @@ struct prefilterDielectron { float dphi = pos.sign() * v1.Pt() > ele.sign() * v2.Pt() ? v1.Phi() - v2.Phi() : v2.Phi() - v1.Phi(); o2::math_utils::bringToPMPi(dphi); - float dz_geom = pos.sign() * pos.pt() > ele.sign() * ele.pt() ? map_z_prop[std::make_tuple(ndf, pos.emeventId(), pos.globalIndex())] - map_z_prop[std::make_tuple(ndf, ele.emeventId(), ele.globalIndex())] : map_z_prop[std::make_tuple(ndf, ele.emeventId(), ele.globalIndex())] - map_z_prop[std::make_tuple(ndf, pos.emeventId(), pos.globalIndex())]; - float dphi_geom = pos.sign() * pos.pt() > ele.sign() * ele.pt() ? map_phi_prop[std::make_tuple(ndf, pos.emeventId(), pos.globalIndex())] - map_phi_prop[std::make_tuple(ndf, ele.emeventId(), ele.globalIndex())] : map_phi_prop[std::make_tuple(ndf, ele.emeventId(), ele.globalIndex())] - map_phi_prop[std::make_tuple(ndf, pos.emeventId(), pos.globalIndex())]; - o2::math_utils::bringToPMPi(dphi_geom); - float rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - fRegistry.fill(HIST("Pair/before/uls/hMvsPhiV"), phiv, v12.M()); fRegistry.fill(HIST("Pair/before/uls/hMvsPt"), v12.M(), v12.Pt()); fRegistry.fill(HIST("Pair/before/uls/hDeltaEtaDeltaPhi"), dphi, deta); - fRegistry.fill(HIST("Pair/before/uls/hGeomDeltaZRDeltaPhi"), rdphi_geom, dz_geom); if (dielectroncuts.cfg_min_mass < v12.M() && v12.M() < dielectroncuts.cfg_max_mass) { map_pfb[pos.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kMee); @@ -440,11 +399,6 @@ struct prefilterDielectron { map_pfb[pos.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS); map_pfb[ele.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULS); } - - if (dielectroncuts.cfg_x_to_go > 0.f && dielectroncuts.cfg_apply_dzrdphi_geom_uls && std::pow(dz_geom / dielectroncuts.cfg_min_dz_geom_uls, 2) + std::pow(rdphi_geom / dielectroncuts.cfg_min_rdphi_geom_uls, 2) < 1.f) { - map_pfb[pos.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULSGeom); - map_pfb[ele.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackULSGeom); - } } for (auto& [pos1, pos2] : combinations(CombinationsStrictlyUpperIndexPolicy(posTracks_per_coll, posTracks_per_coll))) { // LS++ @@ -461,25 +415,14 @@ struct prefilterDielectron { float dphi = pos1.sign() * v1.Pt() > pos2.sign() * v2.Pt() ? v1.Phi() - v2.Phi() : v2.Phi() - v1.Phi(); o2::math_utils::bringToPMPi(dphi); - float dz_geom = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? map_z_prop[std::make_tuple(ndf, pos1.emeventId(), pos1.globalIndex())] - map_z_prop[std::make_tuple(ndf, pos2.emeventId(), pos2.globalIndex())] : map_z_prop[std::make_tuple(ndf, pos2.emeventId(), pos2.globalIndex())] - map_z_prop[std::make_tuple(ndf, pos1.emeventId(), pos1.globalIndex())]; - float dphi_geom = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? map_phi_prop[std::make_tuple(ndf, pos1.emeventId(), pos1.globalIndex())] - map_phi_prop[std::make_tuple(ndf, pos2.emeventId(), pos2.globalIndex())] : map_phi_prop[std::make_tuple(ndf, pos2.emeventId(), pos2.globalIndex())] - map_phi_prop[std::make_tuple(ndf, pos1.emeventId(), pos1.globalIndex())]; - o2::math_utils::bringToPMPi(dphi_geom); - float rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - fRegistry.fill(HIST("Pair/before/lspp/hMvsPt"), v12.M(), v12.Pt()); fRegistry.fill(HIST("Pair/before/lspp/hMvsPhiV"), phiv, v12.M()); fRegistry.fill(HIST("Pair/before/lspp/hDeltaEtaDeltaPhi"), dphi, deta); - fRegistry.fill(HIST("Pair/before/lspp/hGeomDeltaZRDeltaPhi"), rdphi_geom, dz_geom); if (dielectroncuts.cfg_apply_detadphi_ls && std::pow(deta / dielectroncuts.cfg_min_deta_ls, 2) + std::pow(dphi / dielectroncuts.cfg_min_dphi_ls, 2) < 1.f) { map_pfb[pos1.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLS); map_pfb[pos2.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLS); } - - if (dielectroncuts.cfg_x_to_go > 0.f && dielectroncuts.cfg_apply_dzrdphi_geom_ls && std::pow(dz_geom / dielectroncuts.cfg_min_dz_geom_ls, 2) + std::pow(rdphi_geom / dielectroncuts.cfg_min_rdphi_geom_ls, 2) < 1.f) { - map_pfb[pos1.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLSGeom); - map_pfb[pos2.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLSGeom); - } } for (auto& [ele1, ele2] : combinations(CombinationsStrictlyUpperIndexPolicy(negTracks_per_coll, negTracks_per_coll))) { // LS-- @@ -496,25 +439,14 @@ struct prefilterDielectron { float dphi = ele1.sign() * v1.Pt() > ele2.sign() * v2.Pt() ? v1.Phi() - v2.Phi() : v2.Phi() - v1.Phi(); o2::math_utils::bringToPMPi(dphi); - float dz_geom = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? map_z_prop[std::make_tuple(ndf, ele1.emeventId(), ele1.globalIndex())] - map_z_prop[std::make_tuple(ndf, ele2.emeventId(), ele2.globalIndex())] : map_z_prop[std::make_tuple(ndf, ele2.emeventId(), ele2.globalIndex())] - map_z_prop[std::make_tuple(ndf, ele1.emeventId(), ele1.globalIndex())]; - float dphi_geom = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? map_phi_prop[std::make_tuple(ndf, ele1.emeventId(), ele1.globalIndex())] - map_phi_prop[std::make_tuple(ndf, ele2.emeventId(), ele2.globalIndex())] : map_phi_prop[std::make_tuple(ndf, ele2.emeventId(), ele2.globalIndex())] - map_phi_prop[std::make_tuple(ndf, ele1.emeventId(), ele1.globalIndex())]; - o2::math_utils::bringToPMPi(dphi_geom); - float rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - fRegistry.fill(HIST("Pair/before/lsmm/hMvsPt"), v12.M(), v12.Pt()); fRegistry.fill(HIST("Pair/before/lsmm/hMvsPhiV"), phiv, v12.M()); fRegistry.fill(HIST("Pair/before/lsmm/hDeltaEtaDeltaPhi"), dphi, deta); - fRegistry.fill(HIST("Pair/before/lsmm/hGeomDeltaZRDeltaPhi"), rdphi_geom, dz_geom); if (dielectroncuts.cfg_apply_detadphi_ls && std::pow(deta / dielectroncuts.cfg_min_deta_ls, 2) + std::pow(dphi / dielectroncuts.cfg_min_dphi_ls, 2) < 1.f) { map_pfb[ele1.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLS); map_pfb[ele2.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLS); } - - if (dielectroncuts.cfg_x_to_go > 0.f && dielectroncuts.cfg_apply_dzrdphi_geom_ls && std::pow(dz_geom / dielectroncuts.cfg_min_dz_geom_ls, 2) + std::pow(rdphi_geom / dielectroncuts.cfg_min_rdphi_geom_ls, 2) < 1.f) { - map_pfb[ele1.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLSGeom); - map_pfb[ele2.globalIndex()] |= 1 << static_cast(o2::aod::pwgem::dilepton::utils::pairutil::DileptonPrefilterBit::kSplitOrMergedTrackLSGeom); - } } } // end of collision loop @@ -554,15 +486,9 @@ struct prefilterDielectron { float dphi = pos.sign() * v1.Pt() > ele.sign() * v2.Pt() ? v1.Phi() - v2.Phi() : v2.Phi() - v1.Phi(); o2::math_utils::bringToPMPi(dphi); - float dz_geom = pos.sign() * pos.pt() > ele.sign() * ele.pt() ? map_z_prop[std::make_tuple(ndf, pos.emeventId(), pos.globalIndex())] - map_z_prop[std::make_tuple(ndf, ele.emeventId(), ele.globalIndex())] : map_z_prop[std::make_tuple(ndf, ele.emeventId(), ele.globalIndex())] - map_z_prop[std::make_tuple(ndf, pos.emeventId(), pos.globalIndex())]; - float dphi_geom = pos.sign() * pos.pt() > ele.sign() * ele.pt() ? map_phi_prop[std::make_tuple(ndf, pos.emeventId(), pos.globalIndex())] - map_phi_prop[std::make_tuple(ndf, ele.emeventId(), ele.globalIndex())] : map_phi_prop[std::make_tuple(ndf, ele.emeventId(), ele.globalIndex())] - map_phi_prop[std::make_tuple(ndf, pos.emeventId(), pos.globalIndex())]; - o2::math_utils::bringToPMPi(dphi_geom); - float rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - fRegistry.fill(HIST("Pair/after/uls/hMvsPhiV"), phiv, v12.M()); fRegistry.fill(HIST("Pair/after/uls/hMvsPt"), v12.M(), v12.Pt()); fRegistry.fill(HIST("Pair/after/uls/hDeltaEtaDeltaPhi"), dphi, deta); - fRegistry.fill(HIST("Pair/after/uls/hGeomDeltaZRDeltaPhi"), rdphi_geom, dz_geom); } for (auto& [pos1, pos2] : combinations(CombinationsStrictlyUpperIndexPolicy(posTracks_per_coll, posTracks_per_coll))) { // LS++ @@ -581,15 +507,9 @@ struct prefilterDielectron { float dphi = pos1.sign() * v1.Pt() > pos2.sign() * v2.Pt() ? v1.Phi() - v2.Phi() : v2.Phi() - v1.Phi(); o2::math_utils::bringToPMPi(dphi); - float dz_geom = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? map_z_prop[std::make_tuple(ndf, pos1.emeventId(), pos1.globalIndex())] - map_z_prop[std::make_tuple(ndf, pos2.emeventId(), pos2.globalIndex())] : map_z_prop[std::make_tuple(ndf, pos2.emeventId(), pos2.globalIndex())] - map_z_prop[std::make_tuple(ndf, pos1.emeventId(), pos1.globalIndex())]; - float dphi_geom = pos1.sign() * pos1.pt() > pos2.sign() * pos2.pt() ? map_phi_prop[std::make_tuple(ndf, pos1.emeventId(), pos1.globalIndex())] - map_phi_prop[std::make_tuple(ndf, pos2.emeventId(), pos2.globalIndex())] : map_phi_prop[std::make_tuple(ndf, pos2.emeventId(), pos2.globalIndex())] - map_phi_prop[std::make_tuple(ndf, pos1.emeventId(), pos1.globalIndex())]; - o2::math_utils::bringToPMPi(dphi_geom); - float rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - fRegistry.fill(HIST("Pair/after/lspp/hMvsPt"), v12.M(), v12.Pt()); fRegistry.fill(HIST("Pair/after/lspp/hMvsPhiV"), phiv, v12.M()); fRegistry.fill(HIST("Pair/after/lspp/hDeltaEtaDeltaPhi"), dphi, deta); - fRegistry.fill(HIST("Pair/after/lspp/hGeomDeltaZRDeltaPhi"), rdphi_geom, dz_geom); } for (auto& [ele1, ele2] : combinations(CombinationsStrictlyUpperIndexPolicy(negTracks_per_coll, negTracks_per_coll))) { // LS-- @@ -608,15 +528,9 @@ struct prefilterDielectron { float dphi = ele1.sign() * v1.Pt() > ele2.sign() * v2.Pt() ? v1.Phi() - v2.Phi() : v2.Phi() - v1.Phi(); o2::math_utils::bringToPMPi(dphi); - float dz_geom = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? map_z_prop[std::make_tuple(ndf, ele1.emeventId(), ele1.globalIndex())] - map_z_prop[std::make_tuple(ndf, ele2.emeventId(), ele2.globalIndex())] : map_z_prop[std::make_tuple(ndf, ele2.emeventId(), ele2.globalIndex())] - map_z_prop[std::make_tuple(ndf, ele1.emeventId(), ele1.globalIndex())]; - float dphi_geom = ele1.sign() * ele1.pt() > ele2.sign() * ele2.pt() ? map_phi_prop[std::make_tuple(ndf, ele1.emeventId(), ele1.globalIndex())] - map_phi_prop[std::make_tuple(ndf, ele2.emeventId(), ele2.globalIndex())] : map_phi_prop[std::make_tuple(ndf, ele2.emeventId(), ele2.globalIndex())] - map_phi_prop[std::make_tuple(ndf, ele1.emeventId(), ele1.globalIndex())]; - o2::math_utils::bringToPMPi(dphi_geom); - float rdphi_geom = dielectroncuts.cfg_x_to_go * dphi_geom; - fRegistry.fill(HIST("Pair/after/lsmm/hMvsPt"), v12.M(), v12.Pt()); fRegistry.fill(HIST("Pair/after/lsmm/hMvsPhiV"), phiv, v12.M()); fRegistry.fill(HIST("Pair/after/lsmm/hDeltaEtaDeltaPhi"), dphi, deta); - fRegistry.fill(HIST("Pair/after/lsmm/hGeomDeltaZRDeltaPhi"), rdphi_geom, dz_geom); } } // end of collision loop diff --git a/PWGEM/Dilepton/Utils/EventHistograms.h b/PWGEM/Dilepton/Utils/EventHistograms.h index 89609c336f8..4526e6c6685 100644 --- a/PWGEM/Dilepton/Utils/EventHistograms.h +++ b/PWGEM/Dilepton/Utils/EventHistograms.h @@ -18,7 +18,7 @@ using namespace o2::framework; namespace o2::aod::pwgem::dilepton::utils::eventhistogram { -const int nbin_ev = 14; +const int nbin_ev = 18; template void addEventHistograms(HistogramRegistry* fRegistry) { @@ -36,8 +36,12 @@ void addEventHistograms(HistogramRegistry* fRegistry) hCollisionCounter->GetXaxis()->SetBinLabel(10, "sel8"); hCollisionCounter->GetXaxis()->SetBinLabel(11, "|Z_{vtx}| < 10 cm"); hCollisionCounter->GetXaxis()->SetBinLabel(12, "NoCollInTimeRangeStandard"); - hCollisionCounter->GetXaxis()->SetBinLabel(13, "Calibrated Q vector"); - hCollisionCounter->GetXaxis()->SetBinLabel(14, "accepted"); + hCollisionCounter->GetXaxis()->SetBinLabel(13, "NoCollInTimeRangeStrict"); + hCollisionCounter->GetXaxis()->SetBinLabel(14, "NoCollInRofStandard"); + hCollisionCounter->GetXaxis()->SetBinLabel(15, "NoCollInRofStrict"); + hCollisionCounter->GetXaxis()->SetBinLabel(16, "NoHighMultCollInPrevRof"); + hCollisionCounter->GetXaxis()->SetBinLabel(17, "Calibrated Q vector"); + hCollisionCounter->GetXaxis()->SetBinLabel(18, "accepted"); fRegistry->add("Event/before/hZvtx", "vertex z; Z_{vtx} (cm)", kTH1F, {{100, -50, +50}}, false); fRegistry->add("Event/before/hMultNTracksPV", "hMultNTracksPV; N_{track} to PV", kTH1F, {{6001, -0.5, 6000.5}}, false); @@ -159,6 +163,18 @@ void fillEventInfo(HistogramRegistry* fRegistry, TCollision const& collision, co if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 12.0); } + if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 13.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 14.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 15.0); + } + if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 16.0); + } fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hZvtx"), collision.posZ()); fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hMultNTracksPV"), collision.multNTracksPV()); diff --git a/PWGEM/Dilepton/Utils/PairUtilities.h b/PWGEM/Dilepton/Utils/PairUtilities.h index 05c858a25ec..5e253c3fcee 100644 --- a/PWGEM/Dilepton/Utils/PairUtilities.h +++ b/PWGEM/Dilepton/Utils/PairUtilities.h @@ -42,12 +42,10 @@ enum class DileptonAnalysisType : int { kHFll = 6, }; enum class DileptonPrefilterBit : int { - kMee = 0, // reject tracks from pi0 dalitz decays at very low mass where S/B > 1 - kPhiV = 1, // reject tracks from photon conversions - kSplitOrMergedTrackLS = 2, // reject split or marged tracks in LS pairs based on momentum deta-dphi at PV - kSplitOrMergedTrackULS = 3, // reject split or marged tracks in ULS pairs based on momentum deta-dphi at PV - kSplitOrMergedTrackLSGeom = 4, // reject split or marged tracks in LS pairs based on geometical distance at a certain propagated radius - kSplitOrMergedTrackULSGeom = 5, // reject split or marged tracks in ULS pairs based on geometical distance at a certain propagated radius + kMee = 0, // reject tracks from pi0 dalitz decays at very low mass where S/B > 1 + kPhiV = 1, // reject tracks from photon conversions + kSplitOrMergedTrackLS = 2, // reject split or marged tracks in LS pairs based on momentum deta-dphi at PV + kSplitOrMergedTrackULS = 3, // reject split or marged tracks in ULS pairs based on momentum deta-dphi at PV }; using SMatrix55 = ROOT::Math::SMatrix>; diff --git a/PWGEM/PhotonMeson/Utils/EventHistograms.h b/PWGEM/PhotonMeson/Utils/EventHistograms.h index fd6f6f31f7f..9003bd8c3ff 100644 --- a/PWGEM/PhotonMeson/Utils/EventHistograms.h +++ b/PWGEM/PhotonMeson/Utils/EventHistograms.h @@ -21,7 +21,7 @@ namespace o2::aod::pwgem::photonmeson::utils::eventhistogram void addEventHistograms(HistogramRegistry* fRegistry) { // event info - auto hCollisionCounter = fRegistry->add("Event/before/hCollisionCounter", "collision counter;;Number of events", kTH1F, {{12, 0.5, 12.5}}, false); + auto hCollisionCounter = fRegistry->add("Event/before/hCollisionCounter", "collision counter;;Number of events", kTH1D, {{12, 0.5, 12.5}}, false); hCollisionCounter->GetXaxis()->SetBinLabel(1, "all"); hCollisionCounter->GetXaxis()->SetBinLabel(2, "No TF border"); hCollisionCounter->GetXaxis()->SetBinLabel(3, "No ITS ROF border"); diff --git a/PWGHF/Core/HfHelper.h b/PWGHF/Core/HfHelper.h index 7714fd68165..5ba68530e3f 100644 --- a/PWGHF/Core/HfHelper.h +++ b/PWGHF/Core/HfHelper.h @@ -839,6 +839,16 @@ class HfHelper return false; } + // d0 of pi + if (std::abs(candBp.impactParameter1()) < cuts->get(pTBin, "d0 Pi")) { + return false; + } + + // d0 of D + if (std::abs(candBp.impactParameter0()) < cuts->get(pTBin, "d0 D")) { + return false; + } + return true; } diff --git a/PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx b/PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx index aa6ba1525eb..1636d5223b3 100644 --- a/PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx +++ b/PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx @@ -230,11 +230,14 @@ struct HfTaskDirectedFlowCharmHadrons { for (const auto& candidate : candidates) { double massCand = 0.; double rapCand = 0.; + double sign = 0.; // electric charge of the first daughter track to differentiate particle and antiparticle double signDstarCand = 0.0; std::vector outputMl = {-999., -999.}; if constexpr (std::is_same_v || std::is_same_v) { massCand = hfHelper.invMassDplusToPiKPi(candidate); rapCand = hfHelper.yDplus(candidate); + auto trackprong0 = candidate.template prong0_as(); + sign = trackprong0.sign(); if constexpr (std::is_same_v) { for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) outputMl[iclass] = candidate.mlProbDplusToPiKPi()[classMl->at(iclass)]; @@ -244,6 +247,7 @@ struct HfTaskDirectedFlowCharmHadrons { case DecayChannel::D0ToPiK: massCand = hfHelper.invMassD0ToPiK(candidate); rapCand = hfHelper.yD0(candidate); + sign = 1; if constexpr (std::is_same_v) { for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) outputMl[iclass] = candidate.mlProbD0()[classMl->at(iclass)]; @@ -252,6 +256,7 @@ struct HfTaskDirectedFlowCharmHadrons { case DecayChannel::D0ToKPi: massCand = hfHelper.invMassD0barToKPi(candidate); rapCand = hfHelper.yD0(candidate); + sign = -1; if constexpr (std::is_same_v) { for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) outputMl[iclass] = candidate.mlProbD0bar()[classMl->at(iclass)]; @@ -275,9 +280,6 @@ struct HfTaskDirectedFlowCharmHadrons { } } - auto trackprong0 = candidate.template prong0_as(); - double sign = trackprong0.sign(); // electric charge of the first daughter track to differentiate particle and antiparticle - double ptCand = candidate.pt(); double etaCand = candidate.eta(); double phiCand = candidate.phi(); diff --git a/PWGHF/HFC/TableProducer/CMakeLists.txt b/PWGHF/HFC/TableProducer/CMakeLists.txt index e3fc1bd5938..1847bcf9890 100644 --- a/PWGHF/HFC/TableProducer/CMakeLists.txt +++ b/PWGHF/HFC/TableProducer/CMakeLists.txt @@ -44,6 +44,11 @@ o2physics_add_dpl_workflow(correlator-ds-hadrons PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(correlator-ds-hadrons-reduced + SOURCES correlatorDsHadronsReduced.cxx + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(correlator-dstar-hadrons SOURCES correlatorDstarHadrons.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index 6d85a17cb80..090b3f45d23 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -61,8 +61,8 @@ struct HfCorrelatorDsHadronsSelCollision { Configurable yCandMax{"yCandMax", 0.8, "max. cand. rapidity"}; Configurable ptCandMin{"ptCandMin", 1., "min. cand. pT"}; - SliceCache cache; HfHelper hfHelper; + SliceCache cache; using SelCollisions = soa::Join; using CandDsData = soa::Filtered>; @@ -169,15 +169,8 @@ struct HfCorrelatorDsHadrons { Configurable> binsPtHadron{"binsPtHadron", std::vector{0.3, 2., 4., 8., 12., 50.}, "pT bin limits for assoc particle"}; Configurable> binsPtEfficiencyD{"binsPtEfficiencyD", std::vector{o2::analysis::hf_cuts_ds_to_k_k_pi::vecBinsPt}, "pT bin limits for efficiency"}; Configurable> efficiencyD{"efficiencyD", {1., 1., 1., 1., 1., 1.}, "efficiency values for Ds meson"}; - ConfigurableAxis zPoolBins{"zPoolBins", {VARIABLE_WIDTH, -10.0, -2.5, 2.5, 10.0}, "z vertex position pools"}; - ConfigurableAxis multPoolBins{"multPoolBins", {VARIABLE_WIDTH, 0., 900., 1800., 6000.}, "event multiplicity pools (FT0M)"}; - ConfigurableAxis binsMassD{"binsMassD", {200, 1.7, 2.25}, "inv. mass (K^{#pm}K^{-}#pi^{+}) (GeV/#it{c}^{2})"}; - ConfigurableAxis binsEta{"binsEta", {50, -2., 2.}, "#it{#eta}"}; - ConfigurableAxis binsPhi{"binsPhi", {64, -PIHalf, 3. * PIHalf}, "#it{#varphi}"}; - ConfigurableAxis binsMultiplicity{"binsMultiplicity", {200, 0., 800.}, "Multiplicity"}; - ConfigurableAxis binsMultFT0M{"binsMultFT0M", {600, 0., 6000.}, "Multiplicity as FT0M signal amplitude"}; - ConfigurableAxis binsPosZ{"binsPosZ", {100, -10., 10.}, "primary vertex z coordinate"}; - ConfigurableAxis binsPoolBin{"binsPoolBin", {9, 0., 9.}, "PoolBin"}; + + int hfcReducedCollisionIndex = 0; HfHelper hfHelper; SliceCache cache; @@ -195,6 +188,22 @@ struct HfCorrelatorDsHadrons { Filter flagDsFilter = ((o2::aod::hf_track_index::hfflag & static_cast(1 << aod::hf_cand_3prong::DecayType::DsToKKPi)) != static_cast(0)) && (aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlagDs || aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlagDs); Filter trackFilter = (nabs(aod::track::eta) < etaTrackMax) && (aod::track::pt > ptTrackMin) && (aod::track::pt < ptTrackMax) && (nabs(aod::track::dcaXY) < dcaXYTrackMax) && (nabs(aod::track::dcaZ) < dcaZTrackMax); + Preslice candsDsPerCollision = aod::hf_cand::collisionId; + Preslice trackIndicesPerCollision = aod::track::collisionId; + Preslice perCollisionCandMc = o2::aod::mcparticle::mcCollisionId; + PresliceUnsorted> collPerCollMc = o2::aod::mccollisionlabel::mcCollisionId; + + ConfigurableAxis zPoolBins{"zPoolBins", {VARIABLE_WIDTH, -10.0, -2.5, 2.5, 10.0}, "z vertex position pools"}; + ConfigurableAxis multPoolBins{"multPoolBins", {VARIABLE_WIDTH, 0., 900., 1800., 6000.}, "event multiplicity pools (FT0M)"}; + ConfigurableAxis binsMassD{"binsMassD", {200, 1.7, 2.25}, "inv. mass (K^{#pm}K^{-}#pi^{+}) (GeV/#it{c}^{2})"}; + ConfigurableAxis binsEta{"binsEta", {50, -2., 2.}, "#it{#eta}"}; + + ConfigurableAxis binsPhi{"binsPhi", {64, -PIHalf, 3. * PIHalf}, "#it{#varphi}"}; + ConfigurableAxis binsMultiplicity{"binsMultiplicity", {200, 0., 800.}, "Multiplicity"}; + ConfigurableAxis binsMultFT0M{"binsMultFT0M", {600, 0., 6000.}, "Multiplicity as FT0M signal amplitude"}; + ConfigurableAxis binsPosZ{"binsPosZ", {100, -10., 10.}, "primary vertex z coordinate"}; + ConfigurableAxis binsPoolBin{"binsPoolBin", {9, 0., 9.}, "PoolBin"}; + HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject}; void init(InitContext&) @@ -581,9 +590,6 @@ struct HfCorrelatorDsHadrons { } PROCESS_SWITCH(HfCorrelatorDsHadrons, processMcRec, "Process MC Reco mode", false); - Preslice perCollisionCandMc = o2::aod::mcparticle::mcCollisionId; - PresliceUnsorted> collPerCollMc = o2::aod::mccollisionlabel::mcCollisionId; - /// Ds-Hadron correlation pair builder - for MC gen-level analysis (no filter/selection, only true signal) void processMcGen(SelCollisionsMc const& mcCollisions, soa::Join const& collisions, @@ -689,32 +695,75 @@ struct HfCorrelatorDsHadrons { } PROCESS_SWITCH(HfCorrelatorDsHadrons, processMcGen, "Process MC Gen mode", false); - void processDerivedDataDs(SelCollisionsWithDs::iterator const& collision, + void processDerivedDataDs(SelCollisionsWithDs const& collisions, CandDsData const& candidates, MyTracksData const& tracks) { - collReduced(collision.multFT0M(), collision.posZ()); - // Ds fill histograms and Ds candidates information stored - for (const auto& candidate : candidates) { - // candidate selected - if (candidate.isSelDsToKKPi() >= selectionFlagDs) { - candReduced(collReduced.lastIndex(), candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToKKPi(candidate)); - } else if (candidate.isSelDsToPiKK() >= selectionFlagDs) { - candReduced(collReduced.lastIndex(), candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToPiKK(candidate)); + for (const auto& collision : collisions) { + auto thisCollId = collision.globalIndex(); + auto candsDsThisColl = candidates.sliceBy(candsDsPerCollision, thisCollId); + auto tracksThisColl = tracks.sliceBy(trackIndicesPerCollision, thisCollId); + + // Ds fill histograms and Ds candidates information stored + for (const auto& candidate : candidates) { + // candidate selected + if (candidate.isSelDsToKKPi() >= selectionFlagDs) { + candReduced(hfcReducedCollisionIndex, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToKKPi(candidate)); + } else if (candidate.isSelDsToPiKK() >= selectionFlagDs) { + candReduced(hfcReducedCollisionIndex, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToPiKK(candidate)); + } } - } - // tracks information - for (const auto& track : tracks) { - if (!track.isGlobalTrackWoDCA()) { - continue; + // tracks information + for (const auto& track : tracks) { + if (!track.isGlobalTrackWoDCA()) { + continue; + } + assocTrackReduced(hfcReducedCollisionIndex, track.phi(), track.eta(), track.pt()); } - assocTrackReduced(collReduced.lastIndex(), track.phi(), track.eta(), track.pt()); + + collReduced(collision.multFT0M(), collision.posZ()); + hfcReducedCollisionIndex++; } } PROCESS_SWITCH(HfCorrelatorDsHadrons, processDerivedDataDs, "Process derived data Ds", false); + void processDerivedDataDsLastIndex(SelCollisionsWithDs const& collisions, + CandDsData const& candidates, + MyTracksData const& tracks) + { + + for (const auto& collision : collisions) { + auto thisCollId = collision.globalIndex(); + auto candsDsThisColl = candidates.sliceBy(candsDsPerCollision, thisCollId); + auto tracksThisColl = tracks.sliceBy(trackIndicesPerCollision, thisCollId); + + int indexHfcReducedCollision = collReduced.lastIndex() + 1; + + // Ds fill histograms and Ds candidates information stored + for (const auto& candidate : candidates) { + // candidate selected + if (candidate.isSelDsToKKPi() >= selectionFlagDs) { + candReduced(indexHfcReducedCollision, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToKKPi(candidate)); + } else if (candidate.isSelDsToPiKK() >= selectionFlagDs) { + candReduced(indexHfcReducedCollision, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToPiKK(candidate)); + } + } + + // tracks information + for (const auto& track : tracks) { + if (!track.isGlobalTrackWoDCA()) { + continue; + } + assocTrackReduced(indexHfcReducedCollision, track.phi(), track.eta(), track.pt()); + } + + collReduced(collision.multFT0M(), collision.posZ()); + } + } + PROCESS_SWITCH(HfCorrelatorDsHadrons, processDerivedDataDsLastIndex, "Process derived data Ds w lastIndex", false); + // Event Mixing void processDataME(SelCollisionsWithDs const& collisions, CandDsData const& candidates, diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadronsReduced.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadronsReduced.cxx new file mode 100644 index 00000000000..37cf40766f2 --- /dev/null +++ b/PWGHF/HFC/TableProducer/correlatorDsHadronsReduced.cxx @@ -0,0 +1,122 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// \file correlatorDsHadronsReduced.cxx +/// \brief Ds-Hadrons correlator task for ME offline +/// \author Samuele Cattaruzzi + +#include + +#include "CommonConstants/PhysicsConstants.h" +#include "Framework/AnalysisTask.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/runDataProcessing.h" + +#include "PWGHF/HFC/DataModel/CorrelationTables.h" +#include "PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h" + +using namespace o2; +using namespace o2::analysis; +using namespace o2::constants::physics; +using namespace o2::constants::math; +using namespace o2::framework; +using namespace o2::framework::expressions; + +/// Returns deltaPhi value in range [-pi/2., 3.*pi/2], typically used for correlation studies +double getDeltaPhi(double phiHadron, double phiD) +{ + return RecoDecay::constrainAngle(phiHadron - phiD, -PIHalf); +} + +// binning type +using BinningTypeDerived = ColumnBinningPolicy; + +/// Ds-Hadron correlation pair builder - for real data and data-like analysis (i.e. reco-level w/o matching request via MC truth) +struct HfCorrelatorDsHadronsReduced { + Produces entryDsHadronPair; + Produces entryDsHadronRecoInfo; + Produces entryDsHadronGenInfo; + + Configurable fillHistoData{"fillHistoData", true, "Flag for filling histograms in data processes"}; + Configurable numberEventsMixed{"numberEventsMixed", 5, "Number of events mixed in ME process"}; + + SliceCache cache; + + // Preslice tracksPerCol = aod::hf_assoc_track_reduced::hfcRedCollisionId; + Preslice tracksPerCol = aod::hf_candidate_reduced::hfcRedCollisionId; + Preslice candPerCol = aod::hf_candidate_reduced::hfcRedCollisionId; + + ConfigurableAxis zPoolBins{"zPoolBins", {VARIABLE_WIDTH, -10.0, -2.5, 2.5, 10.0}, "z vertex position pools"}; + ConfigurableAxis multPoolBins{"multPoolBins", {VARIABLE_WIDTH, 0., 900., 1800., 6000.}, "event multiplicity pools (FT0M)"}; + ConfigurableAxis binsMultFT0M{"binsMultFT0M", {600, 0., 6000.}, "Multiplicity as FT0M signal amplitude"}; + ConfigurableAxis binsPosZ{"binsPosZ", {100, -10., 10.}, "primary vertex z coordinate"}; + ConfigurableAxis binsPoolBin{"binsPoolBin", {9, 0., 9.}, "PoolBin"}; + + HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject}; + + void init(InitContext&) + { + AxisSpec axisMultFT0M = {binsMultFT0M, "MultiplicityFT0M"}; + AxisSpec axisPosZ = {binsPosZ, "PosZ"}; + AxisSpec axisPoolBin = {binsPoolBin, "PoolBin"}; + + // Histograms for data analysis + if (fillHistoData) { + registry.add("hMultFT0M", "Multiplicity FT0M", {HistType::kTH1F, {axisMultFT0M}}); + registry.add("hZVtx", "z vertex", {HistType::kTH1F, {axisPosZ}}); + registry.add("hDsPoolBin", "Ds candidates pool bin", {HistType::kTH1F, {axisPoolBin}}); + registry.add("hTracksPoolBin", "Particles associated pool bin", {HistType::kTH1F, {axisPoolBin}}); + } + } + + void processDerivedDataME(aod::HfcRedCollisions const& collisions, + aod::DsCandReduceds const& candidates, + aod::AssocTrackReds const& tracks) + { + + BinningTypeDerived corrBinning{{zPoolBins, multPoolBins}, true}; + + auto tracksTuple = std::make_tuple(candidates, tracks); + + Pair pairData{corrBinning, numberEventsMixed, -1, collisions, tracksTuple, &cache}; + + for (const auto& [c1, tracks1, c2, tracks2] : pairData) { + if (tracks1.size() == 0) { + continue; + } + + int poolBin = corrBinning.getBin(std::make_tuple(c2.posZ(), c2.multiplicity())); + int poolBinDs = corrBinning.getBin(std::make_tuple(c1.posZ(), c1.multiplicity())); + registry.fill(HIST("hMultFT0M"), c1.multiplicity()); + registry.fill(HIST("hZVtx"), c1.posZ()); + registry.fill(HIST("hTracksPoolBin"), poolBin); + registry.fill(HIST("hDsPoolBin"), poolBinDs); + + for (const auto& [cand, pAssoc] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { + LOGF(info, "Mixed event tracks pair: (%d, %d) from events (%d, %d), track event: (%d, %d)", cand.index(), pAssoc.index(), c1.index(), c2.index(), cand.hfcRedCollisionId(), pAssoc.hfcRedCollisionId()); + + entryDsHadronPair(getDeltaPhi(pAssoc.phiAssocTrack(), cand.phiCand()), + pAssoc.etaAssocTrack() - cand.etaCand(), + cand.ptCand(), + pAssoc.ptAssocTrack(), + poolBin); + entryDsHadronRecoInfo(cand.invMassDs(), false, false); + entryDsHadronGenInfo(false, false, 0); + } + } + } + PROCESS_SWITCH(HfCorrelatorDsHadronsReduced, processDerivedDataME, "Process Mixed Event Derived Data", true); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc)}; +} diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index 8e67ac22696..1b00c85face 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -958,12 +958,12 @@ struct HfCandidateCreatorXic0Omegac0 { auto charmbaryonChi2OverNdf = kfOmegac0Candidate.chi2GeoOmegac / charmbaryonNDF; kfOmegac0Candidate.chi2MassV0 = kfV0MassConstrained.GetChi2(); - auto v0NDF_m = kfV0MassConstrained.GetNDF(); - auto v0Chi2OverNdf_m = kfOmegac0Candidate.chi2MassV0 / v0NDF_m; + auto v0Ndfm = kfV0MassConstrained.GetNDF(); + auto v0Chi2OverNdfm = kfOmegac0Candidate.chi2MassV0 / v0Ndfm; kfOmegac0Candidate.chi2MassCasc = kfOmegaMassConstrained.GetChi2(); - auto cascNDF_m = kfOmegaMassConstrained.GetNDF(); - auto cascChi2OverNdf_m = kfOmegac0Candidate.chi2MassCasc / cascNDF_m; + auto cascNdfm = kfOmegaMassConstrained.GetNDF(); + auto cascChi2OverNdfm = kfOmegac0Candidate.chi2MassCasc / cascNdfm; // KF topo Chi2 kfOmegac0Candidate.chi2TopoV0ToPv = kfV0ToPv.GetChi2(); @@ -988,17 +988,17 @@ struct HfCandidateCreatorXic0Omegac0 { kfOmegac0Candidate.kfDcaOmegacDau = kfBachPionToOmegaC.GetDistanceFromParticle(kfOmegaToOmegaC); // KF decay length - float DecayLxy_Lam, err_DecayLxy_Lam; - kfV0ToCasc.GetDecayLengthXY(DecayLxy_Lam, err_DecayLxy_Lam); - kfOmegac0Candidate.decayLenXYLambda = DecayLxy_Lam; + float decayLxyLam, errDecayLxyLam; + kfV0ToCasc.GetDecayLengthXY(decayLxyLam, errDecayLxyLam); + kfOmegac0Candidate.decayLenXYLambda = decayLxyLam; - float DecayLxy_Casc, err_DecayLxy_Casc; - kfOmegaToOmegaC.GetDecayLengthXY(DecayLxy_Casc, err_DecayLxy_Casc); - kfOmegac0Candidate.decayLenXYCasc = DecayLxy_Casc; + float decayLxyCasc, errDecayLxyCasc; + kfOmegaToOmegaC.GetDecayLengthXY(decayLxyCasc, errDecayLxyCasc); + kfOmegac0Candidate.decayLenXYCasc = decayLxyCasc; - float DecayLxy_Omegac0, err_DecayLxy_Omegac0; - kfOmegac0ToPv.GetDecayLengthXY(DecayLxy_Omegac0, err_DecayLxy_Omegac0); - kfOmegac0Candidate.decayLenXYOmegac = DecayLxy_Omegac0; + float decayLxyOmegac0, errDecayLxyOmegac0; + kfOmegac0ToPv.GetDecayLengthXY(decayLxyOmegac0, errDecayLxyOmegac0); + kfOmegac0Candidate.decayLenXYOmegac = decayLxyOmegac0; // KF cosPA kfOmegac0Candidate.cosPaV0ToPv = cpaFromKF(kfV0, kfPV); @@ -1086,8 +1086,8 @@ struct HfCandidateCreatorXic0Omegac0 { kfOmegac0Candidate.cosPaV0ToCasc, kfOmegac0Candidate.cosPaCascToOmegac, kfOmegac0Candidate.cosPaXYV0ToCasc, kfOmegac0Candidate.cosPaXYCascToOmegac, kfOmegac0Candidate.rapOmegac, kfOmegac0Candidate.ptPiFromOmegac, kfOmegac0Candidate.ptOmegac, kfOmegac0Candidate.cosThetaStarPiFromOmegac, - v0NDF, cascNDF, charmbaryonNDF, v0NDF_m, cascNDF_m, - v0Chi2OverNdf, cascChi2OverNdf, charmbaryonChi2OverNdf, v0Chi2OverNdf_m, cascChi2OverNdf_m); + v0NDF, cascNDF, charmbaryonNDF, v0Ndfm, cascNdfm, + v0Chi2OverNdf, cascChi2OverNdf, charmbaryonChi2OverNdf, v0Chi2OverNdfm, cascChi2OverNdfm); } // loop over LF Cascade-bachelor candidates } // end of run function @@ -1140,7 +1140,8 @@ struct HfCandidateCreatorXic0Omegac0 { auto trackParCovV0Dau0 = getTrackParCov(trackV0Dau0); auto trackParCovV0Dau1 = getTrackParCov(trackV0Dau1); // pion <- casc TrackParCov - auto XiDauChargedTrackParCov = getTrackParCov(trackCascDauCharged); + auto xiDauChargedTrackParCov = getTrackParCov(trackCascDauCharged); + // convert tracks into KFParticle object KFPTrack kfTrack0 = createKFPTrackFromTrack(trackV0Dau0); KFPTrack kfTrack1 = createKFPTrackFromTrack(trackV0Dau1); @@ -1202,12 +1203,12 @@ struct HfCandidateCreatorXic0Omegac0 { //__________________________________________ //*>~<* step 2 : reconstruct cascade(Xi) with KF - const KFParticle* XiDaugthers[2] = {&kfBachPion, &kfV0}; + const KFParticle* xiDaugthers[2] = {&kfBachPion, &kfV0}; // construct cascade KFParticle kfXi; kfXi.SetConstructMethod(kfConstructMethod); try { - kfXi.Construct(XiDaugthers, 2); + kfXi.Construct(xiDaugthers, 2); } catch (std::runtime_error& e) { LOG(debug) << "Failed to construct Xi from V0 and bachelor track: " << e.what(); continue; @@ -1239,13 +1240,13 @@ struct HfCandidateCreatorXic0Omegac0 { // Create KF charm bach Pion from track KFPTrack kfTrackBachPion = createKFPTrackFromTrack(trackCharmBachelor); KFParticle kfCharmBachPion(kfTrackBachPion, kPiPlus); - const KFParticle* XiC0Daugthers[2] = {&kfCharmBachPion, &kfXi}; + const KFParticle* xiC0Daugthers[2] = {&kfCharmBachPion, &kfXi}; // construct XiC0 KFParticle kfXiC0; kfXiC0.SetConstructMethod(kfConstructMethod); try { - kfXiC0.Construct(XiC0Daugthers, 2); + kfXiC0.Construct(xiC0Daugthers, 2); } catch (std::runtime_error& e) { LOG(debug) << "Failed to construct XiC0 from Cascade and bachelor pion track: " << e.what(); continue; @@ -1293,8 +1294,8 @@ struct HfCandidateCreatorXic0Omegac0 { auto trackParVarCharmBachelor = getTrackParCovFromKFP(kfCharmBachPionToXiC, o2::track::PID::Pion, -bachCharge); // chrambaryon bach pion trackParVarCharmBachelor.setAbsCharge(1); - XiDauChargedTrackParCov = getTrackParCovFromKFP(kfBachPionToXi, o2::track::PID::Pion, bachCharge); // Cascade bach pion - XiDauChargedTrackParCov.setAbsCharge(1); + xiDauChargedTrackParCov = getTrackParCovFromKFP(kfBachPionToXi, o2::track::PID::Pion, bachCharge); // Cascade bach pion + xiDauChargedTrackParCov.setAbsCharge(1); o2::track::TrackParCov trackCasc = getTrackParCovFromKFP(kfXiToXiC, kfXiToXiC.GetPDG(), bachCharge); trackCasc.setAbsCharge(1); @@ -1342,7 +1343,7 @@ struct HfCandidateCreatorXic0Omegac0 { gpu::gpustd::array impactParameterKaFromCasc; o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParCovV0Dau0, 2.f, matCorr, &impactParameterV0Dau0); o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParCovV0Dau1, 2.f, matCorr, &impactParameterV0Dau1); - o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, XiDauChargedTrackParCov, 2.f, matCorr, &impactParameterKaFromCasc); + o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, xiDauChargedTrackParCov, 2.f, matCorr, &impactParameterKaFromCasc); float dcaxyV0Dau0 = impactParameterV0Dau0[0]; float dcaxyV0Dau1 = impactParameterV0Dau1[0]; float dcaxyCascBachelor = impactParameterKaFromCasc[0]; @@ -1388,12 +1389,12 @@ struct HfCandidateCreatorXic0Omegac0 { auto charmbaryonChi2OverNdf = kfXic0Candidate.chi2GeoXic / charmbaryonNDF; kfXic0Candidate.chi2MassV0 = kfV0MassConstrained.GetChi2(); - auto v0NDF_m = kfV0MassConstrained.GetNDF(); - auto v0Chi2OverNdf_m = kfXic0Candidate.chi2MassV0 / v0NDF_m; + auto v0Ndfm = kfV0MassConstrained.GetNDF(); + auto v0Chi2OverNdfm = kfXic0Candidate.chi2MassV0 / v0Ndfm; kfXic0Candidate.chi2MassCasc = kfXiMassConstrained.GetChi2(); - auto cascNDF_m = kfXiMassConstrained.GetNDF(); - auto cascChi2OverNdf_m = kfXic0Candidate.chi2MassCasc / cascNDF_m; + auto cascNdfm = kfXiMassConstrained.GetNDF(); + auto cascChi2OverNdfm = kfXic0Candidate.chi2MassCasc / cascNdfm; // KF topo Chi2 kfXic0Candidate.chi2TopoV0ToPv = kfV0ToPv.GetChi2(); @@ -1418,17 +1419,17 @@ struct HfCandidateCreatorXic0Omegac0 { kfXic0Candidate.kfDcaXicDau = kfCharmBachPionToXiC.GetDistanceFromParticle(kfXiToXiC); // KF decay length - float DecayLxy_Lam, err_DecayLxy_Lam; - kfV0ToCasc.GetDecayLengthXY(DecayLxy_Lam, err_DecayLxy_Lam); - kfXic0Candidate.decayLenXYLambda = DecayLxy_Lam; + float decayLxyLam, errDecayLxyLam; + kfV0ToCasc.GetDecayLengthXY(decayLxyLam, errDecayLxyLam); + kfXic0Candidate.decayLenXYLambda = decayLxyLam; - float DecayLxy_Casc, err_DecayLxy_Casc; - kfXiToXiC.GetDecayLengthXY(DecayLxy_Casc, err_DecayLxy_Casc); - kfXic0Candidate.decayLenXYCasc = DecayLxy_Casc; + float decayLxyCasc, errDecayLxyCasc; + kfXiToXiC.GetDecayLengthXY(decayLxyCasc, errDecayLxyCasc); + kfXic0Candidate.decayLenXYCasc = decayLxyCasc; - float DecayLxy_Xic0, err_DecayLxy_Xic0; - kfXic0ToPv.GetDecayLengthXY(DecayLxy_Xic0, err_DecayLxy_Xic0); - kfXic0Candidate.decayLenXYXic = DecayLxy_Xic0; + float decayLxyXic0, errDecayLxyXic0; + kfXic0ToPv.GetDecayLengthXY(decayLxyXic0, errDecayLxyXic0); + kfXic0Candidate.decayLenXYXic = decayLxyXic0; // KF cosPA kfXic0Candidate.cosPaV0ToPv = cpaFromKF(kfV0, kfPV); @@ -1516,8 +1517,8 @@ struct HfCandidateCreatorXic0Omegac0 { kfXic0Candidate.cosPaV0ToCasc, kfXic0Candidate.cosPaCascToXic, kfXic0Candidate.cosPaXYV0ToCasc, kfXic0Candidate.cosPaXYCascToXic, kfXic0Candidate.rapXic, kfXic0Candidate.ptPiFromXic, kfXic0Candidate.ptXic, kfXic0Candidate.cosThetaStarPiFromXic, - v0NDF, cascNDF, charmbaryonNDF, v0NDF_m, cascNDF_m, - v0Chi2OverNdf, cascChi2OverNdf, charmbaryonChi2OverNdf, v0Chi2OverNdf_m, cascChi2OverNdf_m); + v0NDF, cascNDF, charmbaryonNDF, v0Ndfm, cascNdfm, + v0Chi2OverNdf, cascChi2OverNdf, charmbaryonChi2OverNdf, v0Chi2OverNdfm, cascChi2OverNdfm); } // loop over LF Cascade-bachelor candidates } diff --git a/PWGHF/TableProducer/candidateSelectorXic0ToXiPiKf.cxx b/PWGHF/TableProducer/candidateSelectorXic0ToXiPiKf.cxx index f83192eb3e8..46b4169d564 100644 --- a/PWGHF/TableProducer/candidateSelectorXic0ToXiPiKf.cxx +++ b/PWGHF/TableProducer/candidateSelectorXic0ToXiPiKf.cxx @@ -9,7 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file candidateSelectorToXiPi.cxx +/// \file candidateSelectorXic0ToXiPiKf.cxx /// \brief Xic0 → Xi Pi selection task /// \author Ran Tu , Fudan University @@ -29,11 +29,11 @@ using namespace o2::aod; using namespace o2::framework; using namespace o2::analysis; -enum pidInfoStored { - kPiFromLam = 0, - kPrFromLam, - kPiFromCasc, - kPiFromCharm +enum PidInfoStored { + KPiFromLam = 0, + KPrFromLam, + KPiFromCasc, + KPiFromCharm }; /// Struct for applying Xic0 -> Xi pi selection cuts @@ -407,28 +407,28 @@ struct HfCandidateSelectorXic0ToXiPiKf { } if (trackPiFromLam.hasTPC()) { - SETBIT(infoTpcStored, kPiFromLam); + SETBIT(infoTpcStored, KPiFromLam); } if (trackPrFromLam.hasTPC()) { - SETBIT(infoTpcStored, kPrFromLam); + SETBIT(infoTpcStored, KPiFromLam); } if (trackPiFromCasc.hasTPC()) { - SETBIT(infoTpcStored, kPiFromCasc); + SETBIT(infoTpcStored, KPiFromCasc); } if (trackPiFromCharm.hasTPC()) { - SETBIT(infoTpcStored, kPiFromCharm); + SETBIT(infoTpcStored, KPiFromCharm); } if (trackPiFromLam.hasTOF()) { - SETBIT(infoTofStored, kPiFromLam); + SETBIT(infoTofStored, KPiFromLam); } if (trackPrFromLam.hasTOF()) { - SETBIT(infoTofStored, kPrFromLam); + SETBIT(infoTofStored, KPiFromLam); } if (trackPiFromCasc.hasTOF()) { - SETBIT(infoTofStored, kPiFromCasc); + SETBIT(infoTofStored, KPiFromCasc); } if (trackPiFromCharm.hasTOF()) { - SETBIT(infoTofStored, kPiFromCharm); + SETBIT(infoTofStored, KPiFromCharm); } if (usePidTpcOnly) { diff --git a/PWGHF/TableProducer/treeCreatorXic0ToXiPiKf.cxx b/PWGHF/TableProducer/treeCreatorXic0ToXiPiKf.cxx index 7cbc71277e5..1e1bd4e359b 100644 --- a/PWGHF/TableProducer/treeCreatorXic0ToXiPiKf.cxx +++ b/PWGHF/TableProducer/treeCreatorXic0ToXiPiKf.cxx @@ -9,7 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file treeCreatorToXiPi.cxx +/// \file treeCreatorXic0ToXiPiKf.cxx /// \brief Writer of the xic0 to Xi Pi candidates in the form of flat tables to be stored in TTrees. /// In this file are defined and filled the output tables /// diff --git a/PWGHF/Tasks/taskPidStudies.cxx b/PWGHF/Tasks/taskPidStudies.cxx index 8b905524fb0..ca9947202d0 100644 --- a/PWGHF/Tasks/taskPidStudies.cxx +++ b/PWGHF/Tasks/taskPidStudies.cxx @@ -49,8 +49,8 @@ DECLARE_SOA_COLUMN(MassAntiLambda, massAntiLambda, float); //! Candidate mass DECLARE_SOA_COLUMN(Pt, pt, float); //! Transverse momentum of the candidate (GeV/c) DECLARE_SOA_COLUMN(PtPos, ptPos, float); //! Transverse momentum of positive track (GeV/c) DECLARE_SOA_COLUMN(PtNeg, ptNeg, float); //! Transverse momentum of negative track (GeV/c) -DECLARE_SOA_COLUMN(TpcInnerParPos, tpcInnerParPos, float); //! Momentum of positive track at inner wall of TPC (GeV/c) -DECLARE_SOA_COLUMN(TpcInnerParNeg, tpcInnerParNeg, float); //! Momentum of negative track at inner wall of TPC (GeV/c) +DECLARE_SOA_COLUMN(PtPosTpc, ptPosTpc, float); //! Transverse Momentum of positive track at inner wall of TPC (GeV/c) +DECLARE_SOA_COLUMN(PtNegTpc, ptNegTpc, float); //! Transverse Momentum of negative track at inner wall of TPC (GeV/c) DECLARE_SOA_COLUMN(Radius, radius, float); //! Radius DECLARE_SOA_COLUMN(Cpa, cpa, float); //! Cosine of pointing angle DECLARE_SOA_COLUMN(DcaV0Daughters, dcaV0Daughters, float); //! DCA between V0 daughters @@ -69,8 +69,8 @@ DECLARE_SOA_COLUMN(QtArm, qtArm, float); //! Armenteros Qt // Cascades DECLARE_SOA_COLUMN(MassOmega, massOmega, float); //! Candidate mass DECLARE_SOA_COLUMN(MassXi, massXi, float); //! Candidate mass -DECLARE_SOA_COLUMN(BachPt, bachPt, float); //! Transverse momentum of the bachelor (GeV/c) -DECLARE_SOA_COLUMN(TpcInnerParBach, tpcInnerParBach, float); //! Transverse momentum of the bachelor (GeV/c) +DECLARE_SOA_COLUMN(PtBach, ptBach, float); //! Transverse momentum of the bachelor (GeV/c) +DECLARE_SOA_COLUMN(PtBachTpc, ptBachTpc, float); //! Transverse momentum of the bachelor at inner wall of TPC (GeV/c) DECLARE_SOA_COLUMN(MLambda, mLambda, float); //! Daughter lambda mass (GeV/c^2) DECLARE_SOA_COLUMN(V0cosPA, v0cosPA, float); //! V0 CPA DECLARE_SOA_COLUMN(CascCosPa, cascCosPa, float); //! Cascade CPA @@ -92,8 +92,8 @@ DECLARE_SOA_TABLE(PidV0s, "AOD", "PIDV0S", //! Table with PID information pid_studies::Pt, pid_studies::PtPos, pid_studies::PtNeg, - pid_studies::TpcInnerParPos, - pid_studies::TpcInnerParNeg, + pid_studies::PtPosTpc, + pid_studies::PtNegTpc, pid_studies::Radius, pid_studies::Cpa, pid_studies::DcaV0Daughters, @@ -117,8 +117,8 @@ DECLARE_SOA_TABLE(PidV0s, "AOD", "PIDV0S", //! Table with PID information DECLARE_SOA_TABLE(PidCascades, "AOD", "PIDCASCADES", //! Table with PID information pid_studies::MassOmega, pid_studies::Pt, - pid_studies::BachPt, - pid_studies::TpcInnerParBach, + pid_studies::PtBach, + pid_studies::PtBachTpc, pid_studies::Radius, pid_studies::MLambda, pid_studies::V0cosPA, @@ -146,6 +146,10 @@ struct HfTaskPidStudies { Configurable massOmegaMin{"massOmegaMin", 1.5, "Minimum mass for omega"}; Configurable massOmegaMax{"massOmegaMax", 1.8, "Maximum mass for omega"}; Configurable radiusMax{"radiusMax", 2.3, "Maximum decay radius (cm)"}; + Configurable cosPaMin{"cosPaMin", 0.98, "Minimum cosine of pointing angle"}; + Configurable dcaV0DaughtersMax{"dcaV0DaughtersMax", 0.2, "Maximum DCA among the V0 daughters (cm)"}; + Configurable dcaV0ToPvMax{"dcaV0ToPvMax", 0.2, "Maximum DCA of the V0 from the primary vertex (cm)"}; + Configurable cosPaV0Min{"cosPaV0Min", 0.95, "Minimum cosine of pointing angle for V0 stemming from cascade decays"}; Configurable qtArmenterosMinForK0{"qtArmenterosMinForK0", 0.12, "Minimum Armenteros' qt for K0"}; Configurable qtArmenterosMaxForLambda{"qtArmenterosMaxForLambda", 0.12, "Minimum Armenteros' qt for (anti)Lambda"}; Configurable downSampleBkgFactor{"downSampleBkgFactor", 1., "Fraction of candidates to keep"}; @@ -184,8 +188,8 @@ struct HfTaskPidStudies { candidate.pt(), posTrack.pt(), negTrack.pt(), - posTrack.tpcInnerParam(), - negTrack.tpcInnerParam(), + posTrack.tpcInnerParam() / std::cosh(candidate.positiveeta()), + negTrack.tpcInnerParam() / std::cosh(candidate.negativeeta()), candidate.v0radius(), candidate.v0cosPA(), candidate.dcaV0daughters(), @@ -211,7 +215,7 @@ struct HfTaskPidStudies { candidate.mOmega(), candidate.pt(), candidate.bachelorpt(), - bachTrack.tpcInnerParam(), + bachTrack.tpcInnerParam() / std::cosh(candidate.bacheloreta()), candidate.cascradius(), candidate.mLambda(), candidate.v0cosPA(coll.posX(), coll.posY(), coll.posZ()), @@ -282,6 +286,15 @@ struct HfTaskPidStudies { if (v0.v0radius() > radiusMax) { return false; } + if (v0.v0cosPA() < cosPaMin) { + return false; + } + if (v0.dcaV0daughters() > dcaV0DaughtersMax) { + return false; + } + if (v0.dcav0topv() > dcaV0ToPvMax) { + return false; + } return true; } @@ -298,6 +311,15 @@ struct HfTaskPidStudies { if (v0.v0radius() > radiusMax) { return false; } + if (v0.v0cosPA() < cosPaMin) { + return false; + } + if (v0.dcaV0daughters() > dcaV0DaughtersMax) { + return false; + } + if (v0.dcav0topv() > dcaV0ToPvMax) { + return false; + } return true; } @@ -313,6 +335,19 @@ struct HfTaskPidStudies { if (casc.cascradius() > radiusMax) { return false; } + const auto& coll = casc.template collision_as(); + if (casc.casccosPA(coll.posX(), coll.posY(), coll.posZ()) < cosPaMin) { + return false; + } + if (casc.dcaV0daughters() > dcaV0DaughtersMax) { + return false; + } + if (casc.dcav0topv(coll.posX(), coll.posY(), coll.posZ()) > dcaV0ToPvMax) { + return false; + } + if (casc.v0cosPA(coll.posX(), coll.posY(), coll.posZ()) < cosPaV0Min) { + return false; + } return true; } diff --git a/PWGJE/TableProducer/derivedDataProducerDummy.cxx b/PWGJE/TableProducer/derivedDataProducerDummy.cxx index da60109d94f..c5a68c7c6b8 100644 --- a/PWGJE/TableProducer/derivedDataProducerDummy.cxx +++ b/PWGJE/TableProducer/derivedDataProducerDummy.cxx @@ -55,6 +55,7 @@ struct JetDerivedDataProducerDummyTask { Produces bplusParsTable; Produces bplusParExtrasTable; Produces bplusParD0sTable; + Produces bplusSelsTable; Produces bplusMlsTable; Produces bplusMlD0sTable; Produces bplusMcsTable; diff --git a/PWGJE/TableProducer/derivedDataProducerDummyD0.cxx b/PWGJE/TableProducer/derivedDataProducerDummyD0.cxx index c28b0e44dfe..4cbbfdeedea 100644 --- a/PWGJE/TableProducer/derivedDataProducerDummyD0.cxx +++ b/PWGJE/TableProducer/derivedDataProducerDummyD0.cxx @@ -44,6 +44,7 @@ struct JetDerivedDataProducerDummyD0Task { Produces bplusParsTable; Produces bplusParExtrasTable; Produces bplusParD0sTable; + Produces bplusSelsTable; Produces bplusMlsTable; Produces bplusMlD0sTable; Produces bplusMcsTable; diff --git a/PWGJE/TableProducer/derivedDataProducerDummyDielectron.cxx b/PWGJE/TableProducer/derivedDataProducerDummyDielectron.cxx index 9df74703902..c24cf13bd41 100644 --- a/PWGJE/TableProducer/derivedDataProducerDummyDielectron.cxx +++ b/PWGJE/TableProducer/derivedDataProducerDummyDielectron.cxx @@ -55,6 +55,7 @@ struct JetDerivedDataProducerDummyDielectronTask { Produces bplusParsTable; Produces bplusParExtrasTable; Produces bplusParD0sTable; + Produces bplusSelsTable; Produces bplusMlsTable; Produces bplusMlD0sTable; Produces bplusMcsTable; diff --git a/PWGJE/TableProducer/derivedDataProducerDummyLc.cxx b/PWGJE/TableProducer/derivedDataProducerDummyLc.cxx index 5550e97a9ae..9913e1da37f 100644 --- a/PWGJE/TableProducer/derivedDataProducerDummyLc.cxx +++ b/PWGJE/TableProducer/derivedDataProducerDummyLc.cxx @@ -44,6 +44,7 @@ struct JetDerivedDataProducerDummyLcTask { Produces bplusParsTable; Produces bplusParExtrasTable; Produces bplusParD0sTable; + Produces bplusSelsTable; Produces bplusMlsTable; Produces bplusMlD0sTable; Produces bplusMcsTable; diff --git a/PWGJE/Tasks/CMakeLists.txt b/PWGJE/Tasks/CMakeLists.txt index 4582452a7ab..e5f4c42f1d3 100644 --- a/PWGJE/Tasks/CMakeLists.txt +++ b/PWGJE/Tasks/CMakeLists.txt @@ -34,6 +34,10 @@ o2physics_add_dpl_workflow(emc-tmmonitor SOURCES emcTmMonitor.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2::EMCALBase O2::EMCALCalib O2Physics::AnalysisCore COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(hadron-photon-correlation + SOURCES hadronPhotonCorrelation.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(mc-generator-studies SOURCES mcGeneratorStudies.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2::EMCALBase O2::EMCALCalib O2Physics::AnalysisCore @@ -168,6 +172,10 @@ o2physics_add_dpl_workflow(jet-substructure-bplus SOURCES jetHadronRecoil.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(recoil-jets + SOURCES recoilJets.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore + COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(jet-nsubjettiness SOURCES nsubjettiness.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore diff --git a/PWGJE/Tasks/hadronPhotonCorrelation.cxx b/PWGJE/Tasks/hadronPhotonCorrelation.cxx new file mode 100644 index 00000000000..c7198bf8414 --- /dev/null +++ b/PWGJE/Tasks/hadronPhotonCorrelation.cxx @@ -0,0 +1,803 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// +/// \file hadronPhotonCorrelation.cxx +/// \author Peter Stratmann +/// \brief This code loops over JetTracks to extract pt and angular information +/// for hadrons and photons to compute angular correlations +/// + +#include +#include + +#include "Framework/ASoA.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/Expressions.h" +#include "Framework/O2DatabasePDGPlugin.h" +#include "Framework/runDataProcessing.h" +#include "Framework/HistogramSpec.h" +#include "Framework/Configurable.h" + +#include "Common/Core/RecoDecay.h" +#include "Common/Core/TrackSelection.h" +#include "Common/Core/TrackSelectionDefaults.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "Common/DataModel/PIDResponse.h" +#include "Common/DataModel/Centrality.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/Core/trackUtilities.h" +#include "CommonConstants/PhysicsConstants.h" +#include "CommonConstants/MathConstants.h" + +#include "PWGJE/DataModel/Jet.h" +#include "PWGJE/DataModel/JetReducedData.h" +#include "PWGJE/Core/JetUtilities.h" + +#include "PWGEM/PhotonMeson/DataModel/gammaTables.h" +#include "PWGEM/PhotonMeson/Utils/PCMUtilities.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; +using namespace o2::constants::physics; +using namespace o2::constants::math; + +struct HadronPhotonCorrelation { + + Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; + Configurable trackSelections{"trackSelections", "globalTracks", "set track selections"}; + + Configurable etaMax{"etaMax", 0.8, "maximum eta cut"}; + + AxisSpec axisPhi = {72, 0., TwoPI, "#phi"}; // Axis for phi distribution + AxisSpec axisDeltaPhi = {72, -PIHalf, 3 * PIHalf, "#Delta #phi"}; // Axis for Delta phi in correlations + AxisSpec axisDeltaPhiDecay = {100, -.5, .5, "#Delta #phi"}; // Axis for Delta phi between neutral hadrons and decay photons + AxisSpec axisEta = {40, -.8, .8, "#eta"}; // Axis for eta distribution + AxisSpec axisDeltaEta = {80, -1.6, 1.6, "#Delta #eta"}; // Axis for Delta eta in correlations + AxisSpec axisDeltaEtaDecay = {100, -.6, .6, "#Delta #eta"}; // Axis for Delta eta between neutral hadrons and decay photons + ConfigurableAxis axisPtTrig = {"axisPtTrig", + {VARIABLE_WIDTH, + 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 9.0f, 11.0f, 15.0f, 20.0f}, + "p_{T, trig} [GeV]"}; // Axis for trigger particle pt distribution + ConfigurableAxis axisPtAssoc = {"axisPtAssoc", + {VARIABLE_WIDTH, + 0.2, 0.5, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 9.0f, 11.0f, 15.0f}, + "p_{T, assoc} [GeV]"}; // Axis for associated particle pt distribution + AxisSpec axisDeltaPt = {200, 0., 1.2, "#Delta p_T"}; // Axis for pt ratio between neutral hadrons and decay photons + AxisSpec axisPid = {7, -1.5, 5.5, "pid"}; // Axis for PID of neutral hadrons + AxisSpec axisMult = {100, 0., 99., "N_{ch}"}; // Axis for mutplipicity + + float ptMinTrig; + float ptMaxTrig; + float ptMinAssoc; + float ptMaxAssoc; + + HistogramRegistry registry{"histogram registry"}; + + // Particle ids for storing neutral hadrons + std::map pidCodes = { + {2212, -1}, + {1, -1}, + {2, -1}, + {3, -1}, + {4, -1}, + {5, -1}, + {6, -1}, + {21, -1}, // Protons, quarks, gluons (direct) + {111, 1}, // pi0 + {221, 2}, // eta + {223, 3}, // eta' + {331, 4}, // phi + {333, 5}}; // omega + + Service pdg; + + // Calculate difference between two azimuthal angles, projecting into range [lowerPhi, lowerPhi + pi/2] + float calculateDelta(float phi1, float phi2, float lowerPhi) + { + float dphi = fmod((phi1 - phi2) + 3 * PI, TwoPI) - PI; + dphi = RecoDecay::constrainAngle(dphi, lowerPhi); + return dphi; + } + + int eventSelection = -1; + int trackSelection = -1; + + void init(o2::framework::InitContext&) + { + ptMinTrig = axisPtTrig->at(1); + ptMaxTrig = axisPtTrig->back(); + ptMinAssoc = axisPtAssoc->at(1); + ptMaxAssoc = axisPtAssoc->back(); + + eventSelection = jetderiveddatautilities::initialiseEventSelection(static_cast(eventSelections)); + trackSelection = jetderiveddatautilities::initialiseTrackSelection(static_cast(trackSelections)); + + // Generated histograms + // Triggers + registry.add("generated/triggers/hTrigMultGen", "Generated Trigger Multiplicity", kTH1F, {axisMult}); + registry.add("generated/triggers/hTrigSpectrumGen", "Generated Trigger Spectrum", kTHnSparseF, {axisPtTrig, axisEta, axisPhi}); + + // Hadrons + registry.add("generated/hadrons/hHadronCorrelGen", "Generated Trigger-Hadron Correlation", kTHnSparseF, {axisPtTrig, axisPtAssoc, axisDeltaEta, axisDeltaPhi}); + registry.add("generated/hadrons/hHadronMultGen", "Generated Hadron Multiplicity", kTH1F, {axisMult}); + registry.add("generated/hadrons/hHadronSpectrumGen", "Generated Hadron Spectrum", kTHnSparseF, {axisPtAssoc, axisEta, axisPhi}); + + // Photons + registry.add("generated/photons/hPhotonCorrelGen", "Generated Trigger-Photon Correlation", kTHnSparseF, {axisPtTrig, axisPtAssoc, axisDeltaEta, axisDeltaPhi, axisPid}); + registry.add("generated/photons/hPhotonMultGen", "Generated Photon Multiplicity", kTH1F, {axisMult}); + registry.add("generated/photons/hPhotonSpectrumGen", "Generated Photon Spectrum", kTHnSparseF, {axisPtAssoc, axisEta, axisPhi, axisPid}); + + // Charged pions + registry.add("generated/charged/hPionCorrelGen", "Generated Trigger-Pion Correlation", kTHnSparseF, {axisPtTrig, axisPtAssoc, axisDeltaEta, axisDeltaPhi}); + registry.add("generated/charged/hPionMultGen", "Generated Pion Multiplicity", kTH1F, {axisMult}); + registry.add("generated/charged/hPionSpectrumGen", "Generated Pion Spectrum", kTHnSparseF, {axisPtAssoc, axisEta, axisPhi}); + + ////Neutral particles + registry.add("generated/neutral/hNeutralCorrelGen", "Generated Trigger-Neutral Hadron Correlation", kTHnSparseF, {axisPtTrig, axisPtAssoc, axisDeltaEta, axisDeltaPhi, axisPid}); + registry.add("generated/neutral/hNeutralMultGen", "Generated Neutral Hadron Multiplicity", kTH1F, {axisMult}); + registry.add("generated/neutral/hNeutralSpectrumGen", "Generated Neutral Hadron Spectrum", kTHnSparseF, {axisPtAssoc, axisEta, axisPhi, axisPid}); // Particle ID of neutral hadrons + registry.add("generated/neutral/hNeutralDecayGen", "Generated Neutral Hadron-Decay Photon Correlation", kTHnSparseF, {axisPtAssoc, axisDeltaPt, axisDeltaEtaDecay, axisDeltaPhiDecay, axisPid}); // Correlation with decay photons + + // Reconstructed histograms + // Triggers + registry.add("reconstructed/triggers/hTrigMultReco", "Reconstructed Trigger Multiplicity", kTH1F, {axisMult}); + registry.add("reconstructed/triggers/hTrigSpectrumReco", "Reconstructed Trigger Spectrum", kTHnSparseF, {axisPtTrig, axisEta, axisPhi}); + + // Hadrons + registry.add("reconstructed/hadrons/hHadronCorrelReco", "Reconstructed Trigger-Hadron Correlation", kTHnSparseF, {axisPtTrig, axisPtAssoc, axisDeltaEta, axisDeltaPhi}); + registry.add("reconstructed/hadrons/hHadronMultReco", "Reconstructed Hadron Multiplicity", kTH1F, {axisMult}); + registry.add("reconstructed/hadrons/hHadronSpectrumReco", "Reconstructed Hadron Spectrum", kTHnSparseF, {axisPtAssoc, axisEta, axisPhi}); + registry.add("reconstructed/hadrons/hHadronPtPrimReco", "Reconstructed Primaries Spectrum", kTH1F, {axisPtAssoc}); // Primary hadron spectrum + registry.add("reconstructed/hadrons/hHadronPtSecReco", "Reconstructed Secondaries Spectrum", kTH1F, {axisPtAssoc}); // Secondary hadron spectrum + + // Photons + registry.add("reconstructed/photons/hPhotonCorrelReco", "Reconstructed Trigger-Photon Correlation", kTHnSparseF, {axisPtTrig, axisPtAssoc, axisDeltaEta, axisDeltaPhi}); + registry.add("reconstructed/photons/hPhotonMultReco", "Reconstructed Photon Multiplicity", kTH1F, {axisMult}); + registry.add("reconstructed/photons/hPhotonSpectrumReco", "Reconstructed Photon Spectrum", kTHnSparseF, {axisPtAssoc, axisEta, axisPhi}); + + // Charged Pions + registry.add("reconstructed/charged/hPionCorrelReco", "Reconstructed Trigger-Pion Correlation", kTHnSparseF, {axisPtTrig, axisPtAssoc, axisDeltaEta, axisDeltaPhi}); + registry.add("reconstructed/charged/hPionMultReco", "Reconstructed Pion Multiplicity", kTH1F, {axisMult}); + registry.add("reconstructed/charged/hPionSpectrumReco", "Reconstructed Pion Spectrum", kTHnSparseF, {axisPtAssoc, axisEta, axisPhi}); + } + + // To check if object has has_mcParticle() (i.e. is MC Track or data track) + template + struct HasHasMcParticle { + template + static auto test(U* ptr) -> decltype(ptr->has_mcParticle(), std::true_type{}); + static std::false_type test(...); + static constexpr bool Value = decltype(test(std::declval()))::value; + }; + + // Initialize track + template + bool initTrack(const T& track) + { + + if constexpr (HasHasMcParticle::Value) { + if (!track.has_mcParticle()) { + return false; + } + } + + if (std::abs(track.eta()) > etaMax) { + return false; + } + + if (track.pt() < ptMinAssoc || track.pt() > ptMaxAssoc) { + return false; + } + + return true; + } + + // Initialize particle + template + bool initParticle(const T& particle, bool checkIsPrimary = true) + { + + if (checkIsPrimary && !particle.isPhysicalPrimary()) { + return false; + } + + if (std::abs(particle.eta()) > etaMax) { + return false; + } + + if (particle.pt() < ptMinAssoc || particle.pt() > ptMaxAssoc) { + return false; + } + + return true; + } + + // Initialize trigger tracks + template + bool initTrig(const T& track) + { + if constexpr (HasHasMcParticle::Value) { + if (!track.has_mcParticle()) { + return false; + } + } + + if (std::abs(track.eta()) > etaMax) { + return false; + } + + if (track.pt() < ptMinTrig || track.pt() > ptMaxTrig) { + return false; + } + + return true; + } + + // Initialize trigger particles (charged) + template + bool initTrigParticle(const T& particle) + { + if (!particle.isPhysicalPrimary()) { + return false; + } + + auto pdgParticle = pdg->GetParticle(particle.pdgCode()); + if (!pdgParticle || pdgParticle->Charge() == 0.) { + return false; + } + + if (std::abs(particle.eta()) > etaMax) { + return false; + } + + if (particle.pt() < ptMinTrig || particle.pt() > ptMaxTrig) { + return false; + } + + return true; + } + + // Initialize V0s + template + bool initV0(TV0 const& v0) + { + auto pos = v0.template posTrack_as(); + auto neg = v0.template negTrack_as(); + if (!initV0leg(pos) || !initV0leg(neg)) { + return false; + } + + return true; + } + + template + bool initV0leg(TTrack const& track) + { + if (!initTrack(track)) { + return false; + } + + if (!track.hasTPC()) { + return false; + } + + if (track.tpcNClsCrossedRows() < 70) { + return false; + } + + if (track.tpcCrossedRowsOverFindableCls() < 0.8) { + return false; + } + + return true; + } + + /**************************************************************************************************** + ************************************************ TRIGGER ******************************************** + ****************************************************************************************************/ + + /********************************************** DATA ***********************************************/ + + void processTrigsReco(JCollision const& collision, + JTracks const& tracks) + { + if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) { + return; + } + + int nTrigs = 0; + for (const auto& track : tracks) { + if (!jetderiveddatautilities::selectTrack(track, trackSelection)) { + continue; + } + + if (!initTrig(track)) { + continue; + } + registry.fill(HIST("reconstructed/triggers/hTrigSpectrumReco"), track.pt(), track.eta(), track.phi()); + nTrigs++; + } + registry.fill(HIST("reconstructed/triggers/hTrigMultReco"), nTrigs); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processTrigsReco, "trigger particle properties", true); + + /*********************************************** MC ************************************************/ + + void processTrigsMCReco(JCollision const& collision, + Join const& tracks, + JMcParticles const&) + { + if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) { + return; + } + + int nTrigs = 0; + for (const auto& track : tracks) { + if (!jetderiveddatautilities::selectTrack(track, trackSelection)) { + continue; + } + + if (!initTrig(track)) { + continue; + } + registry.fill(HIST("reconstructed/triggers/hTrigSpectrumReco"), track.pt(), track.eta(), track.phi()); + nTrigs++; + } + registry.fill(HIST("reconstructed/triggers/hTrigMultReco"), nTrigs); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processTrigsMCReco, "trigger particle mc properties", true); + + void processTrigsMCGen(JMcCollision const&, + JMcParticles const& particles) + { + + int nTrigs = 0; + for (const auto& particle : particles) { + if (!initTrigParticle(particle)) { + continue; + } + registry.fill(HIST("generated/triggers/hTrigSpectrumGen"), particle.pt(), particle.eta(), particle.phi()); + nTrigs++; + } + registry.fill(HIST("generated/triggers/hTrigMultGen"), nTrigs); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processTrigsMCGen, "trigger particle mc properties", true); + + /**************************************************************************************************** + ********************************************** PHOTONS ********************************************** + ****************************************************************************************************/ + + /********************************************** DATA ***********************************************/ + using MyTracks = soa::Join; + Preslice perCol = aod::v0::collisionId; + void processPhotonCorrelations(JCollision const& collision, + JTracks const& tracks, + MyTracks const&, + V0Datas const& v0s) + { + if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) { + return; + } + + int nPhotons = 0; + auto v0PerCollision = v0s.sliceBy(perCol, collision.globalIndex()); + for (const auto& v0 : v0PerCollision) { + if (!initV0(v0)) { + continue; + } + registry.fill(HIST("reconstructed/photons/hPhotonSpectrumReco"), v0.pt(), v0.eta(), v0.phi()); + nPhotons++; + + for (const auto& track : tracks) { + if (!jetderiveddatautilities::selectTrack(track, trackSelection)) { + continue; + } + + if (!initTrig(track)) { + continue; + } + float dphi = calculateDelta(track.phi(), v0.phi(), -PIHalf); + registry.fill(HIST("reconstructed/photons/hPhotonCorrelReco"), track.pt(), v0.pt(), track.eta() - v0.eta(), dphi); + } + } + registry.fill(HIST("reconstructed/photons/hPhotonMultReco"), nPhotons); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processPhotonCorrelations, "hadron-photon correlation", true); + + /*********************************************** MC ************************************************/ + + using MyTracksMC = soa::Join; + void processPhotonCorrelationsMCReco(Join::iterator const& collision_reco, + JMcCollisions const&, + JTracks const& tracks_reco, + JMcParticles const&, + MyTracksMC const&, + V0Datas const& v0s) + { + if (!jetderiveddatautilities::selectCollision(collision_reco, eventSelection)) { + return; + } + + int nPhotons = 0; + + auto v0PerCollision = v0s.sliceBy(perCol, collision_reco.globalIndex()); + for (const auto& v0 : v0PerCollision) { + if (!initV0(v0)) { + continue; + } + registry.fill(HIST("reconstructed/photons/hPhotonSpectrumReco"), v0.pt(), v0.eta(), v0.phi()); + nPhotons++; + + for (const auto& track : tracks_reco) { + if (!jetderiveddatautilities::selectTrack(track, trackSelection)) { + continue; + } + + if (!initTrig(track)) { + continue; + } + float dphi = calculateDelta(track.phi(), v0.phi(), -PIHalf); + registry.fill(HIST("reconstructed/photons/hPhotonCorrelReco"), track.pt(), v0.pt(), track.eta() - v0.eta(), dphi); + } + } + registry.fill(HIST("reconstructed/photons/hPhotonMultReco"), nPhotons); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processPhotonCorrelationsMCReco, "hadron-photon correlation", true); + + void processPhotonCorrelationsMCGen(JMcCollision const&, + JMcParticles const& tracks_true) + { + int nPhotons = 0; + for (const auto& track_assoc : tracks_true) { + if (!initParticle(track_assoc, false)) { + continue; + } + if (std::abs(track_assoc.pdgCode()) != 22) { + continue; + } + if (!track_assoc.isPhysicalPrimary() && track_assoc.getGenStatusCode() == -1) { + continue; + } + + // Iterate through mother particles until original mother is reached + auto mother = track_assoc.mothers_as().at(0); + while (mother.pdgCode() == 22) { + mother = mother.mothers_as().at(0); + } + + registry.fill(HIST("generated/photons/hPhotonSpectrumGen"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi(), pidCodes[mother.pdgCode()]); + + nPhotons++; + + for (const auto& track_trig : tracks_true) { + if (!initTrigParticle(track_trig)) { + continue; + } + if (!initParticle(track_assoc)) { + continue; + } + float dphi = calculateDelta(track_trig.phi(), track_assoc.phi(), -PIHalf); + registry.fill(HIST("generated/photons/hPhotonCorrelGen"), track_trig.pt(), track_assoc.pt(), track_trig.eta() - track_assoc.eta(), dphi, pidCodes[mother.pdgCode()]); + } + } + + registry.fill(HIST("generated/photons/hPhotonMultGen"), nPhotons); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processPhotonCorrelationsMCGen, "mc hadron-photon correlation", true); + + /**************************************************************************************************** + ***************************************** HADRONS *************************************************** + ****************************************************************************************************/ + + /********************************************** DATA ***********************************************/ + void processHadronCorrelations(JCollision const& collision, + Join const& tracks) + { + if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) { + return; + } + + int nHadrons = 0; + for (const auto& track_assoc : tracks) { + if (!jetderiveddatautilities::selectTrack(track_assoc, trackSelection)) { + continue; + } + + if (!initTrack(track_assoc)) { + continue; + } + registry.fill(HIST("reconstructed/hadrons/hHadronSpectrumReco"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi()); + nHadrons++; + + for (const auto& track_trig : tracks) { + if (!jetderiveddatautilities::selectTrack(track_trig, trackSelection)) { + continue; + } + + if (!initTrig(track_trig)) { + continue; + } + float dphi = calculateDelta(track_trig.phi(), track_assoc.phi(), -PIHalf); + registry.fill(HIST("reconstructed/hadrons/hadrons/hHadronCorrelReco"), track_trig.pt(), track_assoc.pt(), track_trig.eta() - track_assoc.eta(), dphi); + } + } + registry.fill(HIST("reconstructed/hadrons/hHadronMultReco"), nHadrons); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processHadronCorrelations, "hadron-hadron correlation", true); + + /*********************************************** MC ************************************************/ + + void processHadronCorrelationsMCGen(JMcCollision const&, + JMcParticles const& tracks_true) + { + int nHadrons = 0; + for (const auto& track_assoc : tracks_true) { + if (!initParticle(track_assoc)) { + continue; + } + auto pdgParticle = pdg->GetParticle(track_assoc.pdgCode()); + if (!pdgParticle || pdgParticle->Charge() == 0.) { + continue; + } + if (std::abs(track_assoc.pdgCode()) < 100) { + continue; + } + + registry.fill(HIST("generated/hadrons/hHadronSpectrumGen"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi()); + nHadrons++; + + for (const auto& track_trig : tracks_true) { + if (!initTrigParticle(track_trig)) { + continue; + } + float dphi = calculateDelta(track_trig.phi(), track_assoc.phi(), -PIHalf); + + registry.fill(HIST("generated/hadrons/hHadronCorrelGen"), track_trig.pt(), track_assoc.pt(), track_trig.eta() - track_assoc.eta(), dphi); + } + } + registry.fill(HIST("generated/hadrons/hHadronMultGen"), nHadrons); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processHadronCorrelationsMCGen, "mc hadron-hadron correlation", true); + + void processHadronCorrelationsMCReco(Join::iterator const& collision_reco, + JMcCollisions const&, + Join const& tracks_reco, + JMcParticles const&) + { + if (!jetderiveddatautilities::selectCollision(collision_reco, eventSelection)) { + return; + } + + int nHadrons = 0; + for (const auto& track_assoc : tracks_reco) { + if (!jetderiveddatautilities::selectTrack(track_assoc, trackSelection)) { + continue; + } + + if (!initTrack(track_assoc)) { + continue; + } + auto particle = track_assoc.mcParticle(); + auto pdgParticle = pdg->GetParticle(particle.pdgCode()); + if (!pdgParticle || pdgParticle->Charge() == 0.) { + continue; + } + if (std::abs(particle.pdgCode()) < 100) { + continue; + } + // if(particle.isPhysicalPrimary()){continue;} + // if(std::abs(particle.pdgCode())>1e9){continue;} + + registry.fill(HIST("reconstructed/hadrons/hHadronSpectrumReco"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi()); + + if (particle.isPhysicalPrimary()) { + registry.fill(HIST("reconstructed/hadrons/hHadronPtPrimReco"), track_assoc.pt()); + } else { + registry.fill(HIST("reconstructed/hadrons/hHadronPtSecReco"), track_assoc.pt()); + } + nHadrons++; + + for (const auto& track_trig : tracks_reco) { + if (!jetderiveddatautilities::selectTrack(track_trig, trackSelection)) { + continue; + } + + if (!initTrig(track_trig)) { + continue; + } + float dphi = calculateDelta(track_trig.phi(), track_assoc.phi(), -PIHalf); + + registry.fill(HIST("reconstructed/hadrons/hHadronCorrelReco"), track_trig.pt(), track_assoc.pt(), track_trig.eta() - track_assoc.eta(), dphi); + } + } + registry.fill(HIST("reconstructed/hadrons/hHadronMultReco"), nHadrons); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processHadronCorrelationsMCReco, "mc hadron-hadron correlation", true); + + /**************************************************************************************************** + *************************************** CHARGED PIONS *********************************************** + ****************************************************************************************************/ + + /********************************************** DATA ***********************************************/ + void processPionCorrelations(JCollision const& collision, + Join const& tracks) + { + if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) { + return; + } + + int nPions = 0; + for (const auto& track_assoc : tracks) { + if (!jetderiveddatautilities::selectTrack(track_assoc, trackSelection)) { + continue; + } + + if (!initTrack(track_assoc)) { + continue; + } + if (std::abs(track_assoc.tpcNSigmaPi()) > 2) { + continue; + } // remove non-pions + registry.fill(HIST("reconstructed/charged/hPionSpectrumReco"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi()); + nPions++; + + for (const auto& track_trig : tracks) { + if (!jetderiveddatautilities::selectTrack(track_trig, trackSelection)) { + continue; + } + + if (!initTrig(track_trig)) { + continue; + } + float dphi = calculateDelta(track_trig.phi(), track_assoc.phi(), -PIHalf); + registry.fill(HIST("reconstructed/charged/hPionCorrelReco"), track_trig.pt(), track_assoc.pt(), track_trig.eta() - track_assoc.eta(), dphi); + } + } + registry.fill(HIST("reconstructed/charged/hPionMultReco"), nPions); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processPionCorrelations, "hadron-pion correlation", true); + + /*********************************************** MC ************************************************/ + + void processPionCorrelationsMCGen(JMcCollision const&, + JMcParticles const& tracks_true) + { + int nPions = 0; + for (const auto& track_assoc : tracks_true) { + if (!initParticle(track_assoc)) { + continue; + } + if (std::abs(track_assoc.pdgCode()) != 211) { + continue; + } + + registry.fill(HIST("generated/charged/hPionSpectrumGen"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi()); + nPions++; + + for (const auto& track_trig : tracks_true) { + if (!initTrigParticle(track_trig)) { + continue; + } + float dphi = calculateDelta(track_trig.phi(), track_assoc.phi(), -PIHalf); + + registry.fill(HIST("generated/charged/hPionCorrelGen"), track_trig.pt(), track_assoc.pt(), track_trig.eta() - track_assoc.eta(), dphi); + } + } + registry.fill(HIST("generated/charged/hPionMultGen"), nPions); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processPionCorrelationsMCGen, "mc hadron-pion correlation", true); + + void processPionCorrelationsMCReco(Join::iterator const& collision_reco, + JMcCollisions const&, + Join const& tracks_reco, + JMcParticles const&) + { + if (!jetderiveddatautilities::selectCollision(collision_reco, eventSelection)) { + return; + } + + int nPions = 0; + for (const auto& track_assoc : tracks_reco) { + if (!jetderiveddatautilities::selectTrack(track_assoc, trackSelection)) { + continue; + } + + if (!initTrack(track_assoc)) { + continue; + } + if (std::abs(track_assoc.mcParticle().pdgCode()) != 211) { + continue; + } + + registry.fill(HIST("reconstructed/charged/hPionSpectrumReco"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi()); + nPions++; + + for (const auto& track_trig : tracks_reco) { + if (!jetderiveddatautilities::selectTrack(track_trig, trackSelection)) { + continue; + } + + if (!initTrig(track_trig)) { + continue; + } + float dphi = calculateDelta(track_trig.phi(), track_assoc.phi(), -PIHalf); + registry.fill(HIST("reconstructed/charged/hPionCorrelReco"), track_trig.pt(), track_assoc.pt(), track_trig.eta() - track_assoc.eta(), dphi); + } + } + registry.fill(HIST("reconstructed/charged/hPionMultReco"), nPions); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processPionCorrelationsMCReco, "mc hadron-pion correlation", true); + + /**************************************************************************************************** + ****************************************** NEUTRALS ************************************************* + ****************************************************************************************************/ + + /*********************************************** MC ************************************************/ + + void processNeutralCorrelationsMCGen(JMcCollision const&, + JMcParticles const& tracks_true) + { + int nNeutrals = 0; + for (const auto& track_assoc : tracks_true) { + if (!initParticle(track_assoc, false)) { + continue; + } + auto pdgParticle = pdg->GetParticle(track_assoc.pdgCode()); + if (!pdgParticle) { + continue; + } // remove unknown particles + if (pdgParticle->Charge() != 0.) { + continue; + } // remove charged particles + if (track_assoc.pdgCode() < 100 || track_assoc.pdgCode() == 2112) { + continue; + } // remove non-hadrons and protons + + registry.fill(HIST("generated/neutral/hNeutralSpectrumGen"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi(), pidCodes[track_assoc.pdgCode()]); + nNeutrals++; + + // Get correlations between neutral hadrons and their respective decay photons + for (const auto& daughter : track_assoc.daughters_as()) { + if (daughter.pdgCode() != 22) + continue; + if (!initParticle(daughter, false)) + continue; + if (!daughter.isPhysicalPrimary() && daughter.getGenStatusCode() == -1) + continue; + registry.fill(HIST("generated/neutral/hNeutralDecayGen"), track_assoc.pt(), daughter.pt() / track_assoc.pt(), daughter.eta() - track_assoc.eta(), calculateDelta(daughter.phi(), track_assoc.phi(), -PIHalf), pidCodes[track_assoc.pdgCode()]); + } + + // Get correlations between triggers and neutral hadrons + for (const auto& track_trig : tracks_true) { + if (!initTrigParticle(track_trig)) { + continue; + } + float dphi = calculateDelta(track_assoc.phi(), track_trig.phi(), -PIHalf); + registry.fill(HIST("generated/neutral/hNeutralCorrelGen"), track_trig.pt(), track_assoc.pt(), track_assoc.eta() - track_trig.eta(), dphi, pidCodes[track_assoc.pdgCode()]); + } + } + registry.fill(HIST("generated/neutral/hNeutralMultGen"), nNeutrals); + } + PROCESS_SWITCH(HadronPhotonCorrelation, processNeutralCorrelationsMCGen, "mc hadron-pion correlation", true); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc)}; +}; diff --git a/PWGJE/Tasks/jetSpectraEseTask.cxx b/PWGJE/Tasks/jetSpectraEseTask.cxx index 96ecaba87b9..616775758bc 100644 --- a/PWGJE/Tasks/jetSpectraEseTask.cxx +++ b/PWGJE/Tasks/jetSpectraEseTask.cxx @@ -15,6 +15,8 @@ /// \author Joachim C. K. B. Hansen, Lund University #include +#include +#include #include "Framework/ASoA.h" #include "Framework/AnalysisDataModel.h" @@ -39,35 +41,58 @@ using namespace o2::framework; using namespace o2::framework::expressions; #include "Framework/runDataProcessing.h" +#include "Framework/StaticFor.h" struct JetSpectraEseTask { ConfigurableAxis binJetPt{"binJetPt", {200, 0., 200.}, ""}; - ConfigurableAxis bindPhi{"bindPhi", {100, -TMath::Pi() - 1, TMath::Pi() + 1}, ""}; + ConfigurableAxis bindPhi{"bindPhi", {100, -o2::constants::math::PI - 1, o2::constants::math::PI + 1}, ""}; ConfigurableAxis binESE{"binESE", {100, 0, 100}, ""}; ConfigurableAxis binCos{"binCos", {100, -1.05, 1.05}, ""}; + ConfigurableAxis binOccupancy{"binOccupancy", {5000, 0, 25000}, ""}; + ConfigurableAxis binQVec{"binQVec", {100, -3, 3}, ""}; Configurable jetPtMin{"jetPtMin", 5.0, "minimum jet pT cut"}; Configurable jetR{"jetR", 0.2, "jet resolution parameter"}; Configurable vertexZCut{"vertexZCut", 10.0, "vertex z cut"}; - Configurable> CentRange{"CentRange", {30, 50}, "centrality region of interest"}; - Configurable leadingJetPtCut{"fLeadingJetPtCut", 5.0, "leading jet pT cut"}; + Configurable> centRange{"centRange", {30, 50}, "centrality region of interest"}; + Configurable leadingJetPtCut{"leadingJetPtCut", 5.0, "leading jet pT cut"}; Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; Configurable trackSelections{"trackSelections", "globalTracks", "set track selections"}; Configurable fColSwitch{"fColSwitch", 0, "collision switch"}; + Configurable cfgEvSelOccupancy{"cfgEvSelOccupancy", false, "Flag for occupancy cut"}; + Configurable> cfgCutOccupancy{"cfgCutOccupancy", {0, 500}, "Occupancy cut"}; + Configurable> cfgOccupancyPtCut{"cfgOccupancyPtCut", {0, 100}, "pT cut"}; + + Configurable cfgnTotalSystem{"cfgnTotalSystem", 7, "total qvector number // look in Qvector table for this number"}; + Configurable cfgnCorrLevel{"cfgnCorrLevel", 3, "QVector step: 0 = no corr, 1 = rect, 2 = twist, 3 = full"}; + + Configurable cfgEPRefA{"cfgEPRefA", "FT0A", "EP reference A"}; + Configurable cfgEPRefB{"cfgEPRefB", "TPCpos", "EP reference B"}; + Configurable cfgEPRefC{"cfgEPRefC", "TPCneg", "EP reference C"}; + AxisSpec jetPtAxis = {binJetPt, "#it{p}_{T,jet}"}; AxisSpec dPhiAxis = {bindPhi, "#Delta#phi"}; AxisSpec eseAxis = {binESE, "#it{q}_{2}"}; - AxisSpec cosAxis = {binCos, ""}; + AxisSpec occAxis = {binOccupancy, "Occupancy"}; + AxisSpec qvecAxis = {binQVec, "Q-vector"}; HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; int eventSelection = -1; int trackSelection = -1; + enum class DetID { FT0C, + FT0A, + FT0M, + FV0A, + TPCpos, + TPCneg, + TPCall }; + void init(o2::framework::InitContext&) { eventSelection = jetderiveddatautilities::initialiseEventSelection(static_cast(eventSelections)); @@ -86,39 +111,51 @@ struct JetSpectraEseTask { registry.add("hRho", ";#rho;entries", {HistType::kTH1F, {{100, 0, 200.}}}); registry.add("hJetArea", ";area_{jet};entries", {HistType::kTH1F, {{100, 0, 10.}}}); registry.add("hdPhi", "#Delta#phi;entries;", {HistType::kTH1F, {{dPhiAxis}}}); - registry.add("hJetPtdPhiq2", "", {HistType::kTH3F, {{jetPtAxis}, {dPhiAxis}, {eseAxis}}}); + registry.add("hCentJetPtdPhiq2", "", {HistType::kTHnSparseF, {{100, 0, 100}, {jetPtAxis}, {dPhiAxis}, {eseAxis}}}); registry.add("hPsi2FT0C", ";Centrality; #Psi_{2}", {HistType::kTH2F, {{100, 0, 100}, {150, -2.5, 2.5}}}); - registry.add("hPsi2FT0A", ";Centrality; #Psi_{2}", {HistType::kTH2F, {{100, 0, 100}, {150, -2.5, 2.5}}}); - registry.add("hPsi2FV0A", ";Centrality; #Psi_{2}", {HistType::kTH2F, {{100, 0, 100}, {150, -2.5, 2.5}}}); - registry.add("hPsi2TPCpos", ";Centrality; #Psi_{2}", {HistType::kTH2F, {{100, 0, 100}, {150, -2.5, 2.5}}}); - registry.add("hPsi2TPCneg", ";Centrality; #Psi_{2}", {HistType::kTH2F, {{100, 0, 100}, {150, -2.5, 2.5}}}); - registry.add("hCosPsi2FT0CmFT0A", ";Centrality;cos(2(#Psi_{2}^{FT0C}-#Psi_{2}^{FT0A}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); - registry.add("hCosPsi2FT0CmFV0A", ";Centrality;cos(2(#Psi_{2}^{FT0C}-#Psi_{2}^{FV0A}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); - registry.add("hCosPsi2FV0AmFT0A", ";Centrality;cos(2(#Psi_{2}^{FT0C}-#Psi_{2}^{FV0A}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); - registry.add("hCosPsi2FT0AmFT0C", ";Centrality;cos(2(#Psi_{2}^{FT0A}-#Psi_{2}^{FT0C}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); - registry.add("hCosPsi2FT0AmFV0A", ";Centrality;cos(2(#Psi_{2}^{FT0C}-#Psi_{2}^{FV0A}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); - registry.add("hCosPsi2FV0AmFT0C", ";Centrality;cos(2(#Psi_{2}^{FV0A}-#Psi_{2}^{FT0C}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); - registry.add("hCosPsi2TPCposmTPCneg", ";Centrality;cos(2(#Psi_{2}^{TPCpos}-#Psi_{2}^{TPCneg}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); - registry.add("hCosPsi2TPCposmFV0A", ";Centrality;cos(2(#Psi_{2}^{TPCpos}-#Psi_{2}^{FV0A}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); - registry.add("hCosPsi2TPCnegmFV0A", ";Centrality;cos(2(#Psi_{2}^{TPCneg}-#Psi_{2}^{FV0A}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); - + registry.addClone("hPsi2FT0C", "hPsi2FT0A"); + registry.addClone("hPsi2FT0C", "hPsi2FV0A"); + registry.addClone("hPsi2FT0C", "hPsi2TPCpos"); + registry.addClone("hPsi2FT0C", "hPsi2TPCneg"); + + registry.add("hCosPsi2AmC", ";Centrality;cos(2(#Psi_{2}^{A}-#Psi_{2}^{B}));#it{q}_{2}", {HistType::kTH3F, {{100, 0, 100}, {cosAxis}, {eseAxis}}}); + registry.addClone("hCosPsi2AmC", "hCosPsi2AmB"); + registry.addClone("hCosPsi2AmC", "hCosPsi2BmC"); + + registry.add("hQvecUncorV2", ";Centrality;Q_x;Q_y", {HistType::kTH3F, {{100, 0, 100}, {qvecAxis}, {qvecAxis}}}); + registry.addClone("hQvecUncorV2", "hQvecRectrV2"); + registry.addClone("hQvecUncorV2", "hQvecTwistV2"); + registry.addClone("hQvecUncorV2", "hQvecFinalV2"); + + registry.addClone("hPsi2FT0C", "hEPUncorV2"); + registry.addClone("hPsi2FT0C", "hEPRectrV2"); + registry.addClone("hPsi2FT0C", "hEPTwistV2"); break; case 1: LOGF(info, "JetSpectraEseTask::init() - using MC"); - registry.add("h_mc_collisions", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.0}}}); - registry.add("h_part_jet_pt", "particle level jet pT;#it{p}_{T,jet part} (GeV/#it{c});entries", {HistType::kTH1F, {{jetPtAxis}}}); - registry.add("h_part_jet_eta", "particle level jet #eta;#eta_{jet part};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}); - registry.add("h_part_jet_phi", "particle level jet #phi;#phi_{jet part};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}); - registry.add("h_part_jet_pt_match", "particle level jet pT;#it{p}_{T,jet part} (GeV/#it{c});entries", {HistType::kTH1F, {{jetPtAxis}}}); - registry.add("h_part_jet_eta_match", "particle level jet #eta;#eta_{jet part};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}); - registry.add("h_part_jet_phi_match", "particle level jet #phi;#phi_{jet part};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}); - registry.add("h_detector_jet_pt", "detector level jet pT;#it{p}_{T,jet det} (GeV/#it{c});entries", {HistType::kTH1F, {{jetPtAxis}}}); - registry.add("h_detector_jet_eta", "detector level jet #eta;#eta_{jet det};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}); - registry.add("h_detector_jet_phi", "detector level jet #phi;#phi_{jet det};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}); - registry.add("h_matched_jets_pt_delta", "#it{p}_{T,jet part}; det - part", {HistType::kTH2F, {{jetPtAxis}, {200, -20., 20.0}}}); - registry.add("h_matched_jets_eta_delta", "#eta_{jet part}; det - part", {HistType::kTH2F, {{100, -1.0, 1.0}, {200, -20.0, 20.0}}}); - registry.add("h_matched_jets_phi_delta", "#phi_{jet part}; det - part", {HistType::kTH2F, {{80, -1.0, 7.}, {200, -20.0, 20.}}}); - registry.add("h_response_mat_match", "#it{p}_{T, jet det}; #it{p}_{T, jet part}", HistType::kTH2F, {jetPtAxis, jetPtAxis}); + registry.add("hMCEventCounter", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.0}}}); + registry.add("hPartJetPt", "particle level jet pT;#it{p}_{T,jet part} (GeV/#it{c});entries", {HistType::kTH1F, {{jetPtAxis}}}); + registry.add("hPartJetEta", "particle level jet #eta;#eta_{jet part};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}); + registry.add("hPartJetPhi", "particle level jet #phi;#phi_{jet part};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}); + registry.add("hPartJetPtMatch", "particle level jet pT;#it{p}_{T,jet part} (GeV/#it{c});entries", {HistType::kTH1F, {{jetPtAxis}}}); + registry.add("hPartJetEtaMatch", "particle level jet #eta;#eta_{jet part};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}); + registry.add("hPartJetPhiMatch", "particle level jet #phi;#phi_{jet part};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}); + registry.add("hDetectorJetPt", "detector level jet pT;#it{p}_{T,jet det} (GeV/#it{c});entries", {HistType::kTH1F, {{jetPtAxis}}}); + registry.add("hDetectorJetEta", "detector level jet #eta;#eta_{jet det};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}); + registry.add("hDetectorJetPhi", "detector level jet #phi;#phi_{jet det};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}); + registry.add("hMatchedJetsPtDelta", "#it{p}_{T,jet part}; det - part", {HistType::kTH2F, {{jetPtAxis}, {200, -20., 20.0}}}); + registry.add("hMatchedJetsEtaDelta", "#eta_{jet part}; det - part", {HistType::kTH2F, {{100, -1.0, 1.0}, {200, -20.0, 20.0}}}); + registry.add("hMatchedJetsPhiDelta", "#phi_{jet part}; det - part", {HistType::kTH2F, {{80, -1.0, 7.}, {200, -20.0, 20.}}}); + registry.add("hResponseMatrixMatch", "#it{p}_{T, jet det}; #it{p}_{T, jet part}", HistType::kTH2F, {jetPtAxis, jetPtAxis}); + break; + case 2: + LOGF(info, "JetSpectraEseTask::init() - using Occupancy processing"); + registry.add("hEventCounterOcc", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.0}}}); + registry.add("hTrackPt", "track pT;#it{p}_{T,track} (GeV/#it{c});entries", {HistType::kTHnSparseF, {{100, 0, 100}, {100, 0, 100}, {eseAxis}, {occAxis}}}); + registry.add("hTrackEta", "track #eta;#eta_{track};entries", {HistType::kTH3F, {{100, 0, 100}, {100, -1.0, 1.0}, {occAxis}}}); + registry.add("hTrackPhi", "track #phi;#phi_{track};entries", {HistType::kTH3F, {{100, 0, 100}, {80, -1.0, 7.}, {occAxis}}}); + registry.add("hOccupancy", "Occupancy;Occupancy;entries", {HistType::kTH1F, {{occAxis}}}); + registry.add("hPsiOccupancy", "Occupancy;#Psi_{2};entries", {HistType::kTH3F, {{100, 0, 100}, {150, -2.5, 2.5}, {occAxis}}}); break; } } @@ -127,21 +164,16 @@ struct JetSpectraEseTask { Filter colFilter = nabs(aod::jcollision::posZ) < vertexZCut; Filter mcCollisionFilter = nabs(aod::jmccollision::posZ) < vertexZCut; - void processESEDataCharged(soa::Join::iterator const& collision, - soa::Join const&, + void processESEDataCharged(soa::Join::iterator const& collision, soa::Filtered const& jets, aod::JetTracks const& tracks) { float counter{0.5f}; registry.fill(HIST("hEventCounter"), counter++); - const auto originalCollision = collision.collision_as>(); - registry.fill(HIST("hEventCounter"), counter++); - if (originalCollision.centFT0C() < CentRange->at(0) || originalCollision.centFT0C() > CentRange->at(1)) - return; registry.fill(HIST("hEventCounter"), counter++); - const auto vPsi2 = procEP(originalCollision); - const auto qPerc = originalCollision.qPERCFT0C(); + const auto vPsi2 = procEP(collision); + const auto qPerc = collision.qPERCFT0C(); if (qPerc[0] < 0) return; registry.fill(HIST("hEventCounter"), counter++); @@ -154,29 +186,69 @@ struct JetSpectraEseTask { if (!isAcceptedLeadTrack(tracks)) return; + if (cfgEvSelOccupancy) { + auto occupancy = collision.trackOccupancyInTimeRange(); + if (occupancy < cfgCutOccupancy->at(0) || occupancy > cfgCutOccupancy->at(1)) + registry.fill(HIST("hEventCounter"), counter++); + return; + } + registry.fill(HIST("hEventCounter"), counter++); registry.fill(HIST("hRho"), collision.rho()); for (auto const& jet : jets) { - float jetpT_bkgsub = jet.pt() - (collision.rho() * jet.area()); + float jetpTbkgsub = jet.pt() - (collision.rho() * jet.area()); registry.fill(HIST("hJetPt"), jet.pt()); - registry.fill(HIST("hJetPt_bkgsub"), jetpT_bkgsub); + registry.fill(HIST("hJetPt_bkgsub"), jetpTbkgsub); registry.fill(HIST("hJetEta"), jet.eta()); registry.fill(HIST("hJetPhi"), jet.phi()); registry.fill(HIST("hJetArea"), jet.area()); float dPhi = RecoDecay::constrainAngle(jet.phi() - vPsi2, -o2::constants::math::PI); registry.fill(HIST("hdPhi"), dPhi); - registry.fill(HIST("hJetPtdPhiq2"), jetpT_bkgsub, dPhi, qPerc[0]); /* check the dphi */ + registry.fill(HIST("hCentJetPtdPhiq2"), collision.centrality(), jetpTbkgsub, dPhi, qPerc[0]); } registry.fill(HIST("hEventCounter"), counter++); + + if (collision.centrality() < centRange->at(0) || collision.centrality() > centRange->at(1)) /* for counting */ + return; + registry.fill(HIST("hEventCounter"), counter++); } PROCESS_SWITCH(JetSpectraEseTask, processESEDataCharged, "process ese collisions", true); + void processESEOccupancy(soa::Join::iterator const& collision, + soa::Join const& tracks) + { + float count{0.5}; + registry.fill(HIST("hEventCounterOcc"), count++); + const auto vPsi2 = procEP(collision); + const auto qPerc = collision.qPERCFT0C(); + + auto occupancy = collision.trackOccupancyInTimeRange(); + registry.fill(HIST("hPsiOccupancy"), collision.centrality(), vPsi2, occupancy); + registry.fill(HIST("hOccupancy"), occupancy); + + if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) + return; + registry.fill(HIST("hEventCounterOcc"), count++); + + for (auto const& track : tracks) { + if (!jetderiveddatautilities::selectTrack(track, trackSelection)) + continue; + + registry.fill(HIST("hTrackPt"), collision.centrality(), track.pt(), qPerc[0], occupancy); + if (track.pt() < cfgOccupancyPtCut->at(0) || track.pt() > cfgOccupancyPtCut->at(1)) + continue; + registry.fill(HIST("hTrackEta"), collision.centrality(), track.eta(), occupancy); + registry.fill(HIST("hTrackPhi"), collision.centrality(), track.phi(), occupancy); + } + } + PROCESS_SWITCH(JetSpectraEseTask, processESEOccupancy, "process occupancy", false); + void processMCParticleLevel(soa::Filtered::iterator const& jet) { - registry.fill(HIST("h_part_jet_pt"), jet.pt()); - registry.fill(HIST("h_part_jet_eta"), jet.eta()); - registry.fill(HIST("h_part_jet_phi"), jet.phi()); + registry.fill(HIST("hPartJetPt"), jet.pt()); + registry.fill(HIST("hPartJetEta"), jet.eta()); + registry.fill(HIST("hPartJetPhi"), jet.phi()); } PROCESS_SWITCH(JetSpectraEseTask, processMCParticleLevel, "jets on particle level MC", false); @@ -191,26 +263,26 @@ struct JetSpectraEseTask { return; float counter{0.5f}; - registry.fill(HIST("h_mc_collisions"), counter++); + registry.fill(HIST("hMCEventCounter"), counter++); for (const auto& mcdjet : mcdjets) { - registry.fill(HIST("h_detector_jet_pt"), mcdjet.pt()); - registry.fill(HIST("h_detector_jet_eta"), mcdjet.eta()); - registry.fill(HIST("h_detector_jet_phi"), mcdjet.phi()); - for (auto& mcpjet : mcdjet.template matchedJetGeo_as()) { + registry.fill(HIST("hDetectorJetPt"), mcdjet.pt()); + registry.fill(HIST("hDetectorJetEta"), mcdjet.eta()); + registry.fill(HIST("hDetectorJetPhi"), mcdjet.phi()); + for (const auto& mcpjet : mcdjet.template matchedJetGeo_as()) { - registry.fill(HIST("h_part_jet_pt_match"), mcpjet.pt()); - registry.fill(HIST("h_part_jet_eta_match"), mcpjet.eta()); - registry.fill(HIST("h_part_jet_phi_match"), mcpjet.phi()); + registry.fill(HIST("hPartJetPtMatch"), mcpjet.pt()); + registry.fill(HIST("hPartJetEtaMatch"), mcpjet.eta()); + registry.fill(HIST("hPartJetPhiMatch"), mcpjet.phi()); - registry.fill(HIST("h_matched_jets_pt_delta"), mcpjet.pt(), mcdjet.pt() - mcpjet.pt()); - registry.fill(HIST("h_matched_jets_phi_delta"), mcpjet.phi(), mcdjet.phi() - mcpjet.phi()); - registry.fill(HIST("h_matched_jets_eta_delta"), mcpjet.eta(), mcdjet.eta() - mcpjet.eta()); + registry.fill(HIST("hMatchedJetsPtDelta"), mcpjet.pt(), mcdjet.pt() - mcpjet.pt()); + registry.fill(HIST("hMatchedJetsPhiDelta"), mcpjet.phi(), mcdjet.phi() - mcpjet.phi()); + registry.fill(HIST("hMatchedJetsEtaDelta"), mcpjet.eta(), mcdjet.eta() - mcpjet.eta()); - registry.fill(HIST("h_response_mat_match"), mcdjet.pt(), mcpjet.pt()); + registry.fill(HIST("hResponseMatrixMatch"), mcdjet.pt(), mcpjet.pt()); } } - registry.fill(HIST("h_mc_collisions"), counter++); + registry.fill(HIST("hMCEventCounter"), counter++); } PROCESS_SWITCH(JetSpectraEseTask, processMCChargedMatched, "jet matched mcp and mcd", false); @@ -230,49 +302,98 @@ struct JetSpectraEseTask { else return true; } + template + float procEP(EPCol const& vec) + { + constexpr std::array AmpCut{1e-8, 0.0}; + auto computeEP = [&AmpCut](std::vector vec, auto det) { return vec[2] > AmpCut[det] ? 0.5 * std::atan2(vec[1], vec[0]) : 999.; }; + std::map epMap; + epMap["FT0A"] = computeEP(qVecNoESE(vec), 0); + if constexpr (Fill) { + epMap["FT0C"] = computeEP(qVecNoESE(vec), 0); + epMap["FV0A"] = computeEP(qVecNoESE(vec), 0); + epMap["TPCpos"] = computeEP(qVecNoESE(vec), 1); + epMap["TPCneg"] = computeEP(qVecNoESE(vec), 1); + fillEP(/*std::make_index_sequence<5>{},*/ vec, epMap); + auto cosPsi = [](float psiX, float psiY) { return (static_cast(psiX) == 999. || static_cast(psiY) == 999.) ? 999. : std::cos(2.0 * (psiX - psiY)); }; + std::array epCorrContainer{}; + epCorrContainer[0] = cosPsi(epMap[cfgEPRefA], epMap[cfgEPRefC]); + epCorrContainer[1] = cosPsi(epMap[cfgEPRefA], epMap[cfgEPRefB]); + epCorrContainer[2] = cosPsi(epMap[cfgEPRefB], epMap[cfgEPRefC]); + fillEPCos(/*std::make_index_sequence<3>{},*/ vec, epCorrContainer); + } + return epMap["FT0A"]; + } + template + void fillEPCos(/*const std::index_sequence&,*/ const collision& col, const std::array& Corr) + { + // static constexpr std::string CosList[] = {"hCosPsi2AmC", "hCosPsi2AmB", "hCosPsi2BmC"}; + // (registry.fill(HIST(CosList[Idx]), col.centrality(), Corr[Idx], col.qPERCFT0C()[0]), ...); + registry.fill(HIST("hCosPsi2AmC"), col.centrality(), Corr[0], col.qPERCFT0C()[0]); + registry.fill(HIST("hCosPsi2AmB"), col.centrality(), Corr[1], col.qPERCFT0C()[0]); + registry.fill(HIST("hCosPsi2BmC"), col.centrality(), Corr[2], col.qPERCFT0C()[0]); + } - template - float procEP(qVectors const& vec) + template + void fillEP(/*const std::index_sequence&,*/ const collision& col, const std::map& epMap) + { + // static constexpr std::string_view EpList[] = {"hPsi2FT0A", "hPsi2FV0A", "hPsi2FT0C", "hPsi2TPCpos", "hPsi2TPCneg"}; + // (registry.fill(HIST(EpList[Idx]), col.centrality(), epMap.at(std::string(RemovePrefix(EpList[Idx])))), ...); + registry.fill(HIST("hPsi2FT0A"), col.centrality(), epMap.at("FT0A")); + registry.fill(HIST("hPsi2FV0A"), col.centrality(), epMap.at("FV0A")); + registry.fill(HIST("hPsi2FT0C"), col.centrality(), epMap.at("FT0C")); + registry.fill(HIST("hPsi2TPCpos"), col.centrality(), epMap.at("TPCpos")); + registry.fill(HIST("hPsi2TPCneg"), col.centrality(), epMap.at("TPCneg")); + } + constexpr std::string_view RemovePrefix(std::string_view str) { - const auto epFT0A = 1 / 2.0 * TMath::ATan2(vec.qvecFT0AImVec()[0], vec.qvecFT0AReVec()[0]); - const auto epFV0A = 1 / 2.0 * std::atan2(vec.qvecFV0AImVec()[0], vec.qvecFV0AReVec()[0]); - const auto epFT0C = 1 / 2.0 * std::atan2(vec.qvecFT0CImVec()[0], vec.qvecFT0CReVec()[0]); - const auto epTPCpos = 1 / 2.0 * std::atan2(vec.qvecTPCposImVec()[0], vec.qvecTPCposReVec()[0]); - const auto epTPCneg = 1 / 2.0 * std::atan2(vec.qvecTPCnegImVec()[0], vec.qvecTPCnegReVec()[0]); - - registry.fill(HIST("hPsi2FT0C"), vec.centFT0C(), epFT0C); - registry.fill(HIST("hPsi2FT0A"), vec.centFT0C(), epFT0A); - registry.fill(HIST("hPsi2FV0A"), vec.centFT0C(), epFV0A); - registry.fill(HIST("hPsi2TPCpos"), vec.centFT0C(), epTPCpos); - registry.fill(HIST("hPsi2TPCneg"), vec.centFT0C(), epTPCneg); - - const auto cosPsi2FT0CmFT0A = cosPsiXY(epFT0C, epFT0A); - const auto cosPsi2FT0CmFV0A = cosPsiXY(epFT0C, epFV0A); - const auto cosPsi2FV0AmFT0A = cosPsiXY(epFV0A, epFT0A); - const auto cosPsi2FT0AmFT0C = cosPsiXY(epFT0A, epFT0C); - const auto cosPsi2FT0AmFV0A = cosPsiXY(epFT0A, epFV0A); - const auto cosPsi2FV0AmFT0C = cosPsiXY(epFV0A, epFT0C); - const auto cosPsi2TPCposmTPCneg = cosPsiXY(epTPCpos, epTPCneg); - const auto cosPsi2TPCposmFV0A = cosPsiXY(epTPCpos, epFV0A); - const auto cosPsi2TPCnegmFV0A = cosPsiXY(epTPCneg, epFV0A); - - registry.fill(HIST("hCosPsi2FT0CmFT0A"), vec.centFT0C(), cosPsi2FT0CmFT0A, vec.qPERCFT0C()[0]); - registry.fill(HIST("hCosPsi2FT0CmFV0A"), vec.centFT0C(), cosPsi2FT0CmFV0A, vec.qPERCFT0C()[0]); - registry.fill(HIST("hCosPsi2FV0AmFT0A"), vec.centFT0C(), cosPsi2FV0AmFT0A, vec.qPERCFT0C()[0]); - registry.fill(HIST("hCosPsi2FT0AmFT0C"), vec.centFT0C(), cosPsi2FT0AmFT0C, vec.qPERCFT0C()[0]); - registry.fill(HIST("hCosPsi2FT0AmFV0A"), vec.centFT0C(), cosPsi2FT0AmFV0A, vec.qPERCFT0C()[0]); - registry.fill(HIST("hCosPsi2FV0AmFT0C"), vec.centFT0C(), cosPsi2FV0AmFT0C, vec.qPERCFT0C()[0]); - registry.fill(HIST("hCosPsi2TPCposmTPCneg"), vec.centFT0C(), cosPsi2TPCposmTPCneg, vec.qPERCFT0C()[0]); - registry.fill(HIST("hCosPsi2TPCposmFV0A"), vec.centFT0C(), cosPsi2TPCposmFV0A, vec.qPERCFT0C()[0]); - registry.fill(HIST("hCosPsi2TPCnegmFV0A"), vec.centFT0C(), cosPsi2TPCnegmFV0A, vec.qPERCFT0C()[0]); - - return epFT0A; + constexpr std::string_view Prefix = "hPsi2"; + return str.substr(Prefix.size()); } - template - float cosPsiXY(Psi const& psiX, Psi const& psiY) + constexpr int detIDN(const DetID id) { - return std::cos(2.0 * (psiX - psiY)); + switch (id) { + case DetID::FT0C: + return 0; + case DetID::FT0A: + return 1; + case DetID::FT0M: + return 2; + case DetID::FV0A: + return 3; + case DetID::TPCpos: + return 4; + case DetID::TPCneg: + return 5; + case DetID::TPCall: + return 6; + } + return -1; + } + + template + std::vector qVecNoESE(Col collision) + { + const int nmode = 2; + int detId = detIDN(id); + int detInd = detId * 4 + cfgnTotalSystem * 4 * (nmode - 2); + if constexpr (fill) { + if (collision.qvecAmp()[detInd] > 1e-8) { + registry.fill(HIST("hQvecUncorV2"), collision.centrality(), collision.qvecRe()[detInd], collision.qvecIm()[detInd]); + registry.fill(HIST("hQvecRectrV2"), collision.centrality(), collision.qvecRe()[detInd + 1], collision.qvecIm()[detInd + 1]); + registry.fill(HIST("hQvecTwistV2"), collision.centrality(), collision.qvecRe()[detInd + 2], collision.qvecIm()[detInd + 2]); + registry.fill(HIST("hQvecFinalV2"), collision.centrality(), collision.qvecRe()[detInd + 3], collision.qvecIm()[detInd + 3]); + registry.fill(HIST("hEPUncorV2"), collision.centrality(), 0.5 * std::atan2(collision.qvecIm()[detInd], collision.qvecRe()[detInd])); + registry.fill(HIST("hEPRectrV2"), collision.centrality(), 0.5 * std::atan2(collision.qvecIm()[detInd + 1], collision.qvecRe()[detInd + 1])); + registry.fill(HIST("hEPTwistV2"), collision.centrality(), 0.5 * std::atan2(collision.qvecIm()[detInd + 2], collision.qvecRe()[detInd + 2])); + } + } + std::vector qVec{}; + qVec.push_back(collision.qvecRe()[detInd + cfgnCorrLevel]); + qVec.push_back(collision.qvecIm()[detInd + cfgnCorrLevel]); + qVec.push_back(collision.qvecAmp()[detId]); + return qVec; } }; diff --git a/PWGJE/Tasks/recoilJets.cxx b/PWGJE/Tasks/recoilJets.cxx new file mode 100644 index 00000000000..ea096d6891f --- /dev/null +++ b/PWGJE/Tasks/recoilJets.cxx @@ -0,0 +1,541 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// \author Kotliarov Artem , Nuclear Physics Institute of CAS +/// \file recoilJets.cxx +/// \brief hadron-jet correlation analysis + +#include +#include +#include + +#include "TRandom3.h" +#include "TVector2.h" + +#include "Framework/ASoA.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/O2DatabasePDGPlugin.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/runDataProcessing.h" + +#include "CommonConstants/MathConstants.h" +#include "Common/Core/TrackSelection.h" +#include "Common/Core/TrackSelectionDefaults.h" +#include "Common/Core/RecoDecay.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/TrackSelectionTables.h" + +#include "PWGJE/Core/FastJetUtilities.h" +#include "PWGJE/Core/JetFinder.h" +#include "PWGJE/Core/JetFindingUtilities.h" +#include "PWGJE/DataModel/Jet.h" + +#include "PWGJE/Core/JetDerivedDataUtilities.h" + +#include "EventFiltering/filterTables.h" + +using namespace o2; +using namespace o2::framework; +using namespace o2::framework::expressions; + +// Shorthand notations +using filtered_Coll = soa::Filtered>::iterator; +using filtered_Coll_PartLevel = soa::Filtered>::iterator; +using filtered_Coll_DetLevel_to_GetWeight = soa::Filtered>::iterator; + +using filtered_Jets = soa::Filtered>; +using filtered_Jets_DetLevel = soa::Filtered>; +using filtered_Jets_PartLevel = soa::Filtered>; + +using filtered_MatchedJets_DetLevel = soa::Filtered>; +using filtered_MatchedJets_PartLevel = soa::Filtered>; + +using filtered_Tracks = soa::Filtered; + +struct recoilJets { + + // List of configurable parameters + Configurable evSel{"evSel", "sel8", "Choose event selection"}; + Configurable trkSel{"trkSel", "globalTracks", "Set track selection"}; + Configurable vertexZCut{"vertexZCut", 10., "Accepted z-vertex range"}; + Configurable frac_sig{"frac_sig", 0.9, "Fraction of events to use for signal TT"}; + + Configurable trkPtMin{"trkPtMin", 0.15, "Minimum pT of acceptanced tracks"}; + Configurable trkPtMax{"trkPtMax", 100., "Maximum pT of acceptanced tracks"}; + + Configurable trkPhiMin{"trkPhiMin", -7., "Minimum phi angle of acceptanced tracks"}; + Configurable trkPhiMax{"trkPhiMax", 7., "Maximum phi angle of acceptanced tracks"}; + + Configurable trkEtaCut{"trkEtaCut", 0.9, "Eta acceptance of TPC"}; + Configurable jetR{"jetR", 0.4, "Jet cone radius"}; + + Configurable triggerMasks{"triggerMasks", "", "Relevant trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt"}; + + // List of configurable parameters for MC + Configurable pTHatExponent{"pTHatExponent", 4.0, "Exponent of the event weight for the calculation of pTHat"}; + Configurable pTHatMax{"pTHatMax", 999.0, "Maximum fraction of hard scattering for jet acceptance in MC"}; + + // Parameters for recoil jet selection + Configurable pT_TTref_min{"pT_TTref_min", 5, "Minimum pT of reference TT"}; + Configurable pT_TTref_max{"pT_TTref_max", 7, "Maximum pT of reference TT"}; + Configurable pT_TTsig_min{"pT_TTsig_min", 20, "Minimum pT of signal TT"}; + Configurable pT_TTsig_max{"pT_TTsig_max", 50, "Maximum pT of signal TT"}; + Configurable recoilRegion{"recoilRegion", 0.6, "Width of recoil acceptance"}; + + // List of configurable parameters for histograms + Configurable hist_jetPt{"hist_jetPt", 100, "Maximum value of jet pT shown in histograms"}; + + // Axes specification + AxisSpec pT{hist_jetPt, 0.0, hist_jetPt * 1.0, "#it{p}_{T} (GeV/#it{c})"}; + AxisSpec jet_pT_corr{hist_jetPt + 20, -20., hist_jetPt * 1.0, "#it{p}_{T, jet}^{ch, corr} (GeV/#it{c})"}; + AxisSpec phi_angle{40, 0.0, constants::math::TwoPI, "#varphi (rad)"}; + AxisSpec deltaPhi_angle{52, 0.0, constants::math::PI, "#Delta#varphi (rad)"}; + AxisSpec pseudorap{40, -1., 1., "#eta"}; + AxisSpec rhoArea{60, 0.0, 30., "#rho #times #A_{jet}"}; + + Preslice PartJetsPerCollision = aod::jet::mcCollisionId; + + TRandom3* rand = new TRandom3(0); + + // Declare filter on collision Z vertex + Filter collisionFilter = nabs(aod::jcollision::posZ) < vertexZCut; + Filter collisionFilterMC = nabs(aod::jmccollision::posZ) < vertexZCut; + + // Declare filters on accepted tracks + Filter trackFilter = aod::jtrack::pt > trkPtMin&& aod::jtrack::pt < trkPtMax&& nabs(aod::jtrack::eta) < trkEtaCut; + + // Declare filter on jets + Filter jetRadiusFilter = aod::jet::r == nround(jetR.node() * 100.); + + HistogramRegistry spectra; + + int eventSelection = -1; + int trackSelection = -1; + std::vector triggerMaskBits; + + void init(InitContext const&) + { + + eventSelection = jetderiveddatautilities::initialiseEventSelection(static_cast(evSel)); + trackSelection = jetderiveddatautilities::initialiseTrackSelection(static_cast(trkSel)); + triggerMaskBits = jetderiveddatautilities::initialiseTriggerMaskBits(triggerMasks); + + // List of raw distributions + spectra.add("vertexZ", "Z vertex of collisions", kTH1F, {{60, -12., 12.}}); + + spectra.add("hTrackPtEtaPhi", "Charact. of tracks", kTH3F, {pT, pseudorap, phi_angle}); + spectra.add("hNtrig", "Total number of selected triggers per class", kTH1F, {{2, 0.0, 2.}}); // Can we set name for bins? + spectra.add("hTTRef_per_event", "Number of TT_{Ref} per event", kTH1F, {{10, 0.0, 10.}}); + spectra.add("hTTSig_per_event", "Number of TT_{Sig} per event", kTH1F, {{5, 0.0, 5.}}); + + spectra.add("hJetPtEtaPhiRhoArea", "Charact. of inclusive jets", kTHnSparseF, {pT, pseudorap, phi_angle, rhoArea}); + + spectra.add("hDPhi_JetPt_Corr_TTRef", "Events w. TT_{Ref}: #Delta#varphi & #it{p}_{T, jet}^{ch}", kTH2F, {deltaPhi_angle, jet_pT_corr}); + spectra.add("hDPhi_JetPt_Corr_TTSig", "Events w. TT_{Sig}: #Delta#varphi & #it{p}_{T, jet}^{ch}", kTH2F, {deltaPhi_angle, jet_pT_corr}); + spectra.add("hDPhi_JetPt_TTRef", "Events w. TT_{Ref}: #Delta#varphi & #it{p}_{T, jet}^{ch}", kTH2F, {deltaPhi_angle, pT}); + spectra.add("hDPhi_JetPt_TTSig", "Events w. TT_{Sig}: #Delta#varphi & #it{p}_{T, jet}^{ch}", kTH2F, {deltaPhi_angle, pT}); + + spectra.add("hRecoil_JetPt_Corr_TTRef", "Events w. TT_{Ref}: #it{p}_{T} of recoil jets", kTH1F, {jet_pT_corr}); + spectra.add("hRecoil_JetPt_Corr_TTSig", "Events w. TT_{Sig}: #it{p}_{T} of recoil jets", kTH1F, {jet_pT_corr}); + spectra.add("hRecoil_JetPt_TTRef", "Events w. TT_{Ref}: #it{p}_{T} of recoil jets", kTH1F, {pT}); + spectra.add("hRecoil_JetPt_TTSig", "Events w. TT_{Sig}: #it{p}_{T} of recoil jets", kTH1F, {pT}); + + spectra.add("hDPhi_JetPt_RhoArea_TTRef", "Events w. TT_{Ref}: #Delta#varphi & jet pT & #rho #times A_{jet}", kTH3F, {deltaPhi_angle, pT, rhoArea}); + spectra.add("hDPhi_JetPt_RhoArea_TTSig", "Events w. TT_{Sig}: #Delta#varphi & jet pT & #rho #times A_{jet}", kTH3F, {deltaPhi_angle, pT, rhoArea}); + + // List of MC particle level distributions + spectra.add("hPartPtEtaPhi", "Charact. of particles", kTH3F, {pT, pseudorap, phi_angle}); + spectra.add("hNtrig_Part", "Total number of selected triggers per class", kTH1F, {{2, 0.0, 2.}}); + spectra.add("hTTRef_per_event_Part", "Number of TT_{Ref} per event", kTH1F, {{10, 0.0, 10.}}); + spectra.add("hTTSig_per_event_Part", "Number of TT_{Sig} per event", kTH1F, {{5, 0.0, 5.}}); + + spectra.add("hJetPtEtaPhiRhoArea_Part", "Charact. of inclusive part. level jets", kTHnSparseF, {pT, pseudorap, phi_angle, rhoArea}); + + spectra.add("hDPhi_JetPt_Corr_TTRef_Part", "Events w. TT_{Ref}: #Delta#varphi & #it{p}_{T, jet}^{ch}", kTH2F, {deltaPhi_angle, jet_pT_corr}); + spectra.add("hDPhi_JetPt_Corr_TTSig_Part", "Events w. TT_{Sig}: #Delta#varphi & #it{p}_{T, jet}^{ch}", kTH2F, {deltaPhi_angle, jet_pT_corr}); + spectra.add("hDPhi_JetPt_TTRef_Part", "Events w. TT_{Ref}: #Delta#varphi & #it{p}_{T, jet}^{ch}", kTH2F, {deltaPhi_angle, pT}); + spectra.add("hDPhi_JetPt_TTSig_Part", "Events w. TT_{Sig}: #Delta#varphi & #it{p}_{T, jet}^{ch}", kTH2F, {deltaPhi_angle, pT}); + + spectra.add("hRecoil_JetPt_Corr_TTRef_Part", "Events w. TT_{Ref}: #it{p}_{T} of recoil jets", kTH1F, {jet_pT_corr}); + spectra.add("hRecoil_JetPt_Corr_TTSig_Part", "Events w. TT_{Sig}: #it{p}_{T} of recoil jets", kTH1F, {jet_pT_corr}); + spectra.add("hRecoil_JetPt_TTRef_Part", "Events w. TT_{Ref}: #it{p}_{T} of recoil jets", kTH1F, {pT}); + spectra.add("hRecoil_JetPt_TTSig_Part", "Events w. TT_{Sig}: #it{p}_{T} of recoil jets", kTH1F, {pT}); + + spectra.add("hDPhi_JetPt_RhoArea_TTRef_Part", "Events w. TT_{Ref}: #Delta#varphi & jet pT & #rho #times A_{jet}", kTH3F, {deltaPhi_angle, pT, rhoArea}); + spectra.add("hDPhi_JetPt_RhoArea_TTSig_Part", "Events w. TT_{Sig}: #Delta#varphi & jet pT & #rho #times A_{jet}", kTH3F, {deltaPhi_angle, pT, rhoArea}); + + // Response matrices, jet pT & jet phi resolution + spectra.add("hJetPt_PartLevel_vs_DetLevel", "Correlation jet pT at part. vs. det. levels", kTH2F, {pT, pT}); + spectra.add("hJetPt_PartLevel_vs_DetLevel_RecoilJets", "Correlation recoil jet pT at part. vs. det. levels", kTH2F, {pT, pT}); + + spectra.add("hMissedJets_pT", "Part. level jets w/o matched pair", kTH1F, {pT}); + spectra.add("hMissedJets_pT_RecoilJets", "Part. level jets w/o matched pair", kTH1F, {pT}); + + spectra.add("hFakeJets_pT", "Det. level jets w/o matched pair", kTH1F, {pT}); + spectra.add("hFakeJets_pT_RecoilJets", "Det. level jets w/o matched pair", kTH1F, {pT}); + + spectra.add("hJetPt_resolution", "Jet p_{T} relative resolution as a func. of jet #it{p}_{T, part}", kTH2F, {{60, -1., 2.}, pT}); + spectra.add("hJetPt_resolution_RecoilJets", "Jet p_{T} relative resolution as a func. of jet #it{p}_{T, part}", kTH2F, {{60, -1., 2.}, pT}); + + spectra.add("hJetPhi_resolution", "#varphi resolution as a func. of jet #it{p}_{T, part}", kTH2F, {{40, -1., 1.}, pT}); + spectra.add("hJetPhi_resolution_RecoilJets", "#varphi resolution as a func. of jet #it{p}_{T, part}", kTH2F, {{40, -1., 1.}, pT}); + } + + // Fill histograms with raw or MC det. level data + template + void fillHistograms(Collision const& collision, Jets const& jets, Tracks const& tracks, bool bIsMC = false, float weight = 1.) + { + + bool bSig_Ev = false; + std::vector phi_of_TT_cand; + double phi_TT = 0.; + int nTT = 0; + float pTHat = 0.; + if (bIsMC) + pTHat = getPtHat(weight); + + auto dice = rand->Rndm(); + if (dice < frac_sig) + bSig_Ev = true; + + for (const auto& track : tracks) { + if (!jetderiveddatautilities::selectTrack(track, trackSelection)) + continue; + + spectra.fill(HIST("hTrackPtEtaPhi"), track.pt(), track.eta(), track.phi(), weight); + + // Search for TT candidate + if (bSig_Ev && (track.pt() > pT_TTsig_min && track.pt() < pT_TTsig_max)) { + phi_of_TT_cand.push_back(track.phi()); + ++nTT; + } + + if (!bSig_Ev && (track.pt() > pT_TTref_min && track.pt() < pT_TTref_max)) { + phi_of_TT_cand.push_back(track.phi()); + ++nTT; + } + } + + if (nTT > 0) { // at least 1 TT + + phi_TT = getPhiTT(phi_of_TT_cand); + + if (bSig_Ev) { + spectra.fill(HIST("hNtrig"), 1.5, weight); + spectra.fill(HIST("hTTSig_per_event"), nTT, weight); + } else { + spectra.fill(HIST("hNtrig"), 0.5, weight); + spectra.fill(HIST("hTTRef_per_event"), nTT, weight); + } + } + + for (const auto& jet : jets) { + + if (bIsMC && (jet.pt() > pTHatMax * pTHat)) + continue; + + spectra.fill(HIST("hJetPtEtaPhiRhoArea"), jet.pt(), jet.eta(), jet.phi(), collision.rho() * jet.area(), weight); + + if (nTT > 0) { + auto [dphi, bRecoil] = isRecoilJet(jet, phi_TT); + + if (bSig_Ev) { + + spectra.fill(HIST("hDPhi_JetPt_Corr_TTSig"), dphi, jet.pt() - collision.rho() * jet.area(), weight); + spectra.fill(HIST("hDPhi_JetPt_TTSig"), dphi, jet.pt(), weight); + spectra.fill(HIST("hDPhi_JetPt_RhoArea_TTSig"), dphi, jet.pt(), collision.rho() * jet.area(), weight); + + if (bRecoil) { + spectra.fill(HIST("hRecoil_JetPt_Corr_TTSig"), jet.pt() - collision.rho() * jet.area(), weight); + spectra.fill(HIST("hRecoil_JetPt_TTSig"), jet.pt(), weight); + } + + } else { + spectra.fill(HIST("hDPhi_JetPt_Corr_TTRef"), dphi, jet.pt() - collision.rho() * jet.area(), weight); + spectra.fill(HIST("hDPhi_JetPt_TTRef"), dphi, jet.pt(), weight); + spectra.fill(HIST("hDPhi_JetPt_RhoArea_TTRef"), dphi, jet.pt(), collision.rho() * jet.area(), weight); + + if (bRecoil) { + spectra.fill(HIST("hRecoil_JetPt_Corr_TTRef"), jet.pt() - collision.rho() * jet.area(), weight); + spectra.fill(HIST("hRecoil_JetPt_TTRef"), jet.pt(), weight); + } + } + } + } + } + + template + void fillMCPHistograms(Collision const& collision, Jets const& jets, Particles const& particles, float weight = 1.) + { + bool bSig_Ev = false; + std::vector phi_of_TT_cand; + double phi_TT = 0.; + int nTT = 0; + float pTHat = getPtHat(weight); + + auto dice = rand->Rndm(); + if (dice < frac_sig) + bSig_Ev = true; + + for (const auto& particle : particles) { + + // Need charge and primary particles + bool bParticleNeutral = (static_cast(particle.e()) == 0); + if (bParticleNeutral || (!particle.isPhysicalPrimary())) + continue; + + spectra.fill(HIST("hPartPtEtaPhi"), particle.pt(), particle.eta(), particle.phi(), weight); + + if (bSig_Ev && (particle.pt() > pT_TTsig_min && particle.pt() < pT_TTsig_max)) { + phi_of_TT_cand.push_back(particle.phi()); + ++nTT; + } + + if (!bSig_Ev && (particle.pt() > pT_TTref_min && particle.pt() < pT_TTref_max)) { + phi_of_TT_cand.push_back(particle.phi()); + ++nTT; + } + } + + if (nTT > 0) { + + phi_TT = getPhiTT(phi_of_TT_cand); + + if (bSig_Ev) { + spectra.fill(HIST("hNtrig_Part"), 1.5, weight); + spectra.fill(HIST("hTTSig_per_event_Part"), nTT, weight); + } else { + spectra.fill(HIST("hNtrig_Part"), 0.5, weight); + spectra.fill(HIST("hTTRef_per_event_Part"), nTT, weight); + } + } + + for (const auto& jet : jets) { + + if (jet.pt() > pTHatMax * pTHat) + continue; + + spectra.fill(HIST("hJetPtEtaPhiRhoArea_Part"), jet.pt(), jet.eta(), jet.phi(), collision.rho() * jet.area(), weight); + + if (nTT > 0) { + + auto [dphi, bRecoil] = isRecoilJet(jet, phi_TT); + + if (bSig_Ev) { + + spectra.fill(HIST("hDPhi_JetPt_Corr_TTSig_Part"), dphi, jet.pt() - collision.rho() * jet.area(), weight); + spectra.fill(HIST("hDPhi_JetPt_TTSig_Part"), dphi, jet.pt(), weight); + spectra.fill(HIST("hDPhi_JetPt_RhoArea_TTSig_Part"), dphi, jet.pt(), collision.rho() * jet.area(), weight); + + if (bRecoil) { + spectra.fill(HIST("hRecoil_JetPt_Corr_TTSig_Part"), jet.pt() - collision.rho() * jet.area(), weight); + spectra.fill(HIST("hRecoil_JetPt_TTSig_Part"), jet.pt(), weight); + } + + } else { + + spectra.fill(HIST("hDPhi_JetPt_Corr_TTRef_Part"), dphi, jet.pt() - collision.rho() * jet.area(), weight); + spectra.fill(HIST("hDPhi_JetPt_TTRef_Part"), dphi, jet.pt(), weight); + spectra.fill(HIST("hDPhi_JetPt_RhoArea_TTRef_Part"), dphi, jet.pt(), collision.rho() * jet.area(), weight); + + if (bRecoil) { + spectra.fill(HIST("hRecoil_JetPt_Corr_TTRef_Part"), jet.pt() - collision.rho() * jet.area(), weight); + spectra.fill(HIST("hRecoil_JetPt_TTRef_Part"), jet.pt(), weight); + } + } + } + } + } + + template + void fillMatchedHistograms(Tracks const& tracks, DetLevelJets const& jets_det_level, PartLevelJets const& jets_part_level, float weight = 1.) + { + std::vector phi_of_TT_cand; + double phi_TT = 0.; + float pTHat = getPtHat(weight); + + for (const auto& track : tracks) { + if (!jetderiveddatautilities::selectTrack(track, trackSelection)) + continue; + + if (track.pt() > pT_TTsig_min && track.pt() < pT_TTsig_max) { + phi_of_TT_cand.push_back(track.phi()); + } + } + + bool bTT = phi_of_TT_cand.size() > 0; + if (bTT) + phi_TT = getPhiTT(phi_of_TT_cand); + + for (const auto& jet_det_level : jets_det_level) { + if (jet_det_level.pt() > pTHatMax * pTHat) + continue; + + bool bRecoil = get<1>(isRecoilJet(jet_det_level, phi_TT)) && bTT; + + if (jet_det_level.has_matchedJetGeo()) { + + const auto jets_matched_part_level = jet_det_level.template matchedJetGeo_as>(); // we can add "matchedJetPt_as" later + + for (const auto& jet_matched_part_level : jets_matched_part_level) { + + /* + Which histos we want: + 1) det pT vs. part. pT for inclusive jets (corrected for rho*A and not) + 2) det pT vs. part. pT for recoil jets + 3) same as (1) and (2) but 4D with dphi parts + 4) distribution of fake and miss jets + 5) pT and phi resolutions + */ + + spectra.fill(HIST("hJetPt_PartLevel_vs_DetLevel"), jet_det_level.pt(), jet_matched_part_level.pt(), weight); + spectra.fill(HIST("hJetPt_resolution"), (jet_matched_part_level.pt() - jet_det_level.pt()) / jet_matched_part_level.pt(), jet_matched_part_level.pt(), weight); + spectra.fill(HIST("hJetPhi_resolution"), jet_matched_part_level.phi() - jet_det_level.phi(), jet_matched_part_level.pt(), weight); + + if (bRecoil) { + spectra.fill(HIST("hJetPt_PartLevel_vs_DetLevel_RecoilJets"), jet_det_level.pt(), jet_matched_part_level.pt(), weight); + spectra.fill(HIST("hJetPt_resolution_RecoilJets"), (jet_matched_part_level.pt() - jet_det_level.pt()) / jet_matched_part_level.pt(), jet_matched_part_level.pt(), weight); + spectra.fill(HIST("hJetPhi_resolution_RecoilJets"), jet_matched_part_level.phi() - jet_det_level.phi(), jet_matched_part_level.pt(), weight); + } + } + } else { + spectra.fill(HIST("hFakeJets_pT"), jet_det_level.pt(), weight); + if (bRecoil) + spectra.fill(HIST("hFakeJets_pT_RecoilJets"), jet_det_level.pt(), weight); + } + } + + // Missed jets + for (const auto& jet_part_level : jets_part_level) { + if (!jet_part_level.has_matchedJetGeo()) { + spectra.fill(HIST("hMissedJets_pT"), jet_part_level.pt(), weight); + } + } + } + + void processData(filtered_Coll const& collision, + filtered_Tracks const& tracks, + filtered_Jets const& jets) + { + if (skipEvent(collision)) + return; + + spectra.fill(HIST("vertexZ"), collision.posZ()); + fillHistograms(collision, jets, tracks); + } + PROCESS_SWITCH(recoilJets, processData, "process data", true); + + void processMC_DetLevel(filtered_Coll const& collision, + filtered_Jets_DetLevel const& jets, + filtered_Tracks const& tracks) + { + if (skipEvent(collision)) + return; + + spectra.fill(HIST("vertexZ"), collision.posZ()); + fillHistograms(collision, jets, tracks, true); + } + PROCESS_SWITCH(recoilJets, processMC_DetLevel, "process MC detector level", false); + + void processMC_DetLevel_Weighted(filtered_Coll_DetLevel_to_GetWeight const& collision, + aod::JetMcCollisions const&, + filtered_Jets_DetLevel const& jets, + filtered_Tracks const& tracks) + { + if (skipEvent(collision)) + return; + + /// \TODO: should we implement function to check whether Collision was reconstructed (has_mcCollision() function)? Example: https://github.com/AliceO2Group/O2Physics/blob/1cba330514ab47c15c0095d8cee9633723d8e2a7/PWGJE/Tasks/v0qa.cxx#L166? + auto weight = collision.mcCollision().weight(); // "mcCollision" where is defined? + spectra.fill(HIST("vertexZ"), collision.posZ(), weight); + fillHistograms(collision, jets, tracks, true, weight); + } + PROCESS_SWITCH(recoilJets, processMC_DetLevel_Weighted, "process MC detector level with event weight", false); + + void processMC_PartLevel(filtered_Coll_PartLevel const& collision, + filtered_Jets_PartLevel const& jets, + aod::JetParticles const& particles) + { + spectra.fill(HIST("vertexZ"), collision.posZ()); + fillMCPHistograms(collision, jets, particles); + } + PROCESS_SWITCH(recoilJets, processMC_PartLevel, "process MC particle level", false); + + void processMC_PartLevel_Weighted(filtered_Coll_PartLevel const& collision, + filtered_Jets_PartLevel const& jets, + aod::JetParticles const& particles) + { + auto weight = collision.weight(); + spectra.fill(HIST("vertexZ"), collision.posZ(), weight); + fillMCPHistograms(collision, jets, particles, weight); + } + PROCESS_SWITCH(recoilJets, processMC_PartLevel_Weighted, "process MC particle level with event weight", false); + + void processJetsMatched(filtered_Coll_DetLevel_to_GetWeight const& collision, + aod::JetMcCollisions const&, + filtered_Tracks const& tracks, + filtered_MatchedJets_DetLevel const& mcdjets, + filtered_MatchedJets_PartLevel const& mcpjets) + { + if (skipEvent(collision)) + return; + auto mcpjetsPerMCCollision = mcpjets.sliceBy(PartJetsPerCollision, collision.mcCollisionId()); + fillMatchedHistograms(tracks, mcdjets, mcpjetsPerMCCollision); + } + PROCESS_SWITCH(recoilJets, processJetsMatched, "process matching of MC jets (no weight)", false); + + void processJetsMatched_Weighted(filtered_Coll_DetLevel_to_GetWeight const& collision, + aod::JetMcCollisions const&, + filtered_Tracks const& tracks, + filtered_MatchedJets_DetLevel const& mcdjets, + filtered_MatchedJets_PartLevel const& mcpjets) + { + if (skipEvent(collision)) + return; + + auto mcpjetsPerMCCollision = mcpjets.sliceBy(PartJetsPerCollision, collision.mcCollisionId()); + auto weight = collision.mcCollision().weight(); + + fillMatchedHistograms(tracks, mcdjets, mcpjetsPerMCCollision, weight); + } + PROCESS_SWITCH(recoilJets, processJetsMatched_Weighted, "process matching of MC jets (weighted)", false); + + //------------------------------------------------------------------------------ + // Auxiliary functions + template + bool skipEvent(const Collision& coll) + { + /// \brief: trigger cut is needed for pp data + return !jetderiveddatautilities::selectCollision(coll, eventSelection) || !jetderiveddatautilities::selectTrigger(coll, triggerMaskBits); + } + + template + std::tuple isRecoilJet(const Jet& jet, + double phi_TT) + { + double dphi = std::fabs(RecoDecay::constrainAngle(jet.phi() - phi_TT, -constants::math::PI)); + return {dphi, (constants::math::PI - recoilRegion) < dphi}; + } + + double getPhiTT(const std::vector& phi_of_TT_cand) + { + auto iTrig = rand->Integer(phi_of_TT_cand.size()); + return phi_of_TT_cand[iTrig]; + } + + float getPtHat(float weight) + { + return 10. / (std::pow(weight, 1.0 / pTHatExponent)); + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"recoil-jets"})}; } diff --git a/PWGLF/DataModel/LFHypernucleiKfTables.h b/PWGLF/DataModel/LFHypernucleiKfTables.h index 328ab07f6b3..98f8076b2f6 100644 --- a/PWGLF/DataModel/LFHypernucleiKfTables.h +++ b/PWGLF/DataModel/LFHypernucleiKfTables.h @@ -8,11 +8,15 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -// authors Janik Ditzel and Michael Hartung + +/// \file LFHypernucleiKfTables.h +/// \brief Slim hypernuclei kf tables +/// \author Janik Ditzel and Michael Hartung #ifndef PWGLF_DATAMODEL_LFHYPERNUCLEIKFTABLES_H_ #define PWGLF_DATAMODEL_LFHYPERNUCLEIKFTABLES_H_ +#include #include "Framework/ASoA.h" #include "Framework/AnalysisDataModel.h" #include "Common/DataModel/Centrality.h" @@ -20,13 +24,13 @@ namespace o2::aod { -namespace hykfmcColl +namespace hykfmccoll { DECLARE_SOA_COLUMN(PassedEvSel, passedEvSel, bool); //! } DECLARE_SOA_TABLE(HypKfMcColls, "AOD", "HYPKFMCCOLL", o2::soa::Index<>, - hykfmcColl::PassedEvSel, + hykfmccoll::PassedEvSel, mccollision::PosX, mccollision::PosY, mccollision::PosZ); @@ -40,9 +44,10 @@ DECLARE_SOA_COLUMN(IsPhysicalPrimary, isPhysicalPrimary, bool); //! DECLARE_SOA_COLUMN(Svx, svx, float); //! DECLARE_SOA_COLUMN(Svy, svy, float); //! DECLARE_SOA_COLUMN(Svz, svz, float); //! +DECLARE_SOA_COLUMN(Occupancy, occupancy, int); //! DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float px, float py) { return RecoDecay::pt(std::array{px, py}); }); -DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float E, float pz) { return 0.5 * TMath::Log((E + pz) / (E - pz)); }); -DECLARE_SOA_DYNAMIC_COLUMN(Mass, mass, [](float E, float px, float py, float pz) { return TMath::Sqrt(E * E - px * px - py * py - pz * pz); }); +DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float E, float pz) { return 0.5 * std::log((E + pz) / (E - pz)); }); +DECLARE_SOA_DYNAMIC_COLUMN(Mass, mass, [](float E, float px, float py, float pz) { return std::sqrt(E * E - px * px - py * py - pz * pz); }); DECLARE_SOA_DYNAMIC_COLUMN(IsMatter, isMatter, [](int pdgCode) { return pdgCode > 0; }); } // namespace hykfmc @@ -67,34 +72,35 @@ using HypKfMcPart = HypKfMcParts::iterator; DECLARE_SOA_TABLE(HypKfColls, "AOD", "HYPKFCOLL", o2::soa::Index<>, - hykfmcColl::PassedEvSel, + hykfmccoll::PassedEvSel, hykfmc::HypKfMcCollId, collision::PosX, collision::PosY, collision::PosZ, cent::CentFT0A, cent::CentFT0C, - cent::CentFT0M); + cent::CentFT0M, + hykfmc::Occupancy); using HypKfColl = HypKfColls::iterator; namespace hykftrk { DECLARE_SOA_INDEX_COLUMN(HypKfColl, hypKfColl); DECLARE_SOA_COLUMN(Rigidity, rigidity, float); //! -DECLARE_SOA_COLUMN(TPCnCluster, tpcNcluster, float); //! -DECLARE_SOA_COLUMN(TPCnSigma, tpcNsigma, float); //! -DECLARE_SOA_COLUMN(TPCnSigmaNhp, tpcNsigmaNhp, float); //! -DECLARE_SOA_COLUMN(TPCnSigmaNlp, tpcNsigmaNlp, float); //! -DECLARE_SOA_COLUMN(TOFMass, tofMass, float); //! +DECLARE_SOA_COLUMN(TpcNcluster, tpcNcluster, float); //! +DECLARE_SOA_COLUMN(TpcNsigma, tpcNsigma, float); //! +DECLARE_SOA_COLUMN(TpcNsigmaNhp, tpcNsigmaNhp, float); //! +DECLARE_SOA_COLUMN(TpcNsigmaNlp, tpcNsigmaNlp, float); //! +DECLARE_SOA_COLUMN(TofMass, tofMass, float); //! DECLARE_SOA_COLUMN(IsPVContributor, isPVContributor, bool); //! DECLARE_SOA_COLUMN(SubMass, subMass, float); //! -DECLARE_SOA_DYNAMIC_COLUMN(Px, px, [](float pt, float phi) { return (double)pt * TMath::Cos(phi); }); -DECLARE_SOA_DYNAMIC_COLUMN(Py, py, [](float pt, float phi) { return (double)pt * TMath::Sin(phi); }); -DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, [](float pt, float eta) { return (double)pt * TMath::SinH(eta); }); -DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float pt, float eta) { return pt * TMath::CosH(eta); }); // -DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float pt, float eta, float mass) { return std::log((RecoDecay::sqrtSumOfSquares(mass, pt * TMath::CosH(eta)) + pt * TMath::SinH(eta)) / RecoDecay::sqrtSumOfSquares(mass, pt)); }); -DECLARE_SOA_DYNAMIC_COLUMN(Lambda, lambda, [](float eta) { return 1. / TMath::CosH(eta); }); -DECLARE_SOA_DYNAMIC_COLUMN(ITSnCluster, itsNcluster, [](uint32_t itsClusterSizes) { +DECLARE_SOA_DYNAMIC_COLUMN(Px, px, [](float pt, float phi) { return (double)pt * std::cos(phi); }); +DECLARE_SOA_DYNAMIC_COLUMN(Py, py, [](float pt, float phi) { return (double)pt * std::sin(phi); }); +DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, [](float pt, float eta) { return (double)pt * std::sinh(eta); }); +DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float pt, float eta) { return pt * std::cosh(eta); }); // +DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float pt, float eta, float mass) { return std::log((RecoDecay::sqrtSumOfSquares(mass, pt * std::cosh(eta)) + pt * std::sinh(eta)) / RecoDecay::sqrtSumOfSquares(mass, pt)); }); +DECLARE_SOA_DYNAMIC_COLUMN(Lambda, lambda, [](float eta) { return 1. / std::cosh(eta); }); +DECLARE_SOA_DYNAMIC_COLUMN(ItsNcluster, itsNcluster, [](uint32_t itsClusterSizes) { uint8_t n = 0; for (uint8_t i = 0; i < 7; i++) { if (itsClusterSizes >> (4 * i) & 15) @@ -102,21 +108,21 @@ DECLARE_SOA_DYNAMIC_COLUMN(ITSnCluster, itsNcluster, [](uint32_t itsClusterSizes } return n; }); -DECLARE_SOA_DYNAMIC_COLUMN(ITSfirstLayer, itsFirstLayer, [](uint32_t itsClusterSizes) { +DECLARE_SOA_DYNAMIC_COLUMN(ItsFirstLayer, itsFirstLayer, [](uint32_t itsClusterSizes) { for (int i = 0; i < 8; i++) { if (itsClusterSizes >> (4 * i) & 15) return i; } return -999; }); -DECLARE_SOA_DYNAMIC_COLUMN(ITSmeanClsSize, itsMeanClsSize, [](uint32_t itsClusterSizes) { +DECLARE_SOA_DYNAMIC_COLUMN(ItsMeanClsSize, itsMeanClsSize, [](uint32_t itsClusterSizes) { int sum = 0, n = 0; for (int i = 0; i < 8; i++) { sum += (itsClusterSizes >> (4 * i) & 15); if (itsClusterSizes >> (4 * i) & 15) n++; } - return static_cast(sum) / n; + return n > 0 ? static_cast(sum) / n : 0.f; }); } // namespace hykftrk @@ -128,25 +134,25 @@ DECLARE_SOA_TABLE(HypKfTracks, "AOD", "HYPKFTRACK", track::Phi, track::DcaXY, track::DcaZ, - hykftrk::TPCnCluster, + hykftrk::TpcNcluster, track::TPCChi2NCl, track::ITSClusterSizes, track::ITSChi2NCl, hykftrk::Rigidity, track::TPCSignal, - hykftrk::TPCnSigma, - hykftrk::TPCnSigmaNhp, - hykftrk::TPCnSigmaNlp, - hykftrk::TOFMass, + hykftrk::TpcNsigma, + hykftrk::TpcNsigmaNhp, + hykftrk::TpcNsigmaNlp, + hykftrk::TofMass, hykftrk::IsPVContributor, hykftrk::Px, hykftrk::Py, hykftrk::Pz, hykftrk::P, hykftrk::Lambda, - hykftrk::ITSnCluster, - hykftrk::ITSfirstLayer, - hykftrk::ITSmeanClsSize); + hykftrk::ItsNcluster, + hykftrk::ItsFirstLayer, + hykftrk::ItsMeanClsSize); using HypKfTrack = HypKfTracks::iterator; DECLARE_SOA_TABLE(HypKfSubDs, "AOD", "HYPKFSUBD", @@ -168,10 +174,10 @@ namespace hykfhyp { DECLARE_SOA_INDEX_COLUMN(HypKfColl, hypKfColl); DECLARE_SOA_INDEX_COLUMN(HypKfMcPart, hypKfMcPart); -DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfDaughtAdd, addons); -DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfTrack, daughterTracks); +DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfDaughtAdd, hypKfDaughtAdd); +DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfTrack, hypKfTrack); DECLARE_SOA_SELF_INDEX_COLUMN_FULL(HypDaughter, hypDaughter, int, "HypKfHypNucs"); -DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfSubD, subDaughters); +DECLARE_SOA_ARRAY_INDEX_COLUMN(HypKfSubD, hypKfSubD); DECLARE_SOA_COLUMN(Primary, primary, bool); //! DECLARE_SOA_COLUMN(Mass, mass, float); //! DECLARE_SOA_COLUMN(Px, px, float); //! diff --git a/PWGLF/DataModel/LFNonPromptCascadeTables.h b/PWGLF/DataModel/LFNonPromptCascadeTables.h index aa1a3cdb867..e6ed9470c46 100644 --- a/PWGLF/DataModel/LFNonPromptCascadeTables.h +++ b/PWGLF/DataModel/LFNonPromptCascadeTables.h @@ -113,6 +113,8 @@ DECLARE_SOA_TABLE(NPCascTable, "AOD", "NPCASCTABLE", NPCascadeTable::DeltaPtITSCascade, NPCascadeTable::ITSClusSize, NPCascadeTable::HasReassociatedCluster, + aod::collision::NumContrib, + aod::collision::CollisionTimeRes, NPCascadeTable::PvX, NPCascadeTable::PvY, NPCascadeTable::PvZ, @@ -175,6 +177,8 @@ DECLARE_SOA_TABLE(NPCascTableMC, "AOD", "NPCASCTABLEMC", NPCascadeTable::PdgCodeITStrack, NPCascadeTable::IsFromBeauty, NPCascadeTable::IsFromCharm, + aod::collision::NumContrib, + aod::collision::CollisionTimeRes, NPCascadeTable::PvX, NPCascadeTable::PvY, NPCascadeTable::PvZ, diff --git a/PWGLF/DataModel/ReducedDoublePhiTables.h b/PWGLF/DataModel/ReducedDoublePhiTables.h new file mode 100644 index 00000000000..76cc65312a7 --- /dev/null +++ b/PWGLF/DataModel/ReducedDoublePhiTables.h @@ -0,0 +1,96 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// +/// \author Sourav Kundu + +#ifndef PWGLF_DATAMODEL_REDUCEDDOUBLEPHITABLES_H_ +#define PWGLF_DATAMODEL_REDUCEDDOUBLEPHITABLES_H_ + +#include + +#include "Common/DataModel/Centrality.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/PIDResponse.h" +#include "Common/Core/RecoDecay.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/ASoA.h" + +namespace o2::aod +{ +namespace redphievent +{ +DECLARE_SOA_COLUMN(NumPos, numPos, int); //! Number of positive Kaon +DECLARE_SOA_COLUMN(NumNeg, numNeg, int); //! Number of negative Kaon +} // namespace redphievent +DECLARE_SOA_TABLE(RedPhiEvents, "AOD", "REDPHIEVENT", + o2::soa::Index<>, + bc::GlobalBC, + bc::RunNumber, + timestamp::Timestamp, + collision::PosZ, + collision::NumContrib, + redphievent::NumPos, + redphievent::NumNeg); +using RedPhiEvent = RedPhiEvents::iterator; + +namespace phitrack +{ +DECLARE_SOA_INDEX_COLUMN(RedPhiEvent, redPhiEvent); +DECLARE_SOA_COLUMN(PhiPx, phiPx, float); //! Phi Px +DECLARE_SOA_COLUMN(PhiPy, phiPy, float); //! Phi Py +DECLARE_SOA_COLUMN(PhiPz, phiPz, float); //! Phi Pz +DECLARE_SOA_COLUMN(Phid1Px, phid1Px, float); //! Phi d1 Px +DECLARE_SOA_COLUMN(Phid1Py, phid1Py, float); //! Phi d1 Py +DECLARE_SOA_COLUMN(Phid1Pz, phid1Pz, float); //! Phi d1 Pz +DECLARE_SOA_COLUMN(Phid2Px, phid2Px, float); //! Phi d2 Px +DECLARE_SOA_COLUMN(Phid2Py, phid2Py, float); //! Phi d2 Py +DECLARE_SOA_COLUMN(Phid2Pz, phid2Pz, float); //! Phi d2 Pz +DECLARE_SOA_COLUMN(PhiMass, phiMass, float); //! Phi Mass +DECLARE_SOA_COLUMN(Phid1Index, phid1Index, int64_t); //! Phi d1 index +DECLARE_SOA_COLUMN(Phid2Index, phid2Index, int64_t); //! Phi d2 index +DECLARE_SOA_COLUMN(Phid1Charge, phid1Charge, float); //! Phi d1 charge +DECLARE_SOA_COLUMN(Phid2Charge, phid2Charge, float); //! Phi d1 charge +DECLARE_SOA_COLUMN(Phid1TPC, phid1TPC, float); //! TPC nsigma d1 +DECLARE_SOA_COLUMN(Phid2TPC, phid2TPC, float); //! TPC nsigma d2 +DECLARE_SOA_COLUMN(Phid1TOFHit, phid1TOFHit, int); //! TOF hit d1 +DECLARE_SOA_COLUMN(Phid2TOFHit, phid2TOFHit, int); //! TOF hit d2 +DECLARE_SOA_COLUMN(Phid1TOF, phid1TOF, float); //! TOF nsigma d1 +DECLARE_SOA_COLUMN(Phid2TOF, phid2TOF, float); //! TOF nsigma d2 +} // namespace phitrack +DECLARE_SOA_TABLE(PhiTracks, "AOD", "PHITRACK", + o2::soa::Index<>, + phitrack::RedPhiEventId, + phitrack::PhiPx, + phitrack::PhiPy, + phitrack::PhiPz, + phitrack::Phid1Px, + phitrack::Phid1Py, + phitrack::Phid1Pz, + phitrack::Phid2Px, + phitrack::Phid2Py, + phitrack::Phid2Pz, + phitrack::PhiMass, + phitrack::Phid1Index, + phitrack::Phid2Index, + phitrack::Phid1Charge, + phitrack::Phid2Charge, + phitrack::Phid1TPC, + phitrack::Phid2TPC, + phitrack::Phid1TOFHit, + phitrack::Phid2TOFHit, + phitrack::Phid1TOF, + phitrack::Phid2TOF); + +using PhiTrack = PhiTracks::iterator; +} // namespace o2::aod +#endif // PWGLF_DATAMODEL_REDUCEDDOUBLEPHITABLES_H_ diff --git a/PWGLF/DataModel/ReducedF1ProtonTables.h b/PWGLF/DataModel/ReducedF1ProtonTables.h index e7534204f54..0f5576a2eb9 100644 --- a/PWGLF/DataModel/ReducedF1ProtonTables.h +++ b/PWGLF/DataModel/ReducedF1ProtonTables.h @@ -60,6 +60,8 @@ DECLARE_SOA_COLUMN(F1d3Py, f1d3Py, float); //! F DECLARE_SOA_COLUMN(F1d3Pz, f1d3Pz, float); //! F1 d3 Pz DECLARE_SOA_COLUMN(F1d1TOFHit, f1d1TOFHit, int); //! TOF hit pion DECLARE_SOA_COLUMN(F1d2TOFHit, f1d2TOFHit, int); //! TOF hit pion +DECLARE_SOA_COLUMN(F1d1TPC, f1d1TPC, float); //! TPC nsigma pion +DECLARE_SOA_COLUMN(F1d2TPC, f1d2TPC, float); //! TPC nsigma kaon DECLARE_SOA_COLUMN(F1Mass, f1Mass, float); //! F1 mass DECLARE_SOA_COLUMN(F1MassKaonKshort, f1MassKaonKshort, float); //! F1 mass kaon kshort DECLARE_SOA_COLUMN(F1PionIndex, f1PionIndex, int64_t); //! F1 pion index @@ -93,6 +95,8 @@ DECLARE_SOA_TABLE(F1Tracks, "AOD", "F1TRACK", f1protondaughter::F1d3Pz, f1protondaughter::F1d1TOFHit, f1protondaughter::F1d2TOFHit, + f1protondaughter::F1d1TPC, + f1protondaughter::F1d2TPC, f1protondaughter::F1Mass, f1protondaughter::F1MassKaonKshort, f1protondaughter::F1PionIndex, diff --git a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx index 8b3e2b5532d..cdce26899d5 100644 --- a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx +++ b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx @@ -10,6 +10,7 @@ // or submit itself to any jurisdiction. #include +#include #include #include #include @@ -35,6 +36,7 @@ #include "DataFormatsTPC/BetheBlochAleph.h" #include "Common/Core/PID/PIDTOF.h" #include "Common/TableProducer/PID/pidTOFBase.h" +#include "CCDB/CcdbApi.h" #include "Common/Core/PID/TPCPIDResponse.h" #include "Common/DataModel/PIDResponse.h" @@ -57,9 +59,10 @@ using BCsWithRun2Info = soa::Join; namespace { constexpr int kNpart = 2; -constexpr float trackSels[10]{/* 60, */ 80, 100, 2, 3, /* 4, */ 0.05, 0.1, /* 0.15, */ 0.5, 1, /* 1.5, */ 2, 3 /* , 4 */}; +constexpr float trackSels[12]{/* 60, */ 80, 100, 2, 3, /* 4, */ 0.05, 0.1, /* 0.15, */ 0.5, 1, /* 1.5, */ 2, 3 /* , 4 */, 2, 3, /*, 4 */}; constexpr float dcaSels[3]{10., 10., 10.}; constexpr double betheBlochDefault[kNpart][6]{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}, {-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}}; +constexpr double betheBlochDefaultITS[6]{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}; constexpr double estimatorsCorrelationCoef[2]{-0.669108, 1.04489}; constexpr double estimatorsSigmaPars[4]{0.933321, 0.0416976, -0.000936344, 8.92179e-06}; constexpr double deltaEstimatorNsigma[2]{5.5, 5.}; @@ -67,7 +70,7 @@ constexpr double partMass[kNpart]{o2::constants::physics::MassProton, o2::consta constexpr double partPdg[kNpart]{2212, o2::constants::physics::kDeuteron}; static const std::vector betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"}; static const std::vector particleNamesPar{"p", "d"}; -static const std::vector trackSelsNames{"tpcClsMid", "tpcClsTight", "chi2TpcTight", "chi2TpcMid", "dcaxyTight", "dcaxyMid", "dcazTight", "dcazMid", "tpcNsigmaTight", "tpcNsigmaMid"}; +static const std::vector trackSelsNames{"tpcClsMid", "tpcClsTight", "chi2TpcTight", "chi2TpcMid", "dcaxyTight", "dcaxyMid", "dcazTight", "dcazMid", "tpcNsigmaTight", "tpcNsigmaMid", "itsNsigmaTight", "itsNsigmaMid"}; static const std::vector dcaSelsNames{"dcaxy", "dcaz", "dca"}; static const std::vector particleName{"p"}; std::array, kNpart> tofMass; @@ -205,6 +208,7 @@ struct ebyeMaker { std::array, 2> candidateTracks; Service ccdb; o2::vertexing::DCAFitterN<2> fitter; + std::vector classIds; int mRunNumber; float d_bz; @@ -213,6 +217,7 @@ struct ebyeMaker { Configurable cfgMaterialCorrection{"cfgMaterialCorrection", static_cast(o2::base::Propagator::MatCorrType::USEMatCorrNONE), "Type of material correction"}; Configurable> cfgBetheBlochParams{"cfgBetheBlochParams", {betheBlochDefault[0], 2, 6, particleNamesPar, betheBlochParNames}, "TPC Bethe-Bloch parameterisation for deuteron"}; + Configurable> cfgBetheBlochParamsITS{"cfgBetheBlochParamsITS", {betheBlochDefaultITS, 1, 6, particleName, betheBlochParNames}, "ITS Bethe-Bloch parameterisation for deuteron"}; ConfigurableAxis centAxis{"centAxis", {106, 0, 106}, "binning for the centrality"}; ConfigurableAxis zVtxAxis{"zVtxBins", {100, -20.f, 20.f}, "Binning for the vertex z in cm"}; @@ -289,7 +294,7 @@ struct ebyeMaker { Configurable antidItsClsSizeCut{"antidItsClsSizeCut", 1.e-10f, "cluster size cut for antideuterons"}; Configurable antidPtItsClsSizeCut{"antidPtItsClsSizeCut", 10.f, "pt for cluster size cut for antideuterons"}; - Configurable> cfgTrackSels{"cfgTrackSels", {trackSels, 1, 10, particleName, trackSelsNames}, "Track selections"}; + Configurable> cfgTrackSels{"cfgTrackSels", {trackSels, 1, 12, particleName, trackSelsNames}, "Track selections"}; std::array ptMin; std::array ptTof; @@ -380,7 +385,7 @@ struct ebyeMaker { if (mRunNumber == bc.runNumber()) { return; } - + classIds.clear(); auto timestamp = bc.timestamp(); o2::parameters::GRPObject* grpo = 0x0; o2::parameters::GRPMagField* grpmag = 0x0; @@ -441,19 +446,36 @@ struct ebyeMaker { d_bz = o2::base::Propagator::Instance()->getNominalBz(); LOG(info) << "Retrieved GRP for timestamp " << timestamp << " with magnetic field of " << d_bz << " kG"; mRunNumber = bc.runNumber(); + if (doprocessMiniRun2) { + o2::ccdb::CcdbApi ccdbApi; + ccdbApi.init("http://alice-ccdb.cern.ch"); + std::map metadata; + std::map* classNameToIndexMap = ccdbApi.retrieveFromTFileAny>("CTP/ClassNameToIndexMap", metadata, mRunNumber); + for (const auto& classToIndexPair : *classNameToIndexMap) { + bool hasClassName = classToIndexPair.first.find("HMV0M") < classToIndexPair.first.length(); + int classId = hasClassName ? classToIndexPair.second - 1 : -1; + if (classId < 0) { + continue; + } + classIds.push_back(classId); + } + } fitter.setBz(d_bz); // o2::base::Propagator::Instance()->setMatLUT(lut); } template - float getITSSignal(T const& track, aod::Run2TrackExtras const& trackExtraRun2) + std::pair getITSSignal(T const& track, aod::Run2TrackExtras const& trackExtraRun2) { if ((doprocessMiniRun2 || doprocessMiniMcRun2) && track.hasITS()) { auto extra = trackExtraRun2.rawIteratorAt(track.globalIndex()); - return extra.itsSignal(); + double expBethe{tpc::BetheBlochAleph(static_cast(track.p() / partMass[0]), cfgBetheBlochParamsITS->get("p0"), cfgBetheBlochParamsITS->get("p1"), cfgBetheBlochParamsITS->get("p2"), cfgBetheBlochParamsITS->get("p3"), cfgBetheBlochParamsITS->get("p4"))}; + double expSigma{expBethe * cfgBetheBlochParamsITS->get("resolution")}; + auto nSigmaITS = static_cast((extra.itsSignal() - expBethe) / expSigma); + return std::make_pair(extra.itsSignal(), nSigmaITS); } - return -999.f; + return std::make_pair(-999.f, -999.f); } template @@ -518,8 +540,10 @@ struct ebyeMaker { mask |= kTPCPIDTight; else if (std::abs(track.tpcnsigma) < cfgTrackSels->get("tpcNsigmaMid")) mask |= kTPCPIDMid; - // if (track.itsnsigma < 2) mask |= kITSPIDTight; - // else if (track.itsnsigma < 3) mask |= kITSPIDMid; + if (std::abs(track.itsnsigma) < cfgTrackSels->get("itsNsigmaTight")) + mask |= kITSPIDTight; + else if (std::abs(track.itsnsigma) < cfgTrackSels->get("itsNsigmaMid")) + mask |= kITSPIDMid; return mask; } @@ -1041,7 +1065,7 @@ struct ebyeMaker { continue; float v0m = getV0M(bc.globalIndex(), collision.posZ(), fv0as, fv0cs); - float cV0M = -999.f; + float cV0M = 105.f; if (Run2V0MInfo.mCalibrationStored) { cV0M = Run2V0MInfo.mhMultSelCalib->GetBinContent(Run2V0MInfo.mhMultSelCalib->FindFixBin(v0m)); if (!(collision.sel7() && collision.alias_bit(kINT7)) && (!kINT7Intervals || (kINT7Intervals && ((cV0M >= 10 && cV0M < 30) || cV0M > 50)))) @@ -1127,7 +1151,7 @@ struct ebyeMaker { continue; float v0m = getV0M(bc.globalIndex(), collision.posZ(), fv0as, fv0cs); - float cV0M = -999.f; + float cV0M = 105.f; if (Run2V0MInfo.mCalibrationStored) { cV0M = Run2V0MInfo.mhMultSelCalib->GetBinContent(Run2V0MInfo.mhMultSelCalib->FindFixBin(v0m)); } @@ -1141,14 +1165,24 @@ struct ebyeMaker { fillRecoEvent(collision, tracks, V0Table_thisCollision, cV0M); uint8_t trigger = collision.alias_bit(kINT7) ? 0x1 : 0x0; + for (auto& classId : classIds) { + if (bc.triggerMask() & BIT(classId)) { + trigger |= 0x2; + cV0M = cV0M < 104.f ? cV0M * 100. : cV0M; + break; + } + } + if (trigger == 0x0) { + continue; + } miniCollTable(static_cast(collision.posZ() * 10), trigger, nTrackletsColl, cV0M); for (auto& candidateTrack : candidateTracks[0]) { // protons auto tk = tracks.rawIteratorAt(candidateTrack.globalIndex); float outerPID = getOuterPID(tk); - float itsSignal = getITSSignal(tk, trackExtraRun2); + auto [itsSignal, nSigmaITS] = getITSSignal(tk, trackExtraRun2); histos.fill(HIST("QA/itsSignal"), tk.p(), itsSignal); - + candidateTrack.itsnsigma = nSigmaITS; candidateTrack.outerPID = tk.pt() < antipPtTof ? candidateTrack.outerPID : outerPID; int selMask = getTrackSelMask(candidateTrack); if (candidateTrack.outerPID < outerPIDMin) @@ -1247,7 +1281,7 @@ struct ebyeMaker { continue; float v0m = getV0M(bc.globalIndex(), collision.posZ(), fv0as, fv0cs); - float cV0M = -999.f; + float cV0M = 105.f; if (Run2V0MInfo.mCalibrationStored) { cV0M = Run2V0MInfo.mhMultSelCalib->GetBinContent(Run2V0MInfo.mhMultSelCalib->FindFixBin(v0m)); } @@ -1319,7 +1353,7 @@ struct ebyeMaker { continue; float v0m = getV0M(bc.globalIndex(), collision.posZ(), fv0as, fv0cs); - float cV0M = -999.f; + float cV0M = 105.f; if (Run2V0MInfo.mCalibrationStored) { cV0M = Run2V0MInfo.mhMultSelCalib->GetBinContent(Run2V0MInfo.mhMultSelCalib->FindFixBin(v0m)); } @@ -1340,9 +1374,9 @@ struct ebyeMaker { if (candidateTrack.isreco) { auto tk = tracks.rawIteratorAt(candidateTrack.globalIndex); float outerPID = getOuterPID(tk); - float itsSignal = getITSSignal(tk, trackExtraRun2); + auto [itsSignal, nSigmaITS] = getITSSignal(tk, trackExtraRun2); histos.fill(HIST("QA/itsSignal"), tk.p(), itsSignal); - + candidateTrack.itsnsigma = nSigmaITS; candidateTrack.outerPID = tk.pt() < antipPtTof ? candidateTrack.outerPID : outerPID; selMask = getTrackSelMask(candidateTrack); // if (candidateTrack.outerPID < -4) diff --git a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx index 5f05fb4fa1d..860272354c4 100644 --- a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx +++ b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx @@ -239,7 +239,7 @@ struct he3hadronfemto { {"hEmptyPool", "svPoolCreator did not find track pairs false/true", {HistType::kTH1F, {{2, -0.5, 1.5}}}}, {"hDCAxyHe3", ";DCA_{xy} (cm)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}}, {"hDCAzHe3", ";DCA_{z} (cm)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}}, - {"hhe3HadtInvMass", "; M(^{3}He + p) (GeV/#it{c}^{2})", {HistType::kTH1F, {{50, 3.74f, 3.85f}}}}, + {"hhe3HadtInvMass", "; M(^{3}He + p) (GeV/#it{c}^{2})", {HistType::kTH1F, {{300, 3.74f, 4.34f}}}}, {"hHe3Pt", "#it{p}_{T} distribution; #it{p}_{T} (GeV/#it{c})", {HistType::kTH1F, {{240, -6.0f, 6.0f}}}}, {"hHadronPt", "Pt distribution; #it{p}_{T} (GeV/#it{c})", {HistType::kTH1F, {{120, -3.0f, 3.0f}}}}, {"h2dEdxHe3candidates", "dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {100, 0.0f, 2000.0f}}}}, diff --git a/PWGLF/TableProducer/Nuspex/hypKfRecoTask.cxx b/PWGLF/TableProducer/Nuspex/hypKfRecoTask.cxx index 353459c835b..4dcdf0f67ec 100644 --- a/PWGLF/TableProducer/Nuspex/hypKfRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/hypKfRecoTask.cxx @@ -9,10 +9,10 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. /// -/// \brief Hypernuclei rconstruction using KGParticle package -/// \authors Janik Ditzel and Michael Hartung +/// \file hypKfRecoTask.cxx +/// \brief Hypernuclei rconstruction using KFParticle package +/// \author Janik Ditzel and Michael Hartung -#include #include #include #include @@ -42,7 +42,7 @@ // KFParticle #ifndef HomogeneousField -#define HomogeneousField +#define HomogeneousField // o2-linter: disable=[name/macro] #endif #include "KFParticle.h" #include "KFPTrack.h" @@ -78,22 +78,22 @@ static const std::vector particleCharge{1, 1, 1, 1, 2, 2}; const int nBetheParams = 6; static const std::vector betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"}; constexpr double betheBlochDefault[nDaughterParticles][nBetheParams]{ - {14.182511, 3.784237, 0.010118, 1.775545, 0.742465, 0.09}, // pion - {23.248183, 2.357092, -0.143924, 2.178266, 0.416733, 0.09}, // proton - {12.881922, 3.775785, 0.062699, 2.452242, 1.049385, 0.09}, // deuteron - {0.313129, 181.664226, 2779397163087.684082, 2.130773, 29.609643, 0.09}, // triton - {70.584685, 3.196364, 0.133878, 2.731736, 1.675617, 0.09}, // helion - {105.625770, 0.868172, -0.871411, 1.895609, 0.046273, 0.09}}; // alpha - -const int nTrkSettings = 13; -static const std::vector trackPIDsettingsNames{"useBBparams", "minITSnCls", "minTPCnCls", "maxTPCchi2", "maxITSchi2", "minRigidity", "maxRigidity", "maxTPCnSigma", "TOFrequiredabove", "minTOFmass", "maxTOFmass", "minDcaToPvXY", "minDcaToPvZ"}; + {13.611469, 3.598765, -0.021138, 2.039562, 0.651040, 0.09}, // pion + {5.393020, 7.859534, 0.004048, 2.323197, 1.609307, 0.09}, // proton + {5.393020, 7.859534, 0.004048, 2.323197, 1.609307, 0.09}, // deuteron + {5.393020, 7.859534, 0.004048, 2.323197, 1.609307, 0.09}, // triton + {-126.557359, -0.858569, 1.111643, 1.210323, 2.656374, 0.09}, // helion + {-126.557359, -0.858569, 1.111643, 1.210323, 2.656374, 0.09}}; // alpha + +const int nTrkSettings = 15; +static const std::vector trackPIDsettingsNames{"useBBparams", "minITSnCls", "minTPCnCls", "maxTPCchi2", "maxITSchi2", "minRigidity", "maxRigidity", "maxTPCnSigma", "TOFrequiredabove", "minTOFmass", "maxTOFmass", "minDcaToPvXY", "minDcaToPvZ", "minITSclsSize", "maxITSclsSize"}; constexpr double trackPIDsettings[nDaughterParticles][nTrkSettings]{ - {0, 0, 50, 5, 50, 0.2, 1.2, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}, - {0, 0, 50, 5, 50, 0.5, 100, 3, -1, 0, 100, 0., 0.}}; + {0, 0, 60, 3.0, 5000, 0.15, 1.2, 2.5, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 70, 2.5, 5000, 0.20, 4.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 70, 5.0, 5000, 0.50, 5.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 70, 5.0, 5000, 0.50, 5.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 75, 1.5, 5000, 0.50, 5.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}, + {1, 0, 70, 1.5, 5000, 0.50, 5.0, 3.0, -1, 0, 100, 0., 0., 0., 1000}}; static const int nHyperNuclei = 10; static const std::vector hyperNucNames{"L->p+pi", "3LH->3He+pi", "3LH->d+p+pi", "4LH->4He+pi", "4LH->t+p+pi", "4LHe->3He+p+pi", "5LHe->4He+p+pi", "5LHe->3He+d+pi", "custom1", "custom2"}; @@ -119,29 +119,29 @@ static const std::string hyperNucSigns[nHyperNuclei][4]{{"+", "-", "", ""}, {"+" const int nSelPrim = 8; static const std::vector preSelectionPrimNames{"minMass", "maxMass", "minCt", "maxCt", "minCosPa", "maxDcaTracks", "maxDcaMotherToPvXY", "maxDcaMotherToPvZ"}; constexpr double preSelectionsPrimaries[nHyperNuclei][nSelPrim]{ - {1.0, 1.3, 0, 100, -1., 100., 10., 10.}, - {2.9, 3.1, 0, 100, -1., 100., 10., 10.}, - {2.9, 3.1, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {4.6, 5.2, 0, 100, -1., 100., 10., 10.}, - {4.6, 5.2, 0, 100, -1., 100., 10., 10.}, - {0.0, 9.9, 0, 100, -1., 100., 10., 10.}, - {0.0, 9.9, 0, 100, -1., 100., 10., 10.}}; + {1.00, 1.30, 0, 50, 0.90, 100., 2.0, 5.0}, + {2.96, 3.04, 0, 30, 0.99, 100., 1.5, 4.0}, + {2.96, 3.04, 0, 30, 0.99, 100., 1.5, 4.0}, + {3.87, 3.97, 0, 30, 0.95, 100., 2.0, 5.0}, + {3.87, 3.97, 0, 30, 0.95, 100., 2.0, 5.0}, + {3.85, 3.99, 0, 30, 0.98, 100., 1.5, 4.0}, + {4.60, 5.20, 0, 100, -1., 100., 10., 10.}, + {4.60, 5.20, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}}; const int nSelSec = 8; static const std::vector preSelectionSecNames{"minMass", "maxMass", "minCt", "maxCt", "minCosPaSv", "maxDcaTracks", "maxDcaMotherToSvXY", "maxDcaMotherToSvZ"}; constexpr double preSelectionsSecondaries[nHyperNuclei][nSelSec]{ - {1.0, 1.3, 0, 100, -1., 100., 10., 10.}, - {2.9, 3.1, 0, 100, -1., 100., 10., 10.}, - {2.9, 3.1, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {3.6, 4.2, 0, 100, -1., 100., 10., 10.}, - {4.6, 5.2, 0, 100, -1., 100., 10., 10.}, - {4.6, 5.2, 0, 100, -1., 100., 10., 10.}, - {0.0, 9.9, 0, 100, -1., 100., 10., 10.}, - {0.0, 9.9, 0, 100, -1., 100., 10., 10.}}; + {1.00, 1.30, 0, 50, 0.90, 100., 2.0, 5.0}, + {2.96, 3.04, 0, 30, 0.99, 100., 1.5, 4.0}, + {2.96, 3.04, 0, 30, 0.99, 100., 1.5, 4.0}, + {3.87, 3.97, 0, 30, 0.95, 100., 2.0, 5.0}, + {3.87, 3.97, 0, 30, 0.95, 100., 2.0, 5.0}, + {3.85, 3.99, 0, 30, 0.98, 100., 1.5, 4.0}, + {4.60, 5.20, 0, 100, -1., 100., 10., 10.}, + {4.60, 5.20, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}}; static const int nCascades = 6; static const std::vector cascadeNames{"4LLH->4LHe+pi", "4XHe->4LHe+pi", "custom1", "custom2", "custom3", "custom4"}; @@ -161,15 +161,15 @@ static const std::string cascadeSigns[nCascades][4]{{"+", "-", "", ""}, {"+", "- const int nSelCas = 8; static const std::vector preSelectionCascadeNames{"minMass", "maxMass", "minCt", "maxCt", "minCosPa", "maxDcaTracks", "maxDcaMotherToPvXY", "maxDcaMotherToPvZ"}; constexpr double preSelectionsCascades[nCascades][nSelCas]{ - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}, - {3.9, 4.3, 0, 100, -1., 100., 10., 10.}}; + {4.00, 4.20, 0, 30, 0.95, 100., 2.0, 5.}, + {4.00, 4.20, 0, 30, 0.95, 100., 2.0, 5.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}, + {0.00, 9.90, 0, 100, -1., 100., 10., 10.}}; //---------------------------------------------------------------------------------------------------------------- -struct daughterParticle { +struct DaughterParticle { TString name; int pdgCode; double mass; @@ -177,7 +177,7 @@ struct daughterParticle { double resolution; std::vector betheParams; - daughterParticle(std::string name_, int pdgCode_, double mass_, int charge_, LabeledArray bethe) + DaughterParticle(std::string name_, int pdgCode_, double mass_, int charge_, LabeledArray bethe) { name = TString(name_); pdgCode = pdgCode_; @@ -188,19 +188,9 @@ struct daughterParticle { for (unsigned int i = 0; i < 5; i++) betheParams.push_back(bethe.get(name, i)); } +}; // class DaughterParticle - void Print() - { - std::cout << std::endl - << "Daughter: " << name << std::endl; - std::cout << "PDG: " << pdgCode << ", Mass: " << mass << ", Charge: " << charge << std::endl; - for (double d : betheParams) - std::cout << d << ", " << std::flush; - std::cout << resolution << std::endl; - } -}; // class daughterParticle - -struct hyperNucleus { +struct HyperNucleus { TString name; int pdgCode; double massMax; @@ -209,48 +199,37 @@ struct hyperNucleus { std::vector daughters; std::vector daughterTrackSigns; - hyperNucleus(std::string name_, int pdgCode_, bool active_, std::vector daughters_, std::vector daughterTrackSigns_) + HyperNucleus(std::string name_, int pdgCode_, bool active_, std::vector daughters_, std::vector daughterTrackSigns_) { name = TString(name_); pdgCode = pdgCode_; active = active_; - for (int d : daughters_) + for (const int& d : daughters_) daughters.push_back(d); - for (int dc : daughterTrackSigns_) + for (const int& dc : daughterTrackSigns_) daughterTrackSigns.push_back(dc); } - hyperNucleus(std::string name_, int pdgCode_, bool active_, int hypDaughter, std::vector daughters_, std::vector daughterTrackSigns_) + HyperNucleus(std::string name_, int pdgCode_, bool active_, int hypDaughter, std::vector daughters_, std::vector daughterTrackSigns_) { daughters.push_back(hypDaughter); name = TString(name_); pdgCode = pdgCode_; active = active_; - for (int d : daughters_) + for (const int& d : daughters_) daughters.push_back(d); - for (int dc : daughterTrackSigns_) + for (const int& dc : daughterTrackSigns_) daughterTrackSigns.push_back(dc); } - int GetNdaughters() { return static_cast(daughters.size()); } + int getNdaughters() { return static_cast(daughters.size()); } const char* motherName() { return name.Contains("->") ? ((TString)name(0, name.First("-"))).Data() : name.Data(); } const char* daughterNames() { return name.Contains("->") ? ((TString)name(name.First("-") + 2, name.Length())).Data() : ""; } - void Print() - { - std::cout << std::endl - << "Hypernucleus: " << name << " (" << pdgCode << "):" << (active ? " active" : " not active") << std::endl; - for (double d : daughters) - std::cout << d << ", " << std::flush; - for (double dc : daughterTrackSigns) - std::cout << dc << ", " << std::flush; - std::cout << std::endl - << std::endl; - } -}; // class hyperNucleus +}; // class HyperNucleus -struct hyperNucCandidate { +struct HyperNucCandidate { int species; KFParticle kfp; std::vector kfpDaughters; - hyperNucCandidate* hypNucDaughter; + HyperNucCandidate* hypNucDaughter; std::vector daughterTrackIds; std::vector recoSV; float devToVtx; @@ -263,24 +242,24 @@ struct hyperNucCandidate { int64_t mcParticleId; int tableId; - hyperNucCandidate(int species_, std::vector kfpDaughters_, std::vector daughterTrackIds_) : species(species_), hypNucDaughter(0), devToVtx(999), dcaToVtxXY(999), dcaToVtxZ(999), chi2(999), mcTrue(false), isPhysPrimary(false), isPrimaryCandidate(false), isSecondaryCandidate(false), isUsedSecondary(false), mcParticleId(-1), tableId(-1) + HyperNucCandidate(int species_, std::vector kfpDaughters_, std::vector daughterTrackIds_) : species(species_), hypNucDaughter(0), devToVtx(999), dcaToVtxXY(999), dcaToVtxZ(999), chi2(999), mcTrue(false), isPhysPrimary(false), isPrimaryCandidate(false), isSecondaryCandidate(false), isUsedSecondary(false), mcParticleId(-1), tableId(-1) { - for (auto kfd : kfpDaughters_) + for (const auto& kfd : kfpDaughters_) kfpDaughters.push_back(kfd); - for (auto dt : daughterTrackIds_) + for (const auto& dt : daughterTrackIds_) daughterTrackIds.push_back(dt); - Init(); + init(); } - hyperNucCandidate(int species_, hyperNucCandidate* hypNucDaughter_, std::vector kfpDaughters_, std::vector daughterTrackIds_) : species(species_), hypNucDaughter(hypNucDaughter_), devToVtx(999), dcaToVtxXY(999), dcaToVtxZ(999), chi2(999), mcTrue(false), isPhysPrimary(false), isPrimaryCandidate(false), isSecondaryCandidate(false), isUsedSecondary(false), mcParticleId(-1), tableId(-1) + HyperNucCandidate(int species_, HyperNucCandidate* hypNucDaughter_, std::vector kfpDaughters_, std::vector daughterTrackIds_) : species(species_), hypNucDaughter(hypNucDaughter_), devToVtx(999), dcaToVtxXY(999), dcaToVtxZ(999), chi2(999), mcTrue(false), isPhysPrimary(false), isPrimaryCandidate(false), isSecondaryCandidate(false), isUsedSecondary(false), mcParticleId(-1), tableId(-1) { - for (auto kfd : kfpDaughters_) + for (const auto& kfd : kfpDaughters_) kfpDaughters.push_back(kfd); - for (auto dt : daughterTrackIds_) + for (const auto& dt : daughterTrackIds_) daughterTrackIds.push_back(dt); - Init(); + init(); } - void Init() + void init() { kfp.SetConstructMethod(2); for (size_t i = 0; i < kfpDaughters.size(); i++) @@ -292,7 +271,7 @@ struct hyperNucCandidate { recoSV.push_back(kfp.GetY()); recoSV.push_back(kfp.GetZ()); } - bool CheckKfp() + bool checkKfp() { if (kfp.GetMass() == 0) return false; @@ -300,67 +279,67 @@ struct hyperNucCandidate { return false; return true; } - int GetDaughterTableId() + int getDaughterTableId() { if (hypNucDaughter) return hypNucDaughter->tableId; return -1; } - bool IsCascade() { return hypNucDaughter != 0; } - int GetSign() + bool isCascade() { return hypNucDaughter != 0; } + int getSign() { if (kfp.GetQ() == 0) return kfpDaughters.front().GetQ() / std::abs(kfpDaughters.front().GetQ()); return kfp.GetQ() / std::abs(kfp.GetQ()); } - int GetNdaughters() { return static_cast(kfpDaughters.size()); } - float GetDcaTracks() { return GetNdaughters() == 2 ? GetDcaTracks2() : GetMaxDcaToSv(); } - float GetDcaTracks2() { return kfpDaughters.at(0).GetDistanceFromParticle(kfpDaughters.at(1)); } - float GetMaxDcaToSv() + int getNdaughters() { return static_cast(kfpDaughters.size()); } + float getDcaTracks() { return getNdaughters() == 2 ? getDcaTracks2() : getMaxDcaToSv(); } + float getDcaTracks2() { return kfpDaughters.at(0).GetDistanceFromParticle(kfpDaughters.at(1)); } + float getMaxDcaToSv() { float maxDca = std::numeric_limits::lowest(); - for (auto& daughter : kfpDaughters) { + for (const auto& daughter : kfpDaughters) { float dca = daughter.GetDistanceFromVertex(&recoSV[0]); if (dca > maxDca) maxDca = dca; } return maxDca; } - float GetDcaMotherToVertex(std::vector vtx) { return kfp.GetDistanceFromVertex(&vtx[0]); } - double GetCpa(std::vector vtx) + float getDcaMotherToVertex(std::vector vtx) { return kfp.GetDistanceFromVertex(&vtx[0]); } + double getCpa(std::vector vtx) { kfp.TransportToDecayVertex(); return RecoDecay::cpa(std::array{vtx[0], vtx[1], vtx[2]}, std::array{recoSV[0], recoSV[1], recoSV[2]}, std::array{kfp.GetPx(), kfp.GetPy(), kfp.GetPz()}); ; } - float GetCt(std::vector vtx) + float getCt(std::vector vtx) { float dl = 0; for (size_t i = 0; i < vtx.size(); i++) { float tmp = recoSV.at(i) - vtx.at(i); dl += (tmp * tmp); } - return TMath::Sqrt(dl) * kfp.GetMass() / kfp.GetP(); + return std::sqrt(dl) * kfp.GetMass() / kfp.GetP(); } - float GetDcaMotherToVtxXY(std::vector vtx) { return kfp.GetDistanceFromVertexXY(&vtx[0]); } - float GetDcaMotherToVtxZ(std::vector vtx) + float getDcaMotherToVtxXY(std::vector vtx) { return kfp.GetDistanceFromVertexXY(&vtx[0]); } + float getDcaMotherToVtxZ(std::vector vtx) { kfp.TransportToPoint(&vtx[0]); - return std::abs(kfp.GetZ() - vtx[2]); + return kfp.GetZ() - vtx[2]; } - void GetDaughterPosMom(int daughter, std::vector& posMom) + void getDaughterPosMom(int daughter, std::vector& posMom) { kfpDaughters.at(daughter).TransportToPoint(&recoSV[0]); posMom.assign({kfpDaughters.at(daughter).GetX(), kfpDaughters.at(daughter).GetY(), kfpDaughters.at(daughter).GetZ(), kfpDaughters.at(daughter).GetPx(), kfpDaughters.at(daughter).GetPy(), kfpDaughters.at(daughter).GetPz()}); } - void CalcDevToVtx(KFPVertex& vtx) { devToVtx = kfp.GetDeviationFromVertexXY(vtx); } - void CalcDevToVtx(hyperNucCandidate& cand) + void calcDevToVtx(KFPVertex& vtx) { devToVtx = kfp.GetDeviationFromVertexXY(vtx); } + void calcDevToVtx(HyperNucCandidate& cand) { devToVtx = kfp.GetDeviationFromParticleXY(cand.kfp); - dcaToVtxXY = GetDcaMotherToVtxXY(cand.recoSV); - dcaToVtxZ = GetDcaMotherToVtxZ(cand.recoSV); + dcaToVtxXY = getDcaMotherToVtxXY(cand.recoSV); + dcaToVtxZ = getDcaMotherToVtxZ(cand.recoSV); } - float GetSubDaughterMass(int d1, int d2) + float getSubDaughterMass(int d1, int d2) { KFParticle subDaughter; subDaughter.SetConstructMethod(2); @@ -369,16 +348,30 @@ struct hyperNucCandidate { subDaughter.TransportToDecayVertex(); return subDaughter.GetMass(); } -}; // class hyperNucCandidate + KFParticle getDaughterTrackKfp(int track) + { + return kfpDaughters.at(track + (isCascade() ? 1 : 0)); + } + float getDcaTrackToVtxXY(int track, std::vector vtx) + { + return getDaughterTrackKfp(track).GetDistanceFromVertexXY(&vtx[0]); + } + float getDcaTrackToVtxZ(int track, std::vector vtx) + { + auto dKfp = getDaughterTrackKfp(track); + dKfp.TransportToPoint(&vtx[0]); + return dKfp.GetZ() - vtx[2]; + } +}; // class HyperNucCandidate -struct indexPairs { +struct IndexPairs { std::vector> pairs; - void Add(int64_t a, int b) { pairs.push_back({a, b}); } - void Clear() { pairs.clear(); } - bool GetIndex(int64_t a, int& b) + void add(int64_t a, int b) { pairs.push_back({a, b}); } + void clear() { pairs.clear(); } + bool getIndex(int64_t a, int& b) { - for (auto& pair : pairs) { + for (const auto& pair : pairs) { if (pair.first == a) { b = pair.second; return true; @@ -386,15 +379,15 @@ struct indexPairs { } return false; } -}; // class indexPairs +}; // class IndexPairs -struct mcCollInfo { +struct McCollInfo { bool hasRecoColl; bool passedEvSel; bool hasRecoParticle; int tableIndex; - mcCollInfo() : hasRecoColl(false), passedEvSel(false), hasRecoParticle(false), tableIndex(-1) {} -}; // class mcCollInfo + McCollInfo() : hasRecoColl(false), passedEvSel(false), hasRecoParticle(false), tableIndex(-1) {} +}; // class McCollInfo //---------------------------------------------------------------------------------------------------------------- std::vector> hDeDx; @@ -403,7 +396,7 @@ std::vector> hInvMass; //---------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------- -struct hypKfRecoTask { +struct hypKfRecoTask { // o2-linter: disable=[name/workflow-file][name/struct] Produces outputMcCollisionTable; Produces outputMcParticleTable; @@ -426,7 +419,7 @@ struct hypKfRecoTask { Configurable> cfgHyperNucsActive{"cfgHyperNucsActive", {hyperNucEnabled[0], nHyperNuclei, 1, hyperNucNames, hyperNucEnabledLb}, "enable or disable reconstruction"}; Configurable> cfgReduce{"cfgReduce", {reduceFactor[0], nHyperNuclei, 1, hyperNucNames, reduceLb}, "reconstruct only a percentage of all possible hypernuclei"}; - Configurable> cfgHyperNucPdg{"cfgHyperNucsPdg", {hyperNucPdgCodes[0], nHyperNuclei, 1, hyperNucNames, hyperNucPdgLb}, "PDG codes"}; + Configurable> cfgHyperNucPdg{"cfgHyperNucPdg", {hyperNucPdgCodes[0], nHyperNuclei, 1, hyperNucNames, hyperNucPdgLb}, "PDG codes"}; Configurable> cfgHyperNucDaughters{"cfgHyperNucDaughters", {hyperNucDaughters[0], nHyperNuclei, 4, hyperNucNames, hyperNucDaughtersLb}, "Daughter particles"}; Configurable> cfgHyperNucSigns{"cfgHyperNucSigns", {hyperNucSigns[0], nHyperNuclei, 4, hyperNucNames, hyperNucDaughtersLb}, "Daughter signs"}; @@ -444,65 +437,69 @@ struct hypKfRecoTask { // CCDB Service ccdb; - Configurable d_bz_input{"d_bz", -999, "bz field, -999 is automatic"}; - Configurable ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; + Configurable bField{"bField", -999, "bz field, -999 is automatic"}; + Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; Configurable grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"}; Configurable grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"}; Configurable lutPath{"lutPath", "GLO/Param/MatLUT", "Path of the Lut parametrization"}; Configurable geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"}; Configurable pidPath{"pidPath", "", "Path to the PID response object"}; - std::vector daughterParticles; + std::vector daughterParticles; std::vector> foundDaughters; - std::vector> singleHyperNucCandidates; // hypernuclei candidates - std::vector> cascadeHyperNucCandidates; // cascade candidates - std::vector singleHyperNuclei; - std::vector cascadeHyperNuclei; + std::vector> singleHyperNucCandidates; // hypernuclei candidates + std::vector> cascadeHyperNucCandidates; // cascade candidates + std::vector singleHyperNuclei; + std::vector cascadeHyperNuclei; std::vector primVtx; std::vector cents; - std::vector mcCollInfos; - indexPairs trackIndices; - indexPairs mcPartIndices; - KFPVertex KfPrimVtx; + std::vector mcCollInfos; + IndexPairs trackIndices; + IndexPairs mcPartIndices; + KFPVertex kfPrimVtx; bool collHasCandidate, collHasMcTrueCandidate; bool collPassedEvSel; int64_t mcCollTableIndex; - int mRunNumber; - float d_bz; + int mRunNumber, occupancy; + float dBz; TRandom rand; //---------------------------------------------------------------------------------------------------------------- void init(InitContext const&) { mRunNumber = 0; - d_bz = 0; + dBz = 0; rand.SetSeed(0); - ccdb->setURL(ccdburl); + ccdb->setURL(ccdbUrl); ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); ccdb->setFatalWhenNull(false); for (int i = 0; i < nDaughterParticles; i++) { // create daughterparticles - daughterParticles.push_back(daughterParticle(particleNames.at(i), particlePdgCodes.at(i), particleMasses.at(i), particleCharge.at(i), cfgBetheBlochParams)); + daughterParticles.push_back(DaughterParticle(particleNames.at(i), particlePdgCodes.at(i), particleMasses.at(i), particleCharge.at(i), cfgBetheBlochParams)); } for (unsigned int i = 0; i < nHyperNuclei; i++) { // create hypernuclei - singleHyperNuclei.push_back(hyperNucleus(hyperNucNames.at(i), cfgHyperNucPdg->get(i, 0u), cfgHyperNucsActive->get(i, 0u), getDaughterVec(i, cfgHyperNucDaughters), getDaughterSignVec(i, cfgHyperNucSigns))); + singleHyperNuclei.push_back(HyperNucleus(hyperNucNames.at(i), cfgHyperNucPdg->get(i, 0u), cfgHyperNucsActive->get(i, 0u), getDaughterVec(i, cfgHyperNucDaughters), getDaughterSignVec(i, cfgHyperNucSigns))); } for (unsigned int i = 0; i < nCascades; i++) { // create cascades - cascadeHyperNuclei.push_back(hyperNucleus(cascadeNames.at(i), cfgCascadesPdg->get(i, 0u), cfgCascadesActive->get(i, 0u), getHypDaughterVec(i, cfgCascadeHypDaughter), getDaughterVec(i, cfgCascadeDaughters), getDaughterSignVec(i, cfgCascadeSigns))); + cascadeHyperNuclei.push_back(HyperNucleus(cascadeNames.at(i), cfgCascadesPdg->get(i, 0u), cfgCascadesActive->get(i, 0u), getHypDaughterVec(i, cfgCascadeHypDaughter), getDaughterVec(i, cfgCascadeDaughters), getDaughterSignVec(i, cfgCascadeSigns))); } - // define histogram axes const AxisSpec axisMagField{10, -10., 10., "magnetic field"}; const AxisSpec axisNev{3, 0., 3., "Number of events"}; const AxisSpec axisRigidity{4000, -10., 10., "#it{p}^{TPC}/#it{z}"}; const AxisSpec axisdEdx{2000, 0, 2000, "d#it{E}/d#it{x}"}; const AxisSpec axisInvMass{1000, 1, 6, "inv mass"}; - + const AxisSpec axisCent{100, 0, 100, "centrality"}; + const AxisSpec axisVtxZ{100, -10, 10, "z"}; // create histograms histos.add("histMagField", "histMagField", kTH1F, {axisMagField}); histos.add("histNev", "histNev", kTH1F, {axisNev}); + histos.add("histVtxZ", "histVtxZ", kTH1F, {axisVtxZ}); + histos.add("histCentFT0A", "histCentFT0A", kTH1F, {axisCent}); + histos.add("histCentFT0C", "histCentFT0C", kTH1F, {axisCent}); + histos.add("histCentFT0M", "histCentFT0M", kTH1F, {axisCent}); hDeDx.resize(2 * nDaughterParticles + 2); for (int i = 0; i < nDaughterParticles + 1; i++) { TString histName = i < nDaughterParticles ? daughterParticles[i].name : "all"; @@ -512,11 +509,11 @@ struct hypKfRecoTask { // create invariant mass histograms hInvMass.resize(nHyperNuclei + nCascades); int histCount = 0; - std::vector> hypNucVectors = {singleHyperNuclei, cascadeHyperNuclei}; - for (auto vec : hypNucVectors) { - for (auto nuc : vec) { - if (nuc.active) { - hInvMass[histCount] = histos.add(Form("h%d_%s", histCount, nuc.motherName()), ";;Counts", HistType::kTH1F, {axisInvMass}); + std::vector> hypNucVectors = {singleHyperNuclei, cascadeHyperNuclei}; + for (size_t i = 0; i < hypNucVectors.size(); i++) { + for (size_t j = 0; j < hypNucVectors.at(i).size(); j++) { + if (hypNucVectors.at(i).at(j).active) { + hInvMass[histCount] = histos.add(Form("h%d_%s", histCount, hypNucVectors.at(i).at(j).motherName()), ";;Counts", HistType::kTH1F, {axisInvMass}); } histCount++; } @@ -550,6 +547,10 @@ struct hypKfRecoTask { continue; if (std::abs(track.dcaZ()) < cfgTrackPIDsettings->get(i, "minDcaToPvZ")) continue; + if (getMeanItsClsSize(track) < cfgTrackPIDsettings->get(i, "minITSclsSize")) + continue; + if (getMeanItsClsSize(track) > cfgTrackPIDsettings->get(i, "maxITSclsSize")) + continue; if (getRigidity(track) < cfgTrackPIDsettings->get(i, "minRigidity") || getRigidity(track) > cfgTrackPIDsettings->get(i, "maxRigidity")) continue; if (cfgTrackPIDsettings->get(i, "TOFrequiredabove") >= 0 && getRigidity(track) > cfgTrackPIDsettings->get(i, "TOFrequiredabove") && (track.mass() < cfgTrackPIDsettings->get(i, "minTOFmass") || track.mass() > cfgTrackPIDsettings->get(i, "maxTOFmass"))) @@ -589,10 +590,10 @@ struct hypKfRecoTask { { // loop over all hypernuclei that are to be reconstructed for (size_t hyperNucIter = 0; hyperNucIter < singleHyperNuclei.size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(singleHyperNuclei.at(hyperNucIter)); + HyperNucleus* hyperNuc = &(singleHyperNuclei.at(hyperNucIter)); if (!hyperNuc->active) continue; - int nDaughters = hyperNuc->GetNdaughters(); + int nDaughters = hyperNuc->getNdaughters(); std::vector::iterator> it; int nCombinations = 1; @@ -627,25 +628,25 @@ struct hypKfRecoTask { daughterIds.push_back(*(it[i])); auto daughterMass = daughterParticles.at(hyperNuc->daughters.at(i)).mass; auto daughterCharge = daughterParticles.at(hyperNuc->daughters.at(i)).charge; - daughterKfps.push_back(CreateKFParticle(daughterTrack, daughterMass, daughterCharge)); + daughterKfps.push_back(createKFParticle(daughterTrack, daughterMass, daughterCharge)); } - hyperNucCandidate candidate(hyperNucIter, daughterKfps, daughterIds); + HyperNucCandidate candidate(hyperNucIter, daughterKfps, daughterIds); bool isPrimCandidate = true, isSecCandidate = true; - if (candidate.CheckKfp()) { + if (candidate.checkKfp()) { // apply pre selections - candidate.CalcDevToVtx(KfPrimVtx); + candidate.calcDevToVtx(kfPrimVtx); if (candidate.kfp.GetMass() < cfgPreSelectionsPrimaries->get(hyperNucIter, "minMass") || candidate.kfp.GetMass() > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxMass")) isPrimCandidate = false; - if (candidate.GetDcaTracks() > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaTracks")) + if (candidate.getDcaTracks() > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaTracks")) isPrimCandidate = false; - if (candidate.GetCt(primVtx) < cfgPreSelectionsPrimaries->get(hyperNucIter, "minCt") || candidate.GetCt(primVtx) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxCt")) + if (candidate.getCt(primVtx) < cfgPreSelectionsPrimaries->get(hyperNucIter, "minCt") || candidate.getCt(primVtx) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxCt")) isPrimCandidate = false; - if (candidate.GetCpa(primVtx) < cfgPreSelectionsPrimaries->get(hyperNucIter, "minCosPa")) + if (candidate.getCpa(primVtx) < cfgPreSelectionsPrimaries->get(hyperNucIter, "minCosPa")) isPrimCandidate = false; - if (candidate.GetDcaMotherToVtxXY(primVtx) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaMotherToPvXY")) + if (std::abs(candidate.getDcaMotherToVtxXY(primVtx)) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaMotherToPvXY")) isPrimCandidate = false; - if (candidate.GetDcaMotherToVtxZ(primVtx) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaMotherToPvZ")) + if (std::abs(candidate.getDcaMotherToVtxZ(primVtx)) > cfgPreSelectionsPrimaries->get(hyperNucIter, "maxDcaMotherToPvZ")) isPrimCandidate = false; if (isPrimCandidate) { candidate.isPrimaryCandidate = true; @@ -653,9 +654,9 @@ struct hypKfRecoTask { } if (candidate.kfp.GetMass() < cfgPreSelectionsSecondaries->get(hyperNucIter, "minMass") || candidate.kfp.GetMass() > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxMass")) isSecCandidate = false; - if (candidate.GetDcaTracks() > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxDcaTracks")) + if (candidate.getDcaTracks() > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxDcaTracks")) isSecCandidate = false; - if (candidate.GetCt(primVtx) < cfgPreSelectionsSecondaries->get(hyperNucIter, "minCt") || candidate.GetCt(primVtx) > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxCt")) + if (candidate.getCt(primVtx) < cfgPreSelectionsSecondaries->get(hyperNucIter, "minCt") || candidate.getCt(primVtx) > cfgPreSelectionsSecondaries->get(hyperNucIter, "maxCt")) isSecCandidate = false; if (isSecCandidate) { candidate.isSecondaryCandidate = true; @@ -678,10 +679,10 @@ struct hypKfRecoTask { // loop over all cascade hypernuclei that are to be reconstructed for (size_t hyperNucIter = 0; hyperNucIter < cascadeHyperNuclei.size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(cascadeHyperNuclei.at(hyperNucIter)); + HyperNucleus* hyperNuc = &(cascadeHyperNuclei.at(hyperNucIter)); if (!hyperNuc->active) continue; - int nDaughters = hyperNuc->GetNdaughters(); + int nDaughters = hyperNuc->getNdaughters(); int nHypNucDaughters = singleHyperNucCandidates.at(hyperNuc->daughters.at(0)).size(); std::vector vecHypNucDaughers; @@ -706,7 +707,7 @@ struct hypKfRecoTask { // select hypernuclei daughter KFParticle auto hypNucDaughter = &(singleHyperNucCandidates.at(hyperNuc->daughters.at(0)).at(*it[0])); // check for correct signs - int checkSign = hypNucDaughter->GetSign(); + int checkSign = hypNucDaughter->getSign(); bool passedChecks = true; std::vector vec = hypNucDaughter->daughterTrackIds; for (int i = 1; i < nDaughters; i++) { @@ -726,32 +727,32 @@ struct hypKfRecoTask { const auto& daughterTrack = tracks.rawIteratorAt(*(it[i])); auto daughterMass = daughterParticles.at(hyperNuc->daughters.at(i)).mass; auto daughterCharge = daughterParticles.at(hyperNuc->daughters.at(i)).charge; - daughterKfps.push_back(CreateKFParticle(daughterTrack, daughterMass, daughterCharge)); + daughterKfps.push_back(createKFParticle(daughterTrack, daughterMass, daughterCharge)); } - hyperNucCandidate candidate(hyperNucIter, hypNucDaughter, daughterKfps, daughterIds); - if (candidate.CheckKfp()) { - hypNucDaughter->CalcDevToVtx(candidate); + HyperNucCandidate candidate(hyperNucIter, hypNucDaughter, daughterKfps, daughterIds); + if (candidate.checkKfp()) { + hypNucDaughter->calcDevToVtx(candidate); bool isCandidate = true; // apply pre selections for hypernucleus daughter - if (hypNucDaughter->GetCpa(candidate.recoSV) < cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "minCosPaSv")) + if (hypNucDaughter->getCpa(candidate.recoSV) < cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "minCosPaSv")) isCandidate = false; - if (hypNucDaughter->GetDcaMotherToVtxXY(candidate.recoSV) > cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "maxDcaMotherToSvXY")) + if (hypNucDaughter->getDcaMotherToVtxXY(candidate.recoSV) > cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "maxDcaMotherToSvXY")) isCandidate = false; - if (hypNucDaughter->GetDcaMotherToVtxZ(candidate.recoSV) > cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "maxDcaMotherToSvZ")) + if (hypNucDaughter->getDcaMotherToVtxZ(candidate.recoSV) > cfgPreSelectionsSecondaries->get(hyperNuc->daughters.at(0), "maxDcaMotherToSvZ")) isCandidate = false; // apply pre selections for cascade if (candidate.kfp.GetMass() < cfgPreSelectionsCascades->get(hyperNucIter, "minMass") || candidate.kfp.GetMass() > cfgPreSelectionsCascades->get(hyperNucIter, "maxMass")) isCandidate = false; - if (candidate.GetDcaTracks() > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaTracks")) + if (candidate.getDcaTracks() > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaTracks")) isCandidate = false; - if (candidate.GetCt(primVtx) < cfgPreSelectionsCascades->get(hyperNucIter, "minCt") || candidate.GetCt(primVtx) > cfgPreSelectionsCascades->get(hyperNucIter, "maxCt")) + if (candidate.getCt(primVtx) < cfgPreSelectionsCascades->get(hyperNucIter, "minCt") || candidate.getCt(primVtx) > cfgPreSelectionsCascades->get(hyperNucIter, "maxCt")) isCandidate = false; - if (candidate.GetCpa(primVtx) < cfgPreSelectionsCascades->get(hyperNucIter, "minCosPa")) + if (candidate.getCpa(primVtx) < cfgPreSelectionsCascades->get(hyperNucIter, "minCosPa")) isCandidate = false; - if (candidate.GetDcaMotherToVtxXY(primVtx) > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaMotherToPvXY")) + if (std::abs(candidate.getDcaMotherToVtxXY(primVtx)) > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaMotherToPvXY")) isCandidate = false; - if (candidate.GetDcaMotherToVtxZ(primVtx) > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaMotherToPvZ")) + if (std::abs(candidate.getDcaMotherToVtxZ(primVtx)) > cfgPreSelectionsCascades->get(hyperNucIter, "maxDcaMotherToPvZ")) isCandidate = false; if (isCandidate) { @@ -774,34 +775,34 @@ struct hypKfRecoTask { { // check for mcTrue: single (primary & cascade daughter) and cascade hypernuclei - std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; - std::vector>*> candidateVectors = {&singleHyperNucCandidates, &cascadeHyperNucCandidates}; + std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; + std::vector>*> candidateVectors = {&singleHyperNucCandidates, &cascadeHyperNucCandidates}; const int nVecs = candidateVectors.size(); - - for (int vec = cascadesOnly ? 1 : 0; vec < nVecs; vec++) { + const int startVec = cascadesOnly ? 1 : 0; + for (int vec = startVec; vec < nVecs; vec++) { auto candidateVector = candidateVectors.at(vec); for (size_t hyperNucIter = 0; hyperNucIter < hypNucVectors.at(vec)->size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); + HyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); if (!hyperNuc->active) continue; - for (auto& hypCand : candidateVector->at(hyperNucIter)) { + for (auto& hypCand : candidateVector->at(hyperNucIter)) { // o2-linter: disable=[const-ref-in-for-loop] std::vector motherIds; int daughterCount = 0; - if (hypCand.IsCascade()) { + if (hypCand.isCascade()) { if (!hypCand.hypNucDaughter->mcTrue) continue; const auto& mcPart = particlesMC.rawIteratorAt(hypCand.hypNucDaughter->mcParticleId); if (!mcPart.has_mothers()) continue; daughterCount++; - for (auto& mother : mcPart.mothers_as()) { - if (mother.pdgCode() == hyperNuc->pdgCode * hypCand.GetSign()) { + for (const auto& mother : mcPart.mothers_as()) { + if (mother.pdgCode() == hyperNuc->pdgCode * hypCand.getSign()) { motherIds.push_back(mother.globalIndex()); break; } } } - for (auto& daughter : hypCand.daughterTrackIds) { + for (const auto& daughter : hypCand.daughterTrackIds) { const auto& mcLab = trackLabels.rawIteratorAt(daughter); if (!mcLab.has_mcParticle()) continue; @@ -810,8 +811,8 @@ struct hypKfRecoTask { continue; if (!mcPart.has_mothers()) continue; - for (auto& mother : mcPart.mothers_as()) { - if (mother.pdgCode() == hyperNuc->pdgCode * hypCand.GetSign()) { + for (const auto& mother : mcPart.mothers_as()) { + if (mother.pdgCode() == hyperNuc->pdgCode * hypCand.getSign()) { motherIds.push_back(mother.globalIndex()); break; } @@ -844,34 +845,34 @@ struct hypKfRecoTask { outputCollisionTable( collPassedEvSel, mcCollTableIndex, primVtx.at(0), primVtx.at(1), primVtx.at(2), - cents.at(0), cents.at(1), cents.at(2)); + cents.at(0), cents.at(1), cents.at(2), occupancy); - std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; - std::vector>*> candidateVectors = {&singleHyperNucCandidates, &cascadeHyperNucCandidates}; + std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; + std::vector>*> candidateVectors = {&singleHyperNucCandidates, &cascadeHyperNucCandidates}; for (int vec = 0; vec < 2; vec++) { auto candidateVector = candidateVectors.at(vec); for (size_t hyperNucIter = 0; hyperNucIter < hypNucVectors.at(vec)->size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); + HyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); if (!hyperNuc->active) continue; - for (auto& hypCand : candidateVector->at(hyperNucIter)) { - if (!hypCand.isPrimaryCandidate && !hypCand.isUsedSecondary && !hypCand.IsCascade()) + for (auto& hypCand : candidateVector->at(hyperNucIter)) { // o2-linter: disable=[const-ref-in-for-loop] + if (!hypCand.isPrimaryCandidate && !hypCand.isUsedSecondary && !hypCand.isCascade()) continue; if (saveOnlyMcTrue && !hypCand.mcTrue) continue; hInvMass[vec * nHyperNuclei + hyperNucIter]->Fill(hypCand.kfp.GetMass()); std::vector vecDaugtherTracks, vecAddons, vecSubDaughters; int daughterCount = 0; - for (auto daughterTrackId : hypCand.daughterTrackIds) { + for (const auto& daughterTrackId : hypCand.daughterTrackIds) { int trackTableId; - if (!trackIndices.GetIndex(daughterTrackId, trackTableId)) { + if (!trackIndices.getIndex(daughterTrackId, trackTableId)) { auto daught = hyperNuc->daughters.at(daughterCount); const auto& track = tracks.rawIteratorAt(daughterTrackId); outputTrackTable( hyperNuc->daughters.at(daughterCount) * track.sign(), track.pt(), track.eta(), track.phi(), - track.dcaXY(), track.dcaZ(), + hypCand.getDcaTrackToVtxXY(daughterCount, primVtx), hypCand.getDcaTrackToVtxZ(daughterCount, primVtx), track.tpcNClsFound(), track.tpcChi2NCl(), track.itsClusterSizes(), track.itsChi2NCl(), getRigidity(track), track.tpcSignal(), getTPCnSigma(track, daughterParticles.at(daught)), @@ -880,22 +881,22 @@ struct hypKfRecoTask { track.mass(), track.isPVContributor()); trackTableId = outputTrackTable.lastIndex(); - trackIndices.Add(daughterTrackId, trackTableId); + trackIndices.add(daughterTrackId, trackTableId); } vecDaugtherTracks.push_back(trackTableId); daughterCount++; } - for (int i = 0; i < hypCand.GetNdaughters(); i++) { + for (int i = 0; i < hypCand.getNdaughters(); i++) { std::vector posMom; - hypCand.GetDaughterPosMom(i, posMom); + hypCand.getDaughterPosMom(i, posMom); outputDaughterAddonTable( posMom.at(0), posMom.at(1), posMom.at(2), posMom.at(3), posMom.at(4), posMom.at(5)); vecAddons.push_back(outputDaughterAddonTable.lastIndex()); } - if (hypCand.GetNdaughters() > 2) { - for (int i = 0; i < hypCand.GetNdaughters(); i++) { - for (int j = i + 1; j < hypCand.GetNdaughters(); j++) { - outputSubDaughterTable(hypCand.GetSubDaughterMass(i, j)); + if (hypCand.getNdaughters() > 2) { + for (int i = 0; i < hypCand.getNdaughters(); i++) { + for (int j = i + 1; j < hypCand.getNdaughters(); j++) { + outputSubDaughterTable(hypCand.getSubDaughterMass(i, j)); vecSubDaughters.push_back(outputSubDaughterTable.lastIndex()); } } @@ -904,12 +905,12 @@ struct hypKfRecoTask { hypCand.kfp.TransportToDecayVertex(); int mcPartTableId; outputHypNucTable( - mcPartIndices.GetIndex(hypCand.mcParticleId, mcPartTableId) ? mcPartTableId : -1, - outputCollisionTable.lastIndex(), vecDaugtherTracks, vecAddons, hypCand.GetDaughterTableId(), vecSubDaughters, - (vec * nHyperNuclei + hyperNucIter + 1) * hypCand.GetSign(), + mcPartIndices.getIndex(hypCand.mcParticleId, mcPartTableId) ? mcPartTableId : -1, + outputCollisionTable.lastIndex(), vecDaugtherTracks, vecAddons, hypCand.getDaughterTableId(), vecSubDaughters, + (vec * nHyperNuclei + hyperNucIter + 1) * hypCand.getSign(), hypCand.isPrimaryCandidate, hypCand.kfp.GetMass(), hypCand.kfp.GetPx(), hypCand.kfp.GetPy(), hypCand.kfp.GetPz(), - hypCand.GetDcaMotherToVtxXY(primVtx), hypCand.GetDcaMotherToVtxZ(primVtx), + hypCand.getDcaMotherToVtxXY(primVtx), hypCand.getDcaMotherToVtxZ(primVtx), hypCand.devToVtx, hypCand.dcaToVtxXY, hypCand.dcaToVtxZ, hypCand.chi2, hypCand.recoSV.at(0), hypCand.recoSV.at(1), hypCand.recoSV.at(2)); hypCand.tableId = outputHypNucTable.lastIndex(); @@ -924,18 +925,18 @@ struct hypKfRecoTask { mcCollInfos.clear(); mcCollInfos.resize(mcColls.size()); - mcPartIndices.Clear(); + mcPartIndices.clear(); for (const auto& collision : collisions) { if (!collision.has_mcCollision()) continue; if (collision.sel8() && std::abs(collision.posZ()) < 10) mcCollInfos.at(collision.mcCollisionId()).passedEvSel = true; } - std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; - for (auto& mcPart : particlesMC) { + std::vector*> hypNucVectors = {&singleHyperNuclei, &cascadeHyperNuclei}; + for (const auto& mcPart : particlesMC) { for (int vec = 0; vec < 2; vec++) { for (size_t hyperNucIter = 0; hyperNucIter < hypNucVectors.at(vec)->size(); hyperNucIter++) { - hyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); + HyperNucleus* hyperNuc = &(hypNucVectors.at(vec)->at(hyperNucIter)); if (!hyperNuc->active) continue; if (std::abs(mcPart.pdgCode()) != hyperNuc->pdgCode) @@ -947,7 +948,7 @@ struct hypKfRecoTask { daughterPdg = daughterParticles.at(hyperNuc->daughters.at(0)).pdgCode; else daughterPdg = singleHyperNuclei.at(hyperNuc->daughters.at(0)).pdgCode; - for (auto& mcDaught : mcPart.daughters_as()) { + for (const auto& mcDaught : mcPart.daughters_as()) { if (std::abs(mcDaught.pdgCode()) == daughterPdg) { isDecayMode = true; svx = mcDaught.vx(); @@ -974,7 +975,7 @@ struct hypKfRecoTask { mcPart.px(), mcPart.py(), mcPart.pz(), mcPart.e(), svx, svy, svz); - mcPartIndices.Add(mcPart.globalIndex(), outputMcParticleTable.lastIndex()); + mcPartIndices.add(mcPart.globalIndex(), outputMcParticleTable.lastIndex()); } } } @@ -1012,7 +1013,7 @@ struct hypKfRecoTask { fillTree(tracks, cfgSaveOnlyMcTrue); } } - PROCESS_SWITCH(hypKfRecoTask, processMC, "MC analysis", true); + PROCESS_SWITCH(hypKfRecoTask, processMC, "MC analysis", false); //---------------------------------------------------------------------------------------------------------------- void processData(CollisionsFull const& collisions, TracksFull const& tracks, aod::BCsWithTimestamps const&, aod::TrackAssoc const& tracksColl) { @@ -1021,6 +1022,8 @@ struct hypKfRecoTask { auto bc = collision.bc_as(); initCCDB(bc); initCollision(collision); + if (!collPassedEvSel) + continue; const uint64_t collIdx = collision.globalIndex(); auto tracksByColl = tracksColl.sliceBy(perCollision, collIdx); findDaughterParticles(tracksByColl, tracks); @@ -1032,42 +1035,42 @@ struct hypKfRecoTask { fillTree(tracks); } } - PROCESS_SWITCH(hypKfRecoTask, processData, "data analysis", false); + PROCESS_SWITCH(hypKfRecoTask, processData, "data analysis", true); //---------------------------------------------------------------------------------------------------------------- void initCCDB(aod::BCsWithTimestamps::iterator const& bc) { if (mRunNumber == bc.runNumber()) { return; } - auto run3grp_timestamp = bc.timestamp(); - d_bz = 0; - o2::parameters::GRPObject* grpo = ccdb->getForTimeStamp(grpPath, run3grp_timestamp); + auto run3grpTimestamp = bc.timestamp(); + dBz = 0; + o2::parameters::GRPObject* grpo = ccdb->getForTimeStamp(grpPath, run3grpTimestamp); o2::parameters::GRPMagField* grpmag = 0x0; if (grpo) { o2::base::Propagator::initFieldFromGRP(grpo); - if (d_bz_input < -990) { + if (bField < -990) { // Fetch magnetic field from ccdb for current collision - d_bz = grpo->getNominalL3Field(); - LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG"; + dBz = grpo->getNominalL3Field(); + LOG(info) << "Retrieved GRP for timestamp " << run3grpTimestamp << " with magnetic field of " << dBz << " kZG"; } else { - d_bz = d_bz_input; + dBz = bField; } } else { - grpmag = ccdb->getForTimeStamp(grpmagPath, run3grp_timestamp); + grpmag = ccdb->getForTimeStamp(grpmagPath, run3grpTimestamp); if (!grpmag) { - LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << run3grp_timestamp; + LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << run3grpTimestamp; } o2::base::Propagator::initFieldFromGRP(grpmag); - if (d_bz_input < -990) { + if (bField < -990) { // Fetch magnetic field from ccdb for current collision - d_bz = std::lround(5.f * grpmag->getL3Current() / 30000.f); - LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG"; + dBz = std::lround(5.f * grpmag->getL3Current() / 30000.f); + LOG(info) << "Retrieved GRP for timestamp " << run3grpTimestamp << " with magnetic field of " << dBz << " kZG"; } else { - d_bz = d_bz_input; + dBz = bField; } } mRunNumber = bc.runNumber(); - KFParticle::SetField(d_bz); + KFParticle::SetField(dBz); } //---------------------------------------------------------------------------------------------------------------- template @@ -1079,17 +1082,21 @@ struct hypKfRecoTask { singleHyperNucCandidates.resize(nHyperNuclei); cascadeHyperNucCandidates.clear(); cascadeHyperNucCandidates.resize(nCascades); - trackIndices.Clear(); + trackIndices.clear(); collHasCandidate = false; collHasMcTrueCandidate = false; - histos.fill(HIST("histMagField"), d_bz); + histos.fill(HIST("histMagField"), dBz); histos.fill(HIST("histNev"), 0.5); - collPassedEvSel = collision.sel8() && std::abs(collision.posZ()) < 10; - if (collPassedEvSel) + if (collPassedEvSel) { histos.fill(HIST("histNev"), 1.5); - - KfPrimVtx = createKFPVertexFromCollision(collision); + histos.fill(HIST("histVtxZ"), collision.posZ()); + histos.fill(HIST("histCentFT0A"), collision.centFT0A()); + histos.fill(HIST("histCentFT0C"), collision.centFT0C()); + histos.fill(HIST("histCentFT0M"), collision.centFT0M()); + } + occupancy = collision.trackOccupancyInTimeRange(); + kfPrimVtx = createKFPVertexFromCollision(collision); primVtx.assign({collision.posX(), collision.posY(), collision.posZ()}); cents.assign({collision.centFT0A(), collision.centFT0C(), collision.centFT0M()}); } @@ -1107,7 +1114,7 @@ struct hypKfRecoTask { //---------------------------------------------------------------------------------------------------------------- template - float getTPCnSigma(T const& track, daughterParticle const& particle) + float getTPCnSigma(T const& track, DaughterParticle const& particle) { const float rigidity = getRigidity(track); if (!track.hasTPC()) @@ -1132,7 +1139,18 @@ struct hypKfRecoTask { return sigmaTPC; } //---------------------------------------------------------------------------------------------------------------- - + template + float getMeanItsClsSize(T const& track) + { + int sum = 0, n = 0; + for (int i = 0; i < 8; i++) { + sum += (track.itsClusterSizes() >> (4 * i) & 15); + if (track.itsClusterSizes() >> (4 * i) & 15) + n++; + } + return n > 0 ? static_cast(sum) / n : 0.f; + } + //---------------------------------------------------------------------------------------------------------------- template float getRigidity(T const& track) { @@ -1144,7 +1162,7 @@ struct hypKfRecoTask { //---------------------------------------------------------------------------------------------------------------- template - KFParticle CreateKFParticle(const T& track, float mass, int charge) + KFParticle createKFParticle(const T& track, float mass, int charge) { auto trackparCov = getTrackParCov(track); std::array fP; diff --git a/PWGLF/TableProducer/Nuspex/hypKfTreeCreator.cxx b/PWGLF/TableProducer/Nuspex/hypKfTreeCreator.cxx index 948cd62ac92..1eea2943112 100644 --- a/PWGLF/TableProducer/Nuspex/hypKfTreeCreator.cxx +++ b/PWGLF/TableProducer/Nuspex/hypKfTreeCreator.cxx @@ -9,8 +9,9 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. /// +/// \file hypKfTreeCreator.cxx /// \brief Creates flat tree for ML analysis -/// \authors Janik Ditzel and Michael Hartung +/// \author Janik Ditzel and Michael Hartung #include #include "Framework/runDataProcessing.h" @@ -43,35 +44,35 @@ namespace { std::vector> hPt; -struct trackProperties { - trackProperties() : X(0), Y(0), Z(0), Px(0), Py(0), Pz(0), TPCnCls(0), ITSnCls(0), TPCchi2(0), ITSchi2(0), ITSmeanClsSize(0), ITSmeanClsSizeL(0), Rigidity(0), TPCsignal(0), TPCnSigma(0), TPCnSigmaNhp(0), TPCnSigmaNlp(0), TOFmass(0), DcaXY(0), DcaZ(0), IsPvContributor(0), SubMass(0) {} - float X, Y, Z, Px, Py, Pz; - uint8_t TPCnCls, ITSnCls; - float TPCchi2, ITSchi2, ITSmeanClsSize, ITSmeanClsSizeL; - float Rigidity, TPCsignal, TPCnSigma, TPCnSigmaNhp, TPCnSigmaNlp; - float TOFmass, DcaXY, DcaZ; - bool IsPvContributor; - float SubMass; +struct TrackProperties { + TrackProperties() : x(0), y(0), z(0), px(0), py(0), pz(0), tpcNcls(0), itsNcls(0), tpcChi2(0), itsChi2(0), itsMeanClsSize(0), itsMeanClsSizeL(0), rigidity(0), tpcSignal(0), tpcNsigma(0), tpcNsigmaNhp(0), tpcNsigmaNlp(0), tofMass(0), dcaXY(0), dcaZ(0), isPvContributor(0), subMass(0) {} + float x, y, z, px, py, pz; + uint8_t tpcNcls, itsNcls; + float tpcChi2, itsChi2, itsMeanClsSize, itsMeanClsSizeL; + float rigidity, tpcSignal, tpcNsigma, tpcNsigmaNhp, tpcNsigmaNlp; + float tofMass, dcaXY, dcaZ; + bool isPvContributor; + float subMass; }; -struct hyperNucleus { - hyperNucleus() : PdgCode(0), IsReconstructed(0), GlobalIndex(0), Species(0), IsMatter(0), PassedEvSel(0), IsMatterMC(0), PassedEvSelMC(0), IsPhysicalPrimary(0), CollisionMcTrue(0), Mass(0), Y(0), Pt(0), Ct(0), YGen(0), PtGen(0), CtGen(0), CpaPvGen(0), CpaPv(0), CpaSv(0), MaxDcaTracks(0), MaxDcaTracksSV(0), DcaToPvXY(0), DcaToPvZ(0), DcaToVtxXY(0), DcaToVtxZ(0), DevToPvXY(0), Chi2(0), Pvx(0), Pvy(0), Pvz(0), Svx(0), Svy(0), Svz(0), Px(0), Py(0), Pz(0), PvxGen(0), PvyGen(0), PvzGen(0), SvxGen(0), SvyGen(0), SvzGen(0), PxGen(0), PyGen(0), PzGen(0), NsingleDaughters(0), NcascadeDaughters(0), McTrue(0), MCTrueVtx(0), McPhysicalPrimary(0), HypNucDaughter(0) {} - int PdgCode, IsReconstructed, GlobalIndex; - uint8_t Species; - bool IsMatter, PassedEvSel, IsMatterMC, PassedEvSelMC, IsPhysicalPrimary, CollisionMcTrue; - float Mass, Y, Pt, Ct, YGen, PtGen, CtGen, CpaPvGen, CpaPv, CpaSv, MaxDcaTracks, MaxDcaTracksSV; - float DcaToPvXY, DcaToPvZ, DcaToVtxXY, DcaToVtxZ, DevToPvXY, Chi2; - float Pvx, Pvy, Pvz, Svx, Svy, Svz, Px, Py, Pz; - float PvxGen, PvyGen, PvzGen, SvxGen, SvyGen, SvzGen, PxGen, PyGen, PzGen; - int NsingleDaughters, NcascadeDaughters; - bool McTrue, MCTrueVtx, McPhysicalPrimary; - std::vector daughterTracks; +struct HyperNucleus { + HyperNucleus() : pdgCode(0), isReconstructed(0), globalIndex(0), species(0), isMatter(0), passedEvSel(0), isMatterMC(0), passedEvSelMC(0), isPhysicalPrimary(0), collisionMcTrue(0), mass(0), y(0), pt(0), ct(0), yGen(0), ptGen(0), ctGen(0), cpaPvGen(0), cpaPv(0), cpaSv(0), maxDcaTracks(0), maxDcaTracksSV(0), dcaToPvXY(0), dcaToPvZ(0), dcaToVtxXY(0), dcaToVtxZ(0), devToPvXY(0), chi2(0), pvx(0), pvy(0), pvz(0), svx(0), svy(0), svz(0), px(0), py(0), pz(0), pvxGen(0), pvyGen(0), pvzGen(0), svxGen(0), svyGen(0), svzGen(0), pxGen(0), pyGen(0), pzGen(0), nSingleDaughters(0), nCascadeDaughters(0), mcTrue(0), mcTrueVtx(0), mcPhysicalPrimary(0), hypNucDaughter(0) {} + int pdgCode, isReconstructed, globalIndex; + uint8_t species; + bool isMatter, passedEvSel, isMatterMC, passedEvSelMC, isPhysicalPrimary, collisionMcTrue; + float mass, y, pt, ct, yGen, ptGen, ctGen, cpaPvGen, cpaPv, cpaSv, maxDcaTracks, maxDcaTracksSV; + float dcaToPvXY, dcaToPvZ, dcaToVtxXY, dcaToVtxZ, devToPvXY, chi2; + float pvx, pvy, pvz, svx, svy, svz, px, py, pz; + float pvxGen, pvyGen, pvzGen, svxGen, svyGen, svzGen, pxGen, pyGen, pzGen; + int nSingleDaughters, nCascadeDaughters, cent, occu; + bool mcTrue, mcTrueVtx, mcPhysicalPrimary; + std::vector daughterTracks; std::vector subDaughterMassVec; - hyperNucleus* HypNucDaughter; - ~hyperNucleus() + HyperNucleus* hypNucDaughter; + ~HyperNucleus() { - if (HypNucDaughter) - delete HypNucDaughter; + if (hypNucDaughter) + delete hypNucDaughter; } }; } // namespace @@ -107,6 +108,8 @@ DECLARE_SOA_COLUMN(SvzGen, svzGen, float); DECLARE_SOA_COLUMN(TvxGen, tvxGen, float); DECLARE_SOA_COLUMN(TvyGen, tvyGen, float); DECLARE_SOA_COLUMN(TvzGen, tvzGen, float); +DECLARE_SOA_COLUMN(Centrality, centrality, int); +DECLARE_SOA_COLUMN(Occupancy, occupancy, int); DECLARE_SOA_COLUMN(PassedEvSelMC, passedEvSelMC, bool); DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); DECLARE_SOA_COLUMN(IsMatterGen, isMatterGen, bool); @@ -174,9 +177,9 @@ DECLARE_SOA_COLUMN(D3TPCnSigmaNlp, d3TPCnSigmaNlp, float); DECLARE_SOA_COLUMN(D3TOFmass, d3TOFmass, float); DECLARE_SOA_COLUMN(D3DcaXY, d3DcaXY, float); DECLARE_SOA_COLUMN(D3DcaZ, d3DcaZ, float); -DECLARE_SOA_COLUMN(D1D2Mass, d1d2Mass, float); -DECLARE_SOA_COLUMN(D1D3Mass, d1d3Mass, float); -DECLARE_SOA_COLUMN(D2D3Mass, d2d3Mass, float); +DECLARE_SOA_COLUMN(D1d2Mass, d1d2Mass, float); +DECLARE_SOA_COLUMN(D1d3Mass, d1d3Mass, float); +DECLARE_SOA_COLUMN(D2d3Mass, d2d3Mass, float); DECLARE_SOA_COLUMN(D3IsPvContributor, d3IsPvContributor, bool); DECLARE_SOA_COLUMN(D0X, d0X, float); DECLARE_SOA_COLUMN(D0Y, d0Y, float); @@ -185,81 +188,81 @@ DECLARE_SOA_COLUMN(D0Px, d0Px, float); DECLARE_SOA_COLUMN(D0Py, d0Py, float); DECLARE_SOA_COLUMN(D0Pz, d0Pz, float); DECLARE_SOA_COLUMN(D0Mass, d0Mass, float); -DECLARE_SOA_COLUMN(D0Ct, d0ct, float); -DECLARE_SOA_COLUMN(D0CosPA, d0cosPa, float); -DECLARE_SOA_COLUMN(D0DcaTracks, d0dcaTracks, float); -DECLARE_SOA_COLUMN(D0DcaTracksTv, d0dcaTracksTv, float); -DECLARE_SOA_COLUMN(D0DcaToPvXY, d0dcaToPvXY, float); -DECLARE_SOA_COLUMN(D0DcaToPvZ, d0dcaToPvZ, float); -DECLARE_SOA_COLUMN(D0DcaToSvXY, d0dcaToSvXY, float); -DECLARE_SOA_COLUMN(D0DcaToSvZ, d0dcaToSvZ, float); -DECLARE_SOA_COLUMN(D0Chi2, d0chi2, float); -DECLARE_SOA_COLUMN(SD1X, sd1X, float); -DECLARE_SOA_COLUMN(SD1Y, sd1Y, float); -DECLARE_SOA_COLUMN(SD1Z, sd1Z, float); -DECLARE_SOA_COLUMN(SD1Px, sd1Px, float); -DECLARE_SOA_COLUMN(SD1Py, sd1Py, float); -DECLARE_SOA_COLUMN(SD1Pz, sd1Pz, float); -DECLARE_SOA_COLUMN(SD1TPCnCls, sd1TPCnCls, uint8_t); -DECLARE_SOA_COLUMN(SD1TPCchi2, sd1TPCchi2, float); -DECLARE_SOA_COLUMN(SD1ITSnCls, sd1ITSnCls, uint8_t); -DECLARE_SOA_COLUMN(SD1ITSchi2, sd1ITSchi2, float); -DECLARE_SOA_COLUMN(SD1ITSmeanClsSize, sd1ITSmeanClsSize, float); -DECLARE_SOA_COLUMN(SD1ITSmeanClsSizeL, sd1ITSmeanClsSizeL, float); -DECLARE_SOA_COLUMN(SD1Rigidity, sd1Rigidity, float); -DECLARE_SOA_COLUMN(SD1TPCsignal, sd1TPCsignal, float); -DECLARE_SOA_COLUMN(SD1TPCnSigma, sd1TPCnSigma, float); -DECLARE_SOA_COLUMN(SD1TPCnSigmaNhp, sd1TPCnSigmaNhp, float); -DECLARE_SOA_COLUMN(SD1TPCnSigmaNlp, sd1TPCnSigmaNlp, float); -DECLARE_SOA_COLUMN(SD1TOFmass, sd1TOFmass, float); -DECLARE_SOA_COLUMN(SD1DcaXY, sd1DcaXY, float); -DECLARE_SOA_COLUMN(SD1DcaZ, sd1DcaZ, float); -DECLARE_SOA_COLUMN(SD1IsPvContributor, sd1IsPvContributor, bool); -DECLARE_SOA_COLUMN(SD2X, sd2X, float); -DECLARE_SOA_COLUMN(SD2Y, sd2Y, float); -DECLARE_SOA_COLUMN(SD2Z, sd2Z, float); -DECLARE_SOA_COLUMN(SD2Px, sd2Px, float); -DECLARE_SOA_COLUMN(SD2Py, sd2Py, float); -DECLARE_SOA_COLUMN(SD2Pz, sd2Pz, float); -DECLARE_SOA_COLUMN(SD2TPCnCls, sd2TPCnCls, uint8_t); -DECLARE_SOA_COLUMN(SD2TPCchi2, sd2TPCchi2, float); -DECLARE_SOA_COLUMN(SD2ITSnCls, sd2ITSnCls, uint8_t); -DECLARE_SOA_COLUMN(SD2ITSchi2, sd2ITSchi2, float); -DECLARE_SOA_COLUMN(SD2ITSmeanClsSize, sd2ITSmeanClsSize, float); -DECLARE_SOA_COLUMN(SD2ITSmeanClsSizeL, sd2ITSmeanClsSizeL, float); -DECLARE_SOA_COLUMN(SD2Rigidity, sd2Rigidity, float); -DECLARE_SOA_COLUMN(SD2TPCsignal, sd2TPCsignal, float); -DECLARE_SOA_COLUMN(SD2TPCnSigma, sd2TPCnSigma, float); -DECLARE_SOA_COLUMN(SD2TPCnSigmaNhp, sd2TPCnSigmaNhp, float); -DECLARE_SOA_COLUMN(SD2TPCnSigmaNlp, sd2TPCnSigmaNlp, float); -DECLARE_SOA_COLUMN(SD2TOFmass, sd2TOFmass, float); -DECLARE_SOA_COLUMN(SD2DcaXY, sd2DcaXY, float); -DECLARE_SOA_COLUMN(SD2DcaZ, sd2DcaZ, float); -DECLARE_SOA_COLUMN(SD2IsPvContributor, sd2IsPvContributor, bool); -DECLARE_SOA_COLUMN(SD3X, sd3X, float); -DECLARE_SOA_COLUMN(SD3Y, sd3Y, float); -DECLARE_SOA_COLUMN(SD3Z, sd3Z, float); -DECLARE_SOA_COLUMN(SD3Px, sd3Px, float); -DECLARE_SOA_COLUMN(SD3Py, sd3Py, float); -DECLARE_SOA_COLUMN(SD3Pz, sd3Pz, float); -DECLARE_SOA_COLUMN(SD3TPCnCls, sd3TPCnCls, uint8_t); -DECLARE_SOA_COLUMN(SD3TPCchi2, sd3TPCchi2, float); -DECLARE_SOA_COLUMN(SD3ITSnCls, sd3ITSnCls, uint8_t); -DECLARE_SOA_COLUMN(SD3ITSchi2, sd3ITSchi2, float); -DECLARE_SOA_COLUMN(SD3ITSmeanClsSize, sd3ITSmeanClsSize, float); -DECLARE_SOA_COLUMN(SD3ITSmeanClsSizeL, sd3ITSmeanClsSizeL, float); -DECLARE_SOA_COLUMN(SD3Rigidity, sd3Rigidity, float); -DECLARE_SOA_COLUMN(SD3TPCsignal, sd3TPCsignal, float); -DECLARE_SOA_COLUMN(SD3TPCnSigma, sd3TPCnSigma, float); -DECLARE_SOA_COLUMN(SD3TPCnSigmaNhp, sd3TPCnSigmaNhp, float); -DECLARE_SOA_COLUMN(SD3TPCnSigmaNlp, sd3TPCnSigmaNlp, float); -DECLARE_SOA_COLUMN(SD3TOFmass, sd3TOFmass, float); -DECLARE_SOA_COLUMN(SD3DcaXY, sd3DcaXY, float); -DECLARE_SOA_COLUMN(SD3DcaZ, sd3DcaZ, float); -DECLARE_SOA_COLUMN(SD3IsPvContributor, sd3IsPvContributor, bool); -DECLARE_SOA_COLUMN(SD1SD2Mass, sd1sd2Mass, float); -DECLARE_SOA_COLUMN(SD1SD3Mass, sd1sd3Mass, float); -DECLARE_SOA_COLUMN(SD2SD3Mass, sd2sd3Mass, float); +DECLARE_SOA_COLUMN(D0ct, d0ct, float); +DECLARE_SOA_COLUMN(D0cosPa, d0cosPa, float); +DECLARE_SOA_COLUMN(D0dcaTracks, d0dcaTracks, float); +DECLARE_SOA_COLUMN(D0dcaTracksTv, d0dcaTracksTv, float); +DECLARE_SOA_COLUMN(D0dcaToPvXY, d0dcaToPvXY, float); +DECLARE_SOA_COLUMN(D0dcaToPvZ, d0dcaToPvZ, float); +DECLARE_SOA_COLUMN(D0dcaToSvXY, d0dcaToSvXY, float); +DECLARE_SOA_COLUMN(D0dcaToSvZ, d0dcaToSvZ, float); +DECLARE_SOA_COLUMN(D0chi2, d0chi2, float); +DECLARE_SOA_COLUMN(Sd1X, sd1X, float); +DECLARE_SOA_COLUMN(Sd1Y, sd1Y, float); +DECLARE_SOA_COLUMN(Sd1Z, sd1Z, float); +DECLARE_SOA_COLUMN(Sd1Px, sd1Px, float); +DECLARE_SOA_COLUMN(Sd1Py, sd1Py, float); +DECLARE_SOA_COLUMN(Sd1Pz, sd1Pz, float); +DECLARE_SOA_COLUMN(Sd1TPCnCls, sd1TPCnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd1TPCchi2, sd1TPCchi2, float); +DECLARE_SOA_COLUMN(Sd1ITSnCls, sd1ITSnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd1ITSchi2, sd1ITSchi2, float); +DECLARE_SOA_COLUMN(Sd1ITSmeanClsSize, sd1ITSmeanClsSize, float); +DECLARE_SOA_COLUMN(Sd1ITSmeanClsSizeL, sd1ITSmeanClsSizeL, float); +DECLARE_SOA_COLUMN(Sd1Rigidity, sd1Rigidity, float); +DECLARE_SOA_COLUMN(Sd1TPCsignal, sd1TPCsignal, float); +DECLARE_SOA_COLUMN(Sd1TPCnSigma, sd1TPCnSigma, float); +DECLARE_SOA_COLUMN(Sd1TPCnSigmaNhp, sd1TPCnSigmaNhp, float); +DECLARE_SOA_COLUMN(Sd1TPCnSigmaNlp, sd1TPCnSigmaNlp, float); +DECLARE_SOA_COLUMN(Sd1TOFmass, sd1TOFmass, float); +DECLARE_SOA_COLUMN(Sd1DcaXY, sd1DcaXY, float); +DECLARE_SOA_COLUMN(Sd1DcaZ, sd1DcaZ, float); +DECLARE_SOA_COLUMN(Sd1IsPvContributor, sd1IsPvContributor, bool); +DECLARE_SOA_COLUMN(Sd2X, sd2X, float); +DECLARE_SOA_COLUMN(Sd2Y, sd2Y, float); +DECLARE_SOA_COLUMN(Sd2Z, sd2Z, float); +DECLARE_SOA_COLUMN(Sd2Px, sd2Px, float); +DECLARE_SOA_COLUMN(Sd2Py, sd2Py, float); +DECLARE_SOA_COLUMN(Sd2Pz, sd2Pz, float); +DECLARE_SOA_COLUMN(Sd2TPCnCls, sd2TPCnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd2TPCchi2, sd2TPCchi2, float); +DECLARE_SOA_COLUMN(Sd2ITSnCls, sd2ITSnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd2ITSchi2, sd2ITSchi2, float); +DECLARE_SOA_COLUMN(Sd2ITSmeanClsSize, sd2ITSmeanClsSize, float); +DECLARE_SOA_COLUMN(Sd2ITSmeanClsSizeL, sd2ITSmeanClsSizeL, float); +DECLARE_SOA_COLUMN(Sd2Rigidity, sd2Rigidity, float); +DECLARE_SOA_COLUMN(Sd2TPCsignal, sd2TPCsignal, float); +DECLARE_SOA_COLUMN(Sd2TPCnSigma, sd2TPCnSigma, float); +DECLARE_SOA_COLUMN(Sd2TPCnSigmaNhp, sd2TPCnSigmaNhp, float); +DECLARE_SOA_COLUMN(Sd2TPCnSigmaNlp, sd2TPCnSigmaNlp, float); +DECLARE_SOA_COLUMN(Sd2TOFmass, sd2TOFmass, float); +DECLARE_SOA_COLUMN(Sd2DcaXY, sd2DcaXY, float); +DECLARE_SOA_COLUMN(Sd2DcaZ, sd2DcaZ, float); +DECLARE_SOA_COLUMN(Sd2IsPvContributor, sd2IsPvContributor, bool); +DECLARE_SOA_COLUMN(Sd3X, sd3X, float); +DECLARE_SOA_COLUMN(Sd3Y, sd3Y, float); +DECLARE_SOA_COLUMN(Sd3Z, sd3Z, float); +DECLARE_SOA_COLUMN(Sd3Px, sd3Px, float); +DECLARE_SOA_COLUMN(Sd3Py, sd3Py, float); +DECLARE_SOA_COLUMN(Sd3Pz, sd3Pz, float); +DECLARE_SOA_COLUMN(Sd3TPCnCls, sd3TPCnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd3TPCchi2, sd3TPCchi2, float); +DECLARE_SOA_COLUMN(Sd3ITSnCls, sd3ITSnCls, uint8_t); +DECLARE_SOA_COLUMN(Sd3ITSchi2, sd3ITSchi2, float); +DECLARE_SOA_COLUMN(Sd3ITSmeanClsSize, sd3ITSmeanClsSize, float); +DECLARE_SOA_COLUMN(Sd3ITSmeanClsSizeL, sd3ITSmeanClsSizeL, float); +DECLARE_SOA_COLUMN(Sd3Rigidity, sd3Rigidity, float); +DECLARE_SOA_COLUMN(Sd3TPCsignal, sd3TPCsignal, float); +DECLARE_SOA_COLUMN(Sd3TPCnSigma, sd3TPCnSigma, float); +DECLARE_SOA_COLUMN(Sd3TPCnSigmaNhp, sd3TPCnSigmaNhp, float); +DECLARE_SOA_COLUMN(Sd3TPCnSigmaNlp, sd3TPCnSigmaNlp, float); +DECLARE_SOA_COLUMN(Sd3TOFmass, sd3TOFmass, float); +DECLARE_SOA_COLUMN(Sd3DcaXY, sd3DcaXY, float); +DECLARE_SOA_COLUMN(Sd3DcaZ, sd3DcaZ, float); +DECLARE_SOA_COLUMN(Sd3IsPvContributor, sd3IsPvContributor, bool); +DECLARE_SOA_COLUMN(Sd1sd2Mass, sd1sd2Mass, float); +DECLARE_SOA_COLUMN(Sd1sd3Mass, sd1sd3Mass, float); +DECLARE_SOA_COLUMN(Sd2sd3Mass, sd2sd3Mass, float); } // namespace hypkftree #define HYPKFGENBASE mcparticle::PdgCode, hypkftree::IsMatterGen, hypkftree::IsReconstructed, hykfmc::IsPhysicalPrimary, hypkftree::PassedEvSelMC, hypkftree::YGen, hypkftree::PtGen, hypkftree::CtGen @@ -268,26 +271,26 @@ DECLARE_SOA_COLUMN(SD2SD3Mass, sd2sd3Mass, float); #define HYPKFGENCAS hypkftree::TvxGen, hypkftree::TvyGen, hypkftree::TvzGen -#define HYPKFHYPNUC hykfmc::Species, hypkftree::IsMatter, hykfmcColl::PassedEvSel, hykfhyp::Mass, hypkftree::Y, track::Pt, hypkftree::Ct, hypkftree::CosPa, hypkftree::DcaTracks, hykfhyp::DcaToPvXY, hykfhyp::DcaToPvZ, hykfhyp::DevToPvXY, hykfhyp::Chi2, hypkftree::Pvx, hypkftree::Pvy, hypkftree::Pvz, hykfmc::Svx, hykfmc::Svy, hykfmc::Svz, hykfhyp::Px, hykfhyp::Py, hykfhyp::Pz, hypkftree::CollMcTrue +#define HYPKFHYPNUC hykfmc::Species, hypkftree::IsMatter, hypkftree::Centrality, hypkftree::Occupancy, hykfmccoll::PassedEvSel, hykfhyp::Mass, hypkftree::Y, track::Pt, hypkftree::Ct, hypkftree::CosPa, hypkftree::DcaTracks, hykfhyp::DcaToPvXY, hykfhyp::DcaToPvZ, hykfhyp::DevToPvXY, hykfhyp::Chi2, hypkftree::Pvx, hypkftree::Pvy, hypkftree::Pvz, hykfmc::Svx, hykfmc::Svy, hykfmc::Svz, hykfhyp::Px, hykfhyp::Py, hykfhyp::Pz, hypkftree::CollMcTrue #define HYPKFHYPNUCMC hypkftree::McTrue, hykfmc::IsPhysicalPrimary -#define HYPKFD0 hypkftree::Tvx, hypkftree::Tvy, hypkftree::Tvz, hypkftree::D0X, hypkftree::D0Y, hypkftree::D0Z, hypkftree::D0Px, hypkftree::D0Py, hypkftree::D0Pz, hypkftree::D0Mass, hypkftree::D0Ct, hypkftree::D0CosPA, hypkftree::D0DcaTracks, hypkftree::D0DcaToPvXY, hypkftree::D0DcaToPvZ, hypkftree::D0DcaToSvXY, hypkftree::D0DcaToSvZ, hypkftree::D0Chi2 +#define HYPKFD0 hypkftree::Tvx, hypkftree::Tvy, hypkftree::Tvz, hypkftree::D0X, hypkftree::D0Y, hypkftree::D0Z, hypkftree::D0Px, hypkftree::D0Py, hypkftree::D0Pz, hypkftree::D0Mass, hypkftree::D0ct, hypkftree::D0cosPa, hypkftree::D0dcaTracks, hypkftree::D0dcaToPvXY, hypkftree::D0dcaToPvZ, hypkftree::D0dcaToSvXY, hypkftree::D0dcaToSvZ, hypkftree::D0chi2 -#define HYPKFD1 hypkftree::D1X, hypkftree::D1Y, hypkftree::D1Z, hypkftree::D1Px, hypkftree::D1Py, hypkftree::D1Pz, hypkftree::D1TPCnCls, hypkftree::D1TPCchi2, hypkftree::D1ITSnCls, hypkftree::D1ITSchi2, hypkftree::D1ITSmeanClsSize, hypkftree::D1ITSmeanClsSizeL, hypkftree::D1Rigidity, hypkftree::D1TPCsignal, hypkftree::D1TPCnSigma, hypkftree::D1TPCnSigmaNhp, hypkftree::D1TPCnSigmaNlp, hypkftree::D1TOFmass, hypkftree::D1DcaXY, hypkftree::D1DcaZ, hypkftree::D1IsPvContributor +#define HYPKFD1 hypkftree::D1X, hypkftree::D1Y, hypkftree::D1Z, hypkftree::D1Px, hypkftree::D1Py, hypkftree::D1Pz, hypkftree::D1TPCnCls, hypkftree::D1TPCchi2, hypkftree::D1ITSnCls, hypkftree::D1ITSchi2, hypkftree::D1ITSmeanClsSizeL, hypkftree::D1Rigidity, hypkftree::D1TPCsignal, hypkftree::D1TPCnSigma, hypkftree::D1TPCnSigmaNhp, hypkftree::D1TPCnSigmaNlp, hypkftree::D1TOFmass, hypkftree::D1DcaXY, hypkftree::D1DcaZ, hypkftree::D1IsPvContributor -#define HYPKFD2 hypkftree::D2X, hypkftree::D2Y, hypkftree::D2Z, hypkftree::D2Px, hypkftree::D2Py, hypkftree::D2Pz, hypkftree::D2TPCnCls, hypkftree::D2TPCchi2, hypkftree::D2ITSnCls, hypkftree::D2ITSchi2, hypkftree::D2ITSmeanClsSize, hypkftree::D2ITSmeanClsSizeL, hypkftree::D2Rigidity, hypkftree::D2TPCsignal, hypkftree::D2TPCnSigma, hypkftree::D2TPCnSigmaNhp, hypkftree::D2TPCnSigmaNlp, hypkftree::D2TOFmass, hypkftree::D2DcaXY, hypkftree::D2DcaZ, hypkftree::D2IsPvContributor +#define HYPKFD2 hypkftree::D2X, hypkftree::D2Y, hypkftree::D2Z, hypkftree::D2Px, hypkftree::D2Py, hypkftree::D2Pz, hypkftree::D2TPCnCls, hypkftree::D2TPCchi2, hypkftree::D2ITSnCls, hypkftree::D2ITSchi2, hypkftree::D2ITSmeanClsSizeL, hypkftree::D2Rigidity, hypkftree::D2TPCsignal, hypkftree::D2TPCnSigma, hypkftree::D2TPCnSigmaNhp, hypkftree::D2TPCnSigmaNlp, hypkftree::D2TOFmass, hypkftree::D2DcaXY, hypkftree::D2DcaZ, hypkftree::D2IsPvContributor -#define HYPKFD3 hypkftree::D3X, hypkftree::D3Y, hypkftree::D3Z, hypkftree::D3Px, hypkftree::D3Py, hypkftree::D3Pz, hypkftree::D3TPCnCls, hypkftree::D3TPCchi2, hypkftree::D3ITSnCls, hypkftree::D3ITSchi2, hypkftree::D3ITSmeanClsSize, hypkftree::D3ITSmeanClsSizeL, hypkftree::D3Rigidity, hypkftree::D3TPCsignal, hypkftree::D3TPCnSigma, hypkftree::D3TPCnSigmaNhp, hypkftree::D3TPCnSigmaNlp, hypkftree::D3TOFmass, hypkftree::D3DcaXY, hypkftree::D3DcaZ, hypkftree::D3IsPvContributor +#define HYPKFD3 hypkftree::D3X, hypkftree::D3Y, hypkftree::D3Z, hypkftree::D3Px, hypkftree::D3Py, hypkftree::D3Pz, hypkftree::D3TPCnCls, hypkftree::D3TPCchi2, hypkftree::D3ITSnCls, hypkftree::D3ITSchi2, hypkftree::D3ITSmeanClsSizeL, hypkftree::D3Rigidity, hypkftree::D3TPCsignal, hypkftree::D3TPCnSigma, hypkftree::D3TPCnSigmaNhp, hypkftree::D3TPCnSigmaNlp, hypkftree::D3TOFmass, hypkftree::D3DcaXY, hypkftree::D3DcaZ, hypkftree::D3IsPvContributor -#define HYPKFSD1 hypkftree::SD1X, hypkftree::SD1Y, hypkftree::SD1Z, hypkftree::SD1Px, hypkftree::SD1Py, hypkftree::SD1Pz, hypkftree::SD1TPCnCls, hypkftree::SD1TPCchi2, hypkftree::SD1ITSnCls, hypkftree::SD1ITSchi2, hypkftree::SD1ITSmeanClsSize, hypkftree::SD1ITSmeanClsSizeL, hypkftree::SD1Rigidity, hypkftree::SD1TPCsignal, hypkftree::SD1TPCnSigma, hypkftree::SD1TPCnSigmaNhp, hypkftree::SD1TPCnSigmaNlp, hypkftree::SD1TOFmass, hypkftree::SD1DcaXY, hypkftree::SD1DcaZ, hypkftree::SD1IsPvContributor +#define HYPKFSD1 hypkftree::Sd1X, hypkftree::Sd1Y, hypkftree::Sd1Z, hypkftree::Sd1Px, hypkftree::Sd1Py, hypkftree::Sd1Pz, hypkftree::Sd1TPCnCls, hypkftree::Sd1TPCchi2, hypkftree::Sd1ITSnCls, hypkftree::Sd1ITSchi2, hypkftree::Sd1ITSmeanClsSizeL, hypkftree::Sd1Rigidity, hypkftree::Sd1TPCsignal, hypkftree::Sd1TPCnSigma, hypkftree::Sd1TPCnSigmaNhp, hypkftree::Sd1TPCnSigmaNlp, hypkftree::Sd1TOFmass, hypkftree::Sd1DcaXY, hypkftree::Sd1DcaZ, hypkftree::Sd1IsPvContributor -#define HYPKFSD2 hypkftree::SD2X, hypkftree::SD2Y, hypkftree::SD2Z, hypkftree::SD2Px, hypkftree::SD2Py, hypkftree::SD2Pz, hypkftree::SD2TPCnCls, hypkftree::SD2TPCchi2, hypkftree::SD2ITSnCls, hypkftree::SD2ITSchi2, hypkftree::SD2ITSmeanClsSize, hypkftree::SD2ITSmeanClsSizeL, hypkftree::SD2Rigidity, hypkftree::SD2TPCsignal, hypkftree::SD2TPCnSigma, hypkftree::SD2TPCnSigmaNhp, hypkftree::SD2TPCnSigmaNlp, hypkftree::SD2TOFmass, hypkftree::SD2DcaXY, hypkftree::SD2DcaZ, hypkftree::SD2IsPvContributor +#define HYPKFSD2 hypkftree::Sd2X, hypkftree::Sd2Y, hypkftree::Sd2Z, hypkftree::Sd2Px, hypkftree::Sd2Py, hypkftree::Sd2Pz, hypkftree::Sd2TPCnCls, hypkftree::Sd2TPCchi2, hypkftree::Sd2ITSnCls, hypkftree::Sd2ITSchi2, hypkftree::Sd2ITSmeanClsSizeL, hypkftree::Sd2Rigidity, hypkftree::Sd2TPCsignal, hypkftree::Sd2TPCnSigma, hypkftree::Sd2TPCnSigmaNhp, hypkftree::Sd2TPCnSigmaNlp, hypkftree::Sd2TOFmass, hypkftree::Sd2DcaXY, hypkftree::Sd2DcaZ, hypkftree::Sd2IsPvContributor -#define HYPKFSD3 hypkftree::SD3X, hypkftree::SD3Y, hypkftree::SD3Z, hypkftree::SD3Px, hypkftree::SD3Py, hypkftree::SD3Pz, hypkftree::SD3TPCnCls, hypkftree::SD3TPCchi2, hypkftree::SD3ITSnCls, hypkftree::SD3ITSchi2, hypkftree::SD3ITSmeanClsSize, hypkftree::SD3ITSmeanClsSizeL, hypkftree::SD3Rigidity, hypkftree::SD3TPCsignal, hypkftree::SD3TPCnSigma, hypkftree::SD3TPCnSigmaNhp, hypkftree::SD3TPCnSigmaNlp, hypkftree::SD3TOFmass, hypkftree::SD3DcaXY, hypkftree::SD3DcaZ, hypkftree::SD3IsPvContributor +#define HYPKFSD3 hypkftree::Sd3X, hypkftree::Sd3Y, hypkftree::Sd3Z, hypkftree::Sd3Px, hypkftree::Sd3Py, hypkftree::Sd3Pz, hypkftree::Sd3TPCnCls, hypkftree::Sd3TPCchi2, hypkftree::Sd3ITSnCls, hypkftree::Sd3ITSchi2, hypkftree::Sd3ITSmeanClsSizeL, hypkftree::Sd3Rigidity, hypkftree::Sd3TPCsignal, hypkftree::Sd3TPCnSigma, hypkftree::Sd3TPCnSigmaNhp, hypkftree::Sd3TPCnSigmaNlp, hypkftree::Sd3TOFmass, hypkftree::Sd3DcaXY, hypkftree::Sd3DcaZ, hypkftree::Sd3IsPvContributor -#define HYPKFSDMASS hypkftree::D1D2Mass, hypkftree::D1D3Mass, hypkftree::D2D3Mass -#define HYPKFSSDMASS hypkftree::SD1SD2Mass, hypkftree::SD1SD3Mass, hypkftree::SD2SD3Mass +#define HYPKFSDMASS hypkftree::D1d2Mass, hypkftree::D1d3Mass, hypkftree::D2d3Mass +#define HYPKFSSDMASS hypkftree::Sd1sd2Mass, hypkftree::Sd1sd3Mass, hypkftree::Sd2sd3Mass DECLARE_SOA_TABLE(HypKfGens, "AOD", "HYPKFGEN", HYPKFGENBASE); using HypKfGen = HypKfGens::iterator; @@ -317,7 +320,7 @@ DECLARE_SOA_TABLE(HypKfMcCascadeThreeTwoCandidates, "AOD", "HYPKFMCCAND32", HYPK using HypKfMcCascadeThreeTwoCandidate = HypKfMcCascadeThreeTwoCandidates::iterator; } // namespace o2::aod -struct hypKfTreeCreator { +struct hypKfTreeCreator { // o2-linter: disable=[name/workflow-file][name/struct] HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; Produces outputMcGenTable; @@ -356,10 +359,10 @@ struct hypKfTreeCreator { void processData(aod::HypKfHypNucs const& hypNucs, aod::HypKfColls const& hypKfColls, aod::HypKfTracks const& hypKfTrks, aod::HypKfDaughtAdds const& hypKfDAdd, aod::HypKfSubDs const& hypKfDSub) { - for (auto& hypNuc : hypNucs) { + for (const auto& hypNuc : hypNucs) { if (std::abs(hypNuc.species()) != cfgSpecies) continue; - hyperNucleus candidate, hypDaughter, dummy; + HyperNucleus candidate, hypDaughter, dummy; fillCandidate(candidate, hypDaughter, hypNuc, hypNucs, hypKfColls, hypKfTrks, hypKfDAdd, hypKfDSub); if (cfgNsecDaughters) { fillCandidate(hypDaughter, dummy, hypNucs.rawIteratorAt(hypNuc.hypDaughterId()), hypNucs, hypKfColls, hypKfTrks, hypKfDAdd, hypKfDSub); @@ -369,13 +372,13 @@ struct hypKfTreeCreator { } PROCESS_SWITCH(hypKfTreeCreator, processData, "single tree", false); //___________________________________________________________________________________________________________________________________________________________ - void fillTable(hyperNucleus& cand, hyperNucleus& hypDaughter) + void fillTable(HyperNucleus& cand, HyperNucleus& hypDaughter) { if (isMC && cfgMCGenerated) outputMcGenTable( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen); - if (!cand.IsReconstructed) { + if (!cand.isReconstructed) { cand.daughterTracks.resize(4); cand.subDaughterMassVec.resize(4); hypDaughter.daughterTracks.resize(4); @@ -385,53 +388,57 @@ struct hypKfTreeCreator { if (cfgNprimDaughters == 2 && cfgNsecDaughters == 0) { const auto& d1 = cand.daughterTracks.at(0); const auto& d2 = cand.daughterTracks.at(1); - if (!isMC || (isMC && cfgMCReconstructed && cand.IsReconstructed)) + if (!isMC || (isMC && cfgMCReconstructed && cand.isReconstructed)) outputTableTwo( - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, cand.McTrue, cand.McPhysicalPrimary, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor); + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + cand.mcTrue, cand.mcPhysicalPrimary, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor); if (isMC && cfgMCCombined) outputTableMcTwo( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen, - cand.CpaPvGen, cand.PxGen, cand.PyGen, cand.PzGen, cand.PvxGen, cand.PvyGen, cand.PvzGen, cand.SvxGen, cand.SvyGen, cand.SvzGen, - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen, + cand.cpaPvGen, cand.pxGen, cand.pyGen, cand.pzGen, cand.pvxGen, cand.pvyGen, cand.pvzGen, cand.svxGen, cand.svyGen, cand.svzGen, + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, + cand.dcaToPvXY, cand.dcaToPvZ, cand.devToPvXY, + cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor); } if (cfgNprimDaughters == 3 && cfgNsecDaughters == 0) { const auto& d1 = cand.daughterTracks.at(0); const auto& d2 = cand.daughterTracks.at(1); const auto& d3 = cand.daughterTracks.at(2); - if (!isMC || (isMC && cfgMCReconstructed && cand.IsReconstructed)) + if (!isMC || (isMC && cfgMCReconstructed && cand.isReconstructed)) outputTableThree( - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, cand.McTrue, cand.McPhysicalPrimary, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor, - d3.X, d3.Y, d3.Z, d3.Px, d3.Py, d3.Pz, d3.TPCnCls, d3.TPCchi2, d3.ITSnCls, d3.ITSchi2, d3.ITSmeanClsSize, d3.ITSmeanClsSizeL, - d3.Rigidity, d3.TPCsignal, d3.TPCnSigma, d3.TPCnSigmaNhp, d3.TPCnSigmaNlp, d3.TOFmass, d3.DcaXY, d3.DcaZ, d3.IsPvContributor, - d1.SubMass, d2.SubMass, d3.SubMass); + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + cand.mcTrue, cand.mcPhysicalPrimary, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor, + d3.x, d3.y, d3.z, d3.px, d3.py, d3.pz, d3.tpcNcls, d3.tpcChi2, d3.itsNcls, d3.itsChi2, d3.itsMeanClsSizeL, + d3.rigidity, d3.tpcSignal, d3.tpcNsigma, d3.tpcNsigmaNhp, d3.tpcNsigmaNlp, d3.tofMass, d3.dcaXY, d3.dcaZ, d3.isPvContributor, + d1.subMass, d2.subMass, d3.subMass); if (isMC && cfgMCCombined) outputTableMcThree( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen, - cand.CpaPvGen, cand.PxGen, cand.PyGen, cand.PzGen, cand.PvxGen, cand.PvyGen, cand.PvzGen, cand.SvxGen, cand.SvyGen, cand.SvzGen, - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor, - d3.X, d3.Y, d3.Z, d3.Px, d3.Py, d3.Pz, d3.TPCnCls, d3.TPCchi2, d3.ITSnCls, d3.ITSchi2, d3.ITSmeanClsSize, d3.ITSmeanClsSizeL, - d3.Rigidity, d3.TPCsignal, d3.TPCnSigma, d3.TPCnSigmaNhp, d3.TPCnSigmaNlp, d3.TOFmass, d3.DcaXY, d3.DcaZ, d3.IsPvContributor, - d1.SubMass, d2.SubMass, d3.SubMass); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen, + cand.cpaPvGen, cand.pxGen, cand.pyGen, cand.pzGen, cand.pvxGen, cand.pvyGen, cand.pvzGen, cand.svxGen, cand.svyGen, cand.svzGen, + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, + cand.dcaToPvXY, cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, + cand.pz, cand.collisionMcTrue, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor, + d3.x, d3.y, d3.z, d3.px, d3.py, d3.pz, d3.tpcNcls, d3.tpcChi2, d3.itsNcls, d3.itsChi2, d3.itsMeanClsSizeL, + d3.rigidity, d3.tpcSignal, d3.tpcNsigma, d3.tpcNsigmaNhp, d3.tpcNsigmaNlp, d3.tofMass, d3.dcaXY, d3.dcaZ, d3.isPvContributor, + d1.subMass, d2.subMass, d3.subMass); } if (cfgNprimDaughters == 2 && cfgNsecDaughters == 3) { const auto& d0 = cand.daughterTracks.at(0); @@ -439,38 +446,40 @@ struct hypKfTreeCreator { const auto& sd1 = hypDaughter.daughterTracks.at(0); const auto& sd2 = hypDaughter.daughterTracks.at(1); const auto& sd3 = hypDaughter.daughterTracks.at(2); - if (!isMC || (isMC && cfgMCReconstructed && cand.IsReconstructed)) + if (!isMC || (isMC && cfgMCReconstructed && cand.isReconstructed)) outputTableTwoThree( - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, cand.McTrue, cand.McPhysicalPrimary, - hypDaughter.Svx, hypDaughter.Svy, hypDaughter.Svz, d0.X, d0.Y, d0.Z, d0.Px, d0.Py, d0.Pz, hypDaughter.Mass, hypDaughter.Ct, hypDaughter.CpaPv, - hypDaughter.MaxDcaTracks, hypDaughter.DcaToPvXY, hypDaughter.DcaToPvZ, hypDaughter.DcaToVtxXY, hypDaughter.DcaToVtxZ, hypDaughter.Chi2, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - sd1.X, sd1.Y, sd1.Z, sd1.Px, sd1.Py, sd1.Pz, sd1.TPCnCls, sd1.TPCchi2, sd1.ITSnCls, sd1.ITSchi2, sd1.ITSmeanClsSize, sd1.ITSmeanClsSizeL, - sd1.Rigidity, sd1.TPCsignal, sd1.TPCnSigma, sd1.TPCnSigmaNhp, sd1.TPCnSigmaNlp, sd1.TOFmass, sd1.DcaXY, sd1.DcaZ, sd1.IsPvContributor, - sd2.X, sd2.Y, sd2.Z, sd2.Px, sd2.Py, sd2.Pz, sd2.TPCnCls, sd2.TPCchi2, sd2.ITSnCls, sd2.ITSchi2, sd2.ITSmeanClsSize, sd2.ITSmeanClsSizeL, - sd2.Rigidity, sd2.TPCsignal, sd2.TPCnSigma, sd2.TPCnSigmaNhp, sd2.TPCnSigmaNlp, sd2.TOFmass, sd2.DcaXY, sd2.DcaZ, sd2.IsPvContributor, - sd3.X, sd3.Y, sd3.Z, sd3.Px, sd3.Py, sd3.Pz, sd3.TPCnCls, sd3.TPCchi2, sd3.ITSnCls, sd3.ITSchi2, sd3.ITSmeanClsSize, sd3.ITSmeanClsSizeL, - sd3.Rigidity, sd3.TPCsignal, sd3.TPCnSigma, sd3.TPCnSigmaNhp, sd3.TPCnSigmaNlp, sd3.TOFmass, sd3.DcaXY, sd3.DcaZ, sd3.IsPvContributor, - sd1.SubMass, sd2.SubMass, sd3.SubMass); + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + cand.mcTrue, cand.mcPhysicalPrimary, + hypDaughter.svx, hypDaughter.svy, hypDaughter.svz, d0.x, d0.y, d0.z, d0.px, d0.py, d0.pz, hypDaughter.mass, hypDaughter.ct, hypDaughter.cpaPv, + hypDaughter.maxDcaTracks, hypDaughter.dcaToPvXY, hypDaughter.dcaToPvZ, hypDaughter.dcaToVtxXY, hypDaughter.dcaToVtxZ, hypDaughter.chi2, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + sd1.x, sd1.y, sd1.z, sd1.px, sd1.py, sd1.pz, sd1.tpcNcls, sd1.tpcChi2, sd1.itsNcls, sd1.itsChi2, sd1.itsMeanClsSizeL, + sd1.rigidity, sd1.tpcSignal, sd1.tpcNsigma, sd1.tpcNsigmaNhp, sd1.tpcNsigmaNlp, sd1.tofMass, sd1.dcaXY, sd1.dcaZ, sd1.isPvContributor, + sd2.x, sd2.y, sd2.z, sd2.px, sd2.py, sd2.pz, sd2.tpcNcls, sd2.tpcChi2, sd2.itsNcls, sd2.itsChi2, sd2.itsMeanClsSizeL, + sd2.rigidity, sd2.tpcSignal, sd2.tpcNsigma, sd2.tpcNsigmaNhp, sd2.tpcNsigmaNlp, sd2.tofMass, sd2.dcaXY, sd2.dcaZ, sd2.isPvContributor, + sd3.x, sd3.y, sd3.z, sd3.px, sd3.py, sd3.pz, sd3.tpcNcls, sd3.tpcChi2, sd3.itsNcls, sd3.itsChi2, sd3.itsMeanClsSizeL, + sd3.rigidity, sd3.tpcSignal, sd3.tpcNsigma, sd3.tpcNsigmaNhp, sd3.tpcNsigmaNlp, sd3.tofMass, sd3.dcaXY, sd3.dcaZ, sd3.isPvContributor, + sd1.subMass, sd2.subMass, sd3.subMass); if (isMC && cfgMCCombined) outputTableMcTwoThree( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen, - cand.CpaPvGen, cand.PxGen, cand.PyGen, cand.PzGen, cand.PvxGen, cand.PvyGen, cand.PvzGen, cand.SvxGen, cand.SvyGen, cand.SvzGen, - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, - hypDaughter.Svx, hypDaughter.Svy, hypDaughter.Svz, d0.X, d0.Y, d0.Z, d0.Px, d0.Py, d0.Pz, hypDaughter.Mass, hypDaughter.Ct, hypDaughter.CpaPv, - hypDaughter.MaxDcaTracks, hypDaughter.DcaToPvXY, hypDaughter.DcaToPvZ, hypDaughter.DcaToVtxXY, hypDaughter.DcaToVtxZ, hypDaughter.Chi2, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - sd1.X, sd1.Y, sd1.Z, sd1.Px, sd1.Py, sd1.Pz, sd1.TPCnCls, sd1.TPCchi2, sd1.ITSnCls, sd1.ITSchi2, sd1.ITSmeanClsSize, sd1.ITSmeanClsSizeL, - sd1.Rigidity, sd1.TPCsignal, sd1.TPCnSigma, sd1.TPCnSigmaNhp, sd1.TPCnSigmaNlp, sd1.TOFmass, sd1.DcaXY, sd1.DcaZ, sd1.IsPvContributor, - sd2.X, sd2.Y, sd2.Z, sd2.Px, sd2.Py, sd2.Pz, sd2.TPCnCls, sd2.TPCchi2, sd2.ITSnCls, sd2.ITSchi2, sd2.ITSmeanClsSize, sd2.ITSmeanClsSizeL, - sd2.Rigidity, sd2.TPCsignal, sd2.TPCnSigma, sd2.TPCnSigmaNhp, sd2.TPCnSigmaNlp, sd2.TOFmass, sd2.DcaXY, sd2.DcaZ, sd2.IsPvContributor, - sd3.X, sd3.Y, sd3.Z, sd3.Px, sd3.Py, sd3.Pz, sd3.TPCnCls, sd3.TPCchi2, sd3.ITSnCls, sd3.ITSchi2, sd3.ITSmeanClsSize, sd3.ITSmeanClsSizeL, - sd3.Rigidity, sd3.TPCsignal, sd3.TPCnSigma, sd3.TPCnSigmaNhp, sd3.TPCnSigmaNlp, sd3.TOFmass, sd3.DcaXY, sd3.DcaZ, sd3.IsPvContributor, - sd1.SubMass, sd2.SubMass, sd3.SubMass); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen, + cand.cpaPvGen, cand.pxGen, cand.pyGen, cand.pzGen, cand.pvxGen, cand.pvyGen, cand.pvzGen, cand.svxGen, cand.svyGen, cand.svzGen, + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, + cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + hypDaughter.svx, hypDaughter.svy, hypDaughter.svz, d0.x, d0.y, d0.z, d0.px, d0.py, d0.pz, hypDaughter.mass, hypDaughter.ct, hypDaughter.cpaPv, + hypDaughter.maxDcaTracks, hypDaughter.dcaToPvXY, hypDaughter.dcaToPvZ, hypDaughter.dcaToVtxXY, hypDaughter.dcaToVtxZ, hypDaughter.chi2, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + sd1.x, sd1.y, sd1.z, sd1.px, sd1.py, sd1.pz, sd1.tpcNcls, sd1.tpcChi2, sd1.itsNcls, sd1.itsChi2, sd1.itsMeanClsSizeL, + sd1.rigidity, sd1.tpcSignal, sd1.tpcNsigma, sd1.tpcNsigmaNhp, sd1.tpcNsigmaNlp, sd1.tofMass, sd1.dcaXY, sd1.dcaZ, sd1.isPvContributor, + sd2.x, sd2.y, sd2.z, sd2.px, sd2.py, sd2.pz, sd2.tpcNcls, sd2.tpcChi2, sd2.itsNcls, sd2.itsChi2, sd2.itsMeanClsSizeL, + sd2.rigidity, sd2.tpcSignal, sd2.tpcNsigma, sd2.tpcNsigmaNhp, sd2.tpcNsigmaNlp, sd2.tofMass, sd2.dcaXY, sd2.dcaZ, sd2.isPvContributor, + sd3.x, sd3.y, sd3.z, sd3.px, sd3.py, sd3.pz, sd3.tpcNcls, sd3.tpcChi2, sd3.itsNcls, sd3.itsChi2, sd3.itsMeanClsSizeL, + sd3.rigidity, sd3.tpcSignal, sd3.tpcNsigma, sd3.tpcNsigmaNhp, sd3.tpcNsigmaNlp, sd3.tofMass, sd3.dcaXY, sd3.dcaZ, sd3.isPvContributor, + sd1.subMass, sd2.subMass, sd3.subMass); } if (cfgNprimDaughters == 3 && cfgNsecDaughters == 1) { const auto& d0 = cand.daughterTracks.at(0); @@ -478,115 +487,117 @@ struct hypKfTreeCreator { const auto& d2 = cand.daughterTracks.at(2); const auto& sd1 = hypDaughter.daughterTracks.at(0); const auto& sd2 = hypDaughter.daughterTracks.at(1); - if (!isMC || (isMC && cfgMCReconstructed && cand.IsReconstructed)) + if (!isMC || (isMC && cfgMCReconstructed && cand.isReconstructed)) outputTableTwoThree( - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, cand.McTrue, cand.McPhysicalPrimary, - hypDaughter.Svx, hypDaughter.Svy, hypDaughter.Svz, d0.X, d0.Y, d0.Z, d0.Px, d0.Py, d0.Pz, hypDaughter.Mass, hypDaughter.Ct, hypDaughter.CpaPv, - hypDaughter.MaxDcaTracks, hypDaughter.DcaToPvXY, hypDaughter.DcaToPvZ, hypDaughter.DcaToVtxXY, hypDaughter.DcaToVtxZ, hypDaughter.Chi2, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor, - d0.SubMass, d1.SubMass, d2.SubMass, - sd1.X, sd1.Y, sd1.Z, sd1.Px, sd1.Py, sd1.Pz, sd1.TPCnCls, sd1.TPCchi2, sd1.ITSnCls, sd1.ITSchi2, sd1.ITSmeanClsSize, sd1.ITSmeanClsSizeL, - sd1.Rigidity, sd1.TPCsignal, sd1.TPCnSigma, sd1.TPCnSigmaNhp, sd1.TPCnSigmaNlp, sd1.TOFmass, sd1.DcaXY, sd1.DcaZ, sd1.IsPvContributor, - sd2.X, sd2.Y, sd2.Z, sd2.Px, sd2.Py, sd2.Pz, sd2.TPCnCls, sd2.TPCchi2, sd2.ITSnCls, sd2.ITSchi2, sd2.ITSmeanClsSize, sd2.ITSmeanClsSizeL, - sd2.Rigidity, sd2.TPCsignal, sd2.TPCnSigma, sd2.TPCnSigmaNhp, sd2.TPCnSigmaNlp, sd2.TOFmass, sd2.DcaXY, sd2.DcaZ, sd2.IsPvContributor); + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + cand.mcTrue, cand.mcPhysicalPrimary, hypDaughter.svx, hypDaughter.svy, hypDaughter.svz, d0.x, d0.y, d0.z, d0.px, d0.py, d0.pz, hypDaughter.mass, hypDaughter.ct, + hypDaughter.cpaPv, hypDaughter.maxDcaTracks, hypDaughter.dcaToPvXY, hypDaughter.dcaToPvZ, hypDaughter.dcaToVtxXY, hypDaughter.dcaToVtxZ, hypDaughter.chi2, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor, + d0.subMass, d1.subMass, d2.subMass, + sd1.x, sd1.y, sd1.z, sd1.px, sd1.py, sd1.pz, sd1.tpcNcls, sd1.tpcChi2, sd1.itsNcls, sd1.itsChi2, sd1.itsMeanClsSizeL, + sd1.rigidity, sd1.tpcSignal, sd1.tpcNsigma, sd1.tpcNsigmaNhp, sd1.tpcNsigmaNlp, sd1.tofMass, sd1.dcaXY, sd1.dcaZ, sd1.isPvContributor, + sd2.x, sd2.y, sd2.z, sd2.px, sd2.py, sd2.pz, sd2.tpcNcls, sd2.tpcChi2, sd2.itsNcls, sd2.itsChi2, sd2.itsMeanClsSizeL, + sd2.rigidity, sd2.tpcSignal, sd2.tpcNsigma, sd2.tpcNsigmaNhp, sd2.tpcNsigmaNlp, sd2.tofMass, sd2.dcaXY, sd2.dcaZ, sd2.isPvContributor); if (isMC && cfgMCCombined) outputTableMcTwoThree( - cand.PdgCode, cand.IsMatterMC, cand.IsReconstructed, cand.IsPhysicalPrimary, cand.PassedEvSelMC, cand.YGen, cand.PtGen, cand.CtGen, - cand.CpaPvGen, cand.PxGen, cand.PyGen, cand.PzGen, cand.PvxGen, cand.PvyGen, cand.PvzGen, cand.SvxGen, cand.SvyGen, cand.SvzGen, - cand.Species, cand.IsMatter, cand.PassedEvSel, cand.Mass, cand.Y, cand.Pt, cand.Ct, cand.CpaPv, cand.MaxDcaTracks, cand.DcaToPvXY, cand.DcaToPvZ, cand.DevToPvXY, - cand.Chi2, cand.Pvx, cand.Pvy, cand.Pvz, cand.Svx, cand.Svy, cand.Svz, cand.Px, cand.Py, cand.Pz, cand.CollisionMcTrue, - hypDaughter.Svx, hypDaughter.Svy, hypDaughter.Svz, d0.X, d0.Y, d0.Z, d0.Px, d0.Py, d0.Pz, hypDaughter.Mass, hypDaughter.Ct, hypDaughter.CpaPv, - hypDaughter.MaxDcaTracks, hypDaughter.DcaToPvXY, hypDaughter.DcaToPvZ, hypDaughter.DcaToVtxXY, hypDaughter.DcaToVtxZ, hypDaughter.Chi2, - d1.X, d1.Y, d1.Z, d1.Px, d1.Py, d1.Pz, d1.TPCnCls, d1.TPCchi2, d1.ITSnCls, d1.ITSchi2, d1.ITSmeanClsSize, d1.ITSmeanClsSizeL, - d1.Rigidity, d1.TPCsignal, d1.TPCnSigma, d1.TPCnSigmaNhp, d1.TPCnSigmaNlp, d1.TOFmass, d1.DcaXY, d1.DcaZ, d1.IsPvContributor, - d2.X, d2.Y, d2.Z, d2.Px, d2.Py, d2.Pz, d2.TPCnCls, d2.TPCchi2, d2.ITSnCls, d2.ITSchi2, d2.ITSmeanClsSize, d2.ITSmeanClsSizeL, - d2.Rigidity, d2.TPCsignal, d2.TPCnSigma, d2.TPCnSigmaNhp, d2.TPCnSigmaNlp, d2.TOFmass, d2.DcaXY, d2.DcaZ, d2.IsPvContributor, - d0.SubMass, d1.SubMass, d2.SubMass, - sd1.X, sd1.Y, sd1.Z, sd1.Px, sd1.Py, sd1.Pz, sd1.TPCnCls, sd1.TPCchi2, sd1.ITSnCls, sd1.ITSchi2, sd1.ITSmeanClsSize, sd1.ITSmeanClsSizeL, - sd1.Rigidity, sd1.TPCsignal, sd1.TPCnSigma, sd1.TPCnSigmaNhp, sd1.TPCnSigmaNlp, sd1.TOFmass, sd1.DcaXY, sd1.DcaZ, sd1.IsPvContributor, - sd2.X, sd2.Y, sd2.Z, sd2.Px, sd2.Py, sd2.Pz, sd2.TPCnCls, sd2.TPCchi2, sd2.ITSnCls, sd2.ITSchi2, sd2.ITSmeanClsSize, sd2.ITSmeanClsSizeL, - sd2.Rigidity, sd2.TPCsignal, sd2.TPCnSigma, sd2.TPCnSigmaNhp, sd2.TPCnSigmaNlp, sd2.TOFmass, sd2.DcaXY, sd2.DcaZ, sd2.IsPvContributor); + cand.pdgCode, cand.isMatterMC, cand.isReconstructed, cand.isPhysicalPrimary, cand.passedEvSelMC, cand.yGen, cand.ptGen, cand.ctGen, + cand.cpaPvGen, cand.pxGen, cand.pyGen, cand.pzGen, cand.pvxGen, cand.pvyGen, cand.pvzGen, cand.svxGen, cand.svyGen, cand.svzGen, + cand.species, cand.isMatter, cand.cent, cand.occu, cand.passedEvSel, cand.mass, cand.y, cand.pt, cand.ct, cand.cpaPv, cand.maxDcaTracks, cand.dcaToPvXY, + cand.dcaToPvZ, cand.devToPvXY, cand.chi2, cand.pvx, cand.pvy, cand.pvz, cand.svx, cand.svy, cand.svz, cand.px, cand.py, cand.pz, cand.collisionMcTrue, + hypDaughter.svx, hypDaughter.svy, hypDaughter.svz, d0.x, d0.y, d0.z, d0.px, d0.py, d0.pz, hypDaughter.mass, hypDaughter.ct, hypDaughter.cpaPv, + hypDaughter.maxDcaTracks, hypDaughter.dcaToPvXY, hypDaughter.dcaToPvZ, hypDaughter.dcaToVtxXY, hypDaughter.dcaToVtxZ, hypDaughter.chi2, + d1.x, d1.y, d1.z, d1.px, d1.py, d1.pz, d1.tpcNcls, d1.tpcChi2, d1.itsNcls, d1.itsChi2, d1.itsMeanClsSizeL, + d1.rigidity, d1.tpcSignal, d1.tpcNsigma, d1.tpcNsigmaNhp, d1.tpcNsigmaNlp, d1.tofMass, d1.dcaXY, d1.dcaZ, d1.isPvContributor, + d2.x, d2.y, d2.z, d2.px, d2.py, d2.pz, d2.tpcNcls, d2.tpcChi2, d2.itsNcls, d2.itsChi2, d2.itsMeanClsSizeL, + d2.rigidity, d2.tpcSignal, d2.tpcNsigma, d2.tpcNsigmaNhp, d2.tpcNsigmaNlp, d2.tofMass, d2.dcaXY, d2.dcaZ, d2.isPvContributor, + d0.subMass, d1.subMass, d2.subMass, + sd1.x, sd1.y, sd1.z, sd1.px, sd1.py, sd1.pz, sd1.tpcNcls, sd1.tpcChi2, sd1.itsNcls, sd1.itsChi2, sd1.itsMeanClsSizeL, + sd1.rigidity, sd1.tpcSignal, sd1.tpcNsigma, sd1.tpcNsigmaNhp, sd1.tpcNsigmaNlp, sd1.tofMass, sd1.dcaXY, sd1.dcaZ, sd1.isPvContributor, + sd2.x, sd2.y, sd2.z, sd2.px, sd2.py, sd2.pz, sd2.tpcNcls, sd2.tpcChi2, sd2.itsNcls, sd2.itsChi2, sd2.itsMeanClsSizeL, + sd2.rigidity, sd2.tpcSignal, sd2.tpcNsigma, sd2.tpcNsigmaNhp, sd2.tpcNsigmaNlp, sd2.tofMass, sd2.dcaXY, sd2.dcaZ, sd2.isPvContributor); } } //___________________________________________________________________________________________________________________________________________________________ - void fillCandidate(hyperNucleus& cand, hyperNucleus& /*hypDaughter*/, aod::HypKfHypNuc const& hypNuc, aod::HypKfHypNucs const&, aod::HypKfColls const&, aod::HypKfTracks const&, aod::HypKfDaughtAdds const&, aod::HypKfSubDs const&) + void fillCandidate(HyperNucleus& cand, HyperNucleus& /*hypDaughter*/, aod::HypKfHypNuc const& hypNuc, aod::HypKfHypNucs const&, aod::HypKfColls const&, aod::HypKfTracks const&, aod::HypKfDaughtAdds const&, aod::HypKfSubDs const&) { cand.daughterTracks.clear(); cand.subDaughterMassVec.clear(); auto coll = hypNuc.hypKfColl(); - auto addOns = hypNuc.addons_as(); + auto addOns = hypNuc.hypKfDaughtAdd_as(); auto posVec = posVector(addOns); - cand.Species = std::abs(hypNuc.species()); - cand.IsMatter = hypNuc.isMatter(); - cand.PassedEvSel = coll.passedEvSel(); - cand.Mass = hypNuc.mass(); - cand.Y = hypNuc.y(); - cand.Pt = hypNuc.pt(); - cand.Ct = ct(coll, hypNuc); - cand.CpaPv = cpa(coll, hypNuc); - cand.MaxDcaTracks = maxValue(dcaTrackSvAll(posVec, hypNuc, "XY")); - cand.DcaToPvXY = hypNuc.dcaToPvXY(); - cand.DcaToPvZ = hypNuc.dcaToPvZ(); - cand.DcaToVtxXY = hypNuc.dcaToVtxXY(); - cand.DcaToVtxZ = hypNuc.dcaToVtxZ(); - cand.DevToPvXY = hypNuc.devToPvXY(); - cand.Chi2 = hypNuc.chi2(); - cand.Pvx = coll.posX(); - cand.Pvy = coll.posY(); - cand.Pvz = coll.posZ(); - cand.Svx = hypNuc.svx(); - cand.Svy = hypNuc.svy(); - cand.Svz = hypNuc.svz(); - cand.Px = hypNuc.px(); - cand.Py = hypNuc.py(); - cand.Pz = hypNuc.pz(); + cand.species = std::abs(hypNuc.species()); + cand.isMatter = hypNuc.isMatter(); + cand.cent = coll.centFT0C(); + cand.occu = coll.occupancy(); + cand.passedEvSel = coll.passedEvSel(); + cand.mass = hypNuc.mass(); + cand.y = hypNuc.y(); + cand.pt = hypNuc.pt(); + cand.ct = ct(coll, hypNuc); + cand.cpaPv = cpa(coll, hypNuc); + cand.maxDcaTracks = maxValue(dcaTrackSvAll(posVec, hypNuc, "XY")); + cand.dcaToPvXY = hypNuc.dcaToPvXY(); + cand.dcaToPvZ = hypNuc.dcaToPvZ(); + cand.dcaToVtxXY = hypNuc.dcaToVtxXY(); + cand.dcaToVtxZ = hypNuc.dcaToVtxZ(); + cand.devToPvXY = hypNuc.devToPvXY(); + cand.chi2 = hypNuc.chi2(); + cand.pvx = coll.posX(); + cand.pvy = coll.posY(); + cand.pvz = coll.posZ(); + cand.svx = hypNuc.svx(); + cand.svy = hypNuc.svy(); + cand.svz = hypNuc.svz(); + cand.px = hypNuc.px(); + cand.py = hypNuc.py(); + cand.pz = hypNuc.pz(); if (cfgNsecDaughters) { - trackProperties hypDaughter; + TrackProperties hypDaughter; cand.daughterTracks.push_back(hypDaughter); } - auto daughterTracks = hypNuc.daughterTracks_as(); - for (auto& track : daughterTracks) { - trackProperties daughter; - daughter.TPCnCls = track.tpcNcluster(); - daughter.ITSnCls = track.itsNcluster(); - daughter.TPCchi2 = track.tpcChi2NCl(); - daughter.ITSchi2 = track.itsChi2NCl(); - daughter.ITSmeanClsSize = track.itsMeanClsSize(); - daughter.ITSmeanClsSizeL = track.itsMeanClsSize() * track.lambda(); - daughter.Rigidity = track.rigidity(); - daughter.TPCsignal = track.tpcSignal(); - daughter.TPCnSigma = track.tpcNsigma(); - daughter.TPCnSigmaNhp = track.tpcNsigmaNhp(); - daughter.TPCnSigmaNlp = track.tpcNsigmaNlp(); - daughter.TOFmass = track.tofMass(); - daughter.DcaXY = track.dcaXY(); - daughter.DcaZ = track.dcaZ(); - daughter.IsPvContributor = track.isPVContributor(); + auto daughterTracks = hypNuc.hypKfTrack_as(); + for (const auto& track : daughterTracks) { + TrackProperties daughter; + daughter.tpcNcls = track.tpcNcluster(); + daughter.itsNcls = track.itsNcluster(); + daughter.tpcChi2 = track.tpcChi2NCl(); + daughter.itsChi2 = track.itsChi2NCl(); + daughter.itsMeanClsSize = track.itsMeanClsSize(); + daughter.itsMeanClsSizeL = track.itsMeanClsSize() * track.lambda(); + daughter.rigidity = track.rigidity(); + daughter.tpcSignal = track.tpcSignal(); + daughter.tpcNsigma = track.tpcNsigma(); + daughter.tpcNsigmaNhp = track.tpcNsigmaNhp(); + daughter.tpcNsigmaNlp = track.tpcNsigmaNlp(); + daughter.tofMass = track.tofMass(); + daughter.dcaXY = track.dcaXY(); + daughter.dcaZ = track.dcaZ(); + daughter.isPvContributor = track.isPVContributor(); cand.daughterTracks.push_back(daughter); } int trackCount = 0; - for (auto& addOn : addOns) { - cand.daughterTracks.at(trackCount).X = addOn.x(); - cand.daughterTracks.at(trackCount).Y = addOn.y(); - cand.daughterTracks.at(trackCount).Z = addOn.z(); - cand.daughterTracks.at(trackCount).Px = addOn.px(); - cand.daughterTracks.at(trackCount).Py = addOn.py(); - cand.daughterTracks.at(trackCount).Pz = addOn.py(); + for (const auto& addOn : addOns) { + cand.daughterTracks.at(trackCount).x = addOn.x(); + cand.daughterTracks.at(trackCount).y = addOn.y(); + cand.daughterTracks.at(trackCount).z = addOn.z(); + cand.daughterTracks.at(trackCount).px = addOn.px(); + cand.daughterTracks.at(trackCount).py = addOn.py(); + cand.daughterTracks.at(trackCount).pz = addOn.py(); trackCount++; } - cand.NsingleDaughters = trackCount; - if (cand.NsingleDaughters < 3) + cand.nSingleDaughters = trackCount; + if (cand.nSingleDaughters < 3) return; trackCount = 0; - auto subDaughters = hypNuc.subDaughters_as(); - for (auto& subDaughter : subDaughters) { - cand.daughterTracks.at(trackCount++).SubMass = subDaughter.subMass(); + auto subDaughters = hypNuc.hypKfSubD_as(); + for (const auto& subDaughter : subDaughters) { + cand.daughterTracks.at(trackCount++).subMass = subDaughter.subMass(); } } //___________________________________________________________________________________________________________________________________________________________ @@ -594,37 +605,37 @@ struct hypKfTreeCreator { void processMC(aod::HypKfMcParts const& mcHypNucs, aod::HypKfHypNucs const& hypNucs, aod::HypKfMcColls const&, aod::HypKfColls const& hypKfColls, aod::HypKfTracks const& hypKfTrks, aod::HypKfDaughtAdds const& hypKfDAdd, aod::HypKfSubDs const& hypKfDSub) { isMC = true; - for (auto& mcHypNuc : mcHypNucs) { + for (const auto& mcHypNuc : mcHypNucs) { if (std::abs(mcHypNuc.species()) != cfgSpecies) continue; auto mcColl = mcHypNuc.hypKfMcColl(); const auto mcParticleIdx = mcHypNuc.globalIndex(); auto hypNucsByMc = hypNucs.sliceBy(perMcParticle, mcParticleIdx); - hyperNucleus candidate, hypDaughter, dummy; - candidate.PdgCode = mcHypNuc.pdgCode(); - candidate.IsMatterMC = mcHypNuc.isMatter(); - candidate.IsPhysicalPrimary = mcHypNuc.isPhysicalPrimary(); - candidate.PassedEvSelMC = mcColl.passedEvSel(); - candidate.YGen = mcHypNuc.y(); - candidate.PtGen = mcHypNuc.pt(); - candidate.CtGen = ct(mcColl, mcHypNuc); - candidate.IsReconstructed = 0; - candidate.CpaPvGen = cpa(mcColl, mcHypNuc); - candidate.PxGen = mcHypNuc.px(); - candidate.PyGen = mcHypNuc.py(); - candidate.PzGen = mcHypNuc.pz(); - candidate.PvxGen = mcColl.posX(); - candidate.PvyGen = mcColl.posY(); - candidate.PvzGen = mcColl.posZ(); - candidate.SvxGen = mcHypNuc.svx(); - candidate.SvyGen = mcHypNuc.svy(); - candidate.SvzGen = mcHypNuc.svz(); - for (auto& hypNuc : hypNucsByMc) { + HyperNucleus candidate, hypDaughter, dummy; + candidate.pdgCode = mcHypNuc.pdgCode(); + candidate.isMatterMC = mcHypNuc.isMatter(); + candidate.isPhysicalPrimary = mcHypNuc.isPhysicalPrimary(); + candidate.passedEvSelMC = mcColl.passedEvSel(); + candidate.yGen = mcHypNuc.y(); + candidate.ptGen = mcHypNuc.pt(); + candidate.ctGen = ct(mcColl, mcHypNuc); + candidate.isReconstructed = 0; + candidate.cpaPvGen = cpa(mcColl, mcHypNuc); + candidate.pxGen = mcHypNuc.px(); + candidate.pyGen = mcHypNuc.py(); + candidate.pzGen = mcHypNuc.pz(); + candidate.pvxGen = mcColl.posX(); + candidate.pvyGen = mcColl.posY(); + candidate.pvzGen = mcColl.posZ(); + candidate.svxGen = mcHypNuc.svx(); + candidate.svyGen = mcHypNuc.svy(); + candidate.svzGen = mcHypNuc.svz(); + for (const auto& hypNuc : hypNucsByMc) { auto coll = hypNuc.hypKfColl(); if (coll.hypKfMcCollId() == mcHypNuc.hypKfMcCollId()) { - candidate.CollisionMcTrue = true; + candidate.collisionMcTrue = true; } - candidate.IsReconstructed++; + candidate.isReconstructed++; fillCandidate(candidate, hypDaughter, hypNucs.rawIteratorAt(hypNuc.globalIndex()), hypNucs, hypKfColls, hypKfTrks, hypKfDAdd, hypKfDSub); if (cfgNsecDaughters) { fillCandidate(hypDaughter, dummy, hypNucs.rawIteratorAt(hypNuc.hypDaughterId()), hypNucs, hypKfColls, hypKfTrks, hypKfDAdd, hypKfDSub); @@ -632,8 +643,8 @@ struct hypKfTreeCreator { } fillTable(candidate, hypDaughter); hPt[0]->Fill(mcHypNuc.pt()); - if (candidate.IsReconstructed) - hPt[1]->Fill(candidate.Pt); + if (candidate.isReconstructed) + hPt[1]->Fill(candidate.pt); } hPt[2]->Divide(hPt[1].get(), hPt[0].get()); } @@ -668,16 +679,16 @@ struct hypKfTreeCreator { float meanValue(std::vector vec) { float sum = 0; - for (auto value : vec) + for (const auto& value : vec) sum += value; return sum / vec.size(); } float mean2Value(std::vector vec) { float sum = 0; - for (auto value : vec) + for (const auto& value : vec) sum += (value * value); - return TMath::Sqrt(sum / vec.size()); + return std::sqrt(sum / vec.size()); } float dcaTracks(std::vector v, int track1, int track2, TString opt = "XY") @@ -703,7 +714,7 @@ struct hypKfTreeCreator { std::vector posVector(T const& addons) { std::vector v; - for (auto& pos : addons) { + for (const auto& pos : addons) { v.push_back(std::array{pos.x(), pos.y(), pos.z()}); } return v; @@ -738,11 +749,6 @@ struct hypKfTreeCreator { { return RecoDecay::cpa(primVtx(coll), decayVtx(hypNuc), momenta(hypNuc)); } - double paArcMin(double cosPa) - { - // returns the pointing angle (in arc min) for a given cosPa - return TMath::ACos(cosPa) * 60 * 180 / TMath::Pi(); - } // only for Cascades template float decayLength(TPart const& mother, TPart const& daughter) diff --git a/PWGLF/TableProducer/Resonances/CMakeLists.txt b/PWGLF/TableProducer/Resonances/CMakeLists.txt index 785dbdf3828..236ac38e2d9 100644 --- a/PWGLF/TableProducer/Resonances/CMakeLists.txt +++ b/PWGLF/TableProducer/Resonances/CMakeLists.txt @@ -20,6 +20,11 @@ o2physics_add_dpl_workflow(f1protonreducedtable PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsVertexing O2Physics::EventFilteringUtils COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(doublephitable + SOURCES doublephitable.cxx + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsVertexing + COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(filterf1proton SOURCES filterf1proton.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsVertexing diff --git a/PWGLF/TableProducer/Resonances/doublephitable.cxx b/PWGLF/TableProducer/Resonances/doublephitable.cxx new file mode 100644 index 00000000000..b9638e8cec1 --- /dev/null +++ b/PWGLF/TableProducer/Resonances/doublephitable.cxx @@ -0,0 +1,273 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// \file doublephitable.cxx +/// \brief Selection of events with triplets and pairs for femtoscopic studies +/// +/// \author Sourav Kundu, sourav.kundu@cern.ch + +#include +#include +#include +#include +#include +#include // FIXME +#include // FIXME + +#include +#include +#include +#include + +#include "EventFiltering/Zorro.h" +#include "EventFiltering/ZorroSummary.h" + +#include "PWGLF/DataModel/ReducedDoublePhiTables.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/runDataProcessing.h" +#include "CommonConstants/MathConstants.h" +#include "Common/Core/TrackSelection.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/PIDResponse.h" +#include "DataFormatsTPC/BetheBlochAleph.h" +#include "CCDB/BasicCCDBManager.h" +#include "CCDB/CcdbApi.h" + +using namespace o2; +using namespace o2::framework; +using namespace o2::framework::expressions; + +struct doublephitable { + + // Produce derived tables + Produces redPhiEvents; + Produces phiTrack; + + // events + Configurable cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"}; + // track + Configurable useGlobalTrack{"useGlobalTrack", true, "use Global track"}; + Configurable cfgCutTOFBeta{"cfgCutTOFBeta", 0.0, "cut TOF beta"}; + Configurable cfgCutCharge{"cfgCutCharge", 0.0, "cut on Charge"}; + Configurable cfgCutPT{"cfgCutPT", 0.2, "PT cut on daughter track"}; + Configurable cfgCutEta{"cfgCutEta", 0.8, "Eta cut on daughter track"}; + Configurable cfgCutDCAxy{"cfgCutDCAxy", 2.0f, "DCAxy range for tracks"}; + Configurable cfgCutDCAz{"cfgCutDCAz", 2.0f, "DCAz range for tracks"}; + Configurable nsigmaCutTPC{"nsigmacutTPC", 3.0, "Value of the TPC Nsigma cut"}; + Configurable nsigmaCutTOF{"nsigmaCutTOF", 3.0, "Value of the TOF Nsigma cut"}; + Configurable cfgITScluster{"cfgITScluster", 0, "Number of ITS cluster"}; + Configurable cfgTPCcluster{"cfgTPCcluster", 70, "Number of TPC cluster"}; + Configurable isDeepAngle{"isDeepAngle", true, "Deep Angle cut"}; + Configurable cfgDeepAngle{"cfgDeepAngle", 0.04, "Deep Angle cut value"}; + ConfigurableAxis configThnAxisInvMass{"configThnAxisInvMass", {120, 0.98, 1.1}, "#it{M} (GeV/#it{c}^{2})"}; + ConfigurableAxis configThnAxisPt{"configThnAxisPt", {100, 0.0, 10.}, "#it{p}_{T} (GeV/#it{c})"}; + + Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; + Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT); + Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz); + Filter PIDcutFilter = nabs(aod::pidtpc::tpcNSigmaKa) < nsigmaCutTPC; + + using EventCandidates = soa::Filtered>; + using TrackCandidates = soa::Filtered>; + + SliceCache cache; + Partition posTracks = aod::track::signed1Pt > cfgCutCharge; + Partition negTracks = aod::track::signed1Pt < cfgCutCharge; + + // Histogram + HistogramRegistry qaRegistry{"QAHistos", { + {"hEventstat", "hEventstat", {HistType::kTH1F, {{2, 0.0f, 2.0f}}}}, + {"hInvMassPhi", "hInvMassPhi", {HistType::kTH2F, {{40, 1.0f, 1.04f}, {100, 0.0f, 10.0f}}}}, + {"hNsigmaPtkaonTPC", "hNsigmaPtkaonTPC", {HistType::kTH2F, {{200, -10.0f, 10.0f}, {100, 0.0f, 10.0f}}}}, + {"hNsigmaPtkaonTOF", "hNsigmaPtkaonTOF", {HistType::kTH2F, {{200, -10.0f, 10.0f}, {100, 0.0f, 10.0f}}}}, + }, + OutputObjHandlingPolicy::AnalysisObject}; + + double massKa = o2::constants::physics::MassKPlus; + + template + bool selectionTrack(const T& candidate) + { + if (useGlobalTrack && !(candidate.isGlobalTrack() && candidate.isPVContributor() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsFound() > cfgTPCcluster)) { + return false; + } + return true; + } + template + bool selectionPID(const T& candidate) + { + if (!candidate.hasTOF() && TMath::Abs(candidate.tpcNSigmaKa()) < nsigmaCutTPC) { + return true; + } + if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && TMath::Abs(candidate.tpcNSigmaKa()) < nsigmaCutTPC && TMath::Abs(candidate.tofNSigmaKa()) < nsigmaCutTOF) { + return true; + } + return false; + } + // deep angle cut on pair to remove photon conversion + template + bool selectionPair(const T1& candidate1, const T2& candidate2) + { + double pt1, pt2, pz1, pz2, p1, p2, angle; + pt1 = candidate1.pt(); + pt2 = candidate2.pt(); + pz1 = candidate1.pz(); + pz2 = candidate2.pz(); + p1 = candidate1.p(); + p2 = candidate2.p(); + angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2)); + if (isDeepAngle && angle < cfgDeepAngle) { + return false; + } + return true; + } + + ROOT::Math::PxPyPzMVector KaonPlus, KaonMinus, PhiMesonMother, PhiVectorDummy, Phid1dummy, Phid2dummy; + void processPhiReducedTable(EventCandidates::iterator const& collision, TrackCandidates const&, aod::BCsWithTimestamps const&) + { + bool keepEventDoublePhi = false; + int numberPhi = 0; + auto currentRunNumber = collision.bc_as().runNumber(); + auto bc = collision.bc_as(); + std::vector Phid1Index = {}; + std::vector Phid2Index = {}; + + std::vector Phid1Charge = {}; + std::vector Phid2Charge = {}; + + std::vector Phid1TPC = {}; + std::vector Phid2TPC = {}; + + std::vector Phid1TOF = {}; + std::vector Phid2TOF = {}; + + std::vector Phid1TOFHit = {}; + std::vector Phid2TOFHit = {}; + + std::vector phiresonance, phiresonanced1, phiresonanced2; + + int Npostrack = 0; + int Nnegtrack = 0; + + if (collision.sel8() && collision.selection_bit(aod::evsel::kNoTimeFrameBorder) && collision.selection_bit(aod::evsel::kNoITSROFrameBorder) && collision.selection_bit(aod::evsel::kNoSameBunchPileup) && collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) { + auto posThisColl = posTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); + auto negThisColl = negTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); + for (auto track1 : posThisColl) { + // track selection + if (!selectionTrack(track1)) { + continue; + } + // PID check + if (!selectionPID(track1)) { + continue; + } + Npostrack = Npostrack + 1; + qaRegistry.fill(HIST("hNsigmaPtkaonTPC"), track1.tpcNSigmaKa(), track1.pt()); + if (track1.hasTOF()) { + qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track1.tofNSigmaKa(), track1.pt()); + } + auto track1ID = track1.globalIndex(); + for (auto track2 : negThisColl) { + // track selection + if (!selectionTrack(track2)) { + continue; + } + // PID check + if (!selectionPID(track2)) { + continue; + } + if (Npostrack == 1) { + Nnegtrack = Nnegtrack + 1; + } + auto track2ID = track2.globalIndex(); + if (track2ID == track1ID) { + continue; + } + if (!selectionPair(track1, track2)) { + continue; + } + KaonPlus = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), massKa); + KaonMinus = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), massKa); + PhiMesonMother = KaonPlus + KaonMinus; + if (PhiMesonMother.M() > 1.0 && PhiMesonMother.M() < 1.04) { + numberPhi = numberPhi + 1; + ROOT::Math::PtEtaPhiMVector temp1(track1.pt(), track1.eta(), track1.phi(), massKa); + ROOT::Math::PtEtaPhiMVector temp2(track2.pt(), track2.eta(), track2.phi(), massKa); + ROOT::Math::PtEtaPhiMVector temp3(PhiMesonMother.pt(), PhiMesonMother.eta(), PhiMesonMother.phi(), PhiMesonMother.M()); + + phiresonanced1.push_back(temp1); + phiresonanced2.push_back(temp2); + phiresonance.push_back(temp3); + + Phid1Index.push_back(track1.globalIndex()); + Phid2Index.push_back(track2.globalIndex()); + + Phid1Charge.push_back(track1.sign()); + Phid2Charge.push_back(track2.sign()); + + Phid1TPC.push_back(track1.tpcNSigmaKa()); + Phid2TPC.push_back(track2.tpcNSigmaKa()); + auto d1TOFHit = -1; + auto d2TOFHit = -1; + auto d1TOF = -999.0; + auto d2TOF = -999.0; + if (track1.hasTOF()) { + d1TOFHit = 1; + d1TOF = track1.tofNSigmaKa(); + } + if (track2.hasTOF()) { + d2TOFHit = 1; + d2TOF = track2.tofNSigmaKa(); + } + Phid1TOF.push_back(d1TOF); + Phid2TOF.push_back(d2TOF); + Phid1TOFHit.push_back(d1TOFHit); + Phid2TOFHit.push_back(d2TOFHit); + qaRegistry.fill(HIST("hInvMassPhi"), PhiMesonMother.M(), PhiMesonMother.Pt()); + } + } + } + } // select collision + if (numberPhi >= 2) { + keepEventDoublePhi = true; + } + qaRegistry.fill(HIST("hEventstat"), 0.5); + if (keepEventDoublePhi && numberPhi >= 2 && (phiresonance.size() == phiresonanced1.size()) && (phiresonance.size() == phiresonanced2.size())) { + qaRegistry.fill(HIST("hEventstat"), 1.5); + /////////// Fill collision table/////////////// + redPhiEvents(bc.globalBC(), currentRunNumber, bc.timestamp(), collision.posZ(), collision.numContrib(), Npostrack, Nnegtrack); + auto indexEvent = redPhiEvents.lastIndex(); + //// Fill track table for Phi////////////////// + for (auto if1 = phiresonance.begin(); if1 != phiresonance.end(); ++if1) { + auto i5 = std::distance(phiresonance.begin(), if1); + PhiVectorDummy = phiresonance.at(i5); + Phid1dummy = phiresonanced1.at(i5); + Phid2dummy = phiresonanced2.at(i5); + phiTrack(indexEvent, PhiVectorDummy.Px(), PhiVectorDummy.Py(), PhiVectorDummy.Pz(), Phid1dummy.Px(), Phid1dummy.Py(), Phid1dummy.Pz(), Phid2dummy.Px(), Phid2dummy.Py(), Phid2dummy.Pz(), + PhiVectorDummy.M(), + Phid1Index.at(i5), Phid2Index.at(i5), + Phid1Charge.at(i5), Phid2Charge.at(i5), + Phid1TPC.at(i5), Phid2TPC.at(i5), Phid1TOFHit.at(i5), Phid2TOFHit.at(i5), Phid1TOF.at(i5), Phid2TOF.at(i5)); + } + } + } // process + PROCESS_SWITCH(doublephitable, processPhiReducedTable, "Process table creation for double phi", true); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfg) +{ + return WorkflowSpec{adaptAnalysisTask(cfg)}; +} diff --git a/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx b/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx index 50eb1ba4ffd..324f2ed2b01 100644 --- a/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx +++ b/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx @@ -530,10 +530,14 @@ struct f1protonreducedtable { // keep TOF Hit of pion std::vector PionTOFHit = {}; std::vector PionTOFHitFinal = {}; + std::vector PionTPC = {}; + std::vector PionTPCFinal = {}; // keep TOF Hit of kaon std::vector KaonTOFHit = {}; std::vector KaonTOFHitFinal = {}; + std::vector KaonTPC = {}; + std::vector KaonTPCFinal = {}; // keep kaon-kshort mass of f1resonance std::vector f1kaonkshortmass = {}; @@ -618,9 +622,11 @@ struct f1protonreducedtable { auto PionTOF = 0; if (track.sign() > 0) { qaRegistry.fill(HIST("hNsigmaPtpionTPC"), nTPCSigmaP[0], track.pt()); + PionTPC.push_back(nTPCSigmaP[0]); } if (track.sign() < 0) { qaRegistry.fill(HIST("hNsigmaPtpionTPC"), nTPCSigmaN[0], track.pt()); + PionTPC.push_back(nTPCSigmaN[0]); } if (track.hasTOF()) { qaRegistry.fill(HIST("hNsigmaPtpionTOF"), track.tofNSigmaPi(), track.pt()); @@ -637,9 +643,11 @@ struct f1protonreducedtable { auto KaonTOF = 0; if (track.sign() > 0) { qaRegistry.fill(HIST("hNsigmaPtkaonTPC"), nTPCSigmaP[1], track.pt()); + KaonTPC.push_back(nTPCSigmaP[1]); } if (track.sign() < 0) { qaRegistry.fill(HIST("hNsigmaPtkaonTPC"), nTPCSigmaN[1], track.pt()); + KaonTPC.push_back(nTPCSigmaN[1]); } if (track.hasTOF()) { qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track.tofNSigmaKa(), track.pt()); @@ -742,6 +750,8 @@ struct f1protonreducedtable { F1KshortDaughterNegativeIndex.push_back(KshortNegDaughIndex.at(i3)); PionTOFHitFinal.push_back(PionTOFHit.at(i1)); // Pion TOF Hit KaonTOFHitFinal.push_back(KaonTOFHit.at(i2)); // Kaon TOF Hit + PionTPCFinal.push_back(PionTPC.at(i1)); // Pion TPC + KaonTPCFinal.push_back(KaonTPC.at(i2)); // Kaon TPC if (pairsign == 1) { qaRegistry.fill(HIST("hInvMassf1"), F1Vector.M(), F1Vector.Pt()); numberF1 = numberF1 + 1; @@ -798,7 +808,7 @@ struct f1protonreducedtable { F1d1dummy = f1resonanced1.at(i5); F1d2dummy = f1resonanced2.at(i5); F1d3dummy = f1resonanced3.at(i5); - f1track(indexEvent, f1signal.at(i5), F1VectorDummy.Px(), F1VectorDummy.Py(), F1VectorDummy.Pz(), F1d1dummy.Px(), F1d1dummy.Py(), F1d1dummy.Pz(), F1d2dummy.Px(), F1d2dummy.Py(), F1d2dummy.Pz(), F1d3dummy.Px(), F1d3dummy.Py(), F1d3dummy.Pz(), PionTOFHitFinal.at(i5), KaonTOFHitFinal.at(i5), F1VectorDummy.M(), f1kaonkshortmass.at(i5), F1PionIndex.at(i5), F1KaonIndex.at(i5), F1KshortDaughterPositiveIndex.at(i5), F1KshortDaughterNegativeIndex.at(i5)); + f1track(indexEvent, f1signal.at(i5), F1VectorDummy.Px(), F1VectorDummy.Py(), F1VectorDummy.Pz(), F1d1dummy.Px(), F1d1dummy.Py(), F1d1dummy.Pz(), F1d2dummy.Px(), F1d2dummy.Py(), F1d2dummy.Pz(), F1d3dummy.Px(), F1d3dummy.Py(), F1d3dummy.Pz(), PionTOFHitFinal.at(i5), KaonTOFHitFinal.at(i5), PionTPCFinal.at(i5), KaonTPCFinal.at(i5), F1VectorDummy.M(), f1kaonkshortmass.at(i5), F1PionIndex.at(i5), F1KaonIndex.at(i5), F1KshortDaughterPositiveIndex.at(i5), F1KshortDaughterNegativeIndex.at(i5)); } //// Fill track table for proton////////////////// for (auto iproton = protons.begin(); iproton != protons.end(); ++iproton) { diff --git a/PWGLF/TableProducer/Resonances/resonanceInitializer.cxx b/PWGLF/TableProducer/Resonances/resonanceInitializer.cxx index 202432fe061..53708c43eae 100644 --- a/PWGLF/TableProducer/Resonances/resonanceInitializer.cxx +++ b/PWGLF/TableProducer/Resonances/resonanceInitializer.cxx @@ -145,14 +145,14 @@ struct ResonanceInitializer { // Pre-filters for efficient process // Filter tofPIDFilter = aod::track::tofExpMom < 0.f || ((aod::track::tofExpMom > 0.f) && ((nabs(aod::pidtof::tofNSigmaPi) < pidnSigmaPreSelectionCut) || (nabs(aod::pidtof::tofNSigmaKa) < pidnSigmaPreSelectionCut) || (nabs(aod::pidtof::tofNSigmaPr) < pidnSigmaPreSelectionCut))); // TOF + // Filter tpcPIDFilter = nabs(aod::pidtpc::tpcNSigmaPi) < pidnSigmaPreSelectionCut || nabs(aod::pidtpc::tpcNSigmaKa) < pidnSigmaPreSelectionCut || nabs(aod::pidtpc::tpcNSigmaPr) < pidnSigmaPreSelectionCut; // TPC Filter trackFilter = (trackSelection.node() == 0) || // from tpcSkimsTableCreator ((trackSelection.node() == 1) && requireGlobalTrackInFilter()) || ((trackSelection.node() == 2) && requireGlobalTrackWoPtEtaInFilter()) || ((trackSelection.node() == 3) && requireGlobalTrackWoDCAInFilter()) || ((trackSelection.node() == 4) && requireQualityTracksInFilter()) || ((trackSelection.node() == 5) && requireTrackCutInFilter(TrackSelectionFlags::kInAcceptanceTracks)); - Filter tpcPIDFilter = nabs(aod::pidtpc::tpcNSigmaPi) < pidnSigmaPreSelectionCut || nabs(aod::pidtpc::tpcNSigmaKa) < pidnSigmaPreSelectionCut || nabs(aod::pidtpc::tpcNSigmaPr) < pidnSigmaPreSelectionCut; // TPC - Filter trackEtaFilter = nabs(aod::track::eta) < cfgCutEta; // Eta cut + Filter trackEtaFilter = nabs(aod::track::eta) < cfgCutEta; // Eta cut EventPlaneHelper helperEP; @@ -1298,7 +1298,6 @@ struct ResonanceInitializer { // Loop over tracks fillTracks(collision, tracks); fillV0s(collision, V0s, tracks); - fillV0s(collision, V0s, tracks); fillCascades(collision, Cascades, tracks); // Loop over all MC particles @@ -1322,7 +1321,6 @@ struct ResonanceInitializer { // Loop over tracks fillTracks(collision, tracks); fillV0s(collision, V0s, tracks); - fillV0s(collision, V0s, tracks); fillCascades(collision, Cascades, tracks); // Loop over all MC particles diff --git a/PWGLF/TableProducer/Resonances/resonanceModuleInitializer.cxx b/PWGLF/TableProducer/Resonances/resonanceModuleInitializer.cxx index 8b2315d219a..86fa463ba3b 100644 --- a/PWGLF/TableProducer/Resonances/resonanceModuleInitializer.cxx +++ b/PWGLF/TableProducer/Resonances/resonanceModuleInitializer.cxx @@ -65,8 +65,10 @@ struct ResonanceModuleInitializer { Service pdg; ///< PDG database service EventPlaneHelper helperEP; ///< Helper for event plane calculations - Produces resoCollisions; ///< Output table for resonance collisions - Produces resoMCCollisions; ///< Output table for MC resonance collisions + Produces resoCollisions; ///< Output table for resonance collisions + Produces resoMCCollisions; ///< Output table for MC resonance collisions + Produces resoSpheroCollisions; ///< Output table for spherocity + Produces resoEvtPlCollisions; ///< Output table for event plane // CCDB options Configurable ccdbURL{"ccdbURL", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; @@ -102,8 +104,11 @@ struct ResonanceModuleInitializer { Configurable cfgEvtPileupRejection{"cfgEvtPileupRejection", false, "Evt sel: apply pileup rejection"}; Configurable cfgEvtNoITSROBorderCut{"cfgEvtNoITSROBorderCut", false, "Evt sel: apply NoITSRO border cut"}; + // Spherocity configuration + Configurable cfgTrackSphMin{"cfgTrackSphMin", 10, "Number of tracks for Spherocity Calculation"}; + Configurable cfgTrackSphDef{"cfgTrackSphDef", 0, "Spherocity Definition: |pT| = 1 -> 0, otherwise -> 1"}; + // Qvector configuration - Configurable cfgBypassQvec{"cfgBypassQvec", true, "Bypass for qvector task"}; Configurable cfgEvtPl{"cfgEvtPl", 40500, "Configuration of three subsystems for the event plane and its resolution, 10000*RefA + 100*RefB + S, where FT0C:0, FT0A:1, FT0M:2, FV0A:3, BPos:5, BNeg:6"}; int evtPlRefAId = static_cast(cfgEvtPl / 10000); @@ -582,6 +587,31 @@ struct ResonanceModuleInitializer { fillMCCollision(collision, mcParticles); } PROCESS_SWITCH(ResonanceModuleInitializer, processRun2MC, "process MC for RUN2", false); + + /** + * @brief Processes Spherocity + * + * @param collision Collision data + * @param tracks Track data + */ + void processSpherocity(soa::Filtered::iterator const& collision, aod::ResoTrackCandidates const& tracks) + { + float spherocity = computeSpherocity(tracks, cfgTrackSphMin, cfgTrackSphDef); + resoSpheroCollisions(collision.globalIndex(), spherocity); + } + PROCESS_SWITCH(ResonanceModuleInitializer, processSpherocity, "process Spherocity", false); + + /** + * @brief Processes Event Plane + * + * @param collision Collision data with Qvectors + * @param tracks Track data + */ + void processEventPlane(soa::Filtered>::iterator const& collision) + { + resoEvtPlCollisions(collision.globalIndex(), getEvtPl(collision), getEvtPlRes(collision, evtPlDetId, evtPlRefAId), getEvtPlRes(collision, evtPlDetId, evtPlRefBId), getEvtPlRes(collision, evtPlRefAId, evtPlRefBId)); + } + PROCESS_SWITCH(ResonanceModuleInitializer, processEventPlane, "process Event Plane", false); }; /** @@ -1204,7 +1234,7 @@ struct ResonanceDaughterInitializer { * @param v0s V0 data * @param tracks Track data */ - void processV0Data(aod::ResoCollision const& collision, soa::Filtered const& v0s, aod::ResoTrackCandidates const& tracks) + void processV0Data(aod::ResoCollision const& collision, aod::ResoV0Candidates const& v0s, aod::ResoTrackCandidates const& tracks) { fillV0s(collision, v0s, tracks); } @@ -1217,7 +1247,7 @@ struct ResonanceDaughterInitializer { * @param v0s V0 data * @param tracks Track data */ - void processV0MC(aod::ResoCollision const& collision, soa::Filtered const& v0s, aod::ResoTrackCandidatesMC const& tracks) + void processV0MC(aod::ResoCollision const& collision, aod::ResoV0CandidatesMC const& v0s, aod::ResoTrackCandidatesMC const& tracks) { fillV0s(collision, v0s, tracks); } @@ -1230,7 +1260,7 @@ struct ResonanceDaughterInitializer { * @param cascades Cascade data * @param tracks Track data */ - void processCascData(aod::ResoCollision const& collision, soa::Filtered const& cascades, aod::ResoTrackCandidates const& tracks) + void processCascData(aod::ResoCollision const& collision, aod::ResoCascadesCandidates const& cascades, aod::ResoTrackCandidates const& tracks) { fillCascades(collision, cascades, tracks); } @@ -1243,7 +1273,7 @@ struct ResonanceDaughterInitializer { * @param cascades Cascade data * @param tracks Track data */ - void processCascMC(aod::ResoCollision const& collision, soa::Filtered const& cascades, aod::ResoTrackCandidatesMC const& tracks) + void processCascMC(aod::ResoCollision const& collision, aod::ResoCascadesCandidatesMC const& cascades, aod::ResoTrackCandidatesMC const& tracks) { fillCascades(collision, cascades, tracks); } diff --git a/PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx b/PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx index d1f0f3f3977..b8acf8e291d 100644 --- a/PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx @@ -28,6 +28,7 @@ #include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/PIDResponse.h" +#include "Common/DataModel/PIDResponseITS.h" #include "Common/DataModel/EventSelection.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/TrackSelectionTables.h" @@ -96,6 +97,11 @@ struct LFNucleiBATask { Configurable nsigmaTPCAl{"nsigmaTPCAl", 3.f, "Value of the Nsigma TPC cut for alpha"}; } nsigmaTPCvar; + struct : ConfigurableGroup { + Configurable nsigmaITSTr{"nsigmaITSTr", 3.f, "Value of the Nsigma ITS cut for tritons"}; + Configurable nsigmaITSHe{"nsigmaITSHe", 3.f, "Value of the Nsigma ITS cut for helium-3"}; + } nsigmaITSvar; + // Set additional cuts (used for debug) Configurable betaCut{"betaCut", 0.4f, "Value of the beta selection for TOF cut (default 0.4)"}; @@ -108,6 +114,7 @@ struct LFNucleiBATask { ConfigurableAxis binsdEdx{"binsdEdx", {600, 0.f, 3000.f}, ""}; ConfigurableAxis binsBeta{"binsBeta", {120, 0.0, 1.2}, ""}; ConfigurableAxis binsDCA{"binsDCA", {400, -1.f, 1.f}, ""}; + ConfigurableAxis binsSigmaITS{"binsSigmaITS", {1000, -100, 100}, ""}; ConfigurableAxis binsSigmaTPC{"binsSigmaTPC", {1000, -100, 100}, ""}; ConfigurableAxis binsSigmaTOF{"binsSigmaTOF", {1000, -100, 100}, ""}; ConfigurableAxis binsMassPr{"binsMassPr", {100, -1., 1.f}, ""}; @@ -175,11 +182,11 @@ struct LFNucleiBATask { static constexpr int PDGTriton = 1000010030; static constexpr int PDGHelium = 1000020030; static constexpr int PDGAlpha = 1000020040; - static constexpr float fMassProton = 0.938272088f; - static constexpr float fMassDeuteron = 1.87561f; - static constexpr float fMassTriton = 2.80892f; - static constexpr float fMassHelium = 2.80839f; - static constexpr float fMassAlpha = 3.72738f; + static constexpr float MassProtonVal = 0.938272088f; + static constexpr float MassDeuteronVal = 1.87561f; + static constexpr float MassTritonVal = 2.80892f; + static constexpr float MassHeliumVal = 2.80839f; + static constexpr float MassAlphaVal = 3.72738f; void init(o2::framework::InitContext&) { @@ -195,8 +202,9 @@ struct LFNucleiBATask { const AxisSpec massDeAxis{binsMassDe, ""}; const AxisSpec massTrAxis{binsMassTr, ""}; const AxisSpec massHeAxis{binsMassHe, ""}; - const AxisSpec SigmaTPCAxis{binsSigmaTPC, ""}; - const AxisSpec SigmaTOFAxis{binsSigmaTOF, ""}; + const AxisSpec sigmaITSAxis{binsSigmaITS, ""}; + const AxisSpec sigmaTPCAxis{binsSigmaTPC, ""}; + const AxisSpec sigmaTOFAxis{binsSigmaTOF, ""}; if (doprocessData == true && doprocessMCReco == true) { LOG(fatal) << "Can't enable processData and processMCReco in the same time, pick one!"; @@ -1466,36 +1474,42 @@ struct LFNucleiBATask { // NSigmasTPC histograms if (enableDebug) { - debugHistos.add("debug/tracks/pion/h2PionVspTNSigmaTPC", "NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/tracks/kaon/h2KaonVspTNSigmaTPC", "NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); + debugHistos.add("debug/tracks/pion/h2PionVspTNSigmaTPC", "NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/tracks/kaon/h2KaonVspTNSigmaTPC", "NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); } if (enablePr) { - histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - histos.add("tracks/proton/h2antiProtonVspTNSigmaTPC", "NSigmaTPC(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + histos.add("tracks/proton/h2antiProtonVspTNSigmaTPC", "NSigmaTPC(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); } if (enableDe) { if (enableCentrality) { - histos.add("tracks/deuteron/h3DeuteronVspTNSigmaTPCVsMult", "NSigmaTPC(d) vs pT; #it{p}_{T} (GeV/#it{c}) vs mult; NSigmaTPC", HistType::kTH3F, {{ptAxis}, {SigmaTPCAxis}, {binsPercentile}}); - histos.add("tracks/deuteron/h3antiDeuteronVspTNSigmaTPCVsMult", "NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}) vs mult; NSigmaTPC", HistType::kTH3F, {{ptAxis}, {SigmaTPCAxis}, {binsPercentile}}); + histos.add("tracks/deuteron/h3DeuteronVspTNSigmaTPCVsMult", "NSigmaTPC(d) vs pT; #it{p}_{T} (GeV/#it{c}) vs mult; NSigmaTPC", HistType::kTH3F, {{ptAxis}, {sigmaTPCAxis}, {binsPercentile}}); + histos.add("tracks/deuteron/h3antiDeuteronVspTNSigmaTPCVsMult", "NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}) vs mult; NSigmaTPC", HistType::kTH3F, {{ptAxis}, {sigmaTPCAxis}, {binsPercentile}}); } else { - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTPC", "NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPCTruePrim", "NSigmaTPC(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTPCTruePrim", "NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTPC", "NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPCTruePrim", "NSigmaTPC(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTPCTruePrim", "NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); } } if (enableTr) { - histos.add("tracks/triton/h2TritonVspTNSigmaTPC", "NSigmaTPC(t) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - histos.add("tracks/triton/h2antiTritonVspTNSigmaTPC", "NSigmaTPC(#bar{t}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); + // histos.add("tracks/triton/h2TritonVspTNSigmaITS", "NSigmaITS(t) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaITS", HistType::kTH2F, {{ptAxis}, {sigmaITSAxis}}); + // histos.add("tracks/triton/h2antiTritonVspTNSigmaITS", "NSigmaITS(#bar{t}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaITS", HistType::kTH2F, {{ptAxis}, {sigmaITSAxis}}); + + histos.add("tracks/triton/h2TritonVspTNSigmaTPC", "NSigmaTPC(t) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + histos.add("tracks/triton/h2antiTritonVspTNSigmaTPC", "NSigmaTPC(#bar{t}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); } if (enableHe) { - histos.add("tracks/helium/h2HeliumVspTNSigmaTPC", "NSigmaTPC(He) vs pT/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptZHeAxis}, {SigmaTPCAxis}}); - histos.add("tracks/helium/h2antiHeliumVspTNSigmaTPC", "NSigmaTPC(#bar{He}) vs pT/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptZHeAxis}, {SigmaTPCAxis}}); + histos.add("tracks/helium/h2HeliumVspTNSigmaITS", "NSigmaITS(He) vs pT/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaITS", HistType::kTH2F, {{ptZHeAxis}, {sigmaITSAxis}}); + histos.add("tracks/helium/h2antiHeliumVspTNSigmaITS", "NSigmaITS(#bar{He}) vs pT/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaITS", HistType::kTH2F, {{ptZHeAxis}, {sigmaITSAxis}}); + + histos.add("tracks/helium/h2HeliumVspTNSigmaTPC", "NSigmaTPC(He) vs pT/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptZHeAxis}, {sigmaTPCAxis}}); + histos.add("tracks/helium/h2antiHeliumVspTNSigmaTPC", "NSigmaTPC(#bar{He}) vs pT/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptZHeAxis}, {sigmaTPCAxis}}); } if (enableAl) { - histos.add("tracks/alpha/h2AlphaVspTNSigmaTPC", "NSigmaTPC(#alpha) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - histos.add("tracks/alpha/h2antiAlphaVspTNSigmaTPC", "NSigmaTPC(#bar{#alpha}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); + histos.add("tracks/alpha/h2AlphaVspTNSigmaTPC", "NSigmaTPC(#alpha) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + histos.add("tracks/alpha/h2antiAlphaVspTNSigmaTPC", "NSigmaTPC(#bar{#alpha}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); } // TOF plots @@ -1541,20 +1555,20 @@ struct LFNucleiBATask { // NSigmaTOF histograms if (enableDebug) { - histos.add("tracks/pion/h2PionVspTNSigmaTOF", "NSigmaTOF(pi) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - histos.add("tracks/kaon/h2KaonVspTNSigmaTOF", "NSigmaTOF(Ka) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); + histos.add("tracks/pion/h2PionVspTNSigmaTOF", "NSigmaTOF(pi) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + histos.add("tracks/kaon/h2KaonVspTNSigmaTOF", "NSigmaTOF(Ka) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); } if (enablePr) { - histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - histos.add("tracks/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + histos.add("tracks/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); } if (enableDe) { - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); } if (enableHe) { - histos.add("tracks/helium/h2HeliumVspTNSigmaTOF", "NSigmaTOF(He) vs #it{p}_{T}/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptZHeAxis}, {SigmaTOFAxis}}); - histos.add("tracks/helium/h2antiHeliumVspTNSigmaTOF", "NSigmaTOF(#bar{He}) vs #it{p}_{T}/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptZHeAxis}, {SigmaTOFAxis}}); + histos.add("tracks/helium/h2HeliumVspTNSigmaTOF", "NSigmaTOF(He) vs #it{p}_{T}/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptZHeAxis}, {sigmaTOFAxis}}); + histos.add("tracks/helium/h2antiHeliumVspTNSigmaTOF", "NSigmaTOF(#bar{He}) vs #it{p}_{T}/z; #it{p}_{T}/z (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptZHeAxis}, {sigmaTOFAxis}}); } // TOF mass histograms histos.add("tracks/h2TOFmassVsPt", "h2TOFmassVsPt; TOFmass; #it{p}_{T} (GeV)", HistType::kTH2F, {{180, 0.4, 4.}, {250, 0., 5.}}); @@ -1674,24 +1688,24 @@ struct LFNucleiBATask { // NSigmaTOF histograms - TOF EvTime Splitted if (enablePr) { - evtimeHistos.add("tracks/evtime/fill/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/fill/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/tof/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/tof/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/ft0/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/ft0/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/ft0tof/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/ft0tof/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/fill/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/fill/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/tof/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/tof/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/ft0/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/ft0/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/ft0tof/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/ft0tof/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); } if (enableDe) { - evtimeHistos.add("tracks/evtime/fill/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/fill/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/tof/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/tof/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/ft0/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/ft0/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/ft0tof/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - evtimeHistos.add("tracks/evtime/ft0tof/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/fill/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/fill/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/tof/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/tof/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/ft0/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/ft0/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/ft0tof/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + evtimeHistos.add("tracks/evtime/ft0tof/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); } // NSigmaTPC vs NSigmaTOF histograms - TOF EvTime Splitted @@ -1761,46 +1775,46 @@ struct LFNucleiBATask { // Beta < 0.5 // NSigmasTPC histograms if (enablePr) { - debugHistos.add("debug/evtime/fill/proton/h2ProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/fill/proton/h2antiProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/tof/proton/h2ProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/tof/proton/h2antiProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/ft0/proton/h2ProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/ft0/proton/h2antiProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/ft0tof/proton/h2ProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/ft0tof/proton/h2antiProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); + debugHistos.add("debug/evtime/fill/proton/h2ProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/fill/proton/h2antiProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/tof/proton/h2ProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/tof/proton/h2antiProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/ft0/proton/h2ProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/ft0/proton/h2antiProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/ft0tof/proton/h2ProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/ft0tof/proton/h2antiProtonVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); } if (enableDe) { - debugHistos.add("debug/evtime/fill/deuteron/h2DeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/fill/deuteron/h2antiDeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/tof/deuteron/h2DeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/tof/deuteron/h2antiDeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/ft0/deuteron/h2DeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/ft0/deuteron/h2antiDeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/ft0tof/deuteron/h2DeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); - debugHistos.add("debug/evtime/ft0tof/deuteron/h2antiDeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {SigmaTPCAxis}}); + debugHistos.add("debug/evtime/fill/deuteron/h2DeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/fill/deuteron/h2antiDeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/tof/deuteron/h2DeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/tof/deuteron/h2antiDeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/ft0/deuteron/h2DeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/ft0/deuteron/h2antiDeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/ft0tof/deuteron/h2DeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); + debugHistos.add("debug/evtime/ft0tof/deuteron/h2antiDeuteronVspTNSigmaTPC_BetaCut", "NSigmaTPC(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}}); } // NSigmaTOF histograms - TOF EvTime Splitted if (enablePr) { - debugHistos.add("debug/evtime/fill/proton/h2ProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/fill/proton/h2antiProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/tof/proton/h2ProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/tof/proton/h2antiProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/ft0/proton/h2ProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/ft0/proton/h2antiProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/ft0tof/proton/h2ProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/ft0tof/proton/h2antiProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); + debugHistos.add("debug/evtime/fill/proton/h2ProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/fill/proton/h2antiProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/tof/proton/h2ProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/tof/proton/h2antiProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/ft0/proton/h2ProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/ft0/proton/h2antiProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/ft0tof/proton/h2ProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(p) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/ft0tof/proton/h2antiProtonVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{p}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); } if (enableDe) { - debugHistos.add("debug/evtime/fill/deuteron/h2DeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/fill/deuteron/h2antiDeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/tof/deuteron/h2DeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/tof/deuteron/h2antiDeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/ft0/deuteron/h2DeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/ft0/deuteron/h2antiDeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/ft0tof/deuteron/h2DeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); - debugHistos.add("debug/evtime/ft0tof/deuteron/h2antiDeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {SigmaTOFAxis}}); + debugHistos.add("debug/evtime/fill/deuteron/h2DeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/fill/deuteron/h2antiDeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/tof/deuteron/h2DeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/tof/deuteron/h2antiDeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/ft0/deuteron/h2DeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/ft0/deuteron/h2antiDeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/ft0tof/deuteron/h2DeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(d) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); + debugHistos.add("debug/evtime/ft0tof/deuteron/h2antiDeuteronVspTNSigmaTOF_BetaCut", "NSigmaTOF(#bar{d}) vs pT (#beta < 0.5); #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {sigmaTOFAxis}}); } if (outFlagOptions.enableExpSignalTOF) { @@ -2020,12 +2034,12 @@ struct LFNucleiBATask { } float gamma = 0., massTOF = 0., massTOFhe = 0., massTOFantihe = 0., heTPCmomentum = 0.f, antiheTPCmomentum = 0.f, heP = 0.f, antiheP = 0.f, hePt = 0.f, antihePt = 0.f, antiDPt = 0.f, DPt = 0.f; - bool isTritonTPCpid = kFALSE; - bool prRapCut = kFALSE; - bool deRapCut = kFALSE; - bool trRapCut = kFALSE; - bool heRapCut = kFALSE; - bool alRapCut = kFALSE; + bool isTritonTPCpid = false; + bool prRapCut = false; + bool deRapCut = false; + bool trRapCut = false; + bool heRapCut = false; + bool alRapCut = false; // Event histos fill histos.fill(HIST("event/h1VtxZ"), event.posZ()); @@ -2037,7 +2051,10 @@ struct LFNucleiBATask { debugHistos.fill(HIST("event/hFV0M"), event.centFV0M()); } - for (auto& track : tracks) { + auto tracksWithITS = soa::Attach(tracks); + + for (auto& track : tracksWithITS) { histos.fill(HIST("tracks/h1pT"), track.pt()); histos.fill(HIST("tracks/h1p"), track.p()); @@ -2126,6 +2143,9 @@ struct LFNucleiBATask { break; } + // float nITSTr; + float nITSHe; + heP = track.p(); antiheP = track.p(); heTPCmomentum = track.tpcInnerParam(); @@ -2134,55 +2154,55 @@ struct LFNucleiBATask { auto parDCAxy = (std::vector)parDCAxycuts; auto parDCAz = (std::vector)parDCAzcuts; - bool passDCAxyCut = kFALSE; - bool passDCAzCut = kFALSE; - bool passDCAxyCutDe = kFALSE; - bool passDCAzCutDe = kFALSE; - bool passDCAxyCutAntiDe = kFALSE; - bool passDCAzCutAntiDe = kFALSE; - bool passDCAxyCutHe = kFALSE; - bool passDCAzCutHe = kFALSE; - bool passDCAxyCutAntiHe = kFALSE; - bool passDCAzCutAntiHe = kFALSE; - - bool isDeuteron = kFALSE; - bool isHelium = kFALSE; - bool isDe = kFALSE; - bool isAntiDe = kFALSE; - bool isHe = kFALSE; - bool isAntiHe = kFALSE; - - bool isDeWoDCAxy = kFALSE; - bool isAntiDeWoDCAxy = kFALSE; - bool isHeWoDCAxy = kFALSE; - bool isAntiHeWoDCAxy = kFALSE; - - bool isDeWoDCAz = kFALSE; - bool isAntiDeWoDCAz = kFALSE; - bool isHeWoDCAz = kFALSE; - bool isAntiHeWoDCAz = kFALSE; - - bool isDeWoDCAxyWTPCpid = kFALSE; - bool isAntiDeWoDCAxyWTPCpid = kFALSE; - bool isHeWoDCAxyWTPCpid = kFALSE; - bool isAntiHeWoDCAxyWTPCpid = kFALSE; - - bool isDeWoDCAzWTPCpid = kFALSE; - bool isAntiDeWoDCAzWTPCpid = kFALSE; - bool isHeWoDCAzWTPCpid = kFALSE; - bool isAntiHeWoDCAzWTPCpid = kFALSE; - - bool isDeWoTPCpid = kFALSE; - bool isAntiDeWoTPCpid = kFALSE; - bool isHeWoTPCpid = kFALSE; - bool isAntiHeWoTPCpid = kFALSE; - - bool isDeWTPCpid = kFALSE; - bool isAntiDeWTPCpid = kFALSE; - bool isHeWTPCpid = kFALSE; - bool isAntiHeWTPCpid = kFALSE; - - bool passDCAxyzCut = kFALSE; + bool passDCAxyCut = false; + bool passDCAzCut = false; + bool passDCAxyCutDe = false; + bool passDCAzCutDe = false; + bool passDCAxyCutAntiDe = false; + bool passDCAzCutAntiDe = false; + bool passDCAxyCutHe = false; + bool passDCAzCutHe = false; + bool passDCAxyCutAntiHe = false; + bool passDCAzCutAntiHe = false; + + bool isDeuteron = false; + bool isHelium = false; + bool isDe = false; + bool isAntiDe = false; + bool isHe = false; + bool isAntiHe = false; + + bool isDeWoDCAxy = false; + bool isAntiDeWoDCAxy = false; + bool isHeWoDCAxy = false; + bool isAntiHeWoDCAxy = false; + + bool isDeWoDCAz = false; + bool isAntiDeWoDCAz = false; + bool isHeWoDCAz = false; + bool isAntiHeWoDCAz = false; + + bool isDeWoDCAxyWTPCpid = false; + bool isAntiDeWoDCAxyWTPCpid = false; + bool isHeWoDCAxyWTPCpid = false; + bool isAntiHeWoDCAxyWTPCpid = false; + + bool isDeWoDCAzWTPCpid = false; + bool isAntiDeWoDCAzWTPCpid = false; + bool isHeWoDCAzWTPCpid = false; + bool isAntiHeWoDCAzWTPCpid = false; + + bool isDeWoTPCpid = false; + bool isAntiDeWoTPCpid = false; + bool isHeWoTPCpid = false; + bool isAntiHeWoTPCpid = false; + + bool isDeWTPCpid = false; + bool isAntiDeWTPCpid = false; + bool isHeWTPCpid = false; + bool isAntiHeWTPCpid = false; + + bool passDCAxyzCut = false; switch (dcaConfOptions.DCACustomConfig) { case 0: @@ -2200,79 +2220,79 @@ struct LFNucleiBATask { passDCAzCutAntiHe = (std::abs(track.dcaZ()) <= dcaConfOptions.DCAzCustomCut); break; case 1: - passDCAxyCut = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(track.pt(), parDCAxy[2]))); - passDCAzCut = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(track.pt(), parDCAz[2]))); - - passDCAxyCutDe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(DPt, parDCAxy[2]))); - passDCAzCutDe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(DPt, parDCAz[2]))); - passDCAxyCutAntiDe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(antiDPt, parDCAxy[2]))); - passDCAzCutAntiDe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(antiDPt, parDCAz[2]))); - - passDCAxyCutHe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(hePt, parDCAxy[2]))); - passDCAzCutHe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(hePt, parDCAz[2]))); - passDCAxyCutAntiHe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(antihePt, parDCAxy[2]))); - passDCAzCutAntiHe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(antihePt, parDCAz[2]))); + passDCAxyCut = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(track.pt(), parDCAxy[2]))); + passDCAzCut = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(track.pt(), parDCAz[2]))); + + passDCAxyCutDe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(DPt, parDCAxy[2]))); + passDCAzCutDe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(DPt, parDCAz[2]))); + passDCAxyCutAntiDe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(antiDPt, parDCAxy[2]))); + passDCAzCutAntiDe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(antiDPt, parDCAz[2]))); + + passDCAxyCutHe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(hePt, parDCAxy[2]))); + passDCAzCutHe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(hePt, parDCAz[2]))); + passDCAxyCutAntiHe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(antihePt, parDCAxy[2]))); + passDCAzCutAntiHe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(antihePt, parDCAz[2]))); break; case 2: - passDCAxyCut = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(track.pt(), parDCAxy[2]))); + passDCAxyCut = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(track.pt(), parDCAxy[2]))); passDCAzCut = (std::abs(track.dcaZ()) <= dcaConfOptions.DCAzCustomCut); - passDCAxyCutDe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(DPt, parDCAxy[2]))); + passDCAxyCutDe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(DPt, parDCAxy[2]))); passDCAzCutDe = (std::abs(track.dcaZ()) <= dcaConfOptions.DCAzCustomCut); - passDCAxyCutAntiDe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(antiDPt, parDCAxy[2]))); + passDCAxyCutAntiDe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(antiDPt, parDCAxy[2]))); passDCAzCutAntiDe = (std::abs(track.dcaZ()) <= dcaConfOptions.DCAzCustomCut); - passDCAxyCutHe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(hePt, parDCAxy[2]))); + passDCAxyCutHe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(hePt, parDCAxy[2]))); passDCAzCutHe = (std::abs(track.dcaZ()) <= dcaConfOptions.DCAzCustomCut); - passDCAxyCutAntiHe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(antihePt, parDCAxy[2]))); + passDCAxyCutAntiHe = (std::abs(track.dcaXY()) <= parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(antihePt, parDCAxy[2]))); passDCAzCutAntiHe = (std::abs(track.dcaZ()) <= dcaConfOptions.DCAzCustomCut); break; case 3: passDCAxyCut = (std::abs(track.dcaXY()) <= dcaConfOptions.DCAxyCustomCut); - passDCAzCut = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(track.pt(), parDCAz[2]))); + passDCAzCut = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(track.pt(), parDCAz[2]))); passDCAxyCutDe = (std::abs(track.dcaXY()) <= dcaConfOptions.DCAxyCustomCut); - passDCAzCutDe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(DPt, parDCAz[2]))); + passDCAzCutDe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(DPt, parDCAz[2]))); passDCAxyCutAntiDe = (std::abs(track.dcaXY()) <= dcaConfOptions.DCAxyCustomCut); - passDCAzCutAntiDe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(antiDPt, parDCAz[2]))); + passDCAzCutAntiDe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(antiDPt, parDCAz[2]))); passDCAxyCutHe = (std::abs(track.dcaXY()) <= dcaConfOptions.DCAxyCustomCut); - passDCAzCutHe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(hePt, parDCAz[2]))); + passDCAzCutHe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(hePt, parDCAz[2]))); passDCAxyCutAntiHe = (std::abs(track.dcaXY()) <= dcaConfOptions.DCAxyCustomCut); - passDCAzCutAntiHe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(antihePt, parDCAz[2]))); + passDCAzCutAntiHe = (std::abs(track.dcaZ()) <= parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(antihePt, parDCAz[2]))); break; case 4: - passDCAxyCut = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; - passDCAzCut = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; - - passDCAxyCutDe = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; - passDCAzCutDe = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; - passDCAxyCutAntiDe = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; - passDCAzCutAntiDe = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; - - passDCAxyCutHe = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; - passDCAzCutHe = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; - passDCAxyCutAntiHe = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; - passDCAzCutAntiHe = TMath::Power(track.dcaXY(), 2) / TMath::Power(dcaConfOptions.DCAxyCustomCut, 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(dcaConfOptions.DCAzCustomCut, 2) <= 1; + passDCAxyCut = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; + passDCAzCut = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; + + passDCAxyCutDe = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; + passDCAzCutDe = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; + passDCAxyCutAntiDe = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; + passDCAzCutAntiDe = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; + + passDCAxyCutHe = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; + passDCAzCutHe = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; + passDCAxyCutAntiHe = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; + passDCAzCutAntiHe = std::pow(track.dcaXY(), 2) / std::pow(dcaConfOptions.DCAxyCustomCut, 2) + std::pow(track.dcaZ(), 2) / std::pow(dcaConfOptions.DCAzCustomCut, 2) <= 1; break; case 5: - passDCAxyCut = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(track.pt(), parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(track.pt(), parDCAz[2])), 2) <= 1; - passDCAzCut = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(track.pt(), parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(track.pt(), parDCAz[2])), 2) <= 1; - - passDCAxyCutDe = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(DPt, parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(DPt, parDCAz[2])), 2) <= 1; - passDCAzCutDe = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(DPt, parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(DPt, parDCAz[2])), 2) <= 1; - passDCAxyCutAntiDe = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(antiDPt, parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(antiDPt, parDCAz[2])), 2) <= 1; - passDCAzCutAntiDe = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(antiDPt, parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(antiDPt, parDCAz[2])), 2) <= 1; - - passDCAxyCutHe = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(hePt, parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(hePt, parDCAz[2])), 2) <= 1; - passDCAzCutHe = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(hePt, parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(hePt, parDCAz[2])), 2) <= 1; - passDCAxyCutAntiHe = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(antihePt, parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(antihePt, parDCAz[2])), 2) <= 1; - passDCAzCutAntiHe = TMath::Power(track.dcaXY(), 2) / TMath::Power(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / TMath::Power(antihePt, parDCAxy[2])), 2) + TMath::Power(track.dcaZ(), 2) / TMath::Power(parDCAz[3] * (parDCAz[0] + parDCAz[1] / TMath::Power(antihePt, parDCAz[2])), 2) <= 1; + passDCAxyCut = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(track.pt(), parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(track.pt(), parDCAz[2])), 2) <= 1; + passDCAzCut = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(track.pt(), parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(track.pt(), parDCAz[2])), 2) <= 1; + + passDCAxyCutDe = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(DPt, parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(DPt, parDCAz[2])), 2) <= 1; + passDCAzCutDe = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(DPt, parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(DPt, parDCAz[2])), 2) <= 1; + passDCAxyCutAntiDe = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(antiDPt, parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(antiDPt, parDCAz[2])), 2) <= 1; + passDCAzCutAntiDe = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(antiDPt, parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(antiDPt, parDCAz[2])), 2) <= 1; + + passDCAxyCutHe = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(hePt, parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(hePt, parDCAz[2])), 2) <= 1; + passDCAzCutHe = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(hePt, parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(hePt, parDCAz[2])), 2) <= 1; + passDCAxyCutAntiHe = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(antihePt, parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(antihePt, parDCAz[2])), 2) <= 1; + passDCAzCutAntiHe = std::pow(track.dcaXY(), 2) / std::pow(parDCAxy[3] * (parDCAxy[0] + parDCAxy[1] / std::pow(antihePt, parDCAxy[2])), 2) + std::pow(track.dcaZ(), 2) / std::pow(parDCAz[3] * (parDCAz[0] + parDCAz[1] / std::pow(antihePt, parDCAz[2])), 2) <= 1; break; } // p cut - if (TMath::Abs(track.tpcInnerParam()) < kinemOptions.pCut) + if (std::abs(track.tpcInnerParam()) < kinemOptions.pCut) continue; // Rapidity cuts @@ -2901,7 +2921,7 @@ struct LFNucleiBATask { isProdByGen = track.producedByGenerator(); isWeakDecay = track.getProcess() == 4; pdgCode = track.pdgCode(); - genPt = TMath::Sqrt(TMath::Power(track.px(), 2) + TMath::Power(track.py(), 2)); + genPt = std::sqrt(std::pow(track.px(), 2) + std::pow(track.py(), 2)); } else { if (!track.has_mcParticle()) { @@ -3441,6 +3461,9 @@ struct LFNucleiBATask { continue; } + // nITSTr = o2::aod::ITSResponse.nSigmaITS(track); + nITSHe = track.itsNSigmaHe(); + if (outFlagOptions.makeDCAAfterCutPlots) { if (isHeWTPCpid) { @@ -4003,11 +4026,13 @@ struct LFNucleiBATask { if (isHeWoTPCpid) { if (outFlagOptions.enableExpSignalTPC) histos.fill(HIST("tracks/helium/h2HeliumTPCExpSignalDiffVsPt"), hePt, track.tpcExpSignalDiffHe()); + histos.fill(HIST("tracks/helium/h2HeliumVspTNSigmaITS"), hePt, nITSHe); histos.fill(HIST("tracks/helium/h2HeliumVspTNSigmaTPC"), hePt, track.tpcNSigmaHe()); } if (isAntiHeWoTPCpid) { if (outFlagOptions.enableExpSignalTPC) histos.fill(HIST("tracks/helium/h2antiHeliumTPCExpSignalDiffVsPt"), antihePt, track.tpcExpSignalDiffHe()); + histos.fill(HIST("tracks/helium/h2antiHeliumVspTNSigmaITS"), antihePt, nITSHe); histos.fill(HIST("tracks/helium/h2antiHeliumVspTNSigmaTPC"), antihePt, track.tpcNSigmaHe()); } @@ -4307,21 +4332,21 @@ struct LFNucleiBATask { } if ((track.beta() * track.beta()) < 1.) { - gamma = 1.f / TMath::Sqrt(1.f - (track.beta() * track.beta())); + gamma = 1.f / std::sqrt(1.f - (track.beta() * track.beta())); switch (massTOFConfig) { case 0: - massTOF = track.tpcInnerParam() * TMath::Sqrt(1.f / (track.beta() * track.beta()) - 1.f); - massTOFhe = heTPCmomentum * TMath::Sqrt(1.f / (track.beta() * track.beta()) - 1.f); - massTOFantihe = antiheTPCmomentum * TMath::Sqrt(1.f / (track.beta() * track.beta()) - 1.f); + massTOF = track.tpcInnerParam() * std::sqrt(1.f / (track.beta() * track.beta()) - 1.f); + massTOFhe = heTPCmomentum * std::sqrt(1.f / (track.beta() * track.beta()) - 1.f); + massTOFantihe = antiheTPCmomentum * std::sqrt(1.f / (track.beta() * track.beta()) - 1.f); break; case 1: - massTOF = track.tofExpMom() * TMath::Sqrt(1.f / (track.beta() * track.beta()) - 1.f); + massTOF = track.tofExpMom() * std::sqrt(1.f / (track.beta() * track.beta()) - 1.f); break; case 2: - massTOF = track.p() * TMath::Sqrt(1.f / (track.beta() * track.beta()) - 1.f); - massTOFhe = heP * TMath::Sqrt(1.f / (track.beta() * track.beta()) - 1.f); - massTOFantihe = antiheP * TMath::Sqrt(1.f / (track.beta() * track.beta()) - 1.f); + massTOF = track.p() * std::sqrt(1.f / (track.beta() * track.beta()) - 1.f); + massTOFhe = heP * std::sqrt(1.f / (track.beta() * track.beta()) - 1.f); + massTOFantihe = antiheP * std::sqrt(1.f / (track.beta() * track.beta()) - 1.f); break; } if (passDCAxyzCut) @@ -4354,22 +4379,22 @@ struct LFNucleiBATask { histos.fill(HIST("tracks/eff/proton/hPtPrTOFrebinned"), track.pt()); } histos.fill(HIST("tracks/proton/h2TOFmassProtonVsPt"), massTOF, track.pt()); - histos.fill(HIST("tracks/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + histos.fill(HIST("tracks/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); if (outFlagOptions.enableBetaCut && (track.beta() > betaCut)) { histos.fill(HIST("tracks/proton/h2TOFmassProtonVsPt_BetaCut"), massTOF, track.pt()); - histos.fill(HIST("tracks/proton/h2TOFmass2ProtonVsPt_BetaCut"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + histos.fill(HIST("tracks/proton/h2TOFmass2ProtonVsPt_BetaCut"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } if (outFlagOptions.enableExpSignalTOF) histos.fill(HIST("tracks/proton/h2ProtonTOFExpSignalDiffVsPtCut"), track.pt(), track.tofExpSignalDiffPr()); if (enableEvTimeSplitting) { if (track.isEvTimeTOF() && track.isEvTimeT0AC()) { - evtimeHistos.fill(HIST("tracks/evtime/ft0tof/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + evtimeHistos.fill(HIST("tracks/evtime/ft0tof/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } else if (track.isEvTimeT0AC()) { - evtimeHistos.fill(HIST("tracks/evtime/ft0/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + evtimeHistos.fill(HIST("tracks/evtime/ft0/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } else if (track.isEvTimeTOF()) { - evtimeHistos.fill(HIST("tracks/evtime/tof/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + evtimeHistos.fill(HIST("tracks/evtime/tof/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } else { - evtimeHistos.fill(HIST("tracks/evtime/fill/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + evtimeHistos.fill(HIST("tracks/evtime/fill/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } } } else { @@ -4378,22 +4403,22 @@ struct LFNucleiBATask { histos.fill(HIST("tracks/eff/proton/hPtantiPrTOFrebinned"), track.pt()); } histos.fill(HIST("tracks/proton/h2TOFmassantiProtonVsPt"), massTOF, track.pt()); - histos.fill(HIST("tracks/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + histos.fill(HIST("tracks/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); if (outFlagOptions.enableBetaCut && (track.beta() > betaCut)) { histos.fill(HIST("tracks/proton/h2TOFmassantiProtonVsPt_BetaCut"), massTOF, track.pt()); - histos.fill(HIST("tracks/proton/h2TOFmass2antiProtonVsPt_BetaCut"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + histos.fill(HIST("tracks/proton/h2TOFmass2antiProtonVsPt_BetaCut"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } if (outFlagOptions.enableExpSignalTOF) histos.fill(HIST("tracks/proton/h2antiProtonTOFExpSignalDiffVsPtCut"), track.pt(), track.tofExpSignalDiffPr()); if (enableEvTimeSplitting) { if (track.isEvTimeTOF() && track.isEvTimeT0AC()) { - evtimeHistos.fill(HIST("tracks/evtime/ft0tof/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + evtimeHistos.fill(HIST("tracks/evtime/ft0tof/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } else if (track.isEvTimeT0AC()) { - evtimeHistos.fill(HIST("tracks/evtime/ft0/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + evtimeHistos.fill(HIST("tracks/evtime/ft0/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } else if (track.isEvTimeTOF()) { - evtimeHistos.fill(HIST("tracks/evtime/tof/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + evtimeHistos.fill(HIST("tracks/evtime/tof/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } else { - evtimeHistos.fill(HIST("tracks/evtime/fill/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + evtimeHistos.fill(HIST("tracks/evtime/fill/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - MassProtonVal * MassProtonVal, track.pt()); } } } @@ -4406,19 +4431,19 @@ struct LFNucleiBATask { if (enablePtSpectra) histos.fill(HIST("tracks/eff/triton/hPtTrTOF"), track.pt()); histos.fill(HIST("tracks/triton/h2TOFmassTritonVsPt"), massTOF, track.pt()); - histos.fill(HIST("tracks/triton/h2TOFmass2TritonVsPt"), massTOF * massTOF - fMassTriton * fMassTriton, track.pt()); + histos.fill(HIST("tracks/triton/h2TOFmass2TritonVsPt"), massTOF * massTOF - MassTritonVal * MassTritonVal, track.pt()); if (outFlagOptions.enableBetaCut && (track.beta() > betaCut)) { histos.fill(HIST("tracks/triton/h2TOFmassTritonVsPt_BetaCut"), massTOF, track.pt()); - histos.fill(HIST("tracks/triton/h2TOFmass2TritonVsPt_BetaCut"), massTOF * massTOF - fMassTriton * fMassTriton, track.pt()); + histos.fill(HIST("tracks/triton/h2TOFmass2TritonVsPt_BetaCut"), massTOF * massTOF - MassTritonVal * MassTritonVal, track.pt()); } } else { if (enablePtSpectra) histos.fill(HIST("tracks/eff/triton/hPtantiTrTOF"), track.pt()); histos.fill(HIST("tracks/triton/h2TOFmassantiTritonVsPt"), massTOF, track.pt()); - histos.fill(HIST("tracks/triton/h2TOFmass2antiTritonVsPt"), massTOF * massTOF - fMassTriton * fMassTriton, track.pt()); + histos.fill(HIST("tracks/triton/h2TOFmass2antiTritonVsPt"), massTOF * massTOF - MassTritonVal * MassTritonVal, track.pt()); if (outFlagOptions.enableBetaCut && (track.beta() > betaCut)) { histos.fill(HIST("tracks/triton/h2TOFmassantiTritonVsPt_BetaCut"), massTOF, track.pt()); - histos.fill(HIST("tracks/triton/h2TOFmass2antiTritonVsPt_BetaCut"), massTOF * massTOF - fMassTriton * fMassTriton, track.pt()); + histos.fill(HIST("tracks/triton/h2TOFmass2antiTritonVsPt_BetaCut"), massTOF * massTOF - MassTritonVal * MassTritonVal, track.pt()); } } } @@ -4430,24 +4455,24 @@ struct LFNucleiBATask { histos.fill(HIST("tracks/eff/deuteron/hPtDeTOF"), DPt); histos.fill(HIST("tracks/deuteron/h2TOFmassDeuteronVsPt"), massTOF, DPt); if (enableCentrality) - histos.fill(HIST("tracks/deuteron/h3TOFmass2DeuteronVsPtVsMult"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, DPt, event.centFT0M()); + histos.fill(HIST("tracks/deuteron/h3TOFmass2DeuteronVsPtVsMult"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, DPt, event.centFT0M()); else - histos.fill(HIST("tracks/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, DPt); + histos.fill(HIST("tracks/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, DPt); if (outFlagOptions.enableBetaCut && (track.beta() > betaCut)) { histos.fill(HIST("tracks/deuteron/h2TOFmassDeuteronVsPt_BetaCut"), massTOF, DPt); - histos.fill(HIST("tracks/deuteron/h2TOFmass2DeuteronVsPt_BetaCut"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, DPt); + histos.fill(HIST("tracks/deuteron/h2TOFmass2DeuteronVsPt_BetaCut"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, DPt); } if (outFlagOptions.enableExpSignalTOF) histos.fill(HIST("tracks/deuteron/h2DeuteronTOFExpSignalDiffVsPtCut"), DPt, track.tofExpSignalDiffDe()); if (enableEvTimeSplitting) { if (track.isEvTimeTOF() && track.isEvTimeT0AC()) { - evtimeHistos.fill(HIST("tracks/evtime/ft0tof/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, DPt); + evtimeHistos.fill(HIST("tracks/evtime/ft0tof/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, DPt); } else if (track.isEvTimeT0AC()) { - evtimeHistos.fill(HIST("tracks/evtime/ft0/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, DPt); + evtimeHistos.fill(HIST("tracks/evtime/ft0/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, DPt); } else if (track.isEvTimeTOF()) { - evtimeHistos.fill(HIST("tracks/evtime/tof/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, DPt); + evtimeHistos.fill(HIST("tracks/evtime/tof/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, DPt); } else { - evtimeHistos.fill(HIST("tracks/evtime/fill/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, DPt); + evtimeHistos.fill(HIST("tracks/evtime/fill/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, DPt); } } } @@ -4456,24 +4481,24 @@ struct LFNucleiBATask { histos.fill(HIST("tracks/eff/deuteron/hPtantiDeTOF"), antiDPt); histos.fill(HIST("tracks/deuteron/h2TOFmassantiDeuteronVsPt"), massTOF, antiDPt); if (enableCentrality) - histos.fill(HIST("tracks/deuteron/h3TOFmass2antiDeuteronVsPtVsMult"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, antiDPt, event.centFT0M()); + histos.fill(HIST("tracks/deuteron/h3TOFmass2antiDeuteronVsPtVsMult"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, antiDPt, event.centFT0M()); else - histos.fill(HIST("tracks/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, antiDPt); + histos.fill(HIST("tracks/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, antiDPt); if (outFlagOptions.enableBetaCut && (track.beta() > betaCut)) { histos.fill(HIST("tracks/deuteron/h2TOFmassantiDeuteronVsPt_BetaCut"), massTOF, antiDPt); - histos.fill(HIST("tracks/deuteron/h2TOFmass2antiDeuteronVsPt_BetaCut"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, antiDPt); + histos.fill(HIST("tracks/deuteron/h2TOFmass2antiDeuteronVsPt_BetaCut"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, antiDPt); } if (outFlagOptions.enableExpSignalTOF) histos.fill(HIST("tracks/deuteron/h2antiDeuteronTOFExpSignalDiffVsPtCut"), antiDPt, track.tofExpSignalDiffDe()); if (enableEvTimeSplitting) { if (track.isEvTimeTOF() && track.isEvTimeT0AC()) { - evtimeHistos.fill(HIST("tracks/evtime/ft0tof/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, antiDPt); + evtimeHistos.fill(HIST("tracks/evtime/ft0tof/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, antiDPt); } else if (track.isEvTimeT0AC()) { - evtimeHistos.fill(HIST("tracks/evtime/ft0/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, antiDPt); + evtimeHistos.fill(HIST("tracks/evtime/ft0/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, antiDPt); } else if (track.isEvTimeTOF()) { - evtimeHistos.fill(HIST("tracks/evtime/tof/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, antiDPt); + evtimeHistos.fill(HIST("tracks/evtime/tof/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, antiDPt); } else { - evtimeHistos.fill(HIST("tracks/evtime/fill/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, antiDPt); + evtimeHistos.fill(HIST("tracks/evtime/fill/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - MassDeuteronVal * MassDeuteronVal, antiDPt); } } } @@ -4482,11 +4507,11 @@ struct LFNucleiBATask { if (enablePtSpectra) histos.fill(HIST("tracks/eff/helium/hPtHeTOF"), 2 * hePt); histos.fill(HIST("tracks/helium/h2TOFmassHeliumVsPt"), 2.f * massTOFhe, hePt); - histos.fill(HIST("tracks/helium/h2TOFmassDeltaHeliumVsPt"), 2.f * massTOFhe - fMassHelium, hePt); - histos.fill(HIST("tracks/helium/h2TOFmass2HeliumVsPt"), 2.f * massTOFhe * 2.f * massTOFhe - fMassHelium * fMassHelium, hePt); + histos.fill(HIST("tracks/helium/h2TOFmassDeltaHeliumVsPt"), 2.f * massTOFhe - MassHeliumVal, hePt); + histos.fill(HIST("tracks/helium/h2TOFmass2HeliumVsPt"), 2.f * massTOFhe * 2.f * massTOFhe - MassHeliumVal * MassHeliumVal, hePt); if (outFlagOptions.enableBetaCut && (track.beta() > betaCut)) { histos.fill(HIST("tracks/helium/h2TOFmassHeliumVsPt_BetaCut"), 2.f * massTOFhe, hePt); - histos.fill(HIST("tracks/helium/h2TOFmass2HeliumVsPt_BetaCut"), 2.f * massTOFhe * 2.f * massTOFhe - fMassHelium * fMassHelium, hePt); + histos.fill(HIST("tracks/helium/h2TOFmass2HeliumVsPt_BetaCut"), 2.f * massTOFhe * 2.f * massTOFhe - MassHeliumVal * MassHeliumVal, hePt); } if (outFlagOptions.enableExpSignalTOF) histos.fill(HIST("tracks/helium/h2HeliumTOFExpSignalDiffVsPtCut"), hePt, track.tofExpSignalDiffHe()); @@ -4495,11 +4520,11 @@ struct LFNucleiBATask { if (enablePtSpectra) histos.fill(HIST("tracks/eff/helium/hPtantiHeTOF"), 2 * antihePt); histos.fill(HIST("tracks/helium/h2TOFmassantiHeliumVsPt"), 2.f * massTOFantihe, antihePt); - histos.fill(HIST("tracks/helium/h2TOFmassDeltaantiHeliumVsPt"), 2.f * massTOFantihe - fMassHelium, antihePt); - histos.fill(HIST("tracks/helium/h2TOFmass2antiHeliumVsPt"), 2.f * massTOFantihe * 2.f * massTOFantihe - fMassHelium * fMassHelium, antihePt); + histos.fill(HIST("tracks/helium/h2TOFmassDeltaantiHeliumVsPt"), 2.f * massTOFantihe - MassHeliumVal, antihePt); + histos.fill(HIST("tracks/helium/h2TOFmass2antiHeliumVsPt"), 2.f * massTOFantihe * 2.f * massTOFantihe - MassHeliumVal * MassHeliumVal, antihePt); if (outFlagOptions.enableBetaCut && (track.beta() > betaCut)) { histos.fill(HIST("tracks/helium/h2TOFmassantiHeliumVsPt_BetaCut"), 2.f * massTOFantihe, antihePt); - histos.fill(HIST("tracks/helium/h2TOFmass2antiHeliumVsPt_BetaCut"), 2.f * massTOFantihe * 2.f * massTOFantihe - fMassHelium * fMassHelium, antihePt); + histos.fill(HIST("tracks/helium/h2TOFmass2antiHeliumVsPt_BetaCut"), 2.f * massTOFantihe * 2.f * massTOFantihe - MassHeliumVal * MassHeliumVal, antihePt); } if (outFlagOptions.enableExpSignalTOF) histos.fill(HIST("tracks/helium/h2antiHeliumTOFExpSignalDiffVsPtCut"), antihePt, track.tofExpSignalDiffHe()); diff --git a/PWGLF/Tasks/Nuspex/spectraTOF.cxx b/PWGLF/Tasks/Nuspex/spectraTOF.cxx index 5c766a92a6f..82aa3de2e14 100644 --- a/PWGLF/Tasks/Nuspex/spectraTOF.cxx +++ b/PWGLF/Tasks/Nuspex/spectraTOF.cxx @@ -340,7 +340,7 @@ struct tofSpectra { const AxisSpec phiAxis{200, 0, 7, "#it{#varphi} (rad)"}; const AxisSpec dcaZAxis{binsOptions.binsDca, "DCA_{z} (cm)"}; const AxisSpec lengthAxis{100, 0, 600, "Track length (cm)"}; - const AxisSpec decayLengthAxis{100, 0, 0.5, "Decay Length (cm)"}; + const AxisSpec decayLengthAxis{100, 0, 1.0, "Decay Length (cm)"}; if (enableTrackCutHistograms) { const AxisSpec chargeAxis{2, -2.f, 2.f, "Charge"}; @@ -1697,14 +1697,17 @@ struct tofSpectra { if (motherPdgCode == 421) { IsD0Mother = true; } - if (charmOrigin == RecoDecay::OriginType::NonPrompt && ((motherPdgCode) / 1000 == 5 || (motherPdgCode) / 100 == 5)) { + if (charmOrigin == RecoDecay::OriginType::NonPrompt) { IsBeautyMother = true; + std::cout << "Charm Origin for Beauty:" << charmOrigin << std::endl; } - if (charmOrigin == RecoDecay::OriginType::Prompt && ((motherPdgCode) / 1000 == 4 || (motherPdgCode) / 100 == 4)) { + if (charmOrigin == RecoDecay::OriginType::Prompt) { IsCharmMother = true; + std::cout << "Charm Origin for Charm:" << charmOrigin << std::endl; } - if (!(motherPdgCode / 1000 == 4 || motherPdgCode / 100 == 4) && !(motherPdgCode / 1000 == 5 || motherPdgCode / 100 == 5)) { + if (charmOrigin == RecoDecay::OriginType::None) { IsNotHFMother = true; + std::cout << "Charm Origin for NotHF:" << charmOrigin << std::endl; } } } diff --git a/PWGLF/Tasks/Resonances/CMakeLists.txt b/PWGLF/Tasks/Resonances/CMakeLists.txt index d49deced8f3..e7d08dc500c 100644 --- a/PWGLF/Tasks/Resonances/CMakeLists.txt +++ b/PWGLF/Tasks/Resonances/CMakeLists.txt @@ -100,7 +100,7 @@ o2physics_add_dpl_workflow(lambda1520-pbpb COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(kshortkshort - SOURCES KshortKshort.cxx + SOURCES higherMassResonances.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) @@ -168,3 +168,8 @@ o2physics_add_dpl_workflow(chk892flow SOURCES chk892flow.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(chk892pp + SOURCES chk892pp.cxx + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore + COMPONENT_NAME Analysis) diff --git a/PWGLF/Tasks/Resonances/chk892flow.cxx b/PWGLF/Tasks/Resonances/chk892flow.cxx index 7bc523eb9e0..06405f06d19 100644 --- a/PWGLF/Tasks/Resonances/chk892flow.cxx +++ b/PWGLF/Tasks/Resonances/chk892flow.cxx @@ -151,11 +151,6 @@ struct chk892flow { // Cuts from polarization analysis Configurable cfgQvecSel{"cfgQvecSel", true, "Reject events when no QVector"}; - Configurable cfgOccupancySel{"cfgOccupancySel", false, "Occupancy selection"}; - Configurable cfgMaxOccupancy{"cfgMaxOccupancy", 999999, "maximum occupancy of tracks in neighbouring collisions in a given time range"}; - Configurable cfgMinOccupancy{"cfgMinOccupancy", -100, "maximum occupancy of tracks in neighbouring collisions in a given time range"}; - Configurable cfgNCollinTR{"cfgNCollinTR", false, "Additional selection for the number of coll in time range"}; - Configurable cfgCentEst{"cfgCentEst", 1, "Centrality estimator, 1: FT0C, 2: FT0M"}; // DCAr to PV @@ -164,6 +159,7 @@ struct chk892flow { Configurable cMaxbDCAzToPVcut{"cMaxbDCAzToPVcut", 0.1, "Track DCAz cut to PV Maximum"}; /// PID Selections, pion + Configurable cTPConly{"cTPConly", false, "Use only TPC for PID"}; // bool Configurable cMaxTPCnSigmaPion{"cMaxTPCnSigmaPion", 3.0, "TPC nSigma cut for Pion"}; // TPC Configurable cMaxTOFnSigmaPion{"cMaxTOFnSigmaPion", 3.0, "TOF nSigma cut for Pion"}; // TOF Configurable nsigmaCutCombinedPion{"nsigmaCutCombinedPion", -999, "Combined nSigma cut for Pion"}; // Combined @@ -188,6 +184,7 @@ struct chk892flow { // Secondary Selection Configurable cfgReturnFlag{"boolReturnFlag", false, "Return Flag for debugging"}; + Configurable cSecondaryRequire{"bool", true, "Secondary cuts on/off"}; Configurable cSecondaryArmenterosCut{"boolArmenterosCut", true, "cut on Armenteros-Podolanski graph"}; Configurable cfgByPassDauPIDSelection{"cfgByPassDauPIDSelection", true, "Bypass Daughters PID selection"}; @@ -202,7 +199,7 @@ struct chk892flow { Configurable cSecondaryDCAtoPVMax{"cSecondaryDCAtoPVMax", 0.3, "Maximum DCA Secondary to PV"}; Configurable cSecondaryProperLifetimeMax{"cSecondaryProperLifetimeMax", 20, "Maximum Secondary Lifetime"}; Configurable cSecondaryparamArmenterosCut{"paramArmenterosCut", 0.2, "parameter for Armenteros Cut"}; - Configurable cSecondaryMassWindow{"cSecondaryMassWindow", 0.075, "Secondary inv mass selciton window"}; + Configurable cSecondaryMassWindow{"cSecondaryMassWindow", 0.03, "Secondary inv mass selciton window"}; // K* selection Configurable cKstarMaxRap{"cKstarMaxRap", 0.5, "Kstar maximum rapidity"}; @@ -278,10 +275,6 @@ struct chk892flow { histos.add("QA/before/hEvent", "Number of Events", HistType::kTH1F, {{1, 0.5, 1.5}}); // EventPlane - histos.add("QA/EP/EPhEPDet", "Event plane distribution of FT0C (Det = A)", {HistType::kTH2D, {centAxis, epAxis}}); - histos.add("QA/EP/EPhEPB", "Event plane distribution of TPCpos (B)", {HistType::kTH2D, {centAxis, epAxis}}); - histos.add("QA/EP/EPhEPC", "Event plane distribution of TPCneg (C)", {HistType::kTH2D, {centAxis, epAxis}}); - histos.add("QA/EP/hEPDet", "Event plane distribution of FT0C (Det = A)", {HistType::kTH2D, {centAxis, epAxis}}); histos.add("QA/EP/hEPB", "Event plane distribution of TPCpos (B)", {HistType::kTH2D, {centAxis, epAxis}}); histos.add("QA/EP/hEPC", "Event plane distribution of TPCneg (C)", {HistType::kTH2D, {centAxis, epAxis}}); @@ -540,24 +533,38 @@ struct chk892flow { bool selectionPIDPion(TrackType const& candidate) { bool tpcPIDPassed{false}, tofPIDPassed{false}; - if (std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion) { - tpcPIDPassed = true; - } else { - return false; - } - if (candidate.hasTOF()) { - if (std::abs(candidate.tofNSigmaPi()) < cMaxTOFnSigmaPion) { - tofPIDPassed = true; - } - if ((nsigmaCutCombinedPion > 0) && (candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi() + candidate.tofNSigmaPi() * candidate.tofNSigmaPi() < nsigmaCutCombinedPion * nsigmaCutCombinedPion)) { - tofPIDPassed = true; + + if (cTPConly) { + + if (std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion) { + tpcPIDPassed = true; + } else { + return false; } + tofPIDPassed = true; + } else { - if (!cTOFVeto) { + + if (std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion) { + tpcPIDPassed = true; + } else { return false; } - tofPIDPassed = true; + if (candidate.hasTOF()) { + if (std::abs(candidate.tofNSigmaPi()) < cMaxTOFnSigmaPion) { + tofPIDPassed = true; + } + if ((nsigmaCutCombinedPion > 0) && (candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi() + candidate.tofNSigmaPi() * candidate.tofNSigmaPi() < nsigmaCutCombinedPion * nsigmaCutCombinedPion)) { + tofPIDPassed = true; + } + } else { + if (!cTOFVeto) { + return false; + } + tofPIDPassed = true; + } } + if (tpcPIDPassed && tofPIDPassed) { return true; } @@ -581,112 +588,132 @@ struct chk892flow { if (cfgReturnFlag) { bool returnFlag = true; - histos.fill(HIST("QA/K0sCutCheck"), 0); - if (DauDCA > cSecondaryDauDCAMax) { - histos.fill(HIST("QA/K0sCutCheck"), 1); - returnFlag = false; - } - if (DauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { - histos.fill(HIST("QA/K0sCutCheck"), 2); - returnFlag = false; - } - if (DauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { - histos.fill(HIST("QA/K0sCutCheck"), 3); - returnFlag = false; - } - if (pT < cSecondaryPtMin) { - histos.fill(HIST("QA/K0sCutCheck"), 4); - returnFlag = false; - } - if (Rapidity > cSecondaryRapidityMax) { - histos.fill(HIST("QA/K0sCutCheck"), 5); - returnFlag = false; - } - if (Radius < cSecondaryRadiusMin) { - histos.fill(HIST("QA/K0sCutCheck"), 6); - returnFlag = false; - } - if (DCAtoPV > cSecondaryDCAtoPVMax) { - histos.fill(HIST("QA/K0sCutCheck"), 7); - returnFlag = false; - } - if (CPA < cSecondaryCosPAMin) { - histos.fill(HIST("QA/K0sCutCheck"), 8); - returnFlag = false; - } - if (PropTauK0s > cSecondaryProperLifetimeMax) { - histos.fill(HIST("QA/K0sCutCheck"), 9); - returnFlag = false; - } - if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { - histos.fill(HIST("QA/K0sCutCheck"), 10); - returnFlag = false; - } - if (candidate.qtarm() < cSecondaryparamArmenterosCut * TMath::Abs(candidate.alpha())) { - histos.fill(HIST("QA/K0sCutCheck"), 11); - returnFlag = false; + if (cSecondaryRequire) { + histos.fill(HIST("QA/K0sCutCheck"), 0); + if (DauDCA > cSecondaryDauDCAMax) { + histos.fill(HIST("QA/K0sCutCheck"), 1); + returnFlag = false; + } + if (DauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 2); + returnFlag = false; + } + if (DauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 3); + returnFlag = false; + } + if (pT < cSecondaryPtMin) { + histos.fill(HIST("QA/K0sCutCheck"), 4); + returnFlag = false; + } + if (Rapidity > cSecondaryRapidityMax) { + histos.fill(HIST("QA/K0sCutCheck"), 5); + returnFlag = false; + } + if (Radius < cSecondaryRadiusMin) { + histos.fill(HIST("QA/K0sCutCheck"), 6); + returnFlag = false; + } + if (DCAtoPV > cSecondaryDCAtoPVMax) { + histos.fill(HIST("QA/K0sCutCheck"), 7); + returnFlag = false; + } + if (CPA < cSecondaryCosPAMin) { + histos.fill(HIST("QA/K0sCutCheck"), 8); + returnFlag = false; + } + if (PropTauK0s > cSecondaryProperLifetimeMax) { + histos.fill(HIST("QA/K0sCutCheck"), 9); + returnFlag = false; + } + if (candidate.qtarm() < cSecondaryparamArmenterosCut * TMath::Abs(candidate.alpha())) { + histos.fill(HIST("QA/K0sCutCheck"), 11); + returnFlag = false; + } + if (std::fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + returnFlag = false; + } + + return returnFlag; + + } else { + if (std::fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + returnFlag = false; + } + + return returnFlag; } - return returnFlag; } else { - histos.fill(HIST("QA/K0sCutCheck"), 0); - if (DauDCA > cSecondaryDauDCAMax) { - histos.fill(HIST("QA/K0sCutCheck"), 1); - return false; - } - if (DauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { - histos.fill(HIST("QA/K0sCutCheck"), 2); - return false; - } - if (DauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { - histos.fill(HIST("QA/K0sCutCheck"), 3); - return false; - } - if (pT < cSecondaryPtMin) { - histos.fill(HIST("QA/K0sCutCheck"), 4); - return false; - } - if (Rapidity > cSecondaryRapidityMax) { - histos.fill(HIST("QA/K0sCutCheck"), 5); - return false; - } - if (Radius < cSecondaryRadiusMin) { - histos.fill(HIST("QA/K0sCutCheck"), 6); - return false; - } - if (DCAtoPV > cSecondaryDCAtoPVMax) { - histos.fill(HIST("QA/K0sCutCheck"), 7); - return false; - } - if (CPA < cSecondaryCosPAMin) { - histos.fill(HIST("QA/K0sCutCheck"), 8); - return false; - } - if (PropTauK0s > cSecondaryProperLifetimeMax) { - histos.fill(HIST("QA/K0sCutCheck"), 9); - return false; - } - if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { - histos.fill(HIST("QA/K0sCutCheck"), 10); - return false; - } - if (candidate.qtarm() < cSecondaryparamArmenterosCut * TMath::Abs(candidate.alpha())) { - histos.fill(HIST("QA/K0sCutCheck"), 11); - return false; + if (cSecondaryRequire) { + + histos.fill(HIST("QA/K0sCutCheck"), 0); + if (DauDCA > cSecondaryDauDCAMax) { + histos.fill(HIST("QA/K0sCutCheck"), 1); + return false; + } + if (DauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 2); + return false; + } + if (DauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 3); + return false; + } + if (pT < cSecondaryPtMin) { + histos.fill(HIST("QA/K0sCutCheck"), 4); + return false; + } + if (Rapidity > cSecondaryRapidityMax) { + histos.fill(HIST("QA/K0sCutCheck"), 5); + return false; + } + if (Radius < cSecondaryRadiusMin) { + histos.fill(HIST("QA/K0sCutCheck"), 6); + return false; + } + if (DCAtoPV > cSecondaryDCAtoPVMax) { + histos.fill(HIST("QA/K0sCutCheck"), 7); + return false; + } + if (CPA < cSecondaryCosPAMin) { + histos.fill(HIST("QA/K0sCutCheck"), 8); + return false; + } + if (PropTauK0s > cSecondaryProperLifetimeMax) { + histos.fill(HIST("QA/K0sCutCheck"), 9); + return false; + } + if (candidate.qtarm() < cSecondaryparamArmenterosCut * TMath::Abs(candidate.alpha())) { + histos.fill(HIST("QA/K0sCutCheck"), 11); + return false; + } + if (std::fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + return false; + } + return true; + + } else { + if (std::fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + return false; + } + return true; } - return true; } - } // selectionK0s double GetPhiInRange(double phi) { double result = phi; while (result < 0) { - result = result + 2. * TMath::Pi() / 2; + result = result + 2. * o2::constants::math::PI / 2; } - while (result > 2. * TMath::Pi() / 2) { - result = result - 2. * TMath::Pi() / 2; + while (result > 2. * o2::constants::math::PI / 2) { + result = result - 2. * o2::constants::math::PI / 2; } return result; } @@ -694,28 +721,28 @@ struct chk892flow { template bool isTrueKstar(const TrackTemplate& bTrack, const V0Template& K0scand) { - if (abs(bTrack.PDGCode()) != kPiPlus) // Are you pion? + if (std::abs(bTrack.PDGCode()) != kPiPlus) // Are you pion? return false; - if (abs(K0scand.PDGCode()) != kPDGK0s) // Are you K0s? + if (std::abs(K0scand.PDGCode()) != kPDGK0s) // Are you K0s? return false; auto motherbTrack = bTrack.template mothers_as(); auto motherkV0 = K0scand.template mothers_as(); // Check bTrack first - if (abs(motherbTrack.pdgCode()) != kKstarPlus) // Are you charged Kstar's daughter? + if (std::abs(motherbTrack.pdgCode()) != kKstarPlus) // Are you charged Kstar's daughter? return false; // Apply first since it's more restrictive - if (abs(motherkV0.pdgCode()) != 310) // Is it K0s? + if (std::abs(motherkV0.pdgCode()) != 310) // Is it K0s? return false; // Check if K0s's mother is K0 (311) auto motherK0 = motherkV0.template mothers_as(); - if (abs(motherK0.pdgCode()) != 311) + if (std::abs(motherK0.pdgCode()) != 311) return false; // Check if K0's mother is Kstar (323) auto motherKstar = motherK0.template mothers_as(); - if (abs(motherKstar.pdgCode()) != 323) + if (std::abs(motherKstar.pdgCode()) != 323) return false; // Check if bTrack and K0 have the same mother (global index) diff --git a/PWGLF/Tasks/Resonances/chk892flow_pp.cxx b/PWGLF/Tasks/Resonances/chk892flow_pp.cxx new file mode 100644 index 00000000000..2adc9170064 --- /dev/null +++ b/PWGLF/Tasks/Resonances/chk892flow_pp.cxx @@ -0,0 +1,931 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// \file chk892_pp.cxx +/// \brief Reconstruction of track-track decay resonance candidates +/// +/// +/// \author Su-Jeong Ji + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // FIXME +#include // FIXME + +#include +#include +#include +#include +#include +#include + +#include "TRandom3.h" +#include "TF1.h" +#include "TVector2.h" +#include "Math/Vector3D.h" +#include "Math/Vector4D.h" +#include "Math/GenVector/Boost.h" +#include + +#include "Framework/runDataProcessing.h" +#include "Framework/AnalysisTask.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/StepTHn.h" +#include "Framework/O2DatabasePDGPlugin.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/StaticFor.h" +#include "DCAFitter/DCAFitterN.h" + +#include "Common/DataModel/PIDResponse.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/Centrality.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "Common/DataModel/EventSelection.h" + +#include "Common/Core/trackUtilities.h" +#include "Common/Core/TrackSelection.h" +#include "Common/Core/RecoDecay.h" + +#include "CommonConstants/PhysicsConstants.h" + +#include "ReconstructionDataFormats/Track.h" + +#include "DataFormatsParameters/GRPObject.h" +#include "DataFormatsParameters/GRPMagField.h" + +#include "CCDB/CcdbApi.h" +#include "CCDB/BasicCCDBManager.h" + +#include "PWGLF/DataModel/LFStrangenessTables.h" +#include "PWGLF/Utils/collisionCuts.h" + +using namespace o2; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; +using namespace o2::constants::physics; + +struct chk892_pp { + enum binType : unsigned int { + kKstarP = 0, + kKstarN, + kKstarP_Mix, + kKstarN_Mix, + kKstarP_GenINEL10, + kKstarN_GenINEL10, + kKstarP_GenINELgt10, + kKstarN_GenINELgt10, + kKstarP_GenTrig10, + kKstarN_GenTrig10, + kKstarP_GenEvtSel, + kKstarN_GenEvtSel, + kKstarP_Rec, + kKstarN_Rec, + kTYEnd + }; + + SliceCache cache; + Preslice perCollision = aod::track::collisionId; + + using EventCandidates = soa::Join; + // using EventCandidates = soa::Join; + using TrackCandidates = soa::Join; + using V0Candidates = aod::V0Datas; + + using MCEventCandidates = soa::Join; + using MCTrackCandidates = soa::Join; + using MCV0Candidates = soa::Join; + + HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; + + Service ccdb; + Service pdg; + o2::ccdb::CcdbApi ccdbApi; + + Configurable cfgURL{"cfgURL", "http://alice-ccdb.cern.ch", "Address of the CCDB to browse"}; + Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "Latest acceptable timestamp of creation for the object"}; + + // Configurables + ConfigurableAxis cfgBinsPt{"cfgBinsPt", {VARIABLE_WIDTH, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 6.9, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 9.9, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9, 12.0, 12.1, 12.2, 12.3, 12.4, 12.5, 12.6, 12.7, 12.8, 12.9, 13.0, 13.1, 13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 13.8, 13.9, 14.0, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 14.9, 15.0}, "Binning of the pT axis"}; + ConfigurableAxis cfgBinsPtQA{"cfgBinsPtQA", {VARIABLE_WIDTH, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.0, 6.2, 6.4, 6.6, 6.8, 7.0, 7.2, 7.4, 7.6, 7.8, 8.0, 8.2, 8.4, 8.6, 8.8, 9.0, 9.2, 9.4, 9.6, 9.8, 10.0}, "Binning of the pT axis"}; + ConfigurableAxis cfgBinsCent{"cfgBinsCent", {VARIABLE_WIDTH, 0.0, 1.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}, "Binning of the centrality axis"}; + ConfigurableAxis cfgBinsVtxZ{"cfgBinsVtxZ", {VARIABLE_WIDTH, -10.0, -9.0, -8.0, -7.0, -6.0, -5.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}, "Binning of the z-vertex axis"}; + Configurable cNbinsDiv{"cNbinsDiv", 1, "Integer to divide the number of bins"}; + + /// Event cuts + o2::analysis::CollisonCuts colCuts; + Configurable ConfEvtZvtx{"ConfEvtZvtx", 10.f, "Evt sel: Max. z-Vertex (cm)"}; + Configurable ConfEvtOccupancyInTimeRangeMax{"ConfEvtOccupancyInTimeRangeMax", -1, "Evt sel: maximum track occupancy"}; + Configurable ConfEvtOccupancyInTimeRangeMin{"ConfEvtOccupancyInTimeRangeMin", -1, "Evt sel: minimum track occupancy"}; + Configurable ConfEvtTriggerCheck{"ConfEvtTriggerCheck", false, "Evt sel: check for trigger"}; + Configurable ConfEvtTriggerSel{"ConfEvtTriggerSel", 8, "Evt sel: trigger"}; + Configurable ConfEvtOfflineCheck{"ConfEvtOfflineCheck", true, "Evt sel: check for offline selection"}; + Configurable ConfEvtTriggerTVXSel{"ConfEvtTriggerTVXSel", false, "Evt sel: triggerTVX selection (MB)"}; + Configurable ConfEvtTFBorderCut{"ConfEvtTFBorderCut", false, "Evt sel: apply TF border cut"}; + Configurable ConfEvtUseITSTPCvertex{"ConfEvtUseITSTPCvertex", false, "Evt sel: use at lease on ITS-TPC track for vertexing"}; + Configurable ConfEvtZvertexTimedifference{"ConfEvtZvertexTimedifference", true, "Evt sel: apply Z-vertex time difference"}; + Configurable ConfEvtPileupRejection{"ConfEvtPileupRejection", true, "Evt sel: apply pileup rejection"}; + Configurable ConfEvtNoITSROBorderCut{"ConfEvtNoITSROBorderCut", false, "Evt sel: apply NoITSRO border cut"}; + Configurable ConfincludeCentralityMC{"ConfincludeCentralityMC", false, "Include centrality in MC"}; + Configurable ConfEvtCollInTimeRangeStandard{"ConfEvtCollInTimeRangeStandard", true, "Evt sel: apply NoCollInTimeRangeStandard"}; + + /// Track selections + Configurable cMinPtcut{"cMinPtcut", 0.15, "Track minium pt cut"}; + Configurable cMaxEtacut{"cMaxEtacut", 0.8, "Track maximum eta cut"}; + + /* + // Cuts from polarization analysis + Configurable cfgOccupancySel{"cfgOccupancySel", false, "Occupancy selection"}; + Configurable cfgMaxOccupancy{"cfgMaxOccupancy", 999999, "maximum occupancy of tracks in neighbouring collisions in a given time range"}; + Configurable cfgMinOccupancy{"cfgMinOccupancy", -100, "maximum occupancy of tracks in neighbouring collisions in a given time range"}; + Configurable cfgNCollinTR{"cfgNCollinTR", false, "Additional selection for the number of coll in time range"}; +*/ + Configurable cfgCentEst{"cfgCentEst", 1, "Centrality estimator, 1: FT0C, 2: FT0M"}; + + // DCAr to PV + Configurable cMaxbDCArToPVcut{"cMaxbDCArToPVcut", 0.1, "Track DCAr cut to PV Maximum"}; + // DCAz to PV + Configurable cMaxbDCAzToPVcut{"cMaxbDCAzToPVcut", 0.1, "Track DCAz cut to PV Maximum"}; + + /// PID Selections, pion + Configurable cTPConly{"cTPConly", true, "Use only TPC for PID"}; // bool + Configurable cMaxTPCnSigmaPion{"cMaxTPCnSigmaPion", 3.0, "TPC nSigma cut for Pion"}; // TPC + Configurable cMaxTOFnSigmaPion{"cMaxTOFnSigmaPion", 3.0, "TOF nSigma cut for Pion"}; // TOF + Configurable nsigmaCutCombinedPion{"nsigmaCutCombinedPion", -999, "Combined nSigma cut for Pion"}; // Combined + Configurable cTOFVeto{"cTOFVeto", true, "TOF Veto, if false, TOF is nessessary for PID selection"}; // TOF Veto + + // Track selections + Configurable cfgPrimaryTrack{"cfgPrimaryTrack", true, "Primary track selection"}; // kGoldenChi2 | kDCAxy | kDCAz + Configurable cfgGlobalWoDCATrack{"cfgGlobalWoDCATrack", true, "Global track selection without DCA"}; // kQualityTracks (kTrackType | kTPCNCls | kTPCCrossedRows | kTPCCrossedRowsOverNCls | kTPCChi2NDF | kTPCRefit | kITSNCls | kITSChi2NDF | kITSRefit | kITSHits) | kInAcceptanceTracks (kPtRange | kEtaRange) + Configurable cfgGlobalTrack{"cfgGlobalTrack", false, "Global track selection"}; // kGoldenChi2 | kDCAxy | kDCAz + Configurable cfgPVContributor{"cfgPVContributor", false, "PV contributor track selection"}; // PV Contriuibutor + + Configurable cfgITScluster{"cfgITScluster", 0, "Number of ITS cluster"}; + Configurable cfgTPCcluster{"cfgTPCcluster", 0, "Number of TPC cluster"}; + Configurable cfgRatioTPCRowsOverFindableCls{"cfgRatioTPCRowsOverFindableCls", 0.0f, "TPC Crossed Rows to Findable Clusters"}; + Configurable cfgITSChi2NCl{"cfgITSChi2NCl", 999.0, "ITS Chi2/NCl"}; + Configurable cfgTPCChi2NCl{"cfgTPCChi2NCl", 999.0, "TPC Chi2/NCl"}; + Configurable cfgUseTPCRefit{"cfgUseTPCRefit", false, "Require TPC Refit"}; + Configurable cfgUseITSRefit{"cfgUseITSRefit", false, "Require ITS Refit"}; + Configurable cfgHasITS{"cfgHasITS", false, "Require ITS"}; + Configurable cfgHasTPC{"cfgHasTPC", false, "Require TPC"}; + Configurable cfgHasTOF{"cfgHasTOF", false, "Require TOF"}; + + // Secondary Selection + Configurable cfgReturnFlag{"boolReturnFlag", false, "Return Flag for debugging"}; + Configurable cSecondaryRequire{"bool", true, "Secondary cuts on/off"}; + Configurable cSecondaryArmenterosCut{"boolArmenterosCut", true, "cut on Armenteros-Podolanski graph"}; + + Configurable cfgByPassDauPIDSelection{"cfgByPassDauPIDSelection", true, "Bypass Daughters PID selection"}; + Configurable cSecondaryDauDCAMax{"cSecondaryDauDCAMax", 1., "Maximum DCA Secondary daughters to PV"}; + Configurable cSecondaryDauPosDCAtoPVMin{"cSecondaryDauPosDCAtoPVMin", 0.0, "Minimum DCA Secondary positive daughters to PV"}; + Configurable cSecondaryDauNegDCAtoPVMin{"cSecondaryDauNegDCAtoPVMin", 0.0, "Minimum DCA Secondary negative daughters to PV"}; + + Configurable cSecondaryPtMin{"cSecondaryPtMin", 0.f, "Minimum transverse momentum of Secondary"}; + Configurable cSecondaryRapidityMax{"cSecondaryRapidityMax", 0.5, "Maximum rapidity of Secondary"}; + Configurable cSecondaryRadiusMin{"cSecondaryRadiusMin", 1.2, "Minimum transverse radius of Secondary"}; + Configurable cSecondaryCosPAMin{"cSecondaryCosPAMin", 0.995, "Mininum cosine pointing angle of Secondary"}; + Configurable cSecondaryDCAtoPVMax{"cSecondaryDCAtoPVMax", 0.3, "Maximum DCA Secondary to PV"}; + Configurable cSecondaryProperLifetimeMax{"cSecondaryProperLifetimeMax", 20, "Maximum Secondary Lifetime"}; + Configurable cSecondaryparamArmenterosCut{"paramArmenterosCut", 0.2, "parameter for Armenteros Cut"}; + Configurable cSecondaryMassWindow{"cSecondaryMassWindow", 0.075, "Secondary inv mass selciton window"}; + + // K* selection + Configurable cKstarMaxRap{"cKstarMaxRap", 0.5, "Kstar maximum rapidity"}; + Configurable cKstarMinRap{"cKstarMinRap", -0.5, "Kstar minimum rapidity"}; + + float centrality; + + // PDG code + int kPDGK0s = 310; + int kPDGK0 = 311; + int kKstarPlus = 323; + int kPiPlus = 211; + + void init(o2::framework::InitContext&) + { + centrality = -999; + + colCuts.setCuts(ConfEvtZvtx, ConfEvtTriggerCheck, ConfEvtTriggerSel, ConfEvtOfflineCheck, /*checkRun3*/ true, /*triggerTVXsel*/ false, ConfEvtOccupancyInTimeRangeMax, ConfEvtOccupancyInTimeRangeMin); + colCuts.init(&histos); + colCuts.setTriggerTVX(ConfEvtTriggerTVXSel); + colCuts.setApplyTFBorderCut(ConfEvtTFBorderCut); + colCuts.setApplyITSTPCvertex(ConfEvtUseITSTPCvertex); + colCuts.setApplyZvertexTimedifference(ConfEvtZvertexTimedifference); + colCuts.setApplyPileupRejection(ConfEvtPileupRejection); + colCuts.setApplyNoITSROBorderCut(ConfEvtNoITSROBorderCut); + colCuts.setApplyCollInTimeRangeStandard(ConfEvtCollInTimeRangeStandard); + + AxisSpec centAxis = {cfgBinsCent, "T0M (%)"}; + AxisSpec vtxzAxis = {cfgBinsVtxZ, "Z Vertex (cm)"}; + AxisSpec epAxis = {100, -1.0 * constants::math::PI, constants::math::PI}; + AxisSpec epresAxis = {100, -1.02, 1.02}; + AxisSpec ptAxis = {cfgBinsPt, "#it{p}_{T} (GeV/#it{c})"}; + AxisSpec ptAxisQA = {cfgBinsPtQA, "#it{p}_{T} (GeV/#it{c})"}; + AxisSpec radiusAxis = {50, 0, 5, "Radius (cm)"}; + AxisSpec cpaAxis = {50, 0.95, 1.0, "CPA"}; + AxisSpec tauAxis = {250, 0, 25, "Lifetime (cm)"}; + AxisSpec dcaAxis = {200, 0, 2, "DCA (cm)"}; + AxisSpec dcaxyAxis = {200, 0, 2, "DCA_{#it{xy}} (cm)"}; + AxisSpec dcazAxis = {200, 0, 2, "DCA_{#it{z}} (cm)"}; + AxisSpec yAxis = {100, -1, 1, "Rapidity"}; + AxisSpec invMassAxisK0s = {400 / cNbinsDiv, 0.3, 0.7, "Invariant Mass (GeV/#it{c}^2)"}; // K0s ~497.611 + AxisSpec invMassAxisReso = {900 / cNbinsDiv, 0.5f, 1.4f, "Invariant Mass (GeV/#it{c}^2)"}; // chK(892) ~892 + AxisSpec invMassAxisScan = {150, 0, 1.5, "Invariant Mass (GeV/#it{c}^2)"}; // For selection + AxisSpec pidQAAxis = {130, -6.5, 6.5}; + AxisSpec dataTypeAxis = {9, 0, 9, "Histogram types"}; + AxisSpec mcTypeAxis = {4, 0, 4, "Histogram types"}; + + // THnSparse + AxisSpec axisType = {binType::kTYEnd, 0, binType::kTYEnd, "Type of bin with charge and mix"}; + AxisSpec mcLabelAxis = {5, -0.5, 4.5, "MC Label"}; + + histos.add("QA/K0sCutCheck", "Check K0s cut", HistType::kTH1D, {AxisSpec{12, -0.5, 11.5, "Check"}}); + + histos.add("QA/before/CentDist", "Centrality distribution", {HistType::kTH1D, {centAxis}}); + histos.add("QA/before/VtxZ", "Centrality distribution", {HistType::kTH1D, {vtxzAxis}}); + histos.add("QA/before/hEvent", "Number of Events", HistType::kTH1F, {{1, 0.5, 1.5}}); + + // Bachelor pion + histos.add("QA/before/trkbpionDCAxy", "DCAxy distribution of bachelor pion candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/before/trkbpionDCAz", "DCAz distribution of bachelor pion candidates", HistType::kTH1D, {dcazAxis}); + histos.add("QA/before/trkbpionpT", "pT distribution of bachelor pion candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/before/trkbpionTPCPID", "TPC PID of bachelor pion candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trkbpionTOFPID", "TOF PID of bachelor pion candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trkbpionTPCTOFPID", "TPC-TOF PID map of bachelor pion candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + + histos.add("QA/after/trkbpionDCAxy", "DCAxy distribution of bachelor pion candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/after/trkbpionDCAz", "DCAz distribution of bachelor pion candidates", HistType::kTH1D, {dcazAxis}); + histos.add("QA/after/trkbpionpT", "pT distribution of bachelor pion candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/after/trkbpionTPCPID", "TPC PID of bachelor pion candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trkbpionTOFPID", "TOF PID of bachelor pion candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trkbpionTPCTOFPID", "TPC-TOF PID map of bachelor pion candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + + // Secondary pion 1 + histos.add("QA/before/trkppionTPCPID", "TPC PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trkppionTOFPID", "TOF PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trkppionTPCTOFPID", "TPC-TOF PID map of secondary pion 1 (positive) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QA/before/trkppionpT", "pT distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/before/trkppionDCAxy", "DCAxy distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/before/trkppionDCAz", "DCAz distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcazAxis}); + + histos.add("QA/after/trkppionTPCPID", "TPC PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trkppionTOFPID", "TOF PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trkppionTPCTOFPID", "TPC-TOF PID map of secondary pion 1 (positive) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QA/after/trkppionpT", "pT distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/after/trkppionDCAxy", "DCAxy distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/after/trkppionDCAz", "DCAz distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcazAxis}); + + // Secondary pion 2 + histos.add("QA/before/trknpionTPCPID", "TPC PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trknpionTOFPID", "TOF PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trknpionTPCTOFPID", "TPC-TOF PID map of secondary pion 2 (negative) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QA/before/trknpionpT", "pT distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/before/trknpionDCAxy", "DCAxy distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/before/trknpionDCAz", "DCAz distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcazAxis}); + + histos.add("QA/after/trknpionTPCPID", "TPC PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trknpionTOFPID", "TOF PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trknpionTPCTOFPID", "TPC-TOF PID map of secondary pion 2 (negative) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QA/after/trknpionpT", "pT distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/after/trknpionDCAxy", "DCAxy distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/after/trknpionDCAz", "DCAz distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcazAxis}); + + // K0s + histos.add("QA/before/hDauDCASecondary", "DCA of daughters of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/before/hDauPosDCAtoPVSecondary", "Pos DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/before/hDauNegDCAtoPVSecondary", "Neg DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/before/hpT_Secondary", "pT distribution of secondary resonance", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/before/hy_Secondary", "Rapidity distribution of secondary resonance", HistType::kTH1D, {yAxis}); + histos.add("QA/before/hRadiusSecondary", "Radius distribution of secondary resonance", HistType::kTH1D, {radiusAxis}); + histos.add("QA/before/hCPASecondary", "Cosine pointing angle distribution of secondary resonance", HistType::kTH1D, {cpaAxis}); + histos.add("QA/before/hDCAtoPVSecondary", "DCA to PV distribution of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/before/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); + histos.add("QA/before/hPtAsymSecondary", "pT asymmetry distribution of secondary resonance", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QA/before/hInvmassSecondary", "Invariant mass of unlike-sign secondary resonance", HistType::kTH1D, {invMassAxisK0s}); + + histos.add("QA/after/hDauDCASecondary", "DCA of daughters of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/after/hDauPosDCAtoPVSecondary", "Pos DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/after/hDauNegDCAtoPVSecondary", "Neg DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/after/hpT_Secondary", "pT distribution of secondary resonance", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/after/hy_Secondary", "Rapidity distribution of secondary resonance", HistType::kTH1D, {yAxis}); + histos.add("QA/after/hRadiusSecondary", "Radius distribution of secondary resonance", HistType::kTH1D, {radiusAxis}); + histos.add("QA/after/hCPASecondary", "Cosine pointing angle distribution of secondary resonance", HistType::kTH1D, {cpaAxis}); + histos.add("QA/after/hDCAtoPVSecondary", "DCA to PV distribution of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/after/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); + histos.add("QA/after/hPtAsymSecondary", "pT asymmetry distribution of secondary resonance", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QA/after/hInvmassSecondary", "Invariant mass of unlike-sign secondary resonance", HistType::kTH1D, {invMassAxisK0s}); + + // Kstar + // Invariant mass nSparse + histos.add("QA/before/KstarRapidity", "Rapidity distribution of chK(892)", HistType::kTH1D, {yAxis}); + histos.add("hInvmass_Kstar", "Invariant mass of unlike-sign chK(892)", HistType::kTHnSparseD, {axisType, centAxis, ptAxis, invMassAxisReso}); + histos.add("hInvmass_Kstar_Mix", "Invariant mass of unlike-sign chK(892) from mixed event", HistType::kTHnSparseD, {axisType, centAxis, ptAxis, invMassAxisReso}); + + // Mass QA (quick check) + histos.add("QA/before/kstarinvmass", "Invariant mass of unlike-sign chK(892)", HistType::kTH1D, {invMassAxisReso}); + histos.add("QA/before/kstarinvmass_Mix", "Invariant mass of unlike-sign chK(892) from mixed event", HistType::kTH1D, {invMassAxisReso}); + + histos.add("QA/after/KstarRapidity", "Rapidity distribution of chK(892)", HistType::kTH1D, {yAxis}); + histos.add("QA/after/kstarinvmass", "Invariant mass of unlike-sign chK(892)", HistType::kTH1D, {invMassAxisReso}); + histos.add("QA/after/kstarinvmass_Mix", "Invariant mass of unlike-sign chK(892) from mixed event", HistType::kTH1D, {invMassAxisReso}); + + // MC + if (doprocessMC) { + + histos.add("QAMC/hEvent", "Number of Events", HistType::kTH1F, {{1, 0.5, 1.5}}); + // Bachelor pion + histos.add("QAMC/trkbpionDCAxy", "DCAxy distribution of bachelor pion candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QAMC/trkbpionDCAz", "DCAz distribution of bachelor pion candidates", HistType::kTH1D, {dcazAxis}); + histos.add("QAMC/trkbpionpT", "pT distribution of bachelor pion candidates", HistType::kTH1D, {ptAxis}); + histos.add("QAMC/trkbpionTPCPID", "TPC PID of bachelor pion candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trkbpionTOFPID", "TOF PID of bachelor pion candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trkbpionTPCTOFPID", "TPC-TOF PID map of bachelor pion candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + + // Secondary pion 1 + histos.add("QAMC/trkppionDCAxy", "DCAxy distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QAMC/trkppionDCAz", "DCAz distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcazAxis}); + histos.add("QAMC/trkppionpT", "pT distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {ptAxis}); + histos.add("QAMC/trkppionTPCPID", "TPC PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trkppionTOFPID", "TOF PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trkppionTPCTOFPID", "TPC-TOF PID map of secondary pion 1 (positive) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + + // Secondary pion 2 + histos.add("QAMC/trknpionTPCPID", "TPC PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trknpionTOFPID", "TOF PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trknpionTPCTOFPID", "TPC-TOF PID map of secondary pion 2 (negative) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QAMC/trknpionpT", "pT distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {ptAxis}); + histos.add("QAMC/trknpionDCAxy", "DCAxy distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QAMC/trknpionDCAz", "DCAz distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcazAxis}); + + // Secondary Resonance (K0s cand) + histos.add("QAMC/hDauDCASecondary", "DCA of daughters of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QAMC/hDauPosDCAtoPVSecondary", "Pos DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QAMC/hDauNegDCAtoPVSecondary", "Neg DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + + histos.add("QAMC/hpT_Secondary", "pT distribution of secondary resonance", HistType::kTH1D, {ptAxis}); + histos.add("QAMC/hy_Secondary", "Rapidity distribution of secondary resonance", HistType::kTH1D, {yAxis}); + histos.add("QAMC/hRadiusSecondary", "Radius distribution of secondary resonance", HistType::kTH1D, {radiusAxis}); + histos.add("QAMC/hCPASecondary", "Cosine pointing angle distribution of secondary resonance", HistType::kTH1D, {cpaAxis}); + histos.add("QAMC/hDCAtoPVSecondary", "DCA to PV distribution of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QAMC/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); + histos.add("QAMC/hPtAsymSecondary", "pT asymmetry distribution of secondary resonance", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QAMC/hInvmassSecondary", "Invariant mass of unlike-sign secondary resonance", HistType::kTH1D, {invMassAxisK0s}); + + // K892 + histos.add("QAMC/KstarOA", "Opening angle of chK(892)", HistType::kTH1D, {AxisSpec{100, 0, 3.14, "Opening angle"}}); + histos.add("QAMC/KstarPairAsym", "Pair asymmetry of chK(892)", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QAMC/KstarRapidity", "Rapidity distribution of chK(892)", HistType::kTH1D, {yAxis}); + + histos.add("QAMC/kstarinvmass", "Invariant mass of unlike-sign chK(892)", HistType::kTH1D, {invMassAxisReso}); + histos.add("QAMC/kstarinvmass_noKstar", "Invariant mass of unlike-sign no chK(892)", HistType::kTH1D, {invMassAxisReso}); + + histos.add("hInvmass_Kstar_MC", "Invariant mass of unlike chK(892)", HistType::kTHnSparseD, {axisType, centAxis, ptAxis, invMassAxisReso}); + + ccdb->setURL(cfgURL); + ccdbApi.init("http://alice-ccdb.cern.ch"); + ccdb->setCaching(true); + ccdb->setLocalObjectValidityChecking(); + ccdb->setCreatedNotAfter(std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count()); + } + + // Print output histograms statistics + LOG(info) << "Size of the histograms in chK(892) Analysis Task"; + histos.print(); + } + + template + float GetCentrality(CollisionType const& collision) + { + if (cfgCentEst == 1) { + return collision.multFT0C(); + } else if (cfgCentEst == 2) { + return collision.multFT0M(); + } else { + return -999; + } + } + + template + int GetDetId(DetNameType const& name) + { + LOGF(info, "GetDetID running"); + if (name.value == "FT0C") { + return 0; + } else if (name.value == "FT0A") { + return 1; + } else if (name.value == "FT0M") { + return 2; + } else if (name.value == "FV0A") { + return 3; + } else if (name.value == "TPCpos") { + return 4; + } else if (name.value == "TPCneg") { + return 5; + } else { + return false; + } + } + + // Track selection + template + bool trackCut(TrackType const& track) + { + // basic track cuts + if (std::abs(track.pt()) < cMinPtcut) + return false; + if (std::abs(track.eta()) > cMaxEtacut) + return false; + if (track.itsNCls() < cfgITScluster) + return false; + if (track.tpcNClsFound() < cfgTPCcluster) + return false; + if (track.tpcCrossedRowsOverFindableCls() < cfgRatioTPCRowsOverFindableCls) + return false; + if (track.itsChi2NCl() >= cfgITSChi2NCl) + return false; + if (track.tpcChi2NCl() >= cfgTPCChi2NCl) + return false; + if (cfgHasITS && !track.hasITS()) + return false; + if (cfgHasTPC && !track.hasTPC()) + return false; + if (cfgHasTOF && !track.hasTOF()) + return false; + if (cfgUseITSRefit && !track.passedITSRefit()) + return false; + if (cfgUseTPCRefit && !track.passedTPCRefit()) + return false; + if (cfgPVContributor && !track.isPVContributor()) + return false; + if (cfgGlobalWoDCATrack && !track.isGlobalTrackWoDCA()) + return false; + if (cfgGlobalTrack && !track.isGlobalTrack()) + return false; + if (cfgPrimaryTrack && !track.isPrimaryTrack()) + return false; + if (std::abs(track.dcaXY()) > cMaxbDCArToPVcut) + return false; + if (std::abs(track.dcaZ()) > cMaxbDCAzToPVcut) + return false; + return true; + } + + // PID selection tools + template + bool selectionPIDPion(TrackType const& candidate) + { + bool tpcPIDPassed{false}, tofPIDPassed{false}; + + if (cTPConly) { + + if (std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion) { + tpcPIDPassed = true; + } else { + return false; + } + tofPIDPassed = true; + + } else { + + if (std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion) { + tpcPIDPassed = true; + } else { + return false; + } + if (candidate.hasTOF()) { + if (std::abs(candidate.tofNSigmaPi()) < cMaxTOFnSigmaPion) { + tofPIDPassed = true; + } + if ((nsigmaCutCombinedPion > 0) && (candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi() + candidate.tofNSigmaPi() * candidate.tofNSigmaPi() < nsigmaCutCombinedPion * nsigmaCutCombinedPion)) { + tofPIDPassed = true; + } + } else { + if (!cTOFVeto) { + return false; + } + tofPIDPassed = true; + } + } + + if (tpcPIDPassed && tofPIDPassed) { + return true; + } + return false; + } + + template + bool selectionK0s(CollisionType const& collision, K0sType const& candidate) + { + auto DauDCA = candidate.dcaV0daughters(); + auto DauPosDCAtoPV = candidate.dcapostopv(); + auto DauNegDCAtoPV = candidate.dcanegtopv(); + auto pT = candidate.pt(); + auto Rapidity = candidate.yK0Short(); + auto Radius = candidate.v0radius(); + auto DCAtoPV = candidate.dcav0topv(); + auto CPA = candidate.v0cosPA(); + auto PropTauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassK0Short; + auto mK0s = candidate.mK0Short(); + + if (cfgReturnFlag) { + bool returnFlag = true; + + if (cSecondaryRequire) { + histos.fill(HIST("QA/K0sCutCheck"), 0); + if (DauDCA > cSecondaryDauDCAMax) { + histos.fill(HIST("QA/K0sCutCheck"), 1); + returnFlag = false; + } + if (DauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 2); + returnFlag = false; + } + if (DauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 3); + returnFlag = false; + } + if (pT < cSecondaryPtMin) { + histos.fill(HIST("QA/K0sCutCheck"), 4); + returnFlag = false; + } + if (Rapidity > cSecondaryRapidityMax) { + histos.fill(HIST("QA/K0sCutCheck"), 5); + returnFlag = false; + } + if (Radius < cSecondaryRadiusMin) { + histos.fill(HIST("QA/K0sCutCheck"), 6); + returnFlag = false; + } + if (DCAtoPV > cSecondaryDCAtoPVMax) { + histos.fill(HIST("QA/K0sCutCheck"), 7); + returnFlag = false; + } + if (CPA < cSecondaryCosPAMin) { + histos.fill(HIST("QA/K0sCutCheck"), 8); + returnFlag = false; + } + if (PropTauK0s > cSecondaryProperLifetimeMax) { + histos.fill(HIST("QA/K0sCutCheck"), 9); + returnFlag = false; + } + if (candidate.qtarm() < cSecondaryparamArmenterosCut * TMath::Abs(candidate.alpha())) { + histos.fill(HIST("QA/K0sCutCheck"), 11); + returnFlag = false; + } + if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + returnFlag = false; + } + + return returnFlag; + + } else { + if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + returnFlag = false; + } + + return returnFlag; + } + + } else { + if (cSecondaryRequire) { + + histos.fill(HIST("QA/K0sCutCheck"), 0); + if (DauDCA > cSecondaryDauDCAMax) { + histos.fill(HIST("QA/K0sCutCheck"), 1); + return false; + } + if (DauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 2); + return false; + } + if (DauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 3); + return false; + } + if (pT < cSecondaryPtMin) { + histos.fill(HIST("QA/K0sCutCheck"), 4); + return false; + } + if (Rapidity > cSecondaryRapidityMax) { + histos.fill(HIST("QA/K0sCutCheck"), 5); + return false; + } + if (Radius < cSecondaryRadiusMin) { + histos.fill(HIST("QA/K0sCutCheck"), 6); + return false; + } + if (DCAtoPV > cSecondaryDCAtoPVMax) { + histos.fill(HIST("QA/K0sCutCheck"), 7); + return false; + } + if (CPA < cSecondaryCosPAMin) { + histos.fill(HIST("QA/K0sCutCheck"), 8); + return false; + } + if (PropTauK0s > cSecondaryProperLifetimeMax) { + histos.fill(HIST("QA/K0sCutCheck"), 9); + return false; + } + if (candidate.qtarm() < cSecondaryparamArmenterosCut * TMath::Abs(candidate.alpha())) { + histos.fill(HIST("QA/K0sCutCheck"), 11); + return false; + } + if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + return false; + } + return true; + + } else { + if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + return false; + } + return true; + } + } + } // selectionK0s + + double GetPhiInRange(double phi) + { + double result = phi; + while (result < 0) { + result = result + 2. * TMath::Pi() / 2; + } + while (result > 2. * TMath::Pi() / 2) { + result = result - 2. * TMath::Pi() / 2; + } + return result; + } + + template + bool isTrueKstar(const TrackTemplate& bTrack, const V0Template& K0scand) + { + if (abs(bTrack.PDGCode()) != kPiPlus) // Are you pion? + return false; + if (abs(K0scand.PDGCode()) != kPDGK0s) // Are you K0s? + return false; + + auto motherbTrack = bTrack.template mothers_as(); + auto motherkV0 = K0scand.template mothers_as(); + + // Check bTrack first + if (abs(motherbTrack.pdgCode()) != kKstarPlus) // Are you charged Kstar's daughter? + return false; // Apply first since it's more restrictive + + if (abs(motherkV0.pdgCode()) != 310) // Is it K0s? + return false; + // Check if K0s's mother is K0 (311) + auto motherK0 = motherkV0.template mothers_as(); + if (abs(motherK0.pdgCode()) != 311) + return false; + + // Check if K0's mother is Kstar (323) + auto motherKstar = motherK0.template mothers_as(); + if (abs(motherKstar.pdgCode()) != 323) + return false; + + // Check if bTrack and K0 have the same mother (global index) + if (motherbTrack.globalIndex() != motherK0.globalIndex()) + return false; + + return true; + } + + int count = 0; + + template + void fillHistograms(const CollisionType& collision, const TracksType& dTracks1, const TracksTypeK0s& dTracks2) + { + histos.fill(HIST("QA/before/CentDist"), centrality); + + TLorentzVector lDecayDaughter1, lDecayDaughter2, lResoSecondary, lDecayDaughter_bach, lResoKstar; + std::vector trackIndicies = {}; + std::vector k0sIndicies = {}; + + for (auto& bTrack : dTracks1) { + auto trkbpt = bTrack.pt(); + auto istrkbhasTOF = bTrack.hasTOF(); + auto trkbNSigmaPiTPC = bTrack.tpcNSigmaPi(); + auto trkbNSigmaPiTOF = (istrkbhasTOF) ? bTrack.tofNSigmaPi() : -999.; + + if constexpr (!IsMix) { + // Bachelor pion QA plots + histos.fill(HIST("QA/before/trkbpionTPCPID"), trkbpt, trkbNSigmaPiTPC); + if (istrkbhasTOF) { + histos.fill(HIST("QA/before/trkbpionTOFPID"), trkbpt, trkbNSigmaPiTOF); + histos.fill(HIST("QA/before/trkbpionTPCTOFPID"), trkbNSigmaPiTPC, trkbNSigmaPiTOF); + } + histos.fill(HIST("QA/before/trkbpionpT"), trkbpt); + histos.fill(HIST("QA/before/trkbpionDCAxy"), bTrack.dcaXY()); + histos.fill(HIST("QA/before/trkbpionDCAz"), bTrack.dcaZ()); + } + + if (!trackCut(bTrack)) + continue; + if (!selectionPIDPion(bTrack)) + continue; + + if constexpr (!IsMix) { + // Bachelor pion QA plots after applying cuts + histos.fill(HIST("QA/after/trkbpionTPCPID"), trkbpt, trkbNSigmaPiTPC); + if (istrkbhasTOF) { + histos.fill(HIST("QA/after/trkbpionTOFPID"), trkbpt, trkbNSigmaPiTOF); + histos.fill(HIST("QA/after/trkbpionTPCTOFPID"), trkbNSigmaPiTPC, trkbNSigmaPiTOF); + } + histos.fill(HIST("QA/after/trkbpionpT"), trkbpt); + histos.fill(HIST("QA/after/trkbpionDCAxy"), bTrack.dcaXY()); + histos.fill(HIST("QA/after/trkbpionDCAz"), bTrack.dcaZ()); + } + trackIndicies.push_back(bTrack.index()); + } + + for (auto& K0scand : dTracks2) { + auto posDauTrack = K0scand.template posTrack_as(); + auto negDauTrack = K0scand.template negTrack_as(); + + /// Daughters + // Positve pion + auto trkppt = posDauTrack.pt(); + auto istrkphasTOF = posDauTrack.hasTOF(); + auto trkpNSigmaPiTPC = posDauTrack.tpcNSigmaPi(); + auto trkpNSigmaPiTOF = (istrkphasTOF) ? posDauTrack.tofNSigmaPi() : -999.; + // Negative pion + auto trknpt = negDauTrack.pt(); + auto istrknhasTOF = negDauTrack.hasTOF(); + auto trknNSigmaPiTPC = negDauTrack.tpcNSigmaPi(); + auto trknNSigmaPiTOF = (istrknhasTOF) ? negDauTrack.tofNSigmaPi() : -999.; + + /// K0s + auto trkkDauDCA = K0scand.dcaV0daughters(); + auto trkkDauDCAPostoPV = K0scand.dcapostopv(); + auto trkkDauDCANegtoPV = K0scand.dcanegtopv(); + auto trkkpt = K0scand.pt(); + auto trkky = K0scand.yK0Short(); + auto trkkRadius = K0scand.v0radius(); + auto trkkDCAtoPV = K0scand.dcav0topv(); + auto trkkCPA = K0scand.v0cosPA(); + auto trkkPropTau = K0scand.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassK0Short; + auto trkkMass = K0scand.mK0Short(); + + if constexpr (!IsMix) { + // Seconddary QA plots + histos.fill(HIST("QA/before/trkppionTPCPID"), trkppt, trkpNSigmaPiTPC); + if (istrkphasTOF) { + histos.fill(HIST("QA/before/trkppionTOFPID"), trkppt, trkpNSigmaPiTOF); + histos.fill(HIST("QA/before/trkppionTPCTOFPID"), trkpNSigmaPiTPC, trkpNSigmaPiTOF); + } + histos.fill(HIST("QA/before/trkppionpT"), trkppt); + histos.fill(HIST("QA/before/trkppionDCAxy"), posDauTrack.dcaXY()); + histos.fill(HIST("QA/before/trkppionDCAz"), posDauTrack.dcaZ()); + + histos.fill(HIST("QA/before/trknpionTPCPID"), trknpt, trknNSigmaPiTPC); + if (istrknhasTOF) { + histos.fill(HIST("QA/before/trknpionTOFPID"), trknpt, trknNSigmaPiTOF); + histos.fill(HIST("QA/before/trknpionTPCTOFPID"), trknNSigmaPiTPC, trknNSigmaPiTOF); + } + histos.fill(HIST("QA/before/trknpionpT"), trknpt); + histos.fill(HIST("QA/before/trknpionDCAxy"), negDauTrack.dcaXY()); + histos.fill(HIST("QA/before/trknpionDCAz"), negDauTrack.dcaZ()); + + histos.fill(HIST("QA/before/hDauDCASecondary"), trkkDauDCA); + histos.fill(HIST("QA/before/hDauPosDCAtoPVSecondary"), trkkDauDCAPostoPV); + histos.fill(HIST("QA/before/hDauNegDCAtoPVSecondary"), trkkDauDCANegtoPV); + + histos.fill(HIST("QA/before/hpT_Secondary"), trkkpt); + histos.fill(HIST("QA/before/hy_Secondary"), trkky); + histos.fill(HIST("QA/before/hRadiusSecondary"), trkkRadius); + histos.fill(HIST("QA/before/hDCAtoPVSecondary"), trkkDCAtoPV); + histos.fill(HIST("QA/before/hCPASecondary"), trkkCPA); + histos.fill(HIST("QA/before/hPropTauSecondary"), trkkPropTau); + histos.fill(HIST("QA/before/hInvmassSecondary"), trkkMass); + } + + // if (!trackCut(posDauTrack) || !trackCut(negDauTrack)) // Too tight cut for K0s daugthers + // continue; + if (!cfgByPassDauPIDSelection && !selectionPIDPion(posDauTrack)) // Perhaps it's already applied in trackCut (need to check QA plots) + continue; + if (!cfgByPassDauPIDSelection && !selectionPIDPion(negDauTrack)) + continue; + if (!selectionK0s(collision, K0scand)) + continue; + + if constexpr (!IsMix) { + // Seconddary QA plots after applying cuts + + histos.fill(HIST("QA/after/trkppionTPCPID"), trkppt, trkpNSigmaPiTPC); + if (istrkphasTOF) { + histos.fill(HIST("QA/after/trkppionTOFPID"), trkppt, trkpNSigmaPiTOF); + histos.fill(HIST("QA/after/trkppionTPCTOFPID"), trkpNSigmaPiTPC, trkpNSigmaPiTOF); + } + histos.fill(HIST("QA/after/trkppionpT"), trkppt); + histos.fill(HIST("QA/after/trkppionDCAxy"), posDauTrack.dcaXY()); + histos.fill(HIST("QA/after/trkppionDCAz"), posDauTrack.dcaZ()); + + histos.fill(HIST("QA/after/trknpionTPCPID"), trknpt, trknNSigmaPiTPC); + if (istrknhasTOF) { + histos.fill(HIST("QA/after/trknpionTOFPID"), trknpt, trknNSigmaPiTOF); + histos.fill(HIST("QA/after/trknpionTPCTOFPID"), trknNSigmaPiTPC, trknNSigmaPiTOF); + } + histos.fill(HIST("QA/after/trknpionpT"), trknpt); + histos.fill(HIST("QA/after/trknpionDCAxy"), negDauTrack.dcaXY()); + histos.fill(HIST("QA/after/trknpionDCAz"), negDauTrack.dcaZ()); + + histos.fill(HIST("QA/after/hDauDCASecondary"), trkkDauDCA); + histos.fill(HIST("QA/after/hDauPosDCAtoPVSecondary"), trkkDauDCAPostoPV); + histos.fill(HIST("QA/after/hDauNegDCAtoPVSecondary"), trkkDauDCANegtoPV); + + histos.fill(HIST("QA/after/hpT_Secondary"), trkkpt); + histos.fill(HIST("QA/after/hy_Secondary"), trkky); + histos.fill(HIST("QA/after/hRadiusSecondary"), trkkRadius); + histos.fill(HIST("QA/after/hDCAtoPVSecondary"), trkkDCAtoPV); + histos.fill(HIST("QA/after/hCPASecondary"), trkkCPA); + histos.fill(HIST("QA/after/hPropTauSecondary"), trkkPropTau); + histos.fill(HIST("QA/after/hInvmassSecondary"), trkkMass); + } + k0sIndicies.push_back(K0scand.index()); + } + + for (auto& trackIndex : trackIndicies) { + for (auto& k0sIndex : k0sIndicies) { + auto bTrack = dTracks1.rawIteratorAt(trackIndex); + auto K0scand = dTracks2.rawIteratorAt(k0sIndex); + + lDecayDaughter_bach.SetXYZM(bTrack.px(), bTrack.py(), bTrack.pz(), MassPionCharged); + lResoSecondary.SetXYZM(K0scand.px(), K0scand.py(), K0scand.pz(), MassK0Short); + lResoKstar = lResoSecondary + lDecayDaughter_bach; + + // QA plots + if constexpr (!IsMix) { + histos.fill(HIST("QA/before/KstarRapidity"), lResoKstar.Rapidity()); + histos.fill(HIST("QA/before/kstarinvmass"), lResoKstar.M()); + } + + if (lResoKstar.Rapidity() > cKstarMaxRap || lResoKstar.Rapidity() < cKstarMinRap) + continue; + + if constexpr (!IsMix) { + unsigned int typeKstar = bTrack.sign() > 0 ? binType::kKstarP : binType::kKstarN; + + histos.fill(HIST("QA/after/KstarRapidity"), lResoKstar.Rapidity()); + histos.fill(HIST("QA/after/kstarinvmass"), lResoKstar.M()); + histos.fill(HIST("hInvmass_Kstar"), typeKstar, centrality, lResoKstar.Pt(), lResoKstar.M()); + + } // IsMix + } // K0scand + } // bTrack + + count++; + + } // fillHistograms + + // process data + void processData(EventCandidates::iterator const& collision, + TrackCandidates const& tracks, + V0Candidates const& v0s, + aod::BCsWithTimestamps const&) + { + if (!colCuts.isSelected(collision)) // Default event selection + return; + colCuts.fillQA(collision); + centrality = GetCentrality(collision); + + fillHistograms(collision, tracks, v0s); // second order + } + PROCESS_SWITCH(chk892_pp, processData, "Process Event for data without Partitioning", true); + + // process MC reconstructed level + void processMC(EventCandidates::iterator const& collision, + MCTrackCandidates const& tracks, + MCV0Candidates const& v0s) + { + + histos.fill(HIST("QAMC/hEvent"), 1.0); + + fillHistograms(collision, tracks, v0s); + } + PROCESS_SWITCH(chk892_pp, processMC, "Process Event for MC", false); +}; +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"lf-chk892pp"})}; +} diff --git a/PWGLF/Tasks/Resonances/chk892pp.cxx b/PWGLF/Tasks/Resonances/chk892pp.cxx new file mode 100644 index 00000000000..e61226dd567 --- /dev/null +++ b/PWGLF/Tasks/Resonances/chk892pp.cxx @@ -0,0 +1,931 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// \file chk892pp.cxx +/// \brief Reconstruction of track-track decay resonance candidates +/// +/// +/// \author Su-Jeong Ji + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // FIXME +#include // FIXME + +#include +#include +#include +#include +#include +#include + +#include "TRandom3.h" +#include "TF1.h" +#include "TVector2.h" +#include "Math/Vector3D.h" +#include "Math/Vector4D.h" +#include "Math/GenVector/Boost.h" +#include + +#include "Framework/runDataProcessing.h" +#include "Framework/AnalysisTask.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/StepTHn.h" +#include "Framework/O2DatabasePDGPlugin.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/StaticFor.h" +#include "DCAFitter/DCAFitterN.h" + +#include "Common/DataModel/PIDResponse.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/Centrality.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "Common/DataModel/EventSelection.h" + +#include "Common/Core/trackUtilities.h" +#include "Common/Core/TrackSelection.h" +#include "Common/Core/RecoDecay.h" + +#include "CommonConstants/PhysicsConstants.h" + +#include "ReconstructionDataFormats/Track.h" + +#include "DataFormatsParameters/GRPObject.h" +#include "DataFormatsParameters/GRPMagField.h" + +#include "CCDB/CcdbApi.h" +#include "CCDB/BasicCCDBManager.h" + +#include "PWGLF/DataModel/LFStrangenessTables.h" +#include "PWGLF/Utils/collisionCuts.h" + +using namespace o2; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; +using namespace o2::constants::physics; + +struct chk892pp { + enum binType : unsigned int { + kKstarP = 0, + kKstarN, + kKstarP_Mix, + kKstarN_Mix, + kKstarP_GenINEL10, + kKstarN_GenINEL10, + kKstarP_GenINELgt10, + kKstarN_GenINELgt10, + kKstarP_GenTrig10, + kKstarN_GenTrig10, + kKstarP_GenEvtSel, + kKstarN_GenEvtSel, + kKstarP_Rec, + kKstarN_Rec, + kTYEnd + }; + + SliceCache cache; + Preslice perCollision = aod::track::collisionId; + + using EventCandidates = soa::Join; + // using EventCandidates = soa::Join; + using TrackCandidates = soa::Join; + using V0Candidates = aod::V0Datas; + + using MCEventCandidates = soa::Join; + using MCTrackCandidates = soa::Join; + using MCV0Candidates = soa::Join; + + HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; + + Service ccdb; + Service pdg; + o2::ccdb::CcdbApi ccdbApi; + + Configurable cfgURL{"cfgURL", "http://alice-ccdb.cern.ch", "Address of the CCDB to browse"}; + Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "Latest acceptable timestamp of creation for the object"}; + + // Configurables + ConfigurableAxis cfgBinsPt{"cfgBinsPt", {VARIABLE_WIDTH, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 6.9, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 9.9, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9, 12.0, 12.1, 12.2, 12.3, 12.4, 12.5, 12.6, 12.7, 12.8, 12.9, 13.0, 13.1, 13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 13.8, 13.9, 14.0, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 14.9, 15.0}, "Binning of the pT axis"}; + ConfigurableAxis cfgBinsPtQA{"cfgBinsPtQA", {VARIABLE_WIDTH, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.0, 6.2, 6.4, 6.6, 6.8, 7.0, 7.2, 7.4, 7.6, 7.8, 8.0, 8.2, 8.4, 8.6, 8.8, 9.0, 9.2, 9.4, 9.6, 9.8, 10.0}, "Binning of the pT axis"}; + ConfigurableAxis cfgBinsCent{"cfgBinsCent", {VARIABLE_WIDTH, 0.0, 1.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}, "Binning of the centrality axis"}; + ConfigurableAxis cfgBinsVtxZ{"cfgBinsVtxZ", {VARIABLE_WIDTH, -10.0, -9.0, -8.0, -7.0, -6.0, -5.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}, "Binning of the z-vertex axis"}; + Configurable cNbinsDiv{"cNbinsDiv", 1, "Integer to divide the number of bins"}; + + /// Event cuts + o2::analysis::CollisonCuts colCuts; + Configurable ConfEvtZvtx{"ConfEvtZvtx", 10.f, "Evt sel: Max. z-Vertex (cm)"}; + Configurable ConfEvtOccupancyInTimeRangeMax{"ConfEvtOccupancyInTimeRangeMax", -1, "Evt sel: maximum track occupancy"}; + Configurable ConfEvtOccupancyInTimeRangeMin{"ConfEvtOccupancyInTimeRangeMin", -1, "Evt sel: minimum track occupancy"}; + Configurable ConfEvtTriggerCheck{"ConfEvtTriggerCheck", false, "Evt sel: check for trigger"}; + Configurable ConfEvtTriggerSel{"ConfEvtTriggerSel", 8, "Evt sel: trigger"}; + Configurable ConfEvtOfflineCheck{"ConfEvtOfflineCheck", true, "Evt sel: check for offline selection"}; + Configurable ConfEvtTriggerTVXSel{"ConfEvtTriggerTVXSel", false, "Evt sel: triggerTVX selection (MB)"}; + Configurable ConfEvtTFBorderCut{"ConfEvtTFBorderCut", false, "Evt sel: apply TF border cut"}; + Configurable ConfEvtUseITSTPCvertex{"ConfEvtUseITSTPCvertex", false, "Evt sel: use at lease on ITS-TPC track for vertexing"}; + Configurable ConfEvtZvertexTimedifference{"ConfEvtZvertexTimedifference", true, "Evt sel: apply Z-vertex time difference"}; + Configurable ConfEvtPileupRejection{"ConfEvtPileupRejection", true, "Evt sel: apply pileup rejection"}; + Configurable ConfEvtNoITSROBorderCut{"ConfEvtNoITSROBorderCut", false, "Evt sel: apply NoITSRO border cut"}; + Configurable ConfincludeCentralityMC{"ConfincludeCentralityMC", false, "Include centrality in MC"}; + Configurable ConfEvtCollInTimeRangeStandard{"ConfEvtCollInTimeRangeStandard", true, "Evt sel: apply NoCollInTimeRangeStandard"}; + + /// Track selections + Configurable cMinPtcut{"cMinPtcut", 0.15, "Track minium pt cut"}; + Configurable cMaxEtacut{"cMaxEtacut", 0.8, "Track maximum eta cut"}; + + /* + // Cuts from polarization analysis + Configurable cfgOccupancySel{"cfgOccupancySel", false, "Occupancy selection"}; + Configurable cfgMaxOccupancy{"cfgMaxOccupancy", 999999, "maximum occupancy of tracks in neighbouring collisions in a given time range"}; + Configurable cfgMinOccupancy{"cfgMinOccupancy", -100, "maximum occupancy of tracks in neighbouring collisions in a given time range"}; + Configurable cfgNCollinTR{"cfgNCollinTR", false, "Additional selection for the number of coll in time range"}; +*/ + Configurable cfgCentEst{"cfgCentEst", 1, "Centrality estimator, 1: FT0C, 2: FT0M"}; + + // DCAr to PV + Configurable cMaxbDCArToPVcut{"cMaxbDCArToPVcut", 0.1, "Track DCAr cut to PV Maximum"}; + // DCAz to PV + Configurable cMaxbDCAzToPVcut{"cMaxbDCAzToPVcut", 0.1, "Track DCAz cut to PV Maximum"}; + + /// PID Selections, pion + Configurable cTPConly{"cTPConly", true, "Use only TPC for PID"}; // bool + Configurable cMaxTPCnSigmaPion{"cMaxTPCnSigmaPion", 3.0, "TPC nSigma cut for Pion"}; // TPC + Configurable cMaxTOFnSigmaPion{"cMaxTOFnSigmaPion", 3.0, "TOF nSigma cut for Pion"}; // TOF + Configurable nsigmaCutCombinedPion{"nsigmaCutCombinedPion", -999, "Combined nSigma cut for Pion"}; // Combined + Configurable cTOFVeto{"cTOFVeto", true, "TOF Veto, if false, TOF is nessessary for PID selection"}; // TOF Veto + + // Track selections + Configurable cfgPrimaryTrack{"cfgPrimaryTrack", true, "Primary track selection"}; // kGoldenChi2 | kDCAxy | kDCAz + Configurable cfgGlobalWoDCATrack{"cfgGlobalWoDCATrack", true, "Global track selection without DCA"}; // kQualityTracks (kTrackType | kTPCNCls | kTPCCrossedRows | kTPCCrossedRowsOverNCls | kTPCChi2NDF | kTPCRefit | kITSNCls | kITSChi2NDF | kITSRefit | kITSHits) | kInAcceptanceTracks (kPtRange | kEtaRange) + Configurable cfgGlobalTrack{"cfgGlobalTrack", false, "Global track selection"}; // kGoldenChi2 | kDCAxy | kDCAz + Configurable cfgPVContributor{"cfgPVContributor", false, "PV contributor track selection"}; // PV Contriuibutor + + Configurable cfgITScluster{"cfgITScluster", 0, "Number of ITS cluster"}; + Configurable cfgTPCcluster{"cfgTPCcluster", 0, "Number of TPC cluster"}; + Configurable cfgRatioTPCRowsOverFindableCls{"cfgRatioTPCRowsOverFindableCls", 0.0f, "TPC Crossed Rows to Findable Clusters"}; + Configurable cfgITSChi2NCl{"cfgITSChi2NCl", 999.0, "ITS Chi2/NCl"}; + Configurable cfgTPCChi2NCl{"cfgTPCChi2NCl", 999.0, "TPC Chi2/NCl"}; + Configurable cfgUseTPCRefit{"cfgUseTPCRefit", false, "Require TPC Refit"}; + Configurable cfgUseITSRefit{"cfgUseITSRefit", false, "Require ITS Refit"}; + Configurable cfgHasITS{"cfgHasITS", false, "Require ITS"}; + Configurable cfgHasTPC{"cfgHasTPC", false, "Require TPC"}; + Configurable cfgHasTOF{"cfgHasTOF", false, "Require TOF"}; + + // Secondary Selection + Configurable cfgReturnFlag{"boolReturnFlag", false, "Return Flag for debugging"}; + Configurable cSecondaryRequire{"bool", true, "Secondary cuts on/off"}; + Configurable cSecondaryArmenterosCut{"boolArmenterosCut", true, "cut on Armenteros-Podolanski graph"}; + + Configurable cfgByPassDauPIDSelection{"cfgByPassDauPIDSelection", true, "Bypass Daughters PID selection"}; + Configurable cSecondaryDauDCAMax{"cSecondaryDauDCAMax", 1., "Maximum DCA Secondary daughters to PV"}; + Configurable cSecondaryDauPosDCAtoPVMin{"cSecondaryDauPosDCAtoPVMin", 0.0, "Minimum DCA Secondary positive daughters to PV"}; + Configurable cSecondaryDauNegDCAtoPVMin{"cSecondaryDauNegDCAtoPVMin", 0.0, "Minimum DCA Secondary negative daughters to PV"}; + + Configurable cSecondaryPtMin{"cSecondaryPtMin", 0.f, "Minimum transverse momentum of Secondary"}; + Configurable cSecondaryRapidityMax{"cSecondaryRapidityMax", 0.5, "Maximum rapidity of Secondary"}; + Configurable cSecondaryRadiusMin{"cSecondaryRadiusMin", 1.2, "Minimum transverse radius of Secondary"}; + Configurable cSecondaryCosPAMin{"cSecondaryCosPAMin", 0.995, "Mininum cosine pointing angle of Secondary"}; + Configurable cSecondaryDCAtoPVMax{"cSecondaryDCAtoPVMax", 0.3, "Maximum DCA Secondary to PV"}; + Configurable cSecondaryProperLifetimeMax{"cSecondaryProperLifetimeMax", 20, "Maximum Secondary Lifetime"}; + Configurable cSecondaryparamArmenterosCut{"paramArmenterosCut", 0.2, "parameter for Armenteros Cut"}; + Configurable cSecondaryMassWindow{"cSecondaryMassWindow", 0.075, "Secondary inv mass selciton window"}; + + // K* selection + Configurable cKstarMaxRap{"cKstarMaxRap", 0.5, "Kstar maximum rapidity"}; + Configurable cKstarMinRap{"cKstarMinRap", -0.5, "Kstar minimum rapidity"}; + + float centrality; + + // PDG code + int kPDGK0s = 310; + int kPDGK0 = 311; + int kKstarPlus = 323; + int kPiPlus = 211; + + void init(o2::framework::InitContext&) + { + centrality = -999; + + colCuts.setCuts(ConfEvtZvtx, ConfEvtTriggerCheck, ConfEvtTriggerSel, ConfEvtOfflineCheck, /*checkRun3*/ true, /*triggerTVXsel*/ false, ConfEvtOccupancyInTimeRangeMax, ConfEvtOccupancyInTimeRangeMin); + colCuts.init(&histos); + colCuts.setTriggerTVX(ConfEvtTriggerTVXSel); + colCuts.setApplyTFBorderCut(ConfEvtTFBorderCut); + colCuts.setApplyITSTPCvertex(ConfEvtUseITSTPCvertex); + colCuts.setApplyZvertexTimedifference(ConfEvtZvertexTimedifference); + colCuts.setApplyPileupRejection(ConfEvtPileupRejection); + colCuts.setApplyNoITSROBorderCut(ConfEvtNoITSROBorderCut); + colCuts.setApplyCollInTimeRangeStandard(ConfEvtCollInTimeRangeStandard); + + AxisSpec centAxis = {cfgBinsCent, "T0M (%)"}; + AxisSpec vtxzAxis = {cfgBinsVtxZ, "Z Vertex (cm)"}; + AxisSpec epAxis = {100, -1.0 * constants::math::PI, constants::math::PI}; + AxisSpec epresAxis = {100, -1.02, 1.02}; + AxisSpec ptAxis = {cfgBinsPt, "#it{p}_{T} (GeV/#it{c})"}; + AxisSpec ptAxisQA = {cfgBinsPtQA, "#it{p}_{T} (GeV/#it{c})"}; + AxisSpec radiusAxis = {50, 0, 5, "Radius (cm)"}; + AxisSpec cpaAxis = {50, 0.95, 1.0, "CPA"}; + AxisSpec tauAxis = {250, 0, 25, "Lifetime (cm)"}; + AxisSpec dcaAxis = {200, 0, 2, "DCA (cm)"}; + AxisSpec dcaxyAxis = {200, 0, 2, "DCA_{#it{xy}} (cm)"}; + AxisSpec dcazAxis = {200, 0, 2, "DCA_{#it{z}} (cm)"}; + AxisSpec yAxis = {100, -1, 1, "Rapidity"}; + AxisSpec invMassAxisK0s = {400 / cNbinsDiv, 0.3, 0.7, "Invariant Mass (GeV/#it{c}^2)"}; // K0s ~497.611 + AxisSpec invMassAxisReso = {900 / cNbinsDiv, 0.5f, 1.4f, "Invariant Mass (GeV/#it{c}^2)"}; // chK(892) ~892 + AxisSpec invMassAxisScan = {150, 0, 1.5, "Invariant Mass (GeV/#it{c}^2)"}; // For selection + AxisSpec pidQAAxis = {130, -6.5, 6.5}; + AxisSpec dataTypeAxis = {9, 0, 9, "Histogram types"}; + AxisSpec mcTypeAxis = {4, 0, 4, "Histogram types"}; + + // THnSparse + AxisSpec axisType = {binType::kTYEnd, 0, binType::kTYEnd, "Type of bin with charge and mix"}; + AxisSpec mcLabelAxis = {5, -0.5, 4.5, "MC Label"}; + + histos.add("QA/K0sCutCheck", "Check K0s cut", HistType::kTH1D, {AxisSpec{12, -0.5, 11.5, "Check"}}); + + histos.add("QA/before/CentDist", "Centrality distribution", {HistType::kTH1D, {centAxis}}); + histos.add("QA/before/VtxZ", "Centrality distribution", {HistType::kTH1D, {vtxzAxis}}); + histos.add("QA/before/hEvent", "Number of Events", HistType::kTH1F, {{1, 0.5, 1.5}}); + + // Bachelor pion + histos.add("QA/before/trkbpionDCAxy", "DCAxy distribution of bachelor pion candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/before/trkbpionDCAz", "DCAz distribution of bachelor pion candidates", HistType::kTH1D, {dcazAxis}); + histos.add("QA/before/trkbpionpT", "pT distribution of bachelor pion candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/before/trkbpionTPCPID", "TPC PID of bachelor pion candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trkbpionTOFPID", "TOF PID of bachelor pion candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trkbpionTPCTOFPID", "TPC-TOF PID map of bachelor pion candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + + histos.add("QA/after/trkbpionDCAxy", "DCAxy distribution of bachelor pion candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/after/trkbpionDCAz", "DCAz distribution of bachelor pion candidates", HistType::kTH1D, {dcazAxis}); + histos.add("QA/after/trkbpionpT", "pT distribution of bachelor pion candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/after/trkbpionTPCPID", "TPC PID of bachelor pion candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trkbpionTOFPID", "TOF PID of bachelor pion candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trkbpionTPCTOFPID", "TPC-TOF PID map of bachelor pion candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + + // Secondary pion 1 + histos.add("QA/before/trkppionTPCPID", "TPC PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trkppionTOFPID", "TOF PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trkppionTPCTOFPID", "TPC-TOF PID map of secondary pion 1 (positive) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QA/before/trkppionpT", "pT distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/before/trkppionDCAxy", "DCAxy distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/before/trkppionDCAz", "DCAz distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcazAxis}); + + histos.add("QA/after/trkppionTPCPID", "TPC PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trkppionTOFPID", "TOF PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trkppionTPCTOFPID", "TPC-TOF PID map of secondary pion 1 (positive) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QA/after/trkppionpT", "pT distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/after/trkppionDCAxy", "DCAxy distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/after/trkppionDCAz", "DCAz distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcazAxis}); + + // Secondary pion 2 + histos.add("QA/before/trknpionTPCPID", "TPC PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trknpionTOFPID", "TOF PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/before/trknpionTPCTOFPID", "TPC-TOF PID map of secondary pion 2 (negative) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QA/before/trknpionpT", "pT distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/before/trknpionDCAxy", "DCAxy distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/before/trknpionDCAz", "DCAz distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcazAxis}); + + histos.add("QA/after/trknpionTPCPID", "TPC PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trknpionTOFPID", "TOF PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxisQA, pidQAAxis}); + histos.add("QA/after/trknpionTPCTOFPID", "TPC-TOF PID map of secondary pion 2 (negative) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QA/after/trknpionpT", "pT distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/after/trknpionDCAxy", "DCAxy distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QA/after/trknpionDCAz", "DCAz distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcazAxis}); + + // K0s + histos.add("QA/before/hDauDCASecondary", "DCA of daughters of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/before/hDauPosDCAtoPVSecondary", "Pos DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/before/hDauNegDCAtoPVSecondary", "Neg DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/before/hpT_Secondary", "pT distribution of secondary resonance", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/before/hy_Secondary", "Rapidity distribution of secondary resonance", HistType::kTH1D, {yAxis}); + histos.add("QA/before/hRadiusSecondary", "Radius distribution of secondary resonance", HistType::kTH1D, {radiusAxis}); + histos.add("QA/before/hCPASecondary", "Cosine pointing angle distribution of secondary resonance", HistType::kTH1D, {cpaAxis}); + histos.add("QA/before/hDCAtoPVSecondary", "DCA to PV distribution of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/before/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); + histos.add("QA/before/hPtAsymSecondary", "pT asymmetry distribution of secondary resonance", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QA/before/hInvmassSecondary", "Invariant mass of unlike-sign secondary resonance", HistType::kTH1D, {invMassAxisK0s}); + + histos.add("QA/after/hDauDCASecondary", "DCA of daughters of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/after/hDauPosDCAtoPVSecondary", "Pos DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/after/hDauNegDCAtoPVSecondary", "Neg DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/after/hpT_Secondary", "pT distribution of secondary resonance", HistType::kTH1D, {ptAxisQA}); + histos.add("QA/after/hy_Secondary", "Rapidity distribution of secondary resonance", HistType::kTH1D, {yAxis}); + histos.add("QA/after/hRadiusSecondary", "Radius distribution of secondary resonance", HistType::kTH1D, {radiusAxis}); + histos.add("QA/after/hCPASecondary", "Cosine pointing angle distribution of secondary resonance", HistType::kTH1D, {cpaAxis}); + histos.add("QA/after/hDCAtoPVSecondary", "DCA to PV distribution of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QA/after/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); + histos.add("QA/after/hPtAsymSecondary", "pT asymmetry distribution of secondary resonance", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QA/after/hInvmassSecondary", "Invariant mass of unlike-sign secondary resonance", HistType::kTH1D, {invMassAxisK0s}); + + // Kstar + // Invariant mass nSparse + histos.add("QA/before/KstarRapidity", "Rapidity distribution of chK(892)", HistType::kTH1D, {yAxis}); + histos.add("hInvmass_Kstar", "Invariant mass of unlike-sign chK(892)", HistType::kTHnSparseD, {axisType, centAxis, ptAxis, invMassAxisReso}); + histos.add("hInvmass_Kstar_Mix", "Invariant mass of unlike-sign chK(892) from mixed event", HistType::kTHnSparseD, {axisType, centAxis, ptAxis, invMassAxisReso}); + + // Mass QA (quick check) + histos.add("QA/before/kstarinvmass", "Invariant mass of unlike-sign chK(892)", HistType::kTH1D, {invMassAxisReso}); + histos.add("QA/before/kstarinvmass_Mix", "Invariant mass of unlike-sign chK(892) from mixed event", HistType::kTH1D, {invMassAxisReso}); + + histos.add("QA/after/KstarRapidity", "Rapidity distribution of chK(892)", HistType::kTH1D, {yAxis}); + histos.add("QA/after/kstarinvmass", "Invariant mass of unlike-sign chK(892)", HistType::kTH1D, {invMassAxisReso}); + histos.add("QA/after/kstarinvmass_Mix", "Invariant mass of unlike-sign chK(892) from mixed event", HistType::kTH1D, {invMassAxisReso}); + + // MC + if (doprocessMC) { + + histos.add("QAMC/hEvent", "Number of Events", HistType::kTH1F, {{1, 0.5, 1.5}}); + // Bachelor pion + histos.add("QAMC/trkbpionDCAxy", "DCAxy distribution of bachelor pion candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QAMC/trkbpionDCAz", "DCAz distribution of bachelor pion candidates", HistType::kTH1D, {dcazAxis}); + histos.add("QAMC/trkbpionpT", "pT distribution of bachelor pion candidates", HistType::kTH1D, {ptAxis}); + histos.add("QAMC/trkbpionTPCPID", "TPC PID of bachelor pion candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trkbpionTOFPID", "TOF PID of bachelor pion candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trkbpionTPCTOFPID", "TPC-TOF PID map of bachelor pion candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + + // Secondary pion 1 + histos.add("QAMC/trkppionDCAxy", "DCAxy distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QAMC/trkppionDCAz", "DCAz distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {dcazAxis}); + histos.add("QAMC/trkppionpT", "pT distribution of secondary pion 1 (positive) candidates", HistType::kTH1D, {ptAxis}); + histos.add("QAMC/trkppionTPCPID", "TPC PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trkppionTOFPID", "TOF PID of secondary pion 1 (positive) candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trkppionTPCTOFPID", "TPC-TOF PID map of secondary pion 1 (positive) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + + // Secondary pion 2 + histos.add("QAMC/trknpionTPCPID", "TPC PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trknpionTOFPID", "TOF PID of secondary pion 2 (negative) candidates", HistType::kTH2D, {ptAxis, pidQAAxis}); + histos.add("QAMC/trknpionTPCTOFPID", "TPC-TOF PID map of secondary pion 2 (negative) candidates", HistType::kTH2D, {pidQAAxis, pidQAAxis}); + histos.add("QAMC/trknpionpT", "pT distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {ptAxis}); + histos.add("QAMC/trknpionDCAxy", "DCAxy distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcaxyAxis}); + histos.add("QAMC/trknpionDCAz", "DCAz distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcazAxis}); + + // Secondary Resonance (K0s cand) + histos.add("QAMC/hDauDCASecondary", "DCA of daughters of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QAMC/hDauPosDCAtoPVSecondary", "Pos DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QAMC/hDauNegDCAtoPVSecondary", "Neg DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); + + histos.add("QAMC/hpT_Secondary", "pT distribution of secondary resonance", HistType::kTH1D, {ptAxis}); + histos.add("QAMC/hy_Secondary", "Rapidity distribution of secondary resonance", HistType::kTH1D, {yAxis}); + histos.add("QAMC/hRadiusSecondary", "Radius distribution of secondary resonance", HistType::kTH1D, {radiusAxis}); + histos.add("QAMC/hCPASecondary", "Cosine pointing angle distribution of secondary resonance", HistType::kTH1D, {cpaAxis}); + histos.add("QAMC/hDCAtoPVSecondary", "DCA to PV distribution of secondary resonance", HistType::kTH1D, {dcaAxis}); + histos.add("QAMC/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); + histos.add("QAMC/hPtAsymSecondary", "pT asymmetry distribution of secondary resonance", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QAMC/hInvmassSecondary", "Invariant mass of unlike-sign secondary resonance", HistType::kTH1D, {invMassAxisK0s}); + + // K892 + histos.add("QAMC/KstarOA", "Opening angle of chK(892)", HistType::kTH1D, {AxisSpec{100, 0, 3.14, "Opening angle"}}); + histos.add("QAMC/KstarPairAsym", "Pair asymmetry of chK(892)", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QAMC/KstarRapidity", "Rapidity distribution of chK(892)", HistType::kTH1D, {yAxis}); + + histos.add("QAMC/kstarinvmass", "Invariant mass of unlike-sign chK(892)", HistType::kTH1D, {invMassAxisReso}); + histos.add("QAMC/kstarinvmass_noKstar", "Invariant mass of unlike-sign no chK(892)", HistType::kTH1D, {invMassAxisReso}); + + histos.add("hInvmass_Kstar_MC", "Invariant mass of unlike chK(892)", HistType::kTHnSparseD, {axisType, centAxis, ptAxis, invMassAxisReso}); + + ccdb->setURL(cfgURL); + ccdbApi.init("http://alice-ccdb.cern.ch"); + ccdb->setCaching(true); + ccdb->setLocalObjectValidityChecking(); + ccdb->setCreatedNotAfter(std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count()); + } + + // Print output histograms statistics + LOG(info) << "Size of the histograms in chK(892) Analysis Task"; + histos.print(); + } + + template + float GetCentrality(CollisionType const& collision) + { + if (cfgCentEst == 1) { + return collision.multFT0C(); + } else if (cfgCentEst == 2) { + return collision.multFT0M(); + } else { + return -999; + } + } + + template + int GetDetId(DetNameType const& name) + { + LOGF(info, "GetDetID running"); + if (name.value == "FT0C") { + return 0; + } else if (name.value == "FT0A") { + return 1; + } else if (name.value == "FT0M") { + return 2; + } else if (name.value == "FV0A") { + return 3; + } else if (name.value == "TPCpos") { + return 4; + } else if (name.value == "TPCneg") { + return 5; + } else { + return false; + } + } + + // Track selection + template + bool trackCut(TrackType const& track) + { + // basic track cuts + if (std::abs(track.pt()) < cMinPtcut) + return false; + if (std::abs(track.eta()) > cMaxEtacut) + return false; + if (track.itsNCls() < cfgITScluster) + return false; + if (track.tpcNClsFound() < cfgTPCcluster) + return false; + if (track.tpcCrossedRowsOverFindableCls() < cfgRatioTPCRowsOverFindableCls) + return false; + if (track.itsChi2NCl() >= cfgITSChi2NCl) + return false; + if (track.tpcChi2NCl() >= cfgTPCChi2NCl) + return false; + if (cfgHasITS && !track.hasITS()) + return false; + if (cfgHasTPC && !track.hasTPC()) + return false; + if (cfgHasTOF && !track.hasTOF()) + return false; + if (cfgUseITSRefit && !track.passedITSRefit()) + return false; + if (cfgUseTPCRefit && !track.passedTPCRefit()) + return false; + if (cfgPVContributor && !track.isPVContributor()) + return false; + if (cfgGlobalWoDCATrack && !track.isGlobalTrackWoDCA()) + return false; + if (cfgGlobalTrack && !track.isGlobalTrack()) + return false; + if (cfgPrimaryTrack && !track.isPrimaryTrack()) + return false; + if (std::abs(track.dcaXY()) > cMaxbDCArToPVcut) + return false; + if (std::abs(track.dcaZ()) > cMaxbDCAzToPVcut) + return false; + return true; + } + + // PID selection tools + template + bool selectionPIDPion(TrackType const& candidate) + { + bool tpcPIDPassed{false}, tofPIDPassed{false}; + + if (cTPConly) { + + if (std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion) { + tpcPIDPassed = true; + } else { + return false; + } + tofPIDPassed = true; + + } else { + + if (std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion) { + tpcPIDPassed = true; + } else { + return false; + } + if (candidate.hasTOF()) { + if (std::abs(candidate.tofNSigmaPi()) < cMaxTOFnSigmaPion) { + tofPIDPassed = true; + } + if ((nsigmaCutCombinedPion > 0) && (candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi() + candidate.tofNSigmaPi() * candidate.tofNSigmaPi() < nsigmaCutCombinedPion * nsigmaCutCombinedPion)) { + tofPIDPassed = true; + } + } else { + if (!cTOFVeto) { + return false; + } + tofPIDPassed = true; + } + } + + if (tpcPIDPassed && tofPIDPassed) { + return true; + } + return false; + } + + template + bool selectionK0s(CollisionType const& collision, K0sType const& candidate) + { + auto DauDCA = candidate.dcaV0daughters(); + auto DauPosDCAtoPV = candidate.dcapostopv(); + auto DauNegDCAtoPV = candidate.dcanegtopv(); + auto pT = candidate.pt(); + auto Rapidity = candidate.yK0Short(); + auto Radius = candidate.v0radius(); + auto DCAtoPV = candidate.dcav0topv(); + auto CPA = candidate.v0cosPA(); + auto PropTauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassK0Short; + auto mK0s = candidate.mK0Short(); + + if (cfgReturnFlag) { + bool returnFlag = true; + + if (cSecondaryRequire) { + histos.fill(HIST("QA/K0sCutCheck"), 0); + if (DauDCA > cSecondaryDauDCAMax) { + histos.fill(HIST("QA/K0sCutCheck"), 1); + returnFlag = false; + } + if (DauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 2); + returnFlag = false; + } + if (DauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 3); + returnFlag = false; + } + if (pT < cSecondaryPtMin) { + histos.fill(HIST("QA/K0sCutCheck"), 4); + returnFlag = false; + } + if (Rapidity > cSecondaryRapidityMax) { + histos.fill(HIST("QA/K0sCutCheck"), 5); + returnFlag = false; + } + if (Radius < cSecondaryRadiusMin) { + histos.fill(HIST("QA/K0sCutCheck"), 6); + returnFlag = false; + } + if (DCAtoPV > cSecondaryDCAtoPVMax) { + histos.fill(HIST("QA/K0sCutCheck"), 7); + returnFlag = false; + } + if (CPA < cSecondaryCosPAMin) { + histos.fill(HIST("QA/K0sCutCheck"), 8); + returnFlag = false; + } + if (PropTauK0s > cSecondaryProperLifetimeMax) { + histos.fill(HIST("QA/K0sCutCheck"), 9); + returnFlag = false; + } + if (candidate.qtarm() < cSecondaryparamArmenterosCut * TMath::Abs(candidate.alpha())) { + histos.fill(HIST("QA/K0sCutCheck"), 11); + returnFlag = false; + } + if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + returnFlag = false; + } + + return returnFlag; + + } else { + if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + returnFlag = false; + } + + return returnFlag; + } + + } else { + if (cSecondaryRequire) { + + histos.fill(HIST("QA/K0sCutCheck"), 0); + if (DauDCA > cSecondaryDauDCAMax) { + histos.fill(HIST("QA/K0sCutCheck"), 1); + return false; + } + if (DauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 2); + return false; + } + if (DauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 3); + return false; + } + if (pT < cSecondaryPtMin) { + histos.fill(HIST("QA/K0sCutCheck"), 4); + return false; + } + if (Rapidity > cSecondaryRapidityMax) { + histos.fill(HIST("QA/K0sCutCheck"), 5); + return false; + } + if (Radius < cSecondaryRadiusMin) { + histos.fill(HIST("QA/K0sCutCheck"), 6); + return false; + } + if (DCAtoPV > cSecondaryDCAtoPVMax) { + histos.fill(HIST("QA/K0sCutCheck"), 7); + return false; + } + if (CPA < cSecondaryCosPAMin) { + histos.fill(HIST("QA/K0sCutCheck"), 8); + return false; + } + if (PropTauK0s > cSecondaryProperLifetimeMax) { + histos.fill(HIST("QA/K0sCutCheck"), 9); + return false; + } + if (candidate.qtarm() < cSecondaryparamArmenterosCut * TMath::Abs(candidate.alpha())) { + histos.fill(HIST("QA/K0sCutCheck"), 11); + return false; + } + if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + return false; + } + return true; + + } else { + if (fabs(mK0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + return false; + } + return true; + } + } + } // selectionK0s + + double GetPhiInRange(double phi) + { + double result = phi; + while (result < 0) { + result = result + 2. * TMath::Pi() / 2; + } + while (result > 2. * TMath::Pi() / 2) { + result = result - 2. * TMath::Pi() / 2; + } + return result; + } + + template + bool isTrueKstar(const TrackTemplate& bTrack, const V0Template& K0scand) + { + if (abs(bTrack.PDGCode()) != kPiPlus) // Are you pion? + return false; + if (abs(K0scand.PDGCode()) != kPDGK0s) // Are you K0s? + return false; + + auto motherbTrack = bTrack.template mothers_as(); + auto motherkV0 = K0scand.template mothers_as(); + + // Check bTrack first + if (abs(motherbTrack.pdgCode()) != kKstarPlus) // Are you charged Kstar's daughter? + return false; // Apply first since it's more restrictive + + if (abs(motherkV0.pdgCode()) != 310) // Is it K0s? + return false; + // Check if K0s's mother is K0 (311) + auto motherK0 = motherkV0.template mothers_as(); + if (abs(motherK0.pdgCode()) != 311) + return false; + + // Check if K0's mother is Kstar (323) + auto motherKstar = motherK0.template mothers_as(); + if (abs(motherKstar.pdgCode()) != 323) + return false; + + // Check if bTrack and K0 have the same mother (global index) + if (motherbTrack.globalIndex() != motherK0.globalIndex()) + return false; + + return true; + } + + int count = 0; + + template + void fillHistograms(const CollisionType& collision, const TracksType& dTracks1, const TracksTypeK0s& dTracks2) + { + histos.fill(HIST("QA/before/CentDist"), centrality); + + TLorentzVector lDecayDaughter1, lDecayDaughter2, lResoSecondary, lDecayDaughter_bach, lResoKstar; + std::vector trackIndicies = {}; + std::vector k0sIndicies = {}; + + for (auto& bTrack : dTracks1) { + auto trkbpt = bTrack.pt(); + auto istrkbhasTOF = bTrack.hasTOF(); + auto trkbNSigmaPiTPC = bTrack.tpcNSigmaPi(); + auto trkbNSigmaPiTOF = (istrkbhasTOF) ? bTrack.tofNSigmaPi() : -999.; + + if constexpr (!IsMix) { + // Bachelor pion QA plots + histos.fill(HIST("QA/before/trkbpionTPCPID"), trkbpt, trkbNSigmaPiTPC); + if (istrkbhasTOF) { + histos.fill(HIST("QA/before/trkbpionTOFPID"), trkbpt, trkbNSigmaPiTOF); + histos.fill(HIST("QA/before/trkbpionTPCTOFPID"), trkbNSigmaPiTPC, trkbNSigmaPiTOF); + } + histos.fill(HIST("QA/before/trkbpionpT"), trkbpt); + histos.fill(HIST("QA/before/trkbpionDCAxy"), bTrack.dcaXY()); + histos.fill(HIST("QA/before/trkbpionDCAz"), bTrack.dcaZ()); + } + + if (!trackCut(bTrack)) + continue; + if (!selectionPIDPion(bTrack)) + continue; + + if constexpr (!IsMix) { + // Bachelor pion QA plots after applying cuts + histos.fill(HIST("QA/after/trkbpionTPCPID"), trkbpt, trkbNSigmaPiTPC); + if (istrkbhasTOF) { + histos.fill(HIST("QA/after/trkbpionTOFPID"), trkbpt, trkbNSigmaPiTOF); + histos.fill(HIST("QA/after/trkbpionTPCTOFPID"), trkbNSigmaPiTPC, trkbNSigmaPiTOF); + } + histos.fill(HIST("QA/after/trkbpionpT"), trkbpt); + histos.fill(HIST("QA/after/trkbpionDCAxy"), bTrack.dcaXY()); + histos.fill(HIST("QA/after/trkbpionDCAz"), bTrack.dcaZ()); + } + trackIndicies.push_back(bTrack.index()); + } + + for (auto& K0scand : dTracks2) { + auto posDauTrack = K0scand.template posTrack_as(); + auto negDauTrack = K0scand.template negTrack_as(); + + /// Daughters + // Positve pion + auto trkppt = posDauTrack.pt(); + auto istrkphasTOF = posDauTrack.hasTOF(); + auto trkpNSigmaPiTPC = posDauTrack.tpcNSigmaPi(); + auto trkpNSigmaPiTOF = (istrkphasTOF) ? posDauTrack.tofNSigmaPi() : -999.; + // Negative pion + auto trknpt = negDauTrack.pt(); + auto istrknhasTOF = negDauTrack.hasTOF(); + auto trknNSigmaPiTPC = negDauTrack.tpcNSigmaPi(); + auto trknNSigmaPiTOF = (istrknhasTOF) ? negDauTrack.tofNSigmaPi() : -999.; + + /// K0s + auto trkkDauDCA = K0scand.dcaV0daughters(); + auto trkkDauDCAPostoPV = K0scand.dcapostopv(); + auto trkkDauDCANegtoPV = K0scand.dcanegtopv(); + auto trkkpt = K0scand.pt(); + auto trkky = K0scand.yK0Short(); + auto trkkRadius = K0scand.v0radius(); + auto trkkDCAtoPV = K0scand.dcav0topv(); + auto trkkCPA = K0scand.v0cosPA(); + auto trkkPropTau = K0scand.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassK0Short; + auto trkkMass = K0scand.mK0Short(); + + if constexpr (!IsMix) { + // Seconddary QA plots + histos.fill(HIST("QA/before/trkppionTPCPID"), trkppt, trkpNSigmaPiTPC); + if (istrkphasTOF) { + histos.fill(HIST("QA/before/trkppionTOFPID"), trkppt, trkpNSigmaPiTOF); + histos.fill(HIST("QA/before/trkppionTPCTOFPID"), trkpNSigmaPiTPC, trkpNSigmaPiTOF); + } + histos.fill(HIST("QA/before/trkppionpT"), trkppt); + histos.fill(HIST("QA/before/trkppionDCAxy"), posDauTrack.dcaXY()); + histos.fill(HIST("QA/before/trkppionDCAz"), posDauTrack.dcaZ()); + + histos.fill(HIST("QA/before/trknpionTPCPID"), trknpt, trknNSigmaPiTPC); + if (istrknhasTOF) { + histos.fill(HIST("QA/before/trknpionTOFPID"), trknpt, trknNSigmaPiTOF); + histos.fill(HIST("QA/before/trknpionTPCTOFPID"), trknNSigmaPiTPC, trknNSigmaPiTOF); + } + histos.fill(HIST("QA/before/trknpionpT"), trknpt); + histos.fill(HIST("QA/before/trknpionDCAxy"), negDauTrack.dcaXY()); + histos.fill(HIST("QA/before/trknpionDCAz"), negDauTrack.dcaZ()); + + histos.fill(HIST("QA/before/hDauDCASecondary"), trkkDauDCA); + histos.fill(HIST("QA/before/hDauPosDCAtoPVSecondary"), trkkDauDCAPostoPV); + histos.fill(HIST("QA/before/hDauNegDCAtoPVSecondary"), trkkDauDCANegtoPV); + + histos.fill(HIST("QA/before/hpT_Secondary"), trkkpt); + histos.fill(HIST("QA/before/hy_Secondary"), trkky); + histos.fill(HIST("QA/before/hRadiusSecondary"), trkkRadius); + histos.fill(HIST("QA/before/hDCAtoPVSecondary"), trkkDCAtoPV); + histos.fill(HIST("QA/before/hCPASecondary"), trkkCPA); + histos.fill(HIST("QA/before/hPropTauSecondary"), trkkPropTau); + histos.fill(HIST("QA/before/hInvmassSecondary"), trkkMass); + } + + // if (!trackCut(posDauTrack) || !trackCut(negDauTrack)) // Too tight cut for K0s daugthers + // continue; + if (!cfgByPassDauPIDSelection && !selectionPIDPion(posDauTrack)) // Perhaps it's already applied in trackCut (need to check QA plots) + continue; + if (!cfgByPassDauPIDSelection && !selectionPIDPion(negDauTrack)) + continue; + if (!selectionK0s(collision, K0scand)) + continue; + + if constexpr (!IsMix) { + // Seconddary QA plots after applying cuts + + histos.fill(HIST("QA/after/trkppionTPCPID"), trkppt, trkpNSigmaPiTPC); + if (istrkphasTOF) { + histos.fill(HIST("QA/after/trkppionTOFPID"), trkppt, trkpNSigmaPiTOF); + histos.fill(HIST("QA/after/trkppionTPCTOFPID"), trkpNSigmaPiTPC, trkpNSigmaPiTOF); + } + histos.fill(HIST("QA/after/trkppionpT"), trkppt); + histos.fill(HIST("QA/after/trkppionDCAxy"), posDauTrack.dcaXY()); + histos.fill(HIST("QA/after/trkppionDCAz"), posDauTrack.dcaZ()); + + histos.fill(HIST("QA/after/trknpionTPCPID"), trknpt, trknNSigmaPiTPC); + if (istrknhasTOF) { + histos.fill(HIST("QA/after/trknpionTOFPID"), trknpt, trknNSigmaPiTOF); + histos.fill(HIST("QA/after/trknpionTPCTOFPID"), trknNSigmaPiTPC, trknNSigmaPiTOF); + } + histos.fill(HIST("QA/after/trknpionpT"), trknpt); + histos.fill(HIST("QA/after/trknpionDCAxy"), negDauTrack.dcaXY()); + histos.fill(HIST("QA/after/trknpionDCAz"), negDauTrack.dcaZ()); + + histos.fill(HIST("QA/after/hDauDCASecondary"), trkkDauDCA); + histos.fill(HIST("QA/after/hDauPosDCAtoPVSecondary"), trkkDauDCAPostoPV); + histos.fill(HIST("QA/after/hDauNegDCAtoPVSecondary"), trkkDauDCANegtoPV); + + histos.fill(HIST("QA/after/hpT_Secondary"), trkkpt); + histos.fill(HIST("QA/after/hy_Secondary"), trkky); + histos.fill(HIST("QA/after/hRadiusSecondary"), trkkRadius); + histos.fill(HIST("QA/after/hDCAtoPVSecondary"), trkkDCAtoPV); + histos.fill(HIST("QA/after/hCPASecondary"), trkkCPA); + histos.fill(HIST("QA/after/hPropTauSecondary"), trkkPropTau); + histos.fill(HIST("QA/after/hInvmassSecondary"), trkkMass); + } + k0sIndicies.push_back(K0scand.index()); + } + + for (auto& trackIndex : trackIndicies) { + for (auto& k0sIndex : k0sIndicies) { + auto bTrack = dTracks1.rawIteratorAt(trackIndex); + auto K0scand = dTracks2.rawIteratorAt(k0sIndex); + + lDecayDaughter_bach.SetXYZM(bTrack.px(), bTrack.py(), bTrack.pz(), MassPionCharged); + lResoSecondary.SetXYZM(K0scand.px(), K0scand.py(), K0scand.pz(), MassK0Short); + lResoKstar = lResoSecondary + lDecayDaughter_bach; + + // QA plots + if constexpr (!IsMix) { + histos.fill(HIST("QA/before/KstarRapidity"), lResoKstar.Rapidity()); + histos.fill(HIST("QA/before/kstarinvmass"), lResoKstar.M()); + } + + if (lResoKstar.Rapidity() > cKstarMaxRap || lResoKstar.Rapidity() < cKstarMinRap) + continue; + + if constexpr (!IsMix) { + unsigned int typeKstar = bTrack.sign() > 0 ? binType::kKstarP : binType::kKstarN; + + histos.fill(HIST("QA/after/KstarRapidity"), lResoKstar.Rapidity()); + histos.fill(HIST("QA/after/kstarinvmass"), lResoKstar.M()); + histos.fill(HIST("hInvmass_Kstar"), typeKstar, centrality, lResoKstar.Pt(), lResoKstar.M()); + + } // IsMix + } // K0scand + } // bTrack + + count++; + + } // fillHistograms + + // process data + void processData(EventCandidates::iterator const& collision, + TrackCandidates const& tracks, + V0Candidates const& v0s, + aod::BCsWithTimestamps const&) + { + if (!colCuts.isSelected(collision)) // Default event selection + return; + colCuts.fillQA(collision); + centrality = GetCentrality(collision); + + fillHistograms(collision, tracks, v0s); // second order + } + PROCESS_SWITCH(chk892pp, processData, "Process Event for data without Partitioning", true); + + // process MC reconstructed level + void processMC(EventCandidates::iterator const& collision, + MCTrackCandidates const& tracks, + MCV0Candidates const& v0s) + { + + histos.fill(HIST("QAMC/hEvent"), 1.0); + + fillHistograms(collision, tracks, v0s); + } + PROCESS_SWITCH(chk892pp, processMC, "Process Event for MC", false); +}; +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"lf-chk892pp"})}; +} diff --git a/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx b/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx index 31d72363498..8d2f04c7ee2 100644 --- a/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx +++ b/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx @@ -26,6 +26,9 @@ #include "Framework/AnalysisTask.h" #include "Framework/ASoAHelpers.h" #include "Framework/runDataProcessing.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/StepTHn.h" +#include "Common/Core/trackUtilities.h" #include "PWGLF/DataModel/ReducedF1ProtonTables.h" #include "CommonConstants/PhysicsConstants.h" @@ -39,28 +42,43 @@ struct f1protoncorrelation { // PID selection Configurable nsigmaCutTPC{"nsigmacutTPC", 3.0, "Value of the TPC Nsigma cut"}; Configurable nsigmaCutCombined{"nsigmaCutCombined", 3.0, "Value of the TOF Nsigma cut"}; + Configurable typeofCombined{"typeofCombined", 1, "type of combined"}; // PID selection + Configurable fillSparse{"fillSparse", 1, "Fill Sparse"}; Configurable fillRotation{"fillRotation", 1, "Fill rotation"}; + Configurable pdepPID{"pdepPID", 1, "Momentum dependent pi, k PID"}; Configurable strategyPIDPion{"strategyPIDPion", 0, "PID strategy Pion"}; Configurable strategyPIDKaon{"strategyPIDKaon", 0, "PID strategy Kaon"}; Configurable maxKKS0Mass{"maxKKS0Mass", 1.025, "Maximum kaon kshort mass"}; Configurable maxMomentumPion{"maxMomentumPion", 4.0, "Maximum momentum Pion"}; Configurable maxMomentumKaon{"maxMomentumKaon", 4.0, "Maximum momentum Kaon"}; - Configurable momentumTOFPion{"momentumTOFPion", 0.8, "Pion momentum TOF"}; - Configurable momentumTOFKaon{"momentumTOFKaon", 0.8, "Kaon momentum TOF"}; + Configurable momentumTOFPionMin{"momentumTOFPionMin", 0.8, "Pion momentum TOF Min"}; + Configurable momentumTOFKaonMin{"momentumTOFKaonMin", 0.8, "Kaon momentum TOF Min"}; + Configurable momentumTOFPionMax{"momentumTOFPionMax", 1.2, "Pion momentum TOF Max"}; + Configurable momentumTOFKaonMax{"momentumTOFKaonMax", 1.2, "Kaon momentum TOF Max"}; Configurable momentumTOFProton{"momentumTOFProton", 0.7, "Proton momentum TOF"}; + Configurable momentumProtonMax{"momentumProtonMax", 3.0, "Maximum proton momentum"}; Configurable lowPtF1{"lowPtF1", 1.0, "PT cut F1"}; // Event Mixing - Configurable nEvtMixing{"nEvtMixing", 1, "Number of events to mix"}; + Configurable nEvtMixing{"nEvtMixing", 10, "Number of events to mix"}; ConfigurableAxis CfgVtxBins{"CfgVtxBins", {10, -10, 10}, "Mixing bins - z-vertex"}; - ConfigurableAxis CfgMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0, 30.0, 40.0, 50.0, 60.0, 80.0, 200.0}, "Mixing bins - number of contributor"}; + ConfigurableAxis CfgMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0, 20.0, 40.0, 60.0, 80.0, 500.0}, "Mixing bins - number of contributor"}; + + // THnsparse bining + ConfigurableAxis configThnAxisInvMass{"configThnAxisInvMass", {100, 1.0, 1.4}, "#it{M} (GeV/#it{c}^{2})"}; + ConfigurableAxis configThnAxisPt{"configThnAxisPt", {100, 0.0, 10.}, "#it{p}_{T} (GeV/#it{c})"}; + ConfigurableAxis configThnAxisKstar{"configThnAxisKstar", {100, 0.0, 1.0}, "#it{k}^{*} (GeV/#it{c})"}; + ConfigurableAxis configThnAxisPtProton{"configThnAxisPtProton", {20, 0.0, 4.}, "#it{p}_{T} (GeV/#it{c})"}; + ConfigurableAxis configThnAxisNsigma{"configThnAxisNsigma", {90, -9.0, 9.0}, "NsigmaCombined"}; // Initialize the ananlysis task void init(o2::framework::InitContext&) { // register histograms - histos.add("hNsigmaProtonTPCSE", "Nsigma Proton TPC distribution same event", kTH2F, {{200, -10.0f, 10.0f}, {100, 0.0f, 1.0f}}); - histos.add("hNsigmaProtonTPCME", "Nsigma Proton TPC distribution mixed event", kTH2F, {{200, -10.0f, 10.0f}, {100, 0.0f, 1.0f}}); + histos.add("hNsigmaProtonTPC", "Nsigma Proton TPC distribution", kTH2F, {{100, -5.0f, 5.0f}, {100, 0.0f, 10.0f}}); + histos.add("hNsigmaKaonTPC", "Nsigma Kaon TPC distribution", kTH2F, {{100, -5.0f, 5.0f}, {100, 0.0f, 10.0f}}); + histos.add("hNsigmaPionTPC", "Nsigma Pion TPC distribution", kTH2F, {{100, -5.0f, 5.0f}, {100, 0.0f, 10.0f}}); + histos.add("hNsigmaPionKaonTPC", "Nsigma Pion Kaon TPC correlation", kTH2F, {{100, -5.0f, 5.0f}, {100, -5.0f, 5.0f}}); histos.add("h2SameEventPtCorrelation", "Pt correlation of F1 and proton", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {100, 0.0, 10.0}}); histos.add("h2SameEventInvariantMassUnlike_mass", "Unlike Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); @@ -70,6 +88,21 @@ struct f1protoncorrelation { histos.add("h2MixEventInvariantMassUnlike_mass", "Unlike Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); histos.add("h2MixEventInvariantMassLike_mass", "Like Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); histos.add("h2MixEventInvariantMassRot_mass", "Rotational Sign Invariant mass of f1 mix event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}}); + + const AxisSpec thnAxisInvMass{configThnAxisInvMass, "#it{M} (GeV/#it{c}^{2})"}; + const AxisSpec thnAxisPt{configThnAxisPt, "#it{p}_{T} (GeV/#it{c})"}; + const AxisSpec thnAxisPtProton{configThnAxisPtProton, "#it{p}_{T} (GeV/#it{c})"}; + const AxisSpec thnAxisKstar{configThnAxisKstar, "#it{k}^{*} (GeV/#it{c})"}; + const AxisSpec thnAxisNsigma{configThnAxisNsigma, "NsigmaCombined"}; + if (fillSparse) { + histos.add("SEMassUnlike", "SEMassUnlike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisPtProton, thnAxisKstar, thnAxisNsigma}); + histos.add("SEMassLike", "SEMassLike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisPtProton, thnAxisKstar, thnAxisNsigma}); + histos.add("SEMassRot", "SEMassRot", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisPtProton, thnAxisKstar, thnAxisNsigma}); + + histos.add("MEMassUnlike", "MEMassUnlike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisPtProton, thnAxisKstar, thnAxisNsigma}); + histos.add("MEMassLike", "MEMassLike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisPtProton, thnAxisKstar, thnAxisNsigma}); + histos.add("MEMassRot", "MEMassRot", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisPtProton, thnAxisKstar, thnAxisNsigma}); + } } // get kstar @@ -94,9 +127,9 @@ struct f1protoncorrelation { trackRelK = PartOneCMS - PartTwoCMS; return 0.5 * trackRelK.P(); } - + float combinedTPC; TLorentzVector F1, Proton, F1ProtonPair, Pion, Kaon, Kshort; - TLorentzVector F1Rot, PionRot, KaonKshortPair; + TLorentzVector F1Rot, PionRot, KaonKshortPair, KaonKshortPairRot; // Process the data in same event void process(aod::RedF1PEvents::iterator const& /*collision*/, aod::F1Tracks const& f1tracks, aod::ProtonTracks const& protontracks) { @@ -109,34 +142,74 @@ struct f1protoncorrelation { Kaon.SetXYZM(f1track.f1d2Px(), f1track.f1d2Py(), f1track.f1d2Pz(), 0.493); Kshort.SetXYZM(f1track.f1d3Px(), f1track.f1d3Py(), f1track.f1d3Pz(), 0.497); KaonKshortPair = Kaon + Kshort; - if (Pion.P() > maxMomentumPion || Kaon.P() > maxMomentumKaon) { + if (Pion.Pt() > maxMomentumPion || Kaon.Pt() > maxMomentumKaon) { continue; } - if (strategyPIDPion == 1 && Pion.P() > momentumTOFPion && f1track.f1d1TOFHit() != 1) { + if (pdepPID) { + if (Kaon.Pt() <= 0.5 && (f1track.f1d2TPC() < -2.5 || f1track.f1d2TPC() > 2.5)) { + continue; + } + if (Kaon.Pt() > 0.5 && Kaon.Pt() <= 0.7 && (f1track.f1d2TPC() < -1.5 || f1track.f1d2TPC() > 2.5)) { + continue; + } + if (Kaon.Pt() > 0.7 && Kaon.Pt() <= 1.0 && (f1track.f1d2TPC() < -1.0 || f1track.f1d2TPC() > 2.5)) { + continue; + } + if (Kaon.Pt() > 1.0 && (f1track.f1d2TPC() < -2.0 || f1track.f1d2TPC() > 2.0)) { + continue; + } + if (Pion.Pt() < 2.0 && (f1track.f1d1TPC() < -2.5 || f1track.f1d1TPC() > 2.5)) { + continue; + } + if (Pion.Pt() > 2.0 && (f1track.f1d1TPC() < -2.0 || f1track.f1d1TPC() > 2.0)) { + continue; + } + } + if (strategyPIDPion == 1 && Pion.Pt() > momentumTOFPionMin && Pion.Pt() <= momentumTOFPionMax && f1track.f1d1TOFHit() != 1) { continue; } - if (strategyPIDKaon == 1 && Kaon.P() > momentumTOFKaon && f1track.f1d2TOFHit() != 1) { + if (strategyPIDKaon == 1 && Kaon.Pt() > momentumTOFKaonMin && Kaon.Pt() <= momentumTOFKaonMax && f1track.f1d2TOFHit() != 1) { continue; } + histos.fill(HIST("hNsigmaKaonTPC"), f1track.f1d2TPC(), Kaon.Pt()); + histos.fill(HIST("hNsigmaPionTPC"), f1track.f1d1TPC(), Pion.Pt()); + histos.fill(HIST("hNsigmaPionKaonTPC"), f1track.f1d1TPC(), f1track.f1d2TPC()); + if (typeofCombined == 0) { + combinedTPC = TMath::Sqrt(f1track.f1d1TPC() * f1track.f1d1TPC() + f1track.f1d2TPC() * f1track.f1d2TPC()); + } + if (typeofCombined == 1) { + combinedTPC = (f1track.f1d1TPC() - f1track.f1d2TPC()) / (f1track.f1d1TPC() + f1track.f1d2TPC()); + } for (auto protontrack : protontracks) { Proton.SetXYZM(protontrack.protonPx(), protontrack.protonPy(), protontrack.protonPz(), 0.938); - if (Proton.P() < momentumTOFProton && TMath::Abs(protontrack.protonNsigmaTPC()) > 3) { + if (Proton.Pt() > momentumProtonMax) { + continue; + } + if (Proton.P() < momentumTOFProton && TMath::Abs(protontrack.protonNsigmaTPC()) > 2.5) { continue; } - if (Proton.P() >= momentumTOFProton && protontrack.protonTOFHit() != 1 && TMath::Abs(protontrack.protonNsigmaTOF()) > 3) { + if (Proton.P() >= momentumTOFProton && (protontrack.protonTOFHit() != 1 || TMath::Abs(protontrack.protonNsigmaTOF()) > 2.5)) { continue; } if ((f1track.f1PionIndex() == protontrack.f1ProtonIndex()) || (f1track.f1KaonIndex() == protontrack.f1ProtonIndex()) || (f1track.f1KshortPositiveIndex() == protontrack.f1ProtonIndex()) || (f1track.f1KshortNegativeIndex() == protontrack.f1ProtonIndex())) { continue; } auto relative_momentum = getkstar(F1, Proton); + if (relative_momentum <= 0.5) { + histos.fill(HIST("hNsigmaProtonTPC"), protontrack.protonNsigmaTPC(), Proton.Pt()); + } histos.fill(HIST("h2SameEventPtCorrelation"), relative_momentum, F1.Pt(), Proton.Pt()); if (f1track.f1SignalStat() == 1) { histos.fill(HIST("h2SameEventInvariantMassUnlike_mass"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - histos.fill(HIST("hNsigmaProtonTPCSE"), protontrack.protonNsigmaTPC(), relative_momentum); + if (fillSparse) { + histos.fill(HIST("SEMassUnlike"), F1.M(), F1.Pt(), Proton.Pt(), relative_momentum, combinedTPC); + } } if (f1track.f1SignalStat() == -1) { histos.fill(HIST("h2SameEventInvariantMassLike_mass"), relative_momentum, F1.Pt(), F1.M()); + if (fillSparse) { + histos.fill(HIST("SEMassLike"), F1.M(), F1.Pt(), Proton.Pt(), relative_momentum, combinedTPC); + } } if (fillRotation) { for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) { @@ -144,13 +217,16 @@ struct f1protoncorrelation { auto angleend = 7.0 * TMath::Pi() / 6.0; auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0)); auto rotangle = anglestart + nrotbkg * anglestep; - auto rotPionPx = f1track.f1d1Px() * std::cos(rotangle) - f1track.f1d1Py() * std::sin(rotangle); - auto rotPionPy = f1track.f1d1Px() * std::sin(rotangle) + f1track.f1d1Py() * std::cos(rotangle); - PionRot.SetXYZM(rotPionPx, rotPionPy, f1track.f1d1Pz(), 0.139); - F1Rot = PionRot + KaonKshortPair; + auto rotKKPx = KaonKshortPair.Px() * std::cos(rotangle) - KaonKshortPair.Py() * std::sin(rotangle); + auto rotKKPy = KaonKshortPair.Px() * std::sin(rotangle) + KaonKshortPair.Py() * std::cos(rotangle); + KaonKshortPairRot.SetXYZM(rotKKPx, rotKKPy, KaonKshortPair.Pz(), KaonKshortPair.M()); + F1Rot = Pion + KaonKshortPairRot; auto relative_momentum_rot = getkstar(F1Rot, Proton); if (f1track.f1SignalStat() == 1) { histos.fill(HIST("h2SameEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M()); + if (fillSparse) { + histos.fill(HIST("SEMassRot"), F1Rot.M(), F1Rot.Pt(), Proton.Pt(), relative_momentum_rot, combinedTPC); + } } } } @@ -159,12 +235,6 @@ struct f1protoncorrelation { } // Processing Event Mixing - // using BinningTypeVtxZT0M = ColumnBinningPolicy; - // for (auto& [collision1, tracks1, collision2, tracks2] : pairs) { - // Pair pairs{colBinning, nEvtMixing, -1, &cache}; // -1 is the number of the bin to skip - // - // tracks1 is an aod::Tracks table of f1tracks belonging to collision collision1 (aod::Collision::iterator) - // tracks2 is an aod::Tracks table of protontracks belonging to collision collision2 (aod::Collision::iterator) SliceCache cache; using BinningType = ColumnBinningPolicy; BinningType colBinning{{CfgVtxBins, CfgMultBins}, true}; @@ -184,9 +254,7 @@ struct f1protoncorrelation { auto groupProton = protontracks.sliceBy(tracksPerCollisionPresliceP, collision2.globalIndex()); // auto groupF1 = f1tracks.sliceByCached(aod::f1protondaughter::redF1PEventId, collision1.globalIndex(), cache); // auto groupProton = protontracks.sliceByCached(aod::f1protondaughter::redF1PEventId, collision2.globalIndex(), cache); - // for (auto& [t1, t2] : soa::combinations(o2::soa::CombinationsFullIndexPolicy(f1tracks, protontracks))) { for (auto& [t1, t2] : soa::combinations(o2::soa::CombinationsFullIndexPolicy(groupF1, groupProton))) { - // LOGF(info, "Mixed event collision1 track1: (%d, %d)", collision1.index(), t1.index()); if (t1.f1MassKaonKshort() > maxKKS0Mass) { continue; } @@ -195,29 +263,63 @@ struct f1protoncorrelation { Kaon.SetXYZM(t1.f1d2Px(), t1.f1d2Py(), t1.f1d2Pz(), 0.493); Kshort.SetXYZM(t1.f1d3Px(), t1.f1d3Py(), t1.f1d3Pz(), 0.497); KaonKshortPair = Kaon + Kshort; - if (Pion.P() > maxMomentumPion || Kaon.P() > maxMomentumKaon) { + if (Pion.Pt() > maxMomentumPion || Kaon.Pt() > maxMomentumKaon) { continue; } - if (strategyPIDPion == 1 && Pion.P() > momentumTOFPion && t1.f1d1TOFHit() != 1) { + if (pdepPID) { + if (Kaon.Pt() <= 0.5 && (t1.f1d2TPC() < -2.5 || t1.f1d2TPC() > 2.5)) { + continue; + } + if (Kaon.Pt() > 0.5 && Kaon.Pt() <= 0.7 && (t1.f1d2TPC() < -1.5 || t1.f1d2TPC() > 2.5)) { + continue; + } + if (Kaon.Pt() > 0.7 && Kaon.Pt() <= 1.0 && (t1.f1d2TPC() < -1.0 || t1.f1d2TPC() > 2.5)) { + continue; + } + if (Kaon.Pt() > 1.0 && (t1.f1d2TPC() < -2.0 || t1.f1d2TPC() > 2.0)) { + continue; + } + if (Pion.Pt() < 2.0 && (t1.f1d1TPC() < -2.5 || t1.f1d1TPC() > 2.5)) { + continue; + } + if (Pion.Pt() > 2.0 && (t1.f1d1TPC() < -2.0 || t1.f1d1TPC() > 2.0)) { + continue; + } + } + if (strategyPIDPion == 1 && Pion.Pt() > momentumTOFPionMin && Pion.Pt() <= momentumTOFPionMax && t1.f1d1TOFHit() != 1) { continue; } - if (strategyPIDKaon == 1 && Kaon.P() > momentumTOFKaon && t1.f1d2TOFHit() != 1) { + if (strategyPIDKaon == 1 && Kaon.Pt() > momentumTOFKaonMin && Kaon.Pt() <= momentumTOFKaonMax && t1.f1d2TOFHit() != 1) { continue; } + if (typeofCombined == 0) { + combinedTPC = TMath::Sqrt(t1.f1d1TPC() * t1.f1d1TPC() + t1.f1d2TPC() * t1.f1d2TPC()); + } + if (typeofCombined == 1) { + combinedTPC = (t1.f1d1TPC() - t1.f1d2TPC()) / (t1.f1d1TPC() + t1.f1d2TPC()); + } Proton.SetXYZM(t2.protonPx(), t2.protonPy(), t2.protonPz(), 0.938); - if (Proton.P() < momentumTOFProton && TMath::Abs(t2.protonNsigmaTPC()) > 3) { + if (Proton.Pt() > momentumProtonMax) { continue; } - if (Proton.P() >= momentumTOFProton && t2.protonTOFHit() != 1 && TMath::Abs(t2.protonNsigmaTOF()) > 3) { + if (Proton.P() < momentumTOFProton && TMath::Abs(t2.protonNsigmaTPC()) > 2.5) { + continue; + } + if (Proton.P() >= momentumTOFProton && (t2.protonTOFHit() != 1 || TMath::Abs(t2.protonNsigmaTOF()) > 2.5)) { continue; } auto relative_momentum = getkstar(F1, Proton); if (t1.f1SignalStat() == 1) { - histos.fill(HIST("h2MixEventInvariantMassUnlike_mass104"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like - histos.fill(HIST("hNsigmaProtonTPCME"), t2.protonNsigmaTPC(), relative_momentum); + histos.fill(HIST("h2MixEventInvariantMassUnlike_mass"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like + if (fillSparse) { + histos.fill(HIST("MEMassUnlike"), F1.M(), F1.Pt(), Proton.Pt(), relative_momentum, combinedTPC); + } } if (t1.f1SignalStat() == -1) { - histos.fill(HIST("h2MixEventInvariantMassLike_mass104"), relative_momentum, F1.Pt(), F1.M()); + histos.fill(HIST("h2MixEventInvariantMassLike_mass"), relative_momentum, F1.Pt(), F1.M()); + if (fillSparse) { + histos.fill(HIST("MEMassLike"), F1.M(), F1.Pt(), Proton.Pt(), relative_momentum, combinedTPC); + } } if (fillRotation) { for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) { @@ -225,13 +327,16 @@ struct f1protoncorrelation { auto angleend = 7.0 * TMath::Pi() / 6.0; auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0)); auto rotangle = anglestart + nrotbkg * anglestep; - auto rotPionPx = t1.f1d1Px() * std::cos(rotangle) - t1.f1d1Py() * std::sin(rotangle); - auto rotPionPy = t1.f1d1Px() * std::sin(rotangle) + t1.f1d1Py() * std::cos(rotangle); - PionRot.SetXYZM(rotPionPx, rotPionPy, t1.f1d1Pz(), 0.139); - F1Rot = PionRot + KaonKshortPair; + auto rotKKPx = KaonKshortPair.Px() * std::cos(rotangle) - KaonKshortPair.Py() * std::sin(rotangle); + auto rotKKPy = KaonKshortPair.Px() * std::sin(rotangle) + KaonKshortPair.Py() * std::cos(rotangle); + KaonKshortPairRot.SetXYZM(rotKKPx, rotKKPy, KaonKshortPair.Pz(), KaonKshortPair.M()); + F1Rot = Pion + KaonKshortPairRot; auto relative_momentum_rot = getkstar(F1Rot, Proton); if (t1.f1SignalStat() == 1) { histos.fill(HIST("h2MixEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M()); + if (fillSparse) { + histos.fill(HIST("MEMassRot"), F1Rot.M(), F1Rot.Pt(), Proton.Pt(), relative_momentum_rot, combinedTPC); + } } } } diff --git a/PWGLF/Tasks/Resonances/KshortKshort.cxx b/PWGLF/Tasks/Resonances/higherMassResonances.cxx similarity index 66% rename from PWGLF/Tasks/Resonances/KshortKshort.cxx rename to PWGLF/Tasks/Resonances/higherMassResonances.cxx index 69e967b2d94..68f0c4652a7 100644 --- a/PWGLF/Tasks/Resonances/KshortKshort.cxx +++ b/PWGLF/Tasks/Resonances/higherMassResonances.cxx @@ -8,10 +8,12 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// + +/// \file higherMassResonances.cxx /// \brief glueball resonance -/// \author Sawan (sawan.sawan@cern.ch) -#include +/// \author Sawan + +// #include #include #include #include @@ -25,6 +27,7 @@ #include #include #include +#include #include "TF1.h" #include "TRandom3.h" #include "Math/Vector3D.h" @@ -55,19 +58,21 @@ using namespace o2::soa; // using namespace o2::constants::physics; using std::array; -struct strangeness_tutorial { +struct HigherMassResonances { SliceCache cache; HistogramRegistry rEventSelection{"eventSelection", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; HistogramRegistry rKzeroShort{"kzeroShort", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; HistogramRegistry hglue{"hglueball", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - - Configurable QAv0{"QAv0", false, "QAv0"}; - Configurable QAPID{"QAPID", true, "QAPID"}; - Configurable QAv0_daughters{"QAv0_daughters", false, "QA of v0 daughters"}; - Configurable QAevents{"QAevents", false, "QA of events"}; - Configurable inv_mass1D{"inv_mass1D", false, "1D invariant mass histograms"}; + HistogramRegistry hMChists{"hMChists", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; + + // PID and QA + Configurable qAv0{"qAv0", false, "qAv0"}; + Configurable qAPID{"qAPID", true, "qAPID"}; + Configurable qAv0Daughters{"qAv0Daughters", false, "QA of v0 daughters"}; + Configurable qAevents{"qAevents", false, "QA of events"}; + Configurable invMass1D{"invMass1D", false, "1D invariant mass histograms"}; Configurable correlation2Dhist{"correlation2Dhist", true, "Lamda K0 mass correlation"}; - Configurable DCAv0topv{"DCAv0topv", false, "DCA V0 to PV"}; + Configurable cDCAv0topv{"cDCAv0topv", false, "DCA V0 to PV"}; Configurable armcut{"armcut", true, "arm cut"}; Configurable globalTracks{"globalTracks", false, "Global tracks"}; Configurable hasTPC{"hasTPC", false, "TPC"}; @@ -81,29 +86,27 @@ struct strangeness_tutorial { Configurable itstpctracks{"itstpctracks", false, "selects collisions with at least one ITS-TPC track,"}; Configurable additionalEvsel{"additionalEvsel", false, "Additional event selcection"}; Configurable applyOccupancyCut{"applyOccupancyCut", false, "Apply occupancy cut"}; - Configurable OccupancyCut{"OccupancyCut", 1000, "Mimimum Occupancy cut"}; + Configurable occupancyCut{"occupancyCut", 1000, "Mimimum Occupancy cut"}; // Configurable parameters for V0 selection - Configurable ConfV0DCADaughMax{"ConfV0DCADaughMax", 1.0f, "DCA b/w V0 daughters"}; - Configurable v0setting_dcapostopv{"v0setting_dcapostopv", 0.06, "DCA Pos To PV"}; - Configurable v0setting_dcanegtopv{"v0setting_dcanegtopv", 0.06, "DCA Neg To PV"}; + Configurable confV0DCADaughMax{"confV0DCADaughMax", 1.0f, "DCA b/w V0 daughters"}; + Configurable v0settingDcapostopv{"v0settingDcapostopv", 0.06, "DCA Pos To PV"}; + Configurable v0settingDcanegtopv{"v0settingDcanegtopv", 0.06, "DCA Neg To PV"}; Configurable cMaxV0DCA{"cMaxV0DCA", 1, "DCA V0 to PV"}; // Configurable isStandarv0{"isStandarv0", false, "Standard V0"}; // Configurable ConfDaughDCAMin{"ConfDaughDCAMin", 0.06f, "V0 Daugh sel: Max. DCA Daugh to PV (cm)"}; // same as DCA pos to pv and neg to pv - - Configurable ConfV0PtMin{"ConfV0PtMin", 0.f, "Minimum transverse momentum of V0"}; - Configurable ConfV0CPAMin{"ConfV0CPAMin", 0.97f, "Minimum CPA of V0"}; - Configurable ConfV0TranRadV0Min{"ConfV0TranRadV0Min", 0.5f, "Minimum transverse radius"}; - Configurable ConfV0TranRadV0Max{"ConfV0TranRadV0Max", 200.f, "Maximum transverse radius"}; + Configurable confV0PtMin{"confV0PtMin", 0.f, "Minimum transverse momentum of V0"}; + Configurable confV0CPAMin{"confV0CPAMin", 0.97f, "Minimum CPA of V0"}; + Configurable confV0TranRadV0Min{"confV0TranRadV0Min", 0.5f, "Minimum transverse radius"}; + Configurable confV0TranRadV0Max{"confV0TranRadV0Max", 200.f, "Maximum transverse radius"}; Configurable cMaxV0LifeTime{"cMaxV0LifeTime", 15, "Maximum V0 life time"}; Configurable cSigmaMassKs0{"cSigmaMassKs0", 4, "n Sigma cut on Ks0 mass (Mass (Ks) - cSigmaMassKs0*cWidthKs0)"}; Configurable cWidthKs0{"cWidthKs0", 0.005, "Width of KS0"}; - Configurable ConfDaughEta{"ConfDaughEta", 0.8f, "V0 Daugh sel: max eta"}; - Configurable ConfDaughTPCnclsMin{"ConfDaughTPCnclsMin", 70.f, "V0 Daugh sel: Min. nCls TPC"}; - Configurable ConfDaughPIDCuts{"ConfDaughPIDCuts", 5, "PID selections for KS0 daughters"}; - Configurable Confarmcut{"Confarmcut", 0.2f, "Armenteros cut"}; - Configurable ConfKsrapidity{"ConfKsrapidity", 0.5f, "Rapidity cut on K0s"}; - + Configurable confDaughEta{"confDaughEta", 0.8f, "V0 Daugh sel: max eta"}; + Configurable confDaughTPCnclsMin{"confDaughTPCnclsMin", 70.f, "V0 Daugh sel: Min. nCls TPC"}; + Configurable confDaughPIDCuts{"confDaughPIDCuts", 5, "PID selections for KS0 daughters"}; + Configurable confarmcut{"confarmcut", 0.2f, "Armenteros cut"}; + Configurable confKsrapidity{"confKsrapidity", 0.5f, "Rapidity cut on K0s"}; // Configurable lowmasscutks0{"lowmasscutks0", 0.497 - 4 * 0.005, "Low mass cut on K0s"}; // Configurable highmasscutks0{"highmasscutks0", 0.497 + 4 * 0.005, "High mass cut on K0s"}; @@ -113,16 +116,20 @@ struct strangeness_tutorial { Configurable cfgMultFOTM{"cfgMultFOTM", true, "Use FOTM multiplicity if pp else use 0 here for PbPb (FT0C)"}; ConfigurableAxis binsCent{"binsCent", {VARIABLE_WIDTH, 0., 5., 10., 30., 50., 70., 100., 110., 150.}, "Binning of the centrality axis"}; + // Configurable for MC + Configurable allGenCollisions{"allGenCollisions", true, "To fill all generated collisions for the signal loss calculations"}; + Configurable cTVXEvsel{"cTVXEvsel", true, "Triggger selection"}; + // output THnSparses Configurable activateTHnSparseCosThStarHelicity{"activateTHnSparseCosThStarHelicity", false, "Activate the THnSparse with cosThStar w.r.t. helicity axis"}; Configurable activateTHnSparseCosThStarProduction{"activateTHnSparseCosThStarProduction", false, "Activate the THnSparse with cosThStar w.r.t. production axis"}; Configurable activateTHnSparseCosThStarBeam{"activateTHnSparseCosThStarBeam", true, "Activate the THnSparse with cosThStar w.r.t. beam axis (Gottified jackson frame)"}; Configurable activateTHnSparseCosThStarRandom{"activateTHnSparseCosThStarRandom", false, "Activate the THnSparse with cosThStar w.r.t. random axis"}; - Configurable c_nof_rotations{"c_nof_rotations", 3, "Number of random rotations in the rotational background"}; + Configurable cRrotations{"cRrotations", 3, "Number of random rotations in the rotational background"}; // Other cuts on Ks and glueball Configurable rapidityks{"rapidityks", true, "rapidity cut on K0s"}; - Configurable apply_competingcut{"apply_competingcut", false, "Competing cascade rejection cut"}; + Configurable applyCompetingcut{"applyCompetingcut", false, "Competing cascade rejection cut"}; Configurable competingcascrejlambda{"competingcascrejlambda", 0.005, "rejecting competing cascade lambda"}; Configurable competingcascrejlambdaanti{"competingcascrejlambdaanti", 0.005, "rejecting competing cascade anti-lambda"}; // If one of the pions is misidentified as a proton, then instead of Ks we reconstruct lambda, therefore the competing cascade rejection cut is applied in which if the reconstrcted mass of a pion and proton (which we are assuming to be misidentified as proton) is close to lambda or anti-lambda, then the track is rejected. Configurable tpcCrossedrows{"tpcCrossedrows", 70, "TPC crossed rows"}; @@ -130,20 +137,20 @@ struct strangeness_tutorial { // Mass and pT axis as configurables Configurable cPtMin{"cPtMin", 0.0f, "Minimum pT"}; - Configurable cPtMax{"cPtMax", 50.0f, "Maximum pT"}; - Configurable cPtBins{"cPtBins", 500, "Number of pT bins"}; + Configurable cPtMax{"cPtMax", 30.0f, "Maximum pT"}; + Configurable cPtBins{"cPtBins", 300, "Number of pT bins"}; Configurable cMassMin{"cMassMin", 0.9f, "Minimum mass of glueball"}; Configurable cMassMax{"cMassMax", 3.0f, "Maximum mass of glueball"}; Configurable cMassBins{"cMassBins", 210, "Number of mass bins for glueball"}; Configurable ksMassMin{"ksMassMin", 0.45f, "Minimum mass of K0s"}; Configurable ksMassMax{"ksMassMax", 0.55f, "Maximum mass of K0s"}; Configurable ksMassBins{"ksMassBins", 200, "Number of mass bins for K0s"}; - Configurable rotational_cut{"rotational_cut", 10, "Cut value (Rotation angle pi - pi/cut and pi + pi/cut)"}; + Configurable rotationalCut{"rotationalCut", 10, "Cut value (Rotation angle pi - pi/cut and pi + pi/cut)"}; ConfigurableAxis configThnAxisPOL{"configThnAxisPOL", {20, -1.0, 1.0}, "Costheta axis"}; ConfigurableAxis axisdEdx{"axisdEdx", {20000, 0.0f, 200.0f}, "dE/dx (a.u.)"}; ConfigurableAxis axisPtfordEbydx{"axisPtfordEbydx", {2000, 0, 20}, "pT (GeV/c)"}; ConfigurableAxis axisMultdist{"axisMultdist", {3500, 0, 70000}, "Multiplicity distribution"}; - ConfigurableAxis occupancy_bins{"occupancy_bins", {VARIABLE_WIDTH, 0.0, 100, 500, 600, 1000, 1100, 1500, 1600, 2000, 2100, 2500, 2600, 3000, 3100, 3500, 3600, 4000, 4100, 4500, 4600, 5000, 5100, 9999}, "Binning of the occupancy axis"}; + ConfigurableAxis occupancyBins{"occupancyBins", {VARIABLE_WIDTH, 0.0, 100, 500, 600, 1000, 1100, 1500, 1600, 2000, 2100, 2500, 2600, 3000, 3100, 3500, 3600, 4000, 4100, 4500, 4600, 5000, 5100, 9999}, "Binning: occupancy axis"}; // Event selection cuts - Alex (Temporary, need to fix!) TF1* fMultPVCutLow = nullptr; @@ -151,20 +158,20 @@ struct strangeness_tutorial { TF1* fMultCutLow = nullptr; TF1* fMultCutHigh = nullptr; TF1* fMultMultPVCut = nullptr; - Service PDGdatabase; + // Service PDGdatabase; TRandom* rn = new TRandom(); void init(InitContext const&) { // Axes - AxisSpec K0ShortMassAxis = {ksMassBins, ksMassMin, ksMassMax, "#it{M}_{inv} [GeV/#it{c}^{2}]"}; + AxisSpec k0ShortMassAxis = {ksMassBins, ksMassMin, ksMassMax, "#it{M}_{inv} [GeV/#it{c}^{2}]"}; AxisSpec glueballMassAxis = {cMassBins, cMassMin, cMassMax, "#it{M}_{inv} [GeV/#it{c}^{2}]"}; AxisSpec vertexZAxis = {60, -15.f, 15.f, "vrtx_{Z} [cm]"}; // for histogram AxisSpec ptAxis = {cPtBins, cPtMin, cPtMax, "#it{p}_{T} (GeV/#it{c})"}; // AxisSpec multiplicityAxis = {110, 0.0f, 150.0f, "Multiplicity Axis"}; AxisSpec multiplicityAxis = {binsCent, "Multiplicity Axis"}; AxisSpec thnAxisPOL{configThnAxisPOL, "Configurabel theta axis"}; - AxisSpec occupancy_axis = {occupancy_bins, "Occupancy [-40,100]"}; + AxisSpec occupancyAxis = {occupancyBins, "Occupancy [-40,100]"}; // THnSparses std::array sparses = {activateTHnSparseCosThStarHelicity, activateTHnSparseCosThStarProduction, activateTHnSparseCosThStarBeam, activateTHnSparseCosThStarRandom}; @@ -189,7 +196,7 @@ struct strangeness_tutorial { } // Event selection - if (QAevents) { + if (qAevents) { rEventSelection.add("hVertexZRec", "hVertexZRec", {HistType::kTH1F, {vertexZAxis}}); rEventSelection.add("hmultiplicity", "multiplicity percentile distribution", {HistType::kTH1F, {{150, 0.0f, 150.0f}}}); rEventSelection.add("multdist_FT0M", "FT0M Multiplicity distribution", kTH1F, {axisMultdist}); @@ -198,15 +205,15 @@ struct strangeness_tutorial { rEventSelection.add("hNcontributor", "Number of primary vertex contributor", kTH1F, {{2000, 0.0f, 10000.0f}}); } - if (inv_mass1D) { + if (invMass1D) { hglue.add("h1glueInvMassDS", "h1glueInvMassDS", kTH1F, {glueballMassAxis}); hglue.add("h1glueInvMassME", "h1glueInvMassME", kTH1F, {glueballMassAxis}); hglue.add("h1glueInvMassRot", "h1glueInvMassRot", kTH1F, {glueballMassAxis}); } - hglue.add("h3glueInvMassDS", "h3glueInvMassDS", kTHnSparseF, {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL, occupancy_axis}, true); - hglue.add("h3glueInvMassME", "h3glueInvMassME", kTHnSparseF, {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL, occupancy_axis}, true); - hglue.add("h3glueInvMassRot", "h3glueInvMassRot", kTHnSparseF, {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL, occupancy_axis}, true); + hglue.add("h3glueInvMassDS", "h3glueInvMassDS", kTHnSparseF, {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL, occupancyAxis}, true); + hglue.add("h3glueInvMassME", "h3glueInvMassME", kTHnSparseF, {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL, occupancyAxis}, true); + hglue.add("h3glueInvMassRot", "h3glueInvMassRot", kTHnSparseF, {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL, occupancyAxis}, true); hglue.add("heventscheck", "heventscheck", kTH1I, {{10, 0, 10}}); hglue.add("htrackscheck_v0", "htrackscheck_v0", kTH1I, {{15, 0, 15}}); hglue.add("htrackscheck_v0_daughters", "htrackscheck_v0_daughters", kTH1I, {{15, 0, 15}}); @@ -225,11 +232,11 @@ struct strangeness_tutorial { rKzeroShort.add("mass_lambda_kshort_after9", "mass under lambda hypotheses and Kshort mass", kTH2F, {{100, 0.2, 0.8}, {100, 0.9, 1.5}}); rKzeroShort.add("mass_lambda_kshort_after10", "mass under lambda hypotheses and Kshort mass", kTH2F, {{100, 0.2, 0.8}, {100, 0.9, 1.5}}); } - if (QAv0) { + if (qAv0) { // Invariant Mass - rKzeroShort.add("hMassK0Shortbefore", "hMassK0Shortbefore", kTHnSparseF, {K0ShortMassAxis, ptAxis}); - rKzeroShort.add("hMasscorrelationbefore", "hMasscorrelationbefore", kTH2F, {K0ShortMassAxis, K0ShortMassAxis}); - rKzeroShort.add("hMassK0ShortSelected", "hMassK0ShortSelected", kTHnSparseF, {K0ShortMassAxis, ptAxis}); + rKzeroShort.add("hMassK0Shortbefore", "hMassK0Shortbefore", kTHnSparseF, {k0ShortMassAxis, ptAxis}); + rKzeroShort.add("hMasscorrelationbefore", "hMasscorrelationbefore", kTH2F, {k0ShortMassAxis, k0ShortMassAxis}); + rKzeroShort.add("hMassK0ShortSelected", "hMassK0ShortSelected", kTHnSparseF, {k0ShortMassAxis, ptAxis}); // Topological histograms (after the selection) rKzeroShort.add("hDCAV0Daughters", "DCA between v0 daughters", {HistType::kTH1F, {{60, -3.0f, 3.0f}}}); rKzeroShort.add("hV0CosPA", "hV0CosPA", {HistType::kTH1F, {{100, 0.96f, 1.1f}}}); @@ -244,7 +251,7 @@ struct strangeness_tutorial { rKzeroShort.add("hv0radius", "hv0radius", kTH1F, {{100, 0.0f, 200.0f}}); rKzeroShort.add("hDCApostopv", "DCA positive daughter to PV", kTH1F, {{1000, -10.0f, 10.0f}}); rKzeroShort.add("hDCAnegtopv", "DCA negative daughter to PV", kTH1F, {{1000, -10.0f, 10.0f}}); - rKzeroShort.add("hDCAv0topv", "DCA V0 to PV", kTH1F, {{60, -3.0f, 3.0f}}); + rKzeroShort.add("hcDCAv0topv", "DCA V0 to PV", kTH1F, {{60, -3.0f, 3.0f}}); rKzeroShort.add("halpha", "Armenteros alpha", kTH1F, {{100, -5.0f, 5.0f}}); rKzeroShort.add("hqtarmbyalpha", "qtarm/alpha", kTH1F, {{100, 0.0f, 1.0f}}); rKzeroShort.add("hpsipair", "psi pair angle", kTH1F, {{100, -5.0f, 5.0f}}); @@ -255,14 +262,14 @@ struct strangeness_tutorial { // rKzeroShort.add("hV0CosPA_before", "hV0CosPA_before", {HistType::kTH1F, {{200, 0.91f, 1.1f}}}); // rKzeroShort.add("hLT_before", "hLT_before", {HistType::kTH1F, {{100, 0.0f, 50.0f}}}); } - if (QAPID) { + if (qAPID) { rKzeroShort.add("hNSigmaPosPionK0s_before", "hNSigmaPosPionK0s_before", {HistType::kTH2F, {{ptAxis}, {100, -5.f, 5.f}}}); // rKzeroShort.add("hNSigmaPosPionK0s_after", "hNSigmaPosPionK0s_after", {HistType::kTH2F, {{ptAxis}, {100, -5.f, 5.f}}}); rKzeroShort.add("hNSigmaNegPionK0s_before", "hNSigmaNegPionK0s_before", {HistType::kTH2F, {{ptAxis}, {100, -5.f, 5.f}}}); // rKzeroShort.add("hNSigmaNegPionK0s_after", "hNSigmaNegPionK0s_after", {HistType::kTH2F, {{ptAxis}, {100, -5.f, 5.f}}}); rKzeroShort.add("dE_by_dx_TPC", "dE/dx signal in the TPC as a function of pT", kTH2F, {axisPtfordEbydx, axisdEdx}); } - if (QAv0_daughters) { + if (qAv0Daughters) { rKzeroShort.add("negative_pt", "Negative daughter pT", kTH1F, {ptAxis}); rKzeroShort.add("positive_pt", "Positive daughter pT", kTH1F, {ptAxis}); rKzeroShort.add("negative_eta", "Negative daughter eta", kTH1F, {{100, -1.0f, 1.0f}}); @@ -270,6 +277,19 @@ struct strangeness_tutorial { rKzeroShort.add("negative_phi", "Negative daughter phi", kTH1F, {{70, 0.0f, 7.0f}}); rKzeroShort.add("positive_phi", "Positive daughter phi", kTH1F, {{70, 0.0f, 7.0f}}); } + + // For MC + hMChists.add("events_check", "No. of events in the generated MC", kTH1I, {{20, 0, 20}}); + hMChists.add("events_checkrec", "No. of events in the reconstructed MC", kTH1I, {{20, 0, 20}}); + hMChists.add("Genf1710", "Gen f_{0}(1710)", kTH1F, {ptAxis}); + hMChists.add("Recf1710_pt1", "Rec f_{0}(1710) p_{T}", kTH1F, {ptAxis}); + hMChists.add("Recf1710_pt2", "Rec f_{0}(1710) p_{T}", kTH1F, {ptAxis}); + hMChists.add("Recf1710_p", "Rec f_{0}(1710) p", kTH1F, {ptAxis}); + hMChists.add("Recf1710_mass", "Rec f_{0}(1710) mass", kTH1F, {glueballMassAxis}); + hMChists.add("Genf1710_mass", "Gen f_{0}(1710) mass", kTH1F, {glueballMassAxis}); + hMChists.add("MC_mult", "Multiplicity in MC", kTH1F, {multiplicityAxis}); + hMChists.add("MC_mult_after_event_sel", "Multiplicity in MC", kTH1F, {multiplicityAxis}); + if (additionalEvsel) { fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x - 2.5*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100); fMultPVCutLow->SetParameters(2834.66, -87.0127, 0.915126, -0.00330136, 332.513, -12.3476, 0.251663, -0.00272819, 1.12242e-05); @@ -328,8 +348,7 @@ struct strangeness_tutorial { } template - bool SelectionV0(Collision const& collision, V0 const& candidate, - float /*multiplicity*/) + bool selectionV0(Collision const& collision, V0 const& candidate, float /*multiplicity*/) { const float qtarm = candidate.qtarm(); const float alph = candidate.alpha(); @@ -339,15 +358,15 @@ struct strangeness_tutorial { const float dcaDaughv0 = candidate.dcaV0daughters(); const float cpav0 = candidate.v0cosPA(); - float CtauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * PDGdatabase->Mass(310); + float ctauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassK0Short; float lowmasscutks0 = 0.497 - cWidthKs0 * cSigmaMassKs0; float highmasscutks0 = 0.497 + cWidthKs0 * cSigmaMassKs0; // float decayLength = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::sqrtSumOfSquares(candidate.px(), candidate.py(), candidate.pz()); - if (QAv0) { + if (qAv0) { rKzeroShort.fill(HIST("hMassK0Shortbefore"), candidate.mK0Short(), candidate.pt()); rKzeroShort.fill(HIST("hMasscorrelationbefore"), candidate.mK0Short(), candidate.mK0Short()); - rKzeroShort.fill(HIST("hLT"), CtauK0s); + rKzeroShort.fill(HIST("hLT"), ctauK0s); rKzeroShort.fill(HIST("hDCAV0Daughters"), candidate.dcaV0daughters()); rKzeroShort.fill(HIST("hV0CosPA"), candidate.v0cosPA()); rKzeroShort.fill(HIST("Mass_lambda"), candidate.mLambda()); @@ -359,7 +378,7 @@ struct strangeness_tutorial { rKzeroShort.fill(HIST("hv0radius"), candidate.v0radius()); rKzeroShort.fill(HIST("hDCApostopv"), candidate.dcapostopv()); rKzeroShort.fill(HIST("hDCAnegtopv"), candidate.dcanegtopv()); - rKzeroShort.fill(HIST("hDCAv0topv"), candidate.dcav0topv()); + rKzeroShort.fill(HIST("hcDCAv0topv"), candidate.dcav0topv()); rKzeroShort.fill(HIST("halpha"), candidate.alpha()); rKzeroShort.fill(HIST("hqtarmbyalpha"), arm); rKzeroShort.fill(HIST("hpsipair"), candidate.psipair()); @@ -369,77 +388,78 @@ struct strangeness_tutorial { hglue.fill(HIST("htrackscheck_v0"), 0.5); - if (DCAv0topv && fabs(candidate.dcav0topv()) > cMaxV0DCA) { + if (cDCAv0topv && std::fabs(candidate.dcav0topv()) > cMaxV0DCA) { return false; } hglue.fill(HIST("htrackscheck_v0"), 1.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after1"), candidate.mK0Short(), candidate.mLambda()); - if (rapidityks && TMath::Abs(candidate.yK0Short()) >= ConfKsrapidity) { + if (rapidityks && std::abs(candidate.yK0Short()) >= confKsrapidity) { return false; } hglue.fill(HIST("htrackscheck_v0"), 2.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after2"), candidate.mK0Short(), candidate.mLambda()); - if (pT < ConfV0PtMin) { + if (pT < confV0PtMin) { return false; } hglue.fill(HIST("htrackscheck_v0"), 3.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after3"), candidate.mK0Short(), candidate.mLambda()); - if (dcaDaughv0 > ConfV0DCADaughMax) { + if (dcaDaughv0 > confV0DCADaughMax) { return false; } hglue.fill(HIST("htrackscheck_v0"), 4.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after4"), candidate.mK0Short(), candidate.mLambda()); - if (cpav0 < ConfV0CPAMin) { + if (cpav0 < confV0CPAMin) { return false; } hglue.fill(HIST("htrackscheck_v0"), 5.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after5"), candidate.mK0Short(), candidate.mLambda()); - if (tranRad < ConfV0TranRadV0Min) { + if (tranRad < confV0TranRadV0Min) { return false; } hglue.fill(HIST("htrackscheck_v0"), 6.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after6"), candidate.mK0Short(), candidate.mLambda()); - if (tranRad > ConfV0TranRadV0Max) { + if (tranRad > confV0TranRadV0Max) { return false; } hglue.fill(HIST("htrackscheck_v0"), 7.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after7"), candidate.mK0Short(), candidate.mLambda()); - if (fabs(CtauK0s) > cMaxV0LifeTime) { + if (std::fabs(ctauK0s) > cMaxV0LifeTime) { return false; } hglue.fill(HIST("htrackscheck_v0"), 8.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after8"), candidate.mK0Short(), candidate.mLambda()); - if (armcut && arm < Confarmcut) { + if (armcut && arm < confarmcut) { return false; } hglue.fill(HIST("htrackscheck_v0"), 9.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after9"), candidate.mK0Short(), candidate.mLambda()); - if (apply_competingcut && (TMath::Abs(candidate.mLambda() - PDGdatabase->Mass(3122)) <= competingcascrejlambda || TMath::Abs(candidate.mAntiLambda() - PDGdatabase->Mass(-3122)) <= competingcascrejlambdaanti)) { + // if (applyCompetingcut && (std::abs(candidate.mLambda() - PDGdatabase->Mass(3122)) <= competingcascrejlambda || std::abs(candidate.mAntiLambda() - PDGdatabase->Mass(-3122)) <= competingcascrejlambdaanti)) + if (applyCompetingcut && (std::abs(candidate.mLambda() - o2::constants::physics::MassLambda0) <= competingcascrejlambda || std::abs(candidate.mAntiLambda() - o2::constants::physics::MassLambda0) <= competingcascrejlambdaanti)) { return false; } hglue.fill(HIST("htrackscheck_v0"), 10.5); if (correlation2Dhist) rKzeroShort.fill(HIST("mass_lambda_kshort_after10"), candidate.mK0Short(), candidate.mLambda()); - if (QAv0) { + if (qAv0) { rKzeroShort.fill(HIST("hMassK0ShortSelected"), candidate.mK0Short(), candidate.pt()); // rKzeroShort.fill(HIST("mass_lambda_kshort_after"), candidate.mK0Short(), candidate.mLambda()); } @@ -453,7 +473,7 @@ struct strangeness_tutorial { template bool isSelectedV0Daughter(T const& track, float charge, double nsigmaV0Daughter, V0s const& /*candidate*/) { - if (QAPID) { + if (qAPID) { // Filling the PID of the V0 daughters in the region of the K0 peak. (charge == 1) ? rKzeroShort.fill(HIST("hNSigmaPosPionK0s_before"), track.tpcInnerParam(), track.tpcNSigmaPi()) : rKzeroShort.fill(HIST("hNSigmaNegPionK0s_before"), track.tpcInnerParam(), track.tpcNSigmaPi()); rKzeroShort.fill(HIST("dE_by_dx_TPC"), track.p(), track.tpcSignal()); @@ -477,7 +497,7 @@ struct strangeness_tutorial { return false; hglue.fill(HIST("htrackscheck_v0_daughters"), 3.5); - if (tpcNClsF < ConfDaughTPCnclsMin) { + if (tpcNClsF < confDaughTPCnclsMin) { return false; } hglue.fill(HIST("htrackscheck_v0_daughters"), 4.5); @@ -497,12 +517,12 @@ struct strangeness_tutorial { } hglue.fill(HIST("htrackscheck_v0_daughters"), 6.5); - if (std::abs(eta) > ConfDaughEta) { + if (std::abs(eta) > confDaughEta) { return false; } hglue.fill(HIST("htrackscheck_v0_daughters"), 7.5); - if (std::abs(nsigmaV0Daughter) > ConfDaughPIDCuts) { + if (std::abs(nsigmaV0Daughter) > confDaughPIDCuts) { return false; } hglue.fill(HIST("htrackscheck_v0_daughters"), 8.5); @@ -513,17 +533,21 @@ struct strangeness_tutorial { // Defining filters for events (event selection) // Filter eventFilter = (o2::aod::evsel::sel8 == true); Filter posZFilter = (nabs(o2::aod::collision::posZ) < cutzvertex); - Filter AcceptenceFilter = (nabs(aod::track::eta) < cfgETAcut && nabs(aod::track::pt) > cfgPTcut); + Filter acceptenceFilter = (nabs(aod::track::eta) < cfgETAcut && nabs(aod::track::pt) > cfgPTcut); // Filters on V0s - Filter preFilterV0 = (nabs(aod::v0data::dcapostopv) > v0setting_dcapostopv && - nabs(aod::v0data::dcanegtopv) > v0setting_dcanegtopv); + Filter preFilterV0 = (nabs(aod::v0data::dcapostopv) > v0settingDcapostopv && + nabs(aod::v0data::dcanegtopv) > v0settingDcanegtopv); // Defining the type of the daughter tracks using DaughterTracks = soa::Join; using EventCandidates = soa::Filtered>; using TrackCandidates = soa::Filtered>; using V0TrackCandidate = aod::V0Datas; + // For Monte Carlo + using EventCandidatesMC = soa::Join; + using TrackCandidatesMC = soa::Filtered>; + using V0TrackCandidatesMC = soa::Join; // void processSE(soa::Filtered>::iterator const& collision, // soa::Filtered const& V0s, @@ -531,10 +555,12 @@ struct strangeness_tutorial { ROOT::Math::PxPyPzMVector daughter1, daughter2; ROOT::Math::PxPyPzMVector lv3; + // int counter3 = 0; void processSE(EventCandidates::iterator const& collision, TrackCandidates const& /*tracks*/, aod::V0Datas const& V0s) { hglue.fill(HIST("heventscheck"), 0.5); - const double massK0s = TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass(); + // const double massK0s = TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass(); + const double massK0s = o2::constants::physics::MassK0Short; float multiplicity = 0.0f; if (cfgMultFOTM) { multiplicity = collision.centFT0M(); @@ -545,12 +571,12 @@ struct strangeness_tutorial { return; } - auto occupancy_no = collision.trackOccupancyInTimeRange(); - if (applyOccupancyCut && occupancy_no < OccupancyCut) { + auto occupancyNumber = collision.trackOccupancyInTimeRange(); + if (applyOccupancyCut && occupancyNumber < occupancyCut) { return; } - if (QAevents) { + if (qAevents) { rEventSelection.fill(HIST("hVertexZRec"), collision.posZ()); rEventSelection.fill(HIST("hmultiplicity"), multiplicity); rEventSelection.fill(HIST("multdist_FT0M"), collision.multFT0M()); @@ -561,16 +587,16 @@ struct strangeness_tutorial { std::vector v0indexes; - for (auto& [v1, v2] : combinations(CombinationsUpperIndexPolicy(V0s, V0s))) { + for (const auto& [v1, v2] : combinations(CombinationsUpperIndexPolicy(V0s, V0s))) { if (v1.size() == 0 || v2.size() == 0) { continue; } - if (!SelectionV0(collision, v1, multiplicity)) { + if (!selectionV0(collision, v1, multiplicity)) { continue; } - if (!SelectionV0(collision, v2, multiplicity)) { + if (!selectionV0(collision, v2, multiplicity)) { continue; } @@ -591,7 +617,7 @@ struct strangeness_tutorial { continue; } - if (QAv0_daughters) { + if (qAv0Daughters) { rKzeroShort.fill(HIST("negative_pt"), negtrack1.pt()); rKzeroShort.fill(HIST("positive_pt"), postrack1.pt()); rKzeroShort.fill(HIST("negative_eta"), negtrack1.eta()); @@ -640,72 +666,78 @@ struct strangeness_tutorial { ROOT::Math::PxPyPzMVector fourVecDau = ROOT::Math::PxPyPzMVector(daughter1.Px(), daughter1.Py(), daughter1.Pz(), massK0s); // Kshort - ROOT::Math::PxPyPzMVector fourVecMother = ROOT::Math::PxPyPzMVector(lv3.Px(), lv3.Py(), lv3.Pz(), lv3.M()); // mass of KshortKshort pair + ROOT::Math::PxPyPzMVector fourVecMother = ROOT::Math::PxPyPzMVector(lv3.Px(), lv3.Py(), lv3.Pz(), lv3.M()); // mass of HigherMassResonances pair ROOT::Math::Boost boost{fourVecMother.BoostToCM()}; // boost mother to center of mass frame ROOT::Math::PxPyPzMVector fourVecDauCM = boost(fourVecDau); // boost the frame of daughter same as mother ROOT::Math::XYZVector threeVecDauCM = fourVecDauCM.Vect(); // get the 3 vector of daughter in the frame of mother - if (TMath::Abs(lv3.Rapidity() < 0.5)) { + // if (counter3 < 1e3) { + // std::cout << "rapidity is " << lv3.Rapidity() << std::endl; + // } + // counter3++; + + if (std::abs(lv3.Rapidity()) < 0.5) { - if (inv_mass1D) { + if (invMass1D) { hglue.fill(HIST("h1glueInvMassRot"), lv3.M()); } if (activateTHnSparseCosThStarHelicity) { ROOT::Math::XYZVector helicityVec = fourVecMother.Vect(); // 3 vector of mother in COM frame auto cosThetaStarHelicity = helicityVec.Dot(threeVecDauCM) / (std::sqrt(threeVecDauCM.Mag2()) * std::sqrt(helicityVec.Mag2())); - hglue.fill(HIST("h3glueInvMassDS"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarHelicity, occupancy_no); - for (int i = 0; i < c_nof_rotations; i++) { - float theta2 = rn->Uniform(TMath::Pi() - TMath::Pi() / rotational_cut, TMath::Pi() + TMath::Pi() / rotational_cut); + hglue.fill(HIST("h3glueInvMassDS"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarHelicity, occupancyNumber); + for (int i = 0; i < cRrotations; i++) { + float theta2 = rn->Uniform(o2::constants::math::PI - o2::constants::math::PI / rotationalCut, o2::constants::math::PI + o2::constants::math::PI / rotationalCut); lv4.SetPtEtaPhiM(v1.pt(), v1.eta(), v1.phi() + theta2, massK0s); // for rotated background lv5 = lv2 + lv4; - hglue.fill(HIST("h3glueInvMassRot"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarHelicity, occupancy_no); + hglue.fill(HIST("h3glueInvMassRot"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarHelicity, occupancyNumber); } - } else if (activateTHnSparseCosThStarProduction) { ROOT::Math::XYZVector normalVec = ROOT::Math::XYZVector(lv3.Py(), -lv3.Px(), 0.f); auto cosThetaStarProduction = normalVec.Dot(threeVecDauCM) / (std::sqrt(threeVecDauCM.Mag2()) * std::sqrt(normalVec.Mag2())); - hglue.fill(HIST("h3glueInvMassDS"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarProduction, occupancy_no); - for (int i = 0; i < c_nof_rotations; i++) { - float theta2 = rn->Uniform(TMath::Pi() - TMath::Pi() / rotational_cut, TMath::Pi() + TMath::Pi() / rotational_cut); + hglue.fill(HIST("h3glueInvMassDS"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarProduction, occupancyNumber); + for (int i = 0; i < cRrotations; i++) { + float theta2 = rn->Uniform(o2::constants::math::PI - o2::constants::math::PI / rotationalCut, o2::constants::math::PI + o2::constants::math::PI / rotationalCut); lv4.SetPtEtaPhiM(v1.pt(), v1.eta(), v1.phi() + theta2, massK0s); // for rotated background lv5 = lv2 + lv4; - hglue.fill(HIST("h3glueInvMassRot"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarProduction, occupancy_no); + hglue.fill(HIST("h3glueInvMassRot"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarProduction, occupancyNumber); } } else if (activateTHnSparseCosThStarBeam) { ROOT::Math::XYZVector beamVec = ROOT::Math::XYZVector(0.f, 0.f, 1.f); auto cosThetaStarBeam = beamVec.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()); - hglue.fill(HIST("h3glueInvMassDS"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarBeam, occupancy_no); - for (int i = 0; i < c_nof_rotations; i++) { - float theta2 = rn->Uniform(TMath::Pi() - TMath::Pi() / rotational_cut, TMath::Pi() + TMath::Pi() / rotational_cut); + hglue.fill(HIST("h3glueInvMassDS"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarBeam, occupancyNumber); + for (int i = 0; i < cRrotations; i++) { + float theta2 = rn->Uniform(o2::constants::math::PI - o2::constants::math::PI / rotationalCut, o2::constants::math::PI + o2::constants::math::PI / rotationalCut); lv4.SetPtEtaPhiM(v1.pt(), v1.eta(), v1.phi() + theta2, massK0s); // for rotated background lv5 = lv2 + lv4; - hglue.fill(HIST("h3glueInvMassRot"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarBeam, occupancy_no); + hglue.fill(HIST("h3glueInvMassRot"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarBeam, occupancyNumber); } } else if (activateTHnSparseCosThStarRandom) { auto phiRandom = gRandom->Uniform(0.f, constants::math::TwoPI); auto thetaRandom = gRandom->Uniform(0.f, constants::math::PI); ROOT::Math::XYZVector randomVec = ROOT::Math::XYZVector(std::sin(thetaRandom) * std::cos(phiRandom), std::sin(thetaRandom) * std::sin(phiRandom), std::cos(thetaRandom)); auto cosThetaStarRandom = randomVec.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()); - hglue.fill(HIST("h3glueInvMassDS"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarRandom, occupancy_no); - for (int i = 0; i < c_nof_rotations; i++) { - float theta2 = rn->Uniform(TMath::Pi() - TMath::Pi() / rotational_cut, TMath::Pi() + TMath::Pi() / rotational_cut); + hglue.fill(HIST("h3glueInvMassDS"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarRandom, occupancyNumber); + for (int i = 0; i < cRrotations; i++) { + float theta2 = rn->Uniform(o2::constants::math::PI - o2::constants::math::PI / rotationalCut, o2::constants::math::PI + o2::constants::math::PI / rotationalCut); lv4.SetPtEtaPhiM(v1.pt(), v1.eta(), v1.phi() + theta2, massK0s); // for rotated background lv5 = lv2 + lv4; - hglue.fill(HIST("h3glueInvMassRot"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarRandom, occupancy_no); + hglue.fill(HIST("h3glueInvMassRot"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarRandom, occupancyNumber); } } } } - if (QAv0) { + if (qAv0) { int sizeofv0indexes = v0indexes.size(); rKzeroShort.fill(HIST("NksProduced"), sizeofv0indexes); // std::cout << "Size of v0indexes: " << sizeofv0indexes << std::endl; } } - PROCESS_SWITCH(strangeness_tutorial, processSE, "same event process", true); + PROCESS_SWITCH(HigherMassResonances, processSE, "same event process", true); + array pvec0; + array pvec1; // use any one of 3 alias depending on the dataset. If pp then FT0M and if pbpb then FTOC using BinningTypeTPCMultiplicity = ColumnBinningPolicy; using BinningTypeCentralityM = ColumnBinningPolicy; @@ -716,7 +748,8 @@ struct strangeness_tutorial { void processME(EventCandidates const& collisions, TrackCandidates const& /*tracks*/, V0TrackCandidate const& v0s) { - const double massK0s = TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass(); + // const double massK0s = TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass(); + const double massK0s = o2::constants::physics::MassK0Short; auto tracksTuple = std::make_tuple(v0s); BinningTypeVertexContributor binningOnPositions1{{mevz, memult}, true}; BinningTypeCentralityM binningOnPositions2{{mevz, memult}, true}; @@ -725,7 +758,7 @@ struct strangeness_tutorial { SameKindPair pair2{binningOnPositions2, cfgNmixedEvents, -1, collisions, tracksTuple, &cache}; // for pp if (cfgMultFOTM) { - for (auto& [c1, tracks1, c2, tracks2] : pair2) // two different centrality c1 and c2 and tracks corresponding to them + for (const auto& [c1, tracks1, c2, tracks2] : pair2) // two different centrality c1 and c2 and tracks corresponding to them { float multiplicity = 0.0f; @@ -735,21 +768,21 @@ struct strangeness_tutorial { if (!eventselection(c1, multiplicity) || !eventselection(c2, multiplicity)) { continue; } - auto occupancy_no = c1.trackOccupancyInTimeRange(); - auto occupancy_no2 = c2.trackOccupancyInTimeRange(); - if (applyOccupancyCut && (occupancy_no < OccupancyCut || occupancy_no2 < OccupancyCut)) { + auto occupancyNumber = c1.trackOccupancyInTimeRange(); + auto occupancyNumber2 = c2.trackOccupancyInTimeRange(); + if (applyOccupancyCut && (occupancyNumber < occupancyCut || occupancyNumber2 < occupancyCut)) { return; } - for (auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { + for (const auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { if (t1.size() == 0 || t2.size() == 0) { continue; } - if (!SelectionV0(c1, t1, multiplicity)) + if (!selectionV0(c1, t1, multiplicity)) continue; - if (!SelectionV0(c2, t2, multiplicity)) + if (!selectionV0(c2, t2, multiplicity)) continue; auto postrack1 = t1.template posTrack_as(); @@ -787,36 +820,36 @@ struct strangeness_tutorial { ROOT::Math::PxPyPzMVector fourVecDau = ROOT::Math::PxPyPzMVector(daughter1.Px(), daughter1.Py(), daughter1.Pz(), massK0s); // Kshort - ROOT::Math::PxPyPzMVector fourVecMother = ROOT::Math::PxPyPzMVector(lv3.Px(), lv3.Py(), lv3.Pz(), lv3.M()); // mass of KshortKshort pair + ROOT::Math::PxPyPzMVector fourVecMother = ROOT::Math::PxPyPzMVector(lv3.Px(), lv3.Py(), lv3.Pz(), lv3.M()); // mass of HigherMassResonances pair ROOT::Math::Boost boost{fourVecMother.BoostToCM()}; // boost mother to center of mass frame ROOT::Math::PxPyPzMVector fourVecDauCM = boost(fourVecDau); // boost the frame of daughter same as mother ROOT::Math::XYZVector threeVecDauCM = fourVecDauCM.Vect(); // get the 3 vector of daughter in the frame of mother - if (TMath::Abs(lv3.Rapidity() < 0.5)) { + if (std::abs(lv3.Rapidity()) < 0.5) { if (activateTHnSparseCosThStarHelicity) { ROOT::Math::XYZVector helicityVec = fourVecMother.Vect(); // 3 vector of mother in COM frame auto cosThetaStarHelicity = helicityVec.Dot(threeVecDauCM) / (std::sqrt(threeVecDauCM.Mag2()) * std::sqrt(helicityVec.Mag2())); - hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarHelicity, occupancy_no); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarHelicity, occupancyNumber); } else if (activateTHnSparseCosThStarProduction) { ROOT::Math::XYZVector normalVec = ROOT::Math::XYZVector(lv3.Py(), -lv3.Px(), 0.f); auto cosThetaStarProduction = normalVec.Dot(threeVecDauCM) / (std::sqrt(threeVecDauCM.Mag2()) * std::sqrt(normalVec.Mag2())); - hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarProduction, occupancy_no); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarProduction, occupancyNumber); } else if (activateTHnSparseCosThStarBeam) { ROOT::Math::XYZVector beamVec = ROOT::Math::XYZVector(0.f, 0.f, 1.f); auto cosThetaStarBeam = beamVec.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()); - hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarBeam, occupancy_no); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarBeam, occupancyNumber); } else if (activateTHnSparseCosThStarRandom) { auto phiRandom = gRandom->Uniform(0.f, constants::math::TwoPI); auto thetaRandom = gRandom->Uniform(0.f, constants::math::PI); ROOT::Math::XYZVector randomVec = ROOT::Math::XYZVector(std::sin(thetaRandom) * std::cos(phiRandom), std::sin(thetaRandom) * std::sin(phiRandom), std::cos(thetaRandom)); auto cosThetaStarRandom = randomVec.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()); - hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarRandom, occupancy_no); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarRandom, occupancyNumber); } } - // if (TMath::Abs(lv3.Rapidity() < 0.5)) { - // if (inv_mass1D) { + // if (std::abs(lv3.Rapidity()) < 0.5) { + // if (invMass1D) { // hglue.fill(HIST("h1glueInvMassME"), lv3.M()); // } // hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M()); @@ -824,7 +857,7 @@ struct strangeness_tutorial { } } } else { - for (auto& [c1, tracks1, c2, tracks2] : pair1) // two different centrality c1 and c2 and tracks corresponding to them + for (const auto& [c1, tracks1, c2, tracks2] : pair1) // two different centrality c1 and c2 and tracks corresponding to them { float multiplicity = 0.0f; multiplicity = c1.centFT0C(); @@ -832,20 +865,20 @@ struct strangeness_tutorial { if (!eventselection(c1, multiplicity) || !eventselection(c2, multiplicity)) { continue; } - auto occupancy_no = c1.trackOccupancyInTimeRange(); - auto occupancy_no2 = c2.trackOccupancyInTimeRange(); - if (applyOccupancyCut && (occupancy_no < OccupancyCut || occupancy_no2 < OccupancyCut)) { + auto occupancyNumber = c1.trackOccupancyInTimeRange(); + auto occupancyNumber2 = c2.trackOccupancyInTimeRange(); + if (applyOccupancyCut && (occupancyNumber < occupancyCut || occupancyNumber2 < occupancyCut)) { return; } - for (auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { + for (const auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { if (t1.size() == 0 || t2.size() == 0) { continue; } - if (!SelectionV0(c1, t1, multiplicity)) + if (!selectionV0(c1, t1, multiplicity)) continue; - if (!SelectionV0(c2, t2, multiplicity)) + if (!selectionV0(c2, t2, multiplicity)) continue; auto postrack1 = t1.template posTrack_as(); @@ -883,31 +916,31 @@ struct strangeness_tutorial { ROOT::Math::PxPyPzMVector fourVecDau = ROOT::Math::PxPyPzMVector(daughter1.Px(), daughter1.Py(), daughter1.Pz(), massK0s); // Kshort - ROOT::Math::PxPyPzMVector fourVecMother = ROOT::Math::PxPyPzMVector(lv3.Px(), lv3.Py(), lv3.Pz(), lv3.M()); // mass of KshortKshort pair + ROOT::Math::PxPyPzMVector fourVecMother = ROOT::Math::PxPyPzMVector(lv3.Px(), lv3.Py(), lv3.Pz(), lv3.M()); // mass of HigherMassResonances pair ROOT::Math::Boost boost{fourVecMother.BoostToCM()}; // boost mother to center of mass frame ROOT::Math::PxPyPzMVector fourVecDauCM = boost(fourVecDau); // boost the frame of daughter same as mother ROOT::Math::XYZVector threeVecDauCM = fourVecDauCM.Vect(); // get the 3 vector of daughter in the frame of mother - if (TMath::Abs(lv3.Rapidity() < 0.5)) { + if (std::abs(lv3.Rapidity()) < 0.5) { if (activateTHnSparseCosThStarHelicity) { ROOT::Math::XYZVector helicityVec = fourVecMother.Vect(); // 3 vector of mother in COM frame auto cosThetaStarHelicity = helicityVec.Dot(threeVecDauCM) / (std::sqrt(threeVecDauCM.Mag2()) * std::sqrt(helicityVec.Mag2())); - hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarHelicity, occupancy_no); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarHelicity, occupancyNumber); } else if (activateTHnSparseCosThStarProduction) { ROOT::Math::XYZVector normalVec = ROOT::Math::XYZVector(lv3.Py(), -lv3.Px(), 0.f); auto cosThetaStarProduction = normalVec.Dot(threeVecDauCM) / (std::sqrt(threeVecDauCM.Mag2()) * std::sqrt(normalVec.Mag2())); - hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarProduction, occupancy_no); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarProduction, occupancyNumber); } else if (activateTHnSparseCosThStarBeam) { ROOT::Math::XYZVector beamVec = ROOT::Math::XYZVector(0.f, 0.f, 1.f); auto cosThetaStarBeam = beamVec.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()); - hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarBeam, occupancy_no); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarBeam, occupancyNumber); } else if (activateTHnSparseCosThStarRandom) { auto phiRandom = gRandom->Uniform(0.f, constants::math::TwoPI); auto thetaRandom = gRandom->Uniform(0.f, constants::math::PI); ROOT::Math::XYZVector randomVec = ROOT::Math::XYZVector(std::sin(thetaRandom) * std::cos(phiRandom), std::sin(thetaRandom) * std::sin(phiRandom), std::cos(thetaRandom)); auto cosThetaStarRandom = randomVec.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()); - hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarRandom, occupancy_no); + hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarRandom, occupancyNumber); } } @@ -915,8 +948,8 @@ struct strangeness_tutorial { // lv1.SetPtEtaPhiM(t1.pt(), t1.eta(), t1.phi(), massK0s); // lv2.SetPtEtaPhiM(t2.pt(), t2.eta(), t2.phi(), massK0s); // lv3 = lv1 + lv2; - // if (TMath::Abs(lv3.Rapidity() < 0.5)) { - // if (inv_mass1D) { + // if (std::abs(lv3.Rapidity()) < 0.5) { + // if (invMass1D) { // hglue.fill(HIST("h1glueInvMassME"), lv3.M()); // } // hglue.fill(HIST("h3glueInvMassME"), multiplicity, lv3.Pt(), lv3.M()); @@ -925,11 +958,285 @@ struct strangeness_tutorial { } } } - PROCESS_SWITCH(strangeness_tutorial, processME, "mixed event process", true); + PROCESS_SWITCH(HigherMassResonances, processME, "mixed event process", true); + + int counter = 0; + void processGen(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups& collisions) + { + TLorentzVector genvec; + hMChists.fill(HIST("events_check"), 0.5); + if (std::abs(mcCollision.posZ()) < cutzvertex) { + hMChists.fill(HIST("events_check"), 1.5); + } + // int Nchinel = 0; + // for (const auto& mcParticle : mcParticles) { + // auto pdgcode = std::abs(mcParticle.pdgCode()); + // if (mcParticle.isPhysicalPrimary() && (pdgcode == 211 || pdgcode == 321 || pdgcode == 2212 || pdgcode == 11 || pdgcode == 13)) { + // if (std::abs(mcParticle.eta()) < 1.0) { + // Nchinel = Nchinel + 1; + // } + // } + // } + // if (Nchinel > 0 && std::abs(mcCollision.posZ()) < cutzvertex) + hMChists.fill(HIST("events_check"), 2.5); + + std::vector selectedEvents(collisions.size()); + int nevts = 0; + for (const auto& collision : collisions) { + if (std::abs(collision.mcCollision().posZ()) > cutzvertex) { + continue; + } + + if (timFrameEvsel && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) { + continue; + } + if (cTVXEvsel && (!collision.selection_bit(aod::evsel::kIsTriggerTVX))) { + continue; + } + + selectedEvents[nevts++] = collision.mcCollision_as().globalIndex(); + } + selectedEvents.resize(nevts); + hMChists.fill(HIST("events_check"), 3.5); + // const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end(); + + // if (!allGenCollisions && !evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection + // return; + // } + hMChists.fill(HIST("events_check"), 4.5); + for (const auto& mcParticle : mcParticles) { + if (std::abs(mcParticle.y()) >= 0.5) { + continue; + } + hMChists.fill(HIST("events_check"), 5.5); + + // if (counter < 1e4) { + // std::cout << "PDG code mother " << mcParticle.pdgCode() << std::endl; + // } + // counter++; + if (std::abs(mcParticle.pdgCode()) != 10331) // f2(1525), f0(1710) + { + continue; + } + hMChists.fill(HIST("events_check"), 6.5); + + auto kDaughters = mcParticle.daughters_as(); + if (kDaughters.size() != 2) { + continue; + } + hMChists.fill(HIST("events_check"), 7.5); + + auto passKs = false; + for (const auto& kCurrentDaughter : kDaughters) { + // int daupdg = std::abs(kCurrentDaughter.pdgCode()); + // if (counter < 1e4) + // std::cout << "Daughter pdg code: " << daupdg << std::endl; + // counter++; + + if (!kCurrentDaughter.isPhysicalPrimary()) { + continue; + } + hMChists.fill(HIST("events_check"), 8.5); + + if (std::abs(kCurrentDaughter.pdgCode()) == 310) { + passKs = true; + hMChists.fill(HIST("events_check"), 9.5); + } + } + if (passKs) { + genvec.SetPtEtaPhiE(mcParticle.pt(), mcParticle.eta(), mcParticle.phi(), mcParticle.e()); + hMChists.fill(HIST("Genf1710"), mcParticle.pt()); + hMChists.fill(HIST("Genf1710_mass"), genvec.M()); + } + } + } + PROCESS_SWITCH(HigherMassResonances, processGen, "Process Generated", false); + + int counter2 = 0; + int eventCounter = 0; + std::vector gindex1, gindex2; + void processRec(EventCandidatesMC::iterator const& collision, V0TrackCandidatesMC const& V0s, aod::McParticles const&, aod::McCollisions const& /*mcCollisions*/) + { + + TLorentzVector lDecayDaughter1, lDecayDaughter2, lResonance; + + float multiplicity = 0.0f; + multiplicity = collision.centFT0C(); + hMChists.fill(HIST("MC_mult"), multiplicity); + + hMChists.fill(HIST("events_checkrec"), 0.5); + if (!collision.has_mcCollision()) { + return; + } + hMChists.fill(HIST("events_checkrec"), 1.5); + // if (std::abs(collision.mcCollision().posZ()) > cutzvertex || !collision.sel8()) { + if (std::abs(collision.mcCollision().posZ()) > cutzvertex) { + return; + } + hMChists.fill(HIST("events_checkrec"), 2.5); + + if (timFrameEvsel && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) { + return; + } + hMChists.fill(HIST("events_checkrec"), 3.5); + if (cTVXEvsel && (!collision.selection_bit(aod::evsel::kIsTriggerTVX))) { + return; + } + hMChists.fill(HIST("events_checkrec"), 4.5); + hMChists.fill(HIST("MC_mult_after_event_sel"), multiplicity); + eventCounter++; + + for (const auto& v01 : V0s) { + + for (const auto& v02 : V0s) { + + hMChists.fill(HIST("events_checkrec"), 5.5); + + if (v02.index() <= v01.index()) { + continue; + } + + if (!v01.has_mcParticle() || !v02.has_mcParticle()) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 6.5); + + auto postrack1 = v01.template posTrack_as(); + auto negtrack1 = v01.template negTrack_as(); + + auto postrack2 = v02.template posTrack_as(); + auto negtrack2 = v02.template negTrack_as(); + + if (!postrack1.has_mcParticle() || !postrack2.has_mcParticle()) + continue; // Checking that the daughter tracks come from particles and are not fake + hMChists.fill(HIST("events_checkrec"), 7.5); + + if (!negtrack1.has_mcParticle() || !negtrack2.has_mcParticle()) + continue; + hMChists.fill(HIST("events_checkrec"), 8.5); + + double nTPCSigmaPos1[1]{postrack1.tpcNSigmaPi()}; + double nTPCSigmaNeg1[1]{negtrack1.tpcNSigmaPi()}; + + double nTPCSigmaPos2[1]{postrack2.tpcNSigmaPi()}; + double nTPCSigmaNeg2[1]{negtrack2.tpcNSigmaPi()}; + + if (!isSelectedV0Daughter(postrack1, 1, nTPCSigmaPos1[0], v01) || !isSelectedV0Daughter(postrack2, 1, nTPCSigmaPos2[0], v02)) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 9.5); + + if (!isSelectedV0Daughter(negtrack1, -1, nTPCSigmaNeg1[0], v01) || !isSelectedV0Daughter(negtrack2, -1, nTPCSigmaNeg2[0], v02)) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 10.5); + + if (!selectionV0(collision, v01, multiplicity) || !selectionV0(collision, v02, multiplicity)) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 11.5); + + auto mctrackv01 = v01.mcParticle(); + auto mctrackv02 = v02.mcParticle(); + + int trackv0PDG1 = std::abs(mctrackv01.pdgCode()); + int trackv0PDG2 = std::abs(mctrackv02.pdgCode()); + + if (std::abs(trackv0PDG1) != 310 || std::abs(trackv0PDG2) != 310) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 12.5); + + for (const auto& mothertrack1 : mctrackv01.mothers_as()) { + + // int motpdgs = std::abs(mothertrack1.pdgCode()); + gindex1.push_back(mothertrack1.globalIndex()); + if (gindex1.size() > 1) { + if (std::find(gindex1.begin(), gindex1.end(), mothertrack1.globalIndex()) != gindex1.end()) { + continue; + } + } + // if (counter2 < 1e4) + // std::cout << "Mother1 pdg code: " << motpdgs << " p_{T} " << mothertrack1.pt() << "Global index " << mothertrack1.globalIndex() << " event " << eventCounter << std::endl; + // counter2++; + + // int counter_check = 0; + + for (const auto& mothertrack2 : mctrackv02.mothers_as()) { + + hMChists.fill(HIST("events_checkrec"), 13.5); + + if (mothertrack1.pdgCode() != mothertrack2.pdgCode()) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 14.5); + + // int motpdgs2 = std::abs(mothertrack2.pdgCode()); + gindex2.push_back(mothertrack2.globalIndex()); + if (gindex2.size() > 1) { + if (std::find(gindex2.begin(), gindex2.end(), mothertrack2.globalIndex()) != gindex2.end()) { + continue; + } + } + // if (counter2 < 1e4) + // std::cout << "Mother2 pdg code: " << motpdgs2 << " p_{T} " << mothertrack2.pt() << "Global index " << mothertrack1.globalIndex() << " event " << eventCounter << std::endl; + + if (mothertrack1.pdgCode() != 10331) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 15.5); + + if (mothertrack1.globalIndex() != mothertrack2.globalIndex()) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 16.5); + + if (!mothertrack1.producedByGenerator()) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 17.5); + + if (std::abs(mothertrack1.y()) >= 0.5) { + continue; + } + hMChists.fill(HIST("events_checkrec"), 18.5); + + // counter_check++; + // if (counter_check > 1) { + // std::cout << "Total mothers is " << counter_check << std::endl; + // } + // std::cout << "After selection " << " p_{T} " << mothertrack2.pt() << " event " << eventCounter << std::endl; + + pvec0 = std::array{v01.px(), v01.py(), v01.pz()}; + pvec1 = std::array{v02.px(), v02.py(), v02.pz()}; + auto arrMomrec = std::array{pvec0, pvec1}; + auto motherP = mothertrack1.p(); + // auto motherE = mothertrack1.e(); + // auto genMass = std::sqrt(motherE * motherE - motherP * motherP); + auto recMass = RecoDecay::m(arrMomrec, std::array{o2::constants::physics::MassK0Short, o2::constants::physics::MassK0Short}); + // auto recpt = TMath::Sqrt((track1.px() + track2.px()) * (track1.px() + track2.px()) + (track1.py() + track2.py()) * (track1.py() + track2.py())); + //// Resonance reconstruction + lDecayDaughter1.SetXYZM(v01.px(), v01.py(), v01.pz(), o2::constants::physics::MassK0Short); + lDecayDaughter2.SetXYZM(v02.px(), v02.py(), v02.pz(), o2::constants::physics::MassK0Short); + lResonance = lDecayDaughter1 + lDecayDaughter2; + + hMChists.fill(HIST("Recf1710_p"), motherP); + hMChists.fill(HIST("Recf1710_mass"), recMass); + hMChists.fill(HIST("Recf1710_pt1"), mothertrack1.pt()); + // hMChists.fill(HIST("Genf1710_mass"), genMass); + hMChists.fill(HIST("Recf1710_pt2"), lResonance.Pt()); + } + gindex2.clear(); + } + gindex1.clear(); + } + } + } + PROCESS_SWITCH(HigherMassResonances, processRec, "Process Reconstructed", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; + adaptAnalysisTask(cfgc)}; } diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index 5517a69818e..06fcb14511c 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -8,17 +8,19 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// -/// \brief this is a code for the kstarqa resonance + +/// \file Kstarqa.cxx +/// \brief this is a code for the Kstarqa resonance /// \author prottay das, sawan /// \since 13/03/2024 -#include +// #include #include #include #include #include #include +#include #include #include #include @@ -52,7 +54,7 @@ using namespace o2::framework::expressions; using namespace o2::soa; using std::array; -struct kstarqa { +struct Kstarqa { SliceCache cache; @@ -61,27 +63,27 @@ struct kstarqa { HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; // Confugrable for QA histograms - Configurable CalcLikeSign{"CalcLikeSign", true, "Calculate Like Sign"}; - Configurable CalcRotational{"CalcRotational", true, "Calculate Rotational"}; - Configurable QAbefore{"QAbefore", true, "QAbefore"}; - Configurable QAafter{"QAafter", true, "QAafter"}; - Configurable QAevents{"QAevents", true, "Multiplicity dist, DCAxy, DCAz"}; + Configurable calcLikeSign{"calcLikeSign", true, "Calculate Like Sign"}; + Configurable calcRotational{"calcRotational", true, "Calculate Rotational"}; + Configurable cQAbefore{"cQAbefore", true, "cQAbefore"}; + Configurable cQAafter{"cQAafter", true, "cQAafter"}; + Configurable cQAevents{"cQAevents", true, "Multiplicity dist, DCAxy, DCAz"}; Configurable onlyTOF{"onlyTOF", false, "only TOF tracks"}; Configurable onlyTOFHIT{"onlyTOFHIT", false, "accept only TOF hit tracks at high pt"}; Configurable onlyTPC{"onlyTPC", true, "only TPC tracks"}; Configurable cfgFT0M{"cfgFT0M", true, "1: pp, 0: PbPb"}; // Configurables for track selections - Configurable rotational_cut{"rotational_cut", 10, "Cut value (Rotation angle pi - pi/cut and pi + pi/cut)"}; + Configurable rotationalCut{"rotationalCut", 10, "Cut value (Rotation angle pi - pi/cut and pi + pi/cut)"}; Configurable cfgCutPT{"cfgCutPT", 0.2f, "PT cut on daughter track"}; Configurable cfgCutEta{"cfgCutEta", 0.8f, "Eta cut on daughter track"}; Configurable cfgCutDCAxy{"cfgCutDCAxy", 2.0f, "DCAxy range for tracks"}; Configurable cfgCutDCAz{"cfgCutDCAz", 2.0f, "DCAz range for tracks"}; - Configurable nsigmaCutTPCPi{"nsigmacutTPCPi", 3.0, "Value of the TPC Nsigma cut for pions"}; - Configurable nsigmaCutTPCKa{"nsigmacutTPCKa", 3.0, "Value of the TPC Nsigma cut for kaons"}; - Configurable nsigmaCutTOFPi{"nsigmacutTOFPi", 3.0, "Value of the TOF Nsigma cut for pions"}; - Configurable nsigmaCutTOFKa{"nsigmacutTOFKa", 3.0, "Value of the TOF Nsigma cut for kaons"}; - Configurable nsigmaCutCombined{"nsigmaCutCombined", 3.0, "Value of the Combined Nsigma cut"}; + Configurable nsigmaCutTPCPi{"nsigmaCutTPCPi", 3.0, "TPC Nsigma cut for pions"}; + Configurable nsigmaCutTPCKa{"nsigmaCutTPCKa", 3.0, "TPC Nsigma cut for kaons"}; + Configurable nsigmaCutTOFPi{"nsigmaCutTOFPi", 3.0, "TOF Nsigma cut for pions"}; + Configurable nsigmaCutTOFKa{"nsigmaCutTOFKa", 3.0, "TOF Nsigma cut for kaons"}; + Configurable nsigmaCutCombined{"nsigmaCutCombined", 3.0, "Combined Nsigma cut"}; Configurable cfgNoMixedEvents{"cfgNoMixedEvents", 5, "Number of mixed events per event"}; Configurable ismanualDCAcut{"ismanualDCAcut", true, "ismanualDCAcut"}; Configurable cfgITScluster{"cfgITScluster", 0, "Number of ITS cluster"}; @@ -96,9 +98,9 @@ struct kstarqa { // Event selection configurables Configurable timFrameEvsel{"timFrameEvsel", false, "TPC Time frame boundary cut"}; - Configurable TVXEvsel{"TVXEvsel", false, "Triggger selection"}; + Configurable cTVXEvsel{"cTVXEvsel", false, "Triggger selection"}; Configurable cutzvertex{"cutzvertex", 10.0f, "Accepted z-vertex range (cm)"}; - Configurable MID{"MID", false, "Misidentification of tracks"}; + Configurable cMID{"cMID", false, "Misidentification of tracks"}; // Configurable for histograms Configurable nBins{"nBins", 100, "N bins in all histos"}; @@ -108,21 +110,21 @@ struct kstarqa { Configurable nBinspT{"nBinspT", 200, "N bins in pT histos"}; Configurable pTbinlow{"pTbinlow", 0.0, "pT bin low"}; Configurable pTbinhigh{"pTbinhigh", 20.0, "pT bin high"}; - ConfigurableAxis binsMultPlot{"binsCent", {201, -0.5f, 200.5f}, "Binning of the centrality axis for plots"}; Configurable avoidsplitrackMC{"avoidsplitrackMC", true, "avoid split track in MC"}; - Configurable AllGenCollisions{"AllGenCollisions", true, "To fill all generated collisions for the signal loss calculations"}; + Configurable cAllGenCollisions{"cAllGenCollisions", true, "To fill all generated collisions for the signal loss calculations"}; + ConfigurableAxis binsMultPlot{"binsMultPlot", {201, -0.5f, 200.5f}, "centrality axis bins"}; ConfigurableAxis axisdEdx{"axisdEdx", {20000, 0.0f, 200.0f}, "dE/dx (a.u.)"}; ConfigurableAxis axisPtfordEbydx{"axisPtfordEbydx", {2000, 0, 20}, "pT (GeV/c)"}; ConfigurableAxis axisMultdist{"axisMultdist", {3500, 0, 70000}, "Multiplicity distribution"}; // Event plane configurables - Configurable boost_daugter1{"boost_daugter1", false, "Boost daughter Kaon in the COM frame"}; - Configurable boost_daugter2{"boost_daugter2", true, "Boost daughter Pion in the COM frame"}; + Configurable boostDaugter1{"boostDaugter1", false, "Boost daughter Kaon in the COM frame"}; + Configurable boostDaugter2{"boostDaugter2", true, "Boost daughter Pion in the COM frame"}; Configurable activateTHnSparseCosThStarHelicity{"activateTHnSparseCosThStarHelicity", true, "Activate the THnSparse with cosThStar w.r.t. helicity axis"}; Configurable activateTHnSparseCosThStarProduction{"activateTHnSparseCosThStarProduction", false, "Activate the THnSparse with cosThStar w.r.t. production axis"}; Configurable activateTHnSparseCosThStarBeam{"activateTHnSparseCosThStarBeam", false, "Activate the THnSparse with cosThStar w.r.t. beam axis (Gottified jackson frame)"}; Configurable activateTHnSparseCosThStarRandom{"activateTHnSparseCosThStarRandom", false, "Activate the THnSparse with cosThStar w.r.t. random axis"}; - Configurable c_nof_rotations{"c_nof_rotations", 3, "Number of random rotations in the rotational background"}; + Configurable cRotations{"cRotations", 3, "Number of random rotations in the rotational background"}; ConfigurableAxis configThnAxisPOL{"configThnAxisPOL", {20, -1.0, 1.0}, "Costheta axis"}; TRandom* rn = new TRandom(); @@ -140,7 +142,7 @@ struct kstarqa { rEventSelection.add("hmult", "Multiplicity percentile", kTH1F, {{binsMultPlot}}); // for primary tracks - if (QAbefore && QAafter) { + if (cQAbefore && cQAafter) { histos.add("hNsigmaTPC_before", "NsigmaKaon TPC distribution before", kTH2F, {{100, 0.0f, 10.0f}, {200, -10.0f, 10.0f}}); histos.add("hNsigmaTOF_before", "NsigmaKaon TOF distribution before", kTH2F, {{100, 0.0f, 10.0f}, {200, -10.0f, 10.0f}}); histos.add("dE_by_dx_TPC", "dE/dx signal in the TPC as a function of pT", kTH2F, {axisPtfordEbydx, axisdEdx}); @@ -176,7 +178,7 @@ struct kstarqa { histos.add("h1KSRecsplit", "KS meson Rec split", kTH1F, {{100, 0.0f, 10.0f}}); // Multplicity distribution - if (QAevents) { + if (cQAevents) { histos.add("multdist_FT0M", "FT0M Multiplicity distribution", kTH1F, {axisMultdist}); histos.add("multdist_FT0A", "FT0A Multiplicity distribution", kTH1F, {axisMultdist}); histos.add("multdist_FT0C", "FT0C Multiplicity distribution", kTH1F, {axisMultdist}); @@ -186,11 +188,9 @@ struct kstarqa { } } - double massPi = TDatabasePDG::Instance()->GetParticle(kPiPlus)->Mass(); // FIXME: Get from the common header + // double massPi = TDatabasePDG::Instance()->GetParticle(kPiPlus)->Mass(); // FIXME: Get from the common header + double massPi = o2::constants::physics::MassPiPlus; double massKa = o2::constants::physics::MassKPlus; - ROOT::Math::PtEtaPhiMVector CKSVector; - ROOT::Math::PtEtaPhiMVector CKSVectorRot1; - ROOT::Math::PtEtaPhiMVector CKSVectorRot2; template bool selectionTrack(const T& candidate) @@ -284,7 +284,7 @@ struct kstarqa { } template - bool MIDselectionPID(const T& candidate, int PID) + bool cMIDselectionPID(const T& candidate, int PID) { if (PID == 0) { if (onlyTOF) { @@ -363,8 +363,8 @@ struct kstarqa { return false; } - array pvec0; - array pvec1; + std::array pvec0; + std::array pvec1; // Defining filters for events (event selection) // Processed events will be already fulfilling the event selection @@ -373,7 +373,7 @@ struct kstarqa { Filter posZFilter = (nabs(o2::aod::collision::posZ) < cutzvertex); Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT); - Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz); + Filter fDCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz); using EventCandidates = soa::Filtered>; using TrackCandidates = soa::Filtered>; @@ -384,23 +384,23 @@ struct kstarqa { template void fillInvMass(const T1& track1, const T2& track2, const T3& lv2, const T4& lv3, float multiplicity, bool isMix) { - ROOT::Math::PxPyPzMVector daughter1, daughter2, daughter_selected; + ROOT::Math::PxPyPzMVector daughter1, daughter2, daughterSelected; daughter1 = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), massKa); // Kaon daughter2 = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), massPi); // Pion - daughter_selected = (boost_daugter1) ? daughter1 : daughter2; - auto selected_dau_mass = (boost_daugter1) ? massKa : massPi; + daughterSelected = (boostDaugter1) ? daughter1 : daughter2; + auto selectedDauMass = (boostDaugter1) ? massKa : massPi; TLorentzVector lv4, lv5; // polarization calculations - ROOT::Math::PxPyPzMVector fourVecDau1 = ROOT::Math::PxPyPzMVector(daughter_selected.Px(), daughter_selected.Py(), daughter_selected.Pz(), selected_dau_mass); // Kaon or Pion + ROOT::Math::PxPyPzMVector fourVecDau1 = ROOT::Math::PxPyPzMVector(daughterSelected.Px(), daughterSelected.Py(), daughterSelected.Pz(), selectedDauMass); // Kaon or Pion ROOT::Math::PxPyPzMVector fourVecMother = ROOT::Math::PxPyPzMVector(lv3.Px(), lv3.Py(), lv3.Pz(), lv3.M()); // mass of KshortKshort pair ROOT::Math::Boost boost{fourVecMother.BoostToCM()}; // boost mother to center of mass frame ROOT::Math::PxPyPzMVector fourVecDauCM = boost(fourVecDau1); // boost the frame of daughter same as mother ROOT::Math::XYZVector threeVecDauCM = fourVecDauCM.Vect(); // get the 3 vector of daughter in the frame of mother - if (TMath::Abs(lv3.Rapidity() < 0.5)) { + if (std::abs(lv3.Rapidity()) < 0.5) { if (activateTHnSparseCosThStarHelicity) { ROOT::Math::XYZVector helicityVec = fourVecMother.Vect(); // 3 vector of mother in COM frame auto cosThetaStarHelicity = helicityVec.Dot(threeVecDauCM) / (std::sqrt(threeVecDauCM.Mag2()) * std::sqrt(helicityVec.Mag2())); @@ -409,11 +409,11 @@ struct kstarqa { if (!isMix) { histos.fill(HIST("h3KstarInvMassUnlikeSign"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarHelicity); - for (int i = 0; i < c_nof_rotations; i++) { - float theta2 = rn->Uniform(TMath::Pi() - TMath::Pi() / rotational_cut, TMath::Pi() + TMath::Pi() / rotational_cut); + for (int i = 0; i < cRotations; i++) { + float theta2 = rn->Uniform(o2::constants::math::PI - o2::constants::math::PI / rotationalCut, o2::constants::math::PI + o2::constants::math::PI / rotationalCut); lv4.SetPtEtaPhiM(track1.pt(), track1.eta(), track1.phi() + theta2, massKa); // for rotated background lv5 = lv2 + lv4; - if (CalcRotational) + if (calcRotational) histos.fill(HIST("h3KstarInvMassRotated"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarHelicity); } } else { @@ -421,7 +421,7 @@ struct kstarqa { } } else { if (!isMix) { - if (CalcLikeSign) + if (calcLikeSign) histos.fill(HIST("h3KstarInvMasslikeSign"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarHelicity); } } @@ -433,11 +433,11 @@ struct kstarqa { if (track1.sign() * track2.sign() < 0) { if (!isMix) { histos.fill(HIST("h3KstarInvMassUnlikeSign"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarProduction); - for (int i = 0; i < c_nof_rotations; i++) { - float theta2 = rn->Uniform(0, TMath::Pi()); + for (int i = 0; i < cRotations; i++) { + float theta2 = rn->Uniform(0, o2::constants::math::PI); lv4.SetPtEtaPhiM(track1.pt(), track1.eta(), track1.phi() + theta2, massKa); // for rotated background lv5 = lv2 + lv4; - if (CalcRotational) + if (calcRotational) histos.fill(HIST("h3KstarInvMassRotated"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarProduction); } } else { @@ -445,7 +445,7 @@ struct kstarqa { } } else { if (!isMix) { - if (CalcLikeSign) + if (calcLikeSign) histos.fill(HIST("h3KstarInvMasslikeSign"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarProduction); } } @@ -456,18 +456,18 @@ struct kstarqa { if (track1.sign() * track2.sign() < 0) { if (!isMix) { histos.fill(HIST("h3KstarInvMassUnlikeSign"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarBeam); - for (int i = 0; i < c_nof_rotations; i++) { - float theta2 = rn->Uniform(0, TMath::Pi()); + for (int i = 0; i < cRotations; i++) { + float theta2 = rn->Uniform(0, o2::constants::math::PI); lv4.SetPtEtaPhiM(track1.pt(), track1.eta(), track1.phi() + theta2, massKa); // for rotated background lv5 = lv2 + lv4; - if (CalcRotational) + if (calcRotational) histos.fill(HIST("h3KstarInvMassRotated"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarBeam); } } else { histos.fill(HIST("h3KstarInvMassMixed"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarBeam); } } else { - if (CalcLikeSign) + if (calcLikeSign) histos.fill(HIST("h3KstarInvMasslikeSign"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarBeam); } } else if (activateTHnSparseCosThStarRandom) { @@ -480,11 +480,11 @@ struct kstarqa { if (track1.sign() * track2.sign() < 0) { if (!isMix) { histos.fill(HIST("h3KstarInvMassUnlikeSign"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarRandom); - for (int i = 0; i < c_nof_rotations; i++) { - float theta2 = rn->Uniform(0, TMath::Pi()); + for (int i = 0; i < cRotations; i++) { + float theta2 = rn->Uniform(0, o2::constants::math::PI); lv4.SetPtEtaPhiM(track1.pt(), track1.eta(), track1.phi() + theta2, massKa); // for rotated background lv5 = lv2 + lv4; - if (CalcRotational) + if (calcRotational) histos.fill(HIST("h3KstarInvMassRotated"), multiplicity, lv5.Pt(), lv5.M(), cosThetaStarRandom); } } else { @@ -492,7 +492,7 @@ struct kstarqa { } } else { if (!isMix) { - if (CalcLikeSign) + if (calcLikeSign) histos.fill(HIST("h3KstarInvMasslikeSign"), multiplicity, lv3.Pt(), lv3.M(), cosThetaStarRandom); } } @@ -505,7 +505,7 @@ struct kstarqa { { histos.fill(HIST("events_check_data"), 0.5); - if (TVXEvsel && (!collision.selection_bit(aod::evsel::kIsTriggerTVX))) { + if (cTVXEvsel && (!collision.selection_bit(aod::evsel::kIsTriggerTVX))) { return; } histos.fill(HIST("events_check_data"), 1.5); @@ -525,7 +525,7 @@ struct kstarqa { multiplicity = (cfgFT0M) ? collision.centFT0M() : collision.centFT0C(); // Fill the event counter - if (QAevents) { + if (cQAevents) { rEventSelection.fill(HIST("hVertexZRec"), collision.posZ()); rEventSelection.fill(HIST("hmult"), multiplicity); histos.fill(HIST("multdist_FT0M"), collision.multFT0M()); @@ -534,8 +534,8 @@ struct kstarqa { // histos.fill(HIST("hNcontributor"), collision.numContrib()); } - for (auto& [track1, track2] : combinations(CombinationsFullIndexPolicy(tracks, tracks))) { - if (QAbefore) { + for (const auto& [track1, track2] : combinations(CombinationsFullIndexPolicy(tracks, tracks))) { + if (cQAbefore) { histos.fill(HIST("hNsigmaTPC_before"), track1.pt(), track1.tpcNSigmaKa()); histos.fill(HIST("hNsigmaTOF_before"), track1.pt(), track1.tofNSigmaKa()); histos.fill(HIST("hCRFC_before"), track1.tpcCrossedRowsOverFindableCls()); @@ -551,7 +551,7 @@ struct kstarqa { continue; } histos.fill(HIST("events_check_data"), 5.5); - if (QAevents) { + if (cQAevents) { histos.fill(HIST("hDcaxy"), track1.dcaXY()); histos.fill(HIST("hDcaz"), track1.dcaZ()); } @@ -564,18 +564,18 @@ struct kstarqa { histos.fill(HIST("events_check_data"), 6.5); - if (MID) { - if (MIDselectionPID(track1, 0)) // Kaon misidentified as pion + if (cMID) { + if (cMIDselectionPID(track1, 0)) // Kaon misidentified as pion continue; - if (MIDselectionPID(track1, 2)) // Kaon misidentified as proton + if (cMIDselectionPID(track1, 2)) // Kaon misidentified as proton continue; - if (MIDselectionPID(track2, 1)) // Pion misidentified as kaon + if (cMIDselectionPID(track2, 1)) // Pion misidentified as kaon continue; } histos.fill(HIST("events_check_data"), 7.5); - if (QAafter) { + if (cQAafter) { histos.fill(HIST("hEta_after"), track1.eta()); histos.fill(HIST("hCRFC_after"), track1.tpcCrossedRowsOverFindableCls()); // histos.fill(HIST("hNsigmaKaonTPC_after"), track1.pt(), track1.tpcNSigmaKa()); @@ -598,7 +598,7 @@ struct kstarqa { } } - PROCESS_SWITCH(kstarqa, processSE, "Process Same event", true); + PROCESS_SWITCH(Kstarqa, processSE, "Process Same event", true); ConfigurableAxis axisVertex{"axisVertex", {20, -10, 10}, "vertex axis for ME mixing"}; ConfigurableAxis axisMultiplicityClass{"axisMultiplicityClass", {10, 0, 100}, "multiplicity percentile for ME mixing"}; @@ -617,7 +617,7 @@ struct kstarqa { void processME(EventCandidates const&, TrackCandidates const&) { if (cfgFT0M) { - for (auto& [c1, tracks1, c2, tracks2] : pair1) { + for (const auto& [c1, tracks1, c2, tracks2] : pair1) { if (!c1.sel8()) { continue; @@ -630,13 +630,13 @@ struct kstarqa { continue; } - if (TVXEvsel && (!c1.selection_bit(aod::evsel::kIsTriggerTVX) || !c2.selection_bit(aod::evsel::kIsTriggerTVX))) { + if (cTVXEvsel && (!c1.selection_bit(aod::evsel::kIsTriggerTVX) || !c2.selection_bit(aod::evsel::kIsTriggerTVX))) { return; } auto multiplicity = c1.centFT0M(); - for (auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { + for (const auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { if (!selectionTrack(t1)) // Kaon continue; @@ -646,30 +646,30 @@ struct kstarqa { continue; if (!selectionPID(t2, 0)) // Pion continue; - if (MID) { - if (MIDselectionPID(t1, 0)) // misidentified as pion + if (cMID) { + if (cMIDselectionPID(t1, 0)) // misidentified as pion continue; - if (MIDselectionPID(t1, 2)) // misidentified as proton + if (cMIDselectionPID(t1, 2)) // misidentified as proton continue; - if (MIDselectionPID(t2, 1)) // misidentified as kaon + if (cMIDselectionPID(t2, 1)) // misidentified as kaon continue; } - TLorentzVector KAON; - KAON.SetPtEtaPhiM(t1.pt(), t1.eta(), t1.phi(), massKa); - TLorentzVector PION; - PION.SetPtEtaPhiM(t2.pt(), t2.eta(), t2.phi(), massPi); + TLorentzVector vKAON; + vKAON.SetPtEtaPhiM(t1.pt(), t1.eta(), t1.phi(), massKa); + TLorentzVector vPION; + vPION.SetPtEtaPhiM(t2.pt(), t2.eta(), t2.phi(), massPi); - TLorentzVector Kstar = KAON + PION; + TLorentzVector kstar = vKAON + vPION; bool isMix = true; - if (TMath::Abs(Kstar.Rapidity()) < 0.5) { - fillInvMass(t1, t2, PION, Kstar, multiplicity, isMix); + if (std::abs(kstar.Rapidity()) < 0.5) { + fillInvMass(t1, t2, vPION, kstar, multiplicity, isMix); } } } } else { - for (auto& [c1, tracks1, c2, tracks2] : pair2) { + for (const auto& [c1, tracks1, c2, tracks2] : pair2) { if (!c1.sel8()) { continue; @@ -682,13 +682,13 @@ struct kstarqa { continue; } - if (TVXEvsel && (!c1.selection_bit(aod::evsel::kIsTriggerTVX) || !c2.selection_bit(aod::evsel::kIsTriggerTVX))) { + if (cTVXEvsel && (!c1.selection_bit(aod::evsel::kIsTriggerTVX) || !c2.selection_bit(aod::evsel::kIsTriggerTVX))) { return; } auto multiplicity = c1.centFT0C(); - for (auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { + for (const auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { if (!selectionTrack(t1)) // Kaon continue; @@ -698,51 +698,51 @@ struct kstarqa { continue; if (!selectionPID(t2, 0)) // Pion continue; - if (MID) { - if (MIDselectionPID(t1, 0)) // misidentified as pion + if (cMID) { + if (cMIDselectionPID(t1, 0)) // misidentified as pion continue; - if (MIDselectionPID(t1, 2)) // misidentified as proton + if (cMIDselectionPID(t1, 2)) // misidentified as proton continue; - if (MIDselectionPID(t2, 1)) // misidentified as kaon + if (cMIDselectionPID(t2, 1)) // misidentified as kaon continue; } - TLorentzVector KAON; - KAON.SetPtEtaPhiM(t1.pt(), t1.eta(), t1.phi(), massKa); - TLorentzVector PION; - PION.SetPtEtaPhiM(t2.pt(), t2.eta(), t2.phi(), massPi); + TLorentzVector vKAON; + vKAON.SetPtEtaPhiM(t1.pt(), t1.eta(), t1.phi(), massKa); + TLorentzVector vPION; + vPION.SetPtEtaPhiM(t2.pt(), t2.eta(), t2.phi(), massPi); - TLorentzVector Kstar = KAON + PION; + TLorentzVector kstar = vKAON + vPION; bool isMix = true; - if (TMath::Abs(Kstar.Rapidity()) < 0.5) { - fillInvMass(t1, t2, PION, Kstar, multiplicity, isMix); + if (std::abs(kstar.Rapidity()) < 0.5) { + fillInvMass(t1, t2, vPION, kstar, multiplicity, isMix); } } } } } - PROCESS_SWITCH(kstarqa, processME, "Process Mixed event", true); + PROCESS_SWITCH(Kstarqa, processME, "Process Mixed event", true); - void processGen(aod::McCollision const& mcCollision, aod::McParticles& mcParticles, const soa::SmallGroups& collisions) + void processGen(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups& collisions) { histos.fill(HIST("events_check"), 0.5); if (std::abs(mcCollision.posZ()) < cutzvertex) { histos.fill(HIST("events_check"), 1.5); } - int Nchinel = 0; - for (auto& mcParticle : mcParticles) { + int nChInel = 0; + for (const auto& mcParticle : mcParticles) { auto pdgcode = std::abs(mcParticle.pdgCode()); if (mcParticle.isPhysicalPrimary() && (pdgcode == 211 || pdgcode == 321 || pdgcode == 2212 || pdgcode == 11 || pdgcode == 13)) { if (std::abs(mcParticle.eta()) < 1.0) { - Nchinel = Nchinel + 1; + nChInel = nChInel + 1; } } } - if (Nchinel > 0 && std::abs(mcCollision.posZ()) < cutzvertex) + if (nChInel > 0 && std::abs(mcCollision.posZ()) < cutzvertex) histos.fill(HIST("events_check"), 2.5); - std::vector SelectedEvents(collisions.size()); + std::vector selectedEvents(collisions.size()); int nevts = 0; for (const auto& collision : collisions) { // if (!collision.sel8() || std::abs(collision.mcCollision().posZ()) > cutzvertex) { @@ -753,26 +753,26 @@ struct kstarqa { if (timFrameEvsel && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) { continue; } - if (TVXEvsel && (!collision.selection_bit(aod::evsel::kIsTriggerTVX))) { + if (cTVXEvsel && (!collision.selection_bit(aod::evsel::kIsTriggerTVX))) { continue; } - SelectedEvents[nevts++] = collision.mcCollision_as().globalIndex(); + selectedEvents[nevts++] = collision.mcCollision_as().globalIndex(); } - SelectedEvents.resize(nevts); + selectedEvents.resize(nevts); histos.fill(HIST("events_check"), 3.5); - const auto evtReconstructedAndSelected = std::find(SelectedEvents.begin(), SelectedEvents.end(), mcCollision.globalIndex()) != SelectedEvents.end(); + const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end(); - if (!AllGenCollisions && !evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection + if (!cAllGenCollisions && !evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection return; } histos.fill(HIST("events_check"), 4.5); - for (auto& mcParticle : mcParticles) { + for (const auto& mcParticle : mcParticles) { if (std::abs(mcParticle.y()) >= 0.5) { continue; } histos.fill(HIST("events_check"), 5.5); - if (abs(mcParticle.pdgCode()) != 313) { + if (std::abs(mcParticle.pdgCode()) != 313) { continue; } histos.fill(HIST("events_check"), 6.5); @@ -783,16 +783,16 @@ struct kstarqa { histos.fill(HIST("events_check"), 7.5); auto passkaon = false; auto passpion = false; - for (auto kCurrentDaughter : kDaughters) { + for (const auto& kCurrentDaughter : kDaughters) { if (!kCurrentDaughter.isPhysicalPrimary()) { continue; } histos.fill(HIST("events_check"), 8.5); - if (abs(kCurrentDaughter.pdgCode()) == 321) { + if (std::abs(kCurrentDaughter.pdgCode()) == 321) { // if (kCurrentDaughter.pdgCode() == +321) { passkaon = true; histos.fill(HIST("events_check"), 9.5); - } else if (abs(kCurrentDaughter.pdgCode()) == 211) { + } else if (std::abs(kCurrentDaughter.pdgCode()) == 211) { //} else if (kCurrentDaughter.pdgCode() == -321) { passpion = true; // histos.fill(HIST("events_check"), 10.5); @@ -806,7 +806,7 @@ struct kstarqa { } } } - PROCESS_SWITCH(kstarqa, processGen, "Process Generated", false); + PROCESS_SWITCH(Kstarqa, processGen, "Process Generated", false); void processRec(EventCandidatesMC::iterator const& collision, TrackCandidatesMC const& tracks, aod::McParticles const&, aod::McCollisions const& /*mcCollisions*/) { @@ -828,13 +828,13 @@ struct kstarqa { return; } histos.fill(HIST("events_checkrec"), 3.5); - if (TVXEvsel && (!collision.selection_bit(aod::evsel::kIsTriggerTVX))) { + if (cTVXEvsel && (!collision.selection_bit(aod::evsel::kIsTriggerTVX))) { return; } histos.fill(HIST("events_checkrec"), 4.5); auto oldindex = -999; - for (auto track1 : tracks) { + for (const auto& track1 : tracks) { if (!selectionTrack(track1)) { continue; } @@ -844,7 +844,7 @@ struct kstarqa { } histos.fill(HIST("events_checkrec"), 6.5); auto track1ID = track1.index(); - for (auto track2 : tracks) { + for (const auto& track2 : tracks) { if (!track2.has_mcParticle()) { continue; } @@ -886,8 +886,8 @@ struct kstarqa { } // LOG(info) << "trackpdgs are:"<()) { - for (auto& mothertrack2 : mctrack2.mothers_as()) { + for (const auto& mothertrack1 : mctrack1.mothers_as()) { + for (const auto& mothertrack2 : mctrack2.mothers_as()) { if (mothertrack1.pdgCode() != mothertrack2.pdgCode()) { continue; } @@ -913,13 +913,13 @@ struct kstarqa { continue; } oldindex = mothertrack1.globalIndex(); - pvec0 = array{track1.px(), track1.py(), track1.pz()}; - pvec1 = array{track2.px(), track2.py(), track2.pz()}; - auto arrMomrec = array{pvec0, pvec1}; + pvec0 = std::array{track1.px(), track1.py(), track1.pz()}; + pvec1 = std::array{track2.px(), track2.py(), track2.pz()}; + auto arrMomrec = std::array{pvec0, pvec1}; auto motherP = mothertrack1.p(); auto motherE = mothertrack1.e(); auto genMass = std::sqrt(motherE * motherE - motherP * motherP); - auto recMass = RecoDecay::m(arrMomrec, array{massKa, massPi}); + auto recMass = RecoDecay::m(arrMomrec, std::array{massKa, massPi}); // auto recpt = TMath::Sqrt((track1.px() + track2.px()) * (track1.px() + track2.px()) + (track1.py() + track2.py()) * (track1.py() + track2.py())); //// Resonance reconstruction lDecayDaughter1.SetXYZM(track1.px(), track1.py(), track1.pz(), massKa); @@ -935,10 +935,10 @@ struct kstarqa { } } } - PROCESS_SWITCH(kstarqa, processRec, "Process Reconstructed", false); + PROCESS_SWITCH(Kstarqa, processRec, "Process Reconstructed", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{adaptAnalysisTask(cfgc)}; + return WorkflowSpec{adaptAnalysisTask(cfgc)}; } diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index 7b8ea9683d9..f04a66337e6 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -127,6 +127,8 @@ struct derivedlambdakzeroanalysis { Configurable skipTPConly{"skipTPConly", false, "skip V0s comprised of at least one TPC only prong"}; Configurable requirePosITSonly{"requirePosITSonly", false, "require that positive track is ITSonly (overrides TPC quality)"}; Configurable requireNegITSonly{"requireNegITSonly", false, "require that negative track is ITSonly (overrides TPC quality)"}; + Configurable rejectPosITSafterburner{"rejectPosITSafterburner", false, "reject positive track formed out of afterburner ITS tracks"}; + Configurable rejectNegITSafterburner{"rejectNegITSafterburner", false, "reject negative track formed out of afterburner ITS tracks"}; // PID (TPC/TOF) Configurable TpcPidNsigmaCut{"TpcPidNsigmaCut", 5, "TpcPidNsigmaCut"}; @@ -142,7 +144,7 @@ struct derivedlambdakzeroanalysis { Configurable doCompleteTopoQA{"doCompleteTopoQA", false, "do topological variable QA histograms"}; Configurable doTPCQA{"doTPCQA", false, "do TPC QA histograms"}; Configurable doTOFQA{"doTOFQA", false, "do TOF QA histograms"}; - Configurable doDetectPropQA{"doDetectPropQA", 0, "do Detector/ITS map QA: 0: no, 1: 4D, 2: 5D with mass"}; + Configurable doDetectPropQA{"doDetectPropQA", 0, "do Detector/ITS map QA: 0: no, 1: 4D, 2: 5D with mass; 3: plain in 3D"}; Configurable doPlainTopoQA{"doPlainTopoQA", true, "do simple 1D QA of candidates"}; Configurable qaMinPt{"qaMinPt", 0.0f, "minimum pT for QA plots"}; @@ -223,6 +225,7 @@ struct derivedlambdakzeroanalysis { ConfigurableAxis axisV0Radius{"axisV0Radius", {20, 0.0f, 60.0f}, "V0 2D radius (cm)"}; ConfigurableAxis axisNsigmaTPC{"axisNsigmaTPC", {200, -10.0f, 10.0f}, "N sigma TPC"}; ConfigurableAxis axisTPCsignal{"axisTPCsignal", {200, 0.0f, 200.0f}, "TPC signal"}; + ConfigurableAxis axisNsigmaTOF{"axisNsigmaTOF", {200, -10.0f, 10.0f}, "N sigma TOF"}; ConfigurableAxis axisTOFdeltaT{"axisTOFdeltaT", {200, -5000.0f, 5000.0f}, "TOF Delta T (ps)"}; ConfigurableAxis axisPhi{"axisPhi", {18, 0.0f, constants::math::TwoPI}, "Azimuth angle (rad)"}; ConfigurableAxis axisEta{"axisEta", {10, -1.0f, 1.0f}, "#eta"}; @@ -454,10 +457,16 @@ struct derivedlambdakzeroanalysis { histos.add("K0Short/h3dNegTPCsignalVsTrackPt", "h3dNegTPCsignalVsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisTPCsignal}); } if (doTOFQA) { + histos.add("K0Short/h3dPosNsigmaTOF", "h3dPosNsigmaTOF", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); + histos.add("K0Short/h3dNegNsigmaTOF", "h3dNegNsigmaTOF", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); histos.add("K0Short/h3dPosTOFdeltaT", "h3dPosTOFdeltaT", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); histos.add("K0Short/h3dNegTOFdeltaT", "h3dNegTOFdeltaT", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); + histos.add("K0Short/h3dPosNsigmaTOFvsTrackPtot", "h3dPosNsigmaTOFvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); + histos.add("K0Short/h3dNegNsigmaTOFvsTrackPtot", "h3dNegNsigmaTOFvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); histos.add("K0Short/h3dPosTOFdeltaTvsTrackPtot", "h3dPosTOFdeltaTvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); histos.add("K0Short/h3dNegTOFdeltaTvsTrackPtot", "h3dNegTOFdeltaTvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); + histos.add("K0Short/h3dPosNsigmaTOFvsTrackPt", "h3dPosNsigmaTOFvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); + histos.add("K0Short/h3dNegNsigmaTOFvsTrackPt", "h3dNegNsigmaTOFvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); histos.add("K0Short/h3dPosTOFdeltaTvsTrackPt", "h3dPosTOFdeltaTvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); histos.add("K0Short/h3dNegTOFdeltaTvsTrackPt", "h3dNegTOFdeltaTvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); } @@ -475,6 +484,12 @@ struct derivedlambdakzeroanalysis { histos.add("K0Short/h5dPosDetectPropVsCentrality", "h5dPosDetectPropVsCentrality", kTHnF, {axisCentrality, axisDetMap, axisITScluMap, axisPtCoarse, axisK0Mass}); histos.add("K0Short/h5dNegDetectPropVsCentrality", "h5dNegDetectPropVsCentrality", kTHnF, {axisCentrality, axisDetMap, axisITScluMap, axisPtCoarse, axisK0Mass}); } + if (doDetectPropQA == 3) { + histos.add("K0Short/h3dPositiveITSclusters", "h3dPositiveITSclusters", kTH3F, {axisCentrality, axisPtCoarse, axisITSclus}); + histos.add("K0Short/h3dNegativeITSclusters", "h3dNegativeITSclusters", kTH3F, {axisCentrality, axisPtCoarse, axisITSclus}); + histos.add("K0Short/h3dPositiveTPCcrossedRows", "h3dPositiveTPCcrossedRows", kTH3F, {axisCentrality, axisPtCoarse, axisTPCrows}); + histos.add("K0Short/h3dNegativeTPCcrossedRows", "h3dNegativeTPCcrossedRows", kTH3F, {axisCentrality, axisPtCoarse, axisTPCrows}); + } } if (analyseLambda) { histos.add("h2dNbrOfLambdaVsCentrality", "h2dNbrOfLambdaVsCentrality", kTH2F, {axisCentrality, {10, -0.5f, 9.5f}}); @@ -500,10 +515,16 @@ struct derivedlambdakzeroanalysis { histos.add("Lambda/h3dNegTPCsignalVsTrackPt", "h3dNegTPCsignalVsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisTPCsignal}); } if (doTOFQA) { + histos.add("Lambda/h3dPosNsigmaTOF", "h3dPosNsigmaTOF", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); + histos.add("Lambda/h3dNegNsigmaTOF", "h3dNegNsigmaTOF", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); histos.add("Lambda/h3dPosTOFdeltaT", "h3dPosTOFdeltaT", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); histos.add("Lambda/h3dNegTOFdeltaT", "h3dNegTOFdeltaT", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); + histos.add("Lambda/h3dPosNsigmaTOFvsTrackPtot", "h3dPosNsigmaTOFvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); + histos.add("Lambda/h3dNegNsigmaTOFvsTrackPtot", "h3dNegNsigmaTOFvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); histos.add("Lambda/h3dPosTOFdeltaTvsTrackPtot", "h3dPosTOFdeltaTvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); histos.add("Lambda/h3dNegTOFdeltaTvsTrackPtot", "h3dNegTOFdeltaTvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); + histos.add("Lambda/h3dPosNsigmaTOFvsTrackPt", "h3dPosNsigmaTOFvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); + histos.add("Lambda/h3dNegNsigmaTOFvsTrackPt", "h3dNegNsigmaTOFvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); histos.add("Lambda/h3dPosTOFdeltaTvsTrackPt", "h3dPosTOFdeltaTvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); histos.add("Lambda/h3dNegTOFdeltaTvsTrackPt", "h3dNegTOFdeltaTvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); } @@ -521,6 +542,12 @@ struct derivedlambdakzeroanalysis { histos.add("Lambda/h5dPosDetectPropVsCentrality", "h5dPosDetectPropVsCentrality", kTHnF, {axisCentrality, axisDetMap, axisITScluMap, axisPtCoarse, axisLambdaMass}); histos.add("Lambda/h5dNegDetectPropVsCentrality", "h5dNegDetectPropVsCentrality", kTHnF, {axisCentrality, axisDetMap, axisITScluMap, axisPtCoarse, axisLambdaMass}); } + if (doDetectPropQA == 3) { + histos.add("Lambda/h3dPositiveITSclusters", "h3dPositiveITSclusters", kTH3F, {axisCentrality, axisPtCoarse, axisITSclus}); + histos.add("Lambda/h3dNegativeITSclusters", "h3dNegativeITSclusters", kTH3F, {axisCentrality, axisPtCoarse, axisITSclus}); + histos.add("Lambda/h3dPositiveTPCcrossedRows", "h3dPositiveTPCcrossedRows", kTH3F, {axisCentrality, axisPtCoarse, axisTPCrows}); + histos.add("Lambda/h3dNegativeTPCcrossedRows", "h3dNegativeTPCcrossedRows", kTH3F, {axisCentrality, axisPtCoarse, axisTPCrows}); + } } if (analyseAntiLambda) { histos.add("h2dNbrOfAntiLambdaVsCentrality", "h2dNbrOfAntiLambdaVsCentrality", kTH2F, {axisCentrality, {10, -0.5f, 9.5f}}); @@ -546,10 +573,16 @@ struct derivedlambdakzeroanalysis { histos.add("AntiLambda/h3dNegTPCsignalVsTrackPt", "h3dNegTPCsignalVsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisTPCsignal}); } if (doTOFQA) { + histos.add("AntiLambda/h3dPosNsigmaTOF", "h3dPosNsigmaTOF", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); + histos.add("AntiLambda/h3dNegNsigmaTOF", "h3dNegNsigmaTOF", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); histos.add("AntiLambda/h3dPosTOFdeltaT", "h3dPosTOFdeltaT", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); histos.add("AntiLambda/h3dNegTOFdeltaT", "h3dNegTOFdeltaT", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); + histos.add("AntiLambda/h3dPosNsigmaTOFvsTrackPtot", "h3dPosNsigmaTOFvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); + histos.add("AntiLambda/h3dNegNsigmaTOFvsTrackPtot", "h3dNegNsigmaTOFvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); histos.add("AntiLambda/h3dPosTOFdeltaTvsTrackPtot", "h3dPosTOFdeltaTvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); histos.add("AntiLambda/h3dNegTOFdeltaTvsTrackPtot", "h3dNegTOFdeltaTvsTrackPtot", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); + histos.add("AntiLambda/h3dPosNsigmaTOFvsTrackPt", "h3dPosNsigmaTOFvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); + histos.add("AntiLambda/h3dNegNsigmaTOFvsTrackPt", "h3dNegNsigmaTOFvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisNsigmaTOF}); histos.add("AntiLambda/h3dPosTOFdeltaTvsTrackPt", "h3dPosTOFdeltaTvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); histos.add("AntiLambda/h3dNegTOFdeltaTvsTrackPt", "h3dNegTOFdeltaTvsTrackPt", kTH3F, {axisCentrality, axisPtCoarse, axisTOFdeltaT}); } @@ -567,6 +600,12 @@ struct derivedlambdakzeroanalysis { histos.add("AntiLambda/h5dPosDetectPropVsCentrality", "h5dPosDetectPropVsCentrality", kTHnF, {axisCentrality, axisDetMap, axisITScluMap, axisPtCoarse, axisLambdaMass}); histos.add("AntiLambda/h5dNegDetectPropVsCentrality", "h5dNegDetectPropVsCentrality", kTHnF, {axisCentrality, axisDetMap, axisITScluMap, axisPtCoarse, axisLambdaMass}); } + if (doDetectPropQA == 3) { + histos.add("AntiLambda/h3dPositiveITSclusters", "h3dPositiveITSclusters", kTH3F, {axisCentrality, axisPtCoarse, axisITSclus}); + histos.add("AntiLambda/h3dNegativeITSclusters", "h3dNegativeITSclusters", kTH3F, {axisCentrality, axisPtCoarse, axisITSclus}); + histos.add("AntiLambda/h3dPositiveTPCcrossedRows", "h3dPositiveTPCcrossedRows", kTH3F, {axisCentrality, axisPtCoarse, axisTPCrows}); + histos.add("AntiLambda/h3dNegativeTPCcrossedRows", "h3dNegativeTPCcrossedRows", kTH3F, {axisCentrality, axisPtCoarse, axisTPCrows}); + } } if (analyseLambda && calculateFeeddownMatrix && doprocessMonteCarlo) @@ -747,9 +786,13 @@ struct derivedlambdakzeroanalysis { auto negTrackExtra = v0.template negTrackExtra_as(); // ITS quality flags - if (posTrackExtra.itsNCls() >= v0Selections.minITSclusters) + bool posIsFromAfterburner = posTrackExtra.itsChi2PerNcl() < 0; + bool negIsFromAfterburner = negTrackExtra.itsChi2PerNcl() < 0; + + // check minimum number of ITS clusters + reject ITS afterburner tracks if requested + if (posTrackExtra.itsNCls() >= v0Selections.minITSclusters && (!v0Selections.rejectPosITSafterburner || !posIsFromAfterburner)) bitset(bitMap, selPosGoodITSTrack); - if (negTrackExtra.itsNCls() >= v0Selections.minITSclusters) + if (negTrackExtra.itsNCls() >= v0Selections.minITSclusters && (!v0Selections.rejectNegITSafterburner || !negIsFromAfterburner)) bitset(bitMap, selNegGoodITSTrack); // TPC quality flags @@ -1122,6 +1165,12 @@ struct derivedlambdakzeroanalysis { histos.fill(HIST("K0Short/h5dPosDetectPropVsCentrality"), centrality, posTrackExtra.detectorMap(), posTrackExtra.itsClusterMap(), pt, v0.mK0Short()); histos.fill(HIST("K0Short/h5dNegDetectPropVsCentrality"), centrality, negTrackExtra.detectorMap(), negTrackExtra.itsClusterMap(), pt, v0.mK0Short()); } + if (doDetectPropQA == 3) { + histos.fill(HIST("K0Short/h3dPositiveITSclusters"), centrality, pt, posTrackExtra.itsNCls()); + histos.fill(HIST("K0Short/h3dNegativeITSclusters"), centrality, pt, negTrackExtra.itsNCls()); + histos.fill(HIST("K0Short/h3dPositiveTPCcrossedRows"), centrality, pt, posTrackExtra.tpcCrossedRows()); + histos.fill(HIST("K0Short/h3dNegativeTPCcrossedRows"), centrality, pt, negTrackExtra.tpcCrossedRows()); + } if (doTPCQA) { histos.fill(HIST("K0Short/h3dPosNsigmaTPC"), centrality, pt, posTrackExtra.tpcNSigmaPi()); histos.fill(HIST("K0Short/h3dNegNsigmaTPC"), centrality, pt, negTrackExtra.tpcNSigmaPi()); @@ -1137,10 +1186,16 @@ struct derivedlambdakzeroanalysis { histos.fill(HIST("K0Short/h3dNegTPCsignalVsTrackPt"), centrality, v0.negativept(), negTrackExtra.tpcSignal()); } if (doTOFQA) { + histos.fill(HIST("K0Short/h3dPosNsigmaTOF"), centrality, pt, v0.tofNSigmaK0PiPlus()); + histos.fill(HIST("K0Short/h3dNegNsigmaTOF"), centrality, pt, v0.tofNSigmaK0PiMinus()); histos.fill(HIST("K0Short/h3dPosTOFdeltaT"), centrality, pt, v0.posTOFDeltaTK0Pi()); histos.fill(HIST("K0Short/h3dNegTOFdeltaT"), centrality, pt, v0.negTOFDeltaTK0Pi()); + histos.fill(HIST("K0Short/h3dPosNsigmaTOFvsTrackPtot"), centrality, v0.positivept() * TMath::CosH(v0.positiveeta()), v0.tofNSigmaK0PiPlus()); + histos.fill(HIST("K0Short/h3dNegNsigmaTOFvsTrackPtot"), centrality, v0.negativept() * TMath::CosH(v0.negativeeta()), v0.tofNSigmaK0PiMinus()); histos.fill(HIST("K0Short/h3dPosTOFdeltaTvsTrackPtot"), centrality, v0.positivept() * TMath::CosH(v0.positiveeta()), v0.posTOFDeltaTK0Pi()); histos.fill(HIST("K0Short/h3dNegTOFdeltaTvsTrackPtot"), centrality, v0.negativept() * TMath::CosH(v0.negativeeta()), v0.negTOFDeltaTK0Pi()); + histos.fill(HIST("K0Short/h3dPosNsigmaTOFvsTrackPt"), centrality, v0.positivept(), v0.tofNSigmaK0PiPlus()); + histos.fill(HIST("K0Short/h3dNegNsigmaTOFvsTrackPt"), centrality, v0.negativept(), v0.tofNSigmaK0PiMinus()); histos.fill(HIST("K0Short/h3dPosTOFdeltaTvsTrackPt"), centrality, v0.positivept(), v0.posTOFDeltaTK0Pi()); histos.fill(HIST("K0Short/h3dNegTOFdeltaTvsTrackPt"), centrality, v0.negativept(), v0.negTOFDeltaTK0Pi()); } @@ -1175,6 +1230,12 @@ struct derivedlambdakzeroanalysis { histos.fill(HIST("Lambda/h5dPosDetectPropVsCentrality"), centrality, posTrackExtra.detectorMap(), posTrackExtra.itsClusterMap(), pt, v0.mLambda()); histos.fill(HIST("Lambda/h5dNegDetectPropVsCentrality"), centrality, negTrackExtra.detectorMap(), negTrackExtra.itsClusterMap(), pt, v0.mLambda()); } + if (doDetectPropQA == 3) { + histos.fill(HIST("Lambda/h3dPositiveITSclusters"), centrality, pt, posTrackExtra.itsNCls()); + histos.fill(HIST("Lambda/h3dNegativeITSclusters"), centrality, pt, negTrackExtra.itsNCls()); + histos.fill(HIST("Lambda/h3dPositiveTPCcrossedRows"), centrality, pt, posTrackExtra.tpcCrossedRows()); + histos.fill(HIST("Lambda/h3dNegativeTPCcrossedRows"), centrality, pt, negTrackExtra.tpcCrossedRows()); + } if (doTPCQA) { histos.fill(HIST("Lambda/h3dPosNsigmaTPC"), centrality, pt, posTrackExtra.tpcNSigmaPr()); histos.fill(HIST("Lambda/h3dNegNsigmaTPC"), centrality, pt, negTrackExtra.tpcNSigmaPi()); @@ -1190,10 +1251,16 @@ struct derivedlambdakzeroanalysis { histos.fill(HIST("Lambda/h3dNegTPCsignalVsTrackPt"), centrality, v0.negativept(), negTrackExtra.tpcSignal()); } if (doTOFQA) { + histos.fill(HIST("Lambda/h3dPosNsigmaTOF"), centrality, pt, v0.tofNSigmaLaPr()); + histos.fill(HIST("Lambda/h3dNegNsigmaTOF"), centrality, pt, v0.tofNSigmaLaPi()); histos.fill(HIST("Lambda/h3dPosTOFdeltaT"), centrality, pt, v0.posTOFDeltaTLaPr()); histos.fill(HIST("Lambda/h3dNegTOFdeltaT"), centrality, pt, v0.negTOFDeltaTLaPi()); + histos.fill(HIST("Lambda/h3dPosNsigmaTOFvsTrackPtot"), centrality, v0.positivept() * TMath::CosH(v0.positiveeta()), v0.tofNSigmaLaPr()); + histos.fill(HIST("Lambda/h3dNegNsigmaTOFvsTrackPtot"), centrality, v0.negativept() * TMath::CosH(v0.negativeeta()), v0.tofNSigmaLaPi()); histos.fill(HIST("Lambda/h3dPosTOFdeltaTvsTrackPtot"), centrality, v0.positivept() * TMath::CosH(v0.positiveeta()), v0.posTOFDeltaTLaPr()); histos.fill(HIST("Lambda/h3dNegTOFdeltaTvsTrackPtot"), centrality, v0.negativept() * TMath::CosH(v0.negativeeta()), v0.negTOFDeltaTLaPi()); + histos.fill(HIST("Lambda/h3dPosNsigmaTOFvsTrackPt"), centrality, v0.positivept(), v0.tofNSigmaLaPr()); + histos.fill(HIST("Lambda/h3dNegNsigmaTOFvsTrackPt"), centrality, v0.negativept(), v0.tofNSigmaLaPi()); histos.fill(HIST("Lambda/h3dPosTOFdeltaTvsTrackPt"), centrality, v0.positivept(), v0.posTOFDeltaTLaPr()); histos.fill(HIST("Lambda/h3dNegTOFdeltaTvsTrackPt"), centrality, v0.negativept(), v0.negTOFDeltaTLaPi()); } @@ -1228,6 +1295,12 @@ struct derivedlambdakzeroanalysis { histos.fill(HIST("AntiLambda/h5dPosDetectPropVsCentrality"), centrality, posTrackExtra.detectorMap(), posTrackExtra.itsClusterMap(), pt, v0.mAntiLambda()); histos.fill(HIST("AntiLambda/h5dNegDetectPropVsCentrality"), centrality, negTrackExtra.detectorMap(), negTrackExtra.itsClusterMap(), pt, v0.mAntiLambda()); } + if (doDetectPropQA == 3) { + histos.fill(HIST("AntiLambda/h3dPositiveITSclusters"), centrality, pt, posTrackExtra.itsNCls()); + histos.fill(HIST("AntiLambda/h3dNegativeITSclusters"), centrality, pt, negTrackExtra.itsNCls()); + histos.fill(HIST("AntiLambda/h3dPositiveTPCcrossedRows"), centrality, pt, posTrackExtra.tpcCrossedRows()); + histos.fill(HIST("AntiLambda/h3dNegativeTPCcrossedRows"), centrality, pt, negTrackExtra.tpcCrossedRows()); + } if (doTPCQA) { histos.fill(HIST("AntiLambda/h3dPosNsigmaTPC"), centrality, pt, posTrackExtra.tpcNSigmaPi()); histos.fill(HIST("AntiLambda/h3dNegNsigmaTPC"), centrality, pt, negTrackExtra.tpcNSigmaPr()); @@ -1243,10 +1316,16 @@ struct derivedlambdakzeroanalysis { histos.fill(HIST("AntiLambda/h3dNegTPCsignalVsTrackPt"), centrality, v0.negativept(), negTrackExtra.tpcSignal()); } if (doTOFQA) { + histos.fill(HIST("AntiLambda/h3dPosNsigmaTOF"), centrality, pt, v0.tofNSigmaALaPi()); + histos.fill(HIST("AntiLambda/h3dNegNsigmaTOF"), centrality, pt, v0.tofNSigmaALaPr()); histos.fill(HIST("AntiLambda/h3dPosTOFdeltaT"), centrality, pt, v0.posTOFDeltaTLaPi()); histos.fill(HIST("AntiLambda/h3dNegTOFdeltaT"), centrality, pt, v0.negTOFDeltaTLaPr()); + histos.fill(HIST("AntiLambda/h3dPosNsigmaTOFvsTrackPtot"), centrality, v0.positivept() * TMath::CosH(v0.positiveeta()), v0.tofNSigmaALaPi()); + histos.fill(HIST("AntiLambda/h3dNegNsigmaTOFvsTrackPtot"), centrality, v0.negativept() * TMath::CosH(v0.negativeeta()), v0.tofNSigmaALaPr()); histos.fill(HIST("AntiLambda/h3dPosTOFdeltaTvsTrackPtot"), centrality, v0.positivept() * TMath::CosH(v0.positiveeta()), v0.posTOFDeltaTLaPi()); histos.fill(HIST("AntiLambda/h3dNegTOFdeltaTvsTrackPtot"), centrality, v0.negativept() * TMath::CosH(v0.negativeeta()), v0.negTOFDeltaTLaPr()); + histos.fill(HIST("AntiLambda/h3dPosNsigmaTOFvsTrackPt"), centrality, v0.positivept(), v0.tofNSigmaALaPi()); + histos.fill(HIST("AntiLambda/h3dNegNsigmaTOFvsTrackPt"), centrality, v0.negativept(), v0.tofNSigmaALaPr()); histos.fill(HIST("AntiLambda/h3dPosTOFdeltaTvsTrackPt"), centrality, v0.positivept(), v0.posTOFDeltaTLaPi()); histos.fill(HIST("AntiLambda/h3dNegTOFdeltaTvsTrackPt"), centrality, v0.negativept(), v0.negTOFDeltaTLaPr()); } @@ -1456,13 +1535,13 @@ struct derivedlambdakzeroanalysis { histos.fill(HIST("hEventSelection"), 16 /* No other collision within the same ITS ROF */); float collisionOccupancy = useFT0CbasedOccupancy ? collision.ft0cOccupancyInTimeRange() : collision.trackOccupancyInTimeRange(); - if (minOccupancy > 0 && collisionOccupancy < minOccupancy) { + if (minOccupancy >= 0 && collisionOccupancy < minOccupancy) { return false; } if (fillHists) histos.fill(HIST("hEventSelection"), 17 /* Below min occupancy */); - if (maxOccupancy > 0 && collisionOccupancy > maxOccupancy) { + if (maxOccupancy >= 0 && collisionOccupancy > maxOccupancy) { return false; } if (fillHists) @@ -1752,10 +1831,10 @@ struct derivedlambdakzeroanalysis { centrality = collision.centFT0C(); float collisionOccupancy = useFT0CbasedOccupancy ? collision.ft0cOccupancyInTimeRange() : collision.trackOccupancyInTimeRange(); - if (minOccupancy > 0 && collisionOccupancy < minOccupancy) { + if (minOccupancy >= 0 && collisionOccupancy < minOccupancy) { continue; } - if (maxOccupancy > 0 && collisionOccupancy > maxOccupancy) { + if (maxOccupancy >= 0 && collisionOccupancy > maxOccupancy) { continue; } @@ -1808,10 +1887,10 @@ struct derivedlambdakzeroanalysis { centrality = collision.centFT0C(); float collisionOccupancy = useFT0CbasedOccupancy ? collision.ft0cOccupancyInTimeRange() : collision.trackOccupancyInTimeRange(); - if (minOccupancy > 0 && collisionOccupancy < minOccupancy) { + if (minOccupancy >= 0 && collisionOccupancy < minOccupancy) { continue; } - if (maxOccupancy > 0 && collisionOccupancy > maxOccupancy) { + if (maxOccupancy >= 0 && collisionOccupancy > maxOccupancy) { continue; } diff --git a/PWGLF/Tasks/Strangeness/lambdapolarization.cxx b/PWGLF/Tasks/Strangeness/lambdapolarization.cxx index eb9b3b12dc7..309c18c43f8 100644 --- a/PWGLF/Tasks/Strangeness/lambdapolarization.cxx +++ b/PWGLF/Tasks/Strangeness/lambdapolarization.cxx @@ -621,13 +621,14 @@ struct lambdapolarization { } double weight = cfgEffCor ? 1.0 / EffMap->GetBinContent(EffMap->GetXaxis()->FindBin(v0.pt()), EffMap->GetYaxis()->FindBin(centrality)) : 1.; + double qvecMag = TMath::Sqrt(TMath::Power(collision.qvecIm()[3 + (nmode - 2) * 28], 2) + TMath::Power(collision.qvecRe()[3 + (nmode - 2) * 28], 2)); if (nmode == 2) { //////////// if (LambdaTag) { histos.fill(HIST("psi2/h_lambda_cos"), v0.mLambda(), v0.pt(), angle, centrality, relphi, weight); histos.fill(HIST("psi2/h_lambda_cos2"), v0.mLambda(), v0.pt(), angle * angle, centrality, relphi, weight); histos.fill(HIST("psi2/h_lambda_cossin"), v0.mLambda(), v0.pt(), angle * TMath::Sin(relphi), centrality, weight); - histos.fill(HIST("psi2/h_lambda_vncos"), v0.mLambda(), v0.pt(), TMath::Cos(relphi), centrality, weight); + histos.fill(HIST("psi2/h_lambda_vncos"), v0.mLambda(), v0.pt(), qvecMag * TMath::Cos(relphi), centrality, weight); histos.fill(HIST("psi2/h_lambda_vnsin"), v0.mLambda(), v0.pt(), TMath::Sin(relphi), centrality, weight); if (cfgCalcCum) { @@ -652,7 +653,7 @@ struct lambdapolarization { histos.fill(HIST("psi2/h_alambda_cos"), v0.mAntiLambda(), v0.pt(), angle, centrality, relphi, weight); histos.fill(HIST("psi2/h_alambda_cos2"), v0.mAntiLambda(), v0.pt(), angle * angle, centrality, relphi, weight); histos.fill(HIST("psi2/h_alambda_cossin"), v0.mAntiLambda(), v0.pt(), angle * TMath::Sin(relphi), centrality, weight); - histos.fill(HIST("psi2/h_alambda_vncos"), v0.mAntiLambda(), v0.pt(), TMath::Cos(relphi), centrality, weight); + histos.fill(HIST("psi2/h_alambda_vncos"), v0.mAntiLambda(), v0.pt(), qvecMag * TMath::Cos(relphi), centrality, weight); histos.fill(HIST("psi2/h_alambda_vnsin"), v0.mAntiLambda(), v0.pt(), TMath::Sin(relphi), centrality, weight); if (cfgCalcCum) { @@ -678,14 +679,14 @@ struct lambdapolarization { histos.fill(HIST("psi3/h_lambda_cos"), v0.mLambda(), v0.pt(), angle, centrality, relphi, weight); histos.fill(HIST("psi3/h_lambda_cos2"), v0.mLambda(), v0.pt(), angle * angle, centrality, relphi, weight); histos.fill(HIST("psi3/h_lambda_cossin"), v0.mLambda(), v0.pt(), angle * TMath::Sin(relphi), centrality, weight); - histos.fill(HIST("psi3/h_lambda_vncos"), v0.mLambda(), v0.pt(), TMath::Cos(relphi), centrality, weight); + histos.fill(HIST("psi3/h_lambda_vncos"), v0.mLambda(), v0.pt(), qvecMag * TMath::Cos(relphi), centrality, weight); histos.fill(HIST("psi3/h_lambda_vnsin"), v0.mLambda(), v0.pt(), TMath::Sin(relphi), centrality, weight); } if (aLambdaTag) { histos.fill(HIST("psi3/h_alambda_cos"), v0.mAntiLambda(), v0.pt(), angle, centrality, relphi, weight); histos.fill(HIST("psi3/h_alambda_cos2"), v0.mAntiLambda(), v0.pt(), angle * angle, centrality, relphi, weight); histos.fill(HIST("psi3/h_alambda_cossin"), v0.mAntiLambda(), v0.pt(), angle * TMath::Sin(relphi), centrality, weight); - histos.fill(HIST("psi3/h_alambda_vncos"), v0.mAntiLambda(), v0.pt(), TMath::Cos(relphi), centrality, weight); + histos.fill(HIST("psi3/h_alambda_vncos"), v0.mAntiLambda(), v0.pt(), qvecMag * TMath::Cos(relphi), centrality, weight); histos.fill(HIST("psi3/h_alambda_vnsin"), v0.mAntiLambda(), v0.pt(), TMath::Sin(relphi), centrality, weight); } } else if (nmode == 4) { @@ -693,14 +694,14 @@ struct lambdapolarization { histos.fill(HIST("psi4/h_lambda_cos"), v0.mLambda(), v0.pt(), angle, centrality, relphi, weight); histos.fill(HIST("psi4/h_lambda_cos2"), v0.mLambda(), v0.pt(), angle * angle, centrality, relphi, weight); histos.fill(HIST("psi4/h_lambda_cossin"), v0.mLambda(), v0.pt(), angle * TMath::Sin(relphi), centrality, weight); - histos.fill(HIST("psi4/h_lambda_vncos"), v0.mLambda(), v0.pt(), TMath::Cos(relphi), centrality, weight); + histos.fill(HIST("psi4/h_lambda_vncos"), v0.mLambda(), v0.pt(), qvecMag * TMath::Cos(relphi), centrality, weight); histos.fill(HIST("psi4/h_lambda_vnsin"), v0.mLambda(), v0.pt(), TMath::Sin(relphi), centrality, weight); } if (aLambdaTag) { histos.fill(HIST("psi4/h_alambda_cos"), v0.mAntiLambda(), v0.pt(), angle, centrality, relphi, weight); histos.fill(HIST("psi4/h_alambda_cos2"), v0.mAntiLambda(), v0.pt(), angle * angle, centrality, relphi, weight); histos.fill(HIST("psi4/h_alambda_cossin"), v0.mAntiLambda(), v0.pt(), angle * TMath::Sin(relphi), centrality, weight); - histos.fill(HIST("psi4/h_alambda_vncos"), v0.mAntiLambda(), v0.pt(), TMath::Cos(relphi), centrality, weight); + histos.fill(HIST("psi4/h_alambda_vncos"), v0.mAntiLambda(), v0.pt(), qvecMag * TMath::Cos(relphi), centrality, weight); histos.fill(HIST("psi4/h_alambda_vnsin"), v0.mAntiLambda(), v0.pt(), TMath::Sin(relphi), centrality, weight); } } ////////// FIXME: not possible to get histograms using nmode diff --git a/PWGLF/Tasks/Strangeness/nonPromptCascade.cxx b/PWGLF/Tasks/Strangeness/nonPromptCascade.cxx index 5057a129e2d..9cc2bd3462e 100644 --- a/PWGLF/Tasks/Strangeness/nonPromptCascade.cxx +++ b/PWGLF/Tasks/Strangeness/nonPromptCascade.cxx @@ -13,7 +13,6 @@ #include #include #include -#include #include "CCDB/BasicCCDBManager.h" #include "Common/DataModel/Centrality.h" @@ -43,7 +42,10 @@ using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; +namespace +{ struct NPCascCandidate { + int64_t mcParticleId; int64_t trackGlobID; int64_t trackITSID; int64_t collisionID; @@ -57,6 +59,8 @@ struct NPCascCandidate { int pdgCodeITStrack; bool isFromBeauty; bool isFromCharm; + uint16_t pvContributors; + float pvTimeResolution; float pvX; float pvY; float pvZ; @@ -123,8 +127,26 @@ struct daughtersDCA { float pionDCAz; }; -namespace +std::array isFromHF(auto& particle) { + bool fromBeauty = false; + bool fromCharm = false; + if (particle.has_mothers()) { + auto mom = particle.template mothers_as()[0]; + int pdgCodeMom = mom.pdgCode(); + fromBeauty = std::abs(pdgCodeMom) / 5000 == 1 || std::abs(pdgCodeMom) / 500 == 1 || std::abs(pdgCodeMom) == 5; + fromCharm = std::abs(pdgCodeMom) / 4000 == 1 || std::abs(pdgCodeMom) / 400 == 1 || std::abs(pdgCodeMom) == 4; + while (mom.has_mothers()) { + const auto grandma = mom.template mothers_as()[0]; + int pdgCodeGrandma = std::abs(grandma.pdgCode()); + fromBeauty = fromBeauty || (pdgCodeGrandma / 5000 == 1 || pdgCodeGrandma / 500 == 1 || pdgCodeGrandma == 5); + fromCharm = fromCharm || (pdgCodeGrandma / 4000 == 1 || pdgCodeGrandma / 400 == 1 || pdgCodeGrandma == 4); + mom = grandma; + } + } + return {fromBeauty, fromCharm}; +} + static constexpr int nParticles{4}; static constexpr int nCutsPID{2}; static const std::vector matterOrNot{"Matter", "Antimatter"}; @@ -139,10 +161,6 @@ static constexpr float cutsPID[nParticles][nCutsPID]{ std::shared_ptr h2TPCsignal[nParticles]; std::shared_ptr h2TPCnSigma[nParticles]; -std::shared_ptr invMassBCOmega; -std::shared_ptr invMassACOmega; -std::shared_ptr invMassBCXi; -std::shared_ptr invMassACXi; std::shared_ptr invMassBCV0; std::shared_ptr invMassACV0; @@ -277,10 +295,6 @@ struct NonPromptCascadeTask { cutsXi->GetXaxis()->SetBinLabel(5, "nSigmaTPCprotontrack"); cutsXi->GetXaxis()->SetBinLabel(6, "nSigmaTPCpiontrack"); - invMassBCOmega = registry.add("h_invariantmass_beforeCuts_Omega", "Invariant Mass (GeV/#it{c}^{2})", HistType::kTH1D, {{125, 1.650, 1.700, "Invariant Mass (GeV/#it{c}^{2})"}}); - invMassACOmega = registry.add("h_invariantmass_afterCuts_Omega", "Invariant Mass (GeV/#it{c}^{2})", HistType::kTH1D, {{125, 1.650, 1.700, "Invariant Mass (GeV/#it{c}^{2})"}}); - invMassBCXi = registry.add("h_invariantmass_beforeCuts_Xi", "Invariant Mass (GeV/#it{c}^{2})", HistType::kTH1D, {{125, 1.296, 1.346, "Invariant Mass (GeV/#it{c}^{2})"}}); - invMassACXi = registry.add("h_invariantmass_afterCuts_Xi", "Invariant Mass (GeV/#it{c}^{2})", HistType::kTH1D, {{125, 1.296, 1.346, "Invariant Mass (GeV/#it{c}^{2})"}}); invMassBCV0 = registry.add("h_invariantmass_beforeCuts_V0", "Invariant Mass (GeV/#it{c}^{2})", HistType::kTH1D, {{125, 1.090, 1.140, "Invariant Mass (GeV/#it{c}^{2})"}}); invMassACV0 = registry.add("h_invariantmass_afterCuts_V0", "Invariant Mass (GeV/#it{c}^{2})", HistType::kTH1D, {{125, 1.090, 1.140, "Invariant Mass (GeV/#it{c}^{2})"}}); } @@ -373,38 +387,14 @@ struct NonPromptCascadeTask { dDCA.pionDCAz = impactParameterPiontrack.getZ(); } - void processTrackedCascadesMC(CollisionCandidatesRun3MC const& collisions, - aod::AssignedTrackedCascades const& trackedCascades, aod::Cascades const& /*cascades*/, - aod::V0s const& /*v0s*/, TracksExtMC const& /*tracks*/, - aod::McParticles const& mcParticles, aod::McCollisions const&, aod::BCsWithTimestamps const&) + template + void fillCandidatesVector(CollisionType const&, auto const& trackedCascades) { - candidates.clear(); - std::vector mcParticleId; - - auto isFromHF = [&](auto particle) -> std::tuple { - bool fromBeauty = false; - bool fromCharm = false; - if (particle.has_mothers()) { - auto mom = particle.template mothers_as()[0]; - int pdgCodeMom = mom.pdgCode(); - fromBeauty = std::abs(pdgCodeMom) / 5000 == 1 || std::abs(pdgCodeMom) / 500 == 1 || std::abs(pdgCodeMom) == 5; - fromCharm = std::abs(pdgCodeMom) / 4000 == 1 || std::abs(pdgCodeMom) / 400 == 1 || std::abs(pdgCodeMom) == 4; - while (mom.has_mothers()) { - const auto grandma = mom.template mothers_as()[0]; - int pdgCodeGrandma = std::abs(grandma.pdgCode()); - fromBeauty = fromBeauty || (pdgCodeGrandma / 5000 == 1 || pdgCodeGrandma / 500 == 1 || pdgCodeGrandma == 5); - fromCharm = fromCharm || (pdgCodeGrandma / 4000 == 1 || pdgCodeGrandma / 400 == 1 || pdgCodeGrandma == 4); - mom = grandma; - } - } - return {fromBeauty, fromCharm}; - }; - for (const auto& trackedCascade : trackedCascades) { - auto collision = trackedCascade.collision_as(); - auto bc = collision.bc_as(); + auto collision = trackedCascade.template collision_as(); + auto bc = collision.template bc_as(); initCCDB(bc); const auto primaryVertex = getPrimaryVertex(collision); @@ -418,17 +408,19 @@ struct NonPromptCascadeTask { df2.setMinRelChi2Change(minRelChi2Change); df2.setUseAbsDCA(useAbsDCA); - const auto& track = trackedCascade.track_as(); - const auto& ITStrack = trackedCascade.itsTrack_as(); + const auto& track = trackedCascade.template track_as(); + const auto& ITStrack = trackedCascade.template itsTrack_as(); const auto& casc = trackedCascade.cascade(); - const auto& bachelor = casc.bachelor_as(); + const auto& bachelor = casc.template bachelor_as(); const auto& v0 = casc.v0(); - const auto& ptrack = v0.posTrack_as(); - const auto& ntrack = v0.negTrack_as(); + const auto& ptrack = v0.template posTrack_as(); + const auto& ntrack = v0.template negTrack_as(); const auto& protonTrack = bachelor.sign() > 0 ? ntrack : ptrack; const auto& pionTrack = bachelor.sign() > 0 ? ptrack : ntrack; + bool hasReassociatedClusters = (track.itsNCls() != ITStrack.itsNCls()); std::array, 2> momenta; + std::array v0Pos; std::array masses; // track propagation @@ -439,9 +431,6 @@ struct NonPromptCascadeTask { float cascCpa = -1; float v0Cpa = -1; - - std::array v0Pos = {-999., -999., -999.}; - if (df2.process(getTrackParCov(pionTrack), getTrackParCov(protonTrack))) { trackParCovV0 = df2.createParentTrackParCov(0); // V0 track retrieved from p and pi daughters v0Pos = {trackParCovV0.getX(), trackParCovV0.getY(), trackParCovV0.getZ()}; @@ -460,6 +449,7 @@ struct NonPromptCascadeTask { } else { continue; } + float deltaPtITSCascade = std::hypot(cascadeMomentum[0], cascadeMomentum[1]) - ITStrack.pt(); // PV registry.fill(HIST("h_PV_x"), primaryVertex.getX()); @@ -480,283 +470,39 @@ struct NonPromptCascadeTask { momenta[1] = {pionTrack.px(), pionTrack.py(), pionTrack.pz()}; const auto v0mass = RecoDecay::m(momenta, masses); - invMassBCOmega->Fill(massOmega); - - invMassBCXi->Fill(massXi); - invMassBCV0->Fill(v0mass); - - registry.fill(HIST("h_PIDcutsOmega"), 0, massOmega); - registry.fill(HIST("h_PIDcutsXi"), 0, massXi); - - int bachKaonNClusTPC = -1; - int bachPionNClusTPC = -1; - int bachKaonNClusITS = -1; - int bachPionNClusITS = -1; - - bachPionNClusTPC = bachelor.tpcNClsFound(); /// by default cascade = Xi - bachPionNClusITS = bachelor.itsNCls(); /// by default cascade = Xi - - bool bachKaonHasTOF = 0; - bool bachPionHasTOF = 0; - - bachPionHasTOF = bachelor.hasTOF(); - - // if (!bachelor.hasTOF() && !ptrack.hasTOF() && !ntrack.hasTOF()) { - // LOG(debug) << "no TOF: " << bachelor.hasTOF() << "/" << ptrack.hasTOF() << "/" << ntrack.hasTOF(); - // continue; - // } - - registry.fill(HIST("h_PIDcutsOmega"), 1, massOmega); - registry.fill(HIST("h_PIDcutsXi"), 1, massXi); - - if (protonTrack.tpcNClsFound() < cfgCutNclusTPC || pionTrack.tpcNClsFound() < cfgCutNclusTPC) { - LOG(debug) << "no tpcNClsFound: " << bachelor.tpcNClsFound() << "/" << protonTrack.tpcNClsFound() << "/" << pionTrack.tpcNClsFound(); - continue; - } - - registry.fill(HIST("h_PIDcutsOmega"), 2, massOmega); - registry.fill(HIST("h_PIDcutsXi"), 2, massXi); - - // QA PID - float nSigmaTPC[nParticles]{bachelor.tpcNSigmaKa(), bachelor.tpcNSigmaPi(), protonTrack.tpcNSigmaPr(), pionTrack.tpcNSigmaPi()}; - - if (bachelor.hasTPC()) { // same cuts for Omega and Xi - LOG(debug) << "TPCSignal bachelor " << bachelor.sign() << "/" << bachelor.tpcInnerParam() << "/" << bachelor.tpcSignal(); - if (nSigmaTPC[0] < cfgCutsPID->get(0u, 0u) || nSigmaTPC[0] > cfgCutsPID->get(0u, 1u)) { - continue; - } - } - registry.fill(HIST("h_PIDcutsOmega"), 3, massOmega); - registry.fill(HIST("h_PIDcutsXi"), 3, massXi); - - LOG(debug) << "TPCSignal protonTrack " << protonTrack.sign() << "/" << protonTrack.tpcInnerParam() << "/" << protonTrack.tpcSignal(); - if (nSigmaTPC[2] < cfgCutsPID->get(2u, 0u) || nSigmaTPC[2] > cfgCutsPID->get(2u, 1u)) { - continue; - } - - registry.fill(HIST("h_PIDcutsOmega"), 4, massOmega); - registry.fill(HIST("h_PIDcutsXi"), 4, massXi); - - LOG(debug) << "TPCSignal ntrack " << pionTrack.sign() << "/" << pionTrack.tpcInnerParam() << "/" << pionTrack.tpcSignal(); - if (nSigmaTPC[3] < cfgCutsPID->get(3u, 0u) || nSigmaTPC[3] > cfgCutsPID->get(3u, 1u)) { - continue; - } - - registry.fill(HIST("h_PIDcutsXi"), 5, massXi); - - registry.fill(HIST("h_PIDcutsOmega"), 5, massOmega); - invMassACOmega->Fill(massOmega); - registry.fill(HIST("h_massvspt_Omega"), massOmega, track.pt()); - - registry.fill(HIST("h_PIDcutsXi"), 5, massXi); - - invMassACXi->Fill(massXi); - registry.fill(HIST("h_massvspt_Xi"), massXi, track.pt()); - - invMassACV0->Fill(v0mass); - registry.fill(HIST("h_massvspt_V0"), v0mass, track.pt()); - - motherDCA mDCA; - fillCascadeDCA(track, protonTrack, pionTrack, primaryVertex, true, mDCA); // always filling in MC - - LOGF(debug, "protonTrack (id: %d, pdg: %d) has mother %d", protonTrack.mcParticleId(), - protonTrack.mcParticle().pdgCode(), protonTrack.mcParticle().has_mothers() ? protonTrack.mcParticle().mothersIds()[0] : -1); - LOGF(debug, "pionTrack (id: %d, pdg: %d) has mother %d", pionTrack.mcParticleId(), - pionTrack.mcParticle().pdgCode(), pionTrack.mcParticle().has_mothers() ? pionTrack.mcParticle().mothersIds()[0] : -1); - - LOG(debug) << "bachelor with PDG code: " << bachelor.mcParticle().pdgCode() << ". Charge: " << bachelor.sign(); - if (ptrack.mcParticle().has_mothers() && pionTrack.mcParticle().has_mothers() && - protonTrack.mcParticle().mothersIds()[0] == pionTrack.mcParticle().mothersIds()[0]) { - const auto v0part = protonTrack.mcParticle().mothers_as()[0]; - LOG(debug) << "v0 with PDG code: " << v0part.pdgCode(); - } - daughtersDCA dDCA; - fillDauDCA(trackedCascade, bachelor, protonTrack, pionTrack, primaryVertex, true, dDCA); // always filling in MC - - bool isGoodCascade = false; - - int motherParticleID = -1; - - std::tuple fromHF{false, false}; - if (protonTrack.mcParticle().has_mothers() && pionTrack.mcParticle().has_mothers() && bachelor.mcParticle().has_mothers()) { - if (protonTrack.mcParticle().mothersIds()[0] == pionTrack.mcParticle().mothersIds()[0]) { - const auto v0part = protonTrack.mcParticle().mothers_first_as(); - if (std::abs(v0part.pdgCode()) == 3122 && v0part.has_mothers()) { - const auto motherV0 = v0part.mothers_as()[0]; - // const auto motherBach = bachelor.mcParticle().mothers_as()[0]; - if (v0part.mothersIds()[0] == bachelor.mcParticle().mothersIds()[0]) { - if (std::abs(motherV0.pdgCode()) == 3312 || abs(motherV0.pdgCode()) == 3334) { - isGoodCascade = true; - fromHF = isFromHF(motherV0); - motherParticleID = v0part.mothersIds()[0]; + //// Omega hypohesis -> rejecting Xi, we don't do it in the MC as we can identify the particle with the MC truth + bool isOmega{std::abs(massXi - constants::physics::MassXiMinus) > 0.005}; + + std::array fromHF{false, false}; + bool isGoodMatch{false}, isGoodCascade{false}; + int itsTrackPDG{0}, pdgCodeMom{0}; + int64_t mcParticleID{-1}; + + if constexpr (TrackType::template contains()) { + if (protonTrack.mcParticle().has_mothers() && pionTrack.mcParticle().has_mothers() && bachelor.mcParticle().has_mothers()) { + if (protonTrack.mcParticle().mothersIds()[0] == pionTrack.mcParticle().mothersIds()[0]) { + const auto v0part = protonTrack.mcParticle().template mothers_first_as(); + if (std::abs(v0part.pdgCode()) == 3122 && v0part.has_mothers()) { + const auto motherV0 = v0part.template mothers_as()[0]; + if (v0part.mothersIds()[0] == bachelor.mcParticle().mothersIds()[0]) { + if (std::abs(motherV0.pdgCode()) == 3312 || std::abs(motherV0.pdgCode()) == 3334) { + isGoodCascade = true; + isOmega = (std::abs(motherV0.pdgCode()) == 3334); + fromHF = isFromHF(motherV0); + mcParticleID = v0part.mothersIds()[0]; + } } } } } - } - - bool isGoodMatch = ((motherParticleID == ITStrack.mcParticleId())) ? true : false; - - int pdgCodeMom = 0; - if (isGoodMatch) { - pdgCodeMom = track.mcParticle().has_mothers() ? track.mcParticle().mothers_as()[0].pdgCode() : 0; - } - int itsTrackPDG = ITStrack.has_mcParticle() ? ITStrack.mcParticle().pdgCode() : 0; - float deltaPtITSCascade = std::hypot(cascadeMomentum[0], cascadeMomentum[1]) - ITStrack.pt(); - bool hasReassociatedClusters = (track.itsNCls() != ITStrack.itsNCls()); - candidates.emplace_back(NPCascCandidate{track.globalIndex(), ITStrack.globalIndex(), trackedCascade.collisionId(), trackedCascade.matchingChi2(), deltaPtITSCascade, trackedCascade.itsClsSize(), hasReassociatedClusters, isGoodMatch, isGoodCascade, pdgCodeMom, itsTrackPDG, std::get<0>(fromHF), std::get<1>(fromHF), - primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ(), - track.pt(), track.eta(), track.phi(), - protonTrack.pt(), protonTrack.eta(), pionTrack.pt(), pionTrack.eta(), bachelor.pt(), bachelor.eta(), - mDCA.DCAxy, mDCA.DCAz, dDCA.protonDCAxy, dDCA.protonDCAz, dDCA.pionDCAxy, dDCA.pionDCAz, dDCA.bachDCAxy, dDCA.bachDCAz, - cascCpa, v0Cpa, - massXi, massOmega, v0mass, - std::hypot(trackedCascade.decayX(), trackedCascade.decayY()), std::hypot(v0Pos[0], v0Pos[1]), std::hypot(trackedCascade.decayX(), trackedCascade.decayY(), trackedCascade.decayZ()), std::hypot(v0Pos[0], v0Pos[1], v0Pos[2]), - track.itsNCls(), protonTrack.itsNCls(), pionTrack.itsNCls(), bachKaonNClusITS, bachPionNClusITS, protonTrack.tpcNClsFound(), pionTrack.tpcNClsFound(), bachKaonNClusTPC, bachPionNClusTPC, - protonTrack.tpcNSigmaPr(), pionTrack.tpcNSigmaPi(), bachelor.tpcNSigmaKa(), bachelor.tpcNSigmaPi(), - protonTrack.hasTOF(), pionTrack.hasTOF(), bachKaonHasTOF, bachPionHasTOF, - protonTrack.tofNSigmaPr(), pionTrack.tofNSigmaPi(), bachelor.tofNSigmaKa(), bachelor.tofNSigmaPi()}); - - if (track.mcParticleId() < -1 || track.mcParticleId() >= mcParticles.size()) { - mcParticleId.push_back(-1); - } else { - mcParticleId.push_back(track.mcParticleId()); - } - } // end loop over tracked cascades - - for (size_t i = 0; i < candidates.size(); ++i) { - if (mcParticleId[i] < 0) { - continue; - } - auto particle = mcParticles.iteratorAt(mcParticleId[i]); - auto& c = candidates[i]; - auto mcCollision = particle.mcCollision_as(); - auto label = collisions.iteratorAt(c.collisionID); - - NPCTableMC(c.matchingChi2, c.deltaPt, c.itsClusSize, c.hasReassociatedCluster, c.isGoodMatch, c.isGoodCascade, c.pdgCodeMom, c.pdgCodeITStrack, c.isFromBeauty, c.isFromCharm, - c.pvX, c.pvY, c.pvZ, - c.cascPt, c.cascEta, c.cascPhi, - c.protonPt, c.protonEta, c.pionPt, c.pionEta, c.bachPt, c.bachEta, - c.cascDCAxy, c.cascDCAz, c.protonDCAxy, c.protonDCAz, c.pionDCAxy, c.pionDCAz, c.bachDCAxy, c.bachDCAz, - c.casccosPA, c.v0cosPA, - c.massXi, c.massOmega, c.massV0, - c.cascRadius, c.v0radius, c.cascLength, c.v0length, - c.cascNClusITS, c.protonNClusITS, c.pionNClusITS, c.bachKaonNClusITS, c.bachPionNClusITS, c.protonNClusTPC, c.pionNClusTPC, c.bachKaonNClusTPC, c.bachPionNClusTPC, - c.protonTPCNSigma, c.pionTPCNSigma, c.bachKaonTPCNSigma, c.bachPionTPCNSigma, - c.protonHasTOF, c.pionHasTOF, c.bachKaonHasTOF, c.bachPionHasTOF, - c.protonTOFNSigma, c.pionTOFNSigma, c.bachKaonTOFNSigma, c.bachPionTOFNSigma, - particle.pt(), particle.eta(), particle.phi(), particle.pdgCode(), mcCollision.posX() - particle.vx(), mcCollision.posY() - particle.vy(), mcCollision.posZ() - particle.vz(), mcCollision.globalIndex() == label.mcCollisionId()); - } - - for (const auto& p : mcParticles) { - auto absCode = std::abs(p.pdgCode()); - if (absCode != 3312 && absCode != 3334) { - continue; - } - auto fromHF = isFromHF(p); - int pdgCodeMom = p.has_mothers() ? p.mothers_as()[0].pdgCode() : 0; - auto mcCollision = p.mcCollision_as(); - - NPCTableGen(p.pt(), p.eta(), p.phi(), p.pdgCode(), pdgCodeMom, mcCollision.posX() - p.vx(), mcCollision.posY() - p.vy(), mcCollision.posZ() - p.vz(), std::get<0>(fromHF), std::get<1>(fromHF)); - } - } - PROCESS_SWITCH(NonPromptCascadeTask, processTrackedCascadesMC, "process cascades from strangeness tracking: MC analysis", true); - - void processTrackedCascadesData(CollisionCandidatesRun3 const& /*collisions*/, - aod::AssignedTrackedCascades const& trackedCascades, aod::Cascades const& /*cascades*/, - aod::V0s const& /*v0s*/, TracksExtData const& /*tracks*/, - aod::BCsWithTimestamps const&) - { - candidates.clear(); - for (const auto& trackedCascade : trackedCascades) { - bool isOmega{false}; - - auto collision = trackedCascade.collision_as(); - auto bc = collision.bc_as(); - initCCDB(bc); - - const auto primaryVertex = getPrimaryVertex(collision); - - o2::vertexing::DCAFitterN<2> df2; - df2.setBz(bz); - df2.setPropagateToPCA(propToDCA); - df2.setMaxR(maxR); - df2.setMaxDZIni(maxDZIni); - df2.setMinParamChange(minParamChange); - df2.setMinRelChi2Change(minRelChi2Change); - df2.setUseAbsDCA(useAbsDCA); - - const auto& track = trackedCascade.track_as(); - const auto& ITStrack = trackedCascade.itsTrack_as(); - const auto& casc = trackedCascade.cascade(); - const auto& bachelor = casc.bachelor_as(); - const auto& v0 = casc.v0(); - const auto& ptrack = v0.posTrack_as(); - const auto& ntrack = v0.negTrack_as(); - const auto& protonTrack = bachelor.sign() > 0 ? ntrack : ptrack; - const auto& pionTrack = bachelor.sign() > 0 ? ptrack : ntrack; - bool hasReassociatedClusters = (track.itsNCls() != ITStrack.itsNCls()); - - std::array, 2> momenta; - std::array masses; + isGoodMatch = ((mcParticleID == ITStrack.mcParticleId())) ? true : false; - // track propagation - o2::track::TrackParCov trackParCovV0; - o2::track::TrackPar trackParV0; - o2::track::TrackPar trackParBachelor; - std::array cascadeMomentum; - - float cascCpa = -1; - float v0Cpa = -1; - - std::array v0Pos = {-999., -999., -999.}; - - if (df2.process(getTrackParCov(pionTrack), getTrackParCov(protonTrack))) { - trackParCovV0 = df2.createParentTrackParCov(0); // V0 track retrieved from p and pi daughters - v0Pos = {trackParCovV0.getX(), trackParCovV0.getY(), trackParCovV0.getZ()}; - if (df2.process(trackParCovV0, getTrackParCov(bachelor))) { - trackParV0 = df2.getTrackParamAtPCA(0); - trackParBachelor = df2.getTrackParamAtPCA(1); - trackParV0.getPxPyPzGlo(momenta[0]); // getting the V0 momentum - trackParBachelor.getPxPyPzGlo(momenta[1]); // getting the bachelor momentum - df2.createParentTrackParCov().getPxPyPzGlo(cascadeMomentum); - std::array pvPos = {primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()}; - cascCpa = RecoDecay::cpa(pvPos, df2.getPCACandidate(), cascadeMomentum); - v0Cpa = RecoDecay::cpa(pvPos, df2.getPCACandidate(), momenta[0]); - } else { - continue; + if (isGoodMatch) { + pdgCodeMom = track.mcParticle().has_mothers() ? track.mcParticle().template mothers_as()[0].pdgCode() : 0; } - } else { - continue; + itsTrackPDG = ITStrack.has_mcParticle() ? ITStrack.mcParticle().pdgCode() : 0; } - float deltaPtITSCascade = std::hypot(cascadeMomentum[0], cascadeMomentum[1]) - ITStrack.pt(); - - // PV - registry.fill(HIST("h_PV_x"), primaryVertex.getX()); - registry.fill(HIST("h_PV_y"), primaryVertex.getY()); - registry.fill(HIST("h_PV_z"), primaryVertex.getZ()); - // Omega - masses = {o2::constants::physics::MassLambda0, o2::constants::physics::MassKPlus}; - const auto massOmega = RecoDecay::m(momenta, masses); - - // Xi - masses = {o2::constants::physics::MassLambda0, o2::constants::physics::MassPiPlus}; - const auto massXi = RecoDecay::m(momenta, masses); - - // Lambda - masses = {o2::constants::physics::MassProton, o2::constants::physics::MassPiMinus}; - momenta[0] = {protonTrack.px(), protonTrack.py(), protonTrack.pz()}; - momenta[1] = {pionTrack.px(), pionTrack.py(), pionTrack.pz()}; - const auto v0mass = RecoDecay::m(momenta, masses); - - ////Omega hypohesis -> rejecting Xi - if (std::abs(massXi - constants::physics::MassXiMinus) > 0.005) { - isOmega = true; - invMassBCOmega->Fill(massOmega); - } - - invMassBCXi->Fill(massXi); invMassBCV0->Fill(v0mass); registry.fill(HIST("h_PIDcutsXi"), 0, massXi); @@ -833,13 +579,10 @@ struct NonPromptCascadeTask { if (isOmega) { registry.fill(HIST("h_PIDcutsOmega"), 5, massOmega); - invMassACOmega->Fill(massOmega); registry.fill(HIST("h_massvspt_Omega"), massOmega, track.pt()); } registry.fill(HIST("h_PIDcutsXi"), 5, massXi); - - invMassACXi->Fill(massXi); registry.fill(HIST("h_massvspt_Xi"), massXi, track.pt()); invMassACV0->Fill(v0mass); @@ -850,8 +593,8 @@ struct NonPromptCascadeTask { daughtersDCA dDCA; fillDauDCA(trackedCascade, bachelor, protonTrack, pionTrack, primaryVertex, isOmega, dDCA); - candidates.emplace_back(NPCascCandidate{track.globalIndex(), ITStrack.globalIndex(), trackedCascade.collisionId(), trackedCascade.matchingChi2(), deltaPtITSCascade, trackedCascade.itsClsSize(), hasReassociatedClusters, 0, 0, 0, 0, 0, 0, - primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ(), + candidates.emplace_back(NPCascCandidate{mcParticleID, track.globalIndex(), ITStrack.globalIndex(), trackedCascade.collisionId(), trackedCascade.matchingChi2(), deltaPtITSCascade, trackedCascade.itsClsSize(), hasReassociatedClusters, isGoodMatch, isGoodCascade, pdgCodeMom, itsTrackPDG, fromHF[0], fromHF[1], + collision.numContrib(), collision.collisionTimeRes(), primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ(), track.pt(), track.eta(), track.phi(), protonTrack.pt(), protonTrack.eta(), pionTrack.pt(), pionTrack.eta(), bachelor.pt(), bachelor.eta(), mDCA.DCAxy, mDCA.DCAz, dDCA.protonDCAxy, dDCA.protonDCAz, dDCA.pionDCAxy, dDCA.pionDCAz, dDCA.bachDCAxy, dDCA.bachDCAz, @@ -863,11 +606,64 @@ struct NonPromptCascadeTask { protonTrack.hasTOF(), pionTrack.hasTOF(), bachKaonHasTOF, bachPionHasTOF, protonTrack.tofNSigmaPr(), pionTrack.tofNSigmaPi(), bachelor.tofNSigmaKa(), bachelor.tofNSigmaPi()}); } + } - for (const auto& c : candidates) { + void processTrackedCascadesMC(CollisionCandidatesRun3MC const& collisions, + aod::AssignedTrackedCascades const& trackedCascades, aod::Cascades const& /*cascades*/, + aod::V0s const& /*v0s*/, TracksExtMC const& /*tracks*/, + aod::McParticles const& mcParticles, aod::McCollisions const&, aod::BCsWithTimestamps const&) + { + + fillCandidatesVector(collisions, trackedCascades); + + for (size_t i = 0; i < candidates.size(); ++i) { + + if (candidates[i].mcParticleId < 0) { + continue; + } + auto particle = mcParticles.iteratorAt(candidates[i].mcParticleId); + auto& c = candidates[i]; + auto mcCollision = particle.mcCollision_as(); + auto label = collisions.iteratorAt(c.collisionID); + NPCTableMC(c.matchingChi2, c.deltaPt, c.itsClusSize, c.hasReassociatedCluster, c.isGoodMatch, c.isGoodCascade, c.pdgCodeMom, c.pdgCodeITStrack, c.isFromBeauty, c.isFromCharm, + c.pvContributors, c.pvTimeResolution, c.pvX, c.pvY, c.pvZ, + c.cascPt, c.cascEta, c.cascPhi, + c.protonPt, c.protonEta, c.pionPt, c.pionEta, c.bachPt, c.bachEta, + c.cascDCAxy, c.cascDCAz, c.protonDCAxy, c.protonDCAz, c.pionDCAxy, c.pionDCAz, c.bachDCAxy, c.bachDCAz, + c.casccosPA, c.v0cosPA, + c.massXi, c.massOmega, c.massV0, + c.cascRadius, c.v0radius, c.cascLength, c.v0length, + c.cascNClusITS, c.protonNClusITS, c.pionNClusITS, c.bachKaonNClusITS, c.bachPionNClusITS, c.protonNClusTPC, c.pionNClusTPC, c.bachKaonNClusTPC, c.bachPionNClusTPC, + c.protonTPCNSigma, c.pionTPCNSigma, c.bachKaonTPCNSigma, c.bachPionTPCNSigma, + c.protonHasTOF, c.pionHasTOF, c.bachKaonHasTOF, c.bachPionHasTOF, + c.protonTOFNSigma, c.pionTOFNSigma, c.bachKaonTOFNSigma, c.bachPionTOFNSigma, + particle.pt(), particle.eta(), particle.phi(), particle.pdgCode(), mcCollision.posX() - particle.vx(), mcCollision.posY() - particle.vy(), mcCollision.posZ() - particle.vz(), mcCollision.globalIndex() == label.mcCollisionId()); + } + + for (const auto& p : mcParticles) { + auto absCode = std::abs(p.pdgCode()); + if (absCode != 3312 && absCode != 3334) { + continue; + } + auto fromHF = isFromHF(p); + int pdgCodeMom = p.has_mothers() ? p.mothers_as()[0].pdgCode() : 0; + auto mcCollision = p.mcCollision_as(); + + NPCTableGen(p.pt(), p.eta(), p.phi(), p.pdgCode(), pdgCodeMom, mcCollision.posX() - p.vx(), mcCollision.posY() - p.vy(), mcCollision.posZ() - p.vz(), fromHF[0], fromHF[1]); + } + } + PROCESS_SWITCH(NonPromptCascadeTask, processTrackedCascadesMC, "process cascades from strangeness tracking: MC analysis", true); + + void processTrackedCascadesData(CollisionCandidatesRun3 const& collisions, + aod::AssignedTrackedCascades const& trackedCascades, aod::Cascades const& /*cascades*/, + aod::V0s const& /*v0s*/, TracksExtData const& /*tracks*/, + aod::BCsWithTimestamps const&) + { + fillCandidatesVector(collisions, trackedCascades); + for (const auto& c : candidates) { NPCTable(c.matchingChi2, c.deltaPt, c.itsClusSize, c.hasReassociatedCluster, - c.pvX, c.pvY, c.pvZ, + c.pvContributors, c.pvTimeResolution, c.pvX, c.pvY, c.pvZ, c.cascPt, c.cascEta, c.cascPhi, c.protonPt, c.protonEta, c.pionPt, c.pionEta, c.bachPt, c.bachEta, c.cascDCAxy, c.cascDCAz, c.protonDCAxy, c.protonDCAz, c.pionDCAxy, c.pionDCAz, c.bachDCAxy, c.bachDCAz, diff --git a/PWGLF/Tasks/Strangeness/phik0sanalysis.cxx b/PWGLF/Tasks/Strangeness/phik0sanalysis.cxx index bb12b5260f3..a68206f85e3 100644 --- a/PWGLF/Tasks/Strangeness/phik0sanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/phik0sanalysis.cxx @@ -67,7 +67,6 @@ struct phik0shortanalysis { HistogramRegistry PhieffHist{"PhieffHist", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; HistogramRegistry K0SeffHist{"K0SeffHist", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; HistogramRegistry PioneffHist{"PioneffHist", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry yaccHist{"yaccHist", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; HistogramRegistry closureMCPhipurHist{"closureMCPhipurHist", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; HistogramRegistry closureMCPhiK0SHist{"closureMCPhiK0SHist", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; HistogramRegistry closureMCPhiPionHist{"closureMCPhiPionHist", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; @@ -99,7 +98,7 @@ struct phik0shortanalysis { Configurable> binspTK0S{"binspTK0S", {0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0}, "pT bin limits for K0S"}; // Configurables on Phi mass - Configurable nBins{"nBins", 13, "N bins in cfgPhimassaxis"}; + Configurable nBinsmPhi{"nBinsmPhi", 13, "N bins in cfgPhimassaxis"}; Configurable lowmPhi{"lowmPhiMB", 1.0095, "Upper limits on Phi mass for signal extraction"}; Configurable upmPhi{"upmPhiMB", 1.029, "Upper limits on Phi mass for signal extraction"}; @@ -129,10 +128,11 @@ struct phik0shortanalysis { Configurable> binspTPi{"binspTPi", {0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.5, 2.0, 3.0}, "pT bin limits for pions"}; // Configurables for delta y selection - Configurable nBinsy{"nBinsy", 10, "Number of bins in y and deltay axis"}; + Configurable nBinsy{"nBinsy", 80, "Number of bins in y and deltay axis"}; Configurable cfgyAcceptance{"cfgyAcceptance", 0.5f, "Rapidity acceptance"}; Configurable cfgFirstCutonDeltay{"cgfFirstCutonDeltay", 0.5f, "First upper bound on Deltay selection"}; Configurable cfgSecondCutonDeltay{"cgfSecondCutonDeltay", 0.1f, "Second upper bound on Deltay selection"}; + Configurable cfgyAcceptanceSmear{"cfgyAcceptanceSmear", 0.8f, "Rapidity acceptance for smearing matrix study"}; // Configurable for RecMC Configurable cfgiskNoITSROFrameBorder{"cfgiskNoITSROFrameBorder", false, "kNoITSROFrameBorder request on RecMC collisions"}; @@ -184,10 +184,10 @@ struct phik0shortanalysis { // Axes AxisSpec K0SmassAxis = {200, 0.45f, 0.55f, "#it{M}_{inv} [GeV/#it{c}^{2}]"}; AxisSpec PhimassAxis = {200, 0.9f, 1.2f, "#it{M}_{inv} [GeV/#it{c}^{2}]"}; - AxisSpec sigPhimassAxis = {nBins, lowmPhi, upmPhi, "#it{M}_{inv} [GeV/#it{c}^{2}]"}; + AxisSpec sigPhimassAxis = {nBinsmPhi, lowmPhi, upmPhi, "#it{M}_{inv} [GeV/#it{c}^{2}]"}; AxisSpec vertexZAxis = {100, -15.f, 15.f, "vrtx_{Z} [cm]"}; - AxisSpec yAxis = {nBinsy, -cfgyAcceptance, cfgyAcceptance, "#it{y}"}; - AxisSpec deltayAxis = {nBinsy, 0.0f, 1.0f, "|#it{#Deltay}|"}; + AxisSpec yAxis = {nBinsy, -cfgyAcceptanceSmear, cfgyAcceptanceSmear, "#it{y}"}; + AxisSpec deltayAxis = {nBinsy, 0.0f, 1.6f, "|#it{#Deltay}|"}; AxisSpec multAxis = {120, 0.0f, 120.0f, "centFT0M"}; AxisSpec binnedmultAxis{(std::vector)binsMult, "centFT0M"}; AxisSpec ptK0SAxis = {60, 0.0f, 6.0f, "#it{p}_{T} (GeV/#it{c})"}; @@ -348,22 +348,24 @@ struct phik0shortanalysis { PhieffHist.add("h2PhieffPiGenMCFCutAssocReco", "Phi coupled to Pion for GenMC Deltay < FirstCut Associated Reco Collision", kTH2F, {binnedmultAxis, binnedptPiAxis}); PhieffHist.add("h2PhieffPiGenMCSCutAssocReco", "Phi coupled to Pion for GenMC Deltay < SecondCut Associated Reco Collision", kTH2F, {binnedmultAxis, binnedptPiAxis}); + // Rapidity smearing matrix for Phi + PhieffHist.add("h3PhiRapiditySmearing", "Rapidity Smearing Matrix for Phi", kTH3F, {binnedmultAxis, yAxis, yAxis}); + // MCK0S invariant mass and GenMC K0S for computing efficiencies K0SeffHist.add("h3K0SeffInvMass", "Invariant mass of K0Short for Efficiency", kTH3F, {binnedmultAxis, binnedptK0SAxis, K0SmassAxis}); K0SeffHist.add("h2K0SGenMC", "K0Short for GenMC", kTH2F, {binnedmultAxis, binnedptK0SAxis}); K0SeffHist.add("h2K0SGenMCAssocReco", "K0Short for GenMC Associated Reco Collision", kTH2F, {binnedmultAxis, binnedptK0SAxis}); + // Rapidity smearing matrix for K0S + K0SeffHist.add("h4K0SRapiditySmearing", "Rapidity Smearing Matrix for K0Short", kTHnSparseF, {binnedmultAxis, binnedptK0SAxis, yAxis, yAxis}); + // MCPion invariant mass and GenMC Pion for computing efficiencies PioneffHist.add("h4PieffInvMass", "Invariant mass of Pion for Efficiency", kTHnSparseF, {binnedmultAxis, binnedptPiAxis, {100, -10.0f, 10.0f}, {100, -10.0f, 10.0f}}); PioneffHist.add("h2PiGenMC", "Pion for GenMC", kTH2F, {binnedmultAxis, binnedptPiAxis}); PioneffHist.add("h2PiGenMCAssocReco", "Pion for GenMC Associated Reco Collision", kTH2F, {binnedmultAxis, binnedptPiAxis}); - // y acceptance studies - yaccHist.add("hyaccK0SRecMC", "K0S y acceptance in RecMC", kTH3F, {binnedmultAxis, binnedptK0SAxis, yAxis}); - yaccHist.add("hyaccK0SGenMC", "K0S y acceptance in GenMC", kTH3F, {binnedmultAxis, binnedptK0SAxis, yAxis}); - - yaccHist.add("hyaccPiRecMC", "Pion y acceptance in RecMC", kTH3F, {binnedmultAxis, binnedptPiAxis, yAxis}); - yaccHist.add("hyaccPiGenMC", "Pion y acceptance in GenMC", kTH3F, {binnedmultAxis, binnedptPiAxis, yAxis}); + // Rapidity smearing matrix for Pion + PioneffHist.add("h4PiRapiditySmearing", "Rapidity Smearing Matrix for Pion", kTHnSparseF, {binnedmultAxis, binnedptPiAxis, yAxis, yAxis}); } // Event selection and QA filling @@ -867,7 +869,7 @@ struct phik0shortanalysis { PROCESS_SWITCH(phik0shortanalysis, processSEPhiPion, "Process Same Event for Phi-Pion Analysis", false); - void processRecMCPhiQA(SimCollisions::iterator const& collision, FullMCTracks const& fullMCTracks, FullV0s const& V0s, V0DauMCTracks const&, MCCollisions const&, aod::McParticles const&) + void processRecMCPhiQA(SimCollisions::iterator const& collision, FullMCTracks const& fullMCTracks, FullMCV0s const& V0s, V0DauMCTracks const&, MCCollisions const&, aod::McParticles const&) { if (!acceptEventQA(collision, true)) return; @@ -897,6 +899,9 @@ struct phik0shortanalysis { if (!track1.has_mcParticle()) continue; + auto MCtrack1 = track1.mcParticle_as(); + if (MCtrack1.pdgCode() != 321 || !MCtrack1.isPhysicalPrimary()) + continue; // Loop over all negative candidates for (const auto& track2 : negThisColl) { @@ -909,29 +914,28 @@ struct phik0shortanalysis { if (!track2.has_mcParticle()) continue; - - auto MCtrack1 = track1.mcParticle_as(); auto MCtrack2 = track2.mcParticle_as(); - if (MCtrack1.pdgCode() != 321 || MCtrack2.pdgCode() != -321) - continue; - if (!MCtrack1.has_mothers() || !MCtrack2.has_mothers()) - continue; - if (!MCtrack1.isPhysicalPrimary() || !MCtrack2.isPhysicalPrimary()) + if (MCtrack2.pdgCode() != -321 || !MCtrack2.isPhysicalPrimary()) continue; - int pdgParentPhi = 0; + bool isMCMotherPhi = false; + auto MCMotherPhi = MCtrack1.mothers_as()[0]; for (const auto& MotherOfMCtrack1 : MCtrack1.mothers_as()) { for (const auto& MotherOfMCtrack2 : MCtrack2.mothers_as()) { - if (MotherOfMCtrack1 == MotherOfMCtrack2) { - pdgParentPhi = MotherOfMCtrack1.pdgCode(); + if (MotherOfMCtrack1 == MotherOfMCtrack2 && MotherOfMCtrack1.pdgCode() == 333) { + MCMotherPhi = MotherOfMCtrack1; + isMCMotherPhi = true; } } } - if (pdgParentPhi != 333) + if (!isMCMotherPhi) continue; TLorentzVector recPhi = recMother(track1, track2, massKa, massKa); + + PhieffHist.fill(HIST("h3PhiRapiditySmearing"), genmultiplicity, recPhi.Rapidity(), MCMotherPhi.y()); + if (std::abs(recPhi.Rapidity()) > cfgyAcceptance) continue; @@ -946,30 +950,16 @@ struct phik0shortanalysis { // V0 already reconstructed by the builder for (const auto& v0 : V0s) { - const auto& posDaughterTrack = v0.posTrack_as(); - const auto& negDaughterTrack = v0.negTrack_as(); - if (!posDaughterTrack.has_mcParticle() || !negDaughterTrack.has_mcParticle()) + if (!v0.has_mcParticle()) { continue; + } - auto posMCDaughterTrack = posDaughterTrack.mcParticle_as(); - auto negMCDaughterTrack = negDaughterTrack.mcParticle_as(); - if (posMCDaughterTrack.pdgCode() != 211 || negMCDaughterTrack.pdgCode() != -211) - continue; - if (!posMCDaughterTrack.has_mothers() || !negMCDaughterTrack.has_mothers()) + auto v0mcparticle = v0.mcParticle(); + if (v0mcparticle.pdgCode() != 310 || !v0mcparticle.isPhysicalPrimary()) continue; - int pdgParentv0 = 0; - bool isPhysPrim = false; - for (const auto& particleMotherOfNeg : negMCDaughterTrack.mothers_as()) { - for (const auto& particleMotherOfPos : posMCDaughterTrack.mothers_as()) { - if (particleMotherOfNeg == particleMotherOfPos) { - pdgParentv0 = particleMotherOfNeg.pdgCode(); - isPhysPrim = particleMotherOfNeg.isPhysicalPrimary(); - } - } - } - if (pdgParentv0 != 310 || !isPhysPrim) - continue; + const auto& posDaughterTrack = v0.posTrack_as(); + const auto& negDaughterTrack = v0.negTrack_as(); // Cut on V0 dynamic columns if (!selectionV0(v0, posDaughterTrack, negDaughterTrack)) @@ -1034,7 +1024,7 @@ struct phik0shortanalysis { PROCESS_SWITCH(phik0shortanalysis, processRecMCPhiQA, "Process for ReCMCQA and Phi in RecMC", false); - void processRecMCPhiK0S(SimCollisions::iterator const& collision, FullMCTracks const&, FullV0s const& V0s, V0DauMCTracks const&, MCCollisions const&, aod::McParticles const&) + void processRecMCPhiK0S(SimCollisions::iterator const& collision, FullMCTracks const&, FullMCV0s const& V0s, V0DauMCTracks const&, MCCollisions const&, aod::McParticles const& mcParticles) { if (!acceptEventQA(collision, false)) return; @@ -1049,109 +1039,66 @@ struct phik0shortanalysis { auto posThisColl = posMCTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); auto negThisColl = negMCTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); + // Defining McParticles in the collision + auto mcParticlesThisColl = mcParticles.sliceByCached(aod::mcparticle::mcCollisionId, mcCollision.globalIndex(), cache); + // V0 already reconstructed by the builder for (const auto& v0 : V0s) { - const auto& posDaughterTrack = v0.posTrack_as(); - const auto& negDaughterTrack = v0.negTrack_as(); - if (!posDaughterTrack.has_mcParticle() || !negDaughterTrack.has_mcParticle()) + if (!v0.has_mcParticle()) continue; - auto posMCDaughterTrack = posDaughterTrack.mcParticle_as(); - auto negMCDaughterTrack = negDaughterTrack.mcParticle_as(); - if (posMCDaughterTrack.pdgCode() != 211 || negMCDaughterTrack.pdgCode() != -211) - continue; - if (!posMCDaughterTrack.has_mothers() || !negMCDaughterTrack.has_mothers()) + auto v0mcparticle = v0.mcParticle(); + if (v0mcparticle.pdgCode() != 310 || !v0mcparticle.isPhysicalPrimary()) continue; - int pdgParentv0 = 0; - bool isPhysPrim = false; - for (const auto& particleMotherOfNeg : negMCDaughterTrack.mothers_as()) { - for (const auto& particleMotherOfPos : posMCDaughterTrack.mothers_as()) { - if (particleMotherOfNeg == particleMotherOfPos) { - pdgParentv0 = particleMotherOfNeg.pdgCode(); - isPhysPrim = particleMotherOfNeg.isPhysicalPrimary(); - } - } - } - if (pdgParentv0 != 310 || !isPhysPrim) - continue; + const auto& posDaughterTrack = v0.posTrack_as(); + const auto& negDaughterTrack = v0.negTrack_as(); if (!selectionV0(v0, posDaughterTrack, negDaughterTrack)) continue; - if (std::abs(v0.yK0Short()) > cfgyAcceptance) + K0SeffHist.fill(HIST("h4K0SRapiditySmearing"), genmultiplicity, v0.pt(), v0.yK0Short(), v0mcparticle.y()); + + if (std::abs(v0mcparticle.y()) > cfgyAcceptance) continue; K0SeffHist.fill(HIST("h3K0SeffInvMass"), genmultiplicity, v0.pt(), v0.mK0Short()); - std::array isCountedPhi{false, false, false}; - - // Phi reconstruction - for (const auto& track1 : posThisColl) { // loop over all selected tracks - if (!selectionTrackResonance(track1) || !selectionPIDKaonpTdependent(track1)) - continue; // topological and PID selection - - auto track1ID = track1.globalIndex(); + std::array isCountedMCPhi{false, false, false}; - if (!track1.has_mcParticle()) + for (const auto& mcParticle : mcParticles) { + if (mcParticle.pdgCode() != 333) + continue; + auto kDaughters = mcParticle.daughters_as(); + if (kDaughters.size() != 2) + continue; + bool isPosKaon = false, isNegKaon = false; + for (const auto& kDaughter : kDaughters) { + if (kDaughter.pdgCode() == 321) + isPosKaon = true; + if (kDaughter.pdgCode() == -321) + isNegKaon = true; + } + if (!isPosKaon || !isNegKaon) + continue; + if (std::abs(mcParticle.y()) > cfgyAcceptance) continue; - for (const auto& track2 : negThisColl) { - if (!selectionTrackResonance(track2) || !selectionPIDKaonpTdependent(track2)) - continue; // topological and PID selection - - auto track2ID = track2.globalIndex(); - if (track2ID == track1ID) - continue; // condition to avoid double counting of pair - - if (!track2.has_mcParticle()) - continue; - - auto MCtrack1 = track1.mcParticle_as(); - auto MCtrack2 = track2.mcParticle_as(); - if (MCtrack1.pdgCode() != 321 || MCtrack2.pdgCode() != -321) - continue; - if (!MCtrack1.has_mothers() || !MCtrack2.has_mothers()) - continue; - if (!MCtrack1.isPhysicalPrimary() || !MCtrack2.isPhysicalPrimary()) - continue; - - int pdgParentPhi = 0; - for (const auto& MotherOfMCtrack1 : MCtrack1.mothers_as()) { - for (const auto& MotherOfMCtrack2 : MCtrack2.mothers_as()) { - if (MotherOfMCtrack1 == MotherOfMCtrack2) { - pdgParentPhi = MotherOfMCtrack1.pdgCode(); - } - } - } - - if (pdgParentPhi != 333) - continue; - - TLorentzVector recPhi = recMother(track1, track2, massKa, massKa); - - if (recPhi.M() < lowmPhi || recPhi.M() > upmPhi) - continue; - - if (std::abs(recPhi.Rapidity()) > cfgyAcceptance) - continue; - if (!isCountedPhi.at(0)) { - yaccHist.fill(HIST("hyaccK0SRecMC"), genmultiplicity, v0.pt(), v0.yK0Short()); - MCPhiK0SHist.fill(HIST("h3RecMCPhiK0SSEInc"), genmultiplicity, v0.pt(), v0.mK0Short()); - isCountedPhi.at(0) = true; - } - if (std::abs(v0.yK0Short() - recPhi.Rapidity()) > cfgFirstCutonDeltay) - continue; - if (!isCountedPhi.at(1)) { - MCPhiK0SHist.fill(HIST("h3RecMCPhiK0SSEFCut"), genmultiplicity, v0.pt(), v0.mK0Short()); - isCountedPhi.at(1) = true; - } - if (std::abs(v0.yK0Short() - recPhi.Rapidity()) > cfgSecondCutonDeltay) - continue; - if (!isCountedPhi.at(2)) { - MCPhiK0SHist.fill(HIST("h3RecMCPhiK0SSESCut"), genmultiplicity, v0.pt(), v0.mK0Short()); - isCountedPhi.at(2) = true; - } + if (!isCountedMCPhi.at(0)) { + MCPhiK0SHist.fill(HIST("h3RecMCPhiK0SSEInc"), genmultiplicity, v0.pt(), v0.mK0Short()); + isCountedMCPhi.at(0) = true; + } + if (std::abs(v0mcparticle.y() - mcParticle.y()) > cfgFirstCutonDeltay) + continue; + if (!isCountedMCPhi.at(1)) { + MCPhiK0SHist.fill(HIST("h3RecMCPhiK0SSEFCut"), genmultiplicity, v0.pt(), v0.mK0Short()); + isCountedMCPhi.at(1) = true; + } + if (std::abs(v0mcparticle.y() - mcParticle.y()) > cfgSecondCutonDeltay) + continue; + if (!isCountedMCPhi.at(2)) { + MCPhiK0SHist.fill(HIST("h3RecMCPhiK0SSESCut"), genmultiplicity, v0.pt(), v0.mK0Short()); + isCountedMCPhi.at(2) = true; } } } @@ -1159,7 +1106,7 @@ struct phik0shortanalysis { PROCESS_SWITCH(phik0shortanalysis, processRecMCPhiK0S, "Process RecMC for Phi-K0S Analysis", false); - void processRecMCPhiPion(SimCollisions::iterator const& collision, FullMCTracks const& fullMCTracks, MCCollisions const&, aod::McParticles const&) + void processRecMCPhiPion(SimCollisions::iterator const& collision, FullMCTracks const& fullMCTracks, MCCollisions const&, aod::McParticles const& mcParticles) { if (!acceptEventQA(collision, false)) return; @@ -1174,6 +1121,9 @@ struct phik0shortanalysis { auto posThisColl = posMCTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); auto negThisColl = negMCTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); + // Defining McParticles in the collision + auto mcParticlesThisColl = mcParticles.sliceByCached(aod::mcparticle::mcCollisionId, mcCollision.globalIndex(), cache); + // Loop over all primary pion candidates for (const auto& track : fullMCTracks) { @@ -1188,7 +1138,9 @@ struct phik0shortanalysis { if (!selectionPion(track)) continue; - if (std::abs(track.rapidity(massPi)) > cfgyAcceptance) + PioneffHist.fill(HIST("h4PiRapiditySmearing"), genmultiplicity, track.pt(), track.rapidity(massPi), MCtrack.y()); + + if (std::abs(MCtrack.y()) > cfgyAcceptance) continue; float nsigmaTPC = (track.hasTPC() ? track.tpcNSigmaPi() : -999); @@ -1196,74 +1148,41 @@ struct phik0shortanalysis { PioneffHist.fill(HIST("h4PieffInvMass"), genmultiplicity, track.pt(), nsigmaTPC, nsigmaTOF); - std::array isCountedPhi{false, false, false}; - - // Phi reconstruction - for (const auto& track1 : posThisColl) { // loop over all selected tracks - if (!selectionTrackResonance(track1) || !selectionPIDKaonpTdependent(track1)) - continue; // topological and PID selection - - auto track1ID = track1.globalIndex(); + std::array isCountedMCPhi{false, false, false}; - if (!track1.has_mcParticle()) + for (const auto& mcParticle : mcParticles) { + if (mcParticle.pdgCode() != 333) + continue; + auto kDaughters = mcParticle.daughters_as(); + if (kDaughters.size() != 2) + continue; + bool isPosKaon = false, isNegKaon = false; + for (const auto& kDaughter : kDaughters) { + if (kDaughter.pdgCode() == 321) + isPosKaon = true; + if (kDaughter.pdgCode() == -321) + isNegKaon = true; + } + if (!isPosKaon || !isNegKaon) + continue; + if (std::abs(mcParticle.y()) > cfgyAcceptance) continue; - for (const auto& track2 : negThisColl) { - if (!selectionTrackResonance(track2) || !selectionPIDKaonpTdependent(track2)) - continue; // topological and PID selection - - auto track2ID = track2.globalIndex(); - if (track2ID == track1ID) - continue; // condition to avoid double counting of pair - - if (!track2.has_mcParticle()) - continue; - - auto MCtrack1 = track1.mcParticle_as(); - auto MCtrack2 = track2.mcParticle_as(); - if (MCtrack1.pdgCode() != 321 || MCtrack2.pdgCode() != -321) - continue; - if (!MCtrack1.has_mothers() || !MCtrack2.has_mothers()) - continue; - if (!MCtrack1.isPhysicalPrimary() || !MCtrack2.isPhysicalPrimary()) - continue; - - int pdgParentPhi = 0; - for (const auto& MotherOfMCtrack1 : MCtrack1.mothers_as()) { - for (const auto& MotherOfMCtrack2 : MCtrack2.mothers_as()) { - if (MotherOfMCtrack1 == MotherOfMCtrack2) { - pdgParentPhi = MotherOfMCtrack1.pdgCode(); - } - } - } - - if (pdgParentPhi != 333) - continue; - - TLorentzVector recPhi = recMother(track1, track2, massKa, massKa); - - if (recPhi.M() < lowmPhi || recPhi.M() > upmPhi) - continue; - - if (std::abs(recPhi.Rapidity()) > cfgyAcceptance) - continue; - if (!isCountedPhi.at(0)) { - yaccHist.fill(HIST("hyaccPiRecMC"), genmultiplicity, track.pt(), track.rapidity(massPi)); - MCPhiPionHist.fill(HIST("h4RecMCPhiPiSEInc"), genmultiplicity, track.pt(), nsigmaTPC, nsigmaTOF); - isCountedPhi.at(0) = true; - } - if (std::abs(track.rapidity(massPi) - recPhi.Rapidity()) > cfgFirstCutonDeltay) - continue; - if (!isCountedPhi.at(1)) { - MCPhiPionHist.fill(HIST("h4RecMCPhiPiSEFCut"), genmultiplicity, track.pt(), nsigmaTPC, nsigmaTOF); - isCountedPhi.at(1) = true; - } - if (std::abs(track.rapidity(massPi) - recPhi.Rapidity()) > cfgSecondCutonDeltay) - continue; - if (!isCountedPhi.at(2)) { - MCPhiPionHist.fill(HIST("h4RecMCPhiPiSESCut"), genmultiplicity, track.pt(), nsigmaTPC, nsigmaTOF); - isCountedPhi.at(2) = true; - } + if (!isCountedMCPhi.at(0)) { + MCPhiPionHist.fill(HIST("h4RecMCPhiPiSEInc"), genmultiplicity, track.pt(), nsigmaTPC, nsigmaTOF); + isCountedMCPhi.at(0) = true; + } + if (std::abs(MCtrack.y() - mcParticle.y()) > cfgFirstCutonDeltay) + continue; + if (!isCountedMCPhi.at(1)) { + MCPhiPionHist.fill(HIST("h4RecMCPhiPiSEFCut"), genmultiplicity, track.pt(), nsigmaTPC, nsigmaTOF); + isCountedMCPhi.at(1) = true; + } + if (std::abs(MCtrack.y() - mcParticle.y()) > cfgSecondCutonDeltay) + continue; + if (!isCountedMCPhi.at(2)) { + MCPhiPionHist.fill(HIST("h4RecMCPhiPiSESCut"), genmultiplicity, track.pt(), nsigmaTPC, nsigmaTOF); + isCountedMCPhi.at(2) = true; } } } @@ -1726,7 +1645,6 @@ struct phik0shortanalysis { if (std::abs(mcParticle2.y()) > cfgyAcceptance) continue; if (!isCountedPhi.at(0)) { - yaccHist.fill(HIST("hyaccK0SGenMC"), genmultiplicity, mcParticle1.pt(), mcParticle1.y()); MCPhiK0SHist.fill(HIST("h2PhiK0SGenMCInc"), genmultiplicity, mcParticle1.pt()); if (isAssocColl) MCPhiK0SHist.fill(HIST("h2PhiK0SGenMCIncAssocReco"), genmultiplicity, mcParticle1.pt()); @@ -1805,7 +1723,6 @@ struct phik0shortanalysis { if (std::abs(mcParticle2.y()) > cfgyAcceptance) continue; if (!isCountedPhi.at(0)) { - yaccHist.fill(HIST("hyaccPiGenMC"), genmultiplicity, mcParticle1.pt(), mcParticle1.y()); MCPhiPionHist.fill(HIST("h2PhiPiGenMCInc"), genmultiplicity, mcParticle1.pt()); if (isAssocColl) MCPhiPionHist.fill(HIST("h2PhiPiGenMCIncAssocReco"), genmultiplicity, mcParticle1.pt()); diff --git a/PWGUD/Core/UPCTauCentralBarrelHelperRL.h b/PWGUD/Core/UPCTauCentralBarrelHelperRL.h index a6147089ecc..55a13a0e9c5 100644 --- a/PWGUD/Core/UPCTauCentralBarrelHelperRL.h +++ b/PWGUD/Core/UPCTauCentralBarrelHelperRL.h @@ -206,16 +206,24 @@ float rapidity(float mass, float px, float py, float pz) return 0.5 * std::log((energy(mass, px, py, pz) + pz) / (energy(mass, px, py, pz) - pz)); } -double calculateAcoplanarity(double phi_trk1, double phi_trk2) +double calculateAcoplanarity(double phiTrk1, double phiTrk2) // Function to calculate acoplanarity of two tracks based on phi of both tracks, which is in interval (0,2*pi) { - double aco = std::abs(phi_trk1 - phi_trk2); + double aco = std::abs(phiTrk1 - phiTrk2); if (aco <= o2::constants::math::PI) return aco; else return (o2::constants::math::TwoPI - aco); } +double calculateCollinearity(double etaTrk1, double etaTrk2, double phiTrk1, double phiTrk2) +// Function to calculate deltaR(trk1,trk2) = sqrt(deltaEta^2+deltaPhi^2) +{ + double deltaEta = etaTrk1 - etaTrk2; + double deltaPhi = phiTrk1 - phiTrk2; + return std::sqrt(deltaEta * deltaEta + deltaPhi * deltaPhi); +} + template int countPhysicalPrimary(Ps particles) // Function to loop over particles associated to a mcCollision and return total of physical primary particles diff --git a/PWGUD/Tasks/exclusiveRhoTo4Pi.cxx b/PWGUD/Tasks/exclusiveRhoTo4Pi.cxx index bb90337e371..42025b7ae0c 100644 --- a/PWGUD/Tasks/exclusiveRhoTo4Pi.cxx +++ b/PWGUD/Tasks/exclusiveRhoTo4Pi.cxx @@ -61,6 +61,12 @@ struct UPCAnalysis { Configurable nSigmaTPC_cut{"nsigmatpccut", 3, "TPC cut"}; Configurable nSigmaTOF_cut{"nsigmatofcut", 3, "TOF cut"}; Configurable StrictEventSelection{"StrictEventSelection", true, "Event Selection"}; + + Configurable nBins_pT{"nBins_pT", 1000, "Number of bins for pT"}; + Configurable nBins_IM{"nBins_IM", 1000, "Number of bins for Invariant Mass"}; + Configurable nBins_y{"nBins_y", 1000, "Number of bins for Rapidity"}; + Configurable nBins_Phi{"nBins_phi", 360, "Number of bins for Phi"}; + Configurable nBins_CosTheta{"nBins_cosTheta", 360, "Number of bins for cos Theta"}; //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- // Begin of Init Function----------------------------------------------------------------------------------------------------------------------------------------------------- @@ -82,15 +88,15 @@ struct UPCAnalysis { histos.add("tofNSigmaPi_WTS_PID_Pi", "TOF nSigma Pion with track selection and PID Selection of Pi; Entries", kTH1F, {{100, -15, 15}}); // Track Transverse Momentum - histos.add("pT_track_WOTS", "pT without track selection; pT [GeV/c]; Events", kTH1F, {{1000, 0, 2}}); - histos.add("pT_track_WTS", "pT with track selection; pT [GeV/c]; Events", kTH1F, {{1000, 0, 2}}); - histos.add("pT_track_WTS_PID_Pi", "pT with track selection and PID selection of Pi; pT [GeV/c]; Events", kTH1F, {{1000, 0, 2}}); + histos.add("pT_track_WOTS", "pT without track selection; pT [GeV/c]; Events", kTH1F, {{nBins_pT, 0, 2}}); + histos.add("pT_track_WTS", "pT with track selection; pT [GeV/c]; Events", kTH1F, {{nBins_pT, 0, 2}}); + histos.add("pT_track_WTS_PID_Pi", "pT with track selection and PID selection of Pi; pT [GeV/c]; Events", kTH1F, {{nBins_pT, 0, 2}}); // Zero charge Event Transverse Momentum - histos.add("pT_event_0charge_WTS_PID_Pi", "Event pT in 0 Charge Events With Track Selection and PID Selection of Pi; pT [GeV/c]; Counts", kTH1F, {{1000, 0, 2}}); + histos.add("pT_event_0charge_WTS_PID_Pi", "Event pT in 0 Charge Events With Track Selection and PID Selection of Pi; pT [GeV/c]; Counts", kTH1F, {{nBins_pT, 0, 2}}); // Non Zero charge Event Transverse Momentum - histos.add("pT_event_non0charge_WTS_PID_Pi", "Event pT in Non 0 Charge Events With Track Selection and PID Selection of Pi; pT [GeV/c]; Counts", kTH1F, {{100, 0, 2}}); + histos.add("pT_event_non0charge_WTS_PID_Pi", "Event pT in Non 0 Charge Events With Track Selection and PID Selection of Pi; pT [GeV/c]; Counts", kTH1F, {{nBins_pT, 0, 2}}); // Rapidity of 0 charge Events histos.add("rapidity_event_0charge_WTS_PID_Pi_domainA", "Rapidity of Events With Track Selection and PID Selection of Pi for p_{T} < 0.15 GeV/c; y; Counts", kTH1F, {{1000, -2.5, 2.5}}); @@ -98,19 +104,19 @@ struct UPCAnalysis { histos.add("rapidity_event_0charge_WTS_PID_Pi_domainC", "Rapidity of Events With Track Selection and PID Selection of Pi for p_{T} > 0.80 GeV/c; y; Counts", kTH1F, {{1000, -2.5, 2.5}}); // Rapidity of non 0 charge Events - histos.add("rapidity_event_non0charge_WTS_PID_Pi_domainA", "Rapidity of Events With Track Selection and PID Selection of Pi for p_{T} < 0.15 GeV/c; y; Counts", kTH1F, {{1000, -2.5, 2.5}}); - histos.add("rapidity_event_non0charge_WTS_PID_Pi_domainB", "Rapidity of Events With Track Selection and PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c$; y; Counts", kTH1F, {{1000, -2.5, 2.5}}); - histos.add("rapidity_event_non0charge_WTS_PID_Pi_domainC", "Rapidity of Events With Track Selection and PID Selection of Pi for p_{T} > 0.80 GeV/c; y; Counts", kTH1F, {{1000, -2.5, 2.5}}); + histos.add("rapidity_event_non0charge_WTS_PID_Pi_domainA", "Rapidity of Events With Track Selection and PID Selection of Pi for p_{T} < 0.15 GeV/c; y; Counts", kTH1F, {{nBins_y, -2.5, 2.5}}); + histos.add("rapidity_event_non0charge_WTS_PID_Pi_domainB", "Rapidity of Events With Track Selection and PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c$; y; Counts", kTH1F, {{nBins_y, -2.5, 2.5}}); + histos.add("rapidity_event_non0charge_WTS_PID_Pi_domainC", "Rapidity of Events With Track Selection and PID Selection of Pi for p_{T} > 0.80 GeV/c; y; Counts", kTH1F, {{nBins_y, -2.5, 2.5}}); // Invariant Mass of 0 charge events - histos.add("invMass_event_0charge_WTS_PID_Pi_domainA", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for p_{T} < 0.15 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{1000, 0.8, 2.5}}); // pT < 0.15GeV - histos.add("invMass_event_0charge_WTS_PID_Pi_domainB", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{1000, 0.8, 2.5}}); // 0.15GeV < pT < 0.8GeV - histos.add("invMass_event_0charge_WTS_PID_Pi_domainC", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for p_{T} > 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{1000, 0.8, 2.5}}); // 0.8GeV < pT + histos.add("invMass_event_0charge_WTS_PID_Pi_domainA", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for p_{T} < 0.15 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBins_IM, 0.8, 2.5}}); // pT < 0.15GeV + histos.add("invMass_event_0charge_WTS_PID_Pi_domainB", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBins_IM, 0.8, 2.5}}); // 0.15GeV < pT < 0.8GeV + histos.add("invMass_event_0charge_WTS_PID_Pi_domainC", "Invariant Mass Distribution of 0 charge Events with PID Selection of Pi for p_{T} > 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBins_IM, 0.8, 2.5}}); // 0.8GeV < pT // Invariant mass of non 0 charge events - histos.add("invMass_event_non0charge_WTS_PID_Pi_domainA", "Invariant Mass Distribution of non 0 charge Events with PID Selection of Pi for p_{T} < 0.15 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{1000, 0.8, 2.5}}); // pT < 0.15GeV - histos.add("invMass_event_non0charge_WTS_PID_Pi_domainB", "Invariant Mass Distribution of non 0 charge Events with PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{1000, 0.8, 2.5}}); // 0.15GeV < pT < 0.8GeV - histos.add("invMass_event_non0charge_WTS_PID_Pi_domainC", "Invariant Mass Distribution of non 0 charge Events with PID Selection of Pi for p_{T} > 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{1000, 0.8, 2.5}}); // 0.8GeV < pT + histos.add("invMass_event_non0charge_WTS_PID_Pi_domainA", "Invariant Mass Distribution of non 0 charge Events with PID Selection of Pi for p_{T} < 0.15 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBins_IM, 0.8, 2.5}}); // pT < 0.15GeV + histos.add("invMass_event_non0charge_WTS_PID_Pi_domainB", "Invariant Mass Distribution of non 0 charge Events with PID Selection of Pi for 0.15< p_{T} < 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBins_IM, 0.8, 2.5}}); // 0.15GeV < pT < 0.8GeV + histos.add("invMass_event_non0charge_WTS_PID_Pi_domainC", "Invariant Mass Distribution of non 0 charge Events with PID Selection of Pi for p_{T} > 0.80 GeV/c; m(#pi^{+}#pi^{-}#pi^{+}#pi^{-}) [GeV/c]", kTH1F, {{nBins_IM, 0.8, 2.5}}); // 0.8GeV < pT // tpc signal histos.add("tpcSignal", "TPC dEdx vs p; p [GeV/c]; dEdx [a.u.]", kTH2F, {{500, 0, 10}, {5000, 0.0, 5000.0}}); @@ -128,10 +134,10 @@ struct UPCAnalysis { histos.add("V0A", "V0A amplitude", kTH1F, {{1000, 0.0, 100}}); // Collin Soper Theta and Phi - histos.add("CS_phi_pair_1", "#phi Distribution; #phi; Entries", kTH1F, {{200, -3.2, 3.2}}); - histos.add("CS_phi_pair_2", "#phi Distribution; #phi; Entries", kTH1F, {{200, -3.2, 3.2}}); - histos.add("CS_costheta_pair_1", "#theta Distribution;cos(#theta); Entries", kTH1F, {{200, -1, 1}}); - histos.add("CS_costheta_pair_2", "#theta Distribution;cos(#theta); Entries", kTH1F, {{200, -1, 1}}); + histos.add("CS_phi_pair_1", "#phi Distribution; #phi; Entries", kTH1F, {{nBins_Phi, -3.2, 3.2}}); + histos.add("CS_phi_pair_2", "#phi Distribution; #phi; Entries", kTH1F, {{nBins_Phi, -3.2, 3.2}}); + histos.add("CS_costheta_pair_1", "#theta Distribution;cos(#theta); Entries", kTH1F, {{nBins_CosTheta, -1, 1}}); + histos.add("CS_costheta_pair_2", "#theta Distribution;cos(#theta); Entries", kTH1F, {{nBins_CosTheta, -1, 1}}); } // End of init function //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx index 9bb0e7a16db..3d04ff94e74 100644 --- a/PWGUD/Tasks/upcTauCentralBarrelRL.cxx +++ b/PWGUD/Tasks/upcTauCentralBarrelRL.cxx @@ -69,11 +69,11 @@ struct UpcTauCentralBarrelRL { struct : ConfigurableGroup { Configurable whichGapSide{"whichGapSide", 2, {"0 for side A, 1 for side C, 2 for both sides"}}; Configurable useTrueGap{"useTrueGap", true, {"Calculate gapSide for a given FV0/FT0/ZDC thresholds"}}; - Configurable cutTrueGapSideFV0{"TrueGapFV0", 100, "FV0A threshold for SG selector"}; - Configurable cutTrueGapSideFT0A{"TrueGapFT0A", 200., "FT0A threshold for SG selector"}; - Configurable cutTrueGapSideFT0C{"TrueGapFT0C", 100., "FT0C threshold for SG selector"}; - Configurable cutTrueGapSideZDC{"TrueGapZDC", 1000., "ZDC threshold for SG selector"}; - Configurable cutFITtime{"cutFITtime", 40., "Maximum FIT time allowed. Default is 4ns"}; + Configurable cutTrueGapSideFV0{"TrueGapFV0", -1, "FV0A threshold for SG selector"}; + Configurable cutTrueGapSideFT0A{"TrueGapFT0A", 150., "FT0A threshold for SG selector"}; + Configurable cutTrueGapSideFT0C{"TrueGapFT0C", 50., "FT0C threshold for SG selector"}; + Configurable cutTrueGapSideZDC{"TrueGapZDC", 0., "ZDC threshold for SG selector. 0 is <1n, 4.2 is <2n, 6.7 is <3n, 9.5 is <4n, 12.5 is <5n"}; + Configurable cutFITtime{"cutFITtime", 40., "Maximum FIT time allowed. Default is 40ns"}; Configurable applyAcceptanceSelection{"applyAcceptanceSelection", false, {"Select events in ALICE CB acceptance set with cutTrackEta"}}; Configurable cutTrackEta{"cutTrackEta", 0.9, "Cut on central barrel track eta in absolute values."}; } cutSample; @@ -101,17 +101,28 @@ struct UpcTauCentralBarrelRL { struct : ConfigurableGroup { Configurable applyTauEventSelection{"applyTauEventSelection", true, {"Select tau event."}}; Configurable cutOppositeCharge{"cutOppositeCharge", true, {"Tracks have opposite charge."}}; - Configurable cutAcoplanarity{"cutAcoplanarity", 4 * o2::constants::math::PI / 5, {"Opening angle of the tracks. What is more goes away."}}; + Configurable cutMaxAcoplanarity{"cutMaxAcoplanarity", 4 * o2::constants::math::PI / 5, {"Opening angle of the tracks. What is more goes away."}}; + Configurable cutMinAcoplanarity{"cutMinAcoplanarity", 2 * o2::constants::math::PI / 5, {"Opening angle of the tracks. What is less goes away."}}; Configurable cutElectronHasTOF{"cutElectronHasTOF", true, {"Electron is required to hit TOF."}}; Configurable cutGoodElectron{"cutGoodElectron", true, {"Select good electron."}}; Configurable cutOutRho{"cutOutRho", false, {"Cut out rho mass under two tracks are pions hypothesis"}}; Configurable cutOnRho{"cutOnRho", false, {"Cut on rho mass under two tracks are pions hypothesis"}}; Configurable cutMinRhoMass{"cutMinRhoMass", 0.6, {"Lower limit on the rho mass region for cut"}}; Configurable cutMaxRhoMass{"cutMaxRhoMass", 0.95, {"Higher limit on the rho mass region for cut"}}; - Configurable cutMinElectronNsigma{"cutMinElectronNsigma", 2.0, {"Upper n sigma cut on el hypo of selected electron. What is more goes away."}}; - Configurable cutMaxElectronNsigma{"cutMaxElectronNsigma", -1.0, {"Lower n sigma cut on el hypo of selected electron. What is less goes away."}}; - Configurable cutMinElectronPiNsigma{"cutMinElectronPiNsigma", -99.0, {"Upper n sigma cut on pi hypo of selected electron. What is less till lower cut goes away."}}; - Configurable cutMaxElectronPiNsigma{"cutMaxElectronPiNsigma", 99.0, {"Lower n sigma cut on pi hypo of selected electron. What is more till upper cut goes away."}}; + Configurable cutMinElectronNsigmaEl{"cutMinElectronNsigmaEl", 2.0, {"Good el hypo in. Upper n sigma cut on el hypo of selected electron. What is more goes away."}}; + Configurable cutMaxElectronNsigmaEl{"cutMaxElectronNsigmaEl", -1.0, {"Good el hypo in. Lower n sigma cut on el hypo of selected electron. What is less goes away."}}; + Configurable cutMinElectronNsigmaPi{"cutMinElectronNsigmaPi", -4.0, {"Good pi hypo out. Lower n sigma cut on pi hypo of selected electron. What is more till upper cut goes away."}}; + Configurable cutMaxElectronNsigmaPi{"cutMaxElectronNsigmaPi", 4.0, {"Good pi hypo out. Upper n sigma cut on pi hypo of selected electron. What is less till lower cut goes away."}}; + Configurable cutMinElectronNsigmaKa{"cutMinElectronNsigmaKa", -4.0, {"Good Ka hypo out. Lower n sigma cut on Ka hypo of selected electron. What is more till upper cut goes away."}}; + Configurable cutMaxElectronNsigmaKa{"cutMaxElectronNsigmaKa", 4.0, {"Good Ka hypo out. Upper n sigma cut on Ka hypo of selected electron. What is less till lower cut goes away."}}; + Configurable cutMinElectronNsigmaPr{"cutMinElectronNsigmaPr", -4.0, {"Good Pr hypo out. Lower n sigma cut on Pr hypo of selected electron. What is more till upper cut goes away."}}; + Configurable cutMaxElectronNsigmaPr{"cutMaxElectronNsigmaPr", 4.0, {"Good Pr hypo out. Upper n sigma cut on Pr hypo of selected electron. What is less till lower cut goes away."}}; + Configurable cutPionHasTOF{"cutPionHasTOF", true, {"Pion is required to hit TOF."}}; + Configurable cutGoodMupion{"cutGoodMupion", true, {"Select good muon/pion."}}; + Configurable cutMinPionNsigmaPi{"cutMinPionNsigmaPi", 4.0, {"Good pi hypo in. Upper n sigma cut on pi hypo of selected electron. What is more goes away."}}; + Configurable cutMaxPionNsigmaPi{"cutMaxPionNsigmaPi", -4.0, {"Good pi hypo in. Lower n sigma cut on pi hypo of selected electron. What is less goes away."}}; + Configurable cutMinPionNsigmaKa{"cutMinPionNsigmaKa", -4.0, {"Good Ka hypo out. Lower n sigma cut on Ka hypo of selected electron. What is more till upper cut goes away."}}; + Configurable cutMaxPionNsigmaKa{"cutMaxPionNsigmaKa", 4.0, {"Good Ka hypo out. Upper n sigma cut on Ka hypo of selected electron. What is less till lower cut goes away."}}; } cutTauEvent; struct : ConfigurableGroup { @@ -122,34 +133,36 @@ struct UpcTauCentralBarrelRL { } cutPID; struct : ConfigurableGroup { - ConfigurableAxis axisNtracks{"axisNtracks", {30, -0.5, 29.5}, "Number of tracks in collision"}; - ConfigurableAxis axisNparticles{"axisNparticles", {100, -0.5, 99.5}, "Number of particles in collision"}; - ConfigurableAxis axisZvtx{"axisZvtx", {40, -20., 20.}, "Z-vertex position (cm)"}; - ConfigurableAxis axisInvMass{"axisInvMass", {400, 1., 5.}, "Invariant mass (GeV/c^{2})"}; - ConfigurableAxis axisInvMassWide{"axisInvMassWide", {1000, 0., 10.}, "Invariant mass (GeV/c^{2}), wider range"}; - ConfigurableAxis axisMom{"axisMom", {400, 0., 2.}, "Momentum (GeV/c)"}; - ConfigurableAxis axisMomWide{"axisMomWide", {1000, 0., 10.}, "Momentum (GeV/c), wider range"}; - ConfigurableAxis axisMomSigned{"axisMomSigned", {800, -2., 2.}, "Signed momentum (GeV/c)"}; - ConfigurableAxis axisPt{"axisPt", {400, 0., 2.}, "Transversal momentum (GeV/c)"}; - ConfigurableAxis axisPhi{"axisPhi", {64, -o2::constants::math::TwoPI, o2::constants::math::TwoPI}, "Azimuthal angle (a.y.)"}; - ConfigurableAxis axisModPhi{"axisModPhi", {400, 0., .4}, "Track fmod(#phi,#pi/9)"}; - ConfigurableAxis axisEta{"axisEta", {50, -1.2, 1.2}, "Pseudorapidity (a.u.)"}; - ConfigurableAxis axisRap{"axisRap", {50, -1.2, 1.2}, "Rapidity (a.u.)"}; - ConfigurableAxis axisAcoplanarity{"axisAcoplanarity", {32, 0.0, o2::constants::math::PI}, "Acoplanarity (rad)"}; - ConfigurableAxis axisTPCdEdx{"axisTPCdEdx", {2000, 0., 200.}, "TPC dE/dx (a.u.)"}; - ConfigurableAxis axisTOFsignal{"axisTOFsignal", {2500, -10000., 40000.}, "TOF signal (a.u.)"}; - ConfigurableAxis axisNsigma{"axisNsigma", {200, -10., 10.}, "n sigma"}; - ConfigurableAxis axisDCA{"axisDCA", {100, -0.5, 0.5}, "DCA (cm)"}; - ConfigurableAxis axisAvgITSclsSizes{"axisAvgITSclsSizes", {500, 0., 10.}, "ITS average cluster size"}; - ConfigurableAxis axisITSnCls{"axisITSnCls", {8, -0.5, 7.5}, "ITS n clusters"}; - ConfigurableAxis axisITSchi2{"axisITSchi2", {100, 0, 50}, "UTS chi2"}; - ConfigurableAxis axisTPCnCls{"axisTPCnCls", {165, -0.5, 164.5}, "TPC n clusters"}; - ConfigurableAxis axisTPCxRwsFrac{"axisTPCxRwsFrac", {200, 0.0, 2.0}, "TPC fraction of crossed raws"}; - ConfigurableAxis axisTPCchi2{"axisTPCchi2", {100, 0, 10}, "TPC chi2"}; - ConfigurableAxis axisFITtime{"axisFITtime", {201, -40.5, 40.5}, "FIT time in ns"}; - ConfigurableAxis axisFITamplitude{"axisFITamplitude", {1000, 0., 1000.}, "FIT amplitude"}; - - AxisSpec axisChannels{CH_ENUM_COUNTER, -0.5, +CH_ENUM_COUNTER - 0.5, "Channels (-)"}; + ConfigurableAxis zzAxisNtracks{"zzAxisNtracks", {30, -0.5, 29.5}, "Number of tracks in collision"}; + ConfigurableAxis zzAxisNparticles{"zzAxisNparticles", {100, -0.5, 99.5}, "Number of particles in collision"}; + ConfigurableAxis zzAxisZvtx{"zzAxisZvtx", {40, -20., 20.}, "Z-vertex position (cm)"}; + ConfigurableAxis zzAxisInvMass{"zzAxisInvMass", {400, 1., 5.}, "Invariant mass (GeV/c^{2})"}; + ConfigurableAxis zzAxisInvMassWide{"zzAxisInvMassWide", {1000, 0., 10.}, "Invariant mass (GeV/c^{2}), wider range"}; + ConfigurableAxis zzAxisMom{"zzAxisMom", {400, 0., 2.}, "Momentum (GeV/c)"}; + ConfigurableAxis zzAxisMomWide{"zzAxisMomWide", {1000, 0., 10.}, "Momentum (GeV/c), wider range"}; + ConfigurableAxis zzAxisMomSigned{"zzAxisMomSigned", {800, -2., 2.}, "Signed momentum (GeV/c)"}; + ConfigurableAxis zzAxisPt{"zzAxisPt", {400, 0., 2.}, "Transversal momentum (GeV/c)"}; + ConfigurableAxis zzAxisPhi{"zzAxisPhi", {64, -o2::constants::math::TwoPI, o2::constants::math::TwoPI}, "Azimuthal angle (a.y.)"}; + ConfigurableAxis zzAxisModPhi{"zzAxisModPhi", {400, 0., .4}, "Track fmod(#phi,#pi/9)"}; + ConfigurableAxis zzAxisEta{"zzAxisEta", {50, -1.2, 1.2}, "Pseudorapidity (a.u.)"}; + ConfigurableAxis zzAxisRap{"zzAxisRap", {50, -1.2, 1.2}, "Rapidity (a.u.)"}; + ConfigurableAxis zzAxisFraction{"zzAxisFraction", {500, 0., 1.}, "Fraction (-)"}; + ConfigurableAxis zzAxisAcoplanarity{"zzAxisAcoplanarity", {32, 0.0, o2::constants::math::PI}, "Acoplanarity (rad)"}; + ConfigurableAxis zzAxisCollinearity{"zzAxisCollinearity", {200, 0, 20}, "Collinearity (-)"}; + ConfigurableAxis zzAxisTPCdEdx{"zzAxisTPCdEdx", {2000, 0., 200.}, "TPC dE/dx (a.u.)"}; + ConfigurableAxis zzAxisTOFsignal{"zzAxisTOFsignal", {2500, -10000., 40000.}, "TOF signal (a.u.)"}; + ConfigurableAxis zzAxisNsigma{"zzAxisNsigma", {200, -10., 10.}, "n sigma"}; + ConfigurableAxis zzAxisDCA{"zzAxisDCA", {100, -0.5, 0.5}, "DCA (cm)"}; + ConfigurableAxis zzAxisAvgITSclsSizes{"zzAxisAvgITSclsSizes", {500, 0., 10.}, "ITS average cluster size"}; + ConfigurableAxis zzAxisITSnCls{"zzAxisITSnCls", {8, -0.5, 7.5}, "ITS n clusters"}; + ConfigurableAxis zzAxisITSchi2{"zzAxisITSchi2", {100, 0, 50}, "UTS chi2"}; + ConfigurableAxis zzAxisTPCnCls{"zzAxisTPCnCls", {165, -0.5, 164.5}, "TPC n clusters"}; + ConfigurableAxis zzAxisTPCxRwsFrac{"zzAxisTPCxRwsFrac", {200, 0.0, 2.0}, "TPC fraction of crossed raws"}; + ConfigurableAxis zzAxisTPCchi2{"zzAxisTPCchi2", {100, 0, 10}, "TPC chi2"}; + ConfigurableAxis zzAxisFITtime{"zzAxisFITtime", {201, -40.5, 40.5}, "FIT time in ns"}; + ConfigurableAxis zzAxisFITamplitude{"zzAxisFITamplitude", {1000, 0., 1000.}, "FIT amplitude"}; + + AxisSpec zzAxisChannels{CH_ENUM_COUNTER, -0.5, +CH_ENUM_COUNTER - 0.5, "Channels (-)"}; } confAxis; using FullUDTracks = soa::Join; @@ -171,520 +184,524 @@ struct UpcTauCentralBarrelRL { histos.add("Events/hCountCollisions", ";;Number of analysed collision (-)", HistType::kTH1D, {{1, 0.5, 1.5}}); histos.add("Events/UDtableGapSide", ";GapSide value from UD table (-);Number of events (-)", HistType::kTH1D, {{4, -1.5, 2.5}}); histos.add("Events/TrueGapSideDiffToTableValue", ";Difference trueGapSide from SGselector and gapSide from UD table (-);Number of events (-)", HistType::kTH1D, {{7, -3.5, 3.5}}); - histos.add("Events/hNreconstructedTracks", ";Number of tracks in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNtracks}); - histos.add("Events/hNreconstructedPVGT", ";Number of good track particles from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNtracks}); - histos.add("Events/hNreconstructedNotPVGT", ";Number of good track particles from NOT primary vertex in a collision (-);Number of events (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNtracks}); - histos.add("Events/hNreconstructedPVGTelectrons", ";Number of good track identified electrons from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNtracks}); - histos.add("Events/hNreconstructedPVGTmuons", ";Number of good track identified muons from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNtracks}); - histos.add("Events/hNreconstructedPVGTpions", ";Number of good track identified pions from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNtracks}); - histos.add("Events/hNreconstructedPVGTothers", ";Number of good track NOT identified electron/muon/pion particles from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNtracks}); - histos.add("Events/hChannels", ";Channels (-);Number of events (-)", HistType::kTH1D, {{confAxis.axisChannels}}); - histos.add("Events/FIT/hAmplitudeFT0A", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITamplitude}}); - histos.add("Events/FIT/hAmplitudeFT0C", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITamplitude}}); - histos.add("Events/FIT/hAmplitudeFDDA", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITamplitude}}); - histos.add("Events/FIT/hAmplitudeFDDC", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITamplitude}}); - histos.add("Events/FIT/hAmplitudeFV0A", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITamplitude}}); - histos.add("Events/FIT/hTimeFT0A", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITtime}}); - histos.add("Events/FIT/hTimeFT0C", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITtime}}); - histos.add("Events/FIT/hTimeFDDA", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITtime}}); - histos.add("Events/FIT/hTimeFDDC", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITtime}}); - histos.add("Events/FIT/hTimeFV0A", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.axisFITtime}}); - histos.add("Events/FIT/hTimeFT0AvsFT0C", ";FT0A time (ns);FT0C time (ns)", HistType::kTH2F, {{confAxis.axisFITtime}, {confAxis.axisFITtime}}); - histos.add("Events/FIT/hTimeFT0CvsFDDA", ";FT0C time (ns);FDDA time (ns)", HistType::kTH2F, {{confAxis.axisFITtime}, {confAxis.axisFITtime}}); - histos.add("Events/FIT/hTimeFDDAvsFDDC", ";FDDA time (ns);FDDC time (ns)", HistType::kTH2F, {{confAxis.axisFITtime}, {confAxis.axisFITtime}}); - histos.add("Events/FIT/hTimeFDDCvsFV0A", ";FDDC time (ns);FV0A time (ns)", HistType::kTH2F, {{confAxis.axisFITtime}, {confAxis.axisFITtime}}); - histos.add("Events/FIT/hTimeFV0AvsFT0A", ";FV0A time (ns);FT0A time (ns)", HistType::kTH2F, {{confAxis.axisFITtime}, {confAxis.axisFITtime}}); - - histos.add("Tracks/raw/hTrackZ", ";Track z-vertex (cm);Number of events (-)", HistType::kTH1D, {confAxis.axisZvtx}); - histos.add("Tracks/raw/hTrackP", ";Track #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("Tracks/raw/hTrackPt", ";Track #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("Tracks/raw/hTrackPhi", ";Track #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("Tracks/raw/hTrackPtvsModPhi", ";Track #it{p_{T}} (GeV/c);Track fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("Tracks/raw/hTrackPtvsModPhiTOF", ";Track #it{p_{T}} (GeV/c);Track fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("Tracks/raw/hTrackEta", ";Track #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.axisEta}); - histos.add("Tracks/raw/hTrackDcaXY", ";Track DCA_{XY} (cm);Number of events (-)", HistType::kTH1D, {confAxis.axisDCA}); - histos.add("Tracks/raw/hTrackPtvsDcaXY", ";Track #it{p_{T}} (GeV/c);Track DCA_{XY} (cm)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisDCA}); - histos.add("Tracks/raw/hTrackDcaZ", ";Track DCA_{Z} (cm);Number of events (-)", HistType::kTH1D, {confAxis.axisDCA}); - histos.add("Tracks/raw/ITS/itsNCls", "number of found ITS clusters;# clusters ITS", kTH1D, {confAxis.axisITSnCls}); - histos.add("Tracks/raw/ITS/itsChi2NCl", "chi2 per ITS cluster;chi2 / cluster ITS", kTH1D, {confAxis.axisITSchi2}); - histos.add("Tracks/raw/TPC/tpcNClsFindable", "number of findable TPC clusters;# findable clusters TPC", kTH1D, {confAxis.axisTPCnCls}); - histos.add("Tracks/raw/TPC/tpcNClsFound", "number of found TPC clusters;# clusters TPC", kTH1D, {confAxis.axisTPCnCls}); - histos.add("Tracks/raw/TPC/tpcCrossedRows", "number of crossed TPC rows;# crossed rows TPC", kTH1D, {confAxis.axisTPCnCls}); - histos.add("Tracks/raw/TPC/tpcCrossedRowsOverFindableCls", "crossed TPC rows over findable clusters;crossed rows / findable clusters TPC", kTH1D, {confAxis.axisTPCxRwsFrac}); - histos.add("Tracks/raw/TPC/tpcChi2NCl", "chi2 per cluster in TPC;chi2 / cluster TPC", kTH1D, {confAxis.axisTPCchi2}); - histos.add("Tracks/GoodTrack/hTrackZ", ";Track z-vertex (cm);Number of events (-)", HistType::kTH1D, {confAxis.axisZvtx}); - histos.add("Tracks/GoodTrack/hTrackP", ";Track #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("Tracks/GoodTrack/hTrackPt", ";Track #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("Tracks/GoodTrack/hTrackPhi", ";Track #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("Tracks/GoodTrack/hTrackPtvsModPhi", ";Track #it{p_{T}} (GeV/c);Track fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("Tracks/GoodTrack/hTrackPtvsModPhiTOF", ";Track #it{p_{T}} (GeV/c);Track fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("Tracks/GoodTrack/hTrackEta", ";Track #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.axisEta}); - histos.add("Tracks/GoodTrack/hTrackDcaXY", ";Track DCA_{XY} (cm);Number of events (-)", HistType::kTH1D, {confAxis.axisDCA}); - histos.add("Tracks/GoodTrack/hTrackPtvsDcaXY", ";Track #it{p_{T}} (GeV/c);Track DCA_{XY} (cm)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisDCA}); - histos.add("Tracks/GoodTrack/hTrackDcaZ", ";Track DCA_{Z} (cm);Number of events (-)", HistType::kTH1D, {confAxis.axisDCA}); - histos.add("Tracks/GoodTrack/ITS/itsNCls", "number of found ITS clusters;# clusters ITS", kTH1D, {confAxis.axisITSnCls}); - histos.add("Tracks/GoodTrack/ITS/itsChi2NCl", "chi2 per ITS cluster;chi2 / cluster ITS", kTH1D, {confAxis.axisITSchi2}); - histos.add("Tracks/GoodTrack/TPC/tpcNClsFindable", "number of findable TPC clusters;# findable clusters TPC", kTH1D, {confAxis.axisTPCnCls}); - histos.add("Tracks/GoodTrack/TPC/tpcNClsFound", "number of found TPC clusters;# clusters TPC", kTH1D, {confAxis.axisTPCnCls}); - histos.add("Tracks/GoodTrack/TPC/tpcCrossedRows", "number of crossed TPC rows;# crossed rows TPC", kTH1D, {confAxis.axisTPCnCls}); - histos.add("Tracks/GoodTrack/TPC/tpcCrossedRowsOverFindableCls", "crossed TPC rows over findable clusters;crossed rows / findable clusters TPC", kTH1D, {confAxis.axisTPCxRwsFrac}); - histos.add("Tracks/GoodTrack/TPC/tpcChi2NCl", "chi2 per cluster in TPC;chi2 / cluster TPC", kTH1D, {confAxis.axisTPCchi2}); + histos.add("Events/hNreconstructedTracks", ";Number of tracks in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNtracks}); + histos.add("Events/hNreconstructedPVGT", ";Number of good track particles from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNtracks}); + histos.add("Events/hNreconstructedNotPVGT", ";Number of good track particles from NOT primary vertex in a collision (-);Number of events (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNtracks}); + histos.add("Events/hNreconstructedPVGTelectrons", ";Number of good track identified electrons from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNtracks}); + histos.add("Events/hNreconstructedPVGTmuons", ";Number of good track identified muons from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNtracks}); + histos.add("Events/hNreconstructedPVGTpions", ";Number of good track identified pions from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNtracks}); + histos.add("Events/hNreconstructedPVGTothers", ";Number of good track NOT identified electron/muon/pion particles from primary vertex in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNtracks}); + histos.add("Events/hChannels", ";Channels (-);Number of events (-)", HistType::kTH1D, {{confAxis.zzAxisChannels}}); + histos.add("Events/FIT/hAmplitudeFT0A", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITamplitude}}); + histos.add("Events/FIT/hAmplitudeFT0C", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITamplitude}}); + histos.add("Events/FIT/hAmplitudeFDDA", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITamplitude}}); + histos.add("Events/FIT/hAmplitudeFDDC", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITamplitude}}); + histos.add("Events/FIT/hAmplitudeFV0A", ";Amplitude (-);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITamplitude}}); + histos.add("Events/FIT/hTimeFT0A", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITtime}}); + histos.add("Events/FIT/hTimeFT0C", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITtime}}); + histos.add("Events/FIT/hTimeFDDA", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITtime}}); + histos.add("Events/FIT/hTimeFDDC", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITtime}}); + histos.add("Events/FIT/hTimeFV0A", ";Time (ns);Number of events (-)", HistType::kTH1F, {{confAxis.zzAxisFITtime}}); + histos.add("Events/FIT/hTimeFT0AvsFT0C", ";FT0A time (ns);FT0C time (ns)", HistType::kTH2F, {{confAxis.zzAxisFITtime}, {confAxis.zzAxisFITtime}}); + histos.add("Events/FIT/hTimeFT0CvsFDDA", ";FT0C time (ns);FDDA time (ns)", HistType::kTH2F, {{confAxis.zzAxisFITtime}, {confAxis.zzAxisFITtime}}); + histos.add("Events/FIT/hTimeFDDAvsFDDC", ";FDDA time (ns);FDDC time (ns)", HistType::kTH2F, {{confAxis.zzAxisFITtime}, {confAxis.zzAxisFITtime}}); + histos.add("Events/FIT/hTimeFDDCvsFV0A", ";FDDC time (ns);FV0A time (ns)", HistType::kTH2F, {{confAxis.zzAxisFITtime}, {confAxis.zzAxisFITtime}}); + histos.add("Events/FIT/hTimeFV0AvsFT0A", ";FV0A time (ns);FT0A time (ns)", HistType::kTH2F, {{confAxis.zzAxisFITtime}, {confAxis.zzAxisFITtime}}); + + histos.add("Tracks/raw/hTrackZ", ";Track z-vertex (cm);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisZvtx}); + histos.add("Tracks/raw/hTrackP", ";Track #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("Tracks/raw/hTrackPt", ";Track #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("Tracks/raw/hTrackPhi", ";Track #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("Tracks/raw/hTrackPtvsModPhi", ";Track #it{p_{T}} (GeV/c);Track fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("Tracks/raw/hTrackPtvsModPhiTOF", ";Track #it{p_{T}} (GeV/c);Track fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("Tracks/raw/hTrackEta", ";Track #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisEta}); + histos.add("Tracks/raw/hTrackDcaXY", ";Track DCA_{XY} (cm);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisDCA}); + histos.add("Tracks/raw/hTrackPtvsDcaXY", ";Track #it{p_{T}} (GeV/c);Track DCA_{XY} (cm)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisDCA}); + histos.add("Tracks/raw/hTrackDcaZ", ";Track DCA_{Z} (cm);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisDCA}); + histos.add("Tracks/raw/ITS/itsNCls", "number of found ITS clusters;# clusters ITS", kTH1D, {confAxis.zzAxisITSnCls}); + histos.add("Tracks/raw/ITS/itsChi2NCl", "chi2 per ITS cluster;chi2 / cluster ITS", kTH1D, {confAxis.zzAxisITSchi2}); + histos.add("Tracks/raw/TPC/tpcNClsFindable", "number of findable TPC clusters;# findable clusters TPC", kTH1D, {confAxis.zzAxisTPCnCls}); + histos.add("Tracks/raw/TPC/tpcNClsFound", "number of found TPC clusters;# clusters TPC", kTH1D, {confAxis.zzAxisTPCnCls}); + histos.add("Tracks/raw/TPC/tpcCrossedRows", "number of crossed TPC rows;# crossed rows TPC", kTH1D, {confAxis.zzAxisTPCnCls}); + histos.add("Tracks/raw/TPC/tpcCrossedRowsOverFindableCls", "crossed TPC rows over findable clusters;crossed rows / findable clusters TPC", kTH1D, {confAxis.zzAxisTPCxRwsFrac}); + histos.add("Tracks/raw/TPC/tpcChi2NCl", "chi2 per cluster in TPC;chi2 / cluster TPC", kTH1D, {confAxis.zzAxisTPCchi2}); + histos.add("Tracks/GoodTrack/hTrackZ", ";Track z-vertex (cm);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisZvtx}); + histos.add("Tracks/GoodTrack/hTrackP", ";Track #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("Tracks/GoodTrack/hTrackPt", ";Track #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("Tracks/GoodTrack/hTrackPhi", ";Track #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("Tracks/GoodTrack/hTrackPtvsModPhi", ";Track #it{p_{T}} (GeV/c);Track fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("Tracks/GoodTrack/hTrackPtvsModPhiTOF", ";Track #it{p_{T}} (GeV/c);Track fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("Tracks/GoodTrack/hTrackEta", ";Track #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisEta}); + histos.add("Tracks/GoodTrack/hTrackDcaXY", ";Track DCA_{XY} (cm);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisDCA}); + histos.add("Tracks/GoodTrack/hTrackPtvsDcaXY", ";Track #it{p_{T}} (GeV/c);Track DCA_{XY} (cm)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisDCA}); + histos.add("Tracks/GoodTrack/hTrackDcaZ", ";Track DCA_{Z} (cm);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisDCA}); + histos.add("Tracks/GoodTrack/ITS/itsNCls", "number of found ITS clusters;# clusters ITS", kTH1D, {confAxis.zzAxisITSnCls}); + histos.add("Tracks/GoodTrack/ITS/itsChi2NCl", "chi2 per ITS cluster;chi2 / cluster ITS", kTH1D, {confAxis.zzAxisITSchi2}); + histos.add("Tracks/GoodTrack/TPC/tpcNClsFindable", "number of findable TPC clusters;# findable clusters TPC", kTH1D, {confAxis.zzAxisTPCnCls}); + histos.add("Tracks/GoodTrack/TPC/tpcNClsFound", "number of found TPC clusters;# clusters TPC", kTH1D, {confAxis.zzAxisTPCnCls}); + histos.add("Tracks/GoodTrack/TPC/tpcCrossedRows", "number of crossed TPC rows;# crossed rows TPC", kTH1D, {confAxis.zzAxisTPCnCls}); + histos.add("Tracks/GoodTrack/TPC/tpcCrossedRowsOverFindableCls", "crossed TPC rows over findable clusters;crossed rows / findable clusters TPC", kTH1D, {confAxis.zzAxisTPCxRwsFrac}); + histos.add("Tracks/GoodTrack/TPC/tpcChi2NCl", "chi2 per cluster in TPC;chi2 / cluster TPC", kTH1D, {confAxis.zzAxisTPCchi2}); } if (doPIDhistos) { - histos.add("Tracks/raw/PID/hTPCsignalVsZ", "All tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/hTPCsignalVsP", "All tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/hTPCsignalVsPt", "All tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/hTPCsignalVsEta", "All tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/hTPCsignalVsPhi", "All tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/hTOFsignalVsP", "All tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("Tracks/raw/PID/hTPCnSigmaElVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/raw/PID/hTPCnSigmaMuVsP", ";Track #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/raw/PID/hTPCnSigmaPiVsP", ";Track #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/raw/PID/hTPCnSigmaKaVsP", ";Track #it{p} (GeV/c);n#sigma^{K}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/raw/PID/hTPCnSigmaPrVsP", ";Track #it{p} (GeV/c);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsZ", "Positively charged tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsP", "Positively charged tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsPt", "Positively charged tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsEta", "Positively charged tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsPhi", "Positively charged tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/PosCharge/hTOFsignalVsP", "Positively charged tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsZ", "Negatively charged tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsP", "Negatively charged tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsPt", "Negatively charged tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsEta", "Negatively charged tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsPhi", "Negatively charged tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/raw/PID/NegCharge/hTOFsignalVsP", "Negatively charged tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("Tracks/GoodTrack/PID/hTPCsignalVsZ", "All good tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/hTPCsignalVsP", "All good tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/hTPCsignalVsPt", "All good tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/hTPCsignalVsEta", "All good tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/hTPCsignalVsPhi", "All good tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/hTPCnSigmaElVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/hTPCnSigmaMuVsP", ";Track #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/hTPCnSigmaPiVsP", ";Track #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/hTPCnSigmaKaVsP", ";Track #it{p} (GeV/c);n#sigma^{K}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/hTPCnSigmaPrVsP", ";Track #it{p} (GeV/c);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/hTOFsignalVsP", "All good tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsZ", "Positively charged good tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsP", "Positively charged good tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsPt", "Positively charged good tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsEta", "Positively charged good tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsPhi", "Positively charged good tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/PosCharge/hTOFsignalVsP", "Positively charged good tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsZ", "Negatively charged good tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsP", "Negatively charged good tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsPt", "Negatively charged good tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsEta", "Negatively charged good tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsPhi", "Negatively charged good tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/NegCharge/hTOFsignalVsP", "Negatively charged good tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsZ", "Identified electrons;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsP", "Identified electrons;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsPt", "Identified electrons;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsEta", "Identified electrons;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsPhi", "Identified electrons;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Electron/hTOFsignalVsP", "Identified electrons;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaVsP", "Identified electrons;Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaVsP", "Identified electrons;Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaElVsMu", "Identified electrons;n#sigma^{#it{e}}_{TPC} (arb. units);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaElVsMu", "Identified electrons;n#sigma^{#it{e}}_{TOF} (arb. units);n#sigma^{#mu}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaElVsPi", "Identified electrons;n#sigma^{#it{e}}_{TPC} (arb. units);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaElVsPi", "Identified electrons;n#sigma^{#it{e}}_{TOF} (arb. units);n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaElVsKa", "Identified electrons;n#sigma^{#it{e}}_{TPC} (arb. units);n#sigma^{#it{K}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaElVsKa", "Identified electrons;n#sigma^{#it{e}}_{TOF} (arb. units);n#sigma^{#it{K}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaElVsPr", "Identified electrons;n#sigma^{#it{e}}_{TPC} (arb. units);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaElVsPr", "Identified electrons;n#sigma^{#it{e}}_{TOF} (arb. units);n#sigma^{p}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsZ", "Identified muons;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsP", "Identified muons;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsPt", "Identified muons;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsEta", "Identified muons;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsPhi", "Identified muons;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Muon/hTOFsignalVsP", "Identified muons;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaVsP", "Identified muons;Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaVsP", "Identified muons;Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaMuVsEl", "Identified muons;n#sigma^{#mu}_{TPC} (arb. units);n#sigma^{#it{e}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaMuVsEl", "Identified muons;n#sigma^{#mu}_{TOF} (arb. units);n#sigma^{#it{e}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaMuVsPi", "Identified muons;n#sigma^{#mu}_{TPC} (arb. units);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaMuVsPi", "Identified muons;n#sigma^{#mu}_{TOF} (arb. units);n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaMuVsKa", "Identified muons;n#sigma^{#mu}_{TPC} (arb. units);n#sigma^{#it{K}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaMuVsKa", "Identified muons;n#sigma^{#mu}_{TOF} (arb. units);n#sigma^{#it{K}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaMuVsPr", "Identified muons;n#sigma^{#mu}_{TPC} (arb. units);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaMuVsPr", "Identified muons;n#sigma^{#mu}_{TOF} (arb. units);n#sigma^{p}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsZ", "Identified pions;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsP", "Identified pions;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsPt", "Identified pions;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsEta", "Identified pions;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsPhi", "Identified pions;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Pion/hTOFsignalVsP", "Identified pions;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaVsP", "Identified pions;Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaVsP", "Identified pions;Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaPiVsEl", "Identified pions;n#sigma^{#pi}_{TPC} (arb. units);n#sigma^{#it{e}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaPiVsEl", "Identified pions;n#sigma^{#pi}_{TOF} (arb. units);n#sigma^{#it{e}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaPiVsMu", "Identified pions;n#sigma^{#pi}_{TPC} (arb. units);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaPiVsMu", "Identified pions;n#sigma^{#pi}_{TOF} (arb. units);n#sigma^{#mu}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaPiVsKa", "Identified pions;n#sigma^{#pi}_{TPC} (arb. units);n#sigma^{#it{K}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaPiVsKa", "Identified pions;n#sigma^{#pi}_{TOF} (arb. units);n#sigma^{#it{K}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaPiVsPr", "Identified pions;n#sigma^{#pi}_{TPC} (arb. units);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaPiVsPr", "Identified pions;n#sigma^{#pi}_{TOF} (arb. units);n#sigma^{p}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsZ", "Identified NOT electron/Muon/Pion;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisZvtx, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsP", "Identified NOT electron/Muon/Pion;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsPt", "Identified NOT electron/Muon/Pion;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsEta", "Identified NOT electron/Muon/Pion;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisEta, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsPhi", "Identified NOT electron/Muon/Pion;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisTPCdEdx}); - histos.add("Tracks/GoodTrack/PID/Others/hTOFsignalVsP", "Identified NOT electron/Muon/Pion;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); + histos.add("Tracks/raw/PID/hTPCsignalVsZ", "All tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/hTPCsignalVsP", "All tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/hTPCsignalVsPt", "All tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/hTPCsignalVsEta", "All tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/hTPCsignalVsPhi", "All tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/hTOFsignalVsP", "All tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("Tracks/raw/PID/hTPCnSigmaElVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/raw/PID/hTPCnSigmaMuVsP", ";Track #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/raw/PID/hTPCnSigmaPiVsP", ";Track #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/raw/PID/hTPCnSigmaKaVsP", ";Track #it{p} (GeV/c);n#sigma^{K}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/raw/PID/hTPCnSigmaPrVsP", ";Track #it{p} (GeV/c);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsZ", "Positively charged tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsP", "Positively charged tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsPt", "Positively charged tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsEta", "Positively charged tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/PosCharge/hTPCsignalVsPhi", "Positively charged tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/PosCharge/hTOFsignalVsP", "Positively charged tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsZ", "Negatively charged tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsP", "Negatively charged tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsPt", "Negatively charged tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsEta", "Negatively charged tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/NegCharge/hTPCsignalVsPhi", "Negatively charged tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/raw/PID/NegCharge/hTOFsignalVsP", "Negatively charged tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("Tracks/GoodTrack/PID/hTPCsignalVsZ", "All good tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/hTPCsignalVsP", "All good tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/hTPCsignalVsPt", "All good tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/hTPCsignalVsEta", "All good tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/hTPCsignalVsPhi", "All good tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/hTPCnSigmaElVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/hTPCnSigmaMuVsP", ";Track #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/hTPCnSigmaPiVsP", ";Track #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/hTPCnSigmaKaVsP", ";Track #it{p} (GeV/c);n#sigma^{K}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/hTPCnSigmaPrVsP", ";Track #it{p} (GeV/c);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/hTOFsignalVsP", "All good tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsZ", "Positively charged good tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsP", "Positively charged good tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsPt", "Positively charged good tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsEta", "Positively charged good tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/PosCharge/hTPCsignalVsPhi", "Positively charged good tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/PosCharge/hTOFsignalVsP", "Positively charged good tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsZ", "Negatively charged good tracks;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsP", "Negatively charged good tracks;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsPt", "Negatively charged good tracks;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsEta", "Negatively charged good tracks;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/NegCharge/hTPCsignalVsPhi", "Negatively charged good tracks;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/NegCharge/hTOFsignalVsP", "Negatively charged good tracks;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsZ", "Identified electrons;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsP", "Identified electrons;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsPt", "Identified electrons;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsEta", "Identified electrons;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCsignalVsPhi", "Identified electrons;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Electron/hTOFsignalVsP", "Identified electrons;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaVsP", "Identified electrons;Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaVsP", "Identified electrons;Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaElVsMu", "Identified electrons;n#sigma^{#it{e}}_{TPC} (arb. units);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaElVsMu", "Identified electrons;n#sigma^{#it{e}}_{TOF} (arb. units);n#sigma^{#mu}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaElVsPi", "Identified electrons;n#sigma^{#it{e}}_{TPC} (arb. units);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaElVsPi", "Identified electrons;n#sigma^{#it{e}}_{TOF} (arb. units);n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaElVsKa", "Identified electrons;n#sigma^{#it{e}}_{TPC} (arb. units);n#sigma^{#it{K}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaElVsKa", "Identified electrons;n#sigma^{#it{e}}_{TOF} (arb. units);n#sigma^{#it{K}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Electron/hTPCnSigmaElVsPr", "Identified electrons;n#sigma^{#it{e}}_{TPC} (arb. units);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Electron/hTOFnSigmaElVsPr", "Identified electrons;n#sigma^{#it{e}}_{TOF} (arb. units);n#sigma^{p}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsZ", "Identified muons;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsP", "Identified muons;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsPt", "Identified muons;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsEta", "Identified muons;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCsignalVsPhi", "Identified muons;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Muon/hTOFsignalVsP", "Identified muons;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaVsP", "Identified muons;Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaVsP", "Identified muons;Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaMuVsEl", "Identified muons;n#sigma^{#mu}_{TPC} (arb. units);n#sigma^{#it{e}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaMuVsEl", "Identified muons;n#sigma^{#mu}_{TOF} (arb. units);n#sigma^{#it{e}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaMuVsPi", "Identified muons;n#sigma^{#mu}_{TPC} (arb. units);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaMuVsPi", "Identified muons;n#sigma^{#mu}_{TOF} (arb. units);n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaMuVsKa", "Identified muons;n#sigma^{#mu}_{TPC} (arb. units);n#sigma^{#it{K}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaMuVsKa", "Identified muons;n#sigma^{#mu}_{TOF} (arb. units);n#sigma^{#it{K}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTPCnSigmaMuVsPr", "Identified muons;n#sigma^{#mu}_{TPC} (arb. units);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Muon/hTOFnSigmaMuVsPr", "Identified muons;n#sigma^{#mu}_{TOF} (arb. units);n#sigma^{p}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsZ", "Identified pions;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsP", "Identified pions;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsPt", "Identified pions;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsEta", "Identified pions;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCsignalVsPhi", "Identified pions;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Pion/hTOFsignalVsP", "Identified pions;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaVsP", "Identified pions;Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaVsP", "Identified pions;Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaPiVsEl", "Identified pions;n#sigma^{#pi}_{TPC} (arb. units);n#sigma^{#it{e}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaPiVsEl", "Identified pions;n#sigma^{#pi}_{TOF} (arb. units);n#sigma^{#it{e}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaPiVsMu", "Identified pions;n#sigma^{#pi}_{TPC} (arb. units);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaPiVsMu", "Identified pions;n#sigma^{#pi}_{TOF} (arb. units);n#sigma^{#mu}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaPiVsKa", "Identified pions;n#sigma^{#pi}_{TPC} (arb. units);n#sigma^{#it{K}}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaPiVsKa", "Identified pions;n#sigma^{#pi}_{TOF} (arb. units);n#sigma^{#it{K}}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTPCnSigmaPiVsPr", "Identified pions;n#sigma^{#pi}_{TPC} (arb. units);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Pion/hTOFnSigmaPiVsPr", "Identified pions;n#sigma^{#pi}_{TOF} (arb. units);n#sigma^{p}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsZ", "Identified NOT electron/Muon/Pion;Track z-vertex (cm);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisZvtx, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsP", "Identified NOT electron/Muon/Pion;Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsPt", "Identified NOT electron/Muon/Pion;Track #it{p_{#rm T}} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsEta", "Identified NOT electron/Muon/Pion;Track #eta (-);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisEta, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Others/hTPCsignalVsPhi", "Identified NOT electron/Muon/Pion;Track #phi (rad);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisTPCdEdx}); + histos.add("Tracks/GoodTrack/PID/Others/hTOFsignalVsP", "Identified NOT electron/Muon/Pion;Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); } if (doTwoTracks) { - histos.add("EventTwoTracks/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/hInvariantMassWideNoMothers", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/hInvariantMassWideAllPionMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/hInvariantMassWideAllPionMassPtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/hInvariantMassWideAllPionMassTOF", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisAcoplanarity}); - histos.add("EventTwoTracks/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventTwoTracks/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/hDaughtersPvsITSclusterSize", ";Average ITS cluster size;Daughter #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisAvgITSclsSizes, confAxis.axisMomSigned}); - histos.add("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos", ";Average ITS cluster size x cos(#lambda);Daughter #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisAvgITSclsSizes, confAxis.axisMomSigned}); - histos.add("EventTwoTracks/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/PID/hTOFsignalVsP", ";Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/PID/hTPCnSigmaElVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/PID/hTPCnSigmaMuVsP", ";Track #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/PID/hTPCnSigmaPiVsP", ";Track #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/PID/hTPCnSigmaKaVsP", ";Track #it{p} (GeV/c);n#sigma^{K}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/PID/hTPCnSigmaPrVsP", ";Track #it{p} (GeV/c);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/PID/NoPID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaElVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaMuVsP", ";Track #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaPiVsP", ";Track #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaKaVsP", ";Track #it{p} (GeV/c);n#sigma^{K}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaPrVsP", ";Track #it{p} (GeV/c);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - - histos.add("EventTwoTracks/TwoElectrons/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/TwoElectrons/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/TwoElectrons/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/TwoElectrons/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisAcoplanarity}); - histos.add("EventTwoTracks/TwoElectrons/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/TwoElectrons/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/TwoElectrons/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/TwoElectrons/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/TwoElectrons/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/TwoElectrons/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventTwoTracks/TwoElectrons/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/TwoElectrons/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/TwoElectrons/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/TwoElectrons/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/TwoElectrons/hDaughtersPtvsModPhi", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoElectrons/hDaughtersPtvsModPhiTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoElectrons/hDaughtersPtvsModPhiPtCut", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoElectrons/hDaughtersPtvsModPhiPtCutTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoElectrons/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingP", ";Leading #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingPwide", ";Leading #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingPt", ";Leading #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingPhi", ";Leading #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingRapidity", ";Leading #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingPvsOtherP", ";Leading #it{p} (GeV/c); Other #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingPwideVsOtherPwide", ";Leading #it{p} (GeV/c); Other #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingPtVsOtherPt", ";Leading #it{p_{T}} (GeV/c); Other #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingPhiVsOtherPhi", ";Leading #phi (rad); Other #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/TwoElectrons/hLeadingRapVsOtherRap", ";Leading #it{y} (-); Other #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTPCsignalVsLP", ";Leading #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTPCsignalVsOP", ";Other #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTOFsignalVsP", ";Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTOFsignalVsLP", ";Leading #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTOFsignalVsOP", ";Other #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTPCnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTPCnSigmaVsLP", ";Leading #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTPCnSigmaVsOP", ";Other #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTOFnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTOFnSigmaVsLP", ";Leading #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/TwoElectrons/PID/hTOFnSigmaVsOP", ";Other #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - - histos.add("EventTwoTracks/TwoMuons/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/TwoMuons/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/TwoMuons/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/TwoMuons/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisAcoplanarity}); - histos.add("EventTwoTracks/TwoMuons/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/TwoMuons/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/TwoMuons/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/TwoMuons/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/TwoMuons/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/TwoMuons/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventTwoTracks/TwoMuons/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/TwoMuons/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/TwoMuons/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/TwoMuons/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/TwoMuons/hDaughtersPtvsModPhi", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoMuons/hDaughtersPtvsModPhiTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoMuons/hDaughtersPtvsModPhiPtCut", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoMuons/hDaughtersPtvsModPhiPtCutTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoMuons/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/TwoMuons/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - - histos.add("EventTwoTracks/TwoPions/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/TwoPions/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/TwoPions/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/TwoPions/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisAcoplanarity}); - histos.add("EventTwoTracks/TwoPions/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/TwoPions/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/TwoPions/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/TwoPions/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/TwoPions/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/TwoPions/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/TwoPions/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/TwoPions/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/TwoPions/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/TwoPions/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventTwoTracks/TwoPions/hDaughtersPtvsModPhi", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoPions/hDaughtersPtvsModPhiTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoPions/hDaughtersPtvsModPhiPtCut", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoPions/hDaughtersPtvsModPhiPtCutTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisModPhi}); - histos.add("EventTwoTracks/TwoPions/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/TwoPions/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - - histos.add("EventTwoTracks/ElectronMuon/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/ElectronMuon/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/ElectronMuon/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisAcoplanarity}); - histos.add("EventTwoTracks/ElectronMuon/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronMuon/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronMuon/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronMuon/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronMuon/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/ElectronMuon/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronMuon/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronMuon/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronMuon/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronMuon/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronMuon/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/ElectronMuon/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - - histos.add("EventTwoTracks/ElectronPion/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/ElectronPion/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/ElectronPion/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisAcoplanarity}); - histos.add("EventTwoTracks/ElectronPion/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronPion/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronPion/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronPion/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronPion/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/ElectronPion/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronPion/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronPion/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronPion/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronPion/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronPion/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/ElectronPion/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - - histos.add("EventTwoTracks/MuonPion/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/MuonPion/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/MuonPion/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/MuonPion/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisAcoplanarity}); - histos.add("EventTwoTracks/MuonPion/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/MuonPion/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/MuonPion/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/MuonPion/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/MuonPion/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/MuonPion/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventTwoTracks/MuonPion/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/MuonPion/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/MuonPion/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/MuonPion/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/MuonPion/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/MuonPion/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); + histos.add("EventTwoTracks/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideNoMothers", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideAllPionMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideAllPionMassPtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/hInvariantMassWideAllPionMassTOF", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisAcoplanarity}); + histos.add("EventTwoTracks/hCollinearity", ";#DeltaR (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisCollinearity}); + histos.add("EventTwoTracks/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/hDaughtersEnergyFractions", ";E_{daughter 1} / E_{tot} (-);E_{daughter 1} / E_{tot} (-)", HistType::kTH2D, {confAxis.zzAxisFraction, confAxis.zzAxisFraction}); + histos.add("EventTwoTracks/hDaughtersPvsITSclusterSize", ";Average ITS cluster size;Daughter #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisAvgITSclsSizes, confAxis.zzAxisMomSigned}); + histos.add("EventTwoTracks/hDaughtersPvsITSclusterSizeXcos", ";Average ITS cluster size x cos(#lambda);Daughter #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisAvgITSclsSizes, confAxis.zzAxisMomSigned}); + histos.add("EventTwoTracks/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/PID/hTOFsignalVsP", ";Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/PID/hTPCnSigmaElVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/PID/hTPCnSigmaMuVsP", ";Track #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/PID/hTPCnSigmaPiVsP", ";Track #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/PID/hTPCnSigmaKaVsP", ";Track #it{p} (GeV/c);n#sigma^{K}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/PID/hTPCnSigmaPrVsP", ";Track #it{p} (GeV/c);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/PID/NoPID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaElVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaMuVsP", ";Track #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaPiVsP", ";Track #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaKaVsP", ";Track #it{p} (GeV/c);n#sigma^{K}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/PID/NoPID/hTPCnSigmaPrVsP", ";Track #it{p} (GeV/c);n#sigma^{p}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + + histos.add("EventTwoTracks/TwoElectrons/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/TwoElectrons/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/TwoElectrons/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/TwoElectrons/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisAcoplanarity}); + histos.add("EventTwoTracks/TwoElectrons/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/TwoElectrons/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/TwoElectrons/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoElectrons/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/TwoElectrons/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/TwoElectrons/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoElectrons/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/TwoElectrons/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/TwoElectrons/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoElectrons/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/TwoElectrons/hDaughtersPtvsModPhi", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoElectrons/hDaughtersPtvsModPhiTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoElectrons/hDaughtersPtvsModPhiPtCut", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoElectrons/hDaughtersPtvsModPhiPtCutTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoElectrons/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingP", ";Leading #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingPwide", ";Leading #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingPt", ";Leading #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingPhi", ";Leading #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingRapidity", ";Leading #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingPvsOtherP", ";Leading #it{p} (GeV/c); Other #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingPwideVsOtherPwide", ";Leading #it{p} (GeV/c); Other #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingPtVsOtherPt", ";Leading #it{p_{T}} (GeV/c); Other #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingPhiVsOtherPhi", ";Leading #phi (rad); Other #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/TwoElectrons/hLeadingRapVsOtherRap", ";Leading #it{y} (-); Other #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTPCsignalVsLP", ";Leading #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTPCsignalVsOP", ";Other #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTOFsignalVsP", ";Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTOFsignalVsLP", ";Leading #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTOFsignalVsOP", ";Other #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTPCnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTPCnSigmaVsLP", ";Leading #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTPCnSigmaVsOP", ";Other #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTOFnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTOFnSigmaVsLP", ";Leading #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/TwoElectrons/PID/hTOFnSigmaVsOP", ";Other #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + + histos.add("EventTwoTracks/TwoMuons/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/TwoMuons/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/TwoMuons/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/TwoMuons/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisAcoplanarity}); + histos.add("EventTwoTracks/TwoMuons/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/TwoMuons/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/TwoMuons/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoMuons/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/TwoMuons/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/TwoMuons/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoMuons/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/TwoMuons/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/TwoMuons/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoMuons/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/TwoMuons/hDaughtersPtvsModPhi", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoMuons/hDaughtersPtvsModPhiTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoMuons/hDaughtersPtvsModPhiPtCut", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoMuons/hDaughtersPtvsModPhiPtCutTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoMuons/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/TwoMuons/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + + histos.add("EventTwoTracks/TwoPions/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/TwoPions/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/TwoPions/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/TwoPions/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisAcoplanarity}); + histos.add("EventTwoTracks/TwoPions/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/TwoPions/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/TwoPions/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoPions/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/TwoPions/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/TwoPions/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/TwoPions/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/TwoPions/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoPions/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/TwoPions/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/TwoPions/hDaughtersPtvsModPhi", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoPions/hDaughtersPtvsModPhiTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoPions/hDaughtersPtvsModPhiPtCut", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoPions/hDaughtersPtvsModPhiPtCutTOF", ";Daughter #it{p_{T}} (GeV/c);Daughter fmod(#phi,#pi/9)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisModPhi}); + histos.add("EventTwoTracks/TwoPions/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/TwoPions/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + + histos.add("EventTwoTracks/ElectronMuon/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/ElectronMuon/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/ElectronMuon/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisAcoplanarity}); + histos.add("EventTwoTracks/ElectronMuon/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronMuon/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronMuon/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronMuon/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronMuon/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/ElectronMuon/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronMuon/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronMuon/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronMuon/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronMuon/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronMuon/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/ElectronMuon/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + + histos.add("EventTwoTracks/ElectronPion/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/ElectronPion/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/ElectronPion/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisAcoplanarity}); + histos.add("EventTwoTracks/ElectronPion/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronPion/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronPion/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronPion/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronPion/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/ElectronPion/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronPion/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronPion/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronPion/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronPion/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronPion/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/ElectronPion/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + + histos.add("EventTwoTracks/MuonPion/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/MuonPion/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/MuonPion/hInvariantMassWidePtCut", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/MuonPion/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisAcoplanarity}); + histos.add("EventTwoTracks/MuonPion/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/MuonPion/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/MuonPion/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/MuonPion/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/MuonPion/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/MuonPion/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/MuonPion/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/MuonPion/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/MuonPion/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/MuonPion/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/MuonPion/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/MuonPion/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); histos.add("EventTwoTracks/ElectronMuPi/hNeventsPtCuts", ";Selection (-);Number of events (-)", HistType::kTH1D, {{20, -0.5, 19.5}}); - histos.add("EventTwoTracks/ElectronMuPi/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/ElectronMuPi/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/ElectronMuPi/PionsSelection/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/ElectronMuPi/PionsSelection/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/ElectronMuPi/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisAcoplanarity}); - histos.add("EventTwoTracks/ElectronMuPi/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronMuPi/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronMuPi/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronMuPi/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronMuPi/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/ElectronMuPi/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronMuPi/hElectronPt", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronMuPi/hElectronPtWide", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronMuPi/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronMuPi/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronMuPi/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronMuPi/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronMuPi/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/ElectronMuPi/hElectronPvsOtherP", ";Electron #it{p} (GeV/c); #mu/#pi #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronMuPi/hElectronPwideVsOtherPwide", ";Electron #it{p} (GeV/c); #mu/#pi #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronMuPi/hElectronPtVsOtherPt", ";Electron #it{p_{T}} (GeV/c); #mu/#pi #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronMuPi/hElectronPhiVsOtherPhi", ";Electron #phi (rad); #mu/#pi #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronMuPi/hElectronRapVsOtherRap", ";Electron #it{y} (-); #mu/#pi #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - - histos.add("EventTwoTracks/ElectronMuPi/PID/mcTruth/nSigmaTPC1", "Paul's way;True electron #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/mcTruth/nSigmaTPC2", "Paul's way;True not-electron #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsEPofE", ";Electron #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsOPofO", ";#mu/#pi #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsEPofE", ";Electron #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsPPofE", ";Electron #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaEvsnSigmaPofE", ";Electron n#sigma^{e}_{TPC} (arb. units);Electron n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsEPofO", ";Non-electron #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsMPofO", ";Non-electron #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsPPofO", ";Non-electron #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaEvsnSigmaPofO", ";Non-electron n#sigma^{e}_{TPC} (arb. units);Non-electron n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFsignalVsP", ";Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFsignalVsEPofE", ";Electron #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsEPofE", ";Electron #it{p} (GeV/c);n#sigma^{e}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsPPofE", ";Electron #it{p} (GeV/c);n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaEvsnSigmaPofE", ";Electron n#sigma^{e}_{TOF} (arb. units);Electron n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFsignalVsOPofO", ";Not-electron #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsEPofO", ";Not-electron #it{p} (GeV/c);n#sigma^{e}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsMPofO", ";Not-electron #it{p} (GeV/c);n#sigma^{#mu}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsPPofO", ";Not-electron #it{p} (GeV/c);n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaEvsnSigmaPofO", ";Not-electron n#sigma^{e}_{TOF} (arb. units);Not-electron n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisNsigma, confAxis.axisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/ElectronMuPi/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/ElectronMuPi/PionsSelection/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/ElectronMuPi/PionsSelection/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/ElectronMuPi/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisAcoplanarity}); + histos.add("EventTwoTracks/ElectronMuPi/hCollinearity", ";#DeltaR (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisCollinearity}); + histos.add("EventTwoTracks/ElectronMuPi/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronMuPi/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronMuPi/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronMuPi/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronMuPi/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/ElectronMuPi/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronMuPi/hElectronPt", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronMuPi/hElectronPtWide", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronMuPi/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronMuPi/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronMuPi/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronMuPi/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronMuPi/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/ElectronMuPi/hDaughtersEnergyFractions", ";E_{electron} / E_{tot} (-);E_{#mu/#pi} / E_{tot} (-)", HistType::kTH2D, {confAxis.zzAxisFraction, confAxis.zzAxisFraction}); + histos.add("EventTwoTracks/ElectronMuPi/hElectronPvsOtherP", ";Electron #it{p} (GeV/c); #mu/#pi #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronMuPi/hElectronPwideVsOtherPwide", ";Electron #it{p} (GeV/c); #mu/#pi #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronMuPi/hElectronPtVsOtherPt", ";Electron #it{p_{T}} (GeV/c); #mu/#pi #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronMuPi/hElectronPhiVsOtherPhi", ";Electron #phi (rad); #mu/#pi #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronMuPi/hElectronRapVsOtherRap", ";Electron #it{y} (-); #mu/#pi #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + + histos.add("EventTwoTracks/ElectronMuPi/PID/mcTruth/nSigmaTPC1", "Paul's way;True electron #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/mcTruth/nSigmaTPC2", "Paul's way;True not-electron #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsEPofE", ";Electron #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsOPofO", ";#mu/#pi #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsEPofE", ";Electron #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsPPofE", ";Electron #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaEvsnSigmaPofE", ";Electron n#sigma^{e}_{TPC} (arb. units);Electron n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsEPofO", ";Non-electron #it{p} (GeV/c);n#sigma^{e}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsMPofO", ";Non-electron #it{p} (GeV/c);n#sigma^{#mu}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsPPofO", ";Non-electron #it{p} (GeV/c);n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaEvsnSigmaPofO", ";Non-electron n#sigma^{e}_{TPC} (arb. units);Non-electron n#sigma^{#pi}_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFsignalVsP", ";Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma^{e}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFsignalVsEPofE", ";Electron #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsEPofE", ";Electron #it{p} (GeV/c);n#sigma^{e}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsPPofE", ";Electron #it{p} (GeV/c);n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaEvsnSigmaPofE", ";Electron n#sigma^{e}_{TOF} (arb. units);Electron n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFsignalVsOPofO", ";Not-electron #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsEPofO", ";Not-electron #it{p} (GeV/c);n#sigma^{e}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsMPofO", ";Not-electron #it{p} (GeV/c);n#sigma^{#mu}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaVsPPofO", ";Not-electron #it{p} (GeV/c);n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronMuPi/PID/hTOFnSigmaEvsnSigmaPofO", ";Not-electron n#sigma^{e}_{TOF} (arb. units);Not-electron n#sigma^{#pi}_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisNsigma, confAxis.zzAxisNsigma}); histos.add("EventTwoTracks/ElectronOther/hNeventsPtCuts", ";Selection (-);Number of events (-)", HistType::kTH1D, {{20, -0.5, 19.5}}); - histos.add("EventTwoTracks/ElectronOther/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventTwoTracks/ElectronOther/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventTwoTracks/ElectronOther/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisAcoplanarity}); - histos.add("EventTwoTracks/ElectronOther/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronOther/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronOther/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronOther/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronOther/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventTwoTracks/ElectronOther/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronOther/hElectronPt", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronOther/hElectronPtWide", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronOther/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronOther/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronOther/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronOther/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronOther/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/ElectronOther/hElectronPvsOtherP", ";Electron #it{p} (GeV/c); Other #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisMom}); - histos.add("EventTwoTracks/ElectronOther/hElectronPwideVsOtherPwide", ";Electron #it{p} (GeV/c); Other #it{p} (GeV/c)", HistType::kTH2D, {confAxis.axisMomWide, confAxis.axisMomWide}); - histos.add("EventTwoTracks/ElectronOther/hElectronPtVsOtherPt", ";Electron #it{p_{T}} (GeV/c); Other #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisPt, confAxis.axisPt}); - histos.add("EventTwoTracks/ElectronOther/hElectronPhiVsOtherPhi", ";Electron #phi (rad); Other #phi (rad)", HistType::kTH2D, {confAxis.axisPhi, confAxis.axisPhi}); - histos.add("EventTwoTracks/ElectronOther/hElectronRapVsOtherRap", ";Electron #it{y} (-); Other #it{y} (-)", HistType::kTH2D, {confAxis.axisRap, confAxis.axisRap}); - histos.add("EventTwoTracks/ElectronOther/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/ElectronOther/PID/hTPCsignalVsEP", ";Electron #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/ElectronOther/PID/hTPCsignalVsOP", ";#it{e}/#mu/#pi #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - histos.add("EventTwoTracks/ElectronOther/PID/hTOFsignalVsP", ";Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/ElectronOther/PID/hTOFsignalVsEP", ";Electron #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/ElectronOther/PID/hTOFsignalVsOP", ";Other #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTOFsignal}); - histos.add("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsEP", ";Electron #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsMP", ";Muon #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsPP", ";Pion #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronOther/PID/hTOFnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronOther/PID/hTOFnSigmaVsEP", ";Electron #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronOther/PID/hTOFnSigmaVsMP", ";Muon #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); - histos.add("EventTwoTracks/ElectronOther/PID/hTOFnSigmaVsPP", ";Pion #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisNsigma}); + histos.add("EventTwoTracks/ElectronOther/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventTwoTracks/ElectronOther/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventTwoTracks/ElectronOther/hAcoplanarity", ";#Delta#phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisAcoplanarity}); + histos.add("EventTwoTracks/ElectronOther/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronOther/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronOther/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronOther/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronOther/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventTwoTracks/ElectronOther/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronOther/hElectronPt", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronOther/hElectronPtWide", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronOther/hDaughtersP", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronOther/hDaughtersPwide", ";Daughter 1 #it{p} (GeV/c);Daughter 2 #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronOther/hDaughtersPt", ";Daughter 1 #it{p_{T}} (GeV/c);Daughter 2 #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronOther/hDaughtersPhi", ";Daughter 1 #phi (rad);Daughter 2 #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronOther/hDaughtersRapidity", ";Daughter 1 #it{y} (-);Daughter 2 #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/ElectronOther/hElectronPvsOtherP", ";Electron #it{p} (GeV/c); Other #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisMom}); + histos.add("EventTwoTracks/ElectronOther/hElectronPwideVsOtherPwide", ";Electron #it{p} (GeV/c); Other #it{p} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisMomWide, confAxis.zzAxisMomWide}); + histos.add("EventTwoTracks/ElectronOther/hElectronPtVsOtherPt", ";Electron #it{p_{T}} (GeV/c); Other #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisPt, confAxis.zzAxisPt}); + histos.add("EventTwoTracks/ElectronOther/hElectronPhiVsOtherPhi", ";Electron #phi (rad); Other #phi (rad)", HistType::kTH2D, {confAxis.zzAxisPhi, confAxis.zzAxisPhi}); + histos.add("EventTwoTracks/ElectronOther/hElectronRapVsOtherRap", ";Electron #it{y} (-); Other #it{y} (-)", HistType::kTH2D, {confAxis.zzAxisRap, confAxis.zzAxisRap}); + histos.add("EventTwoTracks/ElectronOther/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/ElectronOther/PID/hTPCsignalVsEP", ";Electron #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/ElectronOther/PID/hTPCsignalVsOP", ";#it{e}/#mu/#pi #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + histos.add("EventTwoTracks/ElectronOther/PID/hTOFsignalVsP", ";Track #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/ElectronOther/PID/hTOFsignalVsEP", ";Electron #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/ElectronOther/PID/hTOFsignalVsOP", ";Other #it{p} (GeV/c);TOF signal (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTOFsignal}); + histos.add("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsEP", ";Electron #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsMP", ";Muon #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsPP", ";Pion #it{p} (GeV/c);n#sigma_{TPC} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronOther/PID/hTOFnSigmaVsP", ";Track #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronOther/PID/hTOFnSigmaVsEP", ";Electron #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronOther/PID/hTOFnSigmaVsMP", ";Muon #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); + histos.add("EventTwoTracks/ElectronOther/PID/hTOFnSigmaVsPP", ";Pion #it{p} (GeV/c);n#sigma_{TOF} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisNsigma}); } if (doFourTracks) { - histos.add("EventFourTracks/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventFourTracks/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventFourTracks/hInvariantMassWideNoMothers", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventFourTracks/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventFourTracks/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventFourTracks/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventFourTracks/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventFourTracks/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventFourTracks/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventFourTracks/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - - histos.add("EventFourTracks/WithElectron/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventFourTracks/WithElectron/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventFourTracks/WithElectron/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventFourTracks/WithElectron/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventFourTracks/WithElectron/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventFourTracks/WithElectron/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventFourTracks/WithElectron/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventFourTracks/WithElectron/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventFourTracks/WithElectron/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - - histos.add("EventFourTracks/WithMuon/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventFourTracks/WithMuon/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventFourTracks/WithMuon/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventFourTracks/WithMuon/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventFourTracks/WithMuon/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventFourTracks/WithMuon/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventFourTracks/WithMuon/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventFourTracks/WithMuon/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventFourTracks/WithMuon/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - - histos.add("EventFourTracks/WithPion/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventFourTracks/WithPion/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventFourTracks/WithPion/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventFourTracks/WithPion/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventFourTracks/WithPion/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventFourTracks/WithPion/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventFourTracks/WithPion/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventFourTracks/WithPion/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventFourTracks/WithPion/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); + histos.add("EventFourTracks/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventFourTracks/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventFourTracks/hInvariantMassWideNoMothers", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventFourTracks/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventFourTracks/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventFourTracks/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventFourTracks/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventFourTracks/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventFourTracks/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventFourTracks/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + + histos.add("EventFourTracks/WithElectron/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventFourTracks/WithElectron/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventFourTracks/WithElectron/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventFourTracks/WithElectron/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventFourTracks/WithElectron/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventFourTracks/WithElectron/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventFourTracks/WithElectron/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventFourTracks/WithElectron/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventFourTracks/WithElectron/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + + histos.add("EventFourTracks/WithMuon/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventFourTracks/WithMuon/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventFourTracks/WithMuon/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventFourTracks/WithMuon/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventFourTracks/WithMuon/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventFourTracks/WithMuon/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventFourTracks/WithMuon/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventFourTracks/WithMuon/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventFourTracks/WithMuon/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + + histos.add("EventFourTracks/WithPion/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventFourTracks/WithPion/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventFourTracks/WithPion/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventFourTracks/WithPion/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventFourTracks/WithPion/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventFourTracks/WithPion/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventFourTracks/WithPion/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventFourTracks/WithPion/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventFourTracks/WithPion/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); } if (doSixTracks) { - histos.add("EventSixTracks/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventSixTracks/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventSixTracks/hInvariantMassWideNoMothers", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventSixTracks/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventSixTracks/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventSixTracks/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventSixTracks/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventSixTracks/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventSixTracks/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventSixTracks/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); - - histos.add("EventSixTracks/SixPions/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMass}); - histos.add("EventSixTracks/SixPions/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.axisInvMassWide}); - histos.add("EventSixTracks/SixPions/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("EventSixTracks/SixPions/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMomWide}); - histos.add("EventSixTracks/SixPions/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("EventSixTracks/SixPions/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("EventSixTracks/SixPions/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.axisRap}); - histos.add("EventSixTracks/SixPions/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.axisInvMassWide, confAxis.axisPt}); - histos.add("EventSixTracks/SixPions/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.axisMom, confAxis.axisTPCdEdx}); + histos.add("EventSixTracks/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventSixTracks/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventSixTracks/hInvariantMassWideNoMothers", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventSixTracks/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventSixTracks/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventSixTracks/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventSixTracks/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventSixTracks/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventSixTracks/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventSixTracks/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); + + histos.add("EventSixTracks/SixPions/hInvariantMass", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMass}); + histos.add("EventSixTracks/SixPions/hInvariantMassWide", ";Invariant mass (GeV/c^{2});Number of events (-)", HistType::kTH1D, {confAxis.zzAxisInvMassWide}); + histos.add("EventSixTracks/SixPions/hMotherP", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("EventSixTracks/SixPions/hMotherPwide", ";Mother #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMomWide}); + histos.add("EventSixTracks/SixPions/hMotherPt", ";Mother #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("EventSixTracks/SixPions/hMotherPhi", ";Mother #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("EventSixTracks/SixPions/hMotherRapidity", ";Mother #it{y} (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisRap}); + histos.add("EventSixTracks/SixPions/hMotherMassVsPt", ";Invariant mass (GeV/c^{2});Mother #it{p_{T}} (GeV/c)", HistType::kTH2D, {confAxis.zzAxisInvMassWide, confAxis.zzAxisPt}); + histos.add("EventSixTracks/SixPions/PID/hTPCsignalVsP", ";Track #it{p} (GeV/c);TPC d#it{E}/d#it{x} (arb. units)", HistType::kTH2D, {confAxis.zzAxisMom, confAxis.zzAxisTPCdEdx}); } if (doTruthHistos) { histos.add("Events/Truth/hCountCollisions", ";;Number of generated collision (-)", HistType::kTH1D, {{1, 0.5, 1.5}}); - histos.add("Events/Truth/hChannels", ";Channels (-);Number of events (-)", HistType::kTH1D, {{confAxis.axisChannels}}); + histos.add("Events/Truth/hChannels", ";Channels (-);Number of events (-)", HistType::kTH1D, {{confAxis.zzAxisChannels}}); histos.add("Events/Truth/hPDGcodesAll", ";PDG codes of all particles (-);Number of events (-)", HistType::kTH1D, {{2001, -1000, 1000}}); histos.add("Events/Truth/hPDGcodesNoMother", ";PDG codes of particles without mother (-);Number of events (-)", HistType::kTH1D, {{2001, -1000, 1000}}); histos.add("Events/Truth/hPDGcodesTauDaughters", ";PDG codes of daughters of particles without mother (-);Number of events (-)", HistType::kTH1D, {{2001, -1000, 1000}}); - histos.add("Events/Truth/hNparticles", ";Number of particles in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNparticles}); - histos.add("Events/Truth/hNtauDaughters", ";Number of daughters of no-mother particle in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNparticles}); - histos.add("Events/Truth/hNelectrons", ";Number of electrons in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNparticles}); - histos.add("Events/Truth/hNmuons", ";Number of muons in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNparticles}); - histos.add("Events/Truth/hNpions", ";Number of pions in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.axisNparticles}); - histos.add("Events/Truth/hNphysPartVsNwoutMotherParts", ";Number of physical primary particles (-);Number of particles without mother(-)", HistType::kTH2D, {confAxis.axisNparticles, confAxis.axisNparticles}); - histos.add("Tracks/Truth/hTauP", ";Tau #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("Tracks/Truth/hTauPt", ";Tau #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("Tracks/Truth/hTauPhi", ";Tau #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("Tracks/Truth/hTauEta", ";Tau #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.axisEta}); - histos.add("Tracks/Truth/hElectronP", ";Electron #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("Tracks/Truth/hElectronPt", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("Tracks/Truth/hElectronPhi", ";Electron #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("Tracks/Truth/hElectronEta", ";Electron #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.axisEta}); - histos.add("Tracks/Truth/hMuonP", ";Muon #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("Tracks/Truth/hMuonPt", ";Muon #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("Tracks/Truth/hMuonPhi", ";Muon #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("Tracks/Truth/hMuonEta", ";Muon #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.axisEta}); - histos.add("Tracks/Truth/hPionP", ";Pion #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisMom}); - histos.add("Tracks/Truth/hPionPt", ";Pion #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.axisPt}); - histos.add("Tracks/Truth/hPionPhi", ";Pion #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.axisPhi}); - histos.add("Tracks/Truth/hPionEta", ";Pion #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.axisEta}); + histos.add("Events/Truth/hNparticles", ";Number of particles in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNparticles}); + histos.add("Events/Truth/hNtauDaughters", ";Number of daughters of no-mother particle in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNparticles}); + histos.add("Events/Truth/hNelectrons", ";Number of electrons in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNparticles}); + histos.add("Events/Truth/hNmuons", ";Number of muons in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNparticles}); + histos.add("Events/Truth/hNpions", ";Number of pions in a collision (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisNparticles}); + histos.add("Events/Truth/hNphysPartVsNwoutMotherParts", ";Number of physical primary particles (-);Number of particles without mother(-)", HistType::kTH2D, {confAxis.zzAxisNparticles, confAxis.zzAxisNparticles}); + histos.add("Tracks/Truth/hTauP", ";Tau #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("Tracks/Truth/hTauPt", ";Tau #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("Tracks/Truth/hTauPhi", ";Tau #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("Tracks/Truth/hTauEta", ";Tau #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisEta}); + histos.add("Tracks/Truth/hElectronP", ";Electron #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("Tracks/Truth/hElectronPt", ";Electron #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("Tracks/Truth/hElectronPhi", ";Electron #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("Tracks/Truth/hElectronEta", ";Electron #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisEta}); + histos.add("Tracks/Truth/hMuonP", ";Muon #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("Tracks/Truth/hMuonPt", ";Muon #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("Tracks/Truth/hMuonPhi", ";Muon #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("Tracks/Truth/hMuonEta", ";Muon #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisEta}); + histos.add("Tracks/Truth/hPionP", ";Pion #it{p} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisMom}); + histos.add("Tracks/Truth/hPionPt", ";Pion #it{p_{T}} (GeV/c);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPt}); + histos.add("Tracks/Truth/hPionPhi", ";Pion #phi (rad);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisPhi}); + histos.add("Tracks/Truth/hPionEta", ";Pion #eta (-);Number of events (-)", HistType::kTH1D, {confAxis.zzAxisEta}); } } // end init @@ -877,9 +894,25 @@ struct UpcTauCentralBarrelRL { { if (cutTauEvent.cutElectronHasTOF && !electronCandidate.hasTOF()) return false; - if (electronCandidate.tpcNSigmaEl() < cutTauEvent.cutMaxElectronNsigma || electronCandidate.tpcNSigmaEl() > cutTauEvent.cutMinElectronNsigma) + if (electronCandidate.tpcNSigmaEl() < cutTauEvent.cutMaxElectronNsigmaEl || electronCandidate.tpcNSigmaEl() > cutTauEvent.cutMinElectronNsigmaEl) return false; - if (electronCandidate.tpcNSigmaPi() > cutTauEvent.cutMaxElectronPiNsigma && electronCandidate.tpcNSigmaPi() < cutTauEvent.cutMinElectronPiNsigma) + if (electronCandidate.tpcNSigmaPi() > cutTauEvent.cutMinElectronNsigmaPi && electronCandidate.tpcNSigmaPi() < cutTauEvent.cutMaxElectronNsigmaPi) + return false; + if (electronCandidate.tpcNSigmaKa() > cutTauEvent.cutMinElectronNsigmaKa && electronCandidate.tpcNSigmaKa() < cutTauEvent.cutMaxElectronNsigmaKa) + return false; + if (electronCandidate.tpcNSigmaPr() > cutTauEvent.cutMinElectronNsigmaPr && electronCandidate.tpcNSigmaPr() < cutTauEvent.cutMaxElectronNsigmaPr) + return false; + return true; + } + + template + bool selectedGoodPion(T const& pionCandidate) + { + if (cutTauEvent.cutPionHasTOF && !pionCandidate.hasTOF()) + return false; + if (pionCandidate.tpcNSigmaPi() < cutTauEvent.cutMaxPionNsigmaPi || pionCandidate.tpcNSigmaPi() > cutTauEvent.cutMinPionNsigmaPi) + return false; + if (pionCandidate.tpcNSigmaKa() > cutTauEvent.cutMinPionNsigmaKa && pionCandidate.tpcNSigmaKa() < cutTauEvent.cutMaxPionNsigmaKa) return false; return true; } @@ -894,13 +927,19 @@ struct UpcTauCentralBarrelRL { pion[0].SetPxPyPzE(trkDaug1.px(), trkDaug1.py(), trkDaug1.pz(), energy(pdg->Mass(kPiPlus), trkDaug1.px(), trkDaug1.py(), trkDaug1.pz())); pion[1].SetPxPyPzE(trkDaug2.px(), trkDaug2.py(), trkDaug2.pz(), energy(pdg->Mass(kPiMinus), trkDaug2.px(), trkDaug2.py(), trkDaug2.pz())); motherOfPions = pion[0] + pion[1]; + int enumTrk1 = enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)); if (cutTauEvent.cutOppositeCharge && (trkDaug1.sign() * trkDaug2.sign() > 0)) return false; - if (calculateAcoplanarity(daug[0].Phi(), daug[1].Phi()) > cutTauEvent.cutAcoplanarity) + if (calculateAcoplanarity(daug[0].Phi(), daug[1].Phi()) > cutTauEvent.cutMaxAcoplanarity) + return false; + if (calculateAcoplanarity(daug[0].Phi(), daug[1].Phi()) < cutTauEvent.cutMinAcoplanarity) return false; - bool goodElectron = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? selectedGoodElectron(trkDaug1) : selectedGoodElectron(trkDaug2); + bool goodElectron = (enumTrk1 == P_ELECTRON) ? selectedGoodElectron(trkDaug1) : selectedGoodElectron(trkDaug2); if (cutTauEvent.cutGoodElectron && !goodElectron) return false; + bool goodMupion = ((enumTrk1 == P_MUON) || (enumTrk1 == P_PION)) ? selectedGoodPion(trkDaug1) : selectedGoodPion(trkDaug2); + if (cutTauEvent.cutGoodMupion && !goodMupion) + return false; if (cutTauEvent.cutOutRho && (motherOfPions.M() > cutTauEvent.cutMinRhoMass && motherOfPions.M() < cutTauEvent.cutMaxRhoMass)) return false; if (cutTauEvent.cutOnRho && (motherOfPions.M() > cutTauEvent.cutMaxRhoMass || motherOfPions.M() < cutTauEvent.cutMinRhoMass)) @@ -1020,6 +1059,7 @@ struct UpcTauCentralBarrelRL { muon[1].SetPxPyPzE(trkDaug2.px(), trkDaug2.py(), trkDaug2.pz(), energy(pdg->Mass(kMuonMinus), trkDaug2.px(), trkDaug2.py(), trkDaug2.pz())); motherOfMuons = muon[0] + muon[1]; const auto acoplanarity = calculateAcoplanarity(daug[0].Phi(), daug[1].Phi()); + const auto collinearity = calculateCollinearity(daug[0].Eta(), daug[1].Eta(), daug[0].Phi(), daug[1].Phi()); if (cutTauEvent.applyTauEventSelection && !selectedTauEvent(trkDaug1, trkDaug2)) { return; } @@ -1028,6 +1068,7 @@ struct UpcTauCentralBarrelRL { histos.get(HIST("EventTwoTracks/hInvariantMassWide"))->Fill(mother.M()); histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMass"))->Fill(motherOfPions.M()); histos.get(HIST("EventTwoTracks/hAcoplanarity"))->Fill(acoplanarity); + histos.get(HIST("EventTwoTracks/hCollinearity"))->Fill(collinearity); histos.get(HIST("EventTwoTracks/hMotherP"))->Fill(mother.P()); histos.get(HIST("EventTwoTracks/hMotherPwide"))->Fill(mother.P()); histos.get(HIST("EventTwoTracks/hMotherPt"))->Fill(mother.Pt()); @@ -1038,6 +1079,7 @@ struct UpcTauCentralBarrelRL { histos.get(HIST("EventTwoTracks/hDaughtersPt"))->Fill(daug[0].Pt(), daug[1].Pt()); histos.get(HIST("EventTwoTracks/hDaughtersPhi"))->Fill(daug[0].Phi(), daug[1].Phi()); histos.get(HIST("EventTwoTracks/hDaughtersRapidity"))->Fill(daug[0].Rapidity(), daug[1].Rapidity()); + histos.get(HIST("EventTwoTracks/hDaughtersEnergyFractions"))->Fill(daug[0].E() / (daug[0].E() + daug[1].E()), daug[1].E() / (daug[0].E() + daug[1].E())); histos.get(HIST("EventTwoTracks/hMotherMassVsPt"))->Fill(mother.M(), mother.Pt()); if (motherOfPions.Pt() < 0.2) { histos.get(HIST("EventTwoTracks/hInvariantMassWideAllPionMassPtCut"))->Fill(motherOfPions.M()); @@ -1213,12 +1255,15 @@ struct UpcTauCentralBarrelRL { } if ((countPVGTelectrons == 1 && countPVGTmuons == 1) || (countPVGTelectrons == 1 && countPVGTpions == 1)) { double electronPt = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].Pt() : daug[1].Pt(); + double electronE = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].E() : daug[1].E(); + double mupionE = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[1].E() : daug[0].E(); histos.get(HIST("Events/hChannels"))->Fill(CH_EMUPI); histos.get(HIST("EventTwoTracks/ElectronMuPi/hInvariantMass"))->Fill(mother.M()); histos.get(HIST("EventTwoTracks/ElectronMuPi/hInvariantMassWide"))->Fill(mother.M()); histos.get(HIST("EventTwoTracks/ElectronMuPi/PionsSelection/hInvariantMass"))->Fill(motherOfPions.M()); histos.get(HIST("EventTwoTracks/ElectronMuPi/PionsSelection/hInvariantMassWide"))->Fill(motherOfPions.M()); histos.get(HIST("EventTwoTracks/ElectronMuPi/hAcoplanarity"))->Fill(acoplanarity); + histos.get(HIST("EventTwoTracks/ElectronMuPi/hCollinearity"))->Fill(collinearity); histos.get(HIST("EventTwoTracks/ElectronMuPi/hMotherP"))->Fill(mother.P()); histos.get(HIST("EventTwoTracks/ElectronMuPi/hMotherPwide"))->Fill(mother.P()); histos.get(HIST("EventTwoTracks/ElectronMuPi/hMotherPt"))->Fill(mother.Pt()); @@ -1232,6 +1277,7 @@ struct UpcTauCentralBarrelRL { histos.get(HIST("EventTwoTracks/ElectronMuPi/hDaughtersPt"))->Fill(daug[0].Pt(), daug[1].Pt()); histos.get(HIST("EventTwoTracks/ElectronMuPi/hDaughtersPhi"))->Fill(daug[0].Phi(), daug[1].Phi()); histos.get(HIST("EventTwoTracks/ElectronMuPi/hDaughtersRapidity"))->Fill(daug[0].Rapidity(), daug[1].Rapidity()); + histos.get(HIST("EventTwoTracks/ElectronMuPi/hDaughtersEnergyFractions"))->Fill(electronE / (electronE + mupionE), mupionE / (electronE + mupionE)); histos.get(HIST("EventTwoTracks/ElectronMuPi/hElectronPvsOtherP"))->Fill((enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].P() : daug[1].P(), (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[1].P() : daug[0].P()); histos.get(HIST("EventTwoTracks/ElectronMuPi/hElectronPwideVsOtherPwide"))->Fill((enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].P() : daug[1].P(), (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[1].P() : daug[0].P()); histos.get(HIST("EventTwoTracks/ElectronMuPi/hElectronPtVsOtherPt"))->Fill((enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].Pt() : daug[1].Pt(), (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[1].Pt() : daug[0].Pt()); @@ -1760,18 +1806,18 @@ struct UpcTauCentralBarrelRL { if (!isMC && ((countPVGTelectrons == 1 && countPVGTmuons == 1) || (countPVGTelectrons == 1 && countPVGTpions == 1))) { double electronPt = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].Pt() : daug[1].Pt(); double electronPID = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcSignal() : trkDaug2.tpcSignal(); - double electronNsigma = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaEl() : trkDaug2.tpcNSigmaEl(); - double electronPiNsigma = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaPi() : trkDaug2.tpcNSigmaPi(); + double ElectronNsigmaEl = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaEl() : trkDaug2.tpcNSigmaEl(); + double ElectronNsigmaPi = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaPi() : trkDaug2.tpcNSigmaPi(); double otherPt = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].Pt() : daug[1].Pt(); double otherPID = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcSignal() : trkDaug2.tpcSignal(); double otherNsigmaMu = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaMu() : trkDaug2.tpcNSigmaMu(); double otherNsigmaPi = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaPi() : trkDaug2.tpcNSigmaPi(); histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsEPofE"))->Fill(electronPt, electronPID); histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsOPofO"))->Fill(otherPt, otherPID); - histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsEPofE"))->Fill(electronPt, electronNsigma); + histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsEPofE"))->Fill(electronPt, ElectronNsigmaEl); histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsMPofO"))->Fill(otherPt, otherNsigmaMu); histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsPPofO"))->Fill(otherPt, otherNsigmaPi); - histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaEvsnSigmaPofE"))->Fill(electronNsigma, electronPiNsigma); + histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaEvsnSigmaPofE"))->Fill(ElectronNsigmaEl, ElectronNsigmaPi); if (trkDaug1.hasTOF()) { if (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) { histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTOFsignalVsEPofE"))->Fill(electronPt, trkDaug1.tofSignal()); @@ -1798,7 +1844,7 @@ struct UpcTauCentralBarrelRL { if ((countPVGTelectrons == 2) || (countPVGTelectrons == 1 && countPVGTmuons == 1) || (countPVGTelectrons == 1 && countPVGTpions == 1)) { double electronPt = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].Pt() : daug[1].Pt(); double electronPID = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcSignal() : trkDaug2.tpcSignal(); - double electronNsigma = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaEl() : trkDaug2.tpcNSigmaEl(); + double ElectronNsigmaEl = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaEl() : trkDaug2.tpcNSigmaEl(); double otherPt = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].Pt() : daug[1].Pt(); double otherPID = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcSignal() : trkDaug2.tpcSignal(); double otherNsigmaMu = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaMu() : trkDaug2.tpcNSigmaMu(); @@ -1806,7 +1852,7 @@ struct UpcTauCentralBarrelRL { if (countPVGTelectrons == 2) { electronPt = (daug[0].Pt() > daug[1].Pt()) ? daug[0].Pt() : daug[1].Pt(); electronPID = (daug[0].Pt() > daug[1].Pt()) ? trkDaug1.tpcSignal() : trkDaug2.tpcSignal(); - electronNsigma = (daug[0].Pt() > daug[1].Pt()) ? trkDaug1.tpcNSigmaEl() : trkDaug2.tpcNSigmaEl(); + ElectronNsigmaEl = (daug[0].Pt() > daug[1].Pt()) ? trkDaug1.tpcNSigmaEl() : trkDaug2.tpcNSigmaEl(); otherPt = (daug[0].Pt() > daug[1].Pt()) ? daug[1].Pt() : daug[0].Pt(); otherPID = (daug[0].Pt() > daug[1].Pt()) ? trkDaug2.tpcSignal() : trkDaug1.tpcSignal(); otherNsigmaMu = (daug[0].Pt() > daug[1].Pt()) ? trkDaug2.tpcNSigmaMu() : trkDaug1.tpcNSigmaMu(); @@ -1814,7 +1860,7 @@ struct UpcTauCentralBarrelRL { } histos.get(HIST("EventTwoTracks/ElectronOther/PID/hTPCsignalVsEP"))->Fill(electronPt, electronPID); histos.get(HIST("EventTwoTracks/ElectronOther/PID/hTPCsignalVsOP"))->Fill(otherPt, otherPID); - histos.get(HIST("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsEP"))->Fill(electronPt, electronNsigma); + histos.get(HIST("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsEP"))->Fill(electronPt, ElectronNsigmaEl); histos.get(HIST("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsMP"))->Fill(otherPt, otherNsigmaMu); histos.get(HIST("EventTwoTracks/ElectronOther/PID/hTPCnSigmaVsPP"))->Fill(otherPt, otherNsigmaPi); if (trkDaug1.hasTOF()) { @@ -2023,17 +2069,17 @@ struct UpcTauCentralBarrelRL { double electronPt = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].Pt() : daug[1].Pt(); double electronPID = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcSignal() : trkDaug2.tpcSignal(); - double electronNsigma = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaEl() : trkDaug2.tpcNSigmaEl(); - double electronPiNsigma = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaPi() : trkDaug2.tpcNSigmaPi(); + double ElectronNsigmaEl = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaEl() : trkDaug2.tpcNSigmaEl(); + double ElectronNsigmaPi = (enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaPi() : trkDaug2.tpcNSigmaPi(); double otherPt = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[0].Pt() : daug[1].Pt(); double otherPID = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcSignal() : trkDaug2.tpcSignal(); double otherNsigmaEl = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaEl() : trkDaug2.tpcNSigmaEl(); double otherNsigmaMu = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaMu() : trkDaug2.tpcNSigmaMu(); double otherNsigmaPi = (enumMyParticle(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? trkDaug1.tpcNSigmaPi() : trkDaug2.tpcNSigmaPi(); histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsEPofE"))->Fill(electronPt, electronPID); - histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsEPofE"))->Fill(electronPt, electronNsigma); - histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsPPofE"))->Fill(electronPt, electronPiNsigma); - histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaEvsnSigmaPofE"))->Fill(electronNsigma, electronPiNsigma); + histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsEPofE"))->Fill(electronPt, ElectronNsigmaEl); + histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsPPofE"))->Fill(electronPt, ElectronNsigmaPi); + histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaEvsnSigmaPofE"))->Fill(ElectronNsigmaEl, ElectronNsigmaPi); histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCsignalVsOPofO"))->Fill(otherPt, otherPID); histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsEPofO"))->Fill(otherPt, otherNsigmaEl); histos.get(HIST("EventTwoTracks/ElectronMuPi/PID/hTPCnSigmaVsMPofO"))->Fill(otherPt, otherNsigmaMu);