source: trunk/source/processes/electromagnetic/lowenergy/include/G4Generator2BS.hh @ 1347

Last change on this file since 1347 was 1347, checked in by garnier, 13 years ago

geant4 tag 9.4

File size: 3.4 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26// $Id: G4Generator2BS.hh,v 1.5 2010/10/14 14:00:29 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-04-ref-00 $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class file
32//
33//
34// File name:  G4Generator2BS
35//
36// Author:     Andreia Trindade (andreia@lip.pt)
37//             Pedro Rodrigues  (psilva@lip.pt)
38//             Luis Peralta     (luis@lip.pt)
39//
40// Creation date: 2 June 2003
41//
42// Modifications:
43// 02 Jun 2003  First implementation acording with new design
44// 12 Oct 2010  V.Ivanchenko moved RejectionFunction inline
45//               
46//
47// Class Description:
48//
49// Concrete class for Bremsstrahlung Angular Distribution Generation
50// 2BS Distribution
51//
52
53// -------------------------------------------------------------------
54//
55
56#ifndef G4Generator2BS_h
57#define G4Generator2BS_h 1
58
59#include "G4ios.hh"
60#include "globals.hh"
61#include "G4VBremAngularDistribution.hh"
62
63class G4Pow;
64
65class G4Generator2BS : public G4VBremAngularDistribution
66{
67
68public:
69
70  G4Generator2BS(const G4String& name="");
71
72  virtual ~G4Generator2BS();
73
74  G4double PolarAngle(const G4double initial_energy,
75                      const G4double final_energy,
76                      const G4int Z);
77
78  void PrintGeneratorInformation() const;
79
80protected:
81
82  inline G4double RejectionFunction(G4double value) const;
83
84private:
85
86  G4double z;
87  G4double rejection_argument1, rejection_argument2, rejection_argument3;
88  G4double EnergyRatio;
89
90  G4Pow* g4pow;
91
92  // hide assignment operator
93  G4Generator2BS & operator=(const  G4Generator2BS &right);
94  G4Generator2BS(const  G4Generator2BS&);
95
96};
97
98inline G4double G4Generator2BS::RejectionFunction(G4double value) const
99{
100  G4double argument = (1+value)*(1+value);
101  return (4+std::log(rejection_argument3+(z/argument)))*
102    ((4*EnergyRatio*value/argument)-rejection_argument1)+rejection_argument2;
103}
104
105#endif
106
Note: See TracBrowser for help on using the repository browser.