Changeset 962 for trunk/source/processes/hadronic/models/util
- Timestamp:
- Apr 6, 2009, 12:30:29 PM (17 years ago)
- Location:
- trunk/source/processes/hadronic/models/util
- Files:
-
- 5 edited
-
History (modified) (1 diff)
-
include/G4ExcitedString.hh (modified) (3 diffs)
-
include/G4Fancy3DNucleus.hh (modified) (1 diff)
-
src/G4ExcitedString.cc (modified) (3 diffs)
-
src/G4Fancy3DNucleus.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/util/History
r819 r962 15 15 --------------------------------------------------------------- 16 16 17 27 Apr 2008 Gunter Folger (hadr-mod-util-V09-00-04) 17 24 October 2008 Dennis Wright (hadr-mod-util-V09-01-07) 18 ------------------------------------------------------- 19 - replace G4NucleiPropertiesTable::GetBindingEnergy with 20 G4NucleiProperties::GetBindingEnergy in G4Fancy3DNucleus 21 22 19 June 2008 G.Folger (hadr-mod-util-V09-01-06) 23 ----------------------------------------------- 24 - Attempt to fix memory leak in G4Fancy3DNucleus::SortNucleonsInZ(). 25 - remove debug introduced code by VU 26 27 19 June 2008 G. Cosmo (hadr-mod-util-V09-01-05) 28 ----------------------------------------------- 29 - Fixed noisy compilation warning in G4ExcitedString.hh for 30 unnecessary const qualifier to function return argument. 31 32 19 June 2008 V. Uzhinsky (hadr-mod-util-V09-01-04) 33 ------------------------------------------------- 34 - Update of include/G4ExcitedString.hh 35 36 18 June 2008 V. Uzhinsky (hadr-mod-util-V09-01-03) 37 -------------------------------------------------- 38 - G4ExcitedString::GetTimeOfCreation() const; 39 - G4ExcitedString::SetTimeOfCreation(G4double aTime); 40 Two new methods for operations with Time of a string Creation 41 42 14 May 2008 G.Folger (hadr-mod-util-V09-01-02) 18 43 --------------------------------------------------- 19 - Corrected 'if' logic in G4Fragment::CalculateExcitationEnergy(). 20 - Tag for release 9.1.p02. 44 - G4Fancy3DNucleus::SortNucleonsInZ() new method to sort nucleons 45 using z-coordinate 46 47 5 May 2008 G.Folger (hadr-mod-util-V09-01-01) 48 --------------------------------------------------- 49 - correct logic bug in CalculateExcitationEnergy() introduced by gcc-4.3 fix. 21 50 22 51 21 Mar 2008 Dennis Wright (hadr-mod-util-V09-01-00) -
trunk/source/processes/hadronic/models/util/include/G4ExcitedString.hh
r819 r962 71 71 int operator!=(const G4ExcitedString &right) const; 72 72 73 G4double GetTimeOfCreation() const; // Uzhi 15.05.08 74 75 void SetTimeOfCreation(G4double aTime); // Uzhi 15.05.08 76 73 77 const G4ThreeVector & GetPosition() const; 74 78 … … 107 111 108 112 G4int theDirection; // must be 1 or -1 (PROJECTILE or TARGET) 113 G4double theTimeOfCreation; // Uzhi 15.05.08 109 114 G4ThreeVector thePosition; 110 115 G4PartonVector thePartons; // would like initial capacity for 3 Partons. … … 123 128 { 124 129 return this != &right; 130 } 131 132 inline 133 G4double G4ExcitedString::GetTimeOfCreation() const // Uzhi 15.05.08 134 { 135 return theTimeOfCreation; 136 } 137 138 inline 139 void G4ExcitedString::SetTimeOfCreation(G4double aTime) // Uzhi 15.05.08 140 { 141 theTimeOfCreation=aTime; // Uzhi 15.05.08 125 142 } 126 143 -
trunk/source/processes/hadronic/models/util/include/G4Fancy3DNucleus.hh
r819 r962 85 85 void DoTranslation(const G4ThreeVector & theShift); 86 86 const G4VNuclearDensity * GetNuclearDensity() const; 87 void SortNucleonsInZ(); 87 88 88 89 private: -
trunk/source/processes/hadronic/models/util/src/G4ExcitedString.cc
r819 r962 47 47 thePartons.push_back(Color); 48 48 thePartons.push_back(AntiColor); 49 theTimeOfCreation = 0.; // Uzhi 15.05.08 49 50 thePosition = Color->GetPosition(); 50 51 theDirection = Direction; … … 57 58 thePartons.push_back(Gluon); 58 59 thePartons.push_back(AntiColor); 60 theTimeOfCreation = 0.; // Uzhi 15.05.08 59 61 thePosition = Color->GetPosition(); 60 62 theDirection = Direction; … … 64 66 G4ExcitedString::G4ExcitedString(G4KineticTrack * track) 65 67 { 68 theTimeOfCreation = track->GetFormationTime(); // Uzhi 15.05.08 66 69 thePosition = track->GetPosition(); 67 70 theTrack= track; -
trunk/source/processes/hadronic/models/util/src/G4Fancy3DNucleus.cc
r819 r962 37 37 #include "G4NuclearFermiDensity.hh" 38 38 #include "G4NuclearShellModelDensity.hh" 39 #include "G4NucleiProperties Table.hh"39 #include "G4NucleiProperties.hh" 40 40 #include "Randomize.hh" 41 41 #include "G4ios.hh" 42 42 #include <algorithm> 43 43 #include "G4HadronicException.hh" 44 44 45 45 46 G4Fancy3DNucleus::G4Fancy3DNucleus() … … 131 132 } 132 133 134 bool G4Fancy3DNucleusHelperForSortInZ(const G4Nucleon* nuc1, const G4Nucleon* nuc2) 135 { 136 return nuc1->GetPosition().z() < nuc2->GetPosition().z(); 137 } 138 139 void G4Fancy3DNucleus::SortNucleonsInZ() 140 { 141 142 GetNucleons(); // make sure theRWNucleons is initialised 143 144 if (theRWNucleons.size() < 2 ) return; 145 146 sort( theRWNucleons.begin(),theRWNucleons.end(),G4Fancy3DNucleusHelperForSortInZ); 147 148 // now copy sorted nucleons to theNucleons array. TheRWNucleons are pointers in theNucleons 149 // so we need to copy to new, and then swap. 150 G4Nucleon * sortedNucleons = new G4Nucleon[myA]; 151 for ( unsigned int i=0; i<theRWNucleons.size(); i++ ) 152 { 153 sortedNucleons[i]= *(theRWNucleons[i]); 154 } 155 156 theRWNucleons.clear(); // about to delete array these point to.... 157 delete [] theNucleons; 158 159 theNucleons=sortedNucleons; 160 161 return; 162 } 163 164 133 165 G4double G4Fancy3DNucleus::BindingEnergy() 134 166 { 135 return G4NucleiPropertiesTable::GetBindingEnergy(myZ,myA); 136 } 167 return G4NucleiProperties::GetBindingEnergy(myA,myZ); 168 } 169 137 170 138 171 G4double G4Fancy3DNucleus::GetNuclearRadius() … … 261 294 G4bool freeplace; 262 295 static G4double nd2 = sqr(nucleondistance); 263 G4double maxR=GetNuclearRadius(0.0 1); // there are no nucleons at a296 G4double maxR=GetNuclearRadius(0.001); // there are no nucleons at a 264 297 // relative Density of 0.01 265 298 G4int jr=0;
Note:
See TracChangeset
for help on using the changeset viewer.
