Skip to content

Commit 9085bb5

Browse files
committed
add neutron eta var, move QA hists to a different place
1 parent d1ed9ed commit 9085bb5

File tree

1 file changed

+34
-33
lines changed

1 file changed

+34
-33
lines changed

PWGLF/Tasks/Strangeness/derivedupcanalysis.cxx

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ struct Derivedupcanalysis {
115115
Configurable<float> daughterEtaCut{"daughterEtaCut", 0.8, "max eta for daughters"};
116116

117117
Configurable<bool> doDaughterDCA{"doDaughterDCA", true, "dcaXY cut for daughter tracks"};
118-
Configurable<bool> checkNetronsInMC{"checkNetronsInMC", true, "require no neutrons for single-gap in MC"};
118+
Configurable<bool> checkNeutronsInMC{"checkNeutronsInMC", true, "require no neutrons for single-gap in MC"};
119+
Configurable<float> neutronEtaCut{"neutronEtaCut", 0.8, "ZN acceptance"};
119120

120121
// Standard V0 topological criteria
121122
struct : ConfigurableGroup {
@@ -920,7 +921,8 @@ struct Derivedupcanalysis {
920921
histos.add("eventQA/mc/hTracksGlobalVsNcoll_afterEvSel", "hTracksGlobalVsNcoll_afterEvSel", kTH2F, {axisNTracksGlobal, axisNAssocColl});
921922
histos.add("eventQA/mc/hTracksGlobalVsPVzMC", "hTracksGlobalVsPVzMC", kTH2F, {axisNTracksGlobal, {100, -20., 20.}});
922923
histos.add("eventQA/mc/hEventPVzMC", "hEventPVzMC", kTH1F, {{100, -20., 20.}});
923-
histos.add("eventQA/mc/hGenEventCentrality", "hGenEventCentrality", kTH1F, {axisDetectors.axisFT0Aampl});
924+
histos.add("eventQA/mc/hGenEventFT0ampl", "hGenEventFT0ampl", kTH1F, {axisDetectors.axisFT0Aampl});
925+
histos.add("eventQA/mc/hGenEventCentrality", "hGenEventCentrality", kTH1F, {axisFT0Cqa});
924926
histos.add("eventQA/mc/hGeneratorsId", "hGeneratorsId", kTH1F, {axisGeneratorIds});
925927
}
926928

@@ -1024,17 +1026,9 @@ struct Derivedupcanalysis {
10241026
}
10251027

10261028
template <typename TCollision>
1027-
int getGapSide(TCollision const& collision, bool fillQA)
1029+
int getGapSide(TCollision const& collision)
10281030
{
10291031
int selGapSide = sgSelector.trueGap(collision, upcCuts.fv0a, upcCuts.ft0a, upcCuts.ft0c, upcCuts.zdc);
1030-
1031-
if (fillQA) {
1032-
histos.fill(HIST("eventQA/hGapSide"), collision.gapSide());
1033-
histos.fill(HIST("eventQA/hSelGapSide"), selGapSide);
1034-
histos.fill(HIST("eventQA/hFT0"), collision.totalFT0AmplitudeA(), collision.totalFT0AmplitudeC(), selGapSide);
1035-
histos.fill(HIST("eventQA/hFDD"), collision.totalFDDAmplitudeA(), collision.totalFDDAmplitudeC(), selGapSide);
1036-
histos.fill(HIST("eventQA/hZN"), collision.energyCommonZNA(), collision.energyCommonZNC(), selGapSide);
1037-
}
10381032
return selGapSide;
10391033
}
10401034

@@ -1064,6 +1058,12 @@ struct Derivedupcanalysis {
10641058
histos.fill(HIST("eventQA/hPosX"), collision.posX(), gap);
10651059
histos.fill(HIST("eventQA/hPosY"), collision.posY(), gap);
10661060
histos.fill(HIST("eventQA/hPosZ"), collision.posZ(), gap);
1061+
1062+
histos.fill(HIST("eventQA/hGapSide"), collision.gapSide());
1063+
histos.fill(HIST("eventQA/hSelGapSide"), gap);
1064+
histos.fill(HIST("eventQA/hFT0"), collision.totalFT0AmplitudeA(), collision.totalFT0AmplitudeC(), gap);
1065+
histos.fill(HIST("eventQA/hFDD"), collision.totalFDDAmplitudeA(), collision.totalFDDAmplitudeC(), gap);
1066+
histos.fill(HIST("eventQA/hZN"), collision.energyCommonZNA(), collision.energyCommonZNC(), gap);
10671067
}
10681068

10691069
template <typename TCollision>
@@ -1720,7 +1720,7 @@ struct Derivedupcanalysis {
17201720
continue;
17211721
}
17221722

1723-
int selGapSide = collision.isUPC() ? getGapSide(collision, false) : -1;
1723+
int selGapSide = collision.isUPC() ? getGapSide(collision) : -1;
17241724
for (const auto& neutron : neutrons) {
17251725
if (!neutron.has_straMCCollision() || !collision.has_straMCCollision())
17261726
continue;
@@ -1734,17 +1734,17 @@ struct Derivedupcanalysis {
17341734
const float eta = neutron.eta();
17351735
switch (selGapSide) {
17361736
case 0: // SGA
1737-
if (eta > 8.8)
1737+
if (eta > neutronEtaCut)
17381738
selGapSide = -1;
17391739
break;
17401740
case 1: // SGC
1741-
if (eta < -8.8)
1741+
if (eta < -neutronEtaCut)
17421742
selGapSide = -1;
17431743
break;
17441744
case 2: // DG
1745-
if (eta > 8.8)
1745+
if (eta > neutronEtaCut)
17461746
selGapSide = 1;
1747-
else if (eta < -8.8)
1747+
else if (eta < -neutronEtaCut)
17481748
selGapSide = 0;
17491749
break;
17501750
}
@@ -1799,7 +1799,7 @@ struct Derivedupcanalysis {
17991799
continue;
18001800
}
18011801

1802-
int selGapSide = collision.isUPC() ? getGapSide(collision, false) : -1;
1802+
int selGapSide = collision.isUPC() ? getGapSide(collision) : -1;
18031803
for (const auto& neutron : neutrons) {
18041804
if (!neutron.has_straMCCollision() || !collision.has_straMCCollision())
18051805
continue;
@@ -1813,17 +1813,17 @@ struct Derivedupcanalysis {
18131813
const float eta = neutron.eta();
18141814
switch (selGapSide) {
18151815
case 0: // SGA
1816-
if (eta > 8.8)
1816+
if (eta > neutronEtaCut)
18171817
selGapSide = -1;
18181818
break;
18191819
case 1: // SGC
1820-
if (eta < -8.8)
1820+
if (eta < -neutronEtaCut)
18211821
selGapSide = -1;
18221822
break;
18231823
case 2: // DG
1824-
if (eta > 8.8)
1824+
if (eta > neutronEtaCut)
18251825
selGapSide = 1;
1826-
else if (eta < -8.8)
1826+
else if (eta < -neutronEtaCut)
18271827
selGapSide = 0;
18281828
break;
18291829
}
@@ -1858,6 +1858,7 @@ struct Derivedupcanalysis {
18581858
if (atLeastOne) {
18591859
histos.fill(HIST("eventQA/mc/hEventSelectionMC"), 2.0, mcCollision.multMCNParticlesEta08(), mcCollision.generatorsID());
18601860
histos.fill(HIST("eventQA/mc/hGenEventCentrality"), centrality);
1861+
histos.fill(HIST("eventQA/mc/hGenEventFT0ampl"), ft0ampl);
18611862
}
18621863
}
18631864
}
@@ -1898,7 +1899,7 @@ struct Derivedupcanalysis {
18981899

18991900
histos.fill(HIST("eventQA/hRawGapSide"), collision.gapSide());
19001901

1901-
int selGapSide = collision.isUPC() ? getGapSide(collision, true) : -1;
1902+
int selGapSide = collision.isUPC() ? getGapSide(collision) : -1;
19021903
if (evSels.studyUPConly && (selGapSide < -0.5))
19031904
return;
19041905

@@ -1941,7 +1942,7 @@ struct Derivedupcanalysis {
19411942

19421943
histos.fill(HIST("eventQA/hRawGapSide"), collision.gapSide());
19431944

1944-
int selGapSide = collision.isUPC() ? getGapSide(collision, true) : -1;
1945+
int selGapSide = collision.isUPC() ? getGapSide(collision) : -1;
19451946
for (const auto& neutron : neutrons) {
19461947
if (!neutron.has_straMCCollision() || !collision.has_straMCCollision())
19471948
continue;
@@ -1956,17 +1957,17 @@ struct Derivedupcanalysis {
19561957
const float eta = neutron.eta();
19571958
switch (selGapSide) {
19581959
case 0: // SGA
1959-
if (eta > 8.8)
1960+
if (eta > neutronEtaCut)
19601961
selGapSide = -1;
19611962
break;
19621963
case 1: // SGC
1963-
if (eta < -8.8)
1964+
if (eta < -neutronEtaCut)
19641965
selGapSide = -1;
19651966
break;
19661967
case 2: // DG
1967-
if (eta > 8.8)
1968+
if (eta > neutronEtaCut)
19681969
selGapSide = 1;
1969-
else if (eta < -8.8)
1970+
else if (eta < -neutronEtaCut)
19701971
selGapSide = 0;
19711972
break;
19721973
}
@@ -2019,7 +2020,7 @@ struct Derivedupcanalysis {
20192020

20202021
histos.fill(HIST("eventQA/hRawGapSide"), collision.gapSide());
20212022

2022-
int selGapSide = collision.isUPC() ? getGapSide(collision, true) : -1;
2023+
int selGapSide = collision.isUPC() ? getGapSide(collision) : -1;
20232024
if (evSels.studyUPConly && (selGapSide < -0.5))
20242025
return;
20252026

@@ -2058,7 +2059,7 @@ struct Derivedupcanalysis {
20582059

20592060
histos.fill(HIST("eventQA/hRawGapSide"), collision.gapSide());
20602061

2061-
int selGapSide = collision.isUPC() ? getGapSide(collision, true) : -1;
2062+
int selGapSide = collision.isUPC() ? getGapSide(collision) : -1;
20622063
for (const auto& neutron : neutrons) {
20632064
if (!neutron.has_straMCCollision() || !collision.has_straMCCollision())
20642065
continue;
@@ -2073,17 +2074,17 @@ struct Derivedupcanalysis {
20732074
const float eta = neutron.eta();
20742075
switch (selGapSide) {
20752076
case 0: // SGA
2076-
if (eta > 8.8)
2077+
if (eta > neutronEtaCut)
20772078
selGapSide = -1;
20782079
break;
20792080
case 1: // SGC
2080-
if (eta < -8.8)
2081+
if (eta < -neutronEtaCut)
20812082
selGapSide = -1;
20822083
break;
20832084
case 2: // DG
2084-
if (eta > 8.8)
2085+
if (eta > neutronEtaCut)
20852086
selGapSide = 1;
2086-
else if (eta < -8.8)
2087+
else if (eta < -neutronEtaCut)
20872088
selGapSide = 0;
20882089
break;
20892090
}

0 commit comments

Comments
 (0)