ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4InuclNuclei.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4InuclNuclei.hh
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 // 20100112 Michael Kelsey -- Replace G4CascadeMomentum with G4LorentzVector
28 // 20100301 M. Kelsey -- Add function to create unphysical nuclei for use
29 // as temporary final-state fragments.
30 // 20100319 M. Kelsey -- Remove "using" directory and unnecessary #includes.
31 // 20100409 M. Kelsey -- Drop unused string argument from ctors.
32 // 20100630 M. Kelsey -- Add excitation energy as optional public ctor arg,
33 // remove excitation energy data member (part of G4Ions). Add
34 // excitation energy to "getNucleiMass()" function, move print to .cc
35 // 20100711 M. Kelsey -- Add optional model ID to constructors
36 // 20100714 M. Kelsey -- Use G4DynamicParticle::theDynamicalMass to deal with
37 // excitation energy without instantianting "infinite" G4PartDefns.
38 // 20100719 M. Kelsey -- Move setExitationEnergy implementation to .cc file.
39 // 20100906 M. Kelsey -- Add fill() functions to rewrite contents
40 // 20100909 M. Kelsey -- Add function to discard exciton configuration
41 // 20100914 M. Kelsey -- Use integers for A and Z
42 // 20100915 M. Kelsey -- Add constructor to copy G4DynamicParticle input
43 // 20100924 M. Kelsey -- Add constructor to copy G4Fragment input, and output
44 // functions to create G4Fragment.
45 // 20110214 M. Kelsey -- Replace integer "model" with enum
46 // 20110225 M. Kelsey -- Add equality operator (NOT sorting!)
47 // 20110721 M. Kelsey -- Follow base-class ctor change to pass model directly
48 // 20110722 M. Kelsey -- BUG FIX: Deleted excitation energy in one ctor
49 // 20110829 M. Kelsey -- Add constructor to copy G4V3DNucleus input
50 // 20110919 M. Kelsey -- Add clear() to restore completely empty state
51 // 20110922 M. Kelsey -- Add stream argument to printParticle() => print()
52 
53 #ifndef G4INUCL_NUCLEI_HH
54 #define G4INUCL_NUCLEI_HH
55 
57 
58 #include "G4InuclParticle.hh"
59 #include "G4LorentzVector.hh"
60 #include "G4ExitonConfiguration.hh"
61 
62 class G4Fragment;
64 class G4V3DNucleus;
65 
66 
68 public:
70 
72  : G4InuclParticle(dynPart, model) {}
73 
76  setExitationEnergy(exc);
77  }
78 
81  : G4InuclParticle(makeDefinition(a,z), mom, model) {
82  setExitationEnergy(exc);
83  }
84 
87  : G4InuclParticle(makeDefinition(a,z), ekin, model) {
88  setExitationEnergy(exc);
89  }
90 
91  G4InuclNuclei(const G4Fragment& aFragment, Model model=DefaultModel);
92 
94 
95  virtual ~G4InuclNuclei() {}
96 
97  // Copy and assignment constructors for use with std::vector<>
99  : G4InuclParticle(right),
101 
103 
104  // Equality (comparison) operator -- NOT SORTING
106  return ( G4InuclParticle::operator==(right) &&
108  }
109 
110  // Overwrite data structure (avoids creating/copying temporaries)
112  fill(0., a, z, exc, model);
113  }
114 
115  void fill(const G4LorentzVector& mom, G4int a, G4int z,
116  G4double exc=0., Model model=DefaultModel);
117 
118  void fill(G4double ekin, G4int a, G4int z, G4double exc,
120 
121  void copy(const G4Fragment& aFragment, Model model=DefaultModel);
122 
123  void copy(G4V3DNucleus* a3DNucleus, Model model=DefaultModel);
124 
125  void clear(); // Discard all information (including A,Z)
126 
127  // Excitation energy is stored as dynamical mass of particle
129 
132  }
133 
135 
136  G4int getA() const { return getDefinition()->GetAtomicMass(); }
137  G4int getZ() const { return getDefinition()->GetAtomicNumber(); }
138 
140  return getDefinition()->GetPDGMass()*CLHEP::MeV/CLHEP::GeV; // From G4 to Bertini
141  }
142 
144  return (getMass()-getNucleiMass())*CLHEP::GeV/CLHEP::MeV; // Always in MeV
145  }
146 
148 
150  return theExitonConfiguration;
151  }
152 
153  static G4double getNucleiMass(G4int a, G4int z, G4double exc=0.);
154 
155  virtual void print(std::ostream& os) const;
156 
157  // Convert contents to G4Fragment for use outside package
158  G4Fragment makeG4Fragment() const;
159  operator G4Fragment() const;
160 
161 protected:
162  // Convert nuclear configuration to standard GEANT4 pointer
165 
166 private:
168 };
169 
170 #endif // G4INUCL_NUCLEI_HH