Message: Using Primitive Scorer to fill an histogram with energies. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Using Primitive Scorer to fill an histogram with energies. 

Forum: Hits, Digitization and Pileup
Date: 21 Jul, 2009
From: Bruno Morgado <Bruno Morgado>

Hi all,

I'm doing a rather complicated experiment in Geant4 and it's the first time I something this big.

The code is getting so messy that I'm having to resort to global variables to, for instance, keep track of the energy that a particle deposits in a Sensitive Detector (I still didn't find an easier way to do this since there is no way to access all the steps the particle does inside the volume after leaving from it, i.e. having some way to track the particle back from the moment it dies or leaves the volume). Anyway, since I don't feel this is a nice way to keep the code I was trying to implement a Primitive Scorer to check the deposited energy instead.

But this doesn't work as well, what I get from the Primitive Scorer is the total energy deposit by all the particles, not just one of them (which I want to put in an histogram later).

So the basic question is: Does the Primitive Scorer only give the energy deposited by all 1000 particles when I do a run (/run/beamOn 1000)?

The mode advanced question is: If it's possible to check the energy deposit of each particle then, how do I do it?

Thanks is advance, Bruno

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

1 None: Re: Using Primitive Scorer to fill an histogram with energies.   (Tsukasa Aso - 21 Jul, 2009)
 Add Message Add Message
to: "Using Primitive Scorer to fill an histogram with energies."

 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 ]