30 "The \"PEPPERPOT\" element defines an elliptic collimator."),
33 (
"XSIZE",
"Size in x of the pepperpot in m");
35 (
"YSIZE",
"Size in y of the pepperpot in m");
37 (
"OUTFN",
"Pepperpot output filename");
39 (
"NHOLX",
"Number of holes in x");
41 (
"NHOLY",
"Number of holes in y");
43 (
"R",
"Radios of a holes in m");
103 double shiftx = (xsize - diameter) / repX;
104 double shifty = (ysize - diameter) / repY;
106 std::stringstream description;
107 description <<
"repeat(repeat(translate(ellipse("
108 << diameter <<
"," << diameter <<
"),"
109 << -shiftx * 0.5 * repX <<
"," << -shifty * 0.5 * repY <<
"),"
110 << repX <<
"," << shiftx <<
",0.0),"
111 << repY <<
",0.0," << shifty <<
")";
113 std::cout <<
"OpalPepperPot.cpp: " << __LINE__ <<
"\t"
OpalPepperPot()
Exemplar constructor.
Representation for a collimator.
static AttCell * registerStringAttribute(const std::string &name)
Register a ``string'' element attribute.
Interface for basic beam line object.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
ValueFlag
Switch for value desired on ATTLIST command.
virtual ElementBase * removeWrappers()
Return the design element.
virtual void update()
Update the embedded CLASSIC collimator.
virtual void setElementLength(double length)
Set design length.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
ParticleMatterInteraction * parmatint_m
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
ParticleMatterInteractionHandler * handler_m
const std::string & getOpalName() const
Return object name.
void setDescription(const std::string &desc)
void initParticleMatterInteractionHandler(ElementBase &element)
void setOutputFN(const std::string &fn)
Base class for all beam line elements.
void setElement(ElementBase *)
Assign new CLASSIC element.
void registerOwnership() const
virtual void update()
Update the embedded CLASSIC element.
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys)
ElementBase * getElement() const
Return the embedded CLASSIC element.
virtual OpalPepperPot * clone(const std::string &name)
Make clone.
double getReal(const Attribute &attr)
Return real value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
static AttCell * registerRealAttribute(const std::string &name)
Register a ``real'' element attribute.
Inform & endl(Inform &inf)
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
std::string getString(const Attribute &attr)
Get string value.