Skip to content

Commit 5bfda02

Browse files
[PWGCF] Fixed a Bug with efficiency correction (taking reciprocal of efficiency twice) (#16505)
1 parent f726276 commit 5bfda02

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ struct V0ptHadPiKaProt {
935935
}
936936

937937
template <typename T>
938-
float getEffAllCharged(const T& candidate)
938+
float getEffWeightAllCharged(const T& candidate)
939939
{
940940
if (!cfgLoadPtEffWeights || !hEffAllCharged) {
941941
return 1.0;
@@ -950,7 +950,7 @@ struct V0ptHadPiKaProt {
950950
}
951951

952952
template <typename T>
953-
float getEffPion(const T& candidate)
953+
float getEffWeightPion(const T& candidate)
954954
{
955955
if (!cfgLoadPtEffWeights || !hEffPion) {
956956
return 1.0;
@@ -965,7 +965,7 @@ struct V0ptHadPiKaProt {
965965
}
966966

967967
template <typename T>
968-
float getEffKaon(const T& candidate)
968+
float getEffWeightKaon(const T& candidate)
969969
{
970970
if (!cfgLoadPtEffWeights || !hEffKaon) {
971971
return 1.0;
@@ -980,7 +980,7 @@ struct V0ptHadPiKaProt {
980980
}
981981

982982
template <typename T>
983-
float getEffProton(const T& candidate)
983+
float getEffWeightProton(const T& candidate)
984984
{
985985
if (!cfgLoadPtEffWeights || !hEffProton) {
986986
return 1.0;
@@ -1405,7 +1405,7 @@ struct V0ptHadPiKaProt {
14051405

14061406
double effweight = 1.0;
14071407
if (cfgLoadPtEffWeights) {
1408-
effweight = 1.0 / getEffAllCharged(track); // NUE weight
1408+
effweight = getEffWeightAllCharged(track); // NUE weight
14091409
}
14101410

14111411
// inclusive charged particles
@@ -1523,9 +1523,9 @@ struct V0ptHadPiKaProt {
15231523
double effweightKaon = 1.0;
15241524
double effweightProton = 1.0;
15251525
if (cfgLoadPtEffWeights) {
1526-
effweightPion = 1.0 / getEffPion(track); // NUE weight for pion
1527-
effweightKaon = 1.0 / getEffKaon(track); // NUE weight for kaon
1528-
effweightProton = 1.0 / getEffProton(track); // NUE weight for proton
1526+
effweightPion = getEffWeightPion(track); // NUE weight for pion
1527+
effweightKaon = getEffWeightKaon(track); // NUE weight for kaon
1528+
effweightProton = getEffWeightProton(track); // NUE weight for proton
15291529
}
15301530

15311531
if (track.sign() != 0) {

0 commit comments

Comments
 (0)