Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
528d5cc
First try at adding blip data structure
Jjm321814 Oct 28, 2025
1b1114b
Adjusted unit
Jjm321814 Oct 29, 2025
62f6efb
Updated includes
Jjm321814 Oct 29, 2025
06497ed
Missing ;
Jjm321814 Oct 29, 2025
a1441e6
Missing #endif
Jjm321814 Oct 29, 2025
8563371
added destructor def
Jjm321814 Oct 29, 2025
9c71906
Putting blip entry in standard record class
Jjm321814 Oct 30, 2025
1540dc9
Updated classes_def entries
Jjm321814 Oct 31, 2025
5151a16
removing typedef
Jjm321814 Oct 31, 2025
7f9599b
Removed destructor
Jjm321814 Oct 31, 2025
4442c5d
ideas that didn't fix compilation
Oct 31, 2025
4563cf9
trying to simplify my SRBlip object
Jjm321814 Oct 31, 2025
7f06505
trying different checksum stuff
Jjm321814 Nov 5, 2025
fcf5303
Putting back destructor
Jjm321814 Nov 5, 2025
780bb3a
guessing at some checksums
Jjm321814 Nov 5, 2025
a5088b8
Trying to simplify build
Jjm321814 Nov 5, 2025
a8668d0
replacing tvector3d with SRVector3D:
Jjm321814 Nov 5, 2025
3d28c4d
remove guess at checksum
Jjm321814 Nov 5, 2025
7e01d42
finally got mrb to give me the magic number
Nov 5, 2025
7fb37cc
putting back the structs in blips
Jjm321814 Nov 5, 2025
142a08f
Replaced TVector3d
Jjm321814 Nov 5, 2025
4665846
Trying one struct at a time
Jjm321814 Nov 5, 2025
4bb677b
Changed some name scheme and includes
Jjm321814 Nov 5, 2025
7ad0a53
Another try
Jjm321814 Nov 5, 2025
1560a43
trying other indef
Jjm321814 Nov 5, 2025
bbcffe8
Adding a empty line
Jjm321814 Nov 5, 2025
041a6eb
Removing all pair information
Jjm321814 Nov 5, 2025
ebdbf7b
Maybe its mad about the array
Jjm321814 Nov 5, 2025
89317d4
Removing both structs but keeping include
Jjm321814 Nov 5, 2025
8684ef7
The machine has given us new checksums
Nov 5, 2025
79eb63c
Maybe with check sums it will work
Jjm321814 Nov 5, 2025
9029703
Changed to a vector rather than array
Jjm321814 Nov 5, 2025
b29d341
Hey a real compiler issue
Jjm321814 Nov 5, 2025
572cbad
Hey a real compiler issue
Jjm321814 Nov 5, 2025
2a6c0c3
Hey a real compiler issue
Jjm321814 Nov 5, 2025
f2a292d
reverting previous change
Jjm321814 Nov 5, 2025
3325f3b
removed std::pair objects to get proxy to work
Nov 6, 2025
db811ed
fixing merge conflict
Nov 10, 2025
21d0ab6
Compiled version
Nov 10, 2025
7f18fef
Merge branch 'develop' into feature/AddingBlipToCAF
Nov 13, 2025
04018f6
Changing default values
Nov 20, 2025
6b744a9
Removed depreciated variables and moved over comments
Jjm321814 Nov 30, 2025
009e568
missed one save
Jjm321814 Nov 30, 2025
849aaeb
Trying a different syntax for construction
Jjm321814 Nov 30, 2025
013839e
Trying a different syntax for construction
Jjm321814 Nov 30, 2025
f12e772
Trying a different syntax for construction
Jjm321814 Nov 30, 2025
f5a5bca
Changed defaults
Jjm321814 Nov 30, 2025
a610c83
Changed to camelcase
Jjm321814 Nov 30, 2025
368fb1a
Change the array
Jjm321814 Nov 30, 2025
8e880ee
Comment alignment
Jjm321814 Nov 30, 2025
8486049
Alignment
Jjm321814 Dec 1, 2025
8b76963
fixing class versions
Dec 1, 2025
87333a5
Merge branch 'develop' into feature/AddingBlipToCAF
Dec 1, 2025
8ce7a3a
Updated class version
Dec 1, 2025
b96866a
Minor updates to const var location and comments
Jjm321814 Dec 15, 2025
b45980c
Minor updates to const var
Jjm321814 Dec 15, 2025
ef4554e
Adjusted position initilization
Jjm321814 Jan 9, 2026
41645a2
responding to comments on class version, documentation linking, and s…
Jjm321814 Jan 9, 2026
c0fdfa2
Missed two name changes
Jjm321814 Jan 9, 2026
9e6c3e4
Updating checksums
Jjm321814 Jan 9, 2026
20082f0
Updated position constructor call
Jjm321814 Jan 14, 2026
aade1bb
Updated position constructor call
Jjm321814 Jan 14, 2026
6075123
Updated position constructor call
Jjm321814 Jan 14, 2026
9b8cdbc
Maybe I have to cast things as float?
Jjm321814 Jan 14, 2026
990624c
Other constructor just doesn't work for some reason. I will take the …
Jjm321814 Jan 14, 2026
bb1863c
tweak to comments
Jjm321814 Feb 10, 2026
22595b2
fixed doxygen comment
Jjm321814 Feb 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions sbnanaobj/StandardRecord/SRBlip.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* @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/SRTrueBlip.h"
#include "sbnanaobj/StandardRecord/SRConstants.h"

