Skip to content

Commit d3801a0

Browse files
committed
Add more single track variables
1 parent 29b6a32 commit d3801a0

File tree

4 files changed

+150
-61
lines changed

4 files changed

+150
-61
lines changed

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ DECLARE_SOA_COLUMN(HasTOFProng2, hasTOFProng2, bool);
189189
DECLARE_SOA_COLUMN(ItsNCls, itsNCls, int); //! Number of clusters in ITS
190190
DECLARE_SOA_COLUMN(TpcNClsCrossedRows, tpcNClsCrossedRows, int); //! Number of TPC crossed rows
191191
DECLARE_SOA_COLUMN(TpcChi2NCl, tpcChi2NCl, float); //! TPC chi2
192+
DECLARE_SOA_COLUMN(ItsChi2NCl, itsChi2NCl, float); //! ITS chi2
192193
DECLARE_SOA_COLUMN(ItsNClsProngMin, itsNClsProngMin, int); //! minimum value of number of ITS clusters for the decay daughter tracks
193194
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsProngMin, tpcNClsCrossedRowsProngMin, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks
194195
DECLARE_SOA_COLUMN(TpcChi2NClProngMax, tpcChi2NClProngMax, float); //! maximum value of TPC chi2 for the decay daughter tracks
@@ -299,6 +300,7 @@ DECLARE_SOA_TABLE(HfRedBach0Bases, "AOD", "HFREDBACH0BASE", //! Table with track
299300
hf_track_vars_reduced::ItsNCls,
300301
hf_track_vars_reduced::TpcNClsCrossedRows,
301302
hf_track_vars_reduced::TpcChi2NCl,
303+
hf_track_vars_reduced::ItsChi2NCl,
302304
hf_track_vars_reduced::HasTPC,
303305
hf_track_vars_reduced::HasTOF,
304306
pidtpc::TPCNSigmaPi,
@@ -330,6 +332,7 @@ DECLARE_SOA_TABLE(HfRedBach1Bases, "AOD", "HFREDBACH1BASE", //! Table with track
330332
hf_track_vars_reduced::ItsNCls,
331333
hf_track_vars_reduced::TpcNClsCrossedRows,
332334
hf_track_vars_reduced::TpcChi2NCl,
335+
hf_track_vars_reduced::ItsChi2NCl,
333336
hf_track_vars_reduced::HasTPC,
334337
hf_track_vars_reduced::HasTOF,
335338
pidtpc::TPCNSigmaPi,
@@ -388,6 +391,16 @@ DECLARE_SOA_COLUMN(ProngPosId, prongPosId, int); //! Original track
388391
DECLARE_SOA_COLUMN(ProngNegId, prongNegId, int); //! Original track index
389392
DECLARE_SOA_COLUMN(HfRedCollisionId, hfRedCollisionId, int); //! Collision index
390393
DECLARE_SOA_COLUMN(M, m, float); //! Invariant mass of candidate in GeV/c2
394+
395+
DECLARE_SOA_COLUMN(ItsNClsDauPos, itsNClsDauPos, int); //! Number of clusters in ITS
396+
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsDauPos, tpcNClsCrossedRowsDauPos, int); //! Number of TPC crossed rows
397+
DECLARE_SOA_COLUMN(TpcChi2NClDauPos, tpcChi2NClDauPos, float); //! TPC chi2 / Number of clusters
398+
DECLARE_SOA_COLUMN(ItsChi2NClDauPos, itsChi2NClDauPos, float); //! ITS chi2 / Number of clusters
399+
DECLARE_SOA_COLUMN(ItsNClsDauNeg, itsNClsDauNeg, int); //! Number of clusters in ITS
400+
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsDauNeg, tpcNClsCrossedRowsDauNeg, int); //! Number of TPC crossed rows
401+
DECLARE_SOA_COLUMN(TpcChi2NClDauNeg, tpcChi2NClDauNeg, float); //! TPC chi2 / Number of clusters
402+
DECLARE_SOA_COLUMN(ItsChi2NClDauNeg, itsChi2NClDauNeg, float); //! ITS chi2 / Number of clusters
403+
391404
DECLARE_SOA_COLUMN(XDauPos, xDauPos, float); //! x
392405
DECLARE_SOA_COLUMN(XDauNeg, xDauNeg, float); //! x
393406
DECLARE_SOA_COLUMN(YDauPos, yDauPos, float); //! y
@@ -556,6 +569,14 @@ DECLARE_SOA_TABLE(HfRedJpsis, "AOD", "HFREDJPSI", //! Table with J/Psi candidate
556569
hf_track_index_reduced::HfRedCollisionId,
557570
hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex,
558571
hf_jpsi_cand_reduced::M,
572+
hf_jpsi_cand_reduced::ItsNClsDauPos,
573+
hf_jpsi_cand_reduced::TpcNClsCrossedRowsDauPos,
574+
hf_jpsi_cand_reduced::TpcChi2NClDauPos,
575+
hf_jpsi_cand_reduced::ItsChi2NClDauPos,
576+
hf_jpsi_cand_reduced::ItsNClsDauNeg,
577+
hf_jpsi_cand_reduced::TpcNClsCrossedRowsDauNeg,
578+
hf_jpsi_cand_reduced::TpcChi2NClDauNeg,
579+
hf_jpsi_cand_reduced::ItsChi2NClDauNeg,
559580
hf_jpsi_cand_reduced::XDauPos, hf_jpsi_cand_reduced::XDauNeg,
560581
hf_jpsi_cand_reduced::YDauPos, hf_jpsi_cand_reduced::YDauNeg,
561582
hf_jpsi_cand_reduced::ZDauPos, hf_jpsi_cand_reduced::ZDauNeg,

PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ struct HfDataCreatorJpsiHadReduced {
896896
trackParCovBach.getX(), trackParCovBach.getAlpha(),
897897
trackParCovBach.getY(), trackParCovBach.getZ(), trackParCovBach.getSnp(),
898898
trackParCovBach.getTgl(), trackParCovBach.getQ2Pt(),
899-
trackBach.itsNCls(), trackBach.tpcNClsCrossedRows(), trackBach.tpcChi2NCl(),
899+
trackBach.itsNCls(), trackBach.tpcNClsCrossedRows(), trackBach.tpcChi2NCl(), trackBach.itsChi2NCl(),
900900
trackBach.hasTPC(), trackBach.hasTOF(),
901901
trackBach.tpcNSigmaPi(), trackBach.tofNSigmaPi(),
902902
trackBach.tpcNSigmaKa(), trackBach.tofNSigmaKa(),
@@ -993,7 +993,7 @@ struct HfDataCreatorJpsiHadReduced {
993993
trackParCovBach.getX(), trackParCovBach.getAlpha(),
994994
trackParCovBach.getY(), trackParCovBach.getZ(), trackParCovBach.getSnp(),
995995
trackParCovBach.getTgl(), trackParCovBach.getQ2Pt(),
996-
trackBach.itsNCls(), trackBach.tpcNClsCrossedRows(), trackBach.tpcChi2NCl(),
996+
trackBach.itsNCls(), trackBach.tpcNClsCrossedRows(), trackBach.tpcChi2NCl(), trackBach.itsChi2NCl(),
997997
trackBach.hasTPC(), trackBach.hasTOF(),
998998
trackBach.tpcNSigmaPi(), trackBach.tofNSigmaPi(),
999999
trackBach.tpcNSigmaKa(), trackBach.tofNSigmaKa(),
@@ -1017,7 +1017,7 @@ struct HfDataCreatorJpsiHadReduced {
10171017
trackBach2ParCov.getX(), trackBach2ParCov.getAlpha(),
10181018
trackBach2ParCov.getY(), trackBach2ParCov.getZ(), trackBach2ParCov.getSnp(),
10191019
trackBach2ParCov.getTgl(), trackBach2ParCov.getQ2Pt(),
1020-
trackBach2.itsNCls(), trackBach2.tpcNClsCrossedRows(), trackBach2.tpcChi2NCl(),
1020+
trackBach2.itsNCls(), trackBach2.tpcNClsCrossedRows(), trackBach2.tpcChi2NCl(), trackBach2.itsChi2NCl(),
10211021
trackBach2.hasTPC(), trackBach2.hasTOF(),
10221022
trackBach2.tpcNSigmaPi(), trackBach2.tofNSigmaPi(),
10231023
trackBach2.tpcNSigmaKa(), trackBach2.tofNSigmaKa(),
@@ -1057,6 +1057,8 @@ struct HfDataCreatorJpsiHadReduced {
10571057
indexHfReducedCollision,
10581058
candidate.xSecondaryVertex(), candidate.ySecondaryVertex(), candidate.zSecondaryVertex(),
10591059
invMassJpsi,
1060+
trackPos.itsNCls(), trackPos.tpcNClsCrossedRows(), trackPos.tpcChi2NCl(), trackPos.itsChi2NCl(),
1061+
trackNeg.itsNCls(), trackNeg.tpcNClsCrossedRows(), trackNeg.tpcChi2NCl(), trackNeg.itsChi2NCl(),
10601062
trackPosParCov.getX(), trackNegParCov.getX(),
10611063
trackPosParCov.getY(), trackNegParCov.getY(),
10621064
trackPosParCov.getZ(), trackNegParCov.getZ(),

PWGHF/D2H/Tasks/taskBplusToJpsiKReduced.cxx

Lines changed: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,21 @@ namespace hf_cand_bplustojpsik_lite
6363
{
6464
DECLARE_SOA_COLUMN(PtJpsi, ptJpsi, float); //! Transverse momentum of Jpsi daughter candidate (GeV/c)
6565
DECLARE_SOA_COLUMN(PtBach, ptBach, float); //! Transverse momentum of bachelor kaon (GeV/c)
66-
// DECLARE_SOA_COLUMN(AbsEtaBach, absEtaBach, float); //! Absolute pseudorapidity of bachelor kaon
67-
// DECLARE_SOA_COLUMN(ItsNClsBach, itsNClsBach, int); //! Number of ITS clusters of bachelor kaon
68-
// DECLARE_SOA_COLUMN(TpcNClsCrossedRowsBach, tpcNClsCrossedRowsBach, int); //! Number of TPC crossed rows of prongs of bachelor kaon
69-
// DECLARE_SOA_COLUMN(TpcChi2NClBach, tpcChi2NClBach, float); //! Maximum TPC chi2 of prongs of Jpsi-meson daughter candidate
70-
// DECLARE_SOA_COLUMN(PtJpsiProngMin, ptJpsiProngMin, float); //! Minimum pT of prongs of Jpsi daughter candidate (GeV/c)
71-
// DECLARE_SOA_COLUMN(AbsEtaJpsiProngMin, absEtaJpsiProngMin, float); //! Minimum absolute pseudorapidity of prongs of Jpsi daughter candidate
72-
// DECLARE_SOA_COLUMN(ItsNClsJpsiProngMin, itsNClsJpsiProngMin, int); //! Minimum number of ITS clusters of prongs of Jpsi daughter candidate
73-
// DECLARE_SOA_COLUMN(TpcNClsCrossedRowsJpsiProngMin, tpcNClsCrossedRowsJpsiProngMin, int); //! Minimum number of TPC crossed rows of prongs of Jpsi daughter candidate
74-
// DECLARE_SOA_COLUMN(TpcChi2NClJpsiProngMax, tpcChi2NClJpsiProngMax, float); //! Maximum TPC chi2 of prongs of Jpsi daughter candidate
66+
DECLARE_SOA_COLUMN(ItsNClsJpsiDauPos, itsNClsJpsiDauPos, int); //! Number of clusters in ITS
67+
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsJpsiDauPos, tpcNClsCrossedRowsJpsiDauPos, int); //! Number of TPC crossed rows
68+
DECLARE_SOA_COLUMN(ItsChi2NClJpsiDauPos, itsChi2NClJpsiDauPos, float); //! ITS chi2 / Number of clusters
69+
DECLARE_SOA_COLUMN(TpcChi2NClJpsiDauPos, tpcChi2NClJpsiDauPos, float); //! TPC chi2 / Number of clusters
70+
DECLARE_SOA_COLUMN(AbsEtaJpsiDauPos, absEtaJpsiDauPos, float); //! |eta|
71+
DECLARE_SOA_COLUMN(ItsNClsJpsiDauNeg, itsNClsJpsiDauNeg, int); //! Number of clusters in ITS
72+
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsJpsiDauNeg, tpcNClsCrossedRowsJpsiDauNeg, int); //! Number of TPC crossed rows
73+
DECLARE_SOA_COLUMN(ItsChi2NClJpsiDauNeg, itsChi2NClJpsiDauNeg, float); //! ITS chi2 / Number of clusters
74+
DECLARE_SOA_COLUMN(TpcChi2NClJpsiDauNeg, tpcChi2NClJpsiDauNeg, float); //! TPC chi2 / Number of clusters
75+
DECLARE_SOA_COLUMN(AbsEtaJpsiDauNeg, absEtaJpsiDauNeg, float); //! |eta|
76+
DECLARE_SOA_COLUMN(ItsNClsLfTrack0, itsNClsLfTrack0, int); //! Number of clusters in ITS
77+
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsLfTrack0, tpcNClsCrossedRowsLfTrack0, int); //! Number of TPC crossed rows
78+
DECLARE_SOA_COLUMN(ItsChi2NClLfTrack0, itsChi2NClLfTrack0, float); //! ITS chi2 / Number of clusters
79+
DECLARE_SOA_COLUMN(TpcChi2NClLfTrack0, tpcChi2NClLfTrack0, float); //! TPC chi2 / Number of clusters
80+
DECLARE_SOA_COLUMN(AbsEtaLfTrack0, absEtaLfTrack0, float); //! |eta|
7581
DECLARE_SOA_COLUMN(MJpsi, mJpsi, float); //! Invariant mass of Jpsi daughter candidates (GeV/c)
7682
DECLARE_SOA_COLUMN(M, m, float); //! Invariant mass of candidate (GeV/c2)
7783
DECLARE_SOA_COLUMN(Pt, pt, float); //! Transverse momentum of candidate (GeV/c)
@@ -134,17 +140,24 @@ DECLARE_SOA_TABLE(HfRedCandBpLites, "AOD", "HFREDCANDBPLITE", //! Table with som
134140
hf_cand_bplustojpsik_lite::ImpactParameterJpsiDauPos,
135141
hf_cand_bplustojpsik_lite::ImpactParameterJpsiDauNeg,
136142
hf_cand_bplustojpsik_lite::ImpactParameterLfTrack0,
137-
// hf_cand_bplustojpsik_lite::PtJpsiProngMin,
138-
// hf_cand_bplustojpsik_lite::AbsEtaJpsiProngMin,
139-
// hf_cand_bplustojpsik_lite::ItsNClsJpsiProngMin,
140-
// hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsJpsiProngMin,
141-
// hf_cand_bplustojpsik_lite::TpcChi2NClJpsiProngMax,
143+
// Jpsi daughter features
144+
hf_cand_bplustojpsik_lite::ItsNClsJpsiDauPos,
145+
hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsJpsiDauPos,
146+
hf_cand_bplustojpsik_lite::ItsChi2NClJpsiDauPos,
147+
hf_cand_bplustojpsik_lite::TpcChi2NClJpsiDauPos,
148+
hf_cand_bplustojpsik_lite::AbsEtaJpsiDauPos,
149+
hf_cand_bplustojpsik_lite::ItsNClsJpsiDauNeg,
150+
hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsJpsiDauNeg,
151+
hf_cand_bplustojpsik_lite::ItsChi2NClJpsiDauNeg,
152+
hf_cand_bplustojpsik_lite::TpcChi2NClJpsiDauNeg,
153+
hf_cand_bplustojpsik_lite::AbsEtaJpsiDauNeg,
142154
// kaon features
143155
hf_cand_bplustojpsik_lite::PtBach,
144-
// hf_cand_bplustojpsik_lite::AbsEtaBach,
145-
// hf_cand_bplustojpsik_lite::ItsNClsBach,
146-
// hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsBach,
147-
// hf_cand_bplustojpsik_lite::TpcChi2NClBach,
156+
hf_cand_bplustojpsik_lite::ItsNClsLfTrack0,
157+
hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsLfTrack0,
158+
hf_cand_bplustojpsik_lite::ItsChi2NClLfTrack0,
159+
hf_cand_bplustojpsik_lite::TpcChi2NClLfTrack0,
160+
hf_cand_bplustojpsik_lite::AbsEtaLfTrack0,
148161
hf_cand_bplustojpsik_lite::NSigTpcKaBachelor,
149162
hf_cand_bplustojpsik_lite::NSigTofKaBachelor,
150163
hf_cand_bplustojpsik_lite::NSigTpcTofKaBachelor,
@@ -306,6 +319,14 @@ struct HfTaskBplusToJpsiKReduced {
306319
return std::abs(etaProng) <= etaTrackMax && ptProng >= ptTrackMin;
307320
}
308321

322+
/// Calculate pseudorapidity from track tan(lambda)
323+
/// \param tgl is the track tangent of the dip angle
324+
/// \return pseudorapidity
325+
inline float absEta(float tgl)
326+
{
327+
return std::abs(std::log(std::tan(o2::constants::math::PIQuarter - 0.5f * std::atan(tgl))));
328+
}
329+
309330
/// Fill candidate information at reconstruction level
310331
/// \param doMc is the flag to enable the filling with MC information
311332
/// \param withBplusMl is the flag to enable the filling with ML scores for the B+ candidate
@@ -415,17 +436,23 @@ struct HfTaskBplusToJpsiKReduced {
415436
candidate.impactParameter0(),
416437
candidate.impactParameter1(),
417438
candidate.impactParameter2(),
418-
// candJpsi.ptProngMin(),
419-
// candJpsi.absEtaProngMin(),
420-
// candJpsi.itsNClsProngMin(),
421-
// candJpsi.tpcNClsCrossedRowsProngMin(),
422-
// candJpsi.tpcChi2NClProngMax(),
439+
candJpsi.itsNClsDauPos(),
440+
candJpsi.tpcNClsCrossedRowsDauPos(),
441+
candJpsi.itsChi2NClDauPos(),
442+
candJpsi.tpcChi2NClDauPos(),
443+
absEta(candJpsi.tglDauPos()),
444+
candJpsi.itsNClsDauNeg(),
445+
candJpsi.tpcNClsCrossedRowsDauNeg(),
446+
candJpsi.itsChi2NClDauNeg(),
447+
candJpsi.tpcChi2NClDauNeg(),
448+
absEta(candJpsi.tglDauNeg()),
423449
// kaon features
424450
candidate.ptProng1(),
425-
// std::abs(RecoDecay::eta(candKa.pVector())),
426-
// candKa.itsNCls(),
427-
// candKa.tpcNClsCrossedRows(),
428-
// candKa.tpcChi2NCl(),
451+
candKa.itsNCls(),
452+
candKa.tpcNClsCrossedRows(),
453+
candKa.itsChi2NCl(),
454+
candKa.tpcChi2NCl(),
455+
absEta(candKa.tgl()),
429456
candKa.tpcNSigmaKa(),
430457
candKa.tofNSigmaKa(),
431458
candKa.tpcTofNSigmaKa(),

0 commit comments

Comments
 (0)