Message: Energy from secondaries in Si Detectors Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Energy from secondaries in Si Detectors 

Forum: Event and Track Management
Date: 30 Jan, 2017
From: Patrick Asenov <Patrick Asenov>

Greetings, friends and comrades!

Our team has done some modifications on the TestEm18 electromagnetic example. Our goal is to repeat the same simulations as in the original example, but instead of having a single detector, to add a second detector right behind the first one. We intend to obtain the same histograms as those in the initial example, but separately for each detector. (E.g. continuous energy loss for detector 1, continuous energy loss for detector 2, energy from secondaries for detector 1, energy from secondaries for detector 2, etc.)

Regarding the energy from secondaries (charged plus neutral), from theory and experiment we expect to obtain a distribution with a single peak (global maximum) near the vertical axis for both detectors, as happens in the case of the single detector. The trouble is that we acquire a distribution with two local maxima for each one of the detectors (with the shape of the second peak resembling that of the first one).

Now, probably we have messed up some adding process or some value assignment. We are sure that the detector construction has been done correctly, because we performed a visualization of the geometry. In the EventAction and RunAction we simply duplicated the commands in order to repeat the same actions and calculations twice, for each detector independently. So the problem may arise somewhere inside the StackingAction or the Stepping Action.

In StackingAction, inside StackingAction::ClassifyNewTrack, we get the energy spectrum of secondaries:

energy = track->GetKineticEnergy();

However, the StackingAction makes use only of the G4Track class, and not of the G4Step class. But we need to check the volume where the new track has been detected, and that is the job of SteppingAction. Isn't that correct?

So, in we write inside the


G4VPhysicalVolume* volume = step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();


if (volume == fDetectorConstruction->GetDet1()) { [...] fEventAction->AddSecondary1(fStackingaction->energy); }

if (volume == fDetectorConstruction->GetDet2()) { [...] fEventAction->AddSecondary2(fStackingaction->energy); }

In Detector Construction we make sure that GetDet1() returns the physical volume of Detector 1 and GetDet2() returns the physical volume of Detector 2.

We would be sincerely thankful if any of you fellows could give us a helping hand and a hint concerning any mistake we may be making.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Energy from secondaries in Si Detectors   (Vladimir Ivanchenko - 25 Feb, 2017)
(_ Ok: Re: Energy from secondaries in Si Detectors   (Patrick Asenov - 27 Feb, 2017)
 Add Message Add Message
to: "Energy from secondaries in Si Detectors"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]