165 lines
5.0 KiB
Plaintext
165 lines
5.0 KiB
Plaintext
//
|
|
// ********************************************************************
|
|
// * 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. *
|
|
// ********************************************************************
|
|
//
|
|
// G4ChargeState inline methods implementation
|
|
|
|
// Authors: J.Apostolakis (CERN), P.Gumplinger (TRIUMF), 10.04.2013
|
|
// --------------------------------------------------------------------
|
|
|
|
inline G4ChargeState::G4ChargeState(G4double charge,
|
|
G4double magnetic_dipole_moment,
|
|
G4double spin,
|
|
G4double electric_dipole_moment,
|
|
G4double magnetic_charge)
|
|
{
|
|
fCharge = charge;
|
|
fSpin = spin;
|
|
fMagn_dipole = magnetic_dipole_moment;
|
|
fElec_dipole = electric_dipole_moment;
|
|
fMagneticCharge = magnetic_charge;
|
|
}
|
|
|
|
inline G4ChargeState::G4ChargeState( const G4ChargeState& right )
|
|
{
|
|
fCharge = right.fCharge;
|
|
fSpin = right.fSpin;
|
|
fMagn_dipole = right.fMagn_dipole;
|
|
fElec_dipole = right.fElec_dipole;
|
|
fMagneticCharge = right.fMagneticCharge;
|
|
}
|
|
|
|
inline G4ChargeState& G4ChargeState::operator = ( const G4ChargeState& right )
|
|
{
|
|
if (&right == this) { return *this; }
|
|
|
|
fCharge = right.fCharge;
|
|
fSpin = right.fSpin;
|
|
fMagn_dipole = right.fMagn_dipole;
|
|
fElec_dipole = right.fElec_dipole;
|
|
fMagneticCharge = right.fMagneticCharge;
|
|
|
|
return *this;
|
|
}
|
|
|
|
inline void G4ChargeState::SetCharge(G4double charge)
|
|
{
|
|
fCharge = charge;
|
|
}
|
|
|
|
inline G4double G4ChargeState::GetCharge() const
|
|
{
|
|
return fCharge;
|
|
}
|
|
|
|
inline void G4ChargeState::SetPDGSpin(G4double spin)
|
|
{
|
|
fSpin = spin;
|
|
}
|
|
|
|
inline G4double G4ChargeState::GetPDGSpin() const
|
|
{
|
|
return fSpin;
|
|
}
|
|
|
|
inline void G4ChargeState::SetSpin(G4double spin)
|
|
{
|
|
SetPDGSpin( spin);
|
|
}
|
|
|
|
inline G4double G4ChargeState::GetSpin() const
|
|
{
|
|
return GetPDGSpin();
|
|
}
|
|
|
|
inline void G4ChargeState::SetMagneticDipoleMoment(G4double moment)
|
|
{
|
|
fMagn_dipole = moment;
|
|
}
|
|
|
|
inline G4double G4ChargeState::GetMagneticDipoleMoment() const
|
|
{
|
|
return fMagn_dipole;
|
|
}
|
|
|
|
inline void G4ChargeState::SetElectricDipoleMoment(G4double moment)
|
|
{
|
|
fElec_dipole = moment;
|
|
}
|
|
|
|
inline G4double G4ChargeState::ElectricDipoleMoment() const
|
|
{
|
|
return fElec_dipole;
|
|
}
|
|
|
|
inline void G4ChargeState::SetMagneticCharge(G4double charge)
|
|
{
|
|
fMagneticCharge=charge;
|
|
}
|
|
|
|
inline G4double G4ChargeState::MagneticCharge() const
|
|
{
|
|
return fMagneticCharge;
|
|
}
|
|
|
|
inline void G4ChargeState::SetChargeMdm(G4double charge, G4double mdipole_mom)
|
|
{
|
|
SetCharge( charge );
|
|
SetMagneticDipoleMoment( mdipole_mom );
|
|
}
|
|
|
|
inline void G4ChargeState::SetChargeMdmSpin(G4double charge,
|
|
G4double magDipoleMoment,
|
|
G4double pdgSpin)
|
|
{
|
|
SetChargeMdm( charge, magDipoleMoment );
|
|
SetPDGSpin( pdgSpin );
|
|
}
|
|
|
|
inline void G4ChargeState::SetChargeSpin(G4double charge,
|
|
G4double pdgSpin)
|
|
{
|
|
SetCharge( charge );
|
|
SetPDGSpin( pdgSpin );
|
|
}
|
|
|
|
inline void
|
|
G4ChargeState::SetChargeDipoleMoments(G4double charge,
|
|
G4double magneticDM,
|
|
G4double electricDM)
|
|
{
|
|
SetChargeMdm( charge, magneticDM );
|
|
SetElectricDipoleMoment( electricDM );
|
|
}
|
|
|
|
inline void
|
|
G4ChargeState::SetChargesAndMoments(G4double charge,
|
|
G4double magneticDM,
|
|
G4double electricDM,
|
|
G4double magnetic_charge )
|
|
{
|
|
SetChargeDipoleMoments( charge, magneticDM, electricDM);
|
|
SetMagneticCharge( magnetic_charge );
|
|
}
|