Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-02 08:28:36

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 G4FieldParametersMessenger.h
0027 /// \brief Definition of the G4FieldParametersMessenger class
0028 ///
0029 /// This code was initially developed in Geant4 VMC package
0030 /// (https://github.com/vmc-project)
0031 /// and adapted to Geant4.
0032 ///
0033 /// \author I. Hrivnacova; IJCLab, Orsay
0034 
0035 #ifndef G4FIELDPARAMETERSMESSENGER_HH
0036 #define G4FIELDPARAMETERSMESSENGER_HH
0037 
0038 #include "G4UImessenger.hh"
0039 #include "globals.hh"
0040 
0041 class G4FieldParameters;
0042 
0043 class G4UIcommand;
0044 class G4UIdirectory;
0045 class G4UIcmdWithoutParameter;
0046 class G4UIcmdWithAString;
0047 class G4UIcmdWithADouble;
0048 class G4UIcmdWithADoubleAndUnit;
0049 class G4UIcmdWithABool;
0050 
0051 /// \ingroup geometry
0052 /// \brief Messenger class that defines commands for TG4DetConstruction.
0053 ///
0054 /// Implements commands:
0055 /// - /field/fieldType fieldType     \n
0056 ///       fieldType = Magnetic | ElectroMagnetic | Gravity
0057 /// - /field/equationType eqType     \n
0058 ///       eqType = EqMagnetic | EqMagneticWithSpin | EqElectroMagnetic |
0059 ///                EqEMfieldWithSpin | EqEMfieldWithEDM
0060 /// - /field/stepperType stepperType \n
0061 ///       stepperType = CashKarpRKF45 | ClassicalRK4 | ExplicitEuler | ImplicitEuler |
0062 ///                     SimpleHeum | SimpleRunge | ConstRK4 | ExactHelixStepper
0063 ///                     | HelixExplicitEuler | HelixHeum | HelixImplicitEuler |
0064 ///                     HelixMixedStepper | HelixSimpleRunge | NystromRK4 |
0065 ///                     RKG3Stepper
0066 /// - /field/setMinimumStep value
0067 /// - /field/setDeltaChord  value
0068 /// - /field/setDeltaOneStep value
0069 /// - /field/setDeltaIntersection value
0070 /// - /field/setMinimumEpsilonStep value
0071 /// - /field/setMaximumEpsilonStep value
0072 /// - /field/setConstDistance value
0073 /// - /field/printParameters
0074 ///
0075 /// \author I. Hrivnacova; IJClab, Orsay
0076 
0077 class G4FieldParametersMessenger : public G4UImessenger
0078 {
0079  public:
0080   /// Standard constructor
0081   G4FieldParametersMessenger(G4FieldParameters* fieldParameters);
0082   /// Destructor
0083   ~G4FieldParametersMessenger() override;
0084 
0085   // methods
0086   /// Apply command to the associated object.
0087   void SetNewValue(G4UIcommand* command, G4String newValues) override;
0088 
0089  private:
0090   /// Not implemented
0091   G4FieldParametersMessenger() = delete;
0092   /// Not implemented
0093   G4FieldParametersMessenger(const G4FieldParametersMessenger& right) = delete;
0094   /// Not implemented
0095   G4FieldParametersMessenger& operator=(
0096     const G4FieldParametersMessenger& right) = delete;
0097 
0098   // Data members
0099 
0100   G4FieldParameters* fFieldParameters = nullptr; ///< associated class
0101   G4UIdirectory* fDirectory = nullptr;           ///< command directory
0102 
0103   // Commands data members
0104 
0105   /// Command: fieldType
0106   G4UIcmdWithAString* fFieldTypeCmd = nullptr; 
0107 
0108   /// Command: equationType
0109   G4UIcmdWithAString* fEquationTypeCmd = nullptr; 
0110 
0111   /// Command: stepperType
0112   G4UIcmdWithAString* fStepperTypeCmd = nullptr; 
0113 
0114   /// Command: setMinimumStep
0115   G4UIcmdWithADoubleAndUnit* fSetMinimumStepCmd = nullptr; 
0116 
0117   /// Command: setDeltaChord
0118   G4UIcmdWithADoubleAndUnit* fSetDeltaChordCmd = nullptr; 
0119 
0120   /// Command: setDeltaOneStep
0121   G4UIcmdWithADoubleAndUnit* fSetDeltaOneStepCmd = nullptr; 
0122 
0123   /// Command: setDeltaIntersection
0124   G4UIcmdWithADoubleAndUnit* fSetDeltaIntersectionCmd = nullptr; 
0125 
0126   /// Command: setMinimumEpsilon
0127   G4UIcmdWithADouble* fSetMinimumEpsilonStepCmd = nullptr; 
0128 
0129   /// Command: setMaximumEpsilon
0130   G4UIcmdWithADouble* fSetMaximumEpsilonStepCmd = nullptr; 
0131 
0132   /// Command: setConstDistance
0133   G4UIcmdWithADoubleAndUnit* fSetConstDistanceCmd = nullptr; 
0134 
0135   /// Command: printParameters
0136   G4UIcmdWithoutParameter* fPrintParametersCmd = nullptr; 
0137 };
0138 
0139 #endif // G4FIELDPARAMETERSMESSENGER_HH