Skip to content

Commit 06388e0

Browse files
authored
Please consider the following formatting changes (#106)
1 parent 70b2a44 commit 06388e0

2 files changed

Lines changed: 70 additions & 70 deletions

File tree

PWGLF/TableProducer/cascademcfinder.cxx

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct cascademcfinder {
100100
histos.add("hPtXiPlusReconstructed", "hPtXiPlusReconstructed", kTH1F, {axisPt});
101101
histos.add("hPtOmegaMinusReconstructed", "hPtOmegaMinusReconstructed", kTH1F, {axisPt});
102102
histos.add("hPtOmegaPlusReconstructed", "hPtOmegaPlusReconstructed", kTH1F, {axisPt});
103-
103+
104104
histos.add("hPtXiMinusGlobal", "hPtXiMinusGlobal", kTH1F, {axisPt});
105105
histos.add("hPtXiPlusGlobal", "hPtXiPlusGlobal", kTH1F, {axisPt});
106106
histos.add("hPtOmegaMinusGlobal", "hPtOmegaMinusGlobal", kTH1F, {axisPt});
@@ -207,69 +207,69 @@ struct cascademcfinder {
207207
for (auto& mcParticle : mcParticles) {
208208
if (mcParticle.pdgCode() == 3312 && findXiMinus) {
209209
reconstructed = ProcessCascade(mcParticle, tracks, v0s, bestCollisionIndex, positiveITS, negativeITS, bachelorITS, positiveTPC, negativeTPC, bachelorTPC);
210-
bool reconstructed = false;
211-
for (auto& mcParticle : mcParticles) {
212-
if (mcParticle.pdgCode() == 3312 && findXiMinus) {
213-
reconstructed = ProcessCascade(mcParticle, tracks, v0s, bestCollisionIndex, positiveITS, negativeITS, bachelorITS);
214-
if (fabs(mcParticle.y()) < 0.5) {
215-
histos.fill(HIST("hPtXiMinusGenerated"), mcParticle.pt());
216-
if (reconstructed)
217-
histos.fill(HIST("hPtXiMinusReconstructed"), mcParticle.pt());
218-
if (reconstructed && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
219-
histos.fill(HIST("hPtXiMinusGlobal"), mcParticle.pt());
220-
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
221-
histos.fill(HIST("hPtXiMinusGlobalWithPV"), mcParticle.pt());
222-
}
223-
}
224-
if (mcParticle.pdgCode() == -3312 && findXiPlus) {
225-
reconstructed = ProcessCascade(mcParticle, tracks, v0s, bestCollisionIndex, positiveITS, negativeITS, bachelorITS, positiveTPC, negativeTPC, bachelorTPC);
226-
if (fabs(mcParticle.y()) < 0.5) {
227-
histos.fill(HIST("hPtXiPlusGenerated"), mcParticle.pt());
228-
if (reconstructed)
229-
histos.fill(HIST("hPtXiPlusReconstructed"), mcParticle.pt());
230-
if (reconstructed && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
231-
histos.fill(HIST("hPtXiPlusGlobal"), mcParticle.pt());
232-
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
233-
histos.fill(HIST("hPtXiPlusGlobalWithPV"), mcParticle.pt());
234-
}
235-
}
236-
if (mcParticle.pdgCode() == 3334 && findOmegaMinus) {
237-
reconstructed = ProcessCascade(mcParticle, tracks, v0s, bestCollisionIndex, positiveITS, negativeITS, bachelorITS, positiveTPC, negativeTPC, bachelorTPC);
238-
if (fabs(mcParticle.y()) < 0.5) {
239-
histos.fill(HIST("hPtOmegaMinusGenerated"), mcParticle.pt());
240-
if (reconstructed)
241-
histos.fill(HIST("hPtOmegaMinusReconstructed"), mcParticle.pt());
242-
if (reconstructed && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
243-
histos.fill(HIST("hPtOmegaMinusGlobal"), mcParticle.pt());
244-
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
245-
histos.fill(HIST("hPtOmegaMinusGlobalWithPV"), mcParticle.pt());
246-
}
247-
}
248-
if (mcParticle.pdgCode() == -3334 && findOmegaPlus) {
249-
reconstructed = ProcessCascade(mcParticle, tracks, v0s, bestCollisionIndex, positiveITS, negativeITS, bachelorITS, positiveTPC, negativeTPC, bachelorTPC);
250-
if (fabs(mcParticle.y()) < 0.5) {
251-
histos.fill(HIST("hPtOmegaPlusGenerated"), mcParticle.pt());
252-
if (reconstructed)
253-
histos.fill(HIST("hPtOmegaPlusReconstructed"), mcParticle.pt());
254-
if (reconstructed && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
255-
histos.fill(HIST("hPtOmegaPlusGlobal"), mcParticle.pt());
256-
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
257-
histos.fill(HIST("hPtOmegaPlusGlobalWithPV"), mcParticle.pt());
210+
bool reconstructed = false;
211+
for (auto& mcParticle : mcParticles) {
212+
if (mcParticle.pdgCode() == 3312 && findXiMinus) {
213+
reconstructed = ProcessCascade(mcParticle, tracks, v0s, bestCollisionIndex, positiveITS, negativeITS, bachelorITS);
214+
if (fabs(mcParticle.y()) < 0.5) {
215+
histos.fill(HIST("hPtXiMinusGenerated"), mcParticle.pt());
216+
if (reconstructed)
217+
histos.fill(HIST("hPtXiMinusReconstructed"), mcParticle.pt());
218+
if (reconstructed && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
219+
histos.fill(HIST("hPtXiMinusGlobal"), mcParticle.pt());
220+
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
221+
histos.fill(HIST("hPtXiMinusGlobalWithPV"), mcParticle.pt());
222+
}
223+
}
224+
if (mcParticle.pdgCode() == -3312 && findXiPlus) {
225+
reconstructed = ProcessCascade(mcParticle, tracks, v0s, bestCollisionIndex, positiveITS, negativeITS, bachelorITS, positiveTPC, negativeTPC, bachelorTPC);
226+
if (fabs(mcParticle.y()) < 0.5) {
227+
histos.fill(HIST("hPtXiPlusGenerated"), mcParticle.pt());
228+
if (reconstructed)
229+
histos.fill(HIST("hPtXiPlusReconstructed"), mcParticle.pt());
230+
if (reconstructed && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
231+
histos.fill(HIST("hPtXiPlusGlobal"), mcParticle.pt());
232+
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
233+
histos.fill(HIST("hPtXiPlusGlobalWithPV"), mcParticle.pt());
234+
}
235+
}
236+
if (mcParticle.pdgCode() == 3334 && findOmegaMinus) {
237+
reconstructed = ProcessCascade(mcParticle, tracks, v0s, bestCollisionIndex, positiveITS, negativeITS, bachelorITS, positiveTPC, negativeTPC, bachelorTPC);
238+
if (fabs(mcParticle.y()) < 0.5) {
239+
histos.fill(HIST("hPtOmegaMinusGenerated"), mcParticle.pt());
240+
if (reconstructed)
241+
histos.fill(HIST("hPtOmegaMinusReconstructed"), mcParticle.pt());
242+
if (reconstructed && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
243+
histos.fill(HIST("hPtOmegaMinusGlobal"), mcParticle.pt());
244+
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
245+
histos.fill(HIST("hPtOmegaMinusGlobalWithPV"), mcParticle.pt());
246+
}
247+
}
248+
if (mcParticle.pdgCode() == -3334 && findOmegaPlus) {
249+
reconstructed = ProcessCascade(mcParticle, tracks, v0s, bestCollisionIndex, positiveITS, negativeITS, bachelorITS, positiveTPC, negativeTPC, bachelorTPC);
250+
if (fabs(mcParticle.y()) < 0.5) {
251+
histos.fill(HIST("hPtOmegaPlusGenerated"), mcParticle.pt());
252+
if (reconstructed)
253+
histos.fill(HIST("hPtOmegaPlusReconstructed"), mcParticle.pt());
254+
if (reconstructed && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
255+
histos.fill(HIST("hPtOmegaPlusGlobal"), mcParticle.pt());
256+
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && bachelorITS && positiveTPC && negativeTPC && bachelorTPC)
257+
histos.fill(HIST("hPtOmegaPlusGlobalWithPV"), mcParticle.pt());
258+
}
259+
}
258260
}
259261
}
260-
}
261-
}
262262

263-
// sort according to collision ID
264-
auto sortedIndices = sort_indices(casccollisionId);
263+
// sort according to collision ID
264+
auto sortedIndices = sort_indices(casccollisionId);
265265

266-
// V0 list established, populate
267-
for (auto ic : sortedIndices) {
268-
if (casccollisionId[ic] >= 0) {
269-
cascades(casccollisionId[ic], cascv0Index[ic], cascbachelorIndex[ic]);
266+
// V0 list established, populate
267+
for (auto ic : sortedIndices) {
268+
if (casccollisionId[ic] >= 0) {
269+
cascades(casccollisionId[ic], cascv0Index[ic], cascbachelorIndex[ic]);
270+
}
271+
}
270272
}
271-
}
272-
}
273273
};
274274

275275
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

PWGLF/TableProducer/lambdakzeromcfinder.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ struct lambdakzeromcfinder {
168168
}
169169
}
170170
}
171-
if (trackIndexPositive >= 0 && trackIndexNegative >= 0 && (!requireITS || (requireITS && positiveITS && negativeITS ))) {
171+
if (trackIndexPositive >= 0 && trackIndexNegative >= 0 && (!requireITS || (requireITS && positiveITS && negativeITS))) {
172172
reconstructed = true;
173173
v0collisionId.emplace_back(bestCollisionIndex);
174174
v0positiveIndex.emplace_back(trackIndexPositive);
@@ -204,9 +204,9 @@ struct lambdakzeromcfinder {
204204
histos.fill(HIST("hPtK0ShortGenerated"), mcParticle.pt());
205205
if (reconstructed)
206206
histos.fill(HIST("hPtK0ShortReconstructed"), mcParticle.pt());
207-
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC )
207+
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC)
208208
histos.fill(HIST("hPtK0ShortGlobal"), mcParticle.pt());
209-
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC )
209+
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC)
210210
histos.fill(HIST("hPtK0ShortGlobalWithPV"), mcParticle.pt());
211211
}
212212
}
@@ -216,9 +216,9 @@ struct lambdakzeromcfinder {
216216
histos.fill(HIST("hPtLambdaGenerated"), mcParticle.pt());
217217
if (reconstructed)
218218
histos.fill(HIST("hPtLambdaReconstructed"), mcParticle.pt());
219-
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC )
219+
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC)
220220
histos.fill(HIST("hPtLambdaGlobal"), mcParticle.pt());
221-
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC )
221+
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC)
222222
histos.fill(HIST("hPtLambdaGlobalWithPV"), mcParticle.pt());
223223
}
224224
}
@@ -228,9 +228,9 @@ struct lambdakzeromcfinder {
228228
histos.fill(HIST("hPtAntiLambdaGenerated"), mcParticle.pt());
229229
if (reconstructed)
230230
histos.fill(HIST("hPtAntiLambdaReconstructed"), mcParticle.pt());
231-
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC )
231+
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC)
232232
histos.fill(HIST("hPtAntiLambdaGlobal"), mcParticle.pt());
233-
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC )
233+
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC)
234234
histos.fill(HIST("hPtAntiLambdaGlobalWithPV"), mcParticle.pt());
235235
}
236236
}
@@ -240,9 +240,9 @@ struct lambdakzeromcfinder {
240240
histos.fill(HIST("hPtHyperTritonGenerated"), mcParticle.pt());
241241
if (reconstructed)
242242
histos.fill(HIST("hPtHyperTritonReconstructed"), mcParticle.pt());
243-
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC )
243+
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC)
244244
histos.fill(HIST("hPtHyperTritonGlobal"), mcParticle.pt());
245-
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC )
245+
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC)
246246
histos.fill(HIST("hPtHyperTritonGlobalWithPV"), mcParticle.pt());
247247
}
248248
}
@@ -252,9 +252,9 @@ struct lambdakzeromcfinder {
252252
histos.fill(HIST("hPtAntiHyperTritonGenerated"), mcParticle.pt());
253253
if (reconstructed)
254254
histos.fill(HIST("hPtAntiHyperTritonReconstructed"), mcParticle.pt());
255-
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC )
255+
if (reconstructed && positiveITS && negativeITS && positiveTPC && negativeTPC)
256256
histos.fill(HIST("hPtAntiHyperTritonGlobal"), mcParticle.pt());
257-
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC )
257+
if (reconstructed && bestCollisionIndex >= 0 && positiveITS && negativeITS && positiveTPC && negativeTPC)
258258
histos.fill(HIST("hPtAntiHyperTritonGlobalWithPV"), mcParticle.pt());
259259
}
260260
}

0 commit comments

Comments
 (0)