Skip to content

Commit c4d1a79

Browse files
[PWGLF] Modifications in Sigma0 tasks (AliceO2Group#9820)
Co-authored-by: ALICE Action Bot <[email protected]>
1 parent 62724a8 commit c4d1a79

File tree

4 files changed

+423
-242
lines changed

4 files changed

+423
-242
lines changed

PWGLF/DataModel/LFSigmaTables.h

+15-9
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ DECLARE_SOA_COLUMN(SigmaMass, sigmaMass, float);
3434
DECLARE_SOA_COLUMN(SigmaRapidity, sigmaRapidity, float);
3535
DECLARE_SOA_COLUMN(SigmaOPAngle, sigmaOPAngle, float);
3636
DECLARE_SOA_COLUMN(SigmaCentrality, sigmaCentrality, float);
37+
DECLARE_SOA_COLUMN(SigmaRunNumber, sigmaRunNumber, int);
38+
DECLARE_SOA_COLUMN(SigmaTimestamp, sigmaTimestamp, uint64_t);
3739

3840
} // namespace sigma0Core
3941

@@ -42,7 +44,9 @@ DECLARE_SOA_TABLE(Sigma0Cores, "AOD", "SIGMA0CORES",
4244
sigma0Core::SigmaMass,
4345
sigma0Core::SigmaRapidity,
4446
sigma0Core::SigmaOPAngle,
45-
sigma0Core::SigmaCentrality);
47+
sigma0Core::SigmaCentrality,
48+
sigma0Core::SigmaRunNumber,
49+
sigma0Core::SigmaTimestamp);
4650

4751
// For Photon extra info
4852
namespace sigmaPhotonExtra
@@ -75,8 +79,8 @@ DECLARE_SOA_COLUMN(PhotonNegY, photonNegY, float);
7579
DECLARE_SOA_COLUMN(PhotonPsiPair, photonPsiPair, float);
7680
DECLARE_SOA_COLUMN(PhotonPosITSCls, photonPosITSCls, int);
7781
DECLARE_SOA_COLUMN(PhotonNegITSCls, photonNegITSCls, int);
78-
DECLARE_SOA_COLUMN(PhotonPosITSClSize, photonPosITSClSize, uint32_t);
79-
DECLARE_SOA_COLUMN(PhotonNegITSClSize, photonNegITSClSize, uint32_t);
82+
DECLARE_SOA_COLUMN(PhotonPosITSChi2PerNcl, photonPosITSChi2PerNcl, float);
83+
DECLARE_SOA_COLUMN(PhotonNegITSChi2PerNcl, photonNegITSChi2PerNcl, float);
8084
DECLARE_SOA_COLUMN(PhotonV0Type, photonV0Type, uint8_t);
8185
DECLARE_SOA_COLUMN(GammaBDTScore, gammaBDTScore, float);
8286

@@ -111,8 +115,8 @@ DECLARE_SOA_TABLE(SigmaPhotonExtras, "AOD", "SIGMA0PHOTON",
111115
sigmaPhotonExtra::PhotonPsiPair,
112116
sigmaPhotonExtra::PhotonPosITSCls,
113117
sigmaPhotonExtra::PhotonNegITSCls,
114-
sigmaPhotonExtra::PhotonPosITSClSize,
115-
sigmaPhotonExtra::PhotonNegITSClSize,
118+
sigmaPhotonExtra::PhotonPosITSChi2PerNcl,
119+
sigmaPhotonExtra::PhotonNegITSChi2PerNcl,
116120
sigmaPhotonExtra::PhotonV0Type,
117121
sigmaPhotonExtra::GammaBDTScore);
118122

