Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGHF] KFParticle reconstruction of 3-prong decay #9211

Merged
merged 31 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3a23570
reproduce KF functionality in 3 prong candidate creator
Nov 9, 2024
ce3ad2e
KF for Lc selector; fix bugs of previous commit
Nov 11, 2024
8a39f66
add KF topological variables into a tree
Nov 13, 2024
602b7f5
cosmetics treeCreatorLcToPKPi.cxx
Nov 13, 2024
48bbf70
modify HFCAND3PKF table
Nov 15, 2024
3ebd381
adapt treeCreatorLcToPKPi to KF use
Nov 15, 2024
60899af
simplify fillTable[]() in treeCreatorLcToPKPi.cxx
Nov 18, 2024
5754d4f
add LdL field to treeCreatorLcToPKPi.cxx
Nov 18, 2024
cc5939b
add mc-match table to treeCreatorLcToPKPi.cxx
Nov 22, 2024
92f2ac0
exclude swapped prongs candidates from mc-signal definition
Nov 25, 2024
96cd16a
add MC info for residuals and pulls of p, pt, x, y, z
Nov 27, 2024
140703b
add MC L to treeCreatorLcToPKPi.cxx, use correct units for T
Nov 27, 2024
6b6b6b0
add processData for KF in treeCreatorLcToPKPi.cxx
Nov 28, 2024
14e8b7b
add PV info (candidate-wise)
Nov 29, 2024
c4b6660
save usual tree in case of KF as well
Dec 16, 2024
7bcb893
save usual tree in case of KF as well in case of data; bugfix: calcul…
Dec 19, 2024
e000ea6
add bitmapProngsContributorsPV in KF-related parts of code
lubynets Jan 7, 2025
a1b0d1c
rename variables according to conventions
lubynets Jan 7, 2025
784ecbc
apply clang format
lubynets Jan 7, 2025
2b2fd07
Use double precision for 1D histograms to avoid truncation
lubynets Jan 15, 2025
7650c61
Fix typo with wrong type of UndefValue (float -> int)
lubynets Jan 15, 2025
0b01fec
move KF service functions into utilities
lubynets Jan 15, 2025
66ec346
use enum for sig / bg status
lubynets Jan 15, 2025
9e33151
fill some DCAFitter vars in case of KF mode
lubynets Jan 15, 2025
1e12be7
Please consider the following formatting changes
alibuild Jan 15, 2025
1aa9105
Merge pull request #3 from alibuild/alibot-cleanup-9211
lubynets Jan 15, 2025
07d6f8d
avoid c-style cast, add needed include
lubynets Jan 16, 2025
15cce67
follow naming conventions
lubynets Jan 16, 2025
803c2ff
follow code style
lubynets Jan 17, 2025
1b0da68
Please consider the following formatting changes
alibuild Jan 17, 2025
ce1a182
Merge pull request #4 from alibuild/alibot-cleanup-9211
lubynets Jan 17, 2025
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
45 changes: 45 additions & 0 deletions PWGHF/DataModel/CandidateReconstructionTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
DECLARE_SOA_INDEX_COLUMN_FULL(Prong2, prong2, int, Tracks, "_2"); //! Index to third prong
DECLARE_SOA_INDEX_COLUMN(V0, v0); //! Index to V0 prong
DECLARE_SOA_INDEX_COLUMN(Cascade, cascade); //! Index to cascade prong
DECLARE_SOA_COLUMN(HFflag, hfflag, uint8_t); //!

