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 | // |
---|
27 | // |
---|
28 | #ifndef G4Fancy3DNucleus_h |
---|
29 | #define G4Fancy3DNucleus_h 1 |
---|
30 | |
---|
31 | // ------------------------------------------------------------ |
---|
32 | // GEANT 4 class header file |
---|
33 | // |
---|
34 | // ---------------- G4Fancy3DNucleus ---------------- |
---|
35 | // by Gunter Folger, May 1998. |
---|
36 | // class for a 3D nucleus, arranging nucleons in space and momentum. |
---|
37 | // ------------------------------------------------------------ |
---|
38 | |
---|
39 | #include "globals.hh" |
---|
40 | #include "G4DynamicParticle.hh" |
---|
41 | #include "G4V3DNucleus.hh" |
---|
42 | #include "G4Nucleon.hh" |
---|
43 | #include "G4VNuclearDensity.hh" |
---|
44 | #include "G4FermiMomentum.hh" |
---|
45 | #include <vector> |
---|
46 | |
---|
47 | class G4Fancy3DNucleus : public G4V3DNucleus |
---|
48 | { |
---|
49 | |
---|
50 | public: |
---|
51 | G4Fancy3DNucleus(); |
---|
52 | ~G4Fancy3DNucleus(); |
---|
53 | |
---|
54 | private: |
---|
55 | G4Fancy3DNucleus(const G4Fancy3DNucleus &right); |
---|
56 | const G4Fancy3DNucleus & operator=(const G4Fancy3DNucleus &right); |
---|
57 | int operator==(const G4Fancy3DNucleus &right) const; |
---|
58 | int operator!=(const G4Fancy3DNucleus &right) const; |
---|
59 | |
---|
60 | |
---|
61 | // Implementation |
---|
62 | void ChooseNucleons(); |
---|
63 | void ChoosePositions(); |
---|
64 | void ChooseFermiMomenta(); |
---|
65 | G4double BindingEnergy(); |
---|
66 | G4bool ReduceSum(G4ThreeVector * momentum, G4double *); |
---|
67 | |
---|
68 | public: |
---|
69 | void Init(G4double theA, G4double theZ); |
---|
70 | G4bool StartLoop(); |
---|
71 | G4Nucleon * GetNextNucleon(); |
---|
72 | const std::vector<G4Nucleon *> & GetNucleons(); |
---|
73 | G4int GetMassNumber(); |
---|
74 | G4double GetMass(); |
---|
75 | G4int GetCharge(); |
---|
76 | G4double GetNuclearRadius(); |
---|
77 | G4double GetNuclearRadius(const G4double maxRelativeDensity); |
---|
78 | G4double GetOuterRadius(); |
---|
79 | G4double CoulombBarrier(); |
---|
80 | void DoLorentzBoost(const G4LorentzVector & theBoost); |
---|
81 | void DoLorentzBoost(const G4ThreeVector & theBeta); |
---|
82 | void DoLorentzContraction(const G4LorentzVector & theBoost); |
---|
83 | void DoLorentzContraction(const G4ThreeVector & theBeta); |
---|
84 | void CenterNucleons(); |
---|
85 | void DoTranslation(const G4ThreeVector & theShift); |
---|
86 | const G4VNuclearDensity * GetNuclearDensity() const; |
---|
87 | |
---|
88 | private: |
---|
89 | |
---|
90 | G4int myA; |
---|
91 | G4int myZ; |
---|
92 | G4Nucleon * theNucleons; |
---|
93 | std::vector<G4Nucleon *> theRWNucleons; // should not have two... |
---|
94 | struct DeleteNucleon{ void operator()(G4Nucleon *aN){delete aN;} }; |
---|
95 | G4int currentNucleon; |
---|
96 | G4VNuclearDensity * theDensity; |
---|
97 | G4FermiMomentum theFermi; |
---|
98 | const G4double nucleondistance; |
---|
99 | }; |
---|
100 | |
---|
101 | inline G4int G4Fancy3DNucleus::GetCharge() |
---|
102 | { |
---|
103 | return myZ; |
---|
104 | } |
---|
105 | |
---|
106 | inline G4int G4Fancy3DNucleus::GetMassNumber() |
---|
107 | { |
---|
108 | return myA; |
---|
109 | } |
---|
110 | #endif |
---|
111 | |
---|
112 | |
---|