29 using namespace Physics;
48 "The \"SURFACE_PHYSICS\" statement defines data for the particle mater interaction handler "
52 (
"TYPE",
"Specifies the particle mater interaction handler: Collimator");
55 (
"MATERIAL",
"The material of the surface");
58 "Enable large angle scattering",
true);
61 defParticleMatterInteraction->
builtin =
true;
64 defParticleMatterInteraction->
update();
67 delete defParticleMatterInteraction;
76 handler_m(parent->handler_m)
106 throw OpalException(
"ParticleMatterInteraction::find()",
"ParticleMatterInteraction \"" + name +
"\" not found.");
124 if(type ==
"CCOLLIMATOR" ||
125 type ==
"COLLIMATOR" ||
126 type ==
"DEGRADER") {
129 *gmsg << *
this <<
endl;
131 else if(type ==
"BEAMSTRIPPING") {
133 *gmsg << *
this <<
endl;
146 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;
147 os <<
"* PARTICLEMATTERINTERACTION " <<
getOpalName() <<
'\n'
153 os <<
"* ********************************************************************************** " <<
std::endl;
Interface for basic beam line object.
void define(Object *newObject)
Define a new object.
The base class for all OPAL definitions.
The base class for all OPAL exceptions.
std::string toUpper(const std::string &str)
void updateElement(ElementBase *newref)
void updateElement(ElementBase *element)
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
bool getBool(const Attribute &attr)
Return logical value.
ParticleMatterInteractionHandler * handler_m
static OpalData * getInstance()
const std::string & getOpalName() const
Return object name.
virtual void update()
Update the PARTICLEMATTERINTERACTION data.
void initParticleMatterInteractionHandler(ElementBase &element)
virtual void execute()
Check the PARTICLEMATTERINTERACTION data.
virtual ~ParticleMatterInteraction()
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
Object * find(const std::string &name)
Find entry.
The base class for all OPAL objects.
virtual ParticleMatterInteraction * clone(const std::string &name)
Make clone.
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
void print(std::ostream &os) const
Print the object.
void setOpalName(const std::string &name)
Set object name.
bool builtin
Built-in flag.
ParticleMatterInteraction()
Exemplar constructor.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
Inform & endl(Inform &inf)
std::string getString(const Attribute &attr)
Get string value.