Re: Local coordinates in a volume+external event loop

From: Ivana Hrivnacova <Ivana.Hrivnacova_at_cern.ch>
Date: Tue, 1 Mar 2011 11:55:36 +0100


Hi Filimon,

See my replies below.

Best regards,

Ivana

On 02/28/2011 10:54 AM, Filimon Roukoutakis wrote:
> Hi, I would like to retrieve the local coordinates of a hit inside a
> specific volume (defined through TGeo), ie the coordinates should be
> extending from the center of the volume (0, 0, 0) up to its boundaries
> (for example length and radius of a cylinder as maximum values). Is the
> gGeoManager->MasterToLocal the correct and fastest way to do this? (I
> plan to have this call in Stepping function so it should be as efficient
> as possible).

I believe, this is ok when you run G3 with TGeant3TGeo and Geant4 with G4Root navigation (Andrei, could you, please, confirm.) Only if you would want to run also with Geant4 native navigation, than you should use gMC->Gmtod(..) instead.

> Another question, there is a TVirtualMC::ProcessEvent function. Is this
> called at some point in the simulation? The reason I am asking is that I
> would like to have an external event loop for the simulation if possible
> but as far as I can see for example in TGeant4::ProcessRun(int)
> G4RunManager::BeamOn(int) is called directly (at least last time I
> checked some time ago). Is there a way to have an externally-driven
> event loop bypassing this then?

The external event loop is not possible with VMC + Geant4; user can call only gMC->ProcessRun(int) as you found. There are available MCApplication::BeginEvent() and MCApplication::FinishEvent() functions, where you can put the necessary actions on the event level. Could you give us more details, why do you need the external event loop?

Thanks,
> filimon

-- 
==============================================================
e-mail:  Ivana.Hrivnacova_at_cern.ch
address: Institut de Physique Nucléaire, 91406 Orsay, France
phone:   +33 169156594
==============================================================
Received on Tue Mar 01 2011 - 11:55:37 CET

This archive was generated by hypermail 2.2.0 : Tue Mar 01 2011 - 17:25:01 CET