From 528d5ccb09e1870f03dea82bcdfebbbaff4943f1 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Tue, 28 Oct 2025 12:42:08 -0500 Subject: [PATCH 01/68] First try at adding blip data structure --- sbnanaobj/StandardRecord/SRBlip.cxx | 37 ++++++++ sbnanaobj/StandardRecord/SRBlip.h | 109 +++++++++++++++++++++++ sbnanaobj/StandardRecord/classes_def.xml | 4 + 3 files changed, 150 insertions(+) create mode 100644 sbnanaobj/StandardRecord/SRBlip.cxx create mode 100644 sbnanaobj/StandardRecord/SRBlip.h diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx new file mode 100644 index 0000000..c97c366 --- /dev/null +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -0,0 +1,37 @@ +//////////////////////////////////////////////////////////////////////// +// \file SRBlip.cxx +// \brief SRBlip object for localized energy deposits in bulk LAr +// \author $Author: jmclaughlin2@illinoistech.edu +//////////////////////////////////////////////////////////////////////// + +#include "sbnanaobj/StandardRecord/SRBlip.h" + + +namespace caf +{ + SRBlip::SRBlip() + { + ID = -9; // Blip ID / index + isValid = false; // Blip passes basic checks + Cryostat = -9; // Cryostat + TPC = -9; // TPC + NPlanes = -9; // Num. matched planes + MaxWireSpan = -9; // Maximum span of wires on any plane cluster + TimeTick = -999; // Readout time [ticks] + Time = -999; // Drift time [us] + Charge = -9; // Charge on calorimetry plane (electrons) + Energy = -999; // Energy (const dE/dx, fcl-configurable) + EnergyESTAR = -999; // Energy (ESTAR method from ArgoNeuT) + EnergyPSTAR = -999; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) + ProxTrkDist = -9; // Distance to cloest track + ProxTrkID = -9; // ID of closest track + inCylinder = false; // Is it in a cone/cylinder region? + Position.SetX(-999); //3d X Position [cm] + Position.SetY(-999); //3d Y Position [cm] + Position.SetZ(-999); //3d Z Position [cm] + SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] + dX = -9; // Equivalent length along drift direction [cm] + dYZ = -9; // Approximate length scale in YZ space [cm] + } + +} \ No newline at end of file diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h new file mode 100644 index 0000000..fbb779b --- /dev/null +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -0,0 +1,109 @@ +//////////////////////////////////////////////////////////////////////// +// \file SRBlip.h +// \brief SRBlip object for localized energy deposits in bulk LAr +// \author $Author: jmclaughlin2@illinoistech.edu +//////////////////////////////////////////////////////////////////////// +#ifndef SRBLIP_H +#define SRBLIP_H + +#include + +typedef std::vector vint_t; +typedef std::vector vbool_t; +typedef std::vector vfloat_t; +typedef std::set si_t; +typedef std::map mif_t; + +const int kNplanes = 3; + +namespace caf +{ + + struct TrueBlip { + int ID = -9; // unique blip ID + int Cryostat = -9; // Cryostat ID + int TPC = -9; // TPC ID + float Time = -9; // time of particle interaction + int TimeTick = -9; // time tick + float DriftTime = -9; // drift time [us] + float Energy = 0; // energy dep [MeV] + int DepElectrons = 0; // deposited electrons + int NumElectrons = 0; // electrons reaching wires + int LeadG4ID = -9; // lead G4 track ID + int LeadG4Index = -9; // lead G4 track index + int LeadG4PDG = -9; // lead G4 PDG + float LeadCharge = -9; // lead G4 charge dep + TVector3 Position; // XYZ position + mif_t G4ChargeMap; + mif_t G4PDGMap; + }; + + struct HitClust { + int ID = -9; + bool isValid = false; + int CenterChan = -999; + int CenterWire = -999; + bool isTruthMatched = false; + bool isMerged = false; + bool isMatched = false; + int DeadWireSep = 99; + int Cryostat = -9; + int TPC = -9; + int Plane = -9; + int NHits = -9; + int NWires = -9; + float ADCs = -999; + float Amplitude = -999; + float Charge = -999; + float SigmaCharge = -999; + float TimeTick = -999; + float Time = -999; + float StartHitTime = -999; + float EndHitTime = -999; + float StartTime = -999; + float EndTime = -999; + float Timespan = -999; + float RMS = -999; + int StartWire = -999; + int EndWire = -999; + int NPulseTrainHits = -9; + float GoodnessOfFit = -999; + int BlipID = -9; + int EdepID = -9; + si_t HitIDs; + si_t Wires; + si_t Chans; + si_t G4IDs; + + std::map IntersectLocations; + }; + + class SRBlip + { + public: + SRBlip(); + virtual ~SRBlip(); + int ID = -9; // Blip ID / index + bool isValid = false; // Blip passes basic checks + int Cryostat = -9; // Cryostat + int TPC = -9; // TPC + int NPlanes = -9; // Num. matched planes + int MaxWireSpan = -9; // Maximum span of wires on any plane cluster + float TimeTick = -999; // Readout time [ticks] + float Time = -999; // Drift time [us] + float Charge = -9; // Charge on calorimetry plane + float Energy = -999; // Energy (const dE/dx, fcl-configurable) + float EnergyESTAR = -999; // Energy (ESTAR method from ArgoNeuT) + float EnergyPSTAR = -999; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) + float ProxTrkDist = -9; // Distance to cloest track + int ProxTrkID = -9; // ID of closest track + bool inCylinder = false; // Is it in a cone/cylinder region? + TVector3 Position; // 3D position TVector3 + float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] + float dX = -9; // Equivalent length along drift direction [cm] + float dYZ = -9; // Approximate length scale in YZ space [cm] + blip::HitClust clusters[kNplanes]; // Plane/cluster-specific information + blip::TrueBlip truthBlip; // Truth-matched energy deposition + + } +} \ No newline at end of file diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 9b6f8fb..98b67fb 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -320,6 +320,9 @@ + + + @@ -350,6 +353,7 @@ + From 1b1114b7e2dacff15eb5f2c760b2750d54fecd8b Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 29 Oct 2025 09:06:24 -0500 Subject: [PATCH 02/68] Adjusted unit --- sbnanaobj/StandardRecord/SRBlip.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index fbb779b..e606b17 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -26,7 +26,7 @@ namespace caf float Time = -9; // time of particle interaction int TimeTick = -9; // time tick float DriftTime = -9; // drift time [us] - float Energy = 0; // energy dep [MeV] + float Energy = 0; // energy dep [GeV] int DepElectrons = 0; // deposited electrons int NumElectrons = 0; // electrons reaching wires int LeadG4ID = -9; // lead G4 track ID @@ -92,9 +92,9 @@ namespace caf float TimeTick = -999; // Readout time [ticks] float Time = -999; // Drift time [us] float Charge = -9; // Charge on calorimetry plane - float Energy = -999; // Energy (const dE/dx, fcl-configurable) - float EnergyESTAR = -999; // Energy (ESTAR method from ArgoNeuT) - float EnergyPSTAR = -999; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) + float Energy = -999; // Energy (const dE/dx, fcl-configurable) [GeV] + float EnergyESTAR = -999; // Energy (ESTAR method from ArgoNeuT) [GeV] + float EnergyPSTAR = -999; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] float ProxTrkDist = -9; // Distance to cloest track int ProxTrkID = -9; // ID of closest track bool inCylinder = false; // Is it in a cone/cylinder region? @@ -102,8 +102,8 @@ namespace caf float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] - blip::HitClust clusters[kNplanes]; // Plane/cluster-specific information - blip::TrueBlip truthBlip; // Truth-matched energy deposition + caf::HitClust clusters[kNplanes]; // Plane/cluster-specific information + caf::TrueBlip truthBlip; // Truth-matched energy deposition } } \ No newline at end of file From 62f6efb8997fb092c067a7ff0707b172954b98a5 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 29 Oct 2025 09:29:31 -0500 Subject: [PATCH 03/68] Updated includes --- sbnanaobj/StandardRecord/SRBlip.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index e606b17..5223847 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -7,6 +7,9 @@ #define SRBLIP_H #include +#include +#include +#include "TVector3.h" typedef std::vector vint_t; typedef std::vector vbool_t; From 06497ed2a46293e2dc05f2928c843a1497286740 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 29 Oct 2025 09:30:57 -0500 Subject: [PATCH 04/68] Missing ; --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 5223847..4d44965 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -108,5 +108,5 @@ namespace caf caf::HitClust clusters[kNplanes]; // Plane/cluster-specific information caf::TrueBlip truthBlip; // Truth-matched energy deposition - } + }; } \ No newline at end of file From a1441e64dd6388479919d5b228047a001a6e7009 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 29 Oct 2025 09:32:34 -0500 Subject: [PATCH 05/68] Missing #endif --- sbnanaobj/StandardRecord/SRBlip.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 4d44965..3fd2ec9 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -109,4 +109,5 @@ namespace caf caf::TrueBlip truthBlip; // Truth-matched energy deposition }; -} \ No newline at end of file +} +#endif \ No newline at end of file From 8563371f006464db56cd968405fbb617ff93290a Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 29 Oct 2025 10:41:06 -0500 Subject: [PATCH 06/68] added destructor def --- sbnanaobj/StandardRecord/SRBlip.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index c97c366..237553a 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -33,5 +33,8 @@ namespace caf dX = -9; // Equivalent length along drift direction [cm] dYZ = -9; // Approximate length scale in YZ space [cm] } + SRBlip::~SRBlip() + { + } } \ No newline at end of file From 9c719063006cdb767bff151e6379d7b0c6e79eca Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Thu, 30 Oct 2025 08:53:47 -0500 Subject: [PATCH 07/68] Putting blip entry in standard record class --- sbnanaobj/StandardRecord/StandardRecord.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbnanaobj/StandardRecord/StandardRecord.h b/sbnanaobj/StandardRecord/StandardRecord.h index 1a28881..b726b03 100644 --- a/sbnanaobj/StandardRecord/StandardRecord.h +++ b/sbnanaobj/StandardRecord/StandardRecord.h @@ -23,6 +23,7 @@ #include "sbnanaobj/StandardRecord/SRTrigger.h" #include "sbnanaobj/StandardRecord/SRInteractionDLP.h" #include "sbnanaobj/StandardRecord/SRInteractionTruthDLP.h" +#include "sbnanaobj/StandardRecord/SRBlip.h" /// Common Analysis Files namespace caf @@ -64,6 +65,7 @@ namespace caf bool pass_flashtrig = false; ///< Whether this Record passed the Flash Trigger requirement SRSBNDFrameShiftInfo sbnd_frames; ///< List of Frame Shift in event in unit [ns] (SBND) SRSBNDTimingInfo sbnd_timings; ///< List of Timing Info in event in UNIX timestamp format(SBND) + std::vector blips; ///Blips are small O(mm) depositions in LAr, made from recob::hits int ndlp = 0; ///< Number of reco DLP (ML) interactions. std::vector dlp; ///< Reco DLP (ML) interactions. From 1540dc94870676b99a402ada2c418baba9df77f4 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Fri, 31 Oct 2025 09:25:32 -0500 Subject: [PATCH 08/68] Updated classes_def entries --- sbnanaobj/StandardRecord/classes_def.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 98b67fb..3455909 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -320,8 +320,7 @@ - - + From 5151a1666388b66045da32fdac3a74b8b87310e2 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Fri, 31 Oct 2025 09:56:10 -0500 Subject: [PATCH 09/68] removing typedef --- sbnanaobj/StandardRecord/SRBlip.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 3fd2ec9..01d7bd2 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -11,11 +11,11 @@ #include #include "TVector3.h" -typedef std::vector vint_t; -typedef std::vector vbool_t; -typedef std::vector vfloat_t; -typedef std::set si_t; -typedef std::map mif_t; +//typedef std::vector vint_t; +//typedef std::vector vbool_t; +//typedef std::vector vfloat_t; +//typedef std::set si_t; +//typedef std::map mif_t; const int kNplanes = 3; @@ -37,8 +37,8 @@ namespace caf int LeadG4PDG = -9; // lead G4 PDG float LeadCharge = -9; // lead G4 charge dep TVector3 Position; // XYZ position - mif_t G4ChargeMap; - mif_t G4PDGMap; + std::map G4ChargeMap; + std::map G4PDGMap; }; struct HitClust { @@ -73,10 +73,10 @@ namespace caf float GoodnessOfFit = -999; int BlipID = -9; int EdepID = -9; - si_t HitIDs; - si_t Wires; - si_t Chans; - si_t G4IDs; + std::set HitIDs; + std::set Wires; + std::set Chans; + std::set G4IDs; std::map IntersectLocations; }; From 7f9599b694eba56404e005342f374d88871ea908 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Fri, 31 Oct 2025 10:14:45 -0500 Subject: [PATCH 10/68] Removed destructor --- sbnanaobj/StandardRecord/SRBlip.cxx | 6 +++--- sbnanaobj/StandardRecord/SRBlip.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index 237553a..cbc9170 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -33,8 +33,8 @@ namespace caf dX = -9; // Equivalent length along drift direction [cm] dYZ = -9; // Approximate length scale in YZ space [cm] } - SRBlip::~SRBlip() - { - } + //SRBlip::~SRBlip() + //{ + //} } \ No newline at end of file diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 01d7bd2..576cfaa 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -85,7 +85,7 @@ namespace caf { public: SRBlip(); - virtual ~SRBlip(); + //virtual ~SRBlip(); int ID = -9; // Blip ID / index bool isValid = false; // Blip passes basic checks int Cryostat = -9; // Cryostat From 4442c5da85f25870128748f6b262f95f01161356 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Fri, 31 Oct 2025 11:33:46 -0500 Subject: [PATCH 11/68] ideas that didn't fix compilation --- sbnanaobj/StandardRecord/SRBlip.h | 7 +++---- sbnanaobj/StandardRecord/classes_def.xml | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 576cfaa..9d79b6f 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -105,9 +105,8 @@ namespace caf float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] - caf::HitClust clusters[kNplanes]; // Plane/cluster-specific information - caf::TrueBlip truthBlip; // Truth-matched energy deposition - + HitClust clusters[kNplanes]; // Plane/cluster-specific information + TrueBlip truthBlip; // Truth-matched energy deposition }; } -#endif \ No newline at end of file +#endif diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 3455909..98b67fb 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -320,7 +320,8 @@ - + + From 4563cf9c315f41e899c25d88af9161a15d9365a1 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Fri, 31 Oct 2025 11:41:49 -0500 Subject: [PATCH 12/68] trying to simplify my SRBlip object --- sbnanaobj/StandardRecord/SRBlip.h | 62 +---------------------- sbnanaobj/StandardRecord/SRBlipHitClust.h | 57 +++++++++++++++++++++ sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 37 ++++++++++++++ 3 files changed, 96 insertions(+), 60 deletions(-) create mode 100644 sbnanaobj/StandardRecord/SRBlipHitClust.h create mode 100644 sbnanaobj/StandardRecord/SRBlipTrueBlip.h diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 9d79b6f..fc23ff0 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -10,6 +10,8 @@ #include #include #include "TVector3.h" +#include "SRBlipHitClust.h" +#include "SRBlipTrueBlip.h" //typedef std::vector vint_t; //typedef std::vector vbool_t; @@ -21,66 +23,6 @@ const int kNplanes = 3; namespace caf { - - struct TrueBlip { - int ID = -9; // unique blip ID - int Cryostat = -9; // Cryostat ID - int TPC = -9; // TPC ID - float Time = -9; // time of particle interaction - int TimeTick = -9; // time tick - float DriftTime = -9; // drift time [us] - float Energy = 0; // energy dep [GeV] - int DepElectrons = 0; // deposited electrons - int NumElectrons = 0; // electrons reaching wires - int LeadG4ID = -9; // lead G4 track ID - int LeadG4Index = -9; // lead G4 track index - int LeadG4PDG = -9; // lead G4 PDG - float LeadCharge = -9; // lead G4 charge dep - TVector3 Position; // XYZ position - std::map G4ChargeMap; - std::map G4PDGMap; - }; - - struct HitClust { - int ID = -9; - bool isValid = false; - int CenterChan = -999; - int CenterWire = -999; - bool isTruthMatched = false; - bool isMerged = false; - bool isMatched = false; - int DeadWireSep = 99; - int Cryostat = -9; - int TPC = -9; - int Plane = -9; - int NHits = -9; - int NWires = -9; - float ADCs = -999; - float Amplitude = -999; - float Charge = -999; - float SigmaCharge = -999; - float TimeTick = -999; - float Time = -999; - float StartHitTime = -999; - float EndHitTime = -999; - float StartTime = -999; - float EndTime = -999; - float Timespan = -999; - float RMS = -999; - int StartWire = -999; - int EndWire = -999; - int NPulseTrainHits = -9; - float GoodnessOfFit = -999; - int BlipID = -9; - int EdepID = -9; - std::set HitIDs; - std::set Wires; - std::set Chans; - std::set G4IDs; - - std::map IntersectLocations; - }; - class SRBlip { public: diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h new file mode 100644 index 0000000..79b8a8b --- /dev/null +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -0,0 +1,57 @@ +//////////////////////////////////////////////////////////////////////// +// \file SRBlipHitClust.h +// \brief SRBlipHitClust struct contains information on hit clusters on each plane used to form a SRBlip +// \author $Author: jmclaughlin2@illinoistech.edu +//////////////////////////////////////////////////////////////////////// +#ifndef SRBLIPHITCLUST_H +#define SRBLIPHITCLUST_H + +#include +#include +#include +#include "TVector3.h" + +namespace caf +{ + struct HitClust { + int ID = -9; + bool isValid = false; + int CenterChan = -999; + int CenterWire = -999; + bool isTruthMatched = false; + bool isMerged = false; + bool isMatched = false; + int DeadWireSep = 99; + int Cryostat = -9; + int TPC = -9; + int Plane = -9; + int NHits = -9; + int NWires = -9; + float ADCs = -999; + float Amplitude = -999; + float Charge = -999; + float SigmaCharge = -999; + float TimeTick = -999; + float Time = -999; + float StartHitTime = -999; + float EndHitTime = -999; + float StartTime = -999; + float EndTime = -999; + float Timespan = -999; + float RMS = -999; + int StartWire = -999; + int EndWire = -999; + int NPulseTrainHits = -9; + float GoodnessOfFit = -999; + int BlipID = -9; + int EdepID = -9; + std::set HitIDs; + std::set Wires; + std::set Chans; + std::set G4IDs; + + std::map IntersectLocations; + }; +} + +#endif \ No newline at end of file diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h new file mode 100644 index 0000000..55d7754 --- /dev/null +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -0,0 +1,37 @@ +//////////////////////////////////////////////////////////////////////// +// \file SRBlipTrueBlip.h +// \brief SRBlipTrueBlip struct for localized energy deposits in bulk LAr. MC Truth information +// \author $Author: jmclaughlin2@illinoistech.edu +//////////////////////////////////////////////////////////////////////// +#ifndef SRBLIPTRUEBLIP_H +#define SRBLIPTRUEBLIP_H + +#include +#include +#include +#include "TVector3.h" + +namespace caf +{ + + struct TrueBlip { + int ID = -9; // unique blip ID + int Cryostat = -9; // Cryostat ID + int TPC = -9; // TPC ID + float Time = -9; // time of particle interaction + int TimeTick = -9; // time tick + float DriftTime = -9; // drift time [us] + float Energy = 0; // energy dep [GeV] + int DepElectrons = 0; // deposited electrons + int NumElectrons = 0; // electrons reaching wires + int LeadG4ID = -9; // lead G4 track ID + int LeadG4Index = -9; // lead G4 track index + int LeadG4PDG = -9; // lead G4 PDG + float LeadCharge = -9; // lead G4 charge dep + TVector3 Position; // XYZ position + std::map G4ChargeMap; + std::map G4PDGMap; + }; +} + +#endif \ No newline at end of file From 7f065051bbfc6b101c556533000fa7f720ac1e2a Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 08:06:45 -0600 Subject: [PATCH 13/68] trying different checksum stuff --- sbnanaobj/StandardRecord/classes_def.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 98b67fb..05203ed 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -320,7 +320,16 @@ - + + + + + + + + + + From fcf5303086246ce5922124bedec9efc897256595 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 08:21:41 -0600 Subject: [PATCH 14/68] Putting back destructor --- sbnanaobj/StandardRecord/SRBlip.cxx | 6 +++--- sbnanaobj/StandardRecord/SRBlip.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index cbc9170..237553a 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -33,8 +33,8 @@ namespace caf dX = -9; // Equivalent length along drift direction [cm] dYZ = -9; // Approximate length scale in YZ space [cm] } - //SRBlip::~SRBlip() - //{ - //} + SRBlip::~SRBlip() + { + } } \ No newline at end of file diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index fc23ff0..43b5fb5 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -27,7 +27,7 @@ namespace caf { public: SRBlip(); - //virtual ~SRBlip(); + virtual ~SRBlip(); int ID = -9; // Blip ID / index bool isValid = false; // Blip passes basic checks int Cryostat = -9; // Cryostat From 780bb3a88384c66c52e58124f4e7e878cee54d6e Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 08:32:52 -0600 Subject: [PATCH 15/68] guessing at some checksums --- sbnanaobj/StandardRecord/classes_def.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 05203ed..e026069 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -321,15 +321,15 @@ - + - + - + From a5088b8d7317d647498068604d8a36698e07ee71 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 08:42:32 -0600 Subject: [PATCH 16/68] Trying to simplify build --- sbnanaobj/StandardRecord/SRBlip.h | 8 ++++---- sbnanaobj/StandardRecord/classes_def.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 43b5fb5..6c12a25 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -10,8 +10,8 @@ #include #include #include "TVector3.h" -#include "SRBlipHitClust.h" -#include "SRBlipTrueBlip.h" +//#include "SRBlipHitClust.h" +//#include "SRBlipTrueBlip.h" //typedef std::vector vint_t; //typedef std::vector vbool_t; @@ -47,8 +47,8 @@ namespace caf float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] - HitClust clusters[kNplanes]; // Plane/cluster-specific information - TrueBlip truthBlip; // Truth-matched energy deposition + //HitClust clusters[kNplanes]; // Plane/cluster-specific information + //TrueBlip truthBlip; // Truth-matched energy deposition }; } #endif diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index e026069..0a89986 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -324,13 +324,13 @@ - + - + From a8668d0a6e9cfef68f972c4d8bec4104aa50dda7 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 08:48:48 -0600 Subject: [PATCH 17/68] replacing tvector3d with SRVector3D: --- sbnanaobj/StandardRecord/SRBlip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 6c12a25..7fc0cf9 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -9,7 +9,7 @@ #include #include #include -#include "TVector3.h" +#include "sbnanaobj/StandardRecord/SRVector3D.h" //#include "SRBlipHitClust.h" //#include "SRBlipTrueBlip.h" @@ -43,7 +43,7 @@ namespace caf float ProxTrkDist = -9; // Distance to cloest track int ProxTrkID = -9; // ID of closest track bool inCylinder = false; // Is it in a cone/cylinder region? - TVector3 Position; // 3D position TVector3 + SRVector3D Position; // 3D position TVector3 float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] From 3d28c4dafb6e0f2533d68a2b065d909485b3bc7a Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 08:56:01 -0600 Subject: [PATCH 18/68] remove guess at checksum --- sbnanaobj/StandardRecord/classes_def.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 0a89986..fae0a1a 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -321,7 +321,7 @@ - + - + + @@ -320,8 +321,8 @@ - - + + + + - + + From 142a08f6fe50812d97a78a50da27561433c0067e Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:13:43 -0600 Subject: [PATCH 21/68] Replaced TVector3d --- sbnanaobj/StandardRecord/SRBlipHitClust.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 9d9dc0b..d287aec 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -7,6 +7,7 @@ #define SRBLIPHITCLUST_H #include #include +#include "sbnanaobj/StandardRecord/SRVector3D.h" namespace caf { @@ -47,7 +48,7 @@ namespace caf std::set Chans; std::set G4IDs; - std::map IntersectLocations; + std::map IntersectLocations; }; } From 46658462de0d24c4db8a75821ac2390bc00694cd Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:18:13 -0600 Subject: [PATCH 22/68] Trying one struct at a time --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- sbnanaobj/StandardRecord/classes_def.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 56b2452..7814bc8 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -39,7 +39,7 @@ namespace caf float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] HitClust clusters[kNplanes]; // Plane/cluster-specific information - TrueBlip truthBlip; // Truth-matched energy deposition + //TrueBlip truthBlip; // Truth-matched energy deposition }; } #endif diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index e74106d..5a20532 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -328,8 +328,8 @@ - - + From 4bb677bca5c1cd898e3fb510ecf8c44aa40fc1c2 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:24:03 -0600 Subject: [PATCH 23/68] Changed some name scheme and includes --- sbnanaobj/StandardRecord/SRBlip.h | 8 ++++---- sbnanaobj/StandardRecord/SRBlipHitClust.h | 2 +- sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 2 +- sbnanaobj/StandardRecord/classes_def.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 7814bc8..d25542f 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -6,8 +6,8 @@ #ifndef SRBLIP_H #define SRBLIP_H #include "sbnanaobj/StandardRecord/SRVector3D.h" -#include "SRBlipHitClust.h" -#include "SRBlipTrueBlip.h" +#include "sbnanaobj/StandardRecord/SRBlipHitClust.h" +#include "sbnanaobj/StandardRecord/SRBlipTrueBlip.h" const int kNplanes = 3; @@ -38,8 +38,8 @@ namespace caf float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] - HitClust clusters[kNplanes]; // Plane/cluster-specific information - //TrueBlip truthBlip; // Truth-matched energy deposition + SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information + SRBlipTrueBlip truthBlip; // Truth-matched energy deposition }; } #endif diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index d287aec..01236d6 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -11,7 +11,7 @@ namespace caf { - struct HitClust { + struct SRBlipHitClust { int ID = -9; bool isValid = false; int CenterChan = -999; diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index a23dff7..ee82577 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -11,7 +11,7 @@ namespace caf { - struct TrueBlip { + struct SRBlipTrueBlip { int ID = -9; // unique blip ID int Cryostat = -9; // Cryostat ID int TPC = -9; // TPC ID diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 5a20532..e74106d 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -328,8 +328,8 @@ - + + From 7ad0a5390562e5135bc33c85a64910e33a20e386 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:27:31 -0600 Subject: [PATCH 24/68] Another try --- sbnanaobj/StandardRecord/classes_def.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index e74106d..42fdfc1 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -362,6 +362,8 @@ + + From 1560a43b8757297a4381a2fb8cf3fd6cbd7c3ba2 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:35:34 -0600 Subject: [PATCH 25/68] trying other indef --- sbnanaobj/StandardRecord/SRBlipHitClust.h | 4 ++-- sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 01236d6..8a60383 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -3,8 +3,8 @@ // \brief SRBlipHitClust struct contains information on hit clusters on each plane used to form a SRBlip // \author $Author: jmclaughlin2@illinoistech.edu //////////////////////////////////////////////////////////////////////// -#ifndef SRBLIPHITCLUST_H -#define SRBLIPHITCLUST_H +#ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H +#define SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H #include #include #include "sbnanaobj/StandardRecord/SRVector3D.h" diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index ee82577..07b42be 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -3,8 +3,8 @@ // \brief SRBlipTrueBlip struct for localized energy deposits in bulk LAr. MC Truth information // \author $Author: jmclaughlin2@illinoistech.edu //////////////////////////////////////////////////////////////////////// -#ifndef SRBLIPTRUEBLIP_H -#define SRBLIPTRUEBLIP_H +#ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H +#define SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H #include #include "sbnanaobj/StandardRecord/SRVector3D.h" From bbcffe84c3e4831afd6930fdfc1934dbf6ddbd63 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:41:22 -0600 Subject: [PATCH 26/68] Adding a empty line --- sbnanaobj/StandardRecord/SRBlipHitClust.h | 4 +--- sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 1 - sbnanaobj/StandardRecord/classes_def.xml | 2 ++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 8a60383..79cb0d1 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -11,7 +11,7 @@ namespace caf { - struct SRBlipHitClust { + struct SRBlipHitClust { int ID = -9; bool isValid = false; int CenterChan = -999; @@ -47,9 +47,7 @@ namespace caf std::set Wires; std::set Chans; std::set G4IDs; - std::map IntersectLocations; }; } - #endif \ No newline at end of file diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index 07b42be..c02afc5 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -30,5 +30,4 @@ namespace caf std::map G4PDGMap; }; } - #endif \ No newline at end of file diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 42fdfc1..5f446cc 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -326,9 +326,11 @@ + + From 041a6eb4cecdac7fa6829e649b2326637f851d1c Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:44:50 -0600 Subject: [PATCH 27/68] Removing all pair information --- sbnanaobj/StandardRecord/SRBlipHitClust.h | 4 ++-- sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 79cb0d1..34afb46 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -5,7 +5,7 @@ //////////////////////////////////////////////////////////////////////// #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H #define SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H -#include +//#include #include #include "sbnanaobj/StandardRecord/SRVector3D.h" @@ -47,7 +47,7 @@ namespace caf std::set Wires; std::set Chans; std::set G4IDs; - std::map IntersectLocations; + //std::map IntersectLocations; }; } #endif \ No newline at end of file diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index c02afc5..f42738a 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -5,7 +5,7 @@ //////////////////////////////////////////////////////////////////////// #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H #define SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H -#include +//#include #include "sbnanaobj/StandardRecord/SRVector3D.h" namespace caf @@ -26,8 +26,8 @@ namespace caf int LeadG4PDG = -9; // lead G4 PDG float LeadCharge = -9; // lead G4 charge dep SRVector3D Position; // XYZ position - std::map G4ChargeMap; - std::map G4PDGMap; + //std::map G4ChargeMap; + //std::map G4PDGMap; }; } #endif \ No newline at end of file From ebdbf7b4ed12901b035084685354110c8ab6f797 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:46:49 -0600 Subject: [PATCH 28/68] Maybe its mad about the array --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- sbnanaobj/StandardRecord/SRBlipHitClust.h | 4 ++-- sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index d25542f..c0145b1 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -38,7 +38,7 @@ namespace caf float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] - SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information + //SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information SRBlipTrueBlip truthBlip; // Truth-matched energy deposition }; } diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 34afb46..79cb0d1 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -5,7 +5,7 @@ //////////////////////////////////////////////////////////////////////// #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H #define SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H -//#include +#include #include #include "sbnanaobj/StandardRecord/SRVector3D.h" @@ -47,7 +47,7 @@ namespace caf std::set Wires; std::set Chans; std::set G4IDs; - //std::map IntersectLocations; + std::map IntersectLocations; }; } #endif \ No newline at end of file diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index f42738a..c02afc5 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -5,7 +5,7 @@ //////////////////////////////////////////////////////////////////////// #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H #define SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H -//#include +#include #include "sbnanaobj/StandardRecord/SRVector3D.h" namespace caf @@ -26,8 +26,8 @@ namespace caf int LeadG4PDG = -9; // lead G4 PDG float LeadCharge = -9; // lead G4 charge dep SRVector3D Position; // XYZ position - //std::map G4ChargeMap; - //std::map G4PDGMap; + std::map G4ChargeMap; + std::map G4PDGMap; }; } #endif \ No newline at end of file From 89317d43fd8c07bfb3afbcb33203192a1e9a04b9 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:48:30 -0600 Subject: [PATCH 29/68] Removing both structs but keeping include --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index c0145b1..a2c4798 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -39,7 +39,7 @@ namespace caf float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] //SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information - SRBlipTrueBlip truthBlip; // Truth-matched energy deposition + //SRBlipTrueBlip truthBlip; // Truth-matched energy deposition }; } #endif From 8684ef7cde587a4158ee721cb2f367a84347d0ec Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:49:48 -0600 Subject: [PATCH 30/68] The machine has given us new checksums --- sbnanaobj/StandardRecord/classes_def.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 5f446cc..49c5565 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -326,10 +326,12 @@ + + From 79eb63cc6678bcd4113448f4611aa5ed9200b72f Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:52:10 -0600 Subject: [PATCH 31/68] Maybe with check sums it will work --- sbnanaobj/StandardRecord/SRBlip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index a2c4798..d25542f 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -38,8 +38,8 @@ namespace caf float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] - //SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information - //SRBlipTrueBlip truthBlip; // Truth-matched energy deposition + SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information + SRBlipTrueBlip truthBlip; // Truth-matched energy deposition }; } #endif From 90297033104d629540efe65ea50011bb0ea4b5a9 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 09:56:40 -0600 Subject: [PATCH 32/68] Changed to a vector rather than array --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index d25542f..8d37194 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -38,7 +38,7 @@ namespace caf float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] float dX = -9; // Equivalent length along drift direction [cm] float dYZ = -9; // Approximate length scale in YZ space [cm] - SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information + std::vector clusters(3); // Plane/cluster-specific information SRBlipTrueBlip truthBlip; // Truth-matched energy deposition }; } From b29d3412e61176e34f16f76cceb82a9ce79b1d10 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 10:00:30 -0600 Subject: [PATCH 33/68] Hey a real compiler issue --- sbnanaobj/StandardRecord/SRBlip.cxx | 5 +++++ sbnanaobj/StandardRecord/SRBlip.h | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index 237553a..2cf6e26 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -32,6 +32,11 @@ namespace caf SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] dX = -9; // Equivalent length along drift direction [cm] dYZ = -9; // Approximate length scale in YZ space [cm] + const int kNplanes = 3; + for(int i=0; i++; i clusters(3); // Plane/cluster-specific information + std::vector clusters; // Plane/cluster-specific information SRBlipTrueBlip truthBlip; // Truth-matched energy deposition }; } From 572cbad2f4e227e10a40ed593962cba1e8cce876 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 5 Nov 2025 10:01:47 -0600 Subject: [PATCH 34/68] Hey a real compiler issue --- sbnanaobj/StandardRecord/SRBlip.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index 2cf6e26..405c6fb 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -33,7 +33,7 @@ namespace caf dX = -9; // Equivalent length along drift direction [cm] dYZ = -9; // Approximate length scale in YZ space [cm] const int kNplanes = 3; - for(int i=0; i++; i Date: Wed, 5 Nov 2025 10:02:46 -0600 Subject: [PATCH 35/68] Hey a real compiler issue --- sbnanaobj/StandardRecord/SRBlip.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index 405c6fb..9d9f190 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -33,7 +33,7 @@ namespace caf dX = -9; // Equivalent length along drift direction [cm] dYZ = -9; // Approximate length scale in YZ space [cm] const int kNplanes = 3; - for(int i=0; i Date: Wed, 5 Nov 2025 10:34:49 -0600 Subject: [PATCH 36/68] reverting previous change --- sbnanaobj/StandardRecord/SRBlip.cxx | 5 ----- sbnanaobj/StandardRecord/SRBlip.h | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index 9d9f190..237553a 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -32,11 +32,6 @@ namespace caf SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] dX = -9; // Equivalent length along drift direction [cm] dYZ = -9; // Approximate length scale in YZ space [cm] - const int kNplanes = 3; - for(int i=0; i clusters; // Plane/cluster-specific information + SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information SRBlipTrueBlip truthBlip; // Truth-matched energy deposition }; } From 3325f3b57c11b004d7a1cfbd23937e8b7f987bb5 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Thu, 6 Nov 2025 09:10:59 -0600 Subject: [PATCH 37/68] removed std::pair objects to get proxy to work --- sbnanaobj/StandardRecord/SRBlip.h | 1 + sbnanaobj/StandardRecord/SRBlipHitClust.h | 12 ++++++------ sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 7 +++---- sbnanaobj/StandardRecord/classes_def.xml | 11 +++++------ 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index d25542f..5c71374 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -8,6 +8,7 @@ #include "sbnanaobj/StandardRecord/SRVector3D.h" #include "sbnanaobj/StandardRecord/SRBlipHitClust.h" #include "sbnanaobj/StandardRecord/SRBlipTrueBlip.h" +#include "sbnanaobj/StandardRecord/SRCVNScore.h" const int kNplanes = 3; diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 79cb0d1..57ddac5 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -43,11 +43,11 @@ namespace caf float GoodnessOfFit = -999; int BlipID = -9; int EdepID = -9; - std::set HitIDs; - std::set Wires; - std::set Chans; - std::set G4IDs; - std::map IntersectLocations; + std::vector HitIDs; + std::vector Wires; + std::vector Chans; + std::vector G4IDs; + //std::map IntersectLocations; //intermediate step used for matching }; } -#endif \ No newline at end of file +#endif diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index c02afc5..564f592 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -5,7 +5,6 @@ //////////////////////////////////////////////////////////////////////// #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H #define SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H -#include #include "sbnanaobj/StandardRecord/SRVector3D.h" namespace caf @@ -26,8 +25,8 @@ namespace caf int LeadG4PDG = -9; // lead G4 PDG float LeadCharge = -9; // lead G4 charge dep SRVector3D Position; // XYZ position - std::map G4ChargeMap; - std::map G4PDGMap; + //std::map G4ChargeMap; //intermediate processing step not needed for CAF + //std::map G4PDGMap; }; } -#endif \ No newline at end of file +#endif diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 49c5565..ee47ef5 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -321,22 +321,21 @@ - - + + - - + - - + + From 21d0ab6281ec9055ce7609b70664310f71048f2b Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Mon, 10 Nov 2025 15:27:50 -0600 Subject: [PATCH 38/68] Compiled version --- sbnanaobj/StandardRecord/SRBlip.h | 4 +--- sbnanaobj/StandardRecord/classes_def.xml | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 5c71374..c7b97d1 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -10,11 +10,9 @@ #include "sbnanaobj/StandardRecord/SRBlipTrueBlip.h" #include "sbnanaobj/StandardRecord/SRCVNScore.h" - -const int kNplanes = 3; - namespace caf { + const int kNplanes = 3; class SRBlip { public: diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 5eb2975..b26caa9 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -5,7 +5,8 @@ - + + From 0c900dd508a88c93af4562467d83cd3918bdc3ed Mon Sep 17 00:00:00 2001 From: Gianluca Petrillo Date: Tue, 18 Nov 2025 11:46:26 -0800 Subject: [PATCH 39/68] Refactor SRTrkChi2PID class documentation and methods Following CAF coding guidelines. --- sbnanaobj/StandardRecord/SRTrkChi2PID.cxx | 48 +++++++---------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRTrkChi2PID.cxx b/sbnanaobj/StandardRecord/SRTrkChi2PID.cxx index 4393be0..5bb50c5 100644 --- a/sbnanaobj/StandardRecord/SRTrkChi2PID.cxx +++ b/sbnanaobj/StandardRecord/SRTrkChi2PID.cxx @@ -1,38 +1,20 @@ -//////////////////////////////////////////////////////////////////////// -// \file SRTrkChi2PID.cxx -// \brief An SRTrkChi2PID is a high level track ParticlePID object for -// for larana Chi2ParticleID results. -//////////////////////////////////////////////////////////////////////// +/** + * @file SRTrkChi2PID.cxx + * @brief An SRTrkChi2PID is a high level track `anab::ParticlePID` object + * for larana `pid::Chi2ParticleID` results. + * @see SRTrkChi2PID.h + */ #include "sbnanaobj/StandardRecord/SRTrkChi2PID.h" -#include - -namespace caf +void caf::SRTrkChi2PID::setDefault() { + pdg = -5; + pid_ndof = -5; + chi2_muon = -5.0; + chi2_pion = -5.0; + chi2_kaon = -5.0; + chi2_proton = -5.0; + pida = -5; +} - SRTrkChi2PID::SRTrkChi2PID(): - pdg(-999), - pid_ndof(-99), - chi2_muon(std::numeric_limits::signaling_NaN()), - chi2_pion(std::numeric_limits::signaling_NaN()), - chi2_kaon(std::numeric_limits::signaling_NaN()), - chi2_proton(std::numeric_limits::signaling_NaN()), - pida(std::numeric_limits::signaling_NaN()) - { } - - SRTrkChi2PID::~SRTrkChi2PID(){ } - - void SRTrkChi2PID::setDefault() - { - pdg = -5; - pid_ndof = -5; - chi2_muon = -5.0; - chi2_pion = -5.0; - chi2_kaon = -5.0; - chi2_proton = -5.0; - pida = -5; - } - -} // end namespace caf -//////////////////////////////////////////////////////////////////////// From 299152f109fabe0b4c14b1b54f3d758a0d6f667c Mon Sep 17 00:00:00 2001 From: Gianluca Petrillo Date: Tue, 18 Nov 2025 11:49:57 -0800 Subject: [PATCH 40/68] Refactor SRTrkChi2PID class with default values Complying to SBN CAF coding guidelines. --- sbnanaobj/StandardRecord/SRTrkChi2PID.h | 35 +++++++++++++------------ 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRTrkChi2PID.h b/sbnanaobj/StandardRecord/SRTrkChi2PID.h index bf17ba2..5512ef8 100644 --- a/sbnanaobj/StandardRecord/SRTrkChi2PID.h +++ b/sbnanaobj/StandardRecord/SRTrkChi2PID.h @@ -1,27 +1,29 @@ -//////////////////////////////////////////////////////////////////////// -// \file SRTrkChi2PID.h -//////////////////////////////////////////////////////////////////////// +/** + * @file SRTrkChi2PID.h + * @brief An SRTrkChi2PID is a high level track `anab::ParticlePID` object + * for larana `pid::Chi2ParticleID` results. + * @see SRTrkChi2PID.cxx + */ + #ifndef SRTRKCHI2PID_H #define SRTRKCHI2PID_H +#include "sbnanaobj/StandardRecord/SRConstants.h" + namespace caf { - /// Track PID from dE/dx v. residual range Chi2 - class SRTrkChi2PID + /// Track PID from dE/dx v. residual range χ². + struct SRTrkChi2PID { - public: - - SRTrkChi2PID(); - virtual ~SRTrkChi2PID(); - int pdg; ///< Min Chi2 pdg - int pid_ndof; ///< Number of degress of freedom in Chi2 PID fit - float chi2_muon; ///< dE/dx v. residual range Chi2 (muon hypothesis) - float chi2_pion; ///< dE/dx v. residual range Chi2 (pion hypothesis) - float chi2_kaon; ///< dE/dx v. residual range Chi2 (kaon hypothesis) - float chi2_proton; ///< dE/dx v. residual range Chi2 (proton hypothesis) + int pdg = -999; ///< PDG ID of the lowest Chi2. + int pid_ndof = -99; ///< Number of degress of freedom in Chi2 PID fit. + float chi2_muon = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (muon hypothesis). + float chi2_pion = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (pion hypothesis). + float chi2_kaon = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (kaon hypothesis). + float chi2_proton = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (proton hypothesis). - float pida; ///< PIDA + float pida = caf::kSignalingNaN; ///< Particle identification algorithm result (PIDA). void setDefault(); }; @@ -29,4 +31,3 @@ namespace caf } // end namespace #endif // SRTRKCHI2PID_H -////////////////////////////////////////////////////////////////////////////// From 40d0db1d2f0a10ff6ac7dfd952112ff5ef1c9011 Mon Sep 17 00:00:00 2001 From: Gianluca Petrillo Date: Tue, 18 Nov 2025 12:10:21 -0800 Subject: [PATCH 41/68] Typographical mispelling Found by Copilot. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- sbnanaobj/StandardRecord/SRTrkChi2PID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRTrkChi2PID.h b/sbnanaobj/StandardRecord/SRTrkChi2PID.h index 5512ef8..c9dc0d6 100644 --- a/sbnanaobj/StandardRecord/SRTrkChi2PID.h +++ b/sbnanaobj/StandardRecord/SRTrkChi2PID.h @@ -17,7 +17,7 @@ namespace caf { int pdg = -999; ///< PDG ID of the lowest Chi2. - int pid_ndof = -99; ///< Number of degress of freedom in Chi2 PID fit. + int pid_ndof = -99; ///< Number of degrees of freedom in Chi2 PID fit. float chi2_muon = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (muon hypothesis). float chi2_pion = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (pion hypothesis). float chi2_kaon = caf::kSignalingNaN; ///< dE/dx v. residual range Chi2 (kaon hypothesis). From 04018f67ce000b30c876bf4ef2e1861ca7bc28a8 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Thu, 20 Nov 2025 09:09:32 -0600 Subject: [PATCH 42/68] Changing default values --- sbnanaobj/StandardRecord/SRBlip.cxx | 30 +++++++------- sbnanaobj/StandardRecord/SRBlip.h | 36 ++++++++-------- sbnanaobj/StandardRecord/SRBlipHitClust.h | 50 +++++++++++------------ sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 26 ++++++------ sbnanaobj/StandardRecord/classes_def.xml | 6 +-- 5 files changed, 73 insertions(+), 75 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index 237553a..5298839 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -11,30 +11,30 @@ namespace caf { SRBlip::SRBlip() { - ID = -9; // Blip ID / index + ID = -5; // Blip ID / index isValid = false; // Blip passes basic checks - Cryostat = -9; // Cryostat - TPC = -9; // TPC - NPlanes = -9; // Num. matched planes - MaxWireSpan = -9; // Maximum span of wires on any plane cluster + Cryostat = -5; // Cryostat + TPC = -5; // TPC + NPlanes = -5; // Num. matched planes + MaxWireSpan = -5; // Maximum span of wires on any plane cluster TimeTick = -999; // Readout time [ticks] Time = -999; // Drift time [us] - Charge = -9; // Charge on calorimetry plane (electrons) - Energy = -999; // Energy (const dE/dx, fcl-configurable) - EnergyESTAR = -999; // Energy (ESTAR method from ArgoNeuT) - EnergyPSTAR = -999; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) - ProxTrkDist = -9; // Distance to cloest track - ProxTrkID = -9; // ID of closest track + Charge = -5; // Charge on calorimetry plane (electrons) + Energy = -5; // Energy (const dE/dx, fcl-configurable) + EnergyESTAR = -5; // Energy (ESTAR method from ArgoNeuT) + EnergyPSTAR = -5; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) + ProxTrkDist = -5; // Distance to cloest track + ProxTrkID = -5; // ID of closest track inCylinder = false; // Is it in a cone/cylinder region? Position.SetX(-999); //3d X Position [cm] Position.SetY(-999); //3d Y Position [cm] Position.SetZ(-999); //3d Z Position [cm] - SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] - dX = -9; // Equivalent length along drift direction [cm] - dYZ = -9; // Approximate length scale in YZ space [cm] + SigmaYZ = -5.; // Uncertainty in YZ intersect [cm] + dX = -5; // Equivalent length along drift direction [cm] + dYZ = -5; // Approximate length scale in YZ space [cm] } SRBlip::~SRBlip() { } -} \ No newline at end of file +} diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index c7b97d1..00008bc 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -18,25 +18,25 @@ namespace caf public: SRBlip(); virtual ~SRBlip(); - int ID = -9; // Blip ID / index - bool isValid = false; // Blip passes basic checks - int Cryostat = -9; // Cryostat - int TPC = -9; // TPC - int NPlanes = -9; // Num. matched planes - int MaxWireSpan = -9; // Maximum span of wires on any plane cluster - float TimeTick = -999; // Readout time [ticks] - float Time = -999; // Drift time [us] - float Charge = -9; // Charge on calorimetry plane - float Energy = -999; // Energy (const dE/dx, fcl-configurable) [GeV] - float EnergyESTAR = -999; // Energy (ESTAR method from ArgoNeuT) [GeV] - float EnergyPSTAR = -999; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] - float ProxTrkDist = -9; // Distance to cloest track - int ProxTrkID = -9; // ID of closest track - bool inCylinder = false; // Is it in a cone/cylinder region? + int ID; // Blip ID / index + bool isValid; // Blip passes basic checks + int Cryostat; // Cryostat + int TPC; // TPC + int NPlanes; // Num. matched planes + int MaxWireSpan; // Maximum span of wires on any plane cluster + float TimeTick; // Readout time [ticks] + float Time; // Drift time [us] + float Charge; // Charge on calorimetry plane + float Energy; // Energy (const dE/dx, fcl-configurable) [GeV] + float EnergyESTAR; // Energy (ESTAR method from ArgoNeuT) [GeV] + float EnergyPSTAR; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] + float ProxTrkDist; // Distance to cloest track + int ProxTrkID; // ID of closest track + bool inCylinder; // Is it in a cone/cylinder region? SRVector3D Position; // 3D position TVector3 - float SigmaYZ = -9.; // Uncertainty in YZ intersect [cm] - float dX = -9; // Equivalent length along drift direction [cm] - float dYZ = -9; // Approximate length scale in YZ space [cm] + float SigmaYZ; // Uncertainty in YZ intersect [cm] + float dX; // Equivalent length along drift direction [cm] + float dYZ; // Approximate length scale in YZ space [cm] SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information SRBlipTrueBlip truthBlip; // Truth-matched energy deposition }; diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 57ddac5..bb98d3d 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -12,37 +12,37 @@ namespace caf { struct SRBlipHitClust { - int ID = -9; + int ID = -5; bool isValid = false; - int CenterChan = -999; - int CenterWire = -999; + int CenterChan = -5; + int CenterWire = -5; bool isTruthMatched = false; bool isMerged = false; bool isMatched = false; - int DeadWireSep = 99; - int Cryostat = -9; - int TPC = -9; - int Plane = -9; - int NHits = -9; - int NWires = -9; - float ADCs = -999; - float Amplitude = -999; - float Charge = -999; - float SigmaCharge = -999; - float TimeTick = -999; - float Time = -999; - float StartHitTime = -999; - float EndHitTime = -999; + int DeadWireSep = -5; + int Cryostat = -5; + int TPC = -5; + int Plane = -5; + int NHits = -5; + int NWires = -5; + float ADCs = -5; + float Amplitude = -5; + float Charge = -5; + float SigmaCharge = -5; + float TimeTick = -5; + float Time = -5; + float StartHitTime = -5; + float EndHitTime = -5; float StartTime = -999; float EndTime = -999; - float Timespan = -999; - float RMS = -999; - int StartWire = -999; - int EndWire = -999; - int NPulseTrainHits = -9; - float GoodnessOfFit = -999; - int BlipID = -9; - int EdepID = -9; + float Timespan = -5; + float RMS = -5; + int StartWire = -5; + int EndWire = -5; + int NPulseTrainHits = -5; + float GoodnessOfFit = -5; + int BlipID = -5; + int EdepID = -5; std::vector HitIDs; std::vector Wires; std::vector Chans; diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index 564f592..2f94295 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -11,19 +11,19 @@ namespace caf { struct SRBlipTrueBlip { - int ID = -9; // unique blip ID - int Cryostat = -9; // Cryostat ID - int TPC = -9; // TPC ID - float Time = -9; // time of particle interaction - int TimeTick = -9; // time tick - float DriftTime = -9; // drift time [us] - float Energy = 0; // energy dep [GeV] - int DepElectrons = 0; // deposited electrons - int NumElectrons = 0; // electrons reaching wires - int LeadG4ID = -9; // lead G4 track ID - int LeadG4Index = -9; // lead G4 track index - int LeadG4PDG = -9; // lead G4 PDG - float LeadCharge = -9; // lead G4 charge dep + int ID = -5; // unique blip ID + int Cryostat = -5; // Cryostat ID + int TPC = -5; // TPC ID + float Time = -5; // time of particle interaction + int TimeTick = -5; // time tick + float DriftTime = -5; // drift time [us] + float Energy = -5; // energy dep [GeV] + int DepElectrons = -5; // deposited electrons + int NumElectrons = -5; // electrons reaching wires + int LeadG4ID = -5; // lead G4 track ID + int LeadG4Index = -5; // lead G4 track index + int LeadG4PDG = -5; // lead G4 PDG + float LeadCharge = -5; // lead G4 charge dep SRVector3D Position; // XYZ position //std::map G4ChargeMap; //intermediate processing step not needed for CAF //std::map G4PDGMap; diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index b26caa9..c7959cf 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -5,10 +5,8 @@ - - - - + + From 6b744a9554e8eb02ed5e247c56377197f9f98f90 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 16:30:40 -0600 Subject: [PATCH 43/68] Removed depreciated variables and moved over comments --- sbnanaobj/StandardRecord/SRBlip.cxx | 5 +- sbnanaobj/StandardRecord/SRBlip.h | 74 +++++++++++------- sbnanaobj/StandardRecord/SRBlipHitClust.h | 91 +++++++++++++---------- sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 49 ++++++------ sbnanaobj/StandardRecord/classes_def.xml | 5 +- 5 files changed, 128 insertions(+), 96 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index 5298839..e4a00db 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -9,6 +9,7 @@ namespace caf { + /* SRBlip::SRBlip() { ID = -5; // Blip ID / index @@ -33,8 +34,6 @@ namespace caf dX = -5; // Equivalent length along drift direction [cm] dYZ = -5; // Approximate length scale in YZ space [cm] } - SRBlip::~SRBlip() - { - } + */ } diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 00008bc..c558d80 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -1,44 +1,62 @@ -//////////////////////////////////////////////////////////////////////// -// \file SRBlip.h -// \brief SRBlip object for localized energy deposits in bulk LAr -// \author $Author: jmclaughlin2@illinoistech.edu -//////////////////////////////////////////////////////////////////////// +/** + * @file SRBlip.h + * @brief SRBlip object for localized energy deposits in bulk LAr + * @author Jacob McLaughlin - jmclaughlin2@illinoistech.edu + */ #ifndef SRBLIP_H #define SRBLIP_H #include "sbnanaobj/StandardRecord/SRVector3D.h" #include "sbnanaobj/StandardRecord/SRBlipHitClust.h" #include "sbnanaobj/StandardRecord/SRBlipTrueBlip.h" -#include "sbnanaobj/StandardRecord/SRCVNScore.h" namespace caf { const int kNplanes = 3; + /** Blips are small, plane-matched, energy deposition in liquid argon with sizes similar to wire separation. + * Blips are composed of hit-clusters, which are (time and space) adjacent hits on a single wire plane. + * A single plane, usually the collection, is given a privledged position as the calorimetry plane. + * Every hit-cluster on the calorimetry plane is checked for matches on the other two planes, and when multiple possible pairs are found + * the highest scoring one is selected. + * Score components include cluster charge, cluster time duration, cluster peak time, and wire intersections. + */ class SRBlip { public: + static constexpr int kNplanes = 3; SRBlip(); - virtual ~SRBlip(); - int ID; // Blip ID / index - bool isValid; // Blip passes basic checks - int Cryostat; // Cryostat - int TPC; // TPC - int NPlanes; // Num. matched planes - int MaxWireSpan; // Maximum span of wires on any plane cluster - float TimeTick; // Readout time [ticks] - float Time; // Drift time [us] - float Charge; // Charge on calorimetry plane - float Energy; // Energy (const dE/dx, fcl-configurable) [GeV] - float EnergyESTAR; // Energy (ESTAR method from ArgoNeuT) [GeV] - float EnergyPSTAR; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] - float ProxTrkDist; // Distance to cloest track - int ProxTrkID; // ID of closest track - bool inCylinder; // Is it in a cone/cylinder region? - SRVector3D Position; // 3D position TVector3 - float SigmaYZ; // Uncertainty in YZ intersect [cm] - float dX; // Equivalent length along drift direction [cm] - float dYZ; // Approximate length scale in YZ space [cm] - SRBlipHitClust clusters[kNplanes]; // Plane/cluster-specific information - SRBlipTrueBlip truthBlip; // Truth-matched energy deposition + int ID=-5; ///< Internal index for blip labelling + bool isValid=false; ///< Blip passes basic checks in reco. All blips saved to artRoot file should be valid. + int Cryostat=-5; ///< Which cryostat the blip was reconstructed to. For SBND this should always be 0. + int TPC=-5; ///< Which tpc the blip was reconstructed to. For SBND this may be 0 or 1. + int NPlanes=-5; ///< Number of planes matched to build the blip. Blips must be plane matched so this should be 2+ planes. + int MaxWireSpan=-5; ///< Maximum span of wires on any plane hit-cluster + float TimeTick=-999; ///< Average time of hitclusters making up blips. [tpc tick] + /*! + Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster + */ + float Time=-999; ///< Average time of hitclusters making up blips. [us] + /*! + Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster + */ + float Charge=-5; ///< Charge on calorimetry plane [e-] + float Energy=-5; ///< Reconstructed energy in the calorimetry plane (const dE/dx, fcl-configurable) [GeV] + float EnergyESTAR=-5; ///< Reconstructed energy in the calorimetry plane (ESTAR method from ArgoNeuT) [GeV] + float EnergyPSTAR=-5; ///< Reconstructed energy in the calorimetry plane (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] + float ProxTrkDist=-5; ///< 3-D distance to closest track, assuming the blip was concident with event trigger [cm] + /*! + for properly flash matched out-of-time tracks this distance will be wrong! The blips have no such flash matching ability as of yet + */ + int ProxTrkID=-5; ///< index of the of closest track, assuming the blip was concident with event trigger + bool inCylinder=false; ///< Bool for whether this blip falls in a 45 degree cone relative to any track closer than fcl-set CylinderRadius (15 cm) + /*! + please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect + */ + SRVector3D Position(-999, -999, -999); ///< 3D position vector. Reconstructed with wrong t0! [cm] + float SigmaYZ=-5; ///< Uncertainty in YZ intersect [cm] + float dX=-5; ///< Equivalent length along drift direction [cm] + float dYZ=-5; ///< Approximate length scale in YZ space [cm] + std::array clusters; ///< Plane/cluster-specific information. Just contains hit clusters making up this blip! + SRBlipTrueBlip truthBlip; ///< Truth-matched energy deposition. Just contains the relevant MC truth info to this blip! }; } #endif diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index bb98d3d..c4992f3 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -1,8 +1,8 @@ -//////////////////////////////////////////////////////////////////////// -// \file SRBlipHitClust.h -// \brief SRBlipHitClust struct contains information on hit clusters on each plane used to form a SRBlip -// \author $Author: jmclaughlin2@illinoistech.edu -//////////////////////////////////////////////////////////////////////// +/** + * @file SRBlipHitClust.h + * @brief SRBlipHitClust struct contains information on hit clusters on each plane used to form a SRBlip + * @author Jacob McLaughlin - jmclaughlin2@illinoistech.edu + */ #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H #define SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H #include @@ -11,43 +11,52 @@ namespace caf { + /** Hit clusters are collections of adjacent hits on a single wire plane. + * They have a fcl-set maximum wire-span (fcl set. Default 10), as well as maximum tick-width (fcl set. Default 50 tick). + * Hit clusters have timestamp and associated wire IDs. + * Within a hit cluster certain statistical summaries of the collection are saved including: + * Total charge, total charge uncertianty, peak hit amplitude, and charge weighted RMS hit spread + */ struct SRBlipHitClust { - int ID = -5; - bool isValid = false; - int CenterChan = -5; - int CenterWire = -5; - bool isTruthMatched = false; - bool isMerged = false; - bool isMatched = false; - int DeadWireSep = -5; - int Cryostat = -5; - int TPC = -5; - int Plane = -5; - int NHits = -5; - int NWires = -5; - float ADCs = -5; - float Amplitude = -5; - float Charge = -5; - float SigmaCharge = -5; - float TimeTick = -5; - float Time = -5; - float StartHitTime = -5; - float EndHitTime = -5; - float StartTime = -999; - float EndTime = -999; - float Timespan = -5; - float RMS = -5; - int StartWire = -5; - int EndWire = -5; - int NPulseTrainHits = -5; - float GoodnessOfFit = -5; - int BlipID = -5; - int EdepID = -5; - std::vector HitIDs; - std::vector Wires; - std::vector Chans; - std::vector G4IDs; - //std::map IntersectLocations; //intermediate step used for matching + int ID = -5; ///< Per-plane index for the hit clusters. In SBND we save every collection plane hitcluster but not the induction + bool isValid = false; ///< Bool check that every hit is in the same cryostat, tpc, plane. Should always be true for saved items + int CenterChan = -5; ///< Channel ID of the wire in the geometric center of the hit cluster + int CenterWire = -5; ///< Wire ID of the wire in the geometric center of the hit cluster + bool isTruthMatched = false; ///< is there a trueBlip with the same leadG4ID as one of the G4IDs making up this cluster + bool isMatched = false; ///< Is this hit cluster plane-matched into a full 3d blip + int DeadWireSep = -5; ///< Separation between the extreme ends of the hitcluster and the nearest dead wire. + /*! + DeadWireSep can be between 0 and 5 and valid. Larger separations are filled in as 99. + */ + int Cryostat = -5; ///< cryostat for this hit cluster + int TPC = -5; ///< TPC for this hit cluster + int Plane = -5; ///< Plane index for this hit cluster + int NHits = -5; ///< Number of hits making up this hit cluster + int NWires = -5; ///< Wire span of the hit cluster + float ADCs = -5; ///< ADC integral sum of hits making up the cluster [ADC-tick] + float Amplitude = -5; ///< Max amplitude of hits making up the hit cluster [ADC] + float Charge = -5; ///< Total charge of hits making up the hit cluster [e-] + /*! + Charge is reconstructed from calo::CalorimetryAlg ( "sbnd_calorimetryalgmc" )-> ElectronsFromADCArea function + Configuration is in sbndcode/sbndcode/LArSoftConfigurations/calorimetry_sbnd.fcl + */ + float SigmaCharge = -5; ///< charge-weighted charge uncertainties for this hit-cluster [e-] + float TimeTick = -5; ///< charge-weighted average hit-peak-times for this hit-cluster [tick] + float Time = -5; ///< charge-weighted average hit-peak-times for this hit-cluster [us] + float StartTime = -999; ///< Minimum -1 sigma time of a hit in this cluster [us] + float EndTime = -999; ///< Max +1 sigma time of a hit in this cluster [us] + float Timespan = -5; ///< Hit cluster EndTime - StartTime [us] + float RMS = -5; ///< Quadrature estimate of charge waveform timespread accounting for varied hit-drift times and internal hit-RMS [us] + int StartWire = -5; ///< Lowest wireID involved with the hitcluster + int EndWire = -5; ///< Highest wireID involved with the hit cluster + int NPulseTrainHits = -5; ///< Number of hits with a GoodnessOfFit<0 involved in this hit cluster + float GoodnessOfFit = -5; ///< Charge weighted hit-GoodnessofFit param + int BlipID = -5; ///< If this hit cluster ended up in a blip, what is its ID + int EdepID = -5; ///< If this hit cluster is MC-matched what is the trueBlip ID + std::vector HitIDs; ///< Index of the recob::hit objects making up this cluster + std::vector Wires; ///< Set of geo::wireIDs contributing hits to this cluster + std::vector Chans; ///< Set of raw::ChannelID_t contributing hits to this cluster + std::vector G4IDs; ///< simb::MCParticle track ID contributing hits to this cluster }; } #endif diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index 2f94295..c9e2470 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -1,32 +1,37 @@ -//////////////////////////////////////////////////////////////////////// -// \file SRBlipTrueBlip.h -// \brief SRBlipTrueBlip struct for localized energy deposits in bulk LAr. MC Truth information -// \author $Author: jmclaughlin2@illinoistech.edu -//////////////////////////////////////////////////////////////////////// +/** + * @file SRBlipTrueBlip.h + * @brief SRBlipTrueBlip struct for localized energy deposits in bulk LAr. MC Truth information + * @author Jacob McLaughlin - jmclaughlin2@illinoistech.edu + */ + #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H #define SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H #include "sbnanaobj/StandardRecord/SRVector3D.h" namespace caf { - + /** True energy depositions + * std::vector > makes a particle list + * std::vector makes a IDE list + * Together those make a blip::ParticleInfo object used to fill in this TrueBlip information + * For a reconstructed MC blip we will record the true blip info associated with it + * That blip reconstruction applies cuts to overall blip size/spread + * A single TrueBlip will be constructed for energy depositions within TrueBlipMergeDist (fcl set 0.3 cm by default) + */ struct SRBlipTrueBlip { - int ID = -5; // unique blip ID - int Cryostat = -5; // Cryostat ID - int TPC = -5; // TPC ID - float Time = -5; // time of particle interaction - int TimeTick = -5; // time tick - float DriftTime = -5; // drift time [us] - float Energy = -5; // energy dep [GeV] - int DepElectrons = -5; // deposited electrons - int NumElectrons = -5; // electrons reaching wires - int LeadG4ID = -5; // lead G4 track ID - int LeadG4Index = -5; // lead G4 track index - int LeadG4PDG = -5; // lead G4 PDG - float LeadCharge = -5; // lead G4 charge dep - SRVector3D Position; // XYZ position - //std::map G4ChargeMap; //intermediate processing step not needed for CAF - //std::map G4PDGMap; + int ID = -5; ///< Index of this trueBlip object + int Cryostat = -5; ///< Cryostat ID the blip reconstructed to + int TPC = -5; ///< TPC ID the blip reconstructed to + float Time = -5; ///< Charge weighted peak time of TrueBlip energy depositions [tick] + float DriftTime = -5; ///< Charge weighted drift time of TrueBlip energy depositions [tick] + float Energy = -5; ///< Total energy dep [GeV] + int DepElectrons = -5; ///< Total deposited electrons [e-] + int NumElectrons = -5; ///< electrons reaching wires [e-] + int LeadG4ID = -5; ///< G4 track ID depositing the most charge in this deposition + int LeadG4Index = -5; ///< G4 track Index depositing the most charge in this deposition + int LeadG4PDG = -5; ///< G4 PDG associated with the track depositing the most charge + float LeadCharge = -5; ///< Largest charge deposition associated with this True Blip + SRVector3D Position; ///< Charge weighted true-XYZ position [cm] }; } #endif diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index c7959cf..b49855c 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -5,8 +5,9 @@ - - + + + From 009e568c2053f2471fd04623c0bbf1f2f783a5bf Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 16:31:10 -0600 Subject: [PATCH 44/68] missed one save --- sbnanaobj/StandardRecord/SRBlip.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index c558d80..eba14da 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -23,7 +23,6 @@ namespace caf { public: static constexpr int kNplanes = 3; - SRBlip(); int ID=-5; ///< Internal index for blip labelling bool isValid=false; ///< Blip passes basic checks in reco. All blips saved to artRoot file should be valid. int Cryostat=-5; ///< Which cryostat the blip was reconstructed to. For SBND this should always be 0. From 849aaeb59cc22badd25e0b9555405761d311414f Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 16:40:24 -0600 Subject: [PATCH 45/68] Trying a different syntax for construction --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index eba14da..5bc2d39 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -50,7 +50,7 @@ namespace caf /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ - SRVector3D Position(-999, -999, -999); ///< 3D position vector. Reconstructed with wrong t0! [cm] + SRVector3D Position{-999, -999, -999}; ///< 3D position vector. Reconstructed with wrong t0! [cm] float SigmaYZ=-5; ///< Uncertainty in YZ intersect [cm] float dX=-5; ///< Equivalent length along drift direction [cm] float dYZ=-5; ///< Approximate length scale in YZ space [cm] From 013839ea053365ad22bb6399257998f2e63f9f5f Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 16:45:37 -0600 Subject: [PATCH 46/68] Trying a different syntax for construction --- sbnanaobj/StandardRecord/SRBlip.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 5bc2d39..257ae9a 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -8,6 +8,7 @@ #include "sbnanaobj/StandardRecord/SRVector3D.h" #include "sbnanaobj/StandardRecord/SRBlipHitClust.h" #include "sbnanaobj/StandardRecord/SRBlipTrueBlip.h" +#include namespace caf { @@ -50,7 +51,10 @@ namespace caf /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ - SRVector3D Position{-999, -999, -999}; ///< 3D position vector. Reconstructed with wrong t0! [cm] + SRVector3D Position; ///< 3D position vector. Reconstructed with wrong t0! [cm] + Position.SetX(-999); + Position.SetY(-999); + Position.SetZ(-999); float SigmaYZ=-5; ///< Uncertainty in YZ intersect [cm] float dX=-5; ///< Equivalent length along drift direction [cm] float dYZ=-5; ///< Approximate length scale in YZ space [cm] From f12e7727c4919a18f4996c1483af37e07a498aea Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 16:48:02 -0600 Subject: [PATCH 47/68] Trying a different syntax for construction --- sbnanaobj/StandardRecord/SRBlip.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 257ae9a..a87a7fc 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -23,6 +23,7 @@ namespace caf class SRBlip { public: + SRBlip(); static constexpr int kNplanes = 3; int ID=-5; ///< Internal index for blip labelling bool isValid=false; ///< Blip passes basic checks in reco. All blips saved to artRoot file should be valid. @@ -52,9 +53,6 @@ namespace caf please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ SRVector3D Position; ///< 3D position vector. Reconstructed with wrong t0! [cm] - Position.SetX(-999); - Position.SetY(-999); - Position.SetZ(-999); float SigmaYZ=-5; ///< Uncertainty in YZ intersect [cm] float dX=-5; ///< Equivalent length along drift direction [cm] float dYZ=-5; ///< Approximate length scale in YZ space [cm] From f5a5bca671e757174a53f3869944e847e1f1ea10 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 16:55:01 -0600 Subject: [PATCH 48/68] Changed defaults --- sbnanaobj/StandardRecord/SRBlip.h | 29 ++++++------- sbnanaobj/StandardRecord/SRBlipHitClust.h | 51 ++++++++++++----------- sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 26 ++++++------ 3 files changed, 55 insertions(+), 51 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index a87a7fc..a95d9c9 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -9,6 +9,7 @@ #include "sbnanaobj/StandardRecord/SRBlipHitClust.h" #include "sbnanaobj/StandardRecord/SRBlipTrueBlip.h" #include +#include "sbnanaobj/StandardRecord/SRConstants.h" namespace caf { @@ -25,12 +26,12 @@ namespace caf public: SRBlip(); static constexpr int kNplanes = 3; - int ID=-5; ///< Internal index for blip labelling + int ID=caf::kUninitializedInt; ///< Internal index for blip labelling bool isValid=false; ///< Blip passes basic checks in reco. All blips saved to artRoot file should be valid. - int Cryostat=-5; ///< Which cryostat the blip was reconstructed to. For SBND this should always be 0. - int TPC=-5; ///< Which tpc the blip was reconstructed to. For SBND this may be 0 or 1. - int NPlanes=-5; ///< Number of planes matched to build the blip. Blips must be plane matched so this should be 2+ planes. - int MaxWireSpan=-5; ///< Maximum span of wires on any plane hit-cluster + int Cryostat=caf::kUninitializedInt; ///< Which cryostat the blip was reconstructed to. For SBND this should always be 0. + int TPC=caf::kUninitializedInt; ///< Which tpc the blip was reconstructed to. For SBND this may be 0 or 1. + int NPlanes=caf::kUninitializedInt; ///< Number of planes matched to build the blip. Blips must be plane matched so this should be 2+ planes. + int MaxWireSpan=caf::kUninitializedInt; ///< Maximum span of wires on any plane hit-cluster float TimeTick=-999; ///< Average time of hitclusters making up blips. [tpc tick] /*! Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster @@ -39,23 +40,23 @@ namespace caf /*! Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster */ - float Charge=-5; ///< Charge on calorimetry plane [e-] - float Energy=-5; ///< Reconstructed energy in the calorimetry plane (const dE/dx, fcl-configurable) [GeV] - float EnergyESTAR=-5; ///< Reconstructed energy in the calorimetry plane (ESTAR method from ArgoNeuT) [GeV] - float EnergyPSTAR=-5; ///< Reconstructed energy in the calorimetry plane (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] - float ProxTrkDist=-5; ///< 3-D distance to closest track, assuming the blip was concident with event trigger [cm] + float Charge=caf::kSignalingNaN; ///< Charge on calorimetry plane [e-] + float Energy=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (const dE/dx, fcl-configurable) [GeV] + float EnergyESTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (ESTAR method from ArgoNeuT) [GeV] + float EnergyPSTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] + float ProxTrkDist=caf::kSignalingNaN; ///< 3-D distance to closest track, assuming the blip was concident with event trigger [cm] /*! for properly flash matched out-of-time tracks this distance will be wrong! The blips have no such flash matching ability as of yet */ - int ProxTrkID=-5; ///< index of the of closest track, assuming the blip was concident with event trigger + int ProxTrkID=caf::kUninitializedInt; ///< index of the of closest track, assuming the blip was concident with event trigger bool inCylinder=false; ///< Bool for whether this blip falls in a 45 degree cone relative to any track closer than fcl-set CylinderRadius (15 cm) /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ SRVector3D Position; ///< 3D position vector. Reconstructed with wrong t0! [cm] - float SigmaYZ=-5; ///< Uncertainty in YZ intersect [cm] - float dX=-5; ///< Equivalent length along drift direction [cm] - float dYZ=-5; ///< Approximate length scale in YZ space [cm] + float SigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] + float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] + float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] std::array clusters; ///< Plane/cluster-specific information. Just contains hit clusters making up this blip! SRBlipTrueBlip truthBlip; ///< Truth-matched energy deposition. Just contains the relevant MC truth info to this blip! }; diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index c4992f3..706ddcf 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -8,6 +8,7 @@ #include #include #include "sbnanaobj/StandardRecord/SRVector3D.h" +#include "sbnanaobj/StandardRecord/SRConstants.h" namespace caf { @@ -18,41 +19,41 @@ namespace caf * Total charge, total charge uncertianty, peak hit amplitude, and charge weighted RMS hit spread */ struct SRBlipHitClust { - int ID = -5; ///< Per-plane index for the hit clusters. In SBND we save every collection plane hitcluster but not the induction + int ID = caf::kUninitializedInt; ///< Per-plane index for the hit clusters. In SBND we save every collection plane hitcluster but not the induction bool isValid = false; ///< Bool check that every hit is in the same cryostat, tpc, plane. Should always be true for saved items - int CenterChan = -5; ///< Channel ID of the wire in the geometric center of the hit cluster - int CenterWire = -5; ///< Wire ID of the wire in the geometric center of the hit cluster + int CenterChan = caf::kUninitializedInt; ///< Channel ID of the wire in the geometric center of the hit cluster + int CenterWire = caf::kUninitializedInt; ///< Wire ID of the wire in the geometric center of the hit cluster bool isTruthMatched = false; ///< is there a trueBlip with the same leadG4ID as one of the G4IDs making up this cluster bool isMatched = false; ///< Is this hit cluster plane-matched into a full 3d blip - int DeadWireSep = -5; ///< Separation between the extreme ends of the hitcluster and the nearest dead wire. + int DeadWireSep = caf::kUninitializedInt; ///< Separation between the extreme ends of the hitcluster and the nearest dead wire. /*! DeadWireSep can be between 0 and 5 and valid. Larger separations are filled in as 99. */ - int Cryostat = -5; ///< cryostat for this hit cluster - int TPC = -5; ///< TPC for this hit cluster - int Plane = -5; ///< Plane index for this hit cluster - int NHits = -5; ///< Number of hits making up this hit cluster - int NWires = -5; ///< Wire span of the hit cluster - float ADCs = -5; ///< ADC integral sum of hits making up the cluster [ADC-tick] - float Amplitude = -5; ///< Max amplitude of hits making up the hit cluster [ADC] - float Charge = -5; ///< Total charge of hits making up the hit cluster [e-] + int Cryostat = caf::kUninitializedInt; ///< cryostat for this hit cluster + int TPC = caf::kUninitializedInt; ///< TPC for this hit cluster + int Plane = caf::kUninitializedInt; ///< Plane index for this hit cluster + int NHits = caf::kUninitializedInt; ///< Number of hits making up this hit cluster + int NWires = caf::kUninitializedInt; ///< Wire span of the hit cluster + float ADCs = caf::kUninitializedInt; ///< ADC integral sum of hits making up the cluster [ADC-tick] + float Amplitude = caf::kUninitializedInt; ///< Max amplitude of hits making up the hit cluster [ADC] + float Charge = caf::kUninitializedInt; ///< Total charge of hits making up the hit cluster [e-] /*! Charge is reconstructed from calo::CalorimetryAlg ( "sbnd_calorimetryalgmc" )-> ElectronsFromADCArea function Configuration is in sbndcode/sbndcode/LArSoftConfigurations/calorimetry_sbnd.fcl */ - float SigmaCharge = -5; ///< charge-weighted charge uncertainties for this hit-cluster [e-] - float TimeTick = -5; ///< charge-weighted average hit-peak-times for this hit-cluster [tick] - float Time = -5; ///< charge-weighted average hit-peak-times for this hit-cluster [us] - float StartTime = -999; ///< Minimum -1 sigma time of a hit in this cluster [us] - float EndTime = -999; ///< Max +1 sigma time of a hit in this cluster [us] - float Timespan = -5; ///< Hit cluster EndTime - StartTime [us] - float RMS = -5; ///< Quadrature estimate of charge waveform timespread accounting for varied hit-drift times and internal hit-RMS [us] - int StartWire = -5; ///< Lowest wireID involved with the hitcluster - int EndWire = -5; ///< Highest wireID involved with the hit cluster - int NPulseTrainHits = -5; ///< Number of hits with a GoodnessOfFit<0 involved in this hit cluster - float GoodnessOfFit = -5; ///< Charge weighted hit-GoodnessofFit param - int BlipID = -5; ///< If this hit cluster ended up in a blip, what is its ID - int EdepID = -5; ///< If this hit cluster is MC-matched what is the trueBlip ID + float SigmaCharge = caf::kSignalingNaN; ///< charge-weighted charge uncertainties for this hit-cluster [e-] + float TimeTick = caf::kSignalingNaN; ///< charge-weighted average hit-peak-times for this hit-cluster [tick] + float Time = caf::kSignalingNaN; ///< charge-weighted average hit-peak-times for this hit-cluster [us] + float StartTime = caf::kSignalingNaN; ///< Minimum -1 sigma time of a hit in this cluster [us] + float EndTime = caf::kSignalingNaN; ///< Max +1 sigma time of a hit in this cluster [us] + float Timespan = caf::kSignalingNaN; ///< Hit cluster EndTime - StartTime [us] + float RMS = caf::kSignalingNaN; ///< Quadrature estimate of charge waveform timespread accounting for varied hit-drift times and internal hit-RMS [us] + int StartWire = caf::kUninitializedInt; ///< Lowest wireID involved with the hitcluster + int EndWire = caf::kUninitializedInt; ///< Highest wireID involved with the hit cluster + int NPulseTrainHits = caf::kUninitializedInt; ///< Number of hits with a GoodnessOfFit<0 involved in this hit cluster + float GoodnessOfFit = caf::kSignalingNaN; ///< Charge weighted hit-GoodnessofFit param + int BlipID = caf::kUninitializedInt; ///< If this hit cluster ended up in a blip, what is its ID + int EdepID = caf::kUninitializedInt; ///< If this hit cluster is MC-matched what is the trueBlip ID std::vector HitIDs; ///< Index of the recob::hit objects making up this cluster std::vector Wires; ///< Set of geo::wireIDs contributing hits to this cluster std::vector Chans; ///< Set of raw::ChannelID_t contributing hits to this cluster diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index c9e2470..9e384a0 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -7,6 +7,8 @@ #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H #define SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H #include "sbnanaobj/StandardRecord/SRVector3D.h" +#include "sbnanaobj/StandardRecord/SRConstants.h" + namespace caf { @@ -19,18 +21,18 @@ namespace caf * A single TrueBlip will be constructed for energy depositions within TrueBlipMergeDist (fcl set 0.3 cm by default) */ struct SRBlipTrueBlip { - int ID = -5; ///< Index of this trueBlip object - int Cryostat = -5; ///< Cryostat ID the blip reconstructed to - int TPC = -5; ///< TPC ID the blip reconstructed to - float Time = -5; ///< Charge weighted peak time of TrueBlip energy depositions [tick] - float DriftTime = -5; ///< Charge weighted drift time of TrueBlip energy depositions [tick] - float Energy = -5; ///< Total energy dep [GeV] - int DepElectrons = -5; ///< Total deposited electrons [e-] - int NumElectrons = -5; ///< electrons reaching wires [e-] - int LeadG4ID = -5; ///< G4 track ID depositing the most charge in this deposition - int LeadG4Index = -5; ///< G4 track Index depositing the most charge in this deposition - int LeadG4PDG = -5; ///< G4 PDG associated with the track depositing the most charge - float LeadCharge = -5; ///< Largest charge deposition associated with this True Blip + int ID = caf::kUninitializedInt; ///< Index of this trueBlip object + int Cryostat = caf::kUninitializedInt; ///< Cryostat ID the blip reconstructed to + int TPC = caf::kUninitializedInt; ///< TPC ID the blip reconstructed to + float Time = caf::kSignalingNaN; ///< Charge weighted peak time of TrueBlip energy depositions [tick] + float DriftTime = caf::kSignalingNaN; ///< Charge weighted drift time of TrueBlip energy depositions [tick] + float Energy = caf::kSignalingNaN; ///< Total energy dep [GeV] + int DepElectrons = caf::kUninitializedInt; ///< Total deposited electrons [e-] + int NumElectrons = caf::kUninitializedInt; ///< electrons reaching wires [e-] + int LeadG4ID = caf::kUninitializedInt; ///< G4 track ID depositing the most charge in this deposition + int LeadG4Index = caf::kUninitializedInt; ///< G4 track Index depositing the most charge in this deposition + int LeadG4PDG = caf::kUninitializedInt; ///< G4 PDG associated with the track depositing the most charge + float LeadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip SRVector3D Position; ///< Charge weighted true-XYZ position [cm] }; } From a610c83f125beda4454f96eafbe93cb8b5743235 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 17:20:14 -0600 Subject: [PATCH 49/68] Changed to camelcase --- sbnanaobj/StandardRecord/SRBlip.cxx | 27 ++----------- sbnanaobj/StandardRecord/SRBlip.h | 26 ++++++------ sbnanaobj/StandardRecord/SRBlipHitClust.h | 48 +++++++++++------------ sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 22 +++++------ 4 files changed, 52 insertions(+), 71 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index e4a00db..e50547d 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -9,31 +9,12 @@ namespace caf { - /* + SRBlip::SRBlip() { - ID = -5; // Blip ID / index - isValid = false; // Blip passes basic checks - Cryostat = -5; // Cryostat - TPC = -5; // TPC - NPlanes = -5; // Num. matched planes - MaxWireSpan = -5; // Maximum span of wires on any plane cluster - TimeTick = -999; // Readout time [ticks] - Time = -999; // Drift time [us] - Charge = -5; // Charge on calorimetry plane (electrons) - Energy = -5; // Energy (const dE/dx, fcl-configurable) - EnergyESTAR = -5; // Energy (ESTAR method from ArgoNeuT) - EnergyPSTAR = -5; // Energy (PSTAR method similar with ESTAR method from ArgoNeuT) - ProxTrkDist = -5; // Distance to cloest track - ProxTrkID = -5; // ID of closest track - inCylinder = false; // Is it in a cone/cylinder region? - Position.SetX(-999); //3d X Position [cm] - Position.SetY(-999); //3d Y Position [cm] - Position.SetZ(-999); //3d Z Position [cm] - SigmaYZ = -5.; // Uncertainty in YZ intersect [cm] - dX = -5; // Equivalent length along drift direction [cm] - dYZ = -5; // Approximate length scale in YZ space [cm] + position.SetX(-999); //3d X Position [cm] + position.SetY(-999); //3d Y Position [cm] + position.SetZ(-999); //3d Z Position [cm] } - */ } diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index a95d9c9..bbbf26d 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -28,33 +28,33 @@ namespace caf static constexpr int kNplanes = 3; int ID=caf::kUninitializedInt; ///< Internal index for blip labelling bool isValid=false; ///< Blip passes basic checks in reco. All blips saved to artRoot file should be valid. - int Cryostat=caf::kUninitializedInt; ///< Which cryostat the blip was reconstructed to. For SBND this should always be 0. + int cryostat=caf::kUninitializedInt; ///< Which cryostat the blip was reconstructed to. For SBND this should always be 0. int TPC=caf::kUninitializedInt; ///< Which tpc the blip was reconstructed to. For SBND this may be 0 or 1. - int NPlanes=caf::kUninitializedInt; ///< Number of planes matched to build the blip. Blips must be plane matched so this should be 2+ planes. - int MaxWireSpan=caf::kUninitializedInt; ///< Maximum span of wires on any plane hit-cluster - float TimeTick=-999; ///< Average time of hitclusters making up blips. [tpc tick] + int nPlanes=caf::kUninitializedInt; ///< Number of planes matched to build the blip. Blips must be plane matched so this should be 2+ planes. + int maxWireSpan=caf::kUninitializedInt; ///< Maximum span of wires on any plane hit-cluster + float timeTick=-999; ///< Average time of hitclusters making up blips. [tpc tick] /*! Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster */ - float Time=-999; ///< Average time of hitclusters making up blips. [us] + float time=-999; ///< Average time of hitclusters making up blips. [us] /*! Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster */ - float Charge=caf::kSignalingNaN; ///< Charge on calorimetry plane [e-] - float Energy=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (const dE/dx, fcl-configurable) [GeV] - float EnergyESTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (ESTAR method from ArgoNeuT) [GeV] - float EnergyPSTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] - float ProxTrkDist=caf::kSignalingNaN; ///< 3-D distance to closest track, assuming the blip was concident with event trigger [cm] + float charge=caf::kSignalingNaN; ///< Charge on calorimetry plane [e-] + float energy=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (const dE/dx, fcl-configurable) [GeV] + float energyESTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (ESTAR method from ArgoNeuT) [GeV] + float energyPSTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] + float proxTrkDist=caf::kSignalingNaN; ///< 3-D distance to closest track, assuming the blip was concident with event trigger [cm] /*! for properly flash matched out-of-time tracks this distance will be wrong! The blips have no such flash matching ability as of yet */ - int ProxTrkID=caf::kUninitializedInt; ///< index of the of closest track, assuming the blip was concident with event trigger + int proxTrkID=caf::kUninitializedInt; ///< index of the of closest track, assuming the blip was concident with event trigger bool inCylinder=false; ///< Bool for whether this blip falls in a 45 degree cone relative to any track closer than fcl-set CylinderRadius (15 cm) /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ - SRVector3D Position; ///< 3D position vector. Reconstructed with wrong t0! [cm] - float SigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] + SRVector3D position; ///< 3D position vector. Reconstructed with wrong t0! [cm] + float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] std::array clusters; ///< Plane/cluster-specific information. Just contains hit clusters making up this blip! diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 706ddcf..0b4d10d 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -21,42 +21,42 @@ namespace caf struct SRBlipHitClust { int ID = caf::kUninitializedInt; ///< Per-plane index for the hit clusters. In SBND we save every collection plane hitcluster but not the induction bool isValid = false; ///< Bool check that every hit is in the same cryostat, tpc, plane. Should always be true for saved items - int CenterChan = caf::kUninitializedInt; ///< Channel ID of the wire in the geometric center of the hit cluster - int CenterWire = caf::kUninitializedInt; ///< Wire ID of the wire in the geometric center of the hit cluster + int centerChan = caf::kUninitializedInt; ///< Channel ID of the wire in the geometric center of the hit cluster + int centerWire = caf::kUninitializedInt; ///< Wire ID of the wire in the geometric center of the hit cluster bool isTruthMatched = false; ///< is there a trueBlip with the same leadG4ID as one of the G4IDs making up this cluster bool isMatched = false; ///< Is this hit cluster plane-matched into a full 3d blip - int DeadWireSep = caf::kUninitializedInt; ///< Separation between the extreme ends of the hitcluster and the nearest dead wire. + int deadWireSep = caf::kUninitializedInt; ///< Separation between the extreme ends of the hitcluster and the nearest dead wire. /*! DeadWireSep can be between 0 and 5 and valid. Larger separations are filled in as 99. */ - int Cryostat = caf::kUninitializedInt; ///< cryostat for this hit cluster + int cryostat = caf::kUninitializedInt; ///< cryostat for this hit cluster int TPC = caf::kUninitializedInt; ///< TPC for this hit cluster - int Plane = caf::kUninitializedInt; ///< Plane index for this hit cluster - int NHits = caf::kUninitializedInt; ///< Number of hits making up this hit cluster - int NWires = caf::kUninitializedInt; ///< Wire span of the hit cluster + int plane = caf::kUninitializedInt; ///< Plane index for this hit cluster + int nHits = caf::kUninitializedInt; ///< Number of hits making up this hit cluster + int nWires = caf::kUninitializedInt; ///< Wire span of the hit cluster float ADCs = caf::kUninitializedInt; ///< ADC integral sum of hits making up the cluster [ADC-tick] - float Amplitude = caf::kUninitializedInt; ///< Max amplitude of hits making up the hit cluster [ADC] - float Charge = caf::kUninitializedInt; ///< Total charge of hits making up the hit cluster [e-] + float amplitude = caf::kUninitializedInt; ///< Max amplitude of hits making up the hit cluster [ADC] + float charge = caf::kUninitializedInt; ///< Total charge of hits making up the hit cluster [e-] /*! Charge is reconstructed from calo::CalorimetryAlg ( "sbnd_calorimetryalgmc" )-> ElectronsFromADCArea function Configuration is in sbndcode/sbndcode/LArSoftConfigurations/calorimetry_sbnd.fcl */ - float SigmaCharge = caf::kSignalingNaN; ///< charge-weighted charge uncertainties for this hit-cluster [e-] - float TimeTick = caf::kSignalingNaN; ///< charge-weighted average hit-peak-times for this hit-cluster [tick] - float Time = caf::kSignalingNaN; ///< charge-weighted average hit-peak-times for this hit-cluster [us] - float StartTime = caf::kSignalingNaN; ///< Minimum -1 sigma time of a hit in this cluster [us] - float EndTime = caf::kSignalingNaN; ///< Max +1 sigma time of a hit in this cluster [us] - float Timespan = caf::kSignalingNaN; ///< Hit cluster EndTime - StartTime [us] + float sigmaCharge = caf::kSignalingNaN; ///< charge-weighted charge uncertainties for this hit-cluster [e-] + float timeTick = caf::kSignalingNaN; ///< charge-weighted average hit-peak-times for this hit-cluster [tick] + float time = caf::kSignalingNaN; ///< charge-weighted average hit-peak-times for this hit-cluster [us] + float startTime = caf::kSignalingNaN; ///< Minimum -1 sigma time of a hit in this cluster [us] + float endTime = caf::kSignalingNaN; ///< Max +1 sigma time of a hit in this cluster [us] + float timespan = caf::kSignalingNaN; ///< Hit cluster EndTime - StartTime [us] float RMS = caf::kSignalingNaN; ///< Quadrature estimate of charge waveform timespread accounting for varied hit-drift times and internal hit-RMS [us] - int StartWire = caf::kUninitializedInt; ///< Lowest wireID involved with the hitcluster - int EndWire = caf::kUninitializedInt; ///< Highest wireID involved with the hit cluster - int NPulseTrainHits = caf::kUninitializedInt; ///< Number of hits with a GoodnessOfFit<0 involved in this hit cluster - float GoodnessOfFit = caf::kSignalingNaN; ///< Charge weighted hit-GoodnessofFit param - int BlipID = caf::kUninitializedInt; ///< If this hit cluster ended up in a blip, what is its ID - int EdepID = caf::kUninitializedInt; ///< If this hit cluster is MC-matched what is the trueBlip ID - std::vector HitIDs; ///< Index of the recob::hit objects making up this cluster - std::vector Wires; ///< Set of geo::wireIDs contributing hits to this cluster - std::vector Chans; ///< Set of raw::ChannelID_t contributing hits to this cluster + int startWire = caf::kUninitializedInt; ///< Lowest wireID involved with the hitcluster + int endWire = caf::kUninitializedInt; ///< Highest wireID involved with the hit cluster + int nPulseTrainHits = caf::kUninitializedInt; ///< Number of hits with a GoodnessOfFit<0 involved in this hit cluster + float goodnessOfFit = caf::kSignalingNaN; ///< Charge weighted hit-GoodnessofFit param + int blipID = caf::kUninitializedInt; ///< If this hit cluster ended up in a blip, what is its ID + int edepID = caf::kUninitializedInt; ///< If this hit cluster is MC-matched what is the trueBlip ID + std::vector hitIDs; ///< Index of the recob::hit objects making up this cluster + std::vector wires; ///< Set of geo::wireIDs contributing hits to this cluster + std::vector chans; ///< Set of raw::ChannelID_t contributing hits to this cluster std::vector G4IDs; ///< simb::MCParticle track ID contributing hits to this cluster }; } diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index 9e384a0..0310294 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -22,18 +22,18 @@ namespace caf */ struct SRBlipTrueBlip { int ID = caf::kUninitializedInt; ///< Index of this trueBlip object - int Cryostat = caf::kUninitializedInt; ///< Cryostat ID the blip reconstructed to + int cryostat = caf::kUninitializedInt; ///< Cryostat ID the blip reconstructed to int TPC = caf::kUninitializedInt; ///< TPC ID the blip reconstructed to - float Time = caf::kSignalingNaN; ///< Charge weighted peak time of TrueBlip energy depositions [tick] - float DriftTime = caf::kSignalingNaN; ///< Charge weighted drift time of TrueBlip energy depositions [tick] - float Energy = caf::kSignalingNaN; ///< Total energy dep [GeV] - int DepElectrons = caf::kUninitializedInt; ///< Total deposited electrons [e-] - int NumElectrons = caf::kUninitializedInt; ///< electrons reaching wires [e-] - int LeadG4ID = caf::kUninitializedInt; ///< G4 track ID depositing the most charge in this deposition - int LeadG4Index = caf::kUninitializedInt; ///< G4 track Index depositing the most charge in this deposition - int LeadG4PDG = caf::kUninitializedInt; ///< G4 PDG associated with the track depositing the most charge - float LeadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip - SRVector3D Position; ///< Charge weighted true-XYZ position [cm] + float time = caf::kSignalingNaN; ///< Charge weighted peak time of TrueBlip energy depositions [tick] + float driftTime = caf::kSignalingNaN; ///< Charge weighted drift time of TrueBlip energy depositions [tick] + float energy = caf::kSignalingNaN; ///< Total energy dep [GeV] + int depElectrons = caf::kUninitializedInt; ///< Total deposited electrons [e-] + int numElectrons = caf::kUninitializedInt; ///< electrons reaching wires [e-] + int leadG4ID = caf::kUninitializedInt; ///< G4 track ID depositing the most charge in this deposition + int leadG4Index = caf::kUninitializedInt; ///< G4 track Index depositing the most charge in this deposition + int leadG4PDG = caf::kUninitializedInt; ///< G4 PDG associated with the track depositing the most charge + float leadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip + SRVector3D position; ///< Charge weighted true-XYZ position [cm] }; } #endif From 368fb1ae1f293e340377f6fcafc0f75213148c4e Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 17:22:14 -0600 Subject: [PATCH 50/68] Change the array --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index bbbf26d..312ed44 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -57,7 +57,7 @@ namespace caf float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] - std::array clusters; ///< Plane/cluster-specific information. Just contains hit clusters making up this blip! + SRBlipHitClust clusters[kNplanes]; ///< Plane/cluster-specific information. Just contains hit clusters making up this blip! SRBlipTrueBlip truthBlip; ///< Truth-matched energy deposition. Just contains the relevant MC truth info to this blip! }; } From 8e880ee50738847ae3652955e182561afc8a8351 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 17:37:35 -0600 Subject: [PATCH 51/68] Comment alignment --- sbnanaobj/StandardRecord/SRBlip.h | 38 +++++++++++------------ sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 10 +++--- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 312ed44..789f53d 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -26,39 +26,39 @@ namespace caf public: SRBlip(); static constexpr int kNplanes = 3; - int ID=caf::kUninitializedInt; ///< Internal index for blip labelling - bool isValid=false; ///< Blip passes basic checks in reco. All blips saved to artRoot file should be valid. + int ID=caf::kUninitializedInt; ///< Internal index for blip labelling + bool isValid=false; ///< Blip passes basic checks in reco. All blips saved to artRoot file should be valid. int cryostat=caf::kUninitializedInt; ///< Which cryostat the blip was reconstructed to. For SBND this should always be 0. int TPC=caf::kUninitializedInt; ///< Which tpc the blip was reconstructed to. For SBND this may be 0 or 1. - int nPlanes=caf::kUninitializedInt; ///< Number of planes matched to build the blip. Blips must be plane matched so this should be 2+ planes. - int maxWireSpan=caf::kUninitializedInt; ///< Maximum span of wires on any plane hit-cluster - float timeTick=-999; ///< Average time of hitclusters making up blips. [tpc tick] + int nPlanes=caf::kUninitializedInt; ///< Number of planes matched to build the blip. Blips must be plane matched so this should be 2+ planes. + int maxWireSpan=caf::kUninitializedInt; ///< Maximum span of wires on any plane hit-cluster + float timeTick=-999; ///< Average time of hitclusters making up blips. [tpc tick] /*! Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster */ - float time=-999; ///< Average time of hitclusters making up blips. [us] + float time=-999; ///< Average time of hitclusters making up blips. [us] /*! Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster */ - float charge=caf::kSignalingNaN; ///< Charge on calorimetry plane [e-] - float energy=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (const dE/dx, fcl-configurable) [GeV] - float energyESTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (ESTAR method from ArgoNeuT) [GeV] - float energyPSTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] - float proxTrkDist=caf::kSignalingNaN; ///< 3-D distance to closest track, assuming the blip was concident with event trigger [cm] + float charge=caf::kSignalingNaN; ///< Charge on calorimetry plane [e-] + float energy=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (const dE/dx, fcl-configurable) [GeV] + float energyESTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (ESTAR method from ArgoNeuT) [GeV] + float energyPSTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] + float proxTrkDist=caf::kSignalingNaN; ///< 3-D distance to closest track, assuming the blip was concident with event trigger [cm] /*! for properly flash matched out-of-time tracks this distance will be wrong! The blips have no such flash matching ability as of yet */ - int proxTrkID=caf::kUninitializedInt; ///< index of the of closest track, assuming the blip was concident with event trigger - bool inCylinder=false; ///< Bool for whether this blip falls in a 45 degree cone relative to any track closer than fcl-set CylinderRadius (15 cm) + int proxTrkID=caf::kUninitializedInt; ///< index of the of closest track, assuming the blip was concident with event trigger + bool inCylinder=false; ///< Bool for whether this blip falls in a 45 degree cone relative to any track closer than fcl-set CylinderRadius (15 cm) /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ - SRVector3D position; ///< 3D position vector. Reconstructed with wrong t0! [cm] - float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] - float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] - float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] - SRBlipHitClust clusters[kNplanes]; ///< Plane/cluster-specific information. Just contains hit clusters making up this blip! - SRBlipTrueBlip truthBlip; ///< Truth-matched energy deposition. Just contains the relevant MC truth info to this blip! + SRVector3D position; ///< 3D position vector. Reconstructed with wrong t0! [cm] + float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] + float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] + float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] + SRBlipHitClust clusters[kNplanes]; ///< Plane/cluster-specific information. Just contains hit clusters making up this blip! + SRBlipTrueBlip truthBlip; ///< Truth-matched energy deposition. Just contains the relevant MC truth info to this blip! }; } #endif diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index 0310294..dd0b612 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -24,16 +24,16 @@ namespace caf int ID = caf::kUninitializedInt; ///< Index of this trueBlip object int cryostat = caf::kUninitializedInt; ///< Cryostat ID the blip reconstructed to int TPC = caf::kUninitializedInt; ///< TPC ID the blip reconstructed to - float time = caf::kSignalingNaN; ///< Charge weighted peak time of TrueBlip energy depositions [tick] - float driftTime = caf::kSignalingNaN; ///< Charge weighted drift time of TrueBlip energy depositions [tick] - float energy = caf::kSignalingNaN; ///< Total energy dep [GeV] + float time = caf::kSignalingNaN; ///< Charge weighted peak time of TrueBlip energy depositions [tick] + float driftTime = caf::kSignalingNaN; ///< Charge weighted drift time of TrueBlip energy depositions [tick] + float energy = caf::kSignalingNaN; ///< Total energy dep [GeV] int depElectrons = caf::kUninitializedInt; ///< Total deposited electrons [e-] int numElectrons = caf::kUninitializedInt; ///< electrons reaching wires [e-] int leadG4ID = caf::kUninitializedInt; ///< G4 track ID depositing the most charge in this deposition int leadG4Index = caf::kUninitializedInt; ///< G4 track Index depositing the most charge in this deposition int leadG4PDG = caf::kUninitializedInt; ///< G4 PDG associated with the track depositing the most charge - float leadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip - SRVector3D position; ///< Charge weighted true-XYZ position [cm] + float leadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip + SRVector3D position; ///< Charge weighted true-XYZ position [cm] }; } #endif From 84860490a43e6dc22d37281acdb8e76bdeb9e82b Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 18:01:25 -0600 Subject: [PATCH 52/68] Alignment --- sbnanaobj/StandardRecord/SRBlip.h | 1 - sbnanaobj/StandardRecord/SRBlipHitClust.h | 13 ++++++------- sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 789f53d..3814f18 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -8,7 +8,6 @@ #include "sbnanaobj/StandardRecord/SRVector3D.h" #include "sbnanaobj/StandardRecord/SRBlipHitClust.h" #include "sbnanaobj/StandardRecord/SRBlipTrueBlip.h" -#include #include "sbnanaobj/StandardRecord/SRConstants.h" namespace caf diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 0b4d10d..1597997 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -5,8 +5,7 @@ */ #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H #define SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H -#include -#include +#include #include "sbnanaobj/StandardRecord/SRVector3D.h" #include "sbnanaobj/StandardRecord/SRConstants.h" @@ -18,13 +17,13 @@ namespace caf * Within a hit cluster certain statistical summaries of the collection are saved including: * Total charge, total charge uncertianty, peak hit amplitude, and charge weighted RMS hit spread */ - struct SRBlipHitClust { + struct SRBlipHitClust { int ID = caf::kUninitializedInt; ///< Per-plane index for the hit clusters. In SBND we save every collection plane hitcluster but not the induction bool isValid = false; ///< Bool check that every hit is in the same cryostat, tpc, plane. Should always be true for saved items - int centerChan = caf::kUninitializedInt; ///< Channel ID of the wire in the geometric center of the hit cluster - int centerWire = caf::kUninitializedInt; ///< Wire ID of the wire in the geometric center of the hit cluster bool isTruthMatched = false; ///< is there a trueBlip with the same leadG4ID as one of the G4IDs making up this cluster bool isMatched = false; ///< Is this hit cluster plane-matched into a full 3d blip + int centerChan = caf::kUninitializedInt; ///< Channel ID of the wire in the geometric center of the hit cluster + int centerWire = caf::kUninitializedInt; ///< Wire ID of the wire in the geometric center of the hit cluster int deadWireSep = caf::kUninitializedInt; ///< Separation between the extreme ends of the hitcluster and the nearest dead wire. /*! DeadWireSep can be between 0 and 5 and valid. Larger separations are filled in as 99. @@ -54,8 +53,8 @@ namespace caf float goodnessOfFit = caf::kSignalingNaN; ///< Charge weighted hit-GoodnessofFit param int blipID = caf::kUninitializedInt; ///< If this hit cluster ended up in a blip, what is its ID int edepID = caf::kUninitializedInt; ///< If this hit cluster is MC-matched what is the trueBlip ID - std::vector hitIDs; ///< Index of the recob::hit objects making up this cluster - std::vector wires; ///< Set of geo::wireIDs contributing hits to this cluster + std::vector hitIDs; ///< Index of the recob::hit objects making up this cluster. Size should match nHits + std::vector wires; ///< Set of geo::wireIDs contributing hits to this cluster. Size should match nWires std::vector chans; ///< Set of raw::ChannelID_t contributing hits to this cluster std::vector G4IDs; ///< simb::MCParticle track ID contributing hits to this cluster }; diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index dd0b612..00a1b24 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -20,7 +20,7 @@ namespace caf * That blip reconstruction applies cuts to overall blip size/spread * A single TrueBlip will be constructed for energy depositions within TrueBlipMergeDist (fcl set 0.3 cm by default) */ - struct SRBlipTrueBlip { + struct SRBlipTrueBlip { int ID = caf::kUninitializedInt; ///< Index of this trueBlip object int cryostat = caf::kUninitializedInt; ///< Cryostat ID the blip reconstructed to int TPC = caf::kUninitializedInt; ///< TPC ID the blip reconstructed to From 8b76963619a49451098dd9064f4e23ecc8c31d09 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 18:18:12 -0600 Subject: [PATCH 53/68] fixing class versions --- sbnanaobj/StandardRecord/classes_def.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index b49855c..e1d1d1d 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -321,15 +321,19 @@ - + + - + + + - + + From 8ce7a3a3bae1c6350fc34f82d22215d596b42ac7 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Sun, 30 Nov 2025 18:33:59 -0600 Subject: [PATCH 54/68] Updated class version --- sbnanaobj/StandardRecord/classes_def.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 4837b44..cd189d8 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -5,7 +5,8 @@ - + + From b96866af49dfe75ddf09351ca6c310cb7ff905ee Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Mon, 15 Dec 2025 15:26:24 -0600 Subject: [PATCH 55/68] Minor updates to const var location and comments --- sbnanaobj/StandardRecord/SRBlip.cxx | 10 +++++----- sbnanaobj/StandardRecord/SRBlip.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx index e50547d..6db4b2a 100644 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ b/sbnanaobj/StandardRecord/SRBlip.cxx @@ -1,8 +1,8 @@ -//////////////////////////////////////////////////////////////////////// -// \file SRBlip.cxx -// \brief SRBlip object for localized energy deposits in bulk LAr -// \author $Author: jmclaughlin2@illinoistech.edu -//////////////////////////////////////////////////////////////////////// +/** + * @file SRBlip.h + * @brief SRBlip object for localized energy deposits in bulk LAr + * @author Jacob McLaughlin jmclaughlin2@illinoistech.edu + */ #include "sbnanaobj/StandardRecord/SRBlip.h" diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 3814f18..b1c87e3 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -12,7 +12,6 @@ namespace caf { - const int kNplanes = 3; /** Blips are small, plane-matched, energy deposition in liquid argon with sizes similar to wire separation. * Blips are composed of hit-clusters, which are (time and space) adjacent hits on a single wire plane. * A single plane, usually the collection, is given a privledged position as the calorimetry plane. @@ -22,6 +21,7 @@ namespace caf */ class SRBlip { + const int kNplanes = 3; public: SRBlip(); static constexpr int kNplanes = 3; From b45980c312609c6689987fcf8e8c965ae6ad93a7 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Mon, 15 Dec 2025 15:54:55 -0600 Subject: [PATCH 56/68] Minor updates to const var --- sbnanaobj/StandardRecord/SRBlip.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index b1c87e3..b5aa2d8 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -21,7 +21,6 @@ namespace caf */ class SRBlip { - const int kNplanes = 3; public: SRBlip(); static constexpr int kNplanes = 3; From ef4554e171f77f4b042b92103ffbcebbb5af5d03 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Fri, 9 Jan 2026 13:26:14 -0600 Subject: [PATCH 57/68] Adjusted position initilization --- sbnanaobj/StandardRecord/SRBlip.cxx | 20 -------------------- sbnanaobj/StandardRecord/SRBlip.h | 2 +- sbnanaobj/StandardRecord/SRBlipTrueBlip.h | 2 +- 3 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 sbnanaobj/StandardRecord/SRBlip.cxx diff --git a/sbnanaobj/StandardRecord/SRBlip.cxx b/sbnanaobj/StandardRecord/SRBlip.cxx deleted file mode 100644 index 6db4b2a..0000000 --- a/sbnanaobj/StandardRecord/SRBlip.cxx +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @file SRBlip.h - * @brief SRBlip object for localized energy deposits in bulk LAr - * @author Jacob McLaughlin jmclaughlin2@illinoistech.edu - */ - -#include "sbnanaobj/StandardRecord/SRBlip.h" - - -namespace caf -{ - - SRBlip::SRBlip() - { - position.SetX(-999); //3d X Position [cm] - position.SetY(-999); //3d Y Position [cm] - position.SetZ(-999); //3d Z Position [cm] - } - -} diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index b5aa2d8..002ccff 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -51,7 +51,7 @@ namespace caf /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ - SRVector3D position; ///< 3D position vector. Reconstructed with wrong t0! [cm] + SRVector3D position{ -9999.9, -9999.9, -9999.9 }; ///< 3D position vector. Reconstructed with wrong t0! [cm] float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h index 00a1b24..d2a80c8 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRBlipTrueBlip.h @@ -33,7 +33,7 @@ namespace caf int leadG4Index = caf::kUninitializedInt; ///< G4 track Index depositing the most charge in this deposition int leadG4PDG = caf::kUninitializedInt; ///< G4 PDG associated with the track depositing the most charge float leadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip - SRVector3D position; ///< Charge weighted true-XYZ position [cm] + SRVector3D position{ -9999.9, -9999.9, -9999.9 }; ///< Charge weighted true-XYZ position [cm] }; } #endif From 41645a23f6d7113dc6abd50aa1dadf9d7d85ba21 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Fri, 9 Jan 2026 13:44:15 -0600 Subject: [PATCH 58/68] responding to comments on class version, documentation linking, and struct vs class for blips --- sbnanaobj/StandardRecord/SRBlip.h | 73 +++++++++---------- sbnanaobj/StandardRecord/SRBlipHitClust.h | 8 +- .../{SRBlipTrueBlip.h => SRTrueBlip.h} | 6 +- sbnanaobj/StandardRecord/classes_def.xml | 16 ++-- 4 files changed, 48 insertions(+), 55 deletions(-) rename sbnanaobj/StandardRecord/{SRBlipTrueBlip.h => SRTrueBlip.h} (93%) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 002ccff..d149a5c 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -7,7 +7,7 @@ #define SRBLIP_H #include "sbnanaobj/StandardRecord/SRVector3D.h" #include "sbnanaobj/StandardRecord/SRBlipHitClust.h" -#include "sbnanaobj/StandardRecord/SRBlipTrueBlip.h" +#include "sbnanaobj/StandardRecord/SRTrueBlip.h" #include "sbnanaobj/StandardRecord/SRConstants.h" namespace caf @@ -19,44 +19,41 @@ namespace caf * the highest scoring one is selected. * Score components include cluster charge, cluster time duration, cluster peak time, and wire intersections. */ - class SRBlip - { - public: - SRBlip(); - static constexpr int kNplanes = 3; - int ID=caf::kUninitializedInt; ///< Internal index for blip labelling - bool isValid=false; ///< Blip passes basic checks in reco. All blips saved to artRoot file should be valid. - int cryostat=caf::kUninitializedInt; ///< Which cryostat the blip was reconstructed to. For SBND this should always be 0. - int TPC=caf::kUninitializedInt; ///< Which tpc the blip was reconstructed to. For SBND this may be 0 or 1. - int nPlanes=caf::kUninitializedInt; ///< Number of planes matched to build the blip. Blips must be plane matched so this should be 2+ planes. - int maxWireSpan=caf::kUninitializedInt; ///< Maximum span of wires on any plane hit-cluster - float timeTick=-999; ///< Average time of hitclusters making up blips. [tpc tick] - /*! + struct SRBlip{ + static constexpr int kNplanes = 3; + int ID=caf::kUninitializedInt; ///< Internal index for blip labelling + bool isValid=false; ///< Blip passes basic checks in reco. All blips saved to artRoot file should be valid. + int cryostat=caf::kUninitializedInt; ///< Which cryostat the blip was reconstructed to. For SBND this should always be 0. + int TPC=caf::kUninitializedInt; ///< Which tpc the blip was reconstructed to. For SBND this may be 0 or 1. + int nPlanes=caf::kUninitializedInt; ///< Number of planes matched to build the blip. Blips must be plane matched so this should be 2+ planes. + int maxWireSpan=caf::kUninitializedInt; ///< Maximum span of wires on any plane hit-cluster + float timeTick=-999; ///< Average time of hitclusters making up blips. [tpc tick] + /*! + Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster + */ + float time=-999; ///< Average time of hitclusters making up blips. [us] + /*! Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster - */ - float time=-999; ///< Average time of hitclusters making up blips. [us] - /*! - Hit cluster time is the charge-weighted average of the hit-peak times for hits in the cluster - */ - float charge=caf::kSignalingNaN; ///< Charge on calorimetry plane [e-] - float energy=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (const dE/dx, fcl-configurable) [GeV] - float energyESTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (ESTAR method from ArgoNeuT) [GeV] - float energyPSTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] - float proxTrkDist=caf::kSignalingNaN; ///< 3-D distance to closest track, assuming the blip was concident with event trigger [cm] - /*! - for properly flash matched out-of-time tracks this distance will be wrong! The blips have no such flash matching ability as of yet - */ - int proxTrkID=caf::kUninitializedInt; ///< index of the of closest track, assuming the blip was concident with event trigger - bool inCylinder=false; ///< Bool for whether this blip falls in a 45 degree cone relative to any track closer than fcl-set CylinderRadius (15 cm) - /*! - please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect - */ - SRVector3D position{ -9999.9, -9999.9, -9999.9 }; ///< 3D position vector. Reconstructed with wrong t0! [cm] - float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] - float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] - float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] - SRBlipHitClust clusters[kNplanes]; ///< Plane/cluster-specific information. Just contains hit clusters making up this blip! - SRBlipTrueBlip truthBlip; ///< Truth-matched energy deposition. Just contains the relevant MC truth info to this blip! + */ + float charge=caf::kSignalingNaN; ///< Charge on calorimetry plane [e-] + float energy=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (const dE/dx, fcl-configurable) [GeV] + float energyESTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (ESTAR method from ArgoNeuT) [GeV] + float energyPSTAR=caf::kSignalingNaN; ///< Reconstructed energy in the calorimetry plane (PSTAR method similar with ESTAR method from ArgoNeuT) [GeV] + float proxTrkDist=caf::kSignalingNaN; ///< 3-D distance to closest track, assuming the blip was coincident with event trigger [cm] + /*! + for properly flash matched out-of-time tracks this distance will be wrong! The blips have no such flash matching ability as of yet + */ + int proxTrkID=caf::kUninitializedInt; ///< index of the of closest track, assuming the blip was coincident with event trigger (recob::Track::ID()) + bool inCylinder=false; ///< Bool for whether this blip falls in a 45 degree cone relative to any track closer than fcl-set CylinderRadius (15 cm) + /*! + please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect + */ + SRVector3D position{ -9999.9, -9999.9, -9999.9 }; ///< 3D position vector. Reconstructed assuming that the blip was coincident with the event trigger [cm] + float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] + float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] + float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] + SRBlipHitClust clusters[kNplanes]; ///< Plane/cluster-specific information. Just contains hit clusters making up this blip! + SRTrueBlip truthBlip; ///< Truth-matched energy deposition. Just contains the relevant MC truth info to this blip! }; } #endif diff --git a/sbnanaobj/StandardRecord/SRBlipHitClust.h b/sbnanaobj/StandardRecord/SRBlipHitClust.h index 1597997..77abb86 100644 --- a/sbnanaobj/StandardRecord/SRBlipHitClust.h +++ b/sbnanaobj/StandardRecord/SRBlipHitClust.h @@ -53,10 +53,10 @@ namespace caf float goodnessOfFit = caf::kSignalingNaN; ///< Charge weighted hit-GoodnessofFit param int blipID = caf::kUninitializedInt; ///< If this hit cluster ended up in a blip, what is its ID int edepID = caf::kUninitializedInt; ///< If this hit cluster is MC-matched what is the trueBlip ID - std::vector hitIDs; ///< Index of the recob::hit objects making up this cluster. Size should match nHits - std::vector wires; ///< Set of geo::wireIDs contributing hits to this cluster. Size should match nWires - std::vector chans; ///< Set of raw::ChannelID_t contributing hits to this cluster - std::vector G4IDs; ///< simb::MCParticle track ID contributing hits to this cluster + std::vector hitIDs; ///< Index of the `recob::Hit` objects making up this cluster. Size should match nHits + std::vector wires; ///< Set of `geo::WireID` contributing hits to this cluster. Size should match nWires + std::vector chans; ///< Set of `raw::ChannelID` contributing hits to this cluster + std::vector G4IDs; ///< `simb::MCParticle` track ID contributing hits to this cluster }; } #endif diff --git a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h b/sbnanaobj/StandardRecord/SRTrueBlip.h similarity index 93% rename from sbnanaobj/StandardRecord/SRBlipTrueBlip.h rename to sbnanaobj/StandardRecord/SRTrueBlip.h index d2a80c8..1154914 100644 --- a/sbnanaobj/StandardRecord/SRBlipTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRTrueBlip.h @@ -1,6 +1,6 @@ /** - * @file SRBlipTrueBlip.h - * @brief SRBlipTrueBlip struct for localized energy deposits in bulk LAr. MC Truth information + * @file SRTrueBlip.h + * @brief SRTrueBlip struct for localized energy deposits in bulk LAr. MC Truth information * @author Jacob McLaughlin - jmclaughlin2@illinoistech.edu */ @@ -20,7 +20,7 @@ namespace caf * That blip reconstruction applies cuts to overall blip size/spread * A single TrueBlip will be constructed for energy depositions within TrueBlipMergeDist (fcl set 0.3 cm by default) */ - struct SRBlipTrueBlip { + struct SRTrueBlip { int ID = caf::kUninitializedInt; ///< Index of this trueBlip object int cryostat = caf::kUninitializedInt; ///< Cryostat ID the blip reconstructed to int TPC = caf::kUninitializedInt; ///< TPC ID the blip reconstructed to diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index cd189d8..12088d2 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -329,20 +329,16 @@ - - - + + - - - - + + - - - + + From c0fdfa2dce946707e6f6dc783f03ad88a67cc5a5 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Fri, 9 Jan 2026 13:59:29 -0600 Subject: [PATCH 59/68] Missed two name changes --- sbnanaobj/StandardRecord/classes_def.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 12088d2..03c67d1 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -337,7 +337,7 @@ - + @@ -374,7 +374,7 @@ - + From 9e6c3e4d12ac4494cb626d4257f5341728282226 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Fri, 9 Jan 2026 14:03:22 -0600 Subject: [PATCH 60/68] Updating checksums --- sbnanaobj/StandardRecord/classes_def.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbnanaobj/StandardRecord/classes_def.xml b/sbnanaobj/StandardRecord/classes_def.xml index 03c67d1..e5ed627 100644 --- a/sbnanaobj/StandardRecord/classes_def.xml +++ b/sbnanaobj/StandardRecord/classes_def.xml @@ -330,7 +330,7 @@ - + @@ -338,7 +338,7 @@ - + From 20082f000d9f162f7a68625af7d74fd08ee218bf Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 14 Jan 2026 15:24:44 -0600 Subject: [PATCH 61/68] Updated position constructor call --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- sbnanaobj/StandardRecord/SRTrueBlip.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index d149a5c..8e6aa20 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -48,7 +48,7 @@ namespace caf /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ - SRVector3D position{ -9999.9, -9999.9, -9999.9 }; ///< 3D position vector. Reconstructed assuming that the blip was coincident with the event trigger [cm] + SRVector3D position( -9999.9, -9999.9, -9999.9 ); ///< 3D position vector. Reconstructed assuming that the blip was coincident with the event trigger [cm] float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] diff --git a/sbnanaobj/StandardRecord/SRTrueBlip.h b/sbnanaobj/StandardRecord/SRTrueBlip.h index 1154914..3b26757 100644 --- a/sbnanaobj/StandardRecord/SRTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRTrueBlip.h @@ -33,7 +33,7 @@ namespace caf int leadG4Index = caf::kUninitializedInt; ///< G4 track Index depositing the most charge in this deposition int leadG4PDG = caf::kUninitializedInt; ///< G4 PDG associated with the track depositing the most charge float leadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip - SRVector3D position{ -9999.9, -9999.9, -9999.9 }; ///< Charge weighted true-XYZ position [cm] + SRVector3D position( -9999.9, -9999.9, -9999.9 ); ///< Charge weighted true-XYZ position [cm] }; } #endif From aade1bb3820e166c7aa62a2679c7a2a9ffc28d3c Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 14 Jan 2026 15:49:44 -0600 Subject: [PATCH 62/68] Updated position constructor call --- sbnanaobj/StandardRecord/SRVector3D.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRVector3D.h b/sbnanaobj/StandardRecord/SRVector3D.h index bce6f8c..409c8bc 100644 --- a/sbnanaobj/StandardRecord/SRVector3D.h +++ b/sbnanaobj/StandardRecord/SRVector3D.h @@ -18,9 +18,8 @@ namespace caf public: SRVector3D(); virtual ~SRVector3D(); - -#ifndef __castxml__ SRVector3D(float x, float y, float z); +#ifndef __castxml__ /// Easy conversion from TVector3 SRVector3D(const TVector3& v); From 6075123db005d5d4b76737b586b6fcf02a1d868b Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 14 Jan 2026 16:00:57 -0600 Subject: [PATCH 63/68] Updated position constructor call --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- sbnanaobj/StandardRecord/SRTrueBlip.h | 2 +- sbnanaobj/StandardRecord/SRVector3D.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index 8e6aa20..f9ec715 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -48,7 +48,7 @@ namespace caf /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ - SRVector3D position( -9999.9, -9999.9, -9999.9 ); ///< 3D position vector. Reconstructed assuming that the blip was coincident with the event trigger [cm] + SRVector3D position = SRVector3D( -9999.9, -9999.9, -9999.9 ); ///< 3D position vector. Reconstructed assuming that the blip was coincident with the event trigger [cm] float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] diff --git a/sbnanaobj/StandardRecord/SRTrueBlip.h b/sbnanaobj/StandardRecord/SRTrueBlip.h index 3b26757..50822da 100644 --- a/sbnanaobj/StandardRecord/SRTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRTrueBlip.h @@ -33,7 +33,7 @@ namespace caf int leadG4Index = caf::kUninitializedInt; ///< G4 track Index depositing the most charge in this deposition int leadG4PDG = caf::kUninitializedInt; ///< G4 PDG associated with the track depositing the most charge float leadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip - SRVector3D position( -9999.9, -9999.9, -9999.9 ); ///< Charge weighted true-XYZ position [cm] + SRVector3D position = SRVector3D( -9999.9, -9999.9, -9999.9 ); ///< Charge weighted true-XYZ position [cm] }; } #endif diff --git a/sbnanaobj/StandardRecord/SRVector3D.h b/sbnanaobj/StandardRecord/SRVector3D.h index 409c8bc..bce6f8c 100644 --- a/sbnanaobj/StandardRecord/SRVector3D.h +++ b/sbnanaobj/StandardRecord/SRVector3D.h @@ -18,8 +18,9 @@ namespace caf public: SRVector3D(); virtual ~SRVector3D(); - SRVector3D(float x, float y, float z); + #ifndef __castxml__ + SRVector3D(float x, float y, float z); /// Easy conversion from TVector3 SRVector3D(const TVector3& v); From 9b8cdbcc2256728e58240be193134d510e150939 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 14 Jan 2026 16:10:53 -0600 Subject: [PATCH 64/68] Maybe I have to cast things as float? --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- sbnanaobj/StandardRecord/SRTrueBlip.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index f9ec715..c856763 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -48,7 +48,7 @@ namespace caf /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ - SRVector3D position = SRVector3D( -9999.9, -9999.9, -9999.9 ); ///< 3D position vector. Reconstructed assuming that the blip was coincident with the event trigger [cm] + SRVector3D position = SRVector3D( float(-9999.9), float(-9999.9), float(-9999.9) ); ///< 3D position vector. Reconstructed assuming that the blip was coincident with the event trigger [cm] float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] diff --git a/sbnanaobj/StandardRecord/SRTrueBlip.h b/sbnanaobj/StandardRecord/SRTrueBlip.h index 50822da..ece4dd9 100644 --- a/sbnanaobj/StandardRecord/SRTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRTrueBlip.h @@ -33,7 +33,7 @@ namespace caf int leadG4Index = caf::kUninitializedInt; ///< G4 track Index depositing the most charge in this deposition int leadG4PDG = caf::kUninitializedInt; ///< G4 PDG associated with the track depositing the most charge float leadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip - SRVector3D position = SRVector3D( -9999.9, -9999.9, -9999.9 ); ///< Charge weighted true-XYZ position [cm] + SRVector3D position = SRVector3D( float(-9999.9), float(-9999.9), float(-9999.9) ); ///< Charge weighted true-XYZ position [cm] }; } #endif From 990624caee6cfbabab8d405419e7da5e521e01c7 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Wed, 14 Jan 2026 16:15:26 -0600 Subject: [PATCH 65/68] Other constructor just doesn't work for some reason. I will take the NaN default --- sbnanaobj/StandardRecord/SRBlip.h | 2 +- sbnanaobj/StandardRecord/SRTrueBlip.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sbnanaobj/StandardRecord/SRBlip.h b/sbnanaobj/StandardRecord/SRBlip.h index c856763..c5c0407 100644 --- a/sbnanaobj/StandardRecord/SRBlip.h +++ b/sbnanaobj/StandardRecord/SRBlip.h @@ -48,7 +48,7 @@ namespace caf /*! please note the blip X position is unreliable, so these distance and 3-d position derived variables may be incorrect */ - SRVector3D position = SRVector3D( float(-9999.9), float(-9999.9), float(-9999.9) ); ///< 3D position vector. Reconstructed assuming that the blip was coincident with the event trigger [cm] + SRVector3D position; ///< 3D position vector. Reconstructed assuming that the blip was coincident with the event trigger [cm] float sigmaYZ=caf::kSignalingNaN; ///< Uncertainty in YZ intersect [cm] float dX=caf::kSignalingNaN; ///< Equivalent length along drift direction [cm] float dYZ=caf::kSignalingNaN; ///< Approximate length scale in YZ space [cm] diff --git a/sbnanaobj/StandardRecord/SRTrueBlip.h b/sbnanaobj/StandardRecord/SRTrueBlip.h index ece4dd9..774e689 100644 --- a/sbnanaobj/StandardRecord/SRTrueBlip.h +++ b/sbnanaobj/StandardRecord/SRTrueBlip.h @@ -33,7 +33,7 @@ namespace caf int leadG4Index = caf::kUninitializedInt; ///< G4 track Index depositing the most charge in this deposition int leadG4PDG = caf::kUninitializedInt; ///< G4 PDG associated with the track depositing the most charge float leadCharge = caf::kSignalingNaN; ///< Largest charge deposition associated with this True Blip - SRVector3D position = SRVector3D( float(-9999.9), float(-9999.9), float(-9999.9) ); ///< Charge weighted true-XYZ position [cm] + SRVector3D position; ///< Charge weighted true-XYZ position [cm] }; } #endif From bb1863c9280cf75c70de695c93e3b77627ae4a46 Mon Sep 17 00:00:00 2001 From: Jacob McLaughlin Date: Tue, 10 Feb 2026 11:35:36 -0600 Subject: [PATCH 66/68] tweak to comments --- sbnanaobj/StandardRecord/StandardRecord.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/StandardRecord.h b/sbnanaobj/StandardRecord/StandardRecord.h index 338b142..d170752 100644 --- a/sbnanaobj/StandardRecord/StandardRecord.h +++ b/sbnanaobj/StandardRecord/StandardRecord.h @@ -68,7 +68,7 @@ namespace caf bool pass_flashtrig = false; ///< Whether this Record passed the Flash Trigger requirement SRSBNDFrameShiftInfo sbnd_frames; ///< List of Frame Shift in event in unit [ns] (SBND) SRSBNDTimingInfo sbnd_timings; ///< List of Timing Info in event in UNIX timestamp format(SBND) - std::vector blips; ///Blips are small O(mm) depositions in LAr, made from recob::hits + std::vector blips; ///Blips are small O(mm) depositions in LAr, made from recob::Hit SRSoftwareTrigger soft_trig; ///< Software Trigger Info in event int ndlp = 0; ///< Number of reco DLP (ML) interactions. std::vector dlp; ///< Reco DLP (ML) interactions. From 22595b2711e35ad3b1a8e74962847e075cc39d98 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 16 Feb 2026 13:04:25 -0600 Subject: [PATCH 67/68] fixed doxygen comment --- sbnanaobj/StandardRecord/StandardRecord.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbnanaobj/StandardRecord/StandardRecord.h b/sbnanaobj/StandardRecord/StandardRecord.h index d170752..58cabe4 100644 --- a/sbnanaobj/StandardRecord/StandardRecord.h +++ b/sbnanaobj/StandardRecord/StandardRecord.h @@ -68,7 +68,7 @@ namespace caf bool pass_flashtrig = false; ///< Whether this Record passed the Flash Trigger requirement SRSBNDFrameShiftInfo sbnd_frames; ///< List of Frame Shift in event in unit [ns] (SBND) SRSBNDTimingInfo sbnd_timings; ///< List of Timing Info in event in UNIX timestamp format(SBND) - std::vector blips; ///Blips are small O(mm) depositions in LAr, made from recob::Hit + std::vector blips; ///< Blips are small O(mm) depositions in LAr, made from recob::Hit SRSoftwareTrigger soft_trig; ///< Software Trigger Info in event int ndlp = 0; ///< Number of reco DLP (ML) interactions. std::vector dlp; ///< Reco DLP (ML) interactions. From dd4fbd3eb10ae557cfd2d011a4b3b3f7b49280a7 Mon Sep 17 00:00:00 2001 From: Leonidas Aliaga Soplin Date: Mon, 23 Feb 2026 13:22:40 -0600 Subject: [PATCH 68/68] Updated version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 438ba1a..8132cec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.20.00 REQUIRED) -project(sbnanaobj VERSION 10.00.14 LANGUAGES CXX) +project(sbnanaobj VERSION 10.00.15 LANGUAGES CXX) message(STATUS "\n\n ========================== ${PROJECT_NAME} ==========================")