Check warning on line 248 in PWGHF/DataModel/CandidateReconstructionTables.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(FlagD0ToKPi, flagD0ToKPi, uint8_t); //!
DECLARE_SOA_COLUMN(FlagJpsiToEE, flagJpsiToEE, uint8_t); //!
Expand Down Expand Up @@ -573,9 +573,9 @@
[](float xVtxP, float yVtxP, float xVtxS, float yVtxS, float err) -> float { return RecoDecay::distanceXY(std::array{xVtxP, yVtxP}, std::array{xVtxS, yVtxS}) / err; });
DECLARE_SOA_COLUMN(ErrorDecayLength, errorDecayLength, float); //!
DECLARE_SOA_COLUMN(ErrorDecayLengthXY, errorDecayLengthXY, float); //!
DECLARE_SOA_DYNAMIC_COLUMN(CPA, cpa, //!

Check warning on line 576 in PWGHF/DataModel/CandidateReconstructionTables.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 xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS, float px, float py, float pz) -> float { return RecoDecay::cpa(std::array{xVtxP, yVtxP, zVtxP}, std::array{xVtxS, yVtxS, zVtxS}, std::array{px, py, pz}); });
DECLARE_SOA_DYNAMIC_COLUMN(CPAXY, cpaXY, //!

Check warning on line 578 in PWGHF/DataModel/CandidateReconstructionTables.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 xVtxP, float yVtxP, float xVtxS, float yVtxS, float px, float py) -> float { return RecoDecay::cpaXY(std::array{xVtxP, yVtxP}, std::array{xVtxS, yVtxS}, std::array{px, py}); });
DECLARE_SOA_DYNAMIC_COLUMN(Ct, ct, //!
[](float xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS, float px, float py, float pz, double m) -> float { return RecoDecay::ct(std::array{px, py, pz}, RecoDecay::distance(std::array{xVtxP, yVtxP, zVtxP}, std::array{xVtxS, yVtxS, zVtxS}), m); });
Expand Down Expand Up @@ -764,9 +764,9 @@
DECLARE_SOA_COLUMN(FlagMcMatchGen, flagMcMatchGen, int8_t); //! generator level
DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); //! particle origin, reconstruction level
DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); //! particle origin, generator level
DECLARE_SOA_COLUMN(V0X, v0x, float); //! X position of V0 decay

Check warning on line 767 in PWGHF/DataModel/CandidateReconstructionTables.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(V0Y, v0y, float); //! Y position of V0 decay

Check warning on line 768 in PWGHF/DataModel/CandidateReconstructionTables.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(V0Z, v0z, float); //! Z position of V0 decay

Check warning on line 769 in PWGHF/DataModel/CandidateReconstructionTables.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 hf_cand_casc

DECLARE_SOA_TABLE(HfCandCascBase, "AOD", "HFCANDCASCBASE", //!
Expand Down Expand Up @@ -956,6 +956,40 @@
DplusToK0starK // used to describe D+ in MC production for Ds analysis
};

// KF related properties
DECLARE_SOA_COLUMN(KfXPVError, kfXPVError, float); //! error of X coordinate of the event's primary vertex
DECLARE_SOA_COLUMN(KfYPVError, kfYPVError, float); //! error of Y coordinate of the event's primary vertex
DECLARE_SOA_COLUMN(KfZPVError, kfZPVError, float); //! error of Z coordinate of the event's primary vertex
DECLARE_SOA_COLUMN(KfXError, kfXError, float); //! error of candidate's decay point X coordinate from the KFParticle fit
DECLARE_SOA_COLUMN(KfYError, kfYError, float); //! error of candidate's decay point Y coordinate from the KFParticle fit
DECLARE_SOA_COLUMN(KfZError, kfZError, float); //! error of candidate's decay point Z coordinate from the KFParticle fit
DECLARE_SOA_COLUMN(KfMassPKPi, kfMassPKPi, float); //! mass of the PKPi candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfMassPiKP, kfMassPiKP, float); //! mass of the PiKP candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfMassPiKPi, kfMassPiKPi, float); //! mass of the PiKPi candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfMassKKPi, kfMassKKPi, float); //! mass of the KKPi candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfMassPiKK, kfMassPiKK, float); //! mass of the PiKK candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfMassKPi, kfMassKPi, float); //! mass of the KPi pair from the KFParticle fit
DECLARE_SOA_COLUMN(KfMassPiK, kfMassPiK, float); //! mass of the PiK pair from the KFParticle fit
DECLARE_SOA_COLUMN(KfPx, kfPx, float); //! Px of the candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfPy, kfPy, float); //! Py of the candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfPz, kfPz, float); //! Pz of the candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfErrorPx, kfErrorPx, float); //! Px error of the candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfErrorPy, kfErrorPy, float); //! Py error of the candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfErrorPz, kfErrorPz, float); //! Pz error of the candidate from the KFParticle fit
DECLARE_SOA_COLUMN(KfChi2PrimProng0, kfChi2PrimProng0, float); //! chi2 primary of the first prong
DECLARE_SOA_COLUMN(KfChi2PrimProng1, kfChi2PrimProng1, float); //! chi2 primary of the second prong
DECLARE_SOA_COLUMN(KfChi2PrimProng2, kfChi2PrimProng2, float); //! chi2 primary of the third prong
DECLARE_SOA_COLUMN(KfDcaProng0Prong1, kfDcaProng0Prong1, float); //! DCA between first and second prongs
DECLARE_SOA_COLUMN(KfDcaProng0Prong2, kfDcaProng0Prong2, float); //! DCA between first and third prongs
DECLARE_SOA_COLUMN(KfDcaProng1Prong2, kfDcaProng1Prong2, float); //! DCA between second and third prongs
DECLARE_SOA_COLUMN(KfChi2GeoProng0Prong1, kfChi2GeoProng0Prong1, float); //! chi2 geo between first and second prongs
DECLARE_SOA_COLUMN(KfChi2GeoProng0Prong2, kfChi2GeoProng0Prong2, float); //! chi2 geo between first and third prongs
DECLARE_SOA_COLUMN(KfChi2GeoProng1Prong2, kfChi2GeoProng1Prong2, float); //! chi2 geo between second and third prongs
DECLARE_SOA_COLUMN(KfChi2Geo, kfChi2Geo, float); //! chi2 geo of the full candidate
DECLARE_SOA_COLUMN(KfChi2Topo, kfChi2Topo, float); //! chi2 topo of the full candidate (chi2prim of candidate to PV)
DECLARE_SOA_COLUMN(KfDecayLength, kfDecayLength, float); //! decay length
DECLARE_SOA_COLUMN(KfDecayLengthError, kfDecayLengthError, float); //! decay length error

} // namespace hf_cand_3prong

