Hello! I have placed two detector. Now I am simulating with Co-60 source. I can see there are many such events where total energy deposited in two detectors are (1.17323 MeV and 1.3325 MeV) or (1.17323 MeV and 1.3325 MeV ).
Here it looks like
0 0.304596
0 0.287629
0.770146 0
1.3325 1.17323
0 1.17323
0 0.192612
0.00527 0
1.17323 1.3325
Now I want all others events not to interact with the detector. How can I implement it ?
Hello @shapeandsymmetry
Your question is confusing. Perhaps, you need to redefine it after reading section 3.5 to 3.7.
Please have a look. https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/fo/BookForApplicationDevelopers.pdf
Best
VRS
I hope below steps helps you to restructure your code.
Add in stepping class;
G4Event* evt = G4RunManager::GetRunManager()->GetCurrentEvent(); // Events
G4int evtID = evt->GetEventID();
G4double time = step->GetTrack()->GetGlobalTime(); // Time information
G4String preStepVol = step->GetPreStepPoint()->GetPhysicalVolume()->GetName(); //Name detectors
After acquiring data, do postAnalysis with conditions
when both detectors trigger with same or energy defined above, plot #entries events.
Best
VRS