Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:25

0001 //
0002 // =======================================================================
0003 //
0004 // class G4MonopoleEquation
0005 //
0006 // Created:  30 April 2010, S. Burdin, B. Bozsogi
0007 //                       G4MonopoleEquation class for
0008 //                       Geant4 extended example "monopole"
0009 //
0010 // Adopted for CMSSW by V.Ivanchenko 30 April 2018
0011 // from Geant4 global tag geant4-10-04-ref-03
0012 //
0013 // =======================================================================
0014 //
0015 // Class description:
0016 //
0017 // This is the right-hand side of equation of motion in a
0018 // magnetic field only for magnetic monopoles.
0019 //
0020 // -------------------------------------------------------------------
0021 
0022 #ifndef SimG4Core_MagneticField_MonopoleEquation_h
0023 #define SimG4Core_MagneticField_MonopoleEquation_h 1
0024 
0025 #include "G4EquationOfMotion.hh"
0026 #include "G4MagneticField.hh"
0027 
0028 class MonopoleEquation : public G4EquationOfMotion {
0029 public:  // with description
0030   MonopoleEquation(G4MagneticField *emField);
0031 
0032   ~MonopoleEquation() override;
0033 
0034   void SetChargeMomentumMass(G4ChargeState particleChargeState, G4double momentum, G4double mass) override;
0035   // magnetic charge in e+ units
0036 
0037   void EvaluateRhsGivenB(const G4double y[], const G4double Field[], G4double dydx[]) const override;
0038   // Given the value of the electromagnetic field, this function
0039   // calculates the value of the derivative dydx.
0040 
0041 private:
0042   G4double fMagCharge;
0043   G4double fElCharge;
0044   G4double fMassCof;
0045 };
0046 
0047 #endif