// 3-prong decay candidate table
Expand Down Expand Up @@ -1005,6 +1039,17 @@

using HfCand3Prong = HfCand3ProngExt;

DECLARE_SOA_TABLE(HfCand3ProngKF, "AOD", "HFCAND3PKF",
hf_cand_3prong::KfXError, hf_cand_3prong::KfYError, hf_cand_3prong::KfZError,
hf_cand_3prong::KfXPVError, hf_cand_3prong::KfYPVError, hf_cand_3prong::KfZPVError,
hf_cand_3prong::KfMassPKPi, hf_cand_3prong::KfMassPiKP, hf_cand_3prong::KfMassPiKPi, hf_cand_3prong::KfMassKKPi, hf_cand_3prong::KfMassPiKK, hf_cand_3prong::KfMassKPi, hf_cand_3prong::KfMassPiK,
hf_cand_3prong::KfPx, hf_cand_3prong::KfPy, hf_cand_3prong::KfPz,
hf_cand_3prong::KfErrorPx, hf_cand_3prong::KfErrorPy, hf_cand_3prong::KfErrorPz,
hf_cand_3prong::KfChi2PrimProng0, hf_cand_3prong::KfChi2PrimProng1, hf_cand_3prong::KfChi2PrimProng2,
hf_cand_3prong::KfDcaProng1Prong2, hf_cand_3prong::KfDcaProng0Prong2, hf_cand_3prong::KfDcaProng0Prong1,
hf_cand_3prong::KfChi2GeoProng1Prong2, hf_cand_3prong::KfChi2GeoProng0Prong2, hf_cand_3prong::KfChi2GeoProng0Prong1,
hf_cand_3prong::KfChi2Geo, hf_cand_3prong::KfDecayLength, hf_cand_3prong::KfDecayLengthError, hf_cand_3prong::KfChi2Topo);

// table with results of reconstruction level MC matching
DECLARE_SOA_TABLE(HfCand3ProngMcRec, "AOD", "HFCAND3PMCREC", //!
hf_cand_3prong::FlagMcMatchRec,
Expand Down Expand Up @@ -1231,10 +1276,10 @@
DECLARE_SOA_COLUMN(CosPAXYV0, cosPAXYV0, float);
DECLARE_SOA_COLUMN(CosPAXYCharmBaryon, cosPAXYCharmBaryon, float);
DECLARE_SOA_COLUMN(CosPAXYCasc, cosPAXYCasc, float);
DECLARE_SOA_COLUMN(CTauOmegac, ctauOmegac, float);

Check warning on line 1279 in PWGHF/DataModel/CandidateReconstructionTables.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(CTauCascade, ctauCascade, float);

Check warning on line 1280 in PWGHF/DataModel/CandidateReconstructionTables.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(CTauV0, ctauV0, float);

Check warning on line 1281 in PWGHF/DataModel/CandidateReconstructionTables.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(CTauXic, ctauXic, float);

Check warning on line 1282 in PWGHF/DataModel/CandidateReconstructionTables.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(EtaV0PosDau, etaV0PosDau, float);
DECLARE_SOA_COLUMN(EtaV0NegDau, etaV0NegDau, float);
DECLARE_SOA_COLUMN(EtaBachFromCasc, etaBachFromCasc, float);
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ o2physics_add_dpl_workflow(candidate-creator-2prong

o2physics_add_dpl_workflow(candidate-creator-3prong
SOURCES candidateCreator3Prong.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(candidate-creator-b0
Expand Down
Loading
Loading