#ifndef REFLECTOR_H #define REFLECTOR_H #include "simulation/particle.h" // class defining the minimum requirements of a Reflector class class Reflector { public: virtual bool needsReflectionBackToDomain( const particle::Particle* particle) const = 0; virtual void reflectBackToDomain(particle::Particle* particle) const = 0; }; // class for Reflectrion at the DPS section of KATRIN // (i.e. reflection at the z=L end of the cylinder) class ReflectorDPS : public Reflector { public: // Constructor: takes the position in longitudinal direction where particles should // be reflected at (reflects particles back to lower z values) ReflectorDPS(double z_position_dps); // check if Particle particle needs to be reflected bool needsReflectionBackToDomain(const particle::Particle* particle) const; // perform the reflection of the particle back to the left void reflectBackToDomain(particle::Particle* particle) const; private: const double z_position_dps_; }; // class for particles that are not reflected anywhere class NoReflector : public Reflector { // always returns false bool needsReflectionBackToDomain(const particle::Particle* particle) const; // does nothing void reflectBackToDomain(particle::Particle* particle) const; }; #endif /* REFLECTOR_H */