Skip to content

Commit cd6bb53

Browse files
authored
[PWGCF] change the method of applying local density efficiency
change the method of applying local density efficiency
1 parent f37ed8c commit cd6bb53

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -574,15 +574,14 @@ struct FlowGfwOmegaXi {
574574
}
575575

576576
template <typename TrackObject>
577-
bool setCurrentLocalDensityWeights(float& weight_loc, TrackObject track, float locDensity, int ispecies)
577+
bool setCurrentLocalDensityWeights(float& weight_loc, TrackObject track, double locDensity, int ispecies)
578578
{
579579
auto cfgLocDenPara = (std::vector<std::vector<double>>){cfgLocDenParaK0s, cfgLocDenParaLambda, cfgLocDenParaXi, cfgLocDenParaOmega};
580-
int particlePtbins[4] = {nV0PtBins, nV0PtBins, nXiPtBins, nXiPtBins};
581-
if (cfgLocDenPara[ispecies - 1].size() != 2 * particlePtbins[ispecies - 1]) {
580+
if (track.pt() < 0.9 || track.pt() > 10) {
582581
weight_loc = 1.0;
583582
return true;
584583
}
585-
int ptbin = fPtAxis->FindBin(track.pt());
584+
int ptbin = fXiPtAxis->FindBin(track.pt());
586585
double paraA = cfgLocDenPara[ispecies - 1][2 * ptbin - 2];
587586
double paraB = cfgLocDenPara[ispecies - 1][2 * ptbin - 1];
588587
double density = locDensity * 200 / (2 * cfgDeltaPhiLocDen + 1);
@@ -698,8 +697,8 @@ struct FlowGfwOmegaXi {
698697
int ptbin = fPtAxis->FindBin(track.pt()) - 1;
699698
if ((track.pt() > cfgCutPtMin) && (track.pt() < cfgCutPtMax)) {
700699
fGFW->Fill(track.eta(), ptbin, track.phi(), wacc * weff, 1); //(eta, ptbin, phi, wacc*weff, bitmask)
701-
hLocalDensity->Fill(track.phi());
702-
hLocalDensity->Fill(RecoDecay::constrainAngle(track.phi(), -constants::math::TwoPI));
700+
hLocalDensity->Fill(track.phi(), wacc * weff);
701+
hLocalDensity->Fill(RecoDecay::constrainAngle(track.phi(), -constants::math::TwoPI), wacc * weff);
703702
}
704703
if ((track.pt() > cfgCutPtPOIMin) && (track.pt() < cfgCutPtPOIMax)) {
705704
fGFW->Fill(track.eta(), ptbin, track.phi(), wacc * weff, 32);
@@ -784,7 +783,7 @@ struct FlowGfwOmegaXi {
784783
int phibin = -999;
785784
phibin = hLocalDensity->FindBin(RecoDecay::constrainAngle(v0.phi(), -constants::math::PI));
786785
if (phibin > -900) {
787-
int density = hLocalDensity->Integral(phibin - cfgDeltaPhiLocDen, phibin + cfgDeltaPhiLocDen);
786+
double density = hLocalDensity->Integral(phibin - cfgDeltaPhiLocDen, phibin + cfgDeltaPhiLocDen);
788787
setCurrentLocalDensityWeights(wloc, v0, density, 1);
789788
}
790789

@@ -800,7 +799,7 @@ struct FlowGfwOmegaXi {
800799
int phibin = -999;
801800
phibin = hLocalDensity->FindBin(RecoDecay::constrainAngle(v0.phi(), -constants::math::PI));
802801
if (phibin > -900) {
803-
int density = hLocalDensity->Integral(phibin - cfgDeltaPhiLocDen, phibin + cfgDeltaPhiLocDen);
802+
double density = hLocalDensity->Integral(phibin - cfgDeltaPhiLocDen, phibin + cfgDeltaPhiLocDen);
804803
setCurrentLocalDensityWeights(wloc, v0, density, 2);
805804
}
806805

@@ -886,7 +885,7 @@ struct FlowGfwOmegaXi {
886885
int phibin = -999;
887886
phibin = hLocalDensity->FindBin(RecoDecay::constrainAngle(casc.phi(), -constants::math::PI));
888887
if (phibin > -900) {
889-
int density = hLocalDensity->Integral(phibin - cfgDeltaPhiLocDen, phibin + cfgDeltaPhiLocDen);
888+
double density = hLocalDensity->Integral(phibin - cfgDeltaPhiLocDen, phibin + cfgDeltaPhiLocDen);
890889
setCurrentLocalDensityWeights(wloc, casc, density, 4);
891890
}
892891

@@ -902,7 +901,7 @@ struct FlowGfwOmegaXi {
902901
int phibin = -999;
903902
phibin = hLocalDensity->FindBin(RecoDecay::constrainAngle(casc.phi(), -constants::math::PI));
904903
if (phibin > -900) {
905-
int density = hLocalDensity->Integral(phibin - cfgDeltaPhiLocDen, phibin + cfgDeltaPhiLocDen);
904+
double density = hLocalDensity->Integral(phibin - cfgDeltaPhiLocDen, phibin + cfgDeltaPhiLocDen);
906905
setCurrentLocalDensityWeights(wloc, casc, density, 3);
907906
}
908907

0 commit comments

Comments
 (0)