42 source_shape(0), target_shape(0), ctry(0), dist(1) {
50 int err = input->
getInput(
"source shape name",sname);
52 egsWarning(
"EGS_CollimatedSource: missing/wrong inline source "
53 "shape definition and missing/wrong 'source shape name' input\n");
57 egsWarning(
"EGS_CollimatedSource: a shape named %s"
58 " does not exist\n",sname.c_str());
68 int err = input->
getInput(
"target shape name",sname);
70 egsWarning(
"EGS_CollimatedSource: missing/wrong inline target"
71 "shape definition and missing/wrong 'target shape name' input\n");
75 egsWarning(
"EGS_CollimatedSource: a shape named %s"
76 " does not exist\n",sname.c_str());
81 egsWarning(
"EGS_CollimatedSource: the target shape %s, which is"
82 " of type %s, does not support the getPointSourceDirection()"
87 int errd = input->
getInput(
"distance",auxd);
94 void EGS_CollimatedSource::setUp() {
95 otype =
"EGS_CollimatedSource";
100 description =
"Collimated source from a shape of type ";
126 createSourceTemplate<EGS_CollimatedSource>(input,f,
"collimated source");
EGS_BaseShape * target_shape
the target shape
EGS_BaseShape * source_shape
the source shape
const string & getObjectName() const
Get the object name.
static EGS_BaseShape * createShape(EGS_Input *inp)
Create a shape from the information pointed to by inp.
static EGS_BaseShape * getShape(const string &Name)
Get a pointer to the shape named Name.
EGS_BaseSpectrum * s
The energy spectrum of this source.
virtual bool supportsDirectionMethod() const
EGS_CollimatedSource(int Q, EGS_BaseSpectrum *Spec, EGS_BaseShape *sshape, EGS_BaseShape *tshape, const string &Name="", EGS_ObjectFactory *f=0)
EGS_Float dist
source-target shape min. distance
int q
The charge of this simple source.
const string & getObjectType() const
Get the object type.
const string & getType() const
Get the spectrum type.
A collimated isotropic source.
string otype
The object type.
Base class for 'simple' particle sources.
Base source class. All particle sources must be derived from this class.
string description
A short source description.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.