Message: ConfineSourceToVolume in PrimaryGeneratorAction Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question ConfineSourceToVolume in PrimaryGeneratorAction 

Forum: Particles
Date: 16 Aug, 2010
From: Cristian Bungau <Cristian Bungau>

Hi,

I would like to set this ConfineSourceToVolume function in my PrimaryGeneratorAction, using the volume name:

  G4SPSPosDistribution* posDist;
    posDist->SetPosDisType("Volume");
    posDist->SetPosDisShape("Cylinder");
    posDist->SetCentreCoords(*center);
    posDist->SetRadius(radius);
    posDist->ConfineSourceToVolume("bundles");

However I get the error

 **** Error: Volume does not exist **** 
 Ignoring confine condition

which I think it is because any cout<< message I put in DetectorConstruction is printed AFTER the confine error message from the PrimaryGeneratorAction, so PrimaryGeneratorAction has no "knowledge" of detector names.

I would be very grateful for any suggestions on how to invoke correctly the ConfineSourceToVolume function in my PrimaryGeneratorAction.

Thank you very much,

Cristian

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

1 Ok: Re: ConfineSourceToVolume in PrimaryGeneratorAction   (Cristian Bungau - 18 Aug, 2010)
2 Question: Re: ConfineSourceToVolume in PrimaryGeneratorAction   (Del Perio Aureliano - 18 Jan, 2012)
1 None: Re: ConfineSourceToVolume in PrimaryGeneratorAction   (michel maire - 18 Jan, 2012)
1 None: Re: ConfineSourceToVolume in PrimaryGeneratorAction   (Del Perio Aureliano - 19 Jan, 2012)
2 None: Re: ConfineSourceToVolume in PrimaryGeneratorAction   (Del Perio Aureliano - 19 Jan, 2012)
... 1 Message(s)
 Add Message Add Message
to: "ConfineSourceToVolume in PrimaryGeneratorAction"

 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 ]