I’m running restG4 for the simulation of µp elastics w/ p detected in an hydrogen-filled TPC.
I successfully ran the simulation on a simplified setup.
Now I’m trying to use a detailed description, in gdml form, of the TPC.
Problem: as told in the title of this ticket, energy deposit is zero, see (excerpted for restG4 stdout, same for all 10 events in my simulation):
Event Deposited energy in sensitive volume: 0
Has anybody an idea about the reason for this?
My guess is that my sensitive volume turns out to not sit on the path of the particles. This,
event though I proceed just as before w/ my simplified geometry.
Then how can I check this? Or any other possible explanation you can think of…
I launched the simulation using your setup. It seems that the proton particle you launch does never deposit energy on the sensitive volume.
If the event does not deposit any energy on the “sensitive volume” it will not be registered at all. Even if the particle is going through an activeVolume.
I have just committed a fix on the extreme output message to v2.2.10_dev. Once updated I find the particle is only traveling through the volume h2_0.
If you define h2_0 as your sensitive volume the event will be registered, and hits on all the active volumes listed will be written to disk. Therefore, you also need to add h2_0 to your active volume list.
I imagine h2_0 is the volume where you are interested to register your hits.
The sensitive volume is the trigger volume in the sense that the event will be stored only if an energy deposit took place on that volume.
However, no hits will be stored unless you specify activeVolumes. Therefore, activeVolume is/are the volumes where you will be registering G4hits (x,y,z,En,pcs,volId). Only 1 sensitive volume is allowed, but any number of activeVolumes can be added.
Perhaps there is a problem of overlap? When I open the geometry using TGeoManager it looks like gasVolume is inside h2.
Note that the lectures are a bit old. There was a limitation in fact, the sensitive volume had to be named “gas”, but now there is no limitation to use any volume in the geometry as sensitive volume.
OK. I found the error: a stupid unit (cm instead of mm) mistake while setting the input point in the specification of the generator.
Btw, concerning the GL viewer:
In fact, when you Draw(“same”), you superimpose the volume that you successively draw in the local reference frame => everything turns out to be occupying the same range of space…
Thanks for your help. Extreme debugging is very useful…