From 0e64bbb55306693350d04d9c23a9fe19e4bbbaf3 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 17 Mar 2025 20:05:05 +0000 Subject: [PATCH] Please consider the following formatting changes --- PWGCF/EbyEFluctuations/Tasks/meanPtFlucId.cxx | 38 +++++++------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/PWGCF/EbyEFluctuations/Tasks/meanPtFlucId.cxx b/PWGCF/EbyEFluctuations/Tasks/meanPtFlucId.cxx index 4c73c59f922..30179b402da 100644 --- a/PWGCF/EbyEFluctuations/Tasks/meanPtFlucId.cxx +++ b/PWGCF/EbyEFluctuations/Tasks/meanPtFlucId.cxx @@ -249,7 +249,7 @@ struct MeanPtFlucId { hist.add("QA/after/h2_NTPC_Cent", "N_{TPC} vs FT0C(%)", kTH2D, {{axisCentFT0C}, {axisMultTPC}}); hist.add("QA/after/h2_NTPC_NFT0M", "N_{TPC} vs N_{FT0M}", kTH2D, {{axisMultFT0M}, {axisMultTPC}}); hist.add("QA/after/h2_NTPC_NFT0C", "N_{TPC} vs N_{FT0C}", kTH2D, {{axisMultFT0M}, {axisMultTPC}}); - + hist.add("QA/after/p_NTPC_NFT0M", "N_{TPC} vs N_{FT0M} (Profile)", kTProfile, {axisMultFT0M}); hist.add("QA/after/p_NTPC_NFT0C", "N_{TPC} vs N_{FT0C} (Profile)", kTProfile, {axisMultFT0M}); hist.add("QA/after/p_NTPC_Cent", "N_{TPC} vs FT0C(%) (Profile)", kTProfile, {axisCentFT0C}); @@ -412,7 +412,7 @@ struct MeanPtFlucId { hist.add("Gen/Charged/h_threepart_Mult_skew", "Threepart vs N_{TPC} ", partMCHist); hist.add("Gen/Charged/h_threepart_Mult_kurto", "Threepart vs N_{TPC} ", partMCHist); hist.add("Gen/Charged/h_fourpart_Mult_kurto", "Fourpart vs N_{TPC} ", partMCHist); - hist.add("Gen/Charged/p_twopart_MultFT0M", "Twopart vs N_{TPC} ",kTProfile, {axisMultFT0M}); + hist.add("Gen/Charged/p_twopart_MultFT0M", "Twopart vs N_{TPC} ", kTProfile, {axisMultFT0M}); hist.add("Gen/Charged/p_mean_pT_MultFT0M", " vs N_{TPC} ", kTProfile, {axisMultFT0M}); hist.addClone("Gen/Charged/", "Gen/Pion/"); @@ -627,7 +627,6 @@ struct MeanPtFlucId { return false; } - // Fill hist before selection cuts: template void fillBeforeQAHistos(T const& col, U const& tracks) @@ -731,7 +730,6 @@ struct MeanPtFlucId { Q4 += pt * pt * pt * pt * weight; } - template float getCorrectedWeight(T1 hWeightPt, T1 hPurePt, T2 hWeightPtY, T2 hWeightPtEta, double pt, double rap, double eta, bool cfgWeightPt, bool cfgWeightPtY, bool cfgWeightPtEta, bool cfgPurity) { @@ -745,13 +743,13 @@ struct MeanPtFlucId { if (cfgWeightPt) { float weightPt = hWeightPt->GetBinContent(hWeightPt->FindBin(pt)); - weight = purity / weightPt; + weight = purity / weightPt; } else if (cfgWeightPtY) { float weightPtY = hWeightPtY->GetBinContent(hWeightPtY->FindBin(rap, pt)); - weight = purity / weightPtY; + weight = purity / weightPtY; } else if (cfgWeightPtEta) { float weightPtEta = hWeightPtEta->GetBinContent(hWeightPtEta->FindBin(eta, pt)); - weight = purity / weightPtEta; + weight = purity / weightPtEta; } else { weight = 1.0; } @@ -779,7 +777,7 @@ struct MeanPtFlucId { hist.fill(HIST(Dire[Mode]) + HIST("h2_Pt_Eta_weighted"), eta, pt, weight); hist.fill(HIST(Dire[Mode]) + HIST("h_Pt_weighted"), pt, weight); - hist.fill(HIST(Dire[Mode]) + HIST("h_Pt2_weighted"), pt*pt, weight); + hist.fill(HIST(Dire[Mode]) + HIST("h_Pt2_weighted"), pt * pt, weight); hist.fill(HIST(Dire[Mode]) + HIST("h_Pt"), pt); hist.fill(HIST(Dire[Mode]) + HIST("h_Pt2"), pt * pt); @@ -865,7 +863,6 @@ struct MeanPtFlucId { hist.fill(HIST(Dire[Mode]) + HIST("h_Q2"), nTPC, Q2, nFT0M); hist.fill(HIST(Dire[Mode]) + HIST("h_Q3"), nTPC, Q3, nFT0M); hist.fill(HIST(Dire[Mode]) + HIST("h_Q4"), nTPC, Q4, nFT0M); - if (N > 1) { double meanPt = Q1 / NW; @@ -886,7 +883,6 @@ struct MeanPtFlucId { hist.fill(HIST(Dire[Mode]) + HIST("h_CheckNCh"), nTPC, checkNDenoVar, nFT0M); hist.fill(HIST(Dire[Mode]) + HIST("p_twopart_MultFT0M"), nFT0M, twopart); - if (N > 2) { double nTriplet = (NW * (NW - 1) * (NW - 2)); double threepart = threepart1 / nTriplet; @@ -907,10 +903,11 @@ struct MeanPtFlucId { } template - void fillMeanPtCorr(std::vector ptVal, std::vector weightVal, int N, int nFT0M, bool cfgWeight){ - for(int i = 0; i < N; i++){ + void fillMeanPtCorr(std::vector ptVal, std::vector weightVal, int N, int nFT0M, bool cfgWeight) + { + for (int i = 0; i < N; i++) { float w = 1.0; - if(cfgWeight){ + if (cfgWeight) { w = weightVal[i]; } double pt = ptVal[i]; @@ -947,16 +944,13 @@ struct MeanPtFlucId { std::vector ptValCh, ptValPi, ptValKa, ptValPr; std::vector weightValCh, weightValPi, weightValKa, weightValPr; - - - if constexpr (DataFlag) { nTPC = col.multNTracksHasTPC(); nFT0M = col.multFT0M(); nFT0C = col.multFT0C(); - fillAfterQAHistos(col); - for (const auto& track : tracks) { + fillAfterQAHistos(col); + for (const auto& track : tracks) { if (!selTrack(track)) { continue; } @@ -995,12 +989,10 @@ struct MeanPtFlucId { if (selKa(track)) { fillIdParticleQAHistos(track, rapKa, nSigmaTPCKa, nSigmaTOFKa, nFT0M, hWeightPtKa, hPurePtKa, hWeightPtRapKa, hWeightPtEtaKa, cfgWeightPtId, cfgWeightPtYId, cfgWeightPtEtaId, cfgPurityId, nKa, nKaW, q1Ka, q2Ka, q3Ka, q4Ka, wghtKa); } - if (selPr(track)) { fillIdParticleQAHistos(track, rapPr, nSigmaTPCPr, nSigmaTOFPr, nFT0M, hWeightPtPr, hPurePtPr, hWeightPtRapPr, hWeightPtEtaPr, cfgWeightPtId, cfgWeightPtYId, cfgWeightPtEtaId, cfgPurityId, nPr, nPrW, q1Pr, q2Pr, q3Pr, q4Pr, wghtPr); } - } } } else if constexpr (RecoFlag) { @@ -1050,7 +1042,7 @@ struct MeanPtFlucId { fillChargedQAHistos(track, nFT0M); hist.fill(HIST("QA/after/h_Pt_weighted"), ptCh, wghtCh); - hist.fill(HIST("QA/after/h_Pt2_weighted"), ptCh*ptCh, wghtCh); + hist.fill(HIST("QA/after/h_Pt2_weighted"), ptCh * ptCh, wghtCh); fillBeforePIDQAHistos(track); @@ -1175,7 +1167,6 @@ struct MeanPtFlucId { if (nSim > 0 && nTPC > 0) hist.fill(HIST("Gen/h2_NTPC_NSim"), nSim, nTPC); - hist.fill(HIST("Gen/h_NTPC"), nTPC); hist.fill(HIST("Gen/h_NFT0C"), nFT0CSim); hist.fill(HIST("Gen/h2_NTPC_NFT0C"), nFT0CSim, nTPC); @@ -1193,7 +1184,7 @@ struct MeanPtFlucId { fillAnalysisHistos(nTPC, nFT0M, nPiSim, nPiSim1, q1PiSim, q2PiSim, q3PiSim, q4PiSim); fillAnalysisHistos(nTPC, nFT0M, nKaSim, nKaSim1, q1KaSim, q2KaSim, q3KaSim, q4KaSim); fillAnalysisHistos(nTPC, nFT0M, nPrSim, nPrSim1, q1PrSim, q2PrSim, q3PrSim, q4PrSim); - + fillMeanPtCorr(ptValChSim, {}, nChSim, nFT0M, false); fillMeanPtCorr(ptValPiSim, {}, nPiSim, nFT0M, false); fillMeanPtCorr(ptValKaSim, {}, nKaSim, nFT0M, false); @@ -1222,7 +1213,6 @@ struct MeanPtFlucId { weightValPi.clear(); weightValKa.clear(); weightValPr.clear(); - } void processRun3(MyRun3Collisions::iterator const& col, MyAllTracks const& tracks)