Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 08:29:41

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file G4Monopole.cc
0027 /// \brief Implementation of the G4Monopole class
0028 
0029 //---------------------------------------------------------------------------
0030 //
0031 // ClassName:   G4Monopole
0032 //
0033 // Description:
0034 //
0035 // Authors:   21.03.05  V.Ivanchenko
0036 //
0037 // Modified:
0038 //
0039 //  12.07.10  S.Burdin (changed the magnetic and electric charge variables from integer to double)
0040 //----------------------------------------------------------------------------
0041 //
0042 
0043 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0044 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0045 
0046 #include "G4Monopole.hh"
0047 
0048 #include "G4ParticleTable.hh"
0049 #include "G4PhysicalConstants.hh"
0050 #include "G4SystemOfUnits.hh"
0051 
0052 // ######################################################################
0053 // ###                        Monopole                                ###
0054 // ######################################################################
0055 
0056 G4Monopole* G4Monopole::theMonopole = 0;
0057 G4double G4Monopole::magCharge = 0.0;
0058 
0059 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0060 
0061 G4Monopole::G4Monopole(const G4String& aName, G4double mass, G4double width, G4double charge,
0062                        G4int iSpin, G4int iParity, G4int iConjugation, G4int iIsospin,
0063                        G4int iIsospin3, G4int gParity, const G4String& pType, G4int lepton,
0064                        G4int baryon, G4int encoding, G4bool stable, G4double lifetime,
0065                        G4DecayTable* decaytable)
0066   : G4ParticleDefinition(aName, mass, width, charge, iSpin, iParity, iConjugation, iIsospin,
0067                          iIsospin3, gParity, pType, lepton, baryon, encoding, stable, lifetime,
0068                          decaytable)
0069 {}
0070 
0071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0072 
0073 G4Monopole::~G4Monopole() {}
0074 
0075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0076 //
0077 //    Arguments for constructor are as follows
0078 //               name             mass          width         charge
0079 //             2*spin           parity  C-conjugation
0080 //          2*Isospin       2*Isospin3       G-parity
0081 //               type    lepton number  baryon number   PDG encoding
0082 //             stable         lifetime    decay table
0083 //
0084 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0085 
0086 G4Monopole* G4Monopole::MonopoleDefinition(G4double mass, G4double mCharge, G4double eCharge)
0087 {
0088   if (!theMonopole) {
0089     magCharge = eplus * mCharge / fine_structure_const * 0.5;
0090     theMonopole = new G4Monopole("monopole", mass, 0.0 * MeV, eplus * eCharge, 0, 0, 0, 0, 0, 0,
0091                                  "boson", 0, 0, 0, true, -1.0, 0);
0092 
0093     G4cout << "Monopole is created: m(GeV)= " << theMonopole->GetPDGMass() / GeV
0094            << " Qel= " << theMonopole->GetPDGCharge() / eplus << " Qmag= " << magCharge / eplus
0095            << G4endl;
0096   }
0097   return theMonopole;
0098 }
0099 
0100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0101 
0102 G4Monopole* G4Monopole::Monopole()
0103 {
0104   if (!theMonopole) {
0105     theMonopole = MonopoleDefinition();
0106   }
0107   return theMonopole;
0108 }
0109 
0110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0111 
0112 G4double G4Monopole::MagneticCharge() const
0113 {
0114   return magCharge;
0115 }
0116 
0117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....