Message: Re: position determination in Event Action Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: position determination in Event Action 

Keywords: position primary eventaction event action primarygeneratoraction
Forum: Event and Track Management
Re: Question position determination in Event Action (Phil Taddei)
Date: 27 Apr, 2006
From: michel maire <michel maire>

User Phil Taddei wrote:

>> I am running a program that is similar in its skeleton to example N03.
>> 
>> In PrimaryGeneratorAction, the initial position of the particle is randomly determined based on some boundary conditions.
>> 
>> In EventAction (EndOfEventAction), the final energy depositon in a particular volume is output.
>> 
>> I would like to also, in EventAction, output the position of the primary--x, y, and z--(at any point, really) alongside the energy deposition.
>> 
>> I have tried using GetPosition() and GetPrimaryVertex(), but I have not had success.
>> 
>> Any suggestions?  Am I missing something that is very easy?
>> 
>> Thank you.
>> 
>> Phil
>> 

 In examples/extended/electromagnetic/TestEm1/TestEm1.cc, you will see
 that PrimaryGeneratorAction is passed to RunAction as an argument of
 the constructor. You can do the same in EventAction.

 Then, in PrimaryGeneratorAction you have public methods like
 GetParticleGun(). You create your own Get functions to pass what
 you wish to EventAction.

     Michel

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

 Add Message Add Message
to: "Re: position determination in Event Action"

 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 ]