1 #ifndef SimG4Core_Field_H 2 #define SimG4Core_Field_H 4 #include "G4MagneticField.hh" 10 #include <CLHEP/Units/SystemOfUnits.h> 13 class Field final :
public G4MagneticField {
17 inline void GetFieldValue(
const G4double
p[], G4double
b[3])
const override;
31 constexpr float lunit = (1.0 / CLHEP::cm);
32 GlobalPoint ggg((
float)(xyz[0]) * lunit, (
float)(xyz[1]) * lunit, (
float)(xyz[2]) * lunit);
36 oldb[0] = (
v.x() * btesla);
37 oldb[1] = (
v.y() * btesla);
38 oldb[2] = (
v.z() * btesla);
const MagneticField * theCMSMagneticField
void GetFieldValue(const G4double p[], G4double b[3]) const override
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
Abs< T >::type abs(const T &t)
Field(const MagneticField *f, double d)