You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DECLARE_SOA_COLUMN(MCMultiplicity, mcMultiplicity, float); //! MC Multiplicity
83
+
DECLARE_SOA_COLUMN(MCMultiplicity, mcMultiplicity, float); //! MC Multiplicity, o2-linter: disable=name/o2-column (pre-existing public column name kept for schema and API compatibility)
DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex
217
217
DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex
218
218
DECLARE_SOA_COLUMN(Alpha, alpha, float); //! Alpha of the decay vertex
219
-
DECLARE_SOA_COLUMN(QtArm, qtarm, float); //! Armenteros Qt of the decay vertex
219
+
DECLARE_SOA_COLUMN(QtArm, qtarm, float); //! Armenteros Qt of the decay vertex, o2-linter: disable=name/o2-column (pre-existing public column name kept for schema and API compatibility)
220
220
DECLARE_SOA_COLUMN(TpcSignal10, tpcSignal10, int16_t); //! TPC signal of the track x10
221
221
DECLARE_SOA_COLUMN(DaughterTPCNSigmaPosPi10, daughterTPCNSigmaPosPi10, int8_t); //! TPC PID x10 of the positive daughter as Pion
222
222
DECLARE_SOA_COLUMN(DaughterTPCNSigmaPosKa10, daughterTPCNSigmaPosKa10, int8_t); //! TPC PID x10 of the positive daughter as Kaon
@@ -359,6 +359,10 @@ namespace resomicrodaughter
359
359
360
360
/// @brief Save TPC & TOF nSigma info with 8-bit variable
361
361
structPidNSigma {
362
+
staticconstexprdouble MinNSigma = 1.5;
363
+
staticconstexprdouble NSigmaStep = 0.2;
364
+
staticconstexpruint8_t MaxNSigmaCode = 10;
365
+
362
366
uint8_t flag;
363
367
364
368
/// @brief Constructor: Convert TPC & TOF values and save
@@ -373,25 +377,25 @@ struct PidNSigma {
373
377
staticuint8_tencodeNSigma(float nSigma)
374
378
{
375
379
constfloat x = std::abs(nSigma);
376
-
if (x <= 1.5)
380
+
if (x <= MinNSigma)
377
381
return0; // Return 0 when absolute nSigma is smaller than 1.5
378
-
float t = (x - 1.5) / 0.2;
382
+
float t = (x - MinNSigma) / NSigmaStep;
379
383
int encoded = static_cast<int>(std::ceil(t)); // (1.5,1.7]->1, ..., (3.3,3.5]->10
380
384
if (encoded < 1)
381
385
encoded = 1;
382
-
if (encoded > 10)
383
-
encoded = 10;
386
+
if (encoded > MaxNSigmaCode)
387
+
encoded = MaxNSigmaCode;
384
388
returnstatic_cast<uint8_t>(encoded);
385
389
}
386
390
387
391
/// @brief Decode 0~10 value to original 1.5~3.5 sigma range
0 commit comments