Files
geant4/source/geometry/magneticfield/include/G4ChargeState.hh
T
2016-06-10 11:51:14 +02:00

91 lines
3.6 KiB
C++

//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4ChargeState.hh $
//
//
// class G4ChargeState
//
// Class description:
//
// History
// - First version: Apr 10, 2013 John Apostolakis, Peter Gumplinger
// - Modified:
// -------------------------------------------------------------------
#ifndef G4ChargeState_HH
#define G4ChargeState_HH
#include "globals.hh"
class G4ChargeState // Charge & moments
{
public: // without description
G4ChargeState(G4double charge,
G4double spin = 0,
G4double magnetic_dipole_moment = 0.0,
G4double electric_dipole_moment = 0.0,
G4double magnetic_charge = 0.0);
G4ChargeState( const G4ChargeState& right );
G4ChargeState& operator = ( const G4ChargeState& right );
// Revise the charge (in units of the positron charge)
// do not change moments
void SetChargeAndMoments(G4double charge,
G4double spin,
G4double magnetic_dipole_moment = DBL_MAX,
G4double electric_dipole_moment = DBL_MAX,
G4double magnetic_charge = DBL_MAX );
// Revise the charge, spin and all moments
void SetCharge(G4double charge){ fCharge = charge; }
G4double GetCharge() const { return fCharge; }
void SetSpin(G4double spin){ fSpin = spin; }
G4double GetSpin() const { return fSpin; }
void SetMagneticDipoleMoment(G4double moment){ fMagn_dipole = moment; }
G4double GetMagneticDipoleMoment() const { return fMagn_dipole; }
void SetElectricDipoleMoment(G4double moment){ fElec_dipole = moment; }
G4double ElectricDipoleMoment() const { return fElec_dipole; }
void SetMagneticCharge(G4double charge){ fMagneticCharge=charge; }
G4double MagneticCharge() const { return fMagneticCharge; }
private:
G4double fCharge;
G4double fSpin;
G4double fMagn_dipole;
G4double fElec_dipole;
G4double fMagneticCharge; // for magnetic monopole
};
#endif /* End of ifndef G4ChargeState_HH */