Re: Accessing User Detector Construction in other classes

From: Ivana Hrivnacova <Ivana.Hrivnacova_at_cern.ch>
Date: Thu, 15 Mar 2012 16:00:47 +0100

Dear Germano,

In VMC we do not introduce a base class for the user detector construction; but you can implement its getter in your MCApplication class and access it in this way:
((MyMCApplication*)TVirtualMCApplication::Instance())

   ->GetDetectorConstruction();

Or better, you can implement a static Instance() method in your detector construction class in a similar way as it is done in TVirtualMCApplication; and then access it without any casting: MyDetectorConstruction::Instance()

Best regards,

Ivana

On 03/15/2012 03:46 PM, Germano Bonomi wrote:
> Dear VMC users,
> we are trying to access the user detector construction class in an other
> class (in particular a detectorSD class).
> In Geant4 we were using the command
> runManager->GetUserDetectorConstruction(). Is there something similar in
> VMC?
>
> Thanks,
> Kind regards,
> Germano (AEgIS experiment)
>
>
> ################################
> # Germano Bonomi #
> # Dipartimento di Meccanica #
> # Universita' di Brescia #
> # Tel. +39 030 371 5803/5798 #
> ################################
>
> On Wed, 14 Dec 2011, Ivana Hrivnacova wrote:
>
>>
>> Dear colleagues,
>>
>> The new release of Geant4 VMC 2.13 is available from the Root VMC web
>> site:
>> http://root.cern.ch/drupal/content/vmc
>>
>> It was tested with Geant4 9.5 and ROOT 5.30/04 and 5.32/00 (*).
>> Please note that this version cannot be built against Geant4 9.4.x.
>>
>> The list of new developments and bug fixes is available at:
>> http://root.cern.ch/root/vmc/geant4_vmc_versions.txt
>>
>> Best regards,
>>
>> Ivana
>>
>> (*) with patch in etc/vmc from rev.42474 (required for building with
>> Geant4 installation including graphics via geant4-config)
>>
>> --
>> ==============================================================
>> e-mail: Ivana.Hrivnacova_at_cern.ch
>> address: Institut de Physique Nucléaire, 91406 Orsay, France
>> phone: +33 169156594
>> ==============================================================
>>
>>

-- 
==============================================================
e-mail:  Ivana.Hrivnacova_at_cern.ch
address: Institut de Physique Nucléaire, 91406 Orsay, France
phone:   +33 169156594
==============================================================
Received on Thu Mar 15 2012 - 16:00:53 CET

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