Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // 27 // ------------------------------------------- 24 // ------------------------------------------------------------------- 28 // 25 // 29 // GEANT4 Class file 26 // GEANT4 Class file 30 // 27 // 31 // 28 // 32 // File name: G4Generator2BS 29 // File name: G4Generator2BS 33 // 30 // 34 // Author: Andreia Trindade (andreia@lip.p 31 // Author: Andreia Trindade (andreia@lip.pt) 35 // Pedro Rodrigues (psilva@lip.pt 32 // Pedro Rodrigues (psilva@lip.pt) 36 // Luis Peralta (luis@lip.pt) 33 // Luis Peralta (luis@lip.pt) 37 // 34 // 38 // Creation date: 2 June 2003 35 // Creation date: 2 June 2003 39 // 36 // 40 // Modifications: 37 // Modifications: 41 // 02 Jun 2003 First implementation acording << 38 // 02 Jun 2003 First implementation acording with new design 42 // 12 Oct 2010 V.Ivanchenko moved RejectionFu << 43 // 39 // 44 // 40 // 45 // Class Description: 41 // Class Description: 46 // 42 // 47 // Concrete class for Bremsstrahlung Angular D << 43 // Concrete class for Bremsstrahlung Angular Distribution Generation - 2BS Distribution 48 // 2BS Distribution << 44 // Further documentation available from http://www.ge.infn.it/geant4/lowE 49 // << 50 45 51 // ------------------------------------------- 46 // ------------------------------------------------------------------- 52 // 47 // 53 48 54 #ifndef G4Generator2BS_h 49 #ifndef G4Generator2BS_h 55 #define G4Generator2BS_h 1 50 #define G4Generator2BS_h 1 56 51 57 #include "G4ios.hh" 52 #include "G4ios.hh" 58 #include "globals.hh" 53 #include "globals.hh" 59 #include "G4VEmAngularDistribution.hh" << 54 #include "G4VBremAngularDistribution.hh" 60 #include "G4Log.hh" << 61 << 62 class G4Pow; << 63 55 64 class G4Generator2BS : public G4VEmAngularDist << 56 class G4Generator2BS : public G4VBremAngularDistribution 65 { 57 { 66 58 67 public: 59 public: 68 60 69 explicit G4Generator2BS(const G4String& name << 61 G4Generator2BS(const G4String& name); 70 62 71 virtual ~G4Generator2BS(); << 63 ~G4Generator2BS(); 72 64 73 G4ThreeVector& SampleDirection(const G4Dynam << 65 G4double PolarAngle(const G4double initial_energy, 74 G4double out_energy, << 66 const G4double final_energy, 75 G4int Z, << 67 const G4int Z); 76 const G4Material* mat = nullptr) over << 77 68 78 void PrintGeneratorInformation() const overr << 69 void PrintGeneratorInformation() const; 79 << 80 G4Generator2BS & operator=(const G4Generato << 81 G4Generator2BS(const G4Generator2BS&) = del << 82 70 83 protected: 71 protected: 84 inline G4double RejectionFunction(G4double v << 85 72 86 private: << 73 G4double RejectionFunction(G4double value) const; 87 G4Pow* g4pow; << 88 << 89 G4double fz; << 90 G4double ratio; << 91 G4double ratio1; << 92 G4double ratio2; << 93 G4double delta; << 94 74 95 G4int nwarn; << 75 private: >> 76 G4double z; >> 77 G4double rejection_argument1, rejection_argument2, rejection_argument3; >> 78 G4double EnergyRatio; >> 79 >> 80 // hide assignment operator >> 81 G4Generator2BS & operator=(const G4Generator2BS &right); >> 82 G4Generator2BS(const G4Generator2BS&); 96 83 97 }; 84 }; 98 << 99 inline G4double G4Generator2BS::RejectionFunct << 100 { << 101 G4double y2 = (1 + y)*(1 + y); << 102 G4double x = 4*y*ratio/y2; << 103 return 4*x - ratio1 - (ratio2 - x)*G4Log(del << 104 } << 105 85 106 #endif 86 #endif 107 87 108 88