Skip to content

Commit 62fd41a

Browse files
committed
weight with reverse efficiency
1 parent d22714f commit 62fd41a

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -950,11 +950,18 @@ struct hadronnucleicorrelation {
950950
isAntiDe = 0;
951951
}
952952

953+
float corr = 1.;
954+
953955
// Deuterons Fill & QA
954956
if (isAntiDe) {
955957
selectedtracks_antid[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track));
958+
956959
if (mode == 0 || mode == 2) {
957-
registry.fill(HIST("hNtrig_total"), track.pt(), hEffpTEta_antideuteron->Interpolate(track.pt(), track.eta()));
960+
961+
if (docorrection && hEffpTEta_antideuteron->Interpolate(track.pt(), track.eta()) > 0) {
962+
corr = 1. / hEffpTEta_antideuteron->Interpolate(track.pt(), track.eta());
963+
}
964+
registry.fill(HIST("hNtrig_total"), track.pt(), corr);
958965
}
959966

960967
if (doQA) {
@@ -968,7 +975,12 @@ struct hadronnucleicorrelation {
968975
selectedtracks_d[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track));
969976

970977
if (mode == 1 || mode == 3) {
971-
registry.fill(HIST("hNtrig_total"), track.pt(), hEffpTEta_deuteron->Interpolate(track.pt(), track.eta()));
978+
979+
corr = 1.;
980+
if (docorrection && hEffpTEta_deuteron->Interpolate(track.pt(), track.eta()) > 0) {
981+
corr = 1. / hEffpTEta_deuteron->Interpolate(track.pt(), track.eta());
982+
}
983+
registry.fill(HIST("hNtrig_total"), track.pt(), corr);
972984
}
973985

974986
if (doQA) {
@@ -984,7 +996,12 @@ struct hadronnucleicorrelation {
984996
selectedtracks_p[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track));
985997

986998
if (mode == 6 || mode == 7) {
987-
registry.fill(HIST("hNtrig_total"), track.pt(), hEffpTEta_proton->Interpolate(track.pt(), track.eta()));
999+
1000+
corr = 1.;
1001+
if (docorrection && hEffpTEta_proton->Interpolate(track.pt(), track.eta()) > 0) {
1002+
corr = 1. / hEffpTEta_proton->Interpolate(track.pt(), track.eta());
1003+
}
1004+
registry.fill(HIST("hNtrig_total"), track.pt(), corr);
9881005
}
9891006

9901007
if (doQA) {
@@ -997,7 +1014,11 @@ struct hadronnucleicorrelation {
9971014
selectedtracks_antip[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track));
9981015

9991016
if (mode == 4 || mode == 5) {
1000-
registry.fill(HIST("hNtrig_total"), track.pt(), hEffpTEta_antiproton->Interpolate(track.pt(), track.eta()));
1017+
corr = 1.;
1018+
if (docorrection && hEffpTEta_antiproton->Interpolate(track.pt(), track.eta()) > 0) {
1019+
corr = 1. / hEffpTEta_antiproton->Interpolate(track.pt(), track.eta());
1020+
}
1021+
registry.fill(HIST("hNtrig_total"), track.pt(), corr);
10011022
}
10021023

10031024
if (doQA) {

0 commit comments

Comments
 (0)