Message: Re: Counting number of particles in each zone of a Sensitive Detector Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: Counting number of particles in each zone of a Sensitive Detector 

Forum: Event and Track Management
Re: Question Counting number of particles in each zone of a Sensitive Detector (Quique)
Date: 23 Apr, 2015
From: Michael H. Kelsey <Michael H. Kelsey>

On Wed, 22 Apr 2015 22:18:42 GMT, Quique wrote:
> I am simulating an electromagnetic calorimeter: it consists in 100
> layers of material (100 different Physical Volumes which are copies of
> the same LogicalVolume).

When you do the placements, you should set a unique copy number for each one. That's the second-to-last argument to G4PVPlacement(), just before the "surface check" flag.

> I have created my own Sensitive Detector, but
> not one SD for each layer: only one SD containing all the layers.

This is the right thing to do. You create one SD, associate it with the _logical_ volume, and then it's there automatically with every placement.

> My problem is that I am not able to count the number of particles in each
> layer separatedly and without counting them more than once. Is there any
> method for doing this?

Yes, indeed! Get the G4Touchable from the G4Step, and ask it for the copy number. That will tell you (see above) which layer was hit.

    -- Michael Kelsey

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

1 None: Re: Counting number of particles in each zone of a Sensitive Detector   (Quique - 23 Apr, 2015)
1 None: Re: Counting number of particles in each zone of a Sensitive Detector   (Pedro Arce - 23 Apr, 2015)
2 None: Re: Counting number of particles in each zone of a Sensitive Detector   (Mike Kelsey - 23 Apr, 2015)
1 None: Re: Counting number of particles in each zone of a Sensitive Detector   (Quique - 27 Apr, 2015)
 Add Message Add Message
to: "Re: Counting number of particles in each zone of a Sensitive Detector"

 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 ]