Identifying tracks passing through two detectors

Dear Experts,
I have been working on a dE-E particle detector setup. The dE detector is made up of silicon with a radius of 4mm and the second E detector is made up of Ge, with an 8 mm radius placed behind the dE detector. I have used an isotropic source at a distance of 10 cm. I was trying to get the energy deposition in both of the detectors separately. But for the second detector, I need to record only those particles which have passed through the first detector. All the other particle events which directly fall into the second detector should be neglected.
I have made changes in my stepping action in such a way that:

  if (step->GetTrack()->GetDefinition()->GetPDGCharge() != 0. && volume == fDetConstruction->GetAbsorberPV()) {
    stepLength = step->GetStepLength();

  if (volume == fDetConstruction->GetAbsorberPV()) {
    fEventAction->AddAbs(edep, stepLength);
  } 

    // If the particle has passed through the absorber, record its information for the gap volume
    if (volume == fDetConstruction->GetGapPV()) {
      fEventAction->AddGap(edep, stepLength);

But in the result, there is no energy deposition in the second detector. ( I am using a modified form of example B4a. Here absorerPV is the first detector and gapPV is the second detector.). Thanks a lot in advance for your time and interest.
_Geant4 Version:_Geant4 version 11.1.2
_Operating System:_Ubuntu 22.04
_Compiler/Version:_gcc 11.4.0
_CMake Version:_3.22.1


Dear @gokulgklh ,

What you are doing is best done someplace else. The SteppingAction happens every step. There is no step that goes in the first detector and into the second one (at the same time in the same step).

I would suggest to let the steppingaction do the AddAbs and AddGap respectively and add and EventAction that check that “the same particle” added energy in both dE and E detectors. Actually I would NOT check for the same particle as this will not be true on an experiment. You just check that there is energy deposition in both detectors and the physics analysis should help you reconstruct that it was “the same particle”.

Cheers,

/Pico

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.