OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Stripper.h
Go to the documentation of this file.
1 #ifndef CLASSIC_Stripper_HH
2 #define CLASSIC_Stripper_HH
3 
5 
6 // Class Stripper
7 // ------------------------------------------------------------------------
8 // Class Stripper defines the abstract interface for a striping foil.
9 
10 class Stripper: public PluginElement {
11 
12 public:
14  explicit Stripper(const std::string &name);
15 
16  Stripper();
17  Stripper(const Stripper &);
18  void operator=(const Stripper &) = delete;
19  virtual ~Stripper();
20 
22  virtual void accept(BeamlineVisitor &) const override;
24  virtual ElementBase::ElementType getType() const override;
26 
28  void setOPCharge(double charge);
29  double getOPCharge() const;
30  void setOPMass(double mass);
31  double getOPMass() const;
32  void setOPYield(double yield);
33  double getOPYield() const;
34  void setStop(bool stopflag);
35  bool getStop() const;
37 
38 private:
40  virtual bool doCheck(PartBunchBase<double, 3> *bunch, const int turnnumber, const double t, const double tstep) override;
42  virtual void doFinalise() override;
44  virtual bool doPreCheck(PartBunchBase<double, 3>*) override;
46  virtual bool doFinaliseCheck(PartBunchBase<double, 3> *bunch, bool flagNeedUpdate) override;
47 
48  double opcharge_m;
49  double opmass_m;
50  double opyield_m;
51  bool stop_m;
52 };
53 
54 #endif // CLASSIC_Stripper_HH
double opyield_m
Yield of the out-coming particle.
Definition: Stripper.h:50
void setOPCharge(double charge)
Member variable access.
Definition: Stripper.cpp:39
bool getStop() const
Definition: Stripper.cpp:67
virtual bool doCheck(PartBunchBase< double, 3 > *bunch, const int turnnumber, const double t, const double tstep) override
Record hits when bunch particles pass.
Definition: Stripper.cpp:86
virtual bool doPreCheck(PartBunchBase< double, 3 > *) override
Virtual hook for preCheck.
Definition: Stripper.cpp:71
virtual ~Stripper()
Definition: Stripper.cpp:29
virtual bool doFinaliseCheck(PartBunchBase< double, 3 > *bunch, bool flagNeedUpdate) override
Virtual hook for finaliseCheck.
Definition: Stripper.cpp:150
void setOPYield(double yield)
Definition: Stripper.cpp:47
void setStop(bool stopflag)
Definition: Stripper.cpp:51
double opmass_m
Mass of the out-coming particle.
Definition: Stripper.h:49
double opcharge_m
Charge number of the out-coming particle.
Definition: Stripper.h:48
void setOPMass(double mass)
Definition: Stripper.cpp:43
virtual void doFinalise() override
Virtual hook for finalise.
Definition: Stripper.cpp:35
double getOPYield() const
Definition: Stripper.cpp:63
double getOPMass() const
Definition: Stripper.cpp:59
virtual ElementBase::ElementType getType() const override
Override implementation of PluginElement.
Definition: Stripper.cpp:164
bool stop_m
Flag if particles should be stripped or stopped.
Definition: Stripper.h:51
virtual void accept(BeamlineVisitor &) const override
Apply visitor to Stripper.
Definition: Stripper.cpp:31
void operator=(const Stripper &)=delete
const std::string name
Abstract algorithm.
Stripper()
Definition: Stripper.cpp:10
double getOPCharge() const
Definition: Stripper.cpp:55