From 5f82c8c27ce9342770f66832f563c522a25f0d66 Mon Sep 17 00:00:00 2001 From: Rob Mina Date: Fri, 30 Oct 2026 06:35:45 -0500 Subject: [PATCH] Add TrkFitFlag to ntuple. --- inc/TrkInfo.hh | 1 + src/InfoStructHelper.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/inc/TrkInfo.hh b/inc/TrkInfo.hh index 6e0e83f..6b729da 100644 --- a/inc/TrkInfo.hh +++ b/inc/TrkInfo.hh @@ -11,6 +11,7 @@ namespace mu2e { struct TrkInfo { int status = -1; // Kalman fit status + unsigned fitflag = 0; // KalSeed TrkFitFlag bitmask (Offline/RecoDataProducts/inc/TrkFitFlag.hh), e.g. ExtrapolationFailed, RangedOut int goodfit = 0; // true if fit is geometrically consistent int seedalg = -1; // pattern recognition algorithm used int fitalg = -1; // final fit algorithm used diff --git a/src/InfoStructHelper.cc b/src/InfoStructHelper.cc index ed30c4b..2be2c18 100644 --- a/src/InfoStructHelper.cc +++ b/src/InfoStructHelper.cc @@ -15,6 +15,7 @@ #include "Offline/DataProducts/inc/CaloConst.hh" #include #include +#include namespace mu2e { // TODO: Propose to delete this function since it is unused @@ -46,6 +47,7 @@ namespace mu2e { trkinfo.status = 2; else trkinfo.status = -1; + trkinfo.fitflag = static_cast(std::stoul(kseed.status().hex(),nullptr,16)); // BitMap exposes its value only as hex if(kseed.status().hasAnyProperty(TrkFitFlag::FitOK)){ trkinfo.goodfit = 1;