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
2 changes: 1 addition & 1 deletion PWGLF/DataModel/LFSigmaTables.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check warning on line 1 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

Check warning on line 11 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

Check warning on line 11 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check warning on line 11 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.
#include <cmath>
#include <vector>
#include "Framework/AnalysisDataModel.h"
Expand All @@ -27,7 +27,7 @@
{

// for real data
namespace sigma0Core

Check warning on line 30 in PWGLF/DataModel/LFSigmaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/namespace]

Use snake_case for names of namespaces. Double underscores are not allowed.
{
DECLARE_SOA_COLUMN(SigmapT, sigmapT, float);
DECLARE_SOA_COLUMN(SigmaMass, sigmaMass, float);
Expand All @@ -49,7 +49,7 @@
sigma0Core::SigmaTimestamp);

// For Photon extra info
namespace sigmaPhotonExtra

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/namespace]

Use snake_case for names of namespaces. Double underscores are not allowed.
{
DECLARE_SOA_COLUMN(PhotonPt, photonPt, float);
DECLARE_SOA_COLUMN(PhotonMass, photonMass, float);
Expand Down Expand Up @@ -125,9 +125,9 @@
{
DECLARE_SOA_COLUMN(LambdaPt, lambdaPt, float);
DECLARE_SOA_COLUMN(LambdaMass, lambdaMass, float);
DECLARE_SOA_COLUMN(AntiLambdaMass, antilambdaMass, float);

Check warning on line 128 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(LambdaQt, lambdaQt, float);
DECLARE_SOA_COLUMN(LambdaAlpha, lambdaAlpha, float);
DECLARE_SOA_COLUMN(LambdaAlpha, lambdaAlpha, float);
DECLARE_SOA_COLUMN(LambdaLifeTime, lambdaLifeTime, float);
DECLARE_SOA_COLUMN(LambdaRadius, lambdaRadius, float);
DECLARE_SOA_COLUMN(LambdaCosPA, lambdaCosPA, float);
Expand Down Expand Up @@ -157,11 +157,11 @@
DECLARE_SOA_COLUMN(LambdaNegPiY, lambdaNegPiY, float);
DECLARE_SOA_COLUMN(LambdaPosITSCls, lambdaPosITSCls, int);
DECLARE_SOA_COLUMN(LambdaNegITSCls, lambdaNegITSCls, int);
DECLARE_SOA_COLUMN(LambdaPosITSChi2PerNcl, lambdaPosChi2PerNcl, float);

Check warning on line 160 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(LambdaNegITSChi2PerNcl, lambdaNegChi2PerNcl, float);

Check warning on line 161 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(LambdaV0Type, lambdaV0Type, uint8_t);
DECLARE_SOA_COLUMN(LambdaBDTScore, lambdaBDTScore, float);
DECLARE_SOA_COLUMN(AntiLambdaBDTScore, antilambdaBDTScore, float);

Check warning on line 164 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.

} // namespace sigmaLambdaExtra

Expand Down
12 changes: 6 additions & 6 deletions PWGLF/TableProducer/Strangeness/sigma0builder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ struct sigma0builder {
Preslice<V0StandardDerivedDatas> perCollisionSTDDerived = o2::aod::v0data::straCollisionId;

// Histogram registry
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};

// Event selection
Configurable<bool> doPPAnalysis{"doPPAnalysis", true, "if in pp, set to true"};

struct : ConfigurableGroup {
Configurable<bool> requireSel8{"requireSel8", true, "require sel8 event selection"};
Configurable<bool> requireTriggerTVX{"requireTriggerTVX", true, "require FT0 vertex (acceptable FT0C-FT0A time difference) at trigger level"};
Expand Down Expand Up @@ -745,7 +745,7 @@ struct sigma0builder {
fPhotonPosITSCls, fPhotonNegITSCls, fPhotonPosITSChi2PerNcl, fPhotonNegITSChi2PerNcl,
fPhotonV0Type, GammaBDTScore);

sigmaLambdaExtras(fLambdaPt, fLambdaMass, fAntiLambdaMass, fLambdaQt, fLambdaAlpha, fLambdaLifeTime,
sigmaLambdaExtras(fLambdaPt, fLambdaMass, fAntiLambdaMass, fLambdaQt, fLambdaAlpha, fLambdaLifeTime,
fLambdaRadius, fLambdaCosPA, fLambdaDCADau, fLambdaDCANegPV,
fLambdaDCAPosPV, fLambdaEta, fLambdaY, fLambdaPhi, fLambdaPosPrTPCNSigma,
fLambdaPosPiTPCNSigma, fLambdaNegPrTPCNSigma, fLambdaNegPiTPCNSigma,
Expand Down Expand Up @@ -816,7 +816,7 @@ struct sigma0builder {
if (!lambda.has_v0MCCore())
continue;

if (lambda.v0Type() != 1){ // safeguard to avoid TPC-only photons
if (lambda.v0Type() != 1) { // safeguard to avoid TPC-only photons
continue;
}

Expand Down Expand Up @@ -902,10 +902,10 @@ struct sigma0builder {
if (doPi0QA) // Pi0 QA study
runPi0QA(gamma, lambda);

if (lambda.v0Type() != 1){ // safeguard to avoid TPC-only photons
if (lambda.v0Type() != 1) { // safeguard to avoid TPC-only photons
continue;
}

// Sigma0 candidate properties
std::array<float, 3> pVecPhotons{gamma.px(), gamma.py(), gamma.pz()};
std::array<float, 3> pVecLambda{lambda.px(), lambda.py(), lambda.pz()};
Expand Down
51 changes: 25 additions & 26 deletions PWGLF/Tasks/Strangeness/sigmaanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct sigmaanalysis {

// Interaction rate selection:
Configurable<bool> fGetIR{"fGetIR", false, "Flag to retrieve the IR info."};
Configurable<std::string> irSource{"irSource", "T0VTX", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"};
Configurable<std::string> irSource{"irSource", "T0VTX", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"};
Configurable<float> minIR{"minIR", -1, "Min Interaction Rate (kHz). Leave -1 if no selection desired."};
Configurable<float> maxIR{"maxIR", -1, "Max Interaction Rate (kHz). Leave -1 if no selection desired."};

Expand Down Expand Up @@ -215,7 +215,7 @@ struct sigmaanalysis {
histos.get<TH1>(HIST("GeneralQA/hCandidateAnalysisSelection"))->GetXaxis()->SetBinLabel(28, "Lambda/ALambda DCAToPV");
histos.get<TH1>(HIST("GeneralQA/hCandidateAnalysisSelection"))->GetXaxis()->SetBinLabel(29, "Lambda/ALambda Mass");
histos.get<TH1>(HIST("GeneralQA/hCandidateAnalysisSelection"))->GetXaxis()->SetBinLabel(30, "Sigma Y");

// Photon Selection QA histos
histos.add("GeneralQA/hPhotonV0Type", "hPhotonV0Type", kTH1F, {{8, 0.5f, 8.5f}});
histos.add("GeneralQA/hPhotonMass", "hPhotonMass", kTH1F, {axisPhotonMass});
Expand Down Expand Up @@ -258,7 +258,7 @@ struct sigmaanalysis {
histos.add("GeneralQA/hLambdaPosChi2PerNc", "hLambdaPosChi2PerNc", kTH1F, {axisChi2PerNcl});
histos.add("GeneralQA/hLambdaNegChi2PerNc", "hLambdaNegChi2PerNc", kTH1F, {axisChi2PerNcl});
histos.add("GeneralQA/hLambdaLifeTime", "hLambdaLifeTime", kTH1F, {axisLifetime});

histos.add("GeneralQA/h2dTPCvsTOFNSigma_LambdaPr", "h2dTPCvsTOFNSigma_LambdaPr", {HistType::kTH2F, {axisTPCNSigma, axisTOFNSigma}});
histos.add("GeneralQA/h2dTPCvsTOFNSigma_LambdaPi", "h2dTPCvsTOFNSigma_LambdaPi", {HistType::kTH2F, {axisTPCNSigma, axisTOFNSigma}});
histos.add("GeneralQA/hLambdaDCANegToPV", "hLambdaDCANegToPV", kTH1F, {axisDCAtoPV});
Expand All @@ -284,7 +284,7 @@ struct sigmaanalysis {
histos.add("SigmaMassQA/h2dPhotonDCADauToPV", "h2dPhotonDCADauToPV", {HistType::kTH2F, {axisPt, axisSigmaMass}});
histos.add("SigmaMassQA/h2dPhotonDCADau", "h2dPhotonDCADau", {HistType::kTH2F, {axisPt, axisSigmaMass}});
histos.add("SigmaMassQA/h2dPhotonDauTPCCR", "h2dPhotonDauTPCCR", {HistType::kTH2F, {axisPt, axisSigmaMass}});
histos.add("SigmaMassQA/h2dPhotonTPCNSigmaEl", "h2dPhotonTPCNSigmaEl", {HistType::kTH2F, {axisPt, axisSigmaMass}});
histos.add("SigmaMassQA/h2dPhotonTPCNSigmaEl", "h2dPhotonTPCNSigmaEl", {HistType::kTH2F, {axisPt, axisSigmaMass}});
histos.add("SigmaMassQA/h2dPhotonpT", "h2dPhotonpT", {HistType::kTH2F, {axisPt, axisSigmaMass}}); //
histos.add("SigmaMassQA/h2dPhotonY", "h2dPhotonY", {HistType::kTH2F, {axisPt, axisSigmaMass}});
histos.add("SigmaMassQA/h2dPhotonRadius", "h2dPhotonRadius", {HistType::kTH2F, {axisPt, axisSigmaMass}});
Expand Down Expand Up @@ -360,7 +360,7 @@ struct sigmaanalysis {
histos.add("MC/hPtTrueAntiLambda_BeforeSel", "hPtTrueAntiLambda_BeforeSel", kTH1F, {axisPt}); // Signal only
histos.add("MC/hPtTrueGamma_BeforeSel", "hPtTrueGamma_BeforeSel", kTH1F, {axisPt}); // Signal only
histos.add("MC/hPtTrueSigma_BeforeSel", "hPtTrueSigma_BeforeSel", kTH1F, {axisPt}); // Signal only
histos.add("MC/hPtTrueAntiSigma_BeforeSel", "hPtTrueAntiSigma_BeforeSel", kTH1F, {axisPt}); // Signal only
histos.add("MC/hPtTrueAntiSigma_BeforeSel", "hPtTrueAntiSigma_BeforeSel", kTH1F, {axisPt}); // Signal only
histos.add("MC/hPtLambdaCand_BeforeSel", "hPtLambdaCand_BeforeSel", kTH1F, {axisPt}); // Bkg + Signal
histos.add("MC/hPtGammaCand_BeforeSel", "hPtGammaCand_BeforeSel", kTH1F, {axisPt}); // Bkg + Signal
histos.add("MC/hPtSigmaCand_BeforeSel", "hPtGammaCand_BeforeSel", kTH1F, {axisPt}); // Bkg + Signal
Expand Down Expand Up @@ -430,18 +430,18 @@ struct sigmaanalysis {
histos.fill(HIST("GeneralQA/hPhotonV0Type"), cand.photonV0Type());
if (cand.photonV0Type() != Photonv0TypeSel && Photonv0TypeSel > -1)
return false;
histos.fill(HIST("SigmaMassQA/h2dPhotonV0Type"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("SigmaMassQA/h2dPhotonV0Type"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("GeneralQA/hPhotonMass"), cand.photonMass());
histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 2.);
if (TMath::Abs(cand.photonMass()) > PhotonMaxMass)
return false;
histos.fill(HIST("SigmaMassQA/h2dPhotonMass"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("SigmaMassQA/h2dPhotonMass"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("GeneralQA/hPhotonNegpT"), cand.photonNegPt());
histos.fill(HIST("GeneralQA/hPhotonPospT"), cand.photonPosPt());
histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 3.);
if ((cand.photonPosPt() < PhotonDauMinPt) || (cand.photonNegPt() < PhotonDauMinPt))
return false;
histos.fill(HIST("SigmaMassQA/h2dPhotonDaupT"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("SigmaMassQA/h2dPhotonDaupT"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("GeneralQA/hPhotonDCANegToPV"), cand.photonDCANegPV());
histos.fill(HIST("GeneralQA/hPhotonDCAPosToPV"), cand.photonDCAPosPV());
histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 4.);
Expand Down Expand Up @@ -567,12 +567,12 @@ struct sigmaanalysis {
return false;
if (cand.lambdaNegITSCls() < LambdaMinITSclusters && (!LambdaRejectNegITSafterburner || negIsFromAfterburner))
return false;
histos.fill(HIST("SigmaMassQA/h2dLambdaDauITSCls"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("SigmaMassQA/h2dLambdaDauITSCls"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("GeneralQA/hLambdaLifeTime"), cand.lambdaLifeTime());
histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 25.);
if (cand.lambdaLifeTime() > LambdaMaxLifeTime)
return false;
histos.fill(HIST("SigmaMassQA/h2dLambdaLifeTime"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("SigmaMassQA/h2dLambdaLifeTime"), cand.sigmapT(), cand.sigmaMass());
histos.fill(HIST("GeneralQA/hCandidateAnalysisSelection"), 26.);
// Separating lambda and antilambda selections:
if (isLambdalike) { // Lambda selection
Expand Down Expand Up @@ -675,15 +675,15 @@ struct sigmaanalysis {
if (doMCAssociation && !(sigma.isSigma() || sigma.isAntiSigma())) {
continue;
}
if (fGetIR){
double interactionRate = rateFetcher.fetch(ccdb.service, sigma.sigmaTimestamp(), sigma.sigmaRunNumber(), irSource)*1.e-3;
if (fGetIR) {
double interactionRate = rateFetcher.fetch(ccdb.service, sigma.sigmaTimestamp(), sigma.sigmaRunNumber(), irSource) * 1.e-3;
histos.fill(HIST("GeneralQA/hInteractionRate"), interactionRate);
histos.fill(HIST("GeneralQA/hCentralityVsInteractionRate"), sigma.sigmaCentrality(), interactionRate);
if ((maxIR!=-1) && (minIR!=-1) && ((interactionRate<=minIR) || (interactionRate>=maxIR))){
if ((maxIR != -1) && (minIR != -1) && ((interactionRate <= minIR) || (interactionRate >= maxIR))) {
continue;
}
}

// Filling histos before analysis selection
histos.fill(HIST("MC/h2dArmenterosBeforeSel"), sigma.photonAlpha(), sigma.photonQt());
histos.fill(HIST("MC/h2dArmenterosBeforeSel"), sigma.lambdaAlpha(), sigma.lambdaQt());
Expand All @@ -698,14 +698,14 @@ struct sigmaanalysis {
if (sigma.lambdaCandPDGCode() == 3122)
histos.fill(HIST("MC/hPtTrueLambda_BeforeSel"), sigma.lambdaPt());
if (sigma.lambdaCandPDGCode() == -3122)
histos.fill(HIST("MC/hPtTrueAntiLambda_BeforeSel"), sigma.lambdaPt());
histos.fill(HIST("MC/hPtTrueAntiLambda_BeforeSel"), sigma.lambdaPt());
if (sigma.isSigma())
histos.fill(HIST("MC/hPtTrueSigma_BeforeSel"), sigma.sigmapT());
if (sigma.isAntiSigma())
histos.fill(HIST("MC/hPtTrueAntiSigma_BeforeSel"), sigma.sigmapT());
histos.fill(HIST("MC/hPtTrueAntiSigma_BeforeSel"), sigma.sigmapT());

if (sigma.lambdaAlpha() > 0) { // Lambda Analysis
if (!processSigmaCandidate(sigma, true))
if (!processSigmaCandidate(sigma, true))
continue;

// For Lambda PID Studies
Expand All @@ -729,10 +729,9 @@ struct sigmaanalysis {
histos.fill(HIST("MC/h3dSigma0PtResolution"), sigma.sigmapT(), TMath::Abs((sigma.sigmaMCPt() - sigma.sigmapT()) / sigma.sigmaMCPt()), sigma.sigmaMass()); // pT resolution
histos.fill(HIST("MC/h2dPtVsMassSigma_SignalOnly"), sigma.sigmapT(), sigma.sigmaMass());
histos.fill(HIST("MC/hPtTrueSigma_AfterSel"), sigma.sigmapT());
}
}
else{ // AntiLambda Analysis
if (!processSigmaCandidate(sigma, false))
}
} else { // AntiLambda Analysis
if (!processSigmaCandidate(sigma, false))
continue;

if (sigma.lambdaCandPDGCode() == -3122) {
Expand All @@ -753,8 +752,8 @@ struct sigmaanalysis {
histos.fill(HIST("MC/hPtTrueSigma_AfterSel"), sigma.sigmapT());
}
}
// Fill histos after selection, please

// Fill histos after selection, please
histos.fill(HIST("MC/hPtGammaCand_AfterSel"), sigma.photonPt());
histos.fill(HIST("GeneralQA/hPhotonMassSelected"), sigma.photonMass());
histos.fill(HIST("MC/hPtSigmaCand_AfterSel"), sigma.sigmapT());
Expand Down Expand Up @@ -789,11 +788,11 @@ struct sigmaanalysis {
void processRealData(V0Sigmas const& sigmas)
{
for (auto& sigma : sigmas) { // selecting Sigma0-like candidates
if (fGetIR){
double interactionRate = rateFetcher.fetch(ccdb.service, sigma.sigmaTimestamp(), sigma.sigmaRunNumber(), irSource)*1.e-3;
if (fGetIR) {
double interactionRate = rateFetcher.fetch(ccdb.service, sigma.sigmaTimestamp(), sigma.sigmaRunNumber(), irSource) * 1.e-3;
histos.fill(HIST("GeneralQA/hInteractionRate"), interactionRate);
histos.fill(HIST("GeneralQA/hCentralityVsInteractionRate"), sigma.sigmaCentrality(), interactionRate);
if ((maxIR!=-1) && (minIR!=-1) && ((interactionRate<=minIR) || (interactionRate>=maxIR))){
if ((maxIR != -1) && (minIR != -1) && ((interactionRate <= minIR) || (interactionRate >= maxIR))) {
continue;
}
}
Expand Down
Loading