Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions PWGLF/DataModel/LFSigmaTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
DECLARE_SOA_COLUMN(X, x, float);
DECLARE_SOA_COLUMN(Y, y, float);
DECLARE_SOA_COLUMN(Z, z, float);
DECLARE_SOA_COLUMN(DCADaughters, dcadaughters, float);

Check failure on line 41 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

DECLARE_SOA_COLUMN(PhotonPx, photonPx, float);
DECLARE_SOA_COLUMN(PhotonPy, photonPy, float);
Expand All @@ -49,7 +49,7 @@
DECLARE_SOA_COLUMN(LambdaPy, lambdaPy, float);
DECLARE_SOA_COLUMN(LambdaPz, lambdaPz, float);
DECLARE_SOA_COLUMN(LambdaMass, lambdaMass, float);
DECLARE_SOA_COLUMN(AntiLambdaMass, antilambdaMass, float);

Check failure on line 52 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

//______________________________________________________
// DYNAMIC COLUMNS
Expand Down Expand Up @@ -84,6 +84,11 @@
return RecoDecay::y(std::array{photonPx + lambdaPx, photonPy + lambdaPy, photonPz + lambdaPz}, o2::constants::physics::MassSigma0);
});

DECLARE_SOA_DYNAMIC_COLUMN(LambdaStarY, lambdaStarY,
[](float photonPx, float photonPy, float photonPz, float lambdaPx, float lambdaPy, float lambdaPz) -> float {
return RecoDecay::y(std::array{photonPx + lambdaPx, photonPy + lambdaPy, photonPz + lambdaPz}, o2::constants::physics::MassLambda1520);
});

DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, //! Phi in the range [0, 2pi)
[](float photonPx, float photonPy, float lambdaPx, float lambdaPy) -> float { return RecoDecay::phi(photonPx + lambdaPx, photonPy + lambdaPy); });

Expand All @@ -95,7 +100,7 @@
DECLARE_SOA_DYNAMIC_COLUMN(Radius, radius, //! Sigma0 decay radius (2D, centered at zero)
[](float x, float y) -> float { return RecoDecay::sqrtSumOfSquares(x, y); });

DECLARE_SOA_DYNAMIC_COLUMN(OPAngle, opAngle,

Check failure on line 103 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
[](float photonPx, float photonPy, float photonPz, float lambdaPx, float lambdaPy, float lambdaPz) {
TVector3 v1(photonPx, photonPy, photonPz);
TVector3 v2(lambdaPx, lambdaPy, lambdaPz);
Expand All @@ -108,7 +113,7 @@
return RecoDecay::sqrtSumOfSquares(photonPx, photonPy);
});

DECLARE_SOA_DYNAMIC_COLUMN(PhotonP, photonp, //! Total momentum in GeV/c

Check failure on line 116 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
[](float photonPx, float photonPy, float photonPz) -> float {
return RecoDecay::sqrtSumOfSquares(photonPx, photonPy, photonPz);
});
Expand All @@ -132,7 +137,7 @@
return RecoDecay::sqrtSumOfSquares(lambdaPx, lambdaPy);
});

DECLARE_SOA_DYNAMIC_COLUMN(LambdaP, lambdap, //! Total momentum in GeV/c

Check failure on line 140 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
[](float lambdaPx, float lambdaPy, float lambdaPz) -> float {
return RecoDecay::sqrtSumOfSquares(lambdaPx, lambdaPy, lambdaPz);
});
Expand Down Expand Up @@ -169,6 +174,7 @@
sigma0Core::P<sigma0Core::PhotonPx, sigma0Core::PhotonPy, sigma0Core::PhotonPz, sigma0Core::LambdaPx, sigma0Core::LambdaPy, sigma0Core::LambdaPz>,
sigma0Core::Sigma0Mass<sigma0Core::PhotonPx, sigma0Core::PhotonPy, sigma0Core::PhotonPz, sigma0Core::LambdaPx, sigma0Core::LambdaPy, sigma0Core::LambdaPz>,
sigma0Core::Sigma0Y<sigma0Core::PhotonPx, sigma0Core::PhotonPy, sigma0Core::PhotonPz, sigma0Core::LambdaPx, sigma0Core::LambdaPy, sigma0Core::LambdaPz>,
sigma0Core::LambdaStarY<sigma0Core::PhotonPx, sigma0Core::PhotonPy, sigma0Core::PhotonPz, sigma0Core::LambdaPx, sigma0Core::LambdaPy, sigma0Core::LambdaPz>,
sigma0Core::Phi<sigma0Core::PhotonPx, sigma0Core::PhotonPy, sigma0Core::LambdaPx, sigma0Core::LambdaPy>,
sigma0Core::Eta<sigma0Core::PhotonPx, sigma0Core::PhotonPy, sigma0Core::PhotonPz, sigma0Core::LambdaPx, sigma0Core::LambdaPy, sigma0Core::LambdaPz>,
sigma0Core::Radius<sigma0Core::X, sigma0Core::Y>,
Expand All @@ -192,17 +198,17 @@
DECLARE_SOA_COLUMN(X, x, float);
DECLARE_SOA_COLUMN(Y, y, float);
DECLARE_SOA_COLUMN(Z, z, float);
DECLARE_SOA_COLUMN(DCADaughters, dcadaughters, float);

Check failure on line 201 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

DECLARE_SOA_COLUMN(PhotonPx, photonPx, float);
DECLARE_SOA_COLUMN(PhotonPy, photonPy, float);
DECLARE_SOA_COLUMN(PhotonPz, photonPz, float);
DECLARE_SOA_COLUMN(PhotonMass, photonMass, float);

