Skip to content

Commit 527fafa

Browse files
committed
Added has_foundFT0 event selection
1 parent dbb408b commit 527fafa

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

PWGLF/Tasks/Resonances/kstar892LightIon.cxx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ struct Kstar892LightIon {
9797
Configurable<bool> isVertexITSTPC{"isVertexITSTPC", false, "Vertex ITS TPC"};
9898
Configurable<bool> isVertexTOFMatched{"isVertexTOFMatched", false, "Vertex TOF Matched"};
9999

100+
Configurable<bool> isApplyhasFT0{"isApplyhasFT0", false, "Apply has_foundFT0 event selection"};
101+
100102
// check
101103
Configurable<bool> isApplyMCGenInelgt0{"isApplyMCGenInelgt0", true, "Apply INEL>0 cut in MC Gen Collisions"};
102104
Configurable<bool> isApplyMCGenTVX{"isApplyMCGenTVX", true, "Apply TVX cut in MC Gen Collisions"};
@@ -156,10 +158,10 @@ struct Kstar892LightIon {
156158
// Fixed variables
157159
float lowPtCutPID = 0.5;
158160

159-
Configurable<bool> selHasFT0{"selHasFT0", true, "Has FT0?"};
161+
Configurable<bool> selHasFT0MC{"selHasFT0MC", true, "Has FT0?"};
160162
Configurable<bool> isZvtxPosSelMC{"isZvtxPosSelMC", true, "Zvtx position selection for MC events?"};
161163
Configurable<bool> selTVXMC{"selTVXMC", true, "apply TVX selection in MC?"};
162-
Configurable<bool> selINELgt0{"selINELgt0", true, "Select INEL > 0?"};
164+
Configurable<bool> selINELgt0MC{"selINELgt0MC", true, "Select INEL > 0?"};
163165
} selectionConfig;
164166

165167
Configurable<bool> calcLikeSign{"calcLikeSign", true, "Calculate Like Sign"};
@@ -252,7 +254,9 @@ struct Kstar892LightIon {
252254
std::string("kIsGoodZvtxFT0vsPV") + check(selectionConfig.isGoodZvtxFT0vsPV.value),
253255
std::string("isVertexITSTPC") + check(selectionConfig.isVertexITSTPC.value),
254256
std::string("isVertexTOFMatched") + check(selectionConfig.isVertexTOFMatched.value),
255-
std::string("INEL > 0") + check(selectionConfig.isApplyINELgt0.value)};
257+
std::string("INEL > 0") + check(selectionConfig.isApplyINELgt0.value),
258+
std::string("hasFT0") + check(selectionConfig.isApplyhasFT0.value)};
259+
256260
// assign labels
257261
for (size_t i = 0; i < eveCutLabels.size(); ++i) {
258262
hEventSelection.get<TH1>(HIST("hEventCut"))->GetXaxis()->SetBinLabel(i + 1, eveCutLabels[i].c_str());
@@ -499,6 +503,12 @@ struct Kstar892LightIon {
499503
if (fillHist)
500504
hEventSelection.fill(HIST("hEventCut"), 14);
501505

506+
if (selectionConfig.isApplyhasFT0 && !collision.has_foundFT0()) {
507+
return false;
508+
}
509+
if (fillHist)
510+
hEventSelection.fill(HIST("hEventCut"), 15);
511+
502512
return true;
503513
}
504514

@@ -2124,7 +2134,7 @@ struct Kstar892LightIon {
21242134
//---------------------------
21252135
// Only INEL > 0 generated events
21262136
//---------------------------
2127-
if (selectionConfig.selINELgt0) {
2137+
if (selectionConfig.selINELgt0MC) {
21282138
if (!(nChMC > ZeroInt)) {
21292139
return;
21302140
}
@@ -2157,7 +2167,7 @@ struct Kstar892LightIon {
21572167
centrality = collision.centFT0M(); // default
21582168
}
21592169

2160-
if (selectionConfig.selHasFT0 && !collision.has_foundFT0()) {
2170+
if (selectionConfig.selHasFT0MC && !collision.has_foundFT0()) {
21612171
continue;
21622172
}
21632173

@@ -2194,7 +2204,7 @@ struct Kstar892LightIon {
21942204
//---------------------------
21952205
// Reject collisions if has_foundFT0() returns false
21962206
//---------------------------
2197-
if (selectionConfig.selHasFT0 && !collision.has_foundFT0()) {
2207+
if (selectionConfig.selHasFT0MC && !collision.has_foundFT0()) {
21982208
hMC.fill(HIST("MCCheck/CentVsFoundFT0"), centrality, 0.5);
21992209
continue;
22002210
}

0 commit comments

Comments
 (0)