20#include "BDSException.hh"
21#include "BDSModulatorLinearT.hh"
25#include "CLHEP/Units/SystemOfUnits.h"
29BDSModulatorLinearT::BDSModulatorLinearT(G4double T0In,
32 G4double yInterceptIn):
35 slope(slopeIn / CLHEP::s),
36 yIntercept(yInterceptIn)
40 G4String msg =
"T1 (" + std::to_string(T1) +
") must be greater equal than T0 (";
41 msg += std::to_string(T0) +
")";
49 return T <= T1 && T >= T0 ? yIntercept + slope * T : 0;
54 G4double dT = T1 - T0;
General exception with possible name of object and message.
virtual G4double Factor(const G4ThreeVector &xyz, G4double T) const
Returns value of equation in brief at the top of this file.
virtual G4double RecommendedMaxStepLength() const
Return difference in T0, T1 / 20.