Skip to content

Commit 5aa0d39

Browse files
committed
Please consider the following formatting changes
1 parent 81a9f05 commit 5aa0d39

File tree

2 files changed

+33
-35
lines changed

2 files changed

+33
-35
lines changed

PWGLF/TableProducer/Strangeness/sigma0builder.cxx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,16 @@ struct sigma0builder {
231231
histos.add("h3dMassSigmasBeforeSel", "h3dMassSigmasBeforeSel", kTH3F, {axisCentrality, axisPt, axisSigmaMass});
232232
histos.add("h3dMassSigmasAfterSel", "h3dMassSigmasAfterSel", kTH3F, {axisCentrality, axisPt, axisSigmaMass});
233233
}
234-
template <typename TV0Object>
235-
void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) {
234+
template <typename TV0Object>
235+
void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2)
236+
{
236237

237238
// Check if both V0s are made of the same tracks
238-
if (gamma1.posTrackExtraId() == gamma2.posTrackExtraId() ||
239-
gamma1.negTrackExtraId() == gamma2.negTrackExtraId() ||
240-
gamma1.posTrackExtraId() == gamma2.negTrackExtraId() ||
239+
if (gamma1.posTrackExtraId() == gamma2.posTrackExtraId() ||
240+
gamma1.negTrackExtraId() == gamma2.negTrackExtraId() ||
241+
gamma1.posTrackExtraId() == gamma2.negTrackExtraId() ||
241242
gamma1.negTrackExtraId() == gamma2.posTrackExtraId()) {
242-
return;
243+
return;
243244
}
244245

245246
// Calculate pi0 properties
@@ -255,15 +256,15 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) {
255256

256257
// Check if MC data and populate fIsMC, fIsPi0
257258
if constexpr (requires { gamma1.pdgCode(); gamma2.pdgCode(); }) {
258-
fIsMC = true;
259-
if (gamma1.pdgCode() == 22 && gamma2.pdgCode() == 22 &&
260-
gamma1.pdgCodeMother() == 111 && gamma2.pdgCodeMother() == 111 &&
261-
gamma1.motherMCPartId() == gamma2.motherMCPartId()) {
262-
fIsPi0 = true;
263-
histos.fill(HIST("MC/h2dPtVsMassPi0BeforeSel_SignalOnly"), pi0Pt, pi0Mass);
264-
}
259+
fIsMC = true;
260+
if (gamma1.pdgCode() == 22 && gamma2.pdgCode() == 22 &&
261+
gamma1.pdgCodeMother() == 111 && gamma2.pdgCodeMother() == 111 &&
262+
gamma1.motherMCPartId() == gamma2.motherMCPartId()) {
263+
fIsPi0 = true;
264+
histos.fill(HIST("MC/h2dPtVsMassPi0BeforeSel_SignalOnly"), pi0Pt, pi0Mass);
265+
}
265266
} else {
266-
histos.fill(HIST("GeneralQA/h2dPtVsMassPi0BeforeSel_Candidates"), pi0Pt, pi0Mass);
267+
histos.fill(HIST("GeneralQA/h2dPtVsMassPi0BeforeSel_Candidates"), pi0Pt, pi0Mass);
267268
}
268269

269270
// Photon-specific selections
@@ -290,7 +291,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) {
290291
posTrackGamma1.tpcCrossedRows() < Pi0PhotonMinTPCCrossedRows ||
291292
negTrackGamma1.tpcCrossedRows() < Pi0PhotonMinTPCCrossedRows ||
292293
!passedTPCGamma1) {
293-
return;
294+
return;
294295
}
295296

296297
// Gamma2 Selection
@@ -311,7 +312,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) {
311312
posTrackGamma2.tpcCrossedRows() < Pi0PhotonMinTPCCrossedRows ||
312313
negTrackGamma2.tpcCrossedRows() < Pi0PhotonMinTPCCrossedRows ||
313314
!passedTPCGamma2) {
314-
return;
315+
return;
315316
}
316317

