Skip to content

Commit 6ec3aa8

Browse files
Merge pull request #17 from alibuild/alibot-cleanup-8489
Please consider the following formatting changes to AliceO2Group#8489
2 parents b5dfdca + d25ca35 commit 6ec3aa8

File tree

3 files changed

+111
-103
lines changed

3 files changed

+111
-103
lines changed

PWGLF/DataModel/LFSigmaTables.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ DECLARE_SOA_TABLE(Sigma0Cores, "AOD", "SIGMA0CORES",
5454
sigma0Core::SigmapT,
5555
sigma0Core::SigmaMass,
5656
sigma0Core::SigmaRapidity,
57-
sigma0Core::SigmaOPAngle,
58-
sigma0Core::SigmaDeltaEta,
57+
sigma0Core::SigmaOPAngle,
58+
sigma0Core::SigmaDeltaEta,
5959
sigma0Core::SigmaDeltaPhi);
6060

6161
DECLARE_SOA_TABLE(Sigma0CollRefs, "AOD", "SIGMA0COLLREF", //! optional table to refer back to a collision
@@ -149,8 +149,8 @@ DECLARE_SOA_COLUMN(LambdaPosPrTPCNSigma, lambdaPosPrTPCNSigma, float);
149149
DECLARE_SOA_COLUMN(LambdaPosPiTPCNSigma, lambdaPosPiTPCNSigma, float);
150150
DECLARE_SOA_COLUMN(LambdaNegPrTPCNSigma, lambdaNegPrTPCNSigma, float);
151151
DECLARE_SOA_COLUMN(LambdaNegPiTPCNSigma, lambdaNegPiTPCNSigma, float);
152-
DECLARE_SOA_COLUMN(LambdaPrTOFNSigma , lambdaPrTOFNSigma , float);
153-
DECLARE_SOA_COLUMN(LambdaPiTOFNSigma , lambdaPiTOFNSigma , float);
152+
DECLARE_SOA_COLUMN(LambdaPrTOFNSigma, lambdaPrTOFNSigma, float);
153+
DECLARE_SOA_COLUMN(LambdaPiTOFNSigma, lambdaPiTOFNSigma, float);
154154
DECLARE_SOA_COLUMN(ALambdaPrTOFNSigma, aLambdaPrTOFNSigma, float);
155155
DECLARE_SOA_COLUMN(ALambdaPiTOFNSigma, aLambdaPiTOFNSigma, float);
156156
DECLARE_SOA_COLUMN(LambdaPosTPCCrossedRows, lambdaPosTPCCrossedRows, uint8_t);
@@ -238,4 +238,4 @@ DECLARE_SOA_TABLE(SigmaMCCores, "AOD", "SIGMA0MCCORES",
238238
sigmaMCCore::IsLambdaCandPrimary);
239239
} // namespace o2::aod
240240

241-
#endif // PWGLF_DATAMODEL_LFSIGMATABLES_H_
241+
#endif // PWGLF_DATAMODEL_LFSIGMATABLES_H_

