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 | inline G4FermiSplitter::G4FermiSplitter(G4FermiFragmentsPool* pool) |
---|
27 | : theFragmentsPool(pool), A(0), Z(0), K(0) |
---|
28 | { |
---|
29 | } |
---|
30 | |
---|
31 | inline G4FermiSplitter::G4FermiSplitter() |
---|
32 | : theFragmentsPool(0), A(0), Z(0), K(0) |
---|
33 | { |
---|
34 | // This is meant to not be accesable |
---|
35 | } |
---|
36 | |
---|
37 | inline G4FermiSplitter::~G4FermiSplitter() |
---|
38 | { |
---|
39 | } |
---|
40 | |
---|
41 | inline G4FermiSplitter::G4FermiSplitter(const G4FermiSplitter& right) |
---|
42 | : A(right.A), Z(right.Z), K(right.K), splits(right.splits) |
---|
43 | { |
---|
44 | } |
---|
45 | |
---|
46 | inline const G4FermiSplitter& |
---|
47 | G4FermiSplitter::operator=(const G4FermiSplitter& right) |
---|
48 | { |
---|
49 | A = right.A; |
---|
50 | Z = right.Z; |
---|
51 | K = right.Z; |
---|
52 | splits = right.splits; |
---|
53 | return *this; |
---|
54 | } |
---|
55 | |
---|
56 | inline G4bool |
---|
57 | G4FermiSplitter::operator==(const G4FermiSplitter& right) |
---|
58 | { |
---|
59 | return (A == right.A && Z == right.Z && K == right.K && |
---|
60 | splits == right.splits); |
---|
61 | } |
---|
62 | |
---|
63 | inline G4bool |
---|
64 | G4FermiSplitter::operator!=(const G4FermiSplitter& right) |
---|
65 | { |
---|
66 | return (A != right.A || Z != right.Z || K != right.K || |
---|
67 | splits != right.splits); |
---|
68 | } |
---|
69 | |
---|
70 | inline G4int G4FermiSplitter::GetNumberOfSplits() const |
---|
71 | { |
---|
72 | return splits.size(); |
---|
73 | } |
---|
74 | |
---|
75 | inline std::vector<const G4VFermiFragment*> G4FermiSplitter::GetSplit(const G4int i) |
---|
76 | { |
---|
77 | if (i >= 0 && i < static_cast<G4int>(splits.size())) return splits[i]; |
---|
78 | else |
---|
79 | { |
---|
80 | std::vector<const G4VFermiFragment*> dummy; |
---|
81 | return dummy; |
---|
82 | } |
---|
83 | } |
---|