Geant4_10
G4ChargeState.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4ChargeState.hh $
28 //
29 //
30 // class G4ChargeState
31 //
32 // Class description:
33 //
34 // History
35 // - First version: Apr 10, 2013 John Apostolakis, Peter Gumplinger
36 // - Modified:
37 // -------------------------------------------------------------------
38 
39 #ifndef G4ChargeState_HH
40 #define G4ChargeState_HH
41 
42 #include "globals.hh"
43 
44 class G4ChargeState // Charge & moments
45 {
46  public: // without description
47 
48  G4ChargeState(G4double charge,
49  G4double spin = 0,
50  G4double magnetic_dipole_moment = 0.0,
51  G4double electric_dipole_moment = 0.0,
52  G4double magnetic_charge = 0.0);
53 
55  G4ChargeState& operator = ( const G4ChargeState& right );
56 
57  // Revise the charge (in units of the positron charge)
58  // do not change moments
59 
60  void SetChargeAndMoments(G4double charge,
61  G4double spin,
62  G4double magnetic_dipole_moment = DBL_MAX,
63  G4double electric_dipole_moment = DBL_MAX,
64  G4double magnetic_charge = DBL_MAX );
65  // Revise the charge, spin and all moments
66 
67  void SetCharge(G4double charge){ fCharge = charge; }
68  G4double GetCharge() const { return fCharge; }
69 
70  void SetSpin(G4double spin){ fSpin = spin; }
71  G4double GetSpin() const { return fSpin; }
72 
73  void SetMagneticDipoleMoment(G4double moment){ fMagn_dipole = moment; }
74  G4double GetMagneticDipoleMoment() const { return fMagn_dipole; }
75 
76  void SetElectricDipoleMoment(G4double moment){ fElec_dipole = moment; }
77  G4double ElectricDipoleMoment() const { return fElec_dipole; }
78 
79  void SetMagneticCharge(G4double charge){ fMagneticCharge=charge; }
80  G4double MagneticCharge() const { return fMagneticCharge; }
81 
82  private:
83 
84  G4double fCharge;
85  G4double fSpin;
86  G4double fMagn_dipole;
87  G4double fElec_dipole;
88  G4double fMagneticCharge; // for magnetic monopole
89 };
90 #endif /* End of ifndef G4ChargeState_HH */
G4double GetCharge() const
G4ChargeState & operator=(const G4ChargeState &right)
G4ChargeState(G4double charge, G4double spin=0, G4double magnetic_dipole_moment=0.0, G4double electric_dipole_moment=0.0, G4double magnetic_charge=0.0)
void SetMagneticCharge(G4double charge)
void SetSpin(G4double spin)
G4double ElectricDipoleMoment() const
void SetCharge(G4double charge)
void SetElectricDipoleMoment(G4double moment)
void SetMagneticDipoleMoment(G4double moment)
void SetChargeAndMoments(G4double charge, G4double spin, G4double magnetic_dipole_moment=DBL_MAX, G4double electric_dipole_moment=DBL_MAX, G4double magnetic_charge=DBL_MAX)
G4double GetSpin() const
G4double GetMagneticDipoleMoment() const
G4double MagneticCharge() const
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83