Reconstruction of Compton Events

Hi all,

I want to reconstruct the compton events that are generated by a gamma interaction inside a CdTe sensor layer in a Timepix. I’m currently doing the following loop for the compton event extraction:

for(auto& hit : photon_hits) // loop over PixelHits
  auto pxcharge = hit->getPixelCharge();   
  auto sumcharge_compt = 0.; 
  auto sumcharge_others = 0.;

  for (auto& prop_charge : pxcharge->getPropagatedCharges()) // loop over PropagatedCharges
       auto charge = prop_charge->getCharge();
       auto process_id = prop_charge->getMCParticle()->getTrack()->getCreationProcessName();

       if (process_id == "compt") sumcharge_compt += charge;
       else sumcharge_others += charge;

//And then classify the PixelHits depending on sumcharge_* values

This has the problem that some PixelHits can get deposited charge from more than one process (i.e. compt and phot). Is there a way to avoide this problem? Or somehow track the full chain of interaction of a primary photon?

Thanks in advance,

Hi @jseb ,

I’m not sure I quite follow what you wish to do, could you clarify a bit?
Do you want to separate the charge deposited by incident photons undergoing Compton scattering from the charge deposited by incident photons with different interactions?

To track the full chain of interaction for a primary photon, you can use the isPirmary() method of the MCParticle object. This can be used to make sure you only track photons created at the source, and not secondary ones created in the sensor.

Another way could be to save the actual pointer for the particle, and only log the deposits for this particular one (in case you have several incident photons in a single event, for example).

Maybe @jisaidi has some ideas, or has done something similar for PET scanner simulations?

Kind regards,


As far as I understand the only tracking of “primary” particles we are doing in our research is quite simple in its approach.

Assuming your photon_hits is a vector of allpix you can use the function getMCParticles() to get a vector of all MCParticle who participated in the charge creation of your signal.We check that each element of this vector is indeed “primary” and crosscheck it by getting the parent and comparing to the original photon pointer. Then we sort chronologically the MCParticles and assign the process responsible for the signal as the getCreationProcessName() of the oldest mcparticle.

In our use case this occurs to give us reliably if the pixels were lit at the incipit by a Compton scattering or photoelectric effect as usually phot clusters have the “new photon” going away and maybe interact again very close to the initial point of interaction.

I hope this helps out.

Hi @hwennlof

Thank you for your response. To clarify, my setup involves a gamma source that sends photons to a CdTe sensor layer in a Timepix detector, and I want to determine whether this primary photon interacted through the interaction chain: Compton → photoabsorption, and the corresponding deposited energy.

My initial approach was to loop over all the PixelHits for the current event and essentially sum up the deposited energy from each of the MCParticles returned by getMCParticle(). However, some PixelHits can receive contributions from more than one process and this affects the classification.

If I only extract the primary photon tracks (using isPrimary()), I’m uncertain how to accurately reconstruct the deposited energy and classify the interaction process.

I’ll give a try to @jisaidi answer in the next days.