-
Notifications
You must be signed in to change notification settings - Fork 16
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 40 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,40 @@ | ||
| //////////////////////////////////////////////////////////////////////// | ||
| // \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 | ||
|
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. @PetrilloAtWork and @JosiePaton can comment but I believe there are some pre-defined defaults in CAF-land? Plus I believe -5 is often used as long as it is unphysical.
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. Same comment for other objs
Contributor
Author
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. Updated most values to -5. For time of blips/hits -5 is a physical value, so I left it at -999. For the time tick I think index 0 is time 0, but I am not sure so I left that at -999 as well. |
||
| 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] | ||
| } | ||
| SRBlip::~SRBlip() | ||
| { | ||
| } | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,44 @@ | ||||||||||||
| //////////////////////////////////////////////////////////////////////// | ||||||||||||
| // \file SRBlip.h | ||||||||||||
| // \brief SRBlip object for localized energy deposits in bulk LAr | ||||||||||||
| // \author $Author: jmclaughlin2@illinoistech.edu | ||||||||||||
| //////////////////////////////////////////////////////////////////////// | ||||||||||||
|
PetrilloAtWork marked this conversation as resolved.
Outdated
|
||||||||||||
| #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" | ||||||||||||
|
PetrilloAtWork marked this conversation as resolved.
Outdated
|
||||||||||||
|
|
||||||||||||
| namespace caf | ||||||||||||
| { | ||||||||||||
| const int kNplanes = 3; | ||||||||||||
|
PetrilloAtWork marked this conversation as resolved.
Outdated
|
||||||||||||
| class SRBlip | ||||||||||||
|
PetrilloAtWork marked this conversation as resolved.
Outdated
|
||||||||||||
| { | ||||||||||||
| public: | ||||||||||||
|
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. All data members are public, so I recommend this to be declared a
Suggested change
(no need for
Contributor
Author
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. We have some plans to add sorted score information for blip flash matching in the future, so I would like this to remain a class in anticipation of that future work being done
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. Hmm... that means that the scores would be the only private members, and you would need a specific accessor only for that. That makes the data members asymmetric. Alternatively, you'd have to set all data private and provide one accessor per data member, which is tedious. |
||||||||||||
| SRBlip(); | ||||||||||||
| virtual ~SRBlip(); | ||||||||||||
|
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. Please reshape the class so that:
After all this, the
Contributor
Author
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.
Right now the .cxx just assigns the position values. I don't know how to avoid that. |
||||||||||||
| 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? | ||||||||||||
| SRVector3D Position; // 3D position TVector3 | ||||||||||||
|
PetrilloAtWork marked this conversation as resolved.
Outdated
|
||||||||||||
| 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 | ||||||||||||
|
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. Defaults are set in the constructor, can remove them from here.
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. Same comment to other objs
Contributor
Author
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. For blips I removed these from here. The others are just structs so I kept the values in the header file. |
||||||||||||
| }; | ||||||||||||
| } | ||||||||||||
| #endif | ||||||||||||
|
PetrilloAtWork marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| //////////////////////////////////////////////////////////////////////// | ||
| // \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 SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H | ||
| #define SBNANAOBJ_STANDARDRECORD_SRBLIPHITCLUST_H | ||
| #include <map> | ||
| #include <set> | ||
|
PetrilloAtWork marked this conversation as resolved.
Outdated
|
||
| #include "sbnanaobj/StandardRecord/SRVector3D.h" | ||
|
|
||
| namespace caf | ||
| { | ||
| struct SRBlipHitClust { | ||
|
PetrilloAtWork marked this conversation as resolved.
Outdated
|
||
| 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::vector<int> HitIDs; | ||
| std::vector<int> Wires; | ||
| std::vector<int> Chans; | ||
| std::vector<int> G4IDs; | ||
| //std::map<int,SRVector3D> IntersectLocations; //intermediate step used for matching | ||
| }; | ||
| } | ||
| #endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| //////////////////////////////////////////////////////////////////////// | ||
| // \file SRBlipTrueBlip.h | ||
| // \brief SRBlipTrueBlip struct for localized energy deposits in bulk LAr. MC Truth information | ||
| // \author $Author: jmclaughlin2@illinoistech.edu | ||
| //////////////////////////////////////////////////////////////////////// | ||
| #ifndef SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H | ||
| #define SBNANAOBJ_STANDARDRECORD_SRBLIPTRUEBLIP_H | ||
| #include "sbnanaobj/StandardRecord/SRVector3D.h" | ||
|
|
||
| namespace caf | ||
| { | ||
|
|
||
| struct SRBlipTrueBlip { | ||
|
PetrilloAtWork marked this conversation as resolved.
Outdated
|
||
| 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 | ||
| SRVector3D Position; // XYZ position | ||
| //std::map<int,float> G4ChargeMap; //intermediate processing step not needed for CAF | ||
| //std::map<int,float> G4PDGMap; | ||
| }; | ||
| } | ||
| #endif | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -24,6 +24,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 | ||||||
|
|
@@ -66,6 +67,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::hits | ||||||
|
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.
Suggested change
|
||||||
|
|
||||||
| int ndlp = 0; ///< Number of reco DLP (ML) interactions. | ||||||
| std::vector<SRInteractionDLP> dlp; ///< Reco DLP (ML) interactions. | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,8 +5,10 @@ | |
| <!-- art::Wrappers for these products are defined in CAFMaker --> | ||
|
|
||
| <lcgdict> | ||
| <class name="caf::StandardRecord" ClassVersion="15"> | ||
| <version ClassVersion="15" checksum="1805006132"/> | ||
| <class name="caf::StandardRecord" ClassVersion="17"> | ||
| <version ClassVersion="17" checksum="1651571235"/> | ||
| <version ClassVersion="16" checksum="3738947418"/> | ||
| <version ClassVersion="15" checksum="2636549707"/> | ||
|
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. Only need to retain the most recent checksum and set it to version 15
Contributor
Author
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. Updated to reflect this change
Contributor
Author
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. Surprisingly the changes to default values don't seem to impact the checksum? |
||
| <version ClassVersion="14" checksum="1860171062"/> | ||
| <version ClassVersion="13" checksum="1979816256"/> | ||
| <version ClassVersion="12" checksum="3984422068"/> | ||
|
|
@@ -320,8 +322,21 @@ | |
| <version ClassVersion="10" checksum="4159815756"/> | ||
| </class> | ||
|
|
||
| <class name="caf::SRBlip" ClassVersion="10"> | ||
| <version ClassVersion="10" checksum="3364148027"/> | ||
| </class> | ||
|
|
||
| <class name="caf::SRBlipHitClust" ClassVersion="10"> | ||
| <version ClassVersion="10" checksum="1233871129"/> | ||
| </class> | ||
|
|
||
| <class name="caf::SRBlipTrueBlip" ClassVersion="10"> | ||
| <version ClassVersion="10" checksum="984259034"/> | ||
| </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>" /> | ||
|
|
@@ -350,6 +365,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::SRBlipTrueBlip>" /> | ||
|
|
||
| <class name="caf::SRCRTHitTruth" ClassVersion="10"> | ||
| <version ClassVersion="10" checksum="3618232749"/> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert this header into Doxygen format.
(the full name would be also nice to add in the
@authorline, if you are ok with that)