Giter Site home page Giter Site logo

Comments (2)

kutschke avatar kutschke commented on August 14, 2024

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.

kutschke avatar kutschke commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.