rest-for-physics / rest-for-physics/framework
TRestMesh node data members improved design
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- C++
- Stars
- 19
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
The TRestMesh coordinates, energy and group id data members would be better encapsulated into a single structure so that we define for example
struct MeshNode {
UInt_t GroupID;
Int_t X;
Int_t Y;
Int_t Z;
Double_t Energy;
}
Then, we would replace
/// A vector storing the group ID of the corresponding nodes activated
std::vector<Int_t> fNodeGroupID;
/// A vector storing the X-dimension cell id
std::vector<Int_t> fNodeX;
/// A vector storing the Y-dimension cell id
std::vector<Int_t> fNodeY;
/// A vector storing the Z-dimension cell id
std::vector<Int_t> fNodeZ;
/// A vector storing the total energy inside the cell id
std::vector<Double_t> fEnergy;
by
std::vector <MeshNode> fMeshNodes;
This issue was brought by @juanangp at PR #73
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TRestMesh class and every use of fNodeGroupID, fNodeX, fNodeY, fNodeZ, and fEnergy; review PR #73 for the original context. Replace the separate members with the proposed MeshNode vector and update all affected usages while preserving existing mesh-node behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100