Get the track ids from primary mcparticles

Hi @simonspa ,
Thank you for the tip. I tried to implement this:

A. In MCParticle class:

  1. I have added the track_id_ variable to the MCParticle class.
  2. The constructor of MCParticle class now contains track_id. This is in the header file and this is in the cpp file.
  3. Added a getter for track_id in the MCParticle class.

B. In DepositionReader module:

  1. Opened a map to store mcparticle track id.
  2. Here mcparticle track_ids are stored.

The setup is compiling and running fine. But when I get the track id from MCParticle::getParticleTrackID, I see garbage values. For example, this is the input track ids:

Screen Shot 2021-11-25 at 17.52.17

and this is what I get from the processed output (x-axis is multiplied by 1e6):

I am not sure why this is happening. Is there any other place where I am supposed to add track_id? I did not change anything in DatabaseWriter module, but my understanding is that this is not needed because I am not writing to SQL database. Any heads up will be greatly appreciated.

Thanks once again!
Arka