-
Notifications
You must be signed in to change notification settings - Fork 14
Feature/adding blip to caf #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
528d5cc
1b1114b
62f6efb
06497ed
a1441e6
8563371
9c71906
1540dc9
5151a16
7f9599b
4442c5d
4563cf9
7f06505
fcf5303
780bb3a
a5088b8
a8668d0
3d28c4d
7e01d42
7fb37cc
142a08f
4665846
4bb677b
7ad0a53
1560a43
bbcffe8
041a6eb
ebdbf7b
89317d4
8684ef7
79eb63c
9029703
b29d341
572cbad
2a6c0c3
f2a292d
3325f3b
db811ed
21d0ab6
7f18fef
04018f6
6b744a9
009e568
849aaeb
013839e
f12e772
f5a5bca
a610c83
368fb1a
8e880ee
8486049
8b76963
87333a5
8ce7a3a
b96866a
b45980c
ef4554e
41645a2
c0fdfa2
9e6c3e4
20082f0
aade1bb
6075123
9b8cdbc
990624c
bb1863c
22595b2
9fedd3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 |
| 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] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general I would say it's better practice not to store things like this as separate variables given it is fully defined by two other variables. Instead have a member function that returns the difference between the start and end time. There may well be other examples of similar occurrences. I'm not going to hold the PR up for this, but something to think about for future. |
||
| 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 | ||
PetrilloAtWork marked this conversation as resolved.
Show resolved
Hide resolved
|
| 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 |
Uh oh!
There was an error while loading. Please reload this page.