PWGLF/TableProducer/Strangeness/sigma0builder.cxx

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct sigma0builder {
9191
Configurable<float> LambdaMinv0radius{"LambdaMinv0radius", 0.0, "Min V0 radius (cm)"};
9292
Configurable<float> LambdaMaxv0radius{"LambdaMaxv0radius", 60, "Max V0 radius (cm)"};
9393
Configurable<float> LambdaWindow{"LambdaWindow", 0.05, "Mass window around expected (in GeV/c2)"};
94-
94+
9595
//// Photon criteria:
9696
Configurable<float> PhotonMaxDauPseudoRap{"PhotonMaxDauPseudoRap", 1.5, "Max pseudorapidity of daughter tracks"};
9797
Configurable<float> PhotonMinDCAToPv{"PhotonMinDCAToPv", 0.0, "Min DCA daughter To PV (cm)"};
@@ -176,7 +176,7 @@ struct sigma0builder {
176176
histos.add("GeneralQA/h2dMassGammaVsK0SAfterMassSel", "h2dMassGammaVsK0SAfterMassSel", kTH2D, {axisPhotonMass, {200, 0.4f, 0.6f}});
177177
histos.add("GeneralQA/h2dMassLambdaVsK0SAfterMassSel", "h2dMassLambdaVsK0SAfterMassSel", kTH2D, {axisLambdaMass, {200, 0.4f, 0.6f}});
178178
histos.add("GeneralQA/h2dMassGammaVsLambdaAfterMassSel", "h2dMassGammaVsLambdaAfterMassSel", kTH2D, {axisPhotonMass, axisLambdaMass});
179-
179+
180180
// MC
181181
histos.add("MC/h2dPtVsCentrality_GammaBeforeSel", "h2dPtVsCentrality_GammaBeforeSel", kTH2D, {axisCentrality, axisPt});
182182
histos.add("MC/h2dPtVsCentrality_LambdaBeforeSel", "h2dPtVsCentrality_LambdaBeforeSel", kTH2D, {axisCentrality, axisPt});
@@ -190,14 +190,14 @@ struct sigma0builder {
190190
histos.add("MC/h2dPtVsCentrality_LambdaAntiSigma0", "h2dPtVsCentrality_LambdaAntiSigma0", kTH2D, {axisCentrality, axisPt});
191191
histos.add("MC/h2dPtVsCentrality_AntiSigma0AfterSel", "h2dPtVsCentrality_AntiSigma0AfterSel", kTH2D, {axisCentrality, axisPt});
192192

193-
// Sigma vs Daughters pT
193+
// Sigma vs Daughters pT
194194
histos.add("MC/h2dSigmaPtVsLambdaPt", "h2dSigmaPtVsLambdaPt", kTH2D, {axisPt, axisPt});
195195
histos.add("MC/h2dSigmaPtVsGammaPt", "h2dSigmaPtVsGammaPt", kTH2D, {axisPt, axisPt});
196196

197197
// pT Resolution:
198198
histos.add("MC/h2dLambdaPtResolution", "h2dLambdaPtResolution", kTH2D, {axisPt, axisDeltaPt});
199199
histos.add("MC/h2dGammaPtResolution", "h2dGammaPtResolution", kTH2D, {axisPt, axisDeltaPt});
200-
200+
201201
// For background decomposition
202202
histos.add("MC/h2dPtVsMassSigma_All", "h2dPtVsMassSigma_All", kTH2D, {axisPt, axisSigmaMass});
203203
histos.add("MC/h2dPtVsMassSigma_SignalOnly", "h2dPtVsMassSigma_SignalOnly", kTH2D, {axisPt, axisSigmaMass});
@@ -220,10 +220,10 @@ struct sigma0builder {
220220
{
221221
if ((lambda.v0Type() == 0) || (gamma.v0Type() == 0))
222222
return false;
223-
223+
224224
// Checking if both V0s are made of the very same tracks
225225
if ((gamma.posTrackExtraId() == lambda.posTrackExtraId()) || (gamma.negTrackExtraId() == lambda.negTrackExtraId()) || (gamma.posTrackExtraId() == lambda.negTrackExtraId()) || (gamma.negTrackExtraId() == lambda.posTrackExtraId()) || (gamma.posTrackExtraId() == lambda.negTrackExtraId()))
226-
return false;
226+
return false;
227227

228228
if constexpr (
229229
requires { gamma.gammaBDTScore(); } &&
@@ -305,35 +305,39 @@ struct sigma0builder {
305305
histos.fill(HIST("GeneralQA/h2dMassLambdaVsK0S"), lambda.mLambda(), lambda.mK0Short());
306306
histos.fill(HIST("GeneralQA/h2dMassGammaVsLambda"), gamma.mGamma(), lambda.mLambda());
307307
histos.fill(HIST("GeneralQA/h3dMassSigma0VsDaupTs"), gamma.pt(), lambda.pt(), sigmamass);
308-
308+
309309
if constexpr (requires { gamma.pdgCode(); } && requires { lambda.pdgCode(); }) {
310310

311311
histos.fill(HIST("MC/h2dPtVsMassSigma_All"), SigmapT, sigmamass);
312312

313313
// Real Gamma x Real Lambda - but not from the same sigma0/antisigma0!
314-
if ((gamma.pdgCode() == 22) && ((lambda.pdgCode() == 3122) || (lambda.pdgCode() == -3122)) && (gamma.motherMCPartId() != lambda.motherMCPartId())){
314+
if ((gamma.pdgCode() == 22) && ((lambda.pdgCode() == 3122) || (lambda.pdgCode() == -3122)) && (gamma.motherMCPartId() != lambda.motherMCPartId())) {
315315
histos.fill(HIST("MC/h2dPtVsMassSigma_TrueDaughters"), SigmapT, sigmamass);
316-
histos.fill(HIST("MC/h2dTrueDaughtersMatrix"), lambda.pdgCodeMother(), gamma.pdgCodeMother());}
317-
316+
histos.fill(HIST("MC/h2dTrueDaughtersMatrix"), lambda.pdgCodeMother(), gamma.pdgCodeMother());
317+
}
318+
318319
// Real Gamma x fake Lambda
319-
if ((gamma.pdgCode() == 22) && (lambda.pdgCode() != 3122) && (lambda.pdgCode() != -3122)){
320+
if ((gamma.pdgCode() == 22) && (lambda.pdgCode() != 3122) && (lambda.pdgCode() != -3122)) {
320321
histos.fill(HIST("MC/h2dPtVsMassSigma_TrueGammaFakeLambda"), SigmapT, sigmamass);
321-
histos.fill(HIST("MC/h2dTrueGammaFakeLambdaMatrix"), lambda.pdgCodeMother(), gamma.pdgCodeMother());}
322-
322+
histos.fill(HIST("MC/h2dTrueGammaFakeLambdaMatrix"), lambda.pdgCodeMother(), gamma.pdgCodeMother());
323+
}
324+
323325
// Fake Gamma x Real Lambda
324-
if ((gamma.pdgCode() != 22) && ((lambda.pdgCode() == 3122) || (lambda.pdgCode() == -3122))){
326+
if ((gamma.pdgCode() != 22) && ((lambda.pdgCode() == 3122) || (lambda.pdgCode() == -3122))) {
325327
histos.fill(HIST("MC/h2dPtVsMassSigma_FakeGammaTrueLambda"), SigmapT, sigmamass);
326-
histos.fill(HIST("MC/h2dFakeGammaTrueLambdaMatrix"), lambda.pdgCodeMother(), gamma.pdgCodeMother());}
327-
328+
histos.fill(HIST("MC/h2dFakeGammaTrueLambdaMatrix"), lambda.pdgCodeMother(), gamma.pdgCodeMother());
329+
}
330+
328331
// Fake Gamma x Fake Lambda
329-
if ((gamma.pdgCode() != 22) && (lambda.pdgCode() != 3122) && (lambda.pdgCode() != -3122)){
330-
histos.fill(HIST("MC/h2dPtVsMassSigma_FakeDaughters"), SigmapT, sigmamass);
331-
histos.fill(HIST("MC/h2dFakeDaughtersMatrix"), lambda.pdgCodeMother(), gamma.pdgCodeMother());}
332+
if ((gamma.pdgCode() != 22) && (lambda.pdgCode() != 3122) && (lambda.pdgCode() != -3122)) {
333+
histos.fill(HIST("MC/h2dPtVsMassSigma_FakeDaughters"), SigmapT, sigmamass);
334+
histos.fill(HIST("MC/h2dFakeDaughtersMatrix"), lambda.pdgCodeMother(), gamma.pdgCodeMother());
335+
}
332336
}
333337

334338
if (TMath::Abs(sigmamass - 1.192642) > Sigma0Window)
335339
return false;
336-
340+
337341
histos.fill(HIST("GeneralQA/h2dMassGammaVsK0SAfterMassSel"), gamma.mGamma(), gamma.mK0Short());
338342
histos.fill(HIST("GeneralQA/h2dMassLambdaVsK0SAfterMassSel"), lambda.mLambda(), lambda.mK0Short());
339343
histos.fill(HIST("GeneralQA/h2dMassGammaVsLambdaAfterMassSel"), gamma.mGamma(), lambda.mLambda());
@@ -464,8 +468,8 @@ struct sigma0builder {
464468
sigmaCandidate.pT = RecoDecay::pt(array{gamma.px() + lambda.px(), gamma.py() + lambda.py()});
465469
sigmaCandidate.Rapidity = RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, o2::constants::physics::MassSigma0);
466470
sigmaCandidate.OPAngle = v1.Angle(v2);
467-
sigmaCandidate.DeltaEta = fLambdaEta-fPhotonEta;
468-
sigmaCandidate.DeltaPhi = fLambdaPhi-fPhotonPhi;
471+
sigmaCandidate.DeltaEta = fLambdaEta - fPhotonEta;
472+
sigmaCandidate.DeltaPhi = fLambdaPhi - fPhotonPhi;
469473

470474
// Sigma related
471475
float fSigmapT = sigmaCandidate.pT;
@@ -489,9 +493,9 @@ struct sigma0builder {
489493
sigmaLambdaExtras(fLambdaPt, fLambdaMass, fAntiLambdaMass, fLambdaQt, fLambdaAlpha,
490494
fLambdaRadius, fLambdaCosPA, fLambdaDCADau, fLambdaDCANegPV,
491495
fLambdaDCAPosPV, fLambdaEta, fLambdaY, fLambdaPhi, fLambdaPosPrTPCNSigma,
492-
fLambdaPosPiTPCNSigma, fLambdaNegPrTPCNSigma, fLambdaNegPiTPCNSigma,
496+
fLambdaPosPiTPCNSigma, fLambdaNegPrTPCNSigma, fLambdaNegPiTPCNSigma,
493497
fLambdaPrTOFNSigma, fLambdaPiTOFNSigma, fALambdaPrTOFNSigma, fALambdaPiTOFNSigma,
494-
fLambdaPosTPCCrossedRows,fLambdaNegTPCCrossedRows, fLambdaPosPt, fLambdaNegPt, fLambdaPosEta,
498+
fLambdaPosTPCCrossedRows, fLambdaNegTPCCrossedRows, fLambdaPosPt, fLambdaNegPt, fLambdaPosEta,
495499
fLambdaNegEta, fLambdaPosPrY, fLambdaPosPiY, fLambdaNegPrY, fLambdaNegPiY,
496500
fLambdaPosITSCls, fLambdaNegITSCls, fLambdaPosITSClSize, fLambdaNegITSClSize,
497501
fLambdaV0Type, LambdaBDTScore, AntiLambdaBDTScore);
@@ -505,16 +509,16 @@ struct sigma0builder {
505509
auto V0Table_thisCollision = V0s.sliceBy(perCollisionMCDerived, collIdx);
506510

507511
// V0 table sliced
508-
for (auto& gamma : V0Table_thisCollision) { // selecting photons from Sigma0
512+
for (auto& gamma : V0Table_thisCollision) { // selecting photons from Sigma0
509513
float centrality = coll.centFT0C();
510514

511515
// Auxiliary histograms:
512516
if (gamma.pdgCode() == 22) {
513517
float GammaY = TMath::Abs(RecoDecay::y(std::array{gamma.px(), gamma.py(), gamma.pz()}, o2::constants::physics::MassGamma));
514518

515519
if (GammaY < 0.5) { // rapidity selection
516-
histos.fill(HIST("MC/h2dPtVsCentrality_GammaBeforeSel"), centrality, gamma.pt()); // isgamma
517-
histos.fill(HIST("MC/h2dGammaPtResolution"), gamma.pt(), gamma.pt() - RecoDecay::pt(array{gamma.pxMC(), gamma.pyMC()})); // pT resolution
520+
histos.fill(HIST("MC/h2dPtVsCentrality_GammaBeforeSel"), centrality, gamma.pt()); // isgamma
521+
histos.fill(HIST("MC/h2dGammaPtResolution"), gamma.pt(), gamma.pt() - RecoDecay::pt(array{gamma.pxMC(), gamma.pyMC()})); // pT resolution
518522

519523
if (gamma.pdgCodeMother() == 3212) {
520524
histos.fill(HIST("MC/h2dPtVsCentrality_GammaSigma0"), centrality, gamma.pt()); // isgamma from sigma
@@ -567,11 +571,11 @@ struct sigma0builder {
567571
bool fIsSigma = false;
568572
bool fIsAntiSigma = false;
569573
bool fIsPhotonPrimary = gamma.isPhysicalPrimary();
570-
int PhotonCandPDGCode = gamma.pdgCode();
571-
int PhotonCandPDGCodeMother = gamma.pdgCodeMother();
574+
int PhotonCandPDGCode = gamma.pdgCode();
575+
int PhotonCandPDGCodeMother = gamma.pdgCodeMother();
572576
bool fIsLambdaPrimary = lambda.isPhysicalPrimary();
573-
int LambdaCandPDGCode = lambda.pdgCode();
574-
int LambdaCandPDGCodeMother = lambda.pdgCodeMother();
577+
int LambdaCandPDGCode = lambda.pdgCode();
578+
int LambdaCandPDGCodeMother = lambda.pdgCodeMother();
575579

576580
if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == 3212) && (lambda.pdgCode() == 3122) && (lambda.pdgCodeMother() == 3212) && (gamma.motherMCPartId() == lambda.motherMCPartId())) {
577581
fIsSigma = true;
@@ -580,17 +584,16 @@ struct sigma0builder {
580584
if ((gamma.pdgCode() == 22) && (gamma.pdgCodeMother() == -3212) && (lambda.pdgCode() == -3122) && (lambda.pdgCodeMother() == -3212) && (gamma.motherMCPartId() == lambda.motherMCPartId())) {
581585
fIsAntiSigma = true;
582586
histos.fill(HIST("MC/h2dPtVsCentrality_AntiSigma0AfterSel"), centrality, RecoDecay::pt(array{gamma.px() + lambda.px(), gamma.py() + lambda.py()}));
583-
// TH3D Mass histogram
587+
// TH3D Mass histogram
584588
}
585-
sigma0mccores(fIsSigma, fIsAntiSigma,
586-
PhotonCandPDGCode, PhotonCandPDGCodeMother, fIsPhotonPrimary,
589+
sigma0mccores(fIsSigma, fIsAntiSigma,
590+
PhotonCandPDGCode, PhotonCandPDGCodeMother, fIsPhotonPrimary,
587591
LambdaCandPDGCode, LambdaCandPDGCodeMother, fIsLambdaPrimary);
588592

589593
// QA histograms
590594
// Signal only (sigma0+antisigma0)
591595
if (fIsSigma || fIsAntiSigma)
592596
histos.fill(HIST("MC/h2dPtVsMassSigma_SignalOnly"), SigmapT, SigmaMass);
593-
594597
}
595598
}
596599
}
@@ -668,4 +671,5 @@ struct sigma0builder {
668671
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
669672
{
670673
return WorkflowSpec{adaptAnalysisTask<sigma0builder>(cfgc)};
671-
}
674+
}
675+

0 commit comments

Comments
 (0)