Skip to content

Commit df16c73

Browse files
authored
[PWGJE] Adding MCP level collision output table to substructure task (AliceO2Group#9351)
1 parent 9f0f3ce commit df16c73

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

PWGJE/Tasks/jetSubstructureHFOutput.cxx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,17 @@ struct JetSubstructureHFOutputTask {
166166
if (candidateTableIndex != candidateMap.end()) {
167167
candidateIndex = candidateTableIndex->second;
168168
}
169-
if constexpr (!isMCP) {
170-
if (nJetInCollision == 0) {
171-
collisionOutputTable(collision.posZ(), collision.centrality(), collision.eventSel(), eventWeight);
172-
collisionIndex = collisionOutputTable.lastIndex();
169+
if (nJetInCollision == 0) {
170+
float centrality = -1.0;
171+
uint8_t eventSel = 0.0;
172+
if constexpr (!isMCP) {
173+
centrality = collision.centrality();
174+
eventSel = collision.eventSel();
173175
}
174-
nJetInCollision++;
176+
collisionOutputTable(collision.posZ(), centrality, eventSel, eventWeight);
177+
collisionIndex = collisionOutputTable.lastIndex();
175178
}
179+
nJetInCollision++;
176180
fillJetTables(jet, candidate, collisionIndex, candidateIndex, jetOutputTable, jetSubstructureOutputTable, jetMap);
177181
}
178182
}

PWGJE/Tasks/jetSubstructureOutput.cxx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct JetSubstructureOutputTask {
110110
jetMapping.insert(std::make_pair(jet.globalIndex(), jetOutputTable.lastIndex()));
111111
}
112112

113-
template <bool isMc, typename T, typename U, typename V, typename M, typename N>
113+
template <bool isMCP, typename T, typename U, typename V, typename M, typename N>
114114
void analyseCharged(T const& collision, U const& jets, V& collisionOutputTable, M& jetOutputTable, N& jetSubstructureOutputTable, std::map<int32_t, int32_t>& jetMapping, float jetPtMin, float eventWeight)
115115
{
116116
int nJetInCollision = 0;
@@ -124,13 +124,17 @@ struct JetSubstructureOutputTask {
124124
}
125125
for (const auto& jetRadiiValue : jetRadiiValues) {
126126
if (jet.r() == round(jetRadiiValue * 100.0f)) {
127-
if constexpr (!isMc) {
128-
if (nJetInCollision == 0) {
129-
collisionOutputTable(collision.posZ(), collision.centrality(), collision.eventSel(), eventWeight);
130-
collisionIndex = collisionOutputTable.lastIndex();
127+
if (nJetInCollision == 0) {
128+
float centrality = -1.0;
129+
uint8_t eventSel = 0.0;
130+
if constexpr (!isMCP) {
131+
centrality = collision.centrality();
132+
eventSel = collision.eventSel();
131133
}
132-
nJetInCollision++;
134+
collisionOutputTable(collision.posZ(), centrality, eventSel, eventWeight);
135+
collisionIndex = collisionOutputTable.lastIndex();
133136
}
137+
nJetInCollision++;
134138
fillJetTables(jet, collisionIndex, jetOutputTable, jetSubstructureOutputTable, jetMapping);
135139
}
136140
}

0 commit comments

Comments
 (0)