|
|
|||
File indexing completed on 2026-09-18 09:14:25
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 // G4QuadrupoleMagField 0027 // 0028 // Class description: 0029 // 0030 // Class for creation of quadrupole magnetic field 0031 // fGradient - is the gradient value for quadrupole magnetic lense. 0032 // Then the magnetic field components are: 0033 // Bx = B[0] = fGradient*X , 0034 // By = B[1] = fGradient*Y , 0035 // Bz = B[2] = 0 . 0036 // Here X,Y,Z are the coordinates of a space point of interest. 0037 0038 // Author: Vladimir Grichine (CERN), 03.02.1997 - Created 0039 // ------------------------------------------------------------------- 0040 #ifndef G4QUADRUPOLEMAGFIELD_HH 0041 #define G4QUADRUPOLEMAGFIELD_HH 0042 0043 #include "G4MagneticField.hh" 0044 #include "G4ThreeVector.hh" 0045 #include "G4RotationMatrix.hh" 0046 0047 /** 0048 * @brief G4QuadrupoleMagField allows for the creation of quadrupole magnetic 0049 * field, given the gradient value for quadrupole magnetic lense. 0050 */ 0051 0052 class G4QuadrupoleMagField : public G4MagneticField 0053 { 0054 public: 0055 0056 /** 0057 * Constructor for G4QuadrupoleMagField. 0058 * @param[in] pGradient Field gradient value. 0059 */ 0060 G4QuadrupoleMagField(G4double pGradient); 0061 0062 /** 0063 * Constructor for G4QuadrupoleMagField. 0064 * @param[in] pGradient Field gradient value. 0065 * @param[in] pOrigin Origin position. 0066 * @param[in] pMatrix Rotation matrix. 0067 */ 0068 G4QuadrupoleMagField(G4double pGradient, 0069 const G4ThreeVector& pOrigin, 0070 G4RotationMatrix* pMatrix); 0071 0072 /** 0073 * Default Destructor. 0074 */ 0075 ~G4QuadrupoleMagField() override = default; 0076 0077 /** 0078 * Returns the field value on the given position 'yTrack'. 0079 * @param[in] yTrack Time position array. 0080 * @param[out] B The returned field array. 0081 */ 0082 void GetFieldValue(const G4double yTrack[], G4double B[]) const override; 0083 0084 /** 0085 * Returns a pointer to a new allocated clone of this object. 0086 */ 0087 G4Field* Clone() const override; 0088 0089 private: 0090 0091 G4double fGradient = 0.0; 0092 G4ThreeVector fOrigin = G4ThreeVector(0.0, 0.0, 0.0); 0093 G4RotationMatrix* fpMatrix = nullptr; 0094 }; 0095 0096 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|