Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-07 07:52:04

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 G4MonopoleFieldSetup.hh
0027 /// \brief Definition of the G4MonopoleFieldSetup class
0028 
0029 // ------------------------------------------------------------
0030 //        GEANT 4  include file implementation
0031 // ------------------------------------------------------------
0032 //
0033 // G4MonopoleFieldSetup is responsible for setting up a magnetic field
0034 // and the ability to use it with two different equation of motions,
0035 // one for monopoles and another for the rest of the particles.
0036 //
0037 //
0038 
0039 // =======================================================================
0040 // Created:  13 May 2010, B. Bozsogi
0041 // =======================================================================
0042 
0043 #ifndef G4MonopoleFieldSetup_H
0044 #define G4MonopoleFieldSetup_H
0045 
0046 #include "G4MagneticField.hh"
0047 #include "G4UniformMagField.hh"
0048 
0049 class G4FieldManager;
0050 class G4ChordFinder;
0051 class G4Mag_UsualEqRhs;
0052 class G4MagIntegratorStepper;
0053 class G4MonopoleEquation;
0054 
0055 class G4MonopoleFieldMessenger;
0056 
0057 class G4MonopoleFieldSetup
0058 {
0059   public:
0060     G4MonopoleFieldSetup();
0061     ~G4MonopoleFieldSetup();
0062 
0063     void InitialiseAll();  //  Set parameters and call method below
0064     //  void SetMagField(G4double fieldValue);
0065     void SetStepperAndChordFinder(G4int val);
0066     void SetZMagFieldValue(G4double val);
0067     void ConstructMagField();
0068 
0069     //  static G4MonopoleFieldSetup* GetMonopoleFieldSetup();
0070     G4double GetZmagFieldValue() const { return fZmagFieldValue; }
0071 
0072   private:
0073     G4FieldManager* GetGlobalFieldManager();  // static
0074 
0075     G4FieldManager* fFieldManager;
0076     G4ChordFinder* fChordFinder;
0077     G4ChordFinder* fUsualChordFinder;
0078     G4ChordFinder* fMonopoleChordFinder;
0079     G4Mag_UsualEqRhs* fEquation;
0080     G4MonopoleEquation* fMonopoleEquation;
0081 
0082     G4MagneticField* fMagneticField;
0083 
0084     G4MagIntegratorStepper* fStepper;
0085     G4MagIntegratorStepper* fMonopoleStepper;
0086 
0087     G4double fMinStep;
0088     G4double fZmagFieldValue;
0089 
0090     //  G4int                   fStepperIndex;
0091 
0092     //  static G4MonopoleFieldSetup*  fMonopoleFieldSetup;
0093     G4MonopoleFieldMessenger* fMonopoleFieldMessenger;
0094 };
0095 
0096 #endif