Message: Re: Geometry changes after N events Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Geometry changes after N events 

Forum: Geometry
Re: None Geometry changes after N events (David Oxley)
Date: 25 Mar, 2008
From: michel maire <michel maire>

User David Oxley wrote:

>> 
>> My questions:
>> 
>> 1) I dont understand where the SetAbsorberXpos function is called. I cant
>> find it in the runmanager or the macros testEm5.in Would this be called
>> from a piece of source or from a macro or even from the command line??

   XposAbs is a data member of DetectorConstruction, initialised in the constructor.

   The function SetAbsorberXpos() is called in DetectorMessenger. But if you do not
   wish to use it, you can redefine XposAbs directly in DetectorConstruction.

>> 2) Is it essential to include a DetectorMessenger file and use the
>> commandline to move the geometry. The way my simulation runs at the
>> moment, everything is hardcoded and I just run it. I am happy to keep it
>> that way.

    OK, see below.

>> 
>> 3) 
>> I see in an article from 22/04/07 by CYF "Question on changing geometry between runs with Detector Messenger"
>> that one can use ..
>> for(STEP=0;STEP<3;STEP++){
>>       runManager->DefineWorldVolume(detector->Construct());
>>       runManager->GeometryHasBeenModified();
>>       runManager->ResetNavigator();
>>       runManager->Initialize();
>>       runManager->BeamOn(100000);
>>     }
>> 
>> a simple loop in the main to construct multiple geometries.

   If you wish to work in this way, you can include in the loop:
   detector->SetAbsorberXpos(value);

>> 
>> This would suit me nicely however I am currently defining my source in a
>> macro using: /gps/particle gamma /gps/pos/type point etc
>> 
>> So the beamOn command won't apply.
>> 
>> Is there a way to call a macro through the main? This should then solve
>> my problems.

   It is already in the main :

   UI->ApplyCommand("/control/execute fileName");

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

1 None: Re: Geometry changes after N events   (David Oxley - 26 Mar, 2008)
 Add Message Add Message
to: "Re: Geometry changes after N events"

 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 ]