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

None Geometry changes after N events 

Forum: Geometry
Date: 24 Mar, 2008
From: David Oxley <David Oxley>

Dear All,

I am using two germanium detectors and want to perform PET with them. I want to rotate the detectors, one above and one below a centrally positioned source at a radius of 6.5 cm.

I am trying to base my simulation on TestEM5, yet must honestly say I can't quite follow it.

It seems to me that the author defines a variable XposAbs which controls the varied positioning of the Absorber.

  physiAbsorber = new G4PVPlacement(0,		   //no rotation
      		  G4ThreeVector(XposAbs,0.,0.),    //its position
                                logicAbsorber,     //its logical volume
				"Absorber",         //its name
                                logicWorld,        //its mother
                                false,             //no boulean operat
                                0);                //copy number

This variable can be reset by a function...

void DetectorConstruction::SetAbsorberXpos(G4double val)
{
  XposAbs  = val;
}  

Providing the construct function then starts by clearing the previous geometry...
  G4PhysicalVolumeStore::GetInstance()->Clean();
  G4LogicalVolumeStore::GetInstance()->Clean();
  G4SolidStore::GetInstance()->Clean();

then thegeometry can be changed at the end of a run.

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?? 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.

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.

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.

I appreciate that I have limited experience and there may be an easier way to do this. This problem may also be more complex than I think.

Any help on the specific questions or advice on how to go about this is appreciated.

Thanks to all

Dave

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   (michel maire - 25 Mar, 2008)
1 None: Re: Geometry changes after N events   (David Oxley - 26 Mar, 2008)
3 Note: Geometry changes after N events   (G.A.P.Cirrone - 25 Mar, 2008)
1 None: Re: Geometry changes after N events   (Vladimir IVANTCHENKO - 25 Mar, 2008)
(_ None: Re: Geometry changes after N events - Thank you!   (David Oxley - 27 Mar, 2008)
 Add Message Add Message
to: "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 ]