diff --git a/PWGDQ/Core/HistogramsLibrary.cxx b/PWGDQ/Core/HistogramsLibrary.cxx index c15894fbb8b..83a75fde02b 100644 --- a/PWGDQ/Core/HistogramsLibrary.cxx +++ b/PWGDQ/Core/HistogramsLibrary.cxx @@ -1257,15 +1257,25 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h hm->AddHistogram(histClass, "Coschi", "", false, 25, coschiBins.data(), VarManager::kMCCosChi, 0, nullptr, -1, 0, nullptr, -1, "", "", "", -1, VarManager::kMCWeight); } - if (groupStr.CompareTo("polarization-pseudoproper-gen") == 0) { + if (groupStr.CompareTo("polarization-pseudoproper-midy-he-gen") == 0) { std::array varspTHE = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaHE, VarManager::kMCVertexingTauxyProjected}; - std::array varspTCS = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaCS, VarManager::kMCVertexingTauxyProjected}; - std::array varspTRM = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaRM, VarManager::kMCVertexingTauxyProjected}; std::array bins = {50, 20, 20, 1000}; std::array xmin = {2., 0., -1., -0.5}; std::array xmax = {4., 20., 1., 0.5}; hm->AddHistogram(histClass, "Mass_Pt_cosThetaHE_Tauxy", "", 4, varspTHE.data(), bins.data(), xmin.data(), xmax.data(), nullptr, -1, kFALSE); + } + if (groupStr.CompareTo("polarization-pseudoproper-midy-cs-gen") == 0) { + std::array varspTCS = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaCS, VarManager::kMCVertexingTauxyProjected}; + std::array bins = {50, 20, 20, 1000}; + std::array xmin = {2., 0., -1., -0.5}; + std::array xmax = {4., 20., 1., 0.5}; hm->AddHistogram(histClass, "Mass_Pt_cosThetaCS_Tauxy", "", 4, varspTCS.data(), bins.data(), xmin.data(), xmax.data(), nullptr, -1, kFALSE); + } + if (groupStr.CompareTo("polarization-pseudoproper-midy-rand-gen") == 0) { + std::array varspTRM = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaRM, VarManager::kMCVertexingTauxyProjected}; + std::array bins = {50, 20, 20, 1000}; + std::array xmin = {2., 0., -1., -0.5}; + std::array xmax = {4., 20., 1., 0.5}; hm->AddHistogram(histClass, "Mass_Pt_cosThetaRM_Tauxy", "", 4, varspTRM.data(), bins.data(), xmin.data(), xmax.data(), nullptr, -1, kFALSE); } if (groupStr.CompareTo("polarization-dielectron-pbpb-midy-he-gen") == 0) { diff --git a/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx b/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx index a064a274bd3..bd525123f7c 100644 --- a/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx +++ b/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx @@ -331,14 +331,14 @@ struct AnalysisEventSelection { HistogramManager* fHistMan = nullptr; - AnalysisCompositeCut* fEventCut; + AnalysisCompositeCut* fEventCut = nullptr; Service fCCDB; o2::ccdb::CcdbApi fCCDBApi; std::map fSelMap; // key: reduced event global index, value: event selection decision std::map> fBCCollMap; // key: global BC, value: vector of reduced event global indices - int fCurrentRun; + int fCurrentRun = nullptr; void init(o2::framework::InitContext& context) { @@ -595,13 +595,13 @@ struct AnalysisTrackSelection { Service fCCDB; Service fTofResponse; - HistogramManager* fHistMan; + HistogramManager* fHistMan = nullptr; std::vector fTrackCuts; std::vector fMCSignals; // list of signals to be checked std::vector fHistNamesReco; std::vector fHistNamesMCMatched; - int fCurrentRun; // current run (needed to detect run changes for loading CCDB parameters) + int fCurrentRun = nullptr; // current run (needed to detect run changes for loading CCDB parameters) std::map> fNAssocsInBunch; // key: track global index, value: vector of global index for events associated in-bunch (events that have in-bunch pileup or splitting) std::map> fNAssocsOutOfBunch; // key: track global index, value: vector of global index for events associated out-of-bunch (events that have no in-bunch pileup) @@ -938,9 +938,9 @@ struct AnalysisPrefilterSelection { Configurable fPropTrack{"cfgPropTrack", false, "Propagate tracks to associated collision to recalculate DCA and momentum vector"}; std::map fPrefilterMap; - AnalysisCompositeCut* fPairCut; - uint32_t fPrefilterMask; - int fPrefilterCutBit; + AnalysisCompositeCut* fPairCut = nullptr; + uint32_t fPrefilterMask = nullptr; + int fPrefilterCutBit = nullptr; Preslice trackAssocsPerCollision = aod::track_association::collisionId; @@ -1141,7 +1141,9 @@ struct AnalysisSameEventPairing { Configurable pair{"cfgPairCuts", "", "Comma separated list of pair cuts, !!! Use only if you know what you are doing, otherwise leave empty"}; Configurable fConfigQA{"cfgQA", false, "If true, fill QA histograms"}; Configurable fConfigMCtruthQA{"cfgMCtruthQA", false, "If true, fill QA histograms with default"}; - Configurable fConfigPseudoQA{"cfgPseudoQA", false, "If true, fill QA histograms with pseudo-proper decay length analysis with polarization"}; + Configurable fConfigPseudoHEQA{"cfgPseudoHEQA", false, "If true, fill QA histograms with pseudo-proper decay length analysis with polarization HE"}; + Configurable fConfigPseudoCSQA{"cfgPseudoCSQA", false, "If true, fill QA histograms with pseudo-proper decay length analysis with polarization CS"}; + Configurable fConfigPseudoRMQA{"cfgPseudoRMQA", false, "If true, fill QA histograms with pseudo-proper decay length analysis with polarization RM"}; Configurable fConfigTruthPbPbMIDYHE{"cfgTruthPbPbmidyHE", false, "If true, fill QA histograms with dielectron pairs in helicity frame"}; Configurable fConfigTruthPbPbMIDYCS{"cfgTruthPbPbmidyCS", false, "If true, fill QA histograms with dielectron pairs in collion-soper frame"}; Configurable fConfigAddSEPHistogram{"cfgAddSEPHistogram", "", "Comma separated list of histograms"}; @@ -1204,14 +1206,14 @@ struct AnalysisSameEventPairing { std::vector fMCGenAccCuts; bool fUseMCGenAccCut = false; - uint32_t fTrackFilterMask; // mask for the track cuts required in this task to be applied on the barrel cuts produced upstream - uint32_t fMuonFilterMask; // mask for the muon cuts required in this task to be applied on the muon cuts produced upstream - int fNCutsBarrel; - int fNCutsMuon; - int fNPairCuts; + uint32_t fTrackFilterMask = nullptr; // mask for the track cuts required in this task to be applied on the barrel cuts produced upstream + uint32_t fMuonFilterMask = nullptr; // mask for the muon cuts required in this task to be applied on the muon cuts produced upstream + int fNCutsBarrel = nullptr; + int fNCutsMuon = nullptr; + int fNPairCuts = nullptr; bool fHasTwoProngGenMCsignals = false; - bool fEnableBarrelHistos; + bool fEnableBarrelHistos = nullptr; // bool fEnableMuonHistos; Preslice> trackAssocsPerCollision = aod::track_association::collisionId; @@ -1506,14 +1508,20 @@ struct AnalysisSameEventPairing { if (fConfigOptions.fConfigMCtruthQA.value) { histNames += Form("MCTruthGenPairSel_%s;", sig->GetName()); // after event selection } - if (fConfigOptions.fConfigPseudoQA.value) { - histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName()); + if (fConfigOptions.fConfigPseudoHEQA.value) { + histNames += Form("MCTruthGenPseudoPolPairHESel_%s;", sig->GetName()); + } + if (fConfigOptions.fConfigPseudoCSQA.value) { + histNames += Form("MCTruthGenPseudoPolPairCSSel_%s;", sig->GetName()); + } + if (fConfigOptions.fConfigPseudoRMQA.value) { + histNames += Form("MCTruthGenPseudoPolPairRMSel_%s;", sig->GetName()); } if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) { - histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName()); + histNames += Form("MCTruthGenPoldielectronPbPbPairHESel_%s;", sig->GetName()); } if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) { - histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName()); + histNames += Form("MCTruthGenPoldielectronPbPbPairCSSel_%s;", sig->GetName()); } fHasTwoProngGenMCsignals = true; } @@ -1523,14 +1531,20 @@ struct AnalysisSameEventPairing { if (fConfigOptions.fConfigMCtruthQA.value) { histNames += Form("MCTruthGenPairSel_%s_%s;", sig->GetName(), cut->GetName()); // after event selection and MCgenAcc cut } - if (fConfigOptions.fConfigPseudoQA.value) { - histNames += Form("MCTruthGenPseudoPolPairSel_%s_%s;", sig->GetName(), cut->GetName()); + if (fConfigOptions.fConfigPseudoHEQA.value) { + histNames += Form("MCTruthGenPseudoPolPairHESel_%s_%s;", sig->GetName(), cut->GetName()); + } + if (fConfigOptions.fConfigPseudoCSQA.value) { + histNames += Form("MCTruthGenPseudoPolPairCSSel_%s_%s;", sig->GetName(), cut->GetName()); + } + if (fConfigOptions.fConfigPseudoRMQA.value) { + histNames += Form("MCTruthGenPseudoPolPairRMSel_%s_%s;", sig->GetName(), cut->GetName()); } if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) { histNames += Form("MCTruthGenPoldielectronPbPbPairHESel_%s_%s;", sig->GetName(), cut->GetName()); } if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) { - histNames += Form("MCTruthGenPseudoPolPairCSSel_%s_%s;", sig->GetName(), cut->GetName()); + histNames += Form("MCTruthGenPoldielectronPbPbPairCSSel_%s_%s;", sig->GetName(), cut->GetName()); } } } @@ -2189,8 +2203,14 @@ struct AnalysisSameEventPairing { if (fConfigOptions.fConfigMCtruthQA.value) { fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s", sig->GetName()), VarManager::fgValues); } - if (fConfigOptions.fConfigPseudoQA.value) { - fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairSel_%s", sig->GetName()), VarManager::fgValues); + if (fConfigOptions.fConfigPseudoHEQA.value) { + fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairHESel_%s", sig->GetName()), VarManager::fgValues); + } + if (fConfigOptions.fConfigPseudoCSQA.value) { + fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairCSSel_%s", sig->GetName()), VarManager::fgValues); + } + if (fConfigOptions.fConfigPseudoRMQA.value) { + fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairRMSel_%s", sig->GetName()), VarManager::fgValues); } if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) { fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairHESel_%s", sig->GetName()), VarManager::fgValues); @@ -2205,8 +2225,14 @@ struct AnalysisSameEventPairing { if (fConfigOptions.fConfigMCtruthQA.value) { fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues); } - if (fConfigOptions.fConfigPseudoQA.value) { - fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues); + if (fConfigOptions.fConfigPseudoHEQA.value) { + fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairHESel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues); + } + if (fConfigOptions.fConfigPseudoCSQA.value) { + fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairCSSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues); + } + if (fConfigOptions.fConfigPseudoRMQA.value) { + fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairRMSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues); } if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) { @@ -2311,13 +2337,13 @@ struct AnalysisDileptonTrack { Configurable fConfigMCGenSignalHadronJSON{"cfgMCGenSignalHadronJSON", "", "generator level hadron signal (JSON format), used for MC level combinatorics"}; } fConfigMCOptions; - int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc. - int fNCuts; - int fNLegCuts; - int fNPairCuts; - int fNCommonTrackCuts; + int fCurrentRun = nullptr; // needed to detect if the run changed and trigger update of calibrations etc. + int fNCuts = nullptr; + int fNLegCuts = nullptr; + int fNPairCuts = nullptr; + int fNCommonTrackCuts = nullptr; std::map fCommonTrackCutMap; - uint32_t fTrackCutBitMap; // track cut bit mask to be used in the selection of tracks associated with dileptons + uint32_t fTrackCutBitMap = nullptr; // track cut bit mask to be used in the selection of tracks associated with dileptons // vector for single-lepton and track cut names for easy access when calling FillHistogramList() std::vector fTrackCutNames; std::vector fLegCutNames; @@ -2334,14 +2360,14 @@ struct AnalysisDileptonTrack { // Filter filterMuon = aod::dqanalysisflags::isMuonSelected > static_cast(0); // use two values array to avoid mixing up the quantities - float* fValuesDilepton; - float* fValuesHadron; - HistogramManager* fHistMan; + float* fValuesDilepton = nullptr; + float* fValuesHadron = nullptr; + HistogramManager* fHistMan = nullptr; std::vector fRecMCSignals; std::vector fGenMCSignals; - MCSignal* fDileptonLegSignal; - MCSignal* fHadronSignal; + MCSignal* fDileptonLegSignal = nullptr; + MCSignal* fHadronSignal = nullptr; void init(o2::framework::InitContext& context) { @@ -2353,7 +2379,7 @@ struct AnalysisDileptonTrack { bool isDummy = context.mOptions.get("processDummy"); if (isDummy) { - if (isBarrel || isMCGen /*|| isBarrelAsymmetric*/ /*|| isMuon*/) { + if (isBarrel || isMCGen) { LOG(fatal) << "Dummy function is enabled even if there are normal process functions running! Fix your config!" << endl; } else { LOG(info) << "Dummy function is enabled. Skipping the rest of the init function" << endl; @@ -2576,13 +2602,13 @@ struct AnalysisDileptonTrack { fNLegCuts = fNCuts; // loop over single lepton cuts - if (isBarrel /*|| isBarrelAsymmetric*/ /* || isMuon*/) { + if (isBarrel) { for (int icut = 0; icut < fNLegCuts; ++icut) { TString pairLegCutName; // here we check that this cut is one of those used for building the dileptons - if (isBarrel /*|| isMuon*/) { + if (isBarrel) { if (!cfgPairing_objArrayTrackCuts->FindObject(fTrackCutNames[icut].Data())) { continue; } @@ -3215,8 +3241,14 @@ void DefineHistograms(HistogramManager* histMan, TString histClasses, const char if (classStr.Contains("MCTruthGenPair")) { dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "mctruth_pair", histName); } - if (classStr.Contains("MCTruthGenPseudoPolPair")) { - dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-gen", histName); + if (classStr.Contains("MCTruthGenPseudoPolPairHE")) { + dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-midy-he-gen", histName); + } + if (classStr.Contains("MCTruthGenPseudoPolPairCS")) { + dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-midy-cs-gen", histName); + } + if (classStr.Contains("MCTruthGenPseudoPolPairRM")) { + dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-midy-rand-gen", histName); } if (classStr.Contains("MCTruthGenPoldielectronPbPbPairHE")) { dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-dielectron-pbpb-midy-he-gen", histName);