diff --git a/PWGLF/TableProducer/Common/spvector.cxx b/PWGLF/TableProducer/Common/spvector.cxx index 17af2282ef4..9de23b50842 100644 --- a/PWGLF/TableProducer/Common/spvector.cxx +++ b/PWGLF/TableProducer/Common/spvector.cxx @@ -86,6 +86,7 @@ struct spvector { Configurable cfgCutCentralityMin{"cfgCutCentralityMin", 0.0f, "Centrality cut Min"}; Configurable additionalEvSel{"additionalEvSel", false, "additionalEvSel"}; Configurable usemem{"usemem", true, "usemem"}; + Configurable usecfactor{"usecfactor", false, "use c factor"}; struct : ConfigurableGroup { Configurable QxyNbins{"QxyNbins", 100, "Number of bins in QxQy histograms"}; @@ -293,11 +294,6 @@ struct spvector { int lastRunNumber = -999; TH2D* gainprofile; TProfile* gainprofilevxy; - /*THnF* hrecentereSp; - TH2F* hrecenterecentSp; - TH2F* hrecenterevxSp; - TH2F* hrecenterevySp; - TH2F* hrecenterevzSp;*/ std::array hrecentereSpA; // Array of 6 histograms std::array hrecenterecentSpA; // Array of 5 histograms std::array hrecenterevxSpA; // Array of 5 histograms @@ -306,16 +302,9 @@ struct spvector { TProfile3D* shiftprofileA; TProfile3D* shiftprofileC; - // Bool_t Correctcoarse(int64_t ts, Configurable& ConfRecentereSpp, bool useRecentereSp, int currentRunNumber, int lastRunNumber, auto centrality, auto vx, auto vy, auto vz, auto& qxZDCA, auto& qyZDCA, auto& qxZDCC, auto& qyZDCC) - //{ Bool_t Correctcoarse(const THnF* hrecentereSp, auto centrality, auto vx, auto vy, auto vz, auto& qxZDCA, auto& qyZDCA, auto& qxZDCC, auto& qyZDCC) { - /* - if (useRecentereSp && (currentRunNumber != lastRunNumber)) { - hrecentereSp = ccdb->getForTimeStamp(ConfRecentereSpp.value, ts); - }*/ - int binCoords[5]; // Get axes of the THnSparse @@ -357,8 +346,6 @@ struct spvector { return kTRUE; } - // Bool_t Correctfine(int64_t ts, Configurable& ConfRecenterecentSpp, Configurable& ConfRecenterevxSpp, Configurable& ConfRecenterevySpp, Configurable& ConfRecenterevzSpp, bool useRecenterefineSp, int currentRunNumber, int lastRunNumber, auto centrality, auto vx, auto vy, auto vz, auto& qxZDCA, auto& qyZDCA, auto& qxZDCC, auto& qyZDCC) - //{ Bool_t Correctfine(TH2F* hrecenterecentSp, TH2F* hrecenterevxSp, TH2F* hrecenterevySp, TH2F* hrecenterevzSp, auto centrality, auto vx, auto vy, auto vz, auto& qxZDCA, auto& qyZDCA, auto& qxZDCC, auto& qyZDCC) { @@ -366,13 +353,6 @@ struct spvector { std::cerr << "Error: One or more histograms are null." << std::endl; return false; } - /* - if (useRecenterefineSp && (currentRunNumber != lastRunNumber)) { - hrecenterecentSp = ccdb->getForTimeStamp(ConfRecenterecentSpp.value, ts); - hrecenterevxSp = ccdb->getForTimeStamp(ConfRecenterevxSpp.value, ts); - hrecenterevySp = ccdb->getForTimeStamp(ConfRecenterevySpp.value, ts); - hrecenterevzSp = ccdb->getForTimeStamp(ConfRecenterevzSpp.value, ts); - }*/ double meanxAcent = hrecenterecentSp->GetBinContent(hrecenterecentSp->FindBin(centrality + 0.00001, 0.5)); double meanyAcent = hrecenterecentSp->GetBinContent(hrecenterecentSp->FindBin(centrality + 0.00001, 1.5)); @@ -452,6 +432,7 @@ struct spvector { auto znaEnergy = zdc.energySectorZNA(); auto zncEnergycommon = zdc.energyCommonZNC(); auto znaEnergycommon = zdc.energyCommonZNA(); + auto beamEne = 5.36 * 0.5; if (znaEnergycommon <= 0.0 || zncEnergycommon <= 0.0) { triggerevent = false; @@ -504,6 +485,8 @@ struct spvector { auto alphaZDC = 0.395; constexpr double x[4] = {-1.75, 1.75, -1.75, 1.75}; constexpr double y[4] = {-1.75, -1.75, 1.75, 1.75}; + double zncEnergycommonsum = 0.0; + double znaEnergycommonsum = 0.0; histos.fill(HIST("ZDCAmpCommon"), 0.5, vz, znaEnergycommon); histos.fill(HIST("ZDCAmpCommon"), 1.5, vz, zncEnergycommon); @@ -522,6 +505,7 @@ struct spvector { return; } else { double ampl = gainequal * znaEnergy[iChA]; + znaEnergycommonsum += ampl; if (followpub) { ampl = TMath::Power(ampl, alphaZDC); } @@ -537,6 +521,7 @@ struct spvector { return; } else { double ampl = gainequal * zncEnergy[iChA - 4]; + zncEnergycommonsum += ampl; if (followpub) { ampl = TMath::Power(ampl, alphaZDC); } @@ -548,13 +533,26 @@ struct spvector { } } + auto cZNC = 1.0; + auto cZNA = 1.0; + if (sumA > 0) { - qxZDCA = qxZDCA / sumA; - qyZDCA = qyZDCA / sumA; + float nSpecnA = znaEnergycommonsum / beamEne; + if (usecfactor) + cZNA = 1.89358 - 0.71262 / (nSpecnA + 0.71789); + else + cZNA = 1.0; + qxZDCA = cZNA * (qxZDCA / sumA); + qyZDCA = cZNA * (qyZDCA / sumA); } if (sumC > 0) { - qxZDCC = qxZDCC / sumC; - qyZDCC = qyZDCC / sumC; + float nSpecnC = zncEnergycommonsum / beamEne; + if (usecfactor) + cZNC = 1.89358 - 0.71262 / (nSpecnC + 0.71789); + else + cZNC = 1.0; + qxZDCC = cZNC * (qxZDCC / sumC); + qyZDCC = cZNC * (qyZDCC / sumC); } if (sumA <= 1e-4 || sumC <= 1e-4) { diff --git a/PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx b/PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx index 103f515ce4c..1c1fa828ff3 100644 --- a/PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx +++ b/PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx @@ -73,6 +73,8 @@ struct lambdaspincorrelation { } rctCut; Configurable useNoCollInTimeRangeStandard{"useNoCollInTimeRangeStandard", false, "Apply kNoCollInTimeRangeStandard selection bit"}; Configurable useGoodITSLayersAll{"useGoodITSLayersAll", true, "Apply kIsGoodITSLayersAll selection bit"}; + Configurable useNoSameBunchPileup{"useNoSameBunchPileup", true, "Apply NoSameBunchPileup selection bit"}; + Configurable useGoodZvtxFT0vsPV{"useGoodZvtxFT0vsPV", true, "Apply GoodZvtxFT0vsPV selection bit"}; // mixing // Produce derived tables Configurable cfgCutOccupancy{"cfgCutOccupancy", 2000, "Occupancy cut"}; @@ -270,7 +272,7 @@ struct lambdaspincorrelation { int occupancy = collision.trackOccupancyInTimeRange(); histos.fill(HIST("hEvtSelInfo"), 0.5); // if ((!rctCut.requireRCTFlagChecker || rctChecker(collision)) && collision.selection_bit(aod::evsel::kNoSameBunchPileup) && collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) && collision.selection_bit(aod::evsel::kNoTimeFrameBorder) && collision.selection_bit(aod::evsel::kNoITSROFrameBorder) && collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) && collision.sel8() && collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll) && occupancy < cfgCutOccupancy) { - if ((!rctCut.requireRCTFlagChecker || rctChecker(collision)) && collision.selection_bit(aod::evsel::kNoSameBunchPileup) && collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) && collision.selection_bit(aod::evsel::kNoTimeFrameBorder) && collision.selection_bit(aod::evsel::kNoITSROFrameBorder) && (!useNoCollInTimeRangeStandard || collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) && collision.sel8() && (!useGoodITSLayersAll || collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) && occupancy < cfgCutOccupancy) { + if ((!rctCut.requireRCTFlagChecker || rctChecker(collision)) && (!useNoSameBunchPileup || collision.selection_bit(aod::evsel::kNoSameBunchPileup)) && (!useGoodZvtxFT0vsPV || collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) && collision.selection_bit(aod::evsel::kNoTimeFrameBorder) && collision.selection_bit(aod::evsel::kNoITSROFrameBorder) && (!useNoCollInTimeRangeStandard || collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) && collision.sel8() && (!useGoodITSLayersAll || collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) && occupancy < cfgCutOccupancy) { histos.fill(HIST("hEvtSelInfo"), 1.5); for (const auto& v0 : V0s) { // LOGF(info, "v0 index 0 : (%d)", v0.index());