42 MomentumX_m(right.MomentumX_m),
43 MomentumY_m(right.MomentumY_m),
44 MomentumZ_m(right.MomentumZ_m),
87 double frac = -
R(2) / P(2) * recpgamma;
127 *
gmsg <<
"* Finalize Degrader" <<
endl;
131 Inform msg(
"Degrader::goOnline ");
135 PosX_m.reserve(maximumSize);
136 PosY_m.reserve(maximumSize);
137 PosZ_m.reserve(maximumSize);
141 time_m.reserve(maximumSize);
142 id_m.reserve(maximumSize);
147 Inform msg(
"Degrader::goOffline ");
150 msg <<
" done..." <<
endl;
Tps< T > sqrt(const Tps< T > &x)
Square root.
T euclidean_norm(const Vector< T > &)
Euclidean norm.
double dot(const Vector3D &lhs, const Vector3D &rhs)
Vector dot product.
Inform & endl(Inform &inf)
constexpr double c
The velocity of light in m/s.
ParticleAttrib< int > Bin
double getQ() const
Access to reference data.
size_t getLocalNum() const
ParticleAttrib< Vector_t > P
ParticleAttrib< double > dt
virtual void visitDegrader(const Degrader &)=0
Apply the algorithm to a degrader.
Interface for a single beam element.
PartBunchBase< double, 3 > * RefPartBunch_m
virtual bool bends() const
virtual bool applyToReferenceParticle(const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B)
virtual ElementBase::ElementType getType() const
Get element type std::string.
std::vector< double > MomentumZ_m
std::string getDegraderShape()
virtual void goOnline(const double &kineticEnergy)
virtual bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B)
std::vector< double > time_m
virtual bool isInMaterial(double z)
virtual void getDimensions(double &zBegin, double &zEnd) const
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField)
std::vector< double > MomentumY_m
std::vector< double > PosY_m
std::vector< double > PosX_m
std::unique_ptr< LossDataSink > lossDs_m
std::vector< double > PosZ_m
virtual void accept(BeamlineVisitor &) const
Apply visitor to Degrader.
std::vector< double > MomentumX_m
virtual ParticleMatterInteractionHandler * getParticleMatterInteraction() const
virtual double getElementLength() const
Get design length.
std::string getOutputFN() const
Get output filename.
virtual bool computeEnergyLoss(PartBunchBase< double, 3 > *bunch, Vector_t &P, const double deltat, bool includeFluctuations=true) const =0