namespace caf
{
/** 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.
*/
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 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; ///< 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
62 changes: 62 additions & 0 deletions sbnanaobj/StandardRecord/SRBlipHitClust.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* @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 <vector>
#include "sbnanaobj/StandardRecord/SRVector3D.h"
#include "sbnanaobj/StandardRecord/SRConstants.h"

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 = 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
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.
*/
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 = 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<int> hitIDs; ///< Index of the `recob::Hit` objects making up this cluster. Size should match nHits
std::vector<int> wires; ///< Set of `geo::WireID` contributing hits to this cluster. Size should match nWires
std::vector<int> chans; ///< Set of `raw::ChannelID` contributing hits to this cluster
std::vector<int> G4IDs; ///< `simb::MCParticle` track ID contributing hits to this cluster
};
}
#endif
39 changes: 39 additions & 0 deletions sbnanaobj/StandardRecord/SRTrueBlip.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* @file SRTrueBlip.h
* @brief SRTrueBlip 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"
#include "sbnanaobj/StandardRecord/SRConstants.h"


namespace caf
{
/** True energy depositions
* std::vector<art::Ptr<simb::MCParticle> > makes a particle list
* std::vector<sim::SimChannel> 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 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
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
2 changes: 2 additions & 0 deletions sbnanaobj/StandardRecord/StandardRecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "sbnanaobj/StandardRecord/SRSoftwareTrigger.h"
#include "sbnanaobj/StandardRecord/SRInteractionDLP.h"
#include "sbnanaobj/StandardRecord/SRInteractionTruthDLP.h"
#include "sbnanaobj/StandardRecord/SRBlip.h"

/// Common Analysis Files
namespace caf
Expand Down Expand Up @@ -67,6 +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<SRBlip> 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<SRInteractionDLP> dlp; ///< Reco DLP (ML) interactions.
Expand Down
19 changes: 18 additions & 1 deletion sbnanaobj/StandardRecord/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<!-- art::Wrappers for these products are defined in CAFMaker -->

<lcgdict>
<class name="caf::StandardRecord" ClassVersion="16">
<class name="caf::StandardRecord" ClassVersion="17">
<version ClassVersion="17" checksum="4258387040"/>
<version ClassVersion="16" checksum="3621177915"/>
<version ClassVersion="15" checksum="1805006132"/>
<version ClassVersion="14" checksum="1860171062"/>
Expand Down Expand Up @@ -328,8 +329,21 @@
<version ClassVersion="10" checksum="4159815756"/>
</class>

<class name="caf::SRBlip" ClassVersion="10">
<version ClassVersion="10" checksum="238037982"/>
</class>

<class name="caf::SRBlipHitClust" ClassVersion="10">
<version ClassVersion="10" checksum="1544666038"/>
</class>

<class name="caf::SRTrueBlip" ClassVersion="10">
<version ClassVersion="10" checksum="3711015306"/>
</class>

<!--<class name="caf::SRLorentzVector" /> -->

<class name="std::vector<int>" />
<class name="std::vector<caf::SRSlice>" />
<class name="std::vector<caf::SRFakeReco>" />
<class name="std::vector<caf::SRFakeRecoParticle>" />
Expand Down Expand Up @@ -358,6 +372,9 @@
<class name="std::vector<caf::SRTrigger>" />
<class name="std::vector<caf::SRPFP>" />
<class name="std::vector<caf::SRCVNScore>" />
<class name="std::vector<caf::SRBlip>" />
<class name="std::vector<caf::SRBlipHitClust>" />
<class name="std::vector<caf::SRTrueBlip>" />

<class name="caf::SRCRTHitTruth" ClassVersion="10">
<version ClassVersion="10" checksum="3618232749"/>
Expand Down