-
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
base: develop
Are you sure you want to change the base?
Conversation
|
Adding a comment to each of these to track all 4 related PR. The changes to sbnobj, and sbnanaobj are fully independent of any other changes, so they can be approved first. sbndcode changes rely on sbnobj, so it will have to wait for the first approval. A later simple PR will delete the (now duplicated) class files in the BlipUtils folder here sbncode changes rely on both sbnobj and sbnanaobj, so that will have to wait for both of the first two approvals. |
| <version ClassVersion="17" checksum="1651571235"/> | ||
| <version ClassVersion="16" checksum="3738947418"/> | ||
| <version ClassVersion="15" checksum="2636549707"/> |
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.
Only need to retain the most recent checksum and set it to version 15
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.
Updated to reflect this change
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.
Surprisingly the changes to default values don't seem to impact the checksum?
sbnanaobj/StandardRecord/SRBlip.cxx
Outdated
| { | ||
| SRBlip::SRBlip() | ||
| { | ||
| ID = -9; // Blip ID / index |
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.
@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.
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.
Same comment for other objs
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.
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.
sbnanaobj/StandardRecord/SRBlip.h
Outdated
| 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 | ||
| 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 |
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.
Defaults are set in the constructor, can remove them from here.
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.
Same comment to other objs
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.
For blips I removed these from here. The others are just structs so I kept the values in the header file.
PetrilloAtWork
left a comment
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.
I left some comments on how to make the new classes more closely follow CAF standards.
I am left wondering though: this is an analysis format, and it seems to me that the vast majority of the information in these objects is unlikely to be used in an analysis — it feels more like input for reconstruction.
| <lcgdict> | ||
| <class name="caf::StandardRecord" ClassVersion="15"> | ||
| <version ClassVersion="15" checksum="1805006132"/> | ||
| <version ClassVersion="15" checksum="1651571235"/> |
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.
There is a change of checksum, which is Bad.
The recommendation is to restore the old line and then rebuild:
| <version ClassVersion="15" checksum="1651571235"/> |
At that point, ROOT will add another checksum and bump the version, and that new classes_def.xml file should be committed for this PR.
sbnanaobj/StandardRecord/SRBlip.cxx
Outdated
| //////////////////////////////////////////////////////////////////////// | ||
| // \file SRBlip.cxx | ||
| // \brief SRBlip object for localized energy deposits in bulk LAr | ||
| // \author $Author: jmclaughlin2@illinoistech.edu | ||
| //////////////////////////////////////////////////////////////////////// |
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.
| //////////////////////////////////////////////////////////////////////// | |
| // \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 jmclaughlin2@illinoistech.edu | |
| */ |
(the full name would be also nice to add in the @author line, if you are ok with that)
sbnanaobj/StandardRecord/SRBlip.h
Outdated
| //////////////////////////////////////////////////////////////////////// | ||
| // \file SRBlip.h | ||
| // \brief SRBlip object for localized energy deposits in bulk LAr | ||
| // \author $Author: jmclaughlin2@illinoistech.edu | ||
| //////////////////////////////////////////////////////////////////////// |
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.
Same Doxygen format:
| //////////////////////////////////////////////////////////////////////// | |
| // \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 jmclaughlin2@illinoistech.edu | |
| */ |
| namespace caf | ||
| { | ||
| const int kNplanes = 3; | ||
| class SRBlip |
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.
Add a description of the meaning of the class as Doxygen documentation.
You can start with something like:
| class SRBlip | |
| /** | |
| * @brief Small reconstructed isolated energy deposit ("blip"). | |
| * | |
| * A blip is informally defined as a small cluster of TPC hits with unclear relation | |
| * to other reconstructed objects. | |
| * ... | |
| */ | |
| class SRBlip |
sbnanaobj/StandardRecord/SRBlip.h
Outdated
|
|
||
| namespace caf | ||
| { | ||
| const int kNplanes = 3; |
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.
If you need a constant for the number of planes (and why not?) move it inside the object itself:
static constexpr int kNplanes = 3; ///< Maximum number of TPC planes.| int NHits = -5; | ||
| int NWires = -5; |
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.
If there is a relation between these counts and HitIDs/Wires vector size, write it explicitly.
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.
Added comments through this file. Now the vectors include a detail on their size matching these int
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.
The same requests as in sbnanaobj/StandardRecord/SRBlip.h:
- header in Doxygen format;
- use of constants in
SRConstants.hwhen sensible; - cluster
boolvariables together; - add descriptive comments;
- use camelCase variable names.
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.
Updated as suggested
|
|
||
| namespace caf | ||
| { | ||
| struct SRBlipHitClust { |
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.
Alignment:
| struct SRBlipHitClust { | |
| struct SRBlipHitClust { |
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.
Fixed
| namespace caf | ||
| { | ||
|
|
||
| struct SRBlipTrueBlip { |
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.
Alignment:
| struct SRBlipTrueBlip { | |
| struct SRBlipTrueBlip { |
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.
Fixed
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.
Same requests as sbnanaobj/StandardRecord/SRBlipHitClust.h.
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.
Reworked all comments
|
Okay I think all the comments across each PR is now at least partly addressed, and the code compiles and seems to make sensible output when I run it. |
|
Hi @PetrilloAtWork , it looks like Jacob has implemented all the changes requested. How does the PR look now? Thanks! |
Added classes to hold blip information in CAF format.
This results in the normal amount of CAF code duplication and replaces a few std::map and std::set objects in the LArSoft side with vectors.
This PR is independent of the associated ones in sbnobj, sbndcode, and sbncode.