DECLARE_SOA_COLUMN(KShortPx, kshortPx, float);

Check failure on line 208 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(KShortPy, kshortPy, float);

Check failure on line 209 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(KShortPz, kshortPz, float);

Check failure on line 210 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(KShortMass, kshortMass, float);

Check failure on line 211 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

// Dynamic Columns

Expand Down
15 changes: 10 additions & 5 deletions PWGLF/TableProducer/Strangeness/sigma0builder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ struct sigma0builder {
// Histogram registry
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};

// Species selection
Configurable<bool> doLambdaStar{"doLambdaStar", false, "Build Lambda(1520) instead of Sigma0"};

Configurable<bool> fFillV03DPositionHistos{"fFillV03DPositionHistos", false, "Fill XYZ histo for Photons and Lambdas."};
Configurable<bool> fFillNoSelV0Histos{"fFillNoSelV0Histos", false, "Fill QA histos for input V0s."};
Configurable<bool> fFillSelPhotonHistos{"fFillSelPhotonHistos", true, "Fill QA histos for sel photons."};
Expand Down Expand Up @@ -2293,14 +2296,15 @@ struct sigma0builder {
auto arrMom = std::array{pVecPhotons, pVecLambda};
float sigmaMass = RecoDecay::m(arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
float sigmaY = -999.f;
float TheoreticalMass = doLambdaStar ? o2::constants::physics::MassLambda1520 : o2::constants::physics::MassSigma0;

if constexpr (requires { gamma.pxMC(); lambda.pxMC(); }) // If MC
sigmaY = RecoDecay::y(std::array{gamma.pxMC() + lambda.pxMC(), gamma.pyMC() + lambda.pyMC(), gamma.pzMC() + lambda.pzMC()}, o2::constants::physics::MassSigma0);
sigmaY = RecoDecay::y(std::array{gamma.pxMC() + lambda.pxMC(), gamma.pyMC() + lambda.pyMC(), gamma.pzMC() + lambda.pzMC()}, TheoreticalMass);
else // If DATA
sigmaY = RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, o2::constants::physics::MassSigma0);
sigmaY = RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, TheoreticalMass);

histos.fill(HIST("SigmaSel/hSelectionStatistics"), 1.);
if (TMath::Abs(sigmaMass - o2::constants::physics::MassSigma0) > Sigma0Window)
if (TMath::Abs(sigmaMass - TheoreticalMass) > Sigma0Window)
return false;

histos.fill(HIST("SigmaSel/hSelectionStatistics"), 2.);
Expand Down Expand Up @@ -2415,14 +2419,15 @@ struct sigma0builder {

auto arrMom = std::array{pVecPhotons, pVecLambda};
float sigmaMass = RecoDecay::m(arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
float TheoreticalMass = doLambdaStar ? o2::constants::physics::MassLambda1520 : o2::constants::physics::MassSigma0;

// N.B. At this stage, we are only using the reconstructed rapidity (ideally with a very loose cut)
// A proper selection should be done in the sigmaanalysis
float sigmaY = RecoDecay::y(std::array{gammapx + lambda.px(), gammapy + lambda.py(), gammapz + lambda.pz()}, o2::constants::physics::MassSigma0);
float sigmaY = RecoDecay::y(std::array{gammapx + lambda.px(), gammapy + lambda.py(), gammapz + lambda.pz()}, TheoreticalMass);

histos.fill(HIST("SigmaSel/hSelectionStatistics"), 1.);
histos.fill(HIST("SigmaSel/hSigmaMassBeforeSel"), sigmaMass);
if (TMath::Abs(sigmaMass - o2::constants::physics::MassSigma0) > Sigma0Window)
if (TMath::Abs(sigmaMass - TheoreticalMass) > Sigma0Window)
return false;

histos.fill(HIST("SigmaSel/hSelectionStatistics"), 2.);
Expand Down
9 changes: 6 additions & 3 deletions PWGLF/Tasks/Strangeness/sigmaanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ struct sigmaanalysis {
//__________________________________________________
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};

// Species
Configurable<bool> doLambdaStar{"doLambdaStar", false, "Build Lambda(1520) instead of Sigma0"};

// Event level
Configurable<bool> doPPAnalysis{"doPPAnalysis", true, "if in pp, set to true"};
Configurable<int> centralityEstimator{"centralityEstimator", kCentFT0C, "Run 3 centrality estimator (0:CentFT0C, 1:CentFT0M, 2:CentFT0CVariant1, 3:CentMFT, 4:CentNGlobal, 5:CentFV0A)"};
Expand Down Expand Up @@ -1616,13 +1619,13 @@ struct sigmaanalysis {
return false;

// Sigma0 specific selections
float sigma0Y = cand.sigma0Y();
float rapidity = doLambdaStar ? cand.lambdaStarY() : cand.sigma0Y();
if constexpr (requires { cand.sigma0MCY(); }) { // If MC
sigma0Y = cand.sigma0MCY();
rapidity = cand.sigma0MCY();
}

// Rapidity
if ((sigma0Y < sigma0Selections.Sigma0MinRapidity) || (sigma0Y > sigma0Selections.Sigma0MaxRapidity))
if ((rapidity < sigma0Selections.Sigma0MinRapidity) || (rapidity > sigma0Selections.Sigma0MaxRapidity))
return false;

// V0Pair Radius
Expand Down
Loading