Message: Re: Access to HitsCollection in EndOfRunAction Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Access to HitsCollection in EndOfRunAction 

Forum: Hits, Digitization and Pileup
Re: None Access to HitsCollection in EndOfRunAction (Sylvia Studeny)
Date: 06 Dec, 2005
From: Marc Verderi <Marc Verderi>

Hi Sylvia,

You can not have "for free" the dose accumulation in your sensitive 
detectors all along a run : a run represents a sequence of events and 
sensitive detectors are refreshed at the end of each event (ie, their 
hits are cleared). But you have several ways to do make what you need 
working. For example (maybe there are cleaner solutions), you can decide 
to not have hits and hit collections (but still have sensitive 
detector). You can initialize an array in you "BeginOfRunAction", each 
element of which represents a voxel. Then, assuming each voxel has some 
ID number associated with it, in your sensitive detector code, get the 
current voxel number and accumulate the energy deposition in the 
corresponding array element. This array will then "survive" all along 
your run and the cells will contain the total energy deposited over all 
events of this run.

Hope this helps.

Marc


Sylvia Studeny wrote:

>*** Discussion title: Hits, Digitization and Pileup
>Email replies to PublicHyperNews@slac.stanford.edu must include:
>  In-Reply-To: <"/hitsdigits/107"@geant4-hn.slac.stanford.edu>
>  Subject: ...change this to be about your reply.
>
>Hi,
>I calculate the dose distibution in a voxeliesed Phantom. (To simplify, I
> took a cube consisting of little voxels first). I collect the dose in a
> HitsCollection-object.
>I had the idea to write all the data of the HitsCollection in a ITuple.
>I wanted to do this in EndOfRunAction, because there I'm sure all the 
>calculations are finished. Unfortunately I have many problems accessing 
>the HitsCollection there, because there are no Events left and the methode 
>described in your Application-Developers-Manual (4.4.4 G4SDManager) doesn't 
>work.
>Can you tell me if my idea is working at all and how this can be achieved 
>or if there is an example in which something simelar is done? (I looked 
>there but found nothing fitting)
>Thanks a lot
>Sylvia
>
>  
>

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

1 None: Re: Access to HitsCollection in EndOfRunAction   (Armin Schuebel - 09 Dec, 2013)
 Add Message Add Message
to: "Re: Access to HitsCollection in EndOfRunAction"

 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 ]