@@ -124,6 +128,7 @@ DECLARE_SOA_COLUMN(LambdaMass, lambdaMass, float);
124128
DECLARE_SOA_COLUMN(AntiLambdaMass, antilambdaMass, float);
125129
DECLARE_SOA_COLUMN(LambdaQt, lambdaQt, float);
126130
DECLARE_SOA_COLUMN(LambdaAlpha, lambdaAlpha, float);
131+
DECLARE_SOA_COLUMN(LambdaLifeTime, lambdaLifeTime, float);
127132
DECLARE_SOA_COLUMN(LambdaRadius, lambdaRadius, float);
128133
DECLARE_SOA_COLUMN(LambdaCosPA, lambdaCosPA, float);
129134
DECLARE_SOA_COLUMN(LambdaDCADau, lambdaDCADau, float);
@@ -152,8 +157,8 @@ DECLARE_SOA_COLUMN(LambdaNegPrY, lambdaNegPrY, float);
152157
DECLARE_SOA_COLUMN(LambdaNegPiY, lambdaNegPiY, float);
153158
DECLARE_SOA_COLUMN(LambdaPosITSCls, lambdaPosITSCls, int);
154159
DECLARE_SOA_COLUMN(LambdaNegITSCls, lambdaNegITSCls, int);
155-
DECLARE_SOA_COLUMN(LambdaPosITSClSize, lambdaPosITSClSize, uint32_t);
156-
DECLARE_SOA_COLUMN(LambdaNegITSClSize, lambdaNegITSClSize, uint32_t);
160+
DECLARE_SOA_COLUMN(LambdaPosITSChi2PerNcl, lambdaPosChi2PerNcl, float);
161+
DECLARE_SOA_COLUMN(LambdaNegITSChi2PerNcl, lambdaNegChi2PerNcl, float);
157162
DECLARE_SOA_COLUMN(LambdaV0Type, lambdaV0Type, uint8_t);
158163
DECLARE_SOA_COLUMN(LambdaBDTScore, lambdaBDTScore, float);
159164
DECLARE_SOA_COLUMN(AntiLambdaBDTScore, antilambdaBDTScore, float);
@@ -166,6 +171,7 @@ DECLARE_SOA_TABLE(SigmaLambdaExtras, "AOD", "SIGMA0LAMBDA",
166171
sigmaLambdaExtra::AntiLambdaMass,
167172
sigmaLambdaExtra::LambdaQt,
168173
sigmaLambdaExtra::LambdaAlpha,
174+
sigmaLambdaExtra::LambdaLifeTime,
169175
sigmaLambdaExtra::LambdaRadius,
170176
sigmaLambdaExtra::LambdaCosPA,
171177
sigmaLambdaExtra::LambdaDCADau,
@@ -194,8 +200,8 @@ DECLARE_SOA_TABLE(SigmaLambdaExtras, "AOD", "SIGMA0LAMBDA",
194200
sigmaLambdaExtra::LambdaNegPiY,
195201
sigmaLambdaExtra::LambdaPosITSCls,
196202
sigmaLambdaExtra::LambdaNegITSCls,
197-
sigmaLambdaExtra::LambdaPosITSClSize,
198-
sigmaLambdaExtra::LambdaNegITSClSize,
203+
sigmaLambdaExtra::LambdaPosITSChi2PerNcl,
204+
sigmaLambdaExtra::LambdaNegITSChi2PerNcl,
199205
sigmaLambdaExtra::LambdaV0Type,
200206
sigmaLambdaExtra::LambdaBDTScore,
201207
sigmaLambdaExtra::AntiLambdaBDTScore);

PWGLF/TableProducer/Strangeness/sigma0builder.cxx

+28-17
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333
#include "ReconstructionDataFormats/Track.h"
3434
#include "Common/Core/RecoDecay.h"
3535
#include "Common/Core/trackUtilities.h"
36-
#include "PWGLF/DataModel/LFStrangenessTables.h"
37-
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
38-
#include "PWGLF/DataModel/LFStrangenessMLTables.h"
39-
#include "PWGLF/DataModel/LFSigmaTables.h"
4036
#include "Common/Core/TrackSelection.h"
4137
#include "Common/DataModel/TrackSelectionTables.h"
4238
#include "Common/DataModel/EventSelection.h"
4339
#include "Common/DataModel/Centrality.h"
4440
#include "Common/DataModel/PIDResponse.h"
41+
#include "PWGLF/DataModel/LFStrangenessTables.h"
42+
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
43+
#include "PWGLF/DataModel/LFStrangenessMLTables.h"
44+
#include "PWGLF/DataModel/LFSigmaTables.h"
4545
#include "CCDB/BasicCCDBManager.h"
4646
#include <TFile.h>
4747
#include <TH2F.h>
@@ -76,23 +76,24 @@ struct sigma0builder {
7676

7777
// Event selection
7878
Configurable<bool> doPPAnalysis{"doPPAnalysis", true, "if in pp, set to true"};
79+
7980
struct : ConfigurableGroup {
8081
Configurable<bool> requireSel8{"requireSel8", true, "require sel8 event selection"};
8182
Configurable<bool> requireTriggerTVX{"requireTriggerTVX", true, "require FT0 vertex (acceptable FT0C-FT0A time difference) at trigger level"};
8283
Configurable<bool> rejectITSROFBorder{"rejectITSROFBorder", true, "reject events at ITS ROF border"};
8384
Configurable<bool> rejectTFBorder{"rejectTFBorder", true, "reject events at TF border"};
84-
Configurable<bool> requireIsVertexITSTPC{"requireIsVertexITSTPC", false, "require events with at least one ITS-TPC track"};
85+
Configurable<bool> requireIsVertexITSTPC{"requireIsVertexITSTPC", true, "require events with at least one ITS-TPC track"};
8586
Configurable<bool> requireIsGoodZvtxFT0VsPV{"requireIsGoodZvtxFT0VsPV", true, "require events with PV position along z consistent (within 1 cm) between PV reconstructed using tracks and PV using FT0 A-C time difference"};
8687
Configurable<bool> requireIsVertexTOFmatched{"requireIsVertexTOFmatched", false, "require events with at least one of vertex contributors matched to TOF"};
8788
Configurable<bool> requireIsVertexTRDmatched{"requireIsVertexTRDmatched", false, "require events with at least one of vertex contributors matched to TRD"};
88-
Configurable<bool> rejectSameBunchPileup{"rejectSameBunchPileup", true, "reject collisions in case of pileup with another collision in the same foundBC"};
89+
Configurable<bool> rejectSameBunchPileup{"rejectSameBunchPileup", false, "reject collisions in case of pileup with another collision in the same foundBC"};
8990
Configurable<bool> requireNoCollInTimeRangeStd{"requireNoCollInTimeRangeStd", false, "reject collisions corrupted by the cannibalism, with other collisions within +/- 2 microseconds or mult above a certain threshold in -4 - -2 microseconds"};
9091
Configurable<bool> requireNoCollInTimeRangeStrict{"requireNoCollInTimeRangeStrict", false, "reject collisions corrupted by the cannibalism, with other collisions within +/- 10 microseconds"};
9192
Configurable<bool> requireNoCollInTimeRangeNarrow{"requireNoCollInTimeRangeNarrow", false, "reject collisions corrupted by the cannibalism, with other collisions within +/- 2 microseconds"};
9293
Configurable<bool> requireNoCollInTimeRangeVzDep{"requireNoCollInTimeRangeVzDep", false, "reject collisions corrupted by the cannibalism, with other collisions with pvZ of drifting TPC tracks from past/future collisions within 2.5 cm the current pvZ"};
9394
Configurable<bool> requireNoCollInROFStd{"requireNoCollInROFStd", false, "reject collisions corrupted by the cannibalism, with other collisions within the same ITS ROF with mult. above a certain threshold"};
9495
Configurable<bool> requireNoCollInROFStrict{"requireNoCollInROFStrict", false, "reject collisions corrupted by the cannibalism, with other collisions within the same ITS ROF"};
95-
Configurable<bool> requireINEL0{"requireINEL0", true, "require INEL>0 event selection"};
96+
Configurable<bool> requireINEL0{"requireINEL0", false, "require INEL>0 event selection"};
9697
Configurable<bool> requireINEL1{"requireINEL1", false, "require INEL>1 event selection"};
9798
Configurable<float> maxZVtxPosition{"maxZVtxPosition", 10., "max Z vtx position"};
9899
Configurable<bool> useFT0CbasedOccupancy{"useFT0CbasedOccupancy", false, "Use sum of FT0-C amplitudes for estimating occupancy? (if not, use track-based definition)"};
@@ -541,10 +542,10 @@ struct sigma0builder {
541542
if ((gamma.v0radius() < PhotonMinRadius) || (gamma.v0radius() > PhotonMaxRadius))
542543
return false;
543544

545+
// Lambda basic selection criteria:
544546
histos.fill(HIST("hCandidateBuilderSelection"), 6.);
545547
histos.fill(HIST("Selection/hLambdaMass"), lambda.mLambda());
546548
histos.fill(HIST("Selection/hAntiLambdaMass"), lambda.mAntiLambda());
547-
// Lambda basic selection criteria:
548549
if ((TMath::Abs(lambda.mLambda() - 1.115683) > LambdaWindow) && (TMath::Abs(lambda.mAntiLambda() - 1.115683) > LambdaWindow))
549550
return false;
550551
histos.fill(HIST("Selection/hLambdaNegEta"), lambda.negativeeta());
@@ -669,8 +670,8 @@ struct sigma0builder {
669670
float fPhotonPsiPair = gamma.psipair();
670671
int fPhotonPosITSCls = posTrackGamma.itsNCls();
671672
int fPhotonNegITSCls = negTrackGamma.itsNCls();
672-
uint32_t fPhotonPosITSClSize = posTrackGamma.itsClusterSizes();
673-
uint32_t fPhotonNegITSClSize = negTrackGamma.itsClusterSizes();
673+
float fPhotonPosITSChi2PerNcl = posTrackGamma.itsChi2PerNcl();
674+
float fPhotonNegITSChi2PerNcl = negTrackGamma.itsChi2PerNcl();
674675
uint8_t fPhotonV0Type = gamma.v0Type();
675676

676677
// Lambda
@@ -682,6 +683,7 @@ struct sigma0builder {
682683
float fAntiLambdaMass = lambda.mAntiLambda();
683684
float fLambdaQt = lambda.qtarm();
684685
float fLambdaAlpha = lambda.alpha();
686+
float fLambdaLifeTime = lambda.distovertotmom(coll.posX(), coll.posY(), coll.posZ()) * o2::constants::physics::MassLambda0;
685687
float fLambdaRadius = lambda.v0radius();
686688
float fLambdaCosPA = lambda.v0cosPA();
687689
float fLambdaDCADau = lambda.dcaV0daughters();
@@ -712,8 +714,8 @@ struct sigma0builder {
712714
float fLambdaNegPiY = RecoDecay::y(std::array{lambda.pxneg(), lambda.pyneg(), lambda.pzneg()}, o2::constants::physics::MassPionCharged);
713715
int fLambdaPosITSCls = posTrackLambda.itsNCls();
714716
int fLambdaNegITSCls = negTrackLambda.itsNCls();
715-
uint32_t fLambdaPosITSClSize = posTrackLambda.itsClusterSizes();
716-
uint32_t fLambdaNegITSClSize = negTrackLambda.itsClusterSizes();
717+
float fLambdaPosITSChi2PerNcl = posTrackLambda.itsChi2PerNcl();
718+
float fLambdaNegITSChi2PerNcl = negTrackLambda.itsChi2PerNcl();
717719
uint8_t fLambdaV0Type = lambda.v0Type();
718720

719721
// Sigma0 candidate properties
@@ -729,26 +731,28 @@ struct sigma0builder {
729731
float fSigmaRap = RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, o2::constants::physics::MassSigma0);
730732
float fSigmaOPAngle = v1.Angle(v2);
731733
float fSigmaCentrality = coll.centFT0C();
734+
float fSigmaTimeStamp = coll.timestamp();
735+
float fSigmaRunNumber = coll.runNumber();
732736

733737
// Filling TTree for ML analysis
734-
sigma0cores(fSigmapT, fSigmaMass, fSigmaRap, fSigmaOPAngle, fSigmaCentrality);
738+
sigma0cores(fSigmapT, fSigmaMass, fSigmaRap, fSigmaOPAngle, fSigmaCentrality, fSigmaRunNumber, fSigmaTimeStamp);
735739

736740
sigmaPhotonExtras(fPhotonPt, fPhotonMass, fPhotonQt, fPhotonAlpha, fPhotonRadius,
737741
fPhotonCosPA, fPhotonDCADau, fPhotonDCANegPV, fPhotonDCAPosPV, fPhotonZconv,
738742
fPhotonEta, fPhotonY, fPhotonPhi, fPhotonPosTPCNSigmaEl, fPhotonNegTPCNSigmaEl, fPhotonPosTPCNSigmaPi, fPhotonNegTPCNSigmaPi, fPhotonPosTPCCrossedRows,
739743
fPhotonNegTPCCrossedRows, fPhotonPosPt, fPhotonNegPt, fPhotonPosEta,
740744
fPhotonNegEta, fPhotonPosY, fPhotonNegY, fPhotonPsiPair,
741-
fPhotonPosITSCls, fPhotonNegITSCls, fPhotonPosITSClSize, fPhotonNegITSClSize,
745+
fPhotonPosITSCls, fPhotonNegITSCls, fPhotonPosITSChi2PerNcl, fPhotonNegITSChi2PerNcl,
742746
fPhotonV0Type, GammaBDTScore);
743747

744-
sigmaLambdaExtras(fLambdaPt, fLambdaMass, fAntiLambdaMass, fLambdaQt, fLambdaAlpha,
748+
sigmaLambdaExtras(fLambdaPt, fLambdaMass, fAntiLambdaMass, fLambdaQt, fLambdaAlpha, fLambdaLifeTime,
745749
fLambdaRadius, fLambdaCosPA, fLambdaDCADau, fLambdaDCANegPV,
746750
fLambdaDCAPosPV, fLambdaEta, fLambdaY, fLambdaPhi, fLambdaPosPrTPCNSigma,
747751
fLambdaPosPiTPCNSigma, fLambdaNegPrTPCNSigma, fLambdaNegPiTPCNSigma,
748752
fLambdaPrTOFNSigma, fLambdaPiTOFNSigma, fALambdaPrTOFNSigma, fALambdaPiTOFNSigma,
749753
fLambdaPosTPCCrossedRows, fLambdaNegTPCCrossedRows, fLambdaPosPt, fLambdaNegPt, fLambdaPosEta,
750754
fLambdaNegEta, fLambdaPosPrY, fLambdaPosPiY, fLambdaNegPrY, fLambdaNegPiY,
751-
fLambdaPosITSCls, fLambdaNegITSCls, fLambdaPosITSClSize, fLambdaNegITSClSize,
755+
fLambdaPosITSCls, fLambdaNegITSCls, fLambdaPosITSChi2PerNcl, fLambdaNegITSChi2PerNcl,
752756
fLambdaV0Type, LambdaBDTScore, AntiLambdaBDTScore);
753757
}
754758

@@ -812,6 +816,10 @@ struct sigma0builder {
812816
if (!lambda.has_v0MCCore())
813817
continue;
814818

819+
if (lambda.v0Type() != 1) { // safeguard to avoid TPC-only photons
820+
continue;
821+
}
822+
815823
auto lambdaMC = lambda.v0MCCore_as<soa::Join<aod::V0MCCores, aod::V0MCCollRefs>>();
816824

817825
if (doPi0QA) // Pi0 QA study
@@ -888,13 +896,16 @@ struct sigma0builder {
888896
auto V0Table_thisCollision = V0s.sliceBy(perCollisionSTDDerived, collIdx);
889897

890898
histos.fill(HIST("hEventCentrality"), coll.centFT0C());
891-
892899
// V0 table sliced
893900
for (auto& gamma : V0Table_thisCollision) { // selecting photons from Sigma0
894901
for (auto& lambda : V0Table_thisCollision) { // selecting lambdas from Sigma0
895902
if (doPi0QA) // Pi0 QA study
896903
runPi0QA(gamma, lambda);
897904

905+
if (lambda.v0Type() != 1) { // safeguard to avoid TPC-only photons
906+
continue;
907+
}
908+
898909
// Sigma0 candidate properties
899910
std::array<float, 3> pVecPhotons{gamma.px(), gamma.py(), gamma.pz()};
900911
std::array<float, 3> pVecLambda{lambda.px(), lambda.py(), lambda.pz()};

PWGLF/Tasks/Strangeness/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ o2physics_add_dpl_workflow(hstrangecorrelation
8181

8282
o2physics_add_dpl_workflow(sigmaanalysis
8383
SOURCES sigmaanalysis.cxx
84-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
84+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB
8585
COMPONENT_NAME Analysis)
8686

8787
o2physics_add_dpl_workflow(phik0shortanalysis

0 commit comments

Comments
 (0)