19#include "BDSException.hh"
20#include "BDSModulatorLinearT.hh"
24#include "CLHEP/Units/SystemOfUnits.h"
28BDSModulatorLinearT::BDSModulatorLinearT(G4double T0In,
31 G4double yInterceptIn):
34 slope(slopeIn / CLHEP::s),
35 yIntercept(yInterceptIn)
39 G4String msg =
"T1 (" + std::to_string(T1) +
") must be greater equal than T0 (";
40 msg += std::to_string(T0) +
")";
48 return T <= T1 && T >= T0 ? yIntercept + slope * T : 0;
53 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.