317318
// Pi0-specific selections:
@@ -323,8 +324,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) {
323324
if (fIsMC) {
324325
if (fIsPi0)
325326
histos.fill(HIST("MC/h2dPtVsMassPi0AfterSel_SignalOnly"), pi0Pt, pi0Mass);
326-
}
327-
else
327+
} else
328328
histos.fill(HIST("GeneralQA/h2dPtVsMassPi0AfterSel_Candidates"), pi0Pt, pi0Mass);
329329
}
330330

@@ -464,7 +464,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) {
464464
histos.fill(HIST("hCandidateBuilderSelection"), 13.);
465465
return true;
466466
}
467-
467+
468468
// Fill tables with reconstructed sigma0 candidate
469469
template <typename TV0Object, typename TCollision>
470470
void fillTables(TV0Object const& lambda, TV0Object const& gamma, TCollision const& coll)
@@ -646,7 +646,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) {
646646
}
647647

648648
for (auto& lambda : V0Table_thisCollision) { // selecting lambdas from Sigma0
649-
if (doPi0QA) // Pi0 QA study
649+
if (doPi0QA) // Pi0 QA study
650650
runPi0QA(gamma, lambda);
651651

652652
// Sigma0 candidate properties
@@ -711,7 +711,7 @@ void runPi0QA(TV0Object const& gamma1, TV0Object const& gamma2) {
711711
// V0 table sliced
712712
for (auto& gamma : V0Table_thisCollision) { // selecting photons from Sigma0
713713
for (auto& lambda : V0Table_thisCollision) { // selecting lambdas from Sigma0
714-
if (doPi0QA) // Pi0 QA study
714+
if (doPi0QA) // Pi0 QA study
715715
runPi0QA(gamma, lambda);
716716

717717
// Sigma0 candidate properties

PWGLF/Tasks/Strangeness/sigmaanalysis.cxx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,11 @@ struct sigmaanalysis {
344344
return false;
345345
histos.fill(HIST("GeneralQA/hPhotonPosTPCNSigma"), cand.photonPosTPCNSigma());
346346
histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 6.);
347-
if ((cand.photonPosTPCNSigma()!=-999.f) && ((cand.photonPosTPCNSigma() < PhotonMinTPCNSigmas) || (cand.photonPosTPCNSigma() > PhotonMaxTPCNSigmas)))
347+
if ((cand.photonPosTPCNSigma() != -999.f) && ((cand.photonPosTPCNSigma() < PhotonMinTPCNSigmas) || (cand.photonPosTPCNSigma() > PhotonMaxTPCNSigmas)))
348348
return false;
349349
histos.fill(HIST("GeneralQA/hPhotonNegTPCNSigma"), cand.photonNegTPCNSigma());
350350
histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 7.);
351-
if ((cand.photonNegTPCNSigma()!=-999.f) && ((cand.photonNegTPCNSigma() < PhotonMinTPCNSigmas) || (cand.photonNegTPCNSigma() > PhotonMaxTPCNSigmas)))
351+
if ((cand.photonNegTPCNSigma() != -999.f) && ((cand.photonNegTPCNSigma() < PhotonMinTPCNSigmas) || (cand.photonNegTPCNSigma() > PhotonMaxTPCNSigmas)))
352352
return false;
353353
histos.fill(HIST("GeneralQA/hPhotonpT"), cand.photonPt());
354354
histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 8.);
@@ -428,7 +428,7 @@ struct sigmaanalysis {
428428
bool passedTPC = true;
429429
bool passedTOF = true;
430430

431-
if (isLambdalike){ // Lambda PID selection
431+
if (isLambdalike) { // Lambda PID selection
432432
// TPC Selection
433433
if (fselLambdaTPCPID && (cand.lambdaPosPrTPCNSigma() != -999.f) && (TMath::Abs(cand.lambdaPosPrTPCNSigma()) > LambdaMaxTPCNSigmas))
434434
passedTPC = false;
@@ -441,25 +441,24 @@ struct sigmaanalysis {
441441
if (fselLambdaTOFPID && (cand.lambdaPiTOFNSigma() != -1e+3) && (TMath::Abs(cand.lambdaPiTOFNSigma()) > LambdaMaxTOFNSigmas))
442442
passedTOF = false;
443443

444-
if constexpr (requires { cand.lambdaCandPDGCode(); }){
445-
if (doPIDQA && passedTPC){
444+
if constexpr (requires { cand.lambdaCandPDGCode(); }) {
445+
if (doPIDQA && passedTPC) {
446446
histos.fill(HIST("MC/hPtLambdaCandidates_passedTPCPID"), cand.lambdaPt());
447447
if (cand.lambdaCandPDGCode() == 3122)
448-
histos.fill(HIST("MC/hPtTrueLambda_passedTPCPID"), cand.lambdaPt());
448+
histos.fill(HIST("MC/hPtTrueLambda_passedTPCPID"), cand.lambdaPt());
449449
}
450-
if (doPIDQA && passedTOF){
450+
if (doPIDQA && passedTOF) {
451451
histos.fill(HIST("MC/hPtLambdaCandidates_passedTOFPID"), cand.lambdaPt());
452452
if (cand.lambdaCandPDGCode() == 3122)
453453
histos.fill(HIST("MC/hPtTrueLambda_passedTOFPID"), cand.lambdaPt());
454454
}
455-
if (doPIDQA && passedTPC && passedTOF){
455+
if (doPIDQA && passedTPC && passedTOF) {
456456
histos.fill(HIST("MC/hPtLambdaCandidates_passedTPCTOFPID"), cand.lambdaPt());
457457
if (cand.lambdaCandPDGCode() == 3122)
458458
histos.fill(HIST("MC/hPtTrueLambda_passedTPCTOFPID"), cand.lambdaPt());
459459
}
460460
}
461-
}
462-
else{ // AntiLambda PID selection
461+
} else { // AntiLambda PID selection
463462
// TPC Selection
464463
if (fselLambdaTPCPID && (cand.lambdaPosPiTPCNSigma() != -999.f) && (TMath::Abs(cand.lambdaPosPiTPCNSigma()) > LambdaMaxTPCNSigmas))
465464
passedTPC = false;
@@ -558,7 +557,7 @@ struct sigmaanalysis {
558557
histos.fill(HIST("MC/hMassSigma0"), sigma.sigmaMass());
559558
histos.fill(HIST("MC/hPtSigma0"), sigma.sigmapT());
560559
histos.fill(HIST("MC/h3dMassSigma0"), sigma.sigmaCentrality(), sigma.sigmapT(), sigma.sigmaMass());
561-
560+
562561
} else {
563562
// TPC + TOF PID Selections
564563
if (!doLambdaPIDSel(sigma, false, false))
@@ -606,9 +605,8 @@ struct sigmaanalysis {
606605
histos.fill(HIST("Sigma0/hMassSigma0"), sigma.sigmaMass());
607606
histos.fill(HIST("Sigma0/hPtSigma0"), sigma.sigmapT());
608607
histos.fill(HIST("Sigma0/hRapiditySigma0"), sigma.sigmaRapidity());
609-
histos.fill(HIST("Sigma0/h3dMassSigma0"), sigma.sigmaCentrality(), sigma.sigmapT(), sigma.sigmaMass());
610-
}
611-
else {
608+
histos.fill(HIST("Sigma0/h3dMassSigma0"), sigma.sigmaCentrality(), sigma.sigmapT(), sigma.sigmaMass());
609+
} else {
612610
// PID selections
613611
histos.fill(HIST("GeneralQA/h2dTPCvsTOFNSigma_ALambdaPr"), sigma.lambdaNegPrTPCNSigma(), sigma.aLambdaPrTOFNSigma());
614612
histos.fill(HIST("GeneralQA/h2dTPCvsTOFNSigma_ALambdaPi"), sigma.lambdaPosPiTPCNSigma(), sigma.aLambdaPiTOFNSigma());

0 commit comments

Comments
 (0)