Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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// G4ChargeState
27//
28// Class description:
29//
30// Container for magnetic charge and moments.
31
32// Authors: J.Apostolakis (CERN), P.Gumplinger (TRIUMF), 10.04.2013
33// -------------------------------------------------------------------
34#ifndef G4CHARGESTATE_HH
35#define G4CHARGESTATE_HH
36
37#include "globals.hh"
38
39/**
40 * @brief G4ChargeState is a container for magnetic charge and moments.
41 */
42
44{
45 public:
46
47 /**
48 * Constructor for G4ChargeState.
49 * @param[in] charge Particle charge.
50 * @param[in] magnetic_dipole_moment Magnetic dipole moment.
51 * @param[in] pdgSpin Spin.
52 * @param[in] electric_dipole_moment Electric dipole moment.
53 * @param[in] magnetic_charge Magnetic charge for monopoles.
54 */
55 inline G4ChargeState(G4double charge,
56 G4double magnetic_dipole_moment,
57 G4double pdgSpin,
58 G4double electric_dipole_moment = 0.0,
59 G4double magnetic_charge = 0.0);
60
61 /**
62 * Copy constructor and assignment operator.
63 */
64 inline G4ChargeState( const G4ChargeState& right );
65 inline G4ChargeState& operator = ( const G4ChargeState& right );
66
67 /**
68 * Default Destructor.
69 */
70 ~G4ChargeState() = default;
71
72 /**
73 * Revises the charge, pdgSpin, and optionally both moments and
74 * magnetic charge.
75 */
77 G4double pdgSpin,
78 G4double magnetic_dipole_moment= DBL_MAX,
79 G4double electric_dipole_moment= DBL_MAX,
80 G4double magnetic_charge= DBL_MAX );
81
82 /**
83 * Revises the charge (in units of the positron charge).
84 */
85 inline void SetCharge(G4double charge);
86 inline G4double GetCharge() const;
87
88 /**
89 * Modifiers and accessors.
90 */
91 inline void SetPDGSpin(G4double spin);
92 inline G4double GetPDGSpin() const;
93 inline void SetSpin(G4double spin);
94 inline G4double GetSpin() const;
95 inline void SetMagneticDipoleMoment(G4double moment);
97 inline void SetElectricDipoleMoment(G4double moment);
99 inline void SetMagneticCharge(G4double charge);
100 inline G4double MagneticCharge() const;
101
102 /**
103 * Auxiliary methods to set several properties at once.
104 */
105 inline void SetChargeMdm(G4double charge, G4double mag_dipole_moment);
106 inline void SetChargeMdmSpin(G4double charge,
107 G4double magnetic_dipole_moment,
108 G4double pdgSpin);
109 inline void SetChargeSpin(G4double charge,
110 G4double pdgSpin);
112 G4double magnetic_dipole_moment,
113 G4double electric_dipole_moment);
114 inline void SetChargesAndMoments(G4double charge,
115 G4double magnetic_dipole_moment,
116 G4double electric_dipole_moment,
117 G4double magnetic_charge );
118
119 private:
120
121 G4double fCharge;
122 G4double fSpin;
123 G4double fMagn_dipole;
124 G4double fElec_dipole;
125 G4double fMagneticCharge; // for magnetic monopole
126};
127
128// Inline methods implementation
129
130#include "G4ChargeState.icc"
131
132#endif
double G4double
Definition G4Types.hh:83
G4ChargeState & operator=(const G4ChargeState &right)
G4ChargeState(const G4ChargeState &right)
void SetMagneticCharge(G4double charge)
G4ChargeState(G4double charge, G4double magnetic_dipole_moment, G4double pdgSpin, G4double electric_dipole_moment=0.0, G4double magnetic_charge=0.0)
void SetSpin(G4double spin)
void SetChargeSpinMoments(G4double charge, G4double pdgSpin, G4double magnetic_dipole_moment=DBL_MAX, G4double electric_dipole_moment=DBL_MAX, G4double magnetic_charge=DBL_MAX)
void SetChargesAndMoments(G4double charge, G4double magnetic_dipole_moment, G4double electric_dipole_moment, G4double magnetic_charge)
void SetChargeSpin(G4double charge, G4double pdgSpin)
G4double GetCharge() const
void SetPDGSpin(G4double spin)
G4double ElectricDipoleMoment() const
void SetChargeMdm(G4double charge, G4double mag_dipole_moment)
void SetElectricDipoleMoment(G4double moment)
G4double GetMagneticDipoleMoment() const
void SetChargeMdmSpin(G4double charge, G4double magnetic_dipole_moment, G4double pdgSpin)
G4double GetPDGSpin() const
G4double GetSpin() const
void SetChargeDipoleMoments(G4double charge, G4double magnetic_dipole_moment, G4double electric_dipole_moment)
G4double MagneticCharge() const
void SetCharge(G4double charge)
void SetMagneticDipoleMoment(G4double moment)
~G4ChargeState()=default
#define DBL_MAX
Definition templates.hh:62