Skip to content

Commit 8ddc5a5

Browse files
committed
rename lifetime -> decay time
1 parent 2f2c4e0 commit 8ddc5a5

2 files changed

Lines changed: 29 additions & 29 deletions

File tree

PWGHF/D2H/Tasks/taskLc.cxx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct HfTaskLc {
7474
Configurable<bool> fillTHn{"fillTHn", false, "fill THn"};
7575
Configurable<bool> storeOccupancy{"storeOccupancy", true, "Flag to store occupancy information"};
7676
Configurable<int> occEstimator{"occEstimator", 2, "Occupancy estimation (None: 0, ITS: 1, FT0C: 2)"};
77-
Configurable<bool> storeProperLifetime{"storeProperLifetime", false, "Flag to store proper lifetime"};
77+
Configurable<bool> storeProperDecayTime{"storeProperDecayTime", false, "Flag to store proper decay time"};
7878
// CCDB configuration
7979
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
8080
Configurable<std::string> ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"};
@@ -117,11 +117,11 @@ struct HfTaskLc {
117117
ConfigurableAxis thnConfigAxisGenPtB{"thnConfigAxisGenPtB", {1000, 0, 100}, "Gen Pt B"};
118118
ConfigurableAxis thnConfigAxisNumPvContr{"thnConfigAxisNumPvContr", {200, -0.5, 199.5}, "Number of PV contributors"};
119119
ConfigurableAxis thnConfigAxisOccupancy{"thnConfigAxisOccupancy", {14, 0, 14000}, "axis for centrality"};
120-
ConfigurableAxis thnConfigAxisProperLifetime{"thnConfigAxisProperLifetime", {200, 0, 2}, "Proper lifetime, ps"};
120+
ConfigurableAxis thnConfigAxisProperDecayTime{"thnConfigAxisProperDecayTime", {200, 0, 2}, "Proper decay time, ps"};
121121
HistogramRegistry registry{"registry", {}};
122122

123123
// Factors for conversion between units
124-
constexpr static float CtToProperLifetimePs = 1.f / o2::constants::physics::LightSpeedCm2PS;
124+
constexpr static float CtToProperDecayTimePs = 1.f / o2::constants::physics::LightSpeedCm2PS;
125125
constexpr static float NanoToPico = 1000.f;
126126
// Names of folders and suffixes for MC signal histograms
127127
constexpr static std::string_view SignalFolders[] = {"signal", "prompt", "nonprompt"};
@@ -186,8 +186,8 @@ struct HfTaskLc {
186186
addHistogramsRec("hDecLength", "decay length (cm)", "entries", {HistType::kTH1F, {{400, 0., 1.}}});
187187
/// decay length xy candidate
188188
addHistogramsRec("hDecLengthxy", "decay length xy (cm)", "entries", {HistType::kTH1F, {{400, 0., 1.}}});
189-
/// proper lifetime
190-
addHistogramsRec("hCt", "proper lifetime (#Lambda_{c}) * #it{c} (cm)", "entries", {HistType::kTH1F, {{100, 0., 0.2}}});
189+
/// proper decay time
190+
addHistogramsRec("hCt", "proper decay time (#Lambda_{c}) * #it{c} (cm)", "entries", {HistType::kTH1F, {{100, 0., 0.2}}});
191191
/// cosine of pointing angle
192192
addHistogramsRec("hCPA", "cosine of pointing angle", "entries", {HistType::kTH1F, {{110, -1.1, 1.1}}});
193193
/// cosine of pointing angle xy
@@ -219,8 +219,8 @@ struct HfTaskLc {
219219
/// decay length xy candidate
220220
addHistogramsRec("hDecLengthxyVsPt", "decay length xy (cm)", "#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {{400, 0., 1.}, {vbins}}});
221221

222-
/// proper lifetime
223-
addHistogramsRec("hCtVsPt", "proper lifetime (#Lambda_{c}) * #it{c} (cm)", "#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {{100, 0., 0.2}, {vbins}}});
222+
/// proper decay time
223+
addHistogramsRec("hCtVsPt", "proper decay time (#Lambda_{c}) * #it{c} (cm)", "#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {{100, 0., 0.2}, {vbins}}});
224224

225225
/// cosine of pointing angle
226226
addHistogramsRec("hCPAVsPt", "cosine of pointing angle", "#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {{110, -1.1, 1.1}, {vbins}}});
@@ -268,7 +268,7 @@ struct HfTaskLc {
268268
const AxisSpec thnAxisPtB{thnConfigAxisGenPtB, "#it{p}_{T}^{B} (GeV/#it{c})"};
269269
const AxisSpec thnAxisTracklets{thnConfigAxisNumPvContr, "Number of PV contributors"};
270270
const AxisSpec thnAxisOccupancy{thnConfigAxisOccupancy, "Occupancy"};
271-
const AxisSpec thnAxisProperLifetime{thnConfigAxisProperLifetime, "T_{proper} (ps)"};
271+
const AxisSpec thnAxisProperDecayTime{thnConfigAxisProperDecayTime, "#it{t}_{proper} (ps)"};
272272

273273
bool const isDataWithMl = doprocessDataWithMl || doprocessDataWithMlWithFT0C || doprocessDataWithMlWithFT0M;
274274
bool const isMcWithMl = doprocessMcWithMl || doprocessMcWithMlWithFT0C || doprocessMcWithMlWithFT0M;
@@ -300,10 +300,10 @@ struct HfTaskLc {
300300
}
301301
}
302302
}
303-
if (storeProperLifetime) {
303+
if (storeProperDecayTime) {
304304
for (const auto& axes : std::array<std::vector<AxisSpec>*, 3>{&axesWithBdt, &axesStd, &axesGen}) {
305305
if (!axes->empty()) {
306-
axes->push_back(thnAxisProperLifetime);
306+
axes->push_back(thnAxisProperDecayTime);
307307
}
308308
}
309309
}
@@ -438,7 +438,7 @@ struct HfTaskLc {
438438
occ = o2::hf_occupancy::getOccupancyColl(collision, occEstimator);
439439
}
440440
double outputBkg(-1), outputPrompt(-1), outputFD(-1);
441-
const float properLifetime = HfHelper::ctLc(candidate) * CtToProperLifetimePs;
441+
const float properDecayTime = HfHelper::ctLc(candidate) * CtToProperDecayTimePs;
442442

443443
auto fillTHnRecSig = [&](bool isPKPi) {
444444
const auto massLc = isPKPi ? HfHelper::invMassLcToPKPi(candidate) : HfHelper::invMassLcToPiKP(candidate);
@@ -461,8 +461,8 @@ struct HfTaskLc {
461461
if (storeOccupancy && occEstimator != o2::hf_occupancy::OccupancyEstimator::None) {
462462
valuesToFill.push_back(occ);
463463
}
464-
if (storeProperLifetime) {
465-
valuesToFill.push_back(properLifetime);
464+
if (storeProperDecayTime) {
465+
valuesToFill.push_back(properDecayTime);
466466
}
467467
if constexpr (FillMl) {
468468
registry.get<THnSparse>(HIST("hnLcVarsWithBdt"))->Fill(valuesToFill.data());
@@ -524,8 +524,8 @@ struct HfTaskLc {
524524

525525
const auto& mcDaughter0 = particle.template daughters_as<soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>>().begin();
526526
const float p2m = particle.p() / o2::constants::physics::MassLambdaCPlus;
527-
const float gamma = std::sqrt(1 + p2m * p2m); // mother's particle Lorentz factor
528-
const float properLifetime = mcDaughter0.vt() * NanoToPico / gamma; // from ns to ps * from lab time to proper time
527+
const float gamma = std::sqrt(1 + p2m * p2m); // mother's particle Lorentz factor
528+
const float properDecayTime = mcDaughter0.vt() * NanoToPico / gamma; // from ns to ps * from lab time to proper time
529529

530530
fillHistogramsGen<Signal>(particle);
531531

@@ -537,8 +537,8 @@ struct HfTaskLc {
537537
if (storeOccupancy && occEstimator != o2::hf_occupancy::OccupancyEstimator::None) {
538538
valuesToFill.push_back(occ);
539539
}
540-
if (storeProperLifetime) {
541-
valuesToFill.push_back(properLifetime);
540+
if (storeProperDecayTime) {
541+
valuesToFill.push_back(properDecayTime);
542542
}
543543
registry.get<THnSparse>(HIST("hnLcVarsGen"))->Fill(valuesToFill.data());
544544
}
@@ -631,7 +631,7 @@ struct HfTaskLc {
631631
occ = o2::hf_occupancy::getOccupancyColl(collision, occEstimator);
632632
}
633633
double outputBkg(-1), outputPrompt(-1), outputFD(-1);
634-
const float properLifetime = HfHelper::ctLc(candidate) * CtToProperLifetimePs;
634+
const float properDecayTime = HfHelper::ctLc(candidate) * CtToProperDecayTimePs;
635635

636636
auto fillTHnData = [&](bool isPKPi) {
637637
const auto massLc = isPKPi ? HfHelper::invMassLcToPKPi(candidate) : HfHelper::invMassLcToPiKP(candidate);
@@ -654,8 +654,8 @@ struct HfTaskLc {
654654
if (storeOccupancy && occEstimator != o2::hf_occupancy::OccupancyEstimator::None) {
655655
valuesToFill.push_back(occ);
656656
}
657-
if (storeProperLifetime) {
658-
valuesToFill.push_back(properLifetime);
657+
if (storeProperDecayTime) {
658+
valuesToFill.push_back(properDecayTime);
659659
}
660660
if constexpr (FillMl) {
661661
registry.get<THnSparse>(HIST("hnLcVarsWithBdt"))->Fill(valuesToFill.data());

PWGHF/TableProducer/treeCreatorLcToPKPi.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ DECLARE_SOA_COLUMN(Chi2Topo, chi2Topo, float); //! chi
144144
DECLARE_SOA_COLUMN(DecayLength, decayLength, float); //! decay length, cm
145145
DECLARE_SOA_COLUMN(DecayLengthError, decayLengthError, float); //! decay length error
146146
DECLARE_SOA_COLUMN(DecayLengthNormalised, decayLengthNormalised, float); //! decay length over its error
147-
DECLARE_SOA_COLUMN(T, t, float); //! proper lifetime, ps
148-
DECLARE_SOA_COLUMN(ErrT, errT, float); //! lifetime error
147+
DECLARE_SOA_COLUMN(T, t, float); //! proper decay time, ps
148+
DECLARE_SOA_COLUMN(ErrT, errT, float); //! decay time error
149149
DECLARE_SOA_COLUMN(MassInv, massInv, float); //! invariant mass
150150
DECLARE_SOA_COLUMN(P, p, float); //! momentum
151151
DECLARE_SOA_COLUMN(Pt, pt, float); //! transverse momentum
@@ -183,7 +183,7 @@ DECLARE_SOA_COLUMN(XDecay, xDecay, float); //! Secondary (decay) vertex X coordi
183183
DECLARE_SOA_COLUMN(YDecay, yDecay, float); //! Secondary (decay) vertex Y coordinate, cm
184184
DECLARE_SOA_COLUMN(ZDecay, zDecay, float); //! Secondary (decay) vertex Z coordinate, cm
185185
DECLARE_SOA_COLUMN(LDecay, lDecay, float); //! Decay length, cm (distance between PV and SV, curvature is neglected)
186-
DECLARE_SOA_COLUMN(TDecay, tDecay, float); //! Proper lifetime, ps
186+
DECLARE_SOA_COLUMN(TDecay, tDecay, float); //! Proper decay time, ps
187187
DECLARE_SOA_COLUMN(XEvent, xEvent, float); //! Primary (event) vertex X coordinate, cm
188188
DECLARE_SOA_COLUMN(YEvent, yEvent, float); //! Primary (event) vertex Y coordinate, cm
189189
DECLARE_SOA_COLUMN(ZEvent, zEvent, float); //! Primary (event) vertex Z coordinate, cm
@@ -911,15 +911,15 @@ struct HfTreeCreatorLcToPKPi {
911911
const float deltaP = std::sqrt(pt * pt * deltaPt * deltaPt +
912912
candidate.kfPz() * candidate.kfPz() * candidate.kfErrorPz() * candidate.kfErrorPz()) /
913913
p;
914-
const float lifetime = decayLength * static_cast<float>(MassLambdaCPlus) / LightSpeedCm2PS / p;
914+
const float decayTime = decayLength * static_cast<float>(MassLambdaCPlus) / LightSpeedCm2PS / p;
915915
const float deltaT = dl * static_cast<float>(MassLambdaCPlus) / LightSpeedCm2PS / p;
916916
rowCandidateKF(
917917
svX, svY, svZ, svErrX, svErrY, svErrZ,
918918
pvErrX, pvErrY, pvErrZ,
919919
chi2primProton, chi2primKaon, chi2primPion,
920920
dcaProtonKaon, dcaProtonPion, dcaPionKaon,
921921
chi2GeoProtonKaon, chi2GeoProtonPion, chi2GeoPionKaon,
922-
chi2Geo, chi2Topo, decayLength, dl, decayLength / dl, lifetime, deltaT,
922+
chi2Geo, chi2Topo, decayLength, dl, decayLength / dl, decayTime, deltaT,
923923
mass, p, pt, deltaP, deltaPt,
924924
functionSelection, sigbgstatus,
925925
collision.multNTracksPV(),
@@ -983,7 +983,7 @@ struct HfTreeCreatorLcToPKPi {
983983
fillKFTable(candidate, collision, candFlag, functionSelection, sigbgstatus);
984984
}
985985
if (fillCandidateMcTable) {
986-
float p{}, pt{}, svX{}, svY{}, svZ{}, pvX{}, pvY{}, pvZ{}, decayLength{}, lifetime{};
986+
float p{}, pt{}, svX{}, svY{}, svZ{}, pvX{}, pvY{}, pvZ{}, decayLength{}, decayTime{};
987987
if (!isMcCandidateSignal) {
988988
p = UndefValueFloat;
989989
pt = UndefValueFloat;
@@ -994,7 +994,7 @@ struct HfTreeCreatorLcToPKPi {
994994
pvY = UndefValueFloat;
995995
pvZ = UndefValueFloat;
996996
decayLength = UndefValueFloat;
997-
lifetime = UndefValueFloat;
997+
decayTime = UndefValueFloat;
998998
} else {
999999
const auto mcParticleProng0 = candidate.template prong0_as<soa::Join<TracksWPid, o2::aod::McTrackLabels>>().template mcParticle_as<soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>>();
10001000
const auto indexMother = RecoDecay::getMother(particles, mcParticleProng0, o2::constants::physics::Pdg::kLambdaCPlus, true);
@@ -1011,11 +1011,11 @@ struct HfTreeCreatorLcToPKPi {
10111011
svY = mcParticleProng0.vy();
10121012
svZ = mcParticleProng0.vz();
10131013
decayLength = static_cast<float>(RecoDecay::distance(std::array<float, 3>{svX, svY, svZ}, std::array<float, 3>{pvX, pvY, pvZ}));
1014-
lifetime = mcParticleProng0.vt() * NanoToPico / gamma; // from ns to ps * from lab time to proper time
1014+
decayTime = mcParticleProng0.vt() * NanoToPico / gamma; // from ns to ps * from lab time to proper time
10151015
}
10161016
rowCandidateMC(
10171017
p, pt,
1018-
svX, svY, svZ, decayLength, lifetime,
1018+
svX, svY, svZ, decayLength, decayTime,
10191019
pvX, pvY, pvZ);
10201020
}
10211021
}

0 commit comments

Comments
 (0)