50 "The \"PARTICLEMATTERINTERACTION\" statement defines data for "
51 "the particle matter interaction handler on an element."),
54 (
"TYPE",
"Specifies the particle matter interaction handler.", {
"SCATTERING",
"BEAMSTRIPPING"});
57 (
"MATERIAL",
"The material of the surface.",
73 (
"ENABLERUTHERFORD",
"Enable large angle scattering",
true);
76 (
"LOWENERGYTHR",
"Lower Energy threshold for energy loss calculation [MeV]. Default = 0.01 MeV", 0.01);
79 defParticleMatterInteraction->
builtin =
true;
82 defParticleMatterInteraction->
update();
85 delete defParticleMatterInteraction;
94 handler_m(parent->handler_m)
123 if (parmatint == 0) {
124 throw OpalException(
"ParticleMatterInteraction::find()",
"ParticleMatterInteraction \"" +
name +
"\" not found.");
144 throw OpalException(
"ParticleMatterInteraction::initParticleMatterInteractionHandler",
145 "TYPE is not defined for PARTICLEMATTERINTERACTION");
146 }
else if (
type ==
"SCATTERING") {
149 }
else if (
type ==
"BEAMSTRIPPING") {
160 os <<
"* ************* P A R T I C L E M A T T E R I N T E R A C T I O N **************** " <<
std::endl;
161 os <<
"* PARTICLEMATTERINTERACTION " <<
getOpalName() <<
'\n'
168 os <<
"* ********************************************************************************** " <<
std::endl;
Inform & endl(Inform &inf)
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
double getReal(const Attribute &attr)
Return real value.
Attribute makePredefinedString(const std::string &name, const std::string &help, const std::initializer_list< std::string > &predefinedStrings)
Make predefined string attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
bool getBool(const Attribute &attr)
Return logical value.
std::string getString(const Attribute &attr)
Get string value.
boost::function< boost::tuple< double, bool >arguments_t)> type
The base class for all OPAL definitions.
The base class for all OPAL objects.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
const std::string & getOpalName() const
Return object name.
void setOpalName(const std::string &name)
Set object name.
std::vector< Attribute > itsAttr
The object attributes.
bool builtin
Built-in flag.
Object * find(const std::string &name)
Find entry.
static OpalData * getInstance()
void define(Object *newObject)
Define a new object.
virtual const std::string & getName() const
Get element name.
void updateElement(ElementBase *newref)
ElementBase * getElement()
virtual void execute()
Check the PARTICLEMATTERINTERACTION data.
virtual ParticleMatterInteraction * clone(const std::string &name)
Make clone.
virtual void update()
Update the PARTICLEMATTERINTERACTION data.
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
virtual ~ParticleMatterInteraction()
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
ParticleMatterInteractionHandler * handler_m
ParticleMatterInteraction()
Exemplar constructor.
void initParticleMatterInteractionHandler(ElementBase &element)
void print(std::ostream &os) const
Print the object.
void updateElement(ElementBase *element)
The base class for all OPAL exceptions.