Message: Re: resetting counter for optical photons Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: resetting counter for optical photons 

Forum: Event and Track Management
Re: Question resetting counter for optical photons (Yusuf Erdogan)
Re: Feedback Re: resetting counter for optical photons (Gumplinger Peter)
Date: 11 Aug, 2011
From: Yusuf Erdogan <Yusuf Erdogan>

Hi Peter,

thank you very much. Unfortunately i had not found any recent threads about a problem comparable to this one. Maybe i havent browsed enough, sry for that.

Meanwhile i have solved my problem. Probably it is a workaround, but it works:

Instead of defining a variable in SteppingAction, that counts the photons ("counter" from my orginally post), now i call a function of an own class, in which a counter ("counter_new") will be incremented. So i'm able to reset this new counter in another function of this own class, which is in turn called in EventAction::BeginOfEventAction. Principally this approach is the same one if i call the reset function of my SteppingAction in EventAction::BeginOfEventAction, but apparently the communication af two UserAction classes among themselves and with an own class works different... I will follow your suggestion and reread how to event loop works in G4.

At the last thank you also for your suggestion of a new volume between the two existing volumes. It is a nice idea to handle a problem, which i havent considered yet. At that point, maybe you can help me once more: Do you know any cases, where a reflection at the surface between two volumes with same refractive index occurs?


Cheers, Yusuf

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

1 Feedback: Re: resetting counter for optical photons   (Gumplinger Peter - 11 Aug, 2011)
 Add Message Add Message
to: "Re: resetting counter for optical photons"

 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 ]