Comments (2)
Here is the history. We can decide that things have evolved and that the type distinction is no longer important but I think that the history is useful input.
In the original conception. GenId was described which generator was run in a generator module. By construction it was independent of G4. Each subclass of G4VProcess has a member function that returns a character string that identifies the process. Originally ProcessCodes were just a mapping of these names to integers for efficiency in storage and comparison time. We added mu2ePrimary for G4Particles created by PrimaryGeneratorAction, which read the GenParticles from a data product.
The ProcessCodes and GenIds were made distinct types on purpose so that you could not accidentally compare one to the other.
Then things evolved. First, we added our own code to stop particles mid-G4 for many reasons. We created ProcessCodes for each of these. Second, it was inconvenient for people to discover mu2ePrimary and then have to follow the Ptr to the GenParticle and look up it's GenId. So someone added some (or all?) of the GenID names to the ProcessCode - the names map to different numbers in the two systems. I don't know how careful or complete this second step is. I also don't remember that change being made - I would have objected if I had noticed.
It sounds like there is a request to unifying these two concepts into a single concept. I am not opposed to this in principle but doing it right will be backwards breaking and intrusive; so it requires planning.
from offline.
To mind my the key question is this: do we have two distinct ideas here or is it really just one idea. Also, suppose you have a object of the new unified type - will it sometimes be important to know if it's a generator code vs a native G4 code vs a mu2e-addon G4 code?
from offline.
Related Issues (20)
- Improve trigger Validation fcl HOT 1
- Revisit bug-fix IO Rule from PR 1156
- As built locations in the Mu2e Hall
- root include path
- Where needed update the geometry to reflect as-built dimensions and locations
- g4 testing invokes reconstruction, bringing in database dependency HOT 5
- Add syntax to force CI to rebuild
- Offline split vs trig qualifier
- Rationalize types of constexpr definitions in CRVId.hh
- Some volumes break GEANT visualization HOT 1
- PrescaleEvent_module.cc prescaling algorithm
- no neutron in PDGCode enum-to-string
- Do we need to invent the concepts of a SpillId and MICycleId HOT 1
- regression in MT running for photonNuclear and gamma processes
- artdaq-core-mu2e/Data/EventHeader.hh
- CalPatRec ChannelID and PanelID are redundant with strawId
- MangedList collection class should be replaced by std::vector<std::unique_ptr<>>
- Calorimeter object needs documentation
- constructTargetPS depends on geometry maker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from offline.