Ignore:
Timestamp:
Apr 6, 2009, 12:30:29 PM (17 years ago)
Author:
garnier
Message:

update processes

Location:
trunk/source/processes/hadronic/models/util
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/util/History

    r819 r962  
    1515     ---------------------------------------------------------------
    1616
    17 27 Apr 2008 Gunter Folger (hadr-mod-util-V09-00-04)
     1724 October 2008 Dennis Wright (hadr-mod-util-V09-01-07)
     18-------------------------------------------------------
     19- replace G4NucleiPropertiesTable::GetBindingEnergy with
     20  G4NucleiProperties::GetBindingEnergy in G4Fancy3DNucleus
     21
     2219 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
     2719 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
     3219 June 2008 V. Uzhinsky (hadr-mod-util-V09-01-04)
     33-------------------------------------------------
     34-  Update of include/G4ExcitedString.hh
     35
     3618 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
     4214 May 2008 G.Folger      (hadr-mod-util-V09-01-02)
    1843---------------------------------------------------
    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
     475 May 2008 G.Folger       (hadr-mod-util-V09-01-01)
     48---------------------------------------------------
     49- correct logic bug in CalculateExcitationEnergy() introduced by gcc-4.3 fix.
    2150
    225121 Mar 2008 Dennis Wright (hadr-mod-util-V09-01-00)
  • trunk/source/processes/hadronic/models/util/include/G4ExcitedString.hh

    r819 r962  
    7171      int operator!=(const G4ExcitedString &right) const;
    7272
     73      G4double GetTimeOfCreation() const;               // Uzhi 15.05.08
     74
     75      void  SetTimeOfCreation(G4double aTime);          // Uzhi 15.05.08
     76
    7377      const G4ThreeVector & GetPosition() const;
    7478
     
    107111
    108112      G4int    theDirection;  // must be 1 or -1 (PROJECTILE or TARGET)
     113      G4double theTimeOfCreation;                   // Uzhi 15.05.08
    109114      G4ThreeVector thePosition;
    110115      G4PartonVector thePartons;  // would like initial capacity for 3 Partons.
     
    123128{
    124129        return this != &right;
     130}
     131
     132inline
     133G4double G4ExcitedString::GetTimeOfCreation() const      // Uzhi 15.05.08
     134{
     135        return theTimeOfCreation;
     136}
     137
     138inline
     139void G4ExcitedString::SetTimeOfCreation(G4double aTime)  // Uzhi 15.05.08
     140{
     141        theTimeOfCreation=aTime;                         // Uzhi 15.05.08
    125142}
    126143
  • trunk/source/processes/hadronic/models/util/include/G4Fancy3DNucleus.hh

    r819 r962  
    8585      void DoTranslation(const G4ThreeVector & theShift);
    8686      const G4VNuclearDensity * GetNuclearDensity() const;
     87      void SortNucleonsInZ();
    8788     
    8889  private:
  • trunk/source/processes/hadronic/models/util/src/G4ExcitedString.cc

    r819 r962  
    4747    thePartons.push_back(Color);
    4848    thePartons.push_back(AntiColor);
     49    theTimeOfCreation = 0.;                           // Uzhi 15.05.08
    4950    thePosition = Color->GetPosition();
    5051    theDirection = Direction;
     
    5758    thePartons.push_back(Gluon);
    5859    thePartons.push_back(AntiColor);
     60    theTimeOfCreation = 0.;                            // Uzhi 15.05.08
    5961    thePosition = Color->GetPosition();
    6062    theDirection = Direction;
     
    6466G4ExcitedString::G4ExcitedString(G4KineticTrack * track)
    6567{
     68        theTimeOfCreation = track->GetFormationTime(); // Uzhi 15.05.08
    6669        thePosition = track->GetPosition();
    6770        theTrack= track;
  • trunk/source/processes/hadronic/models/util/src/G4Fancy3DNucleus.cc

    r819 r962  
    3737#include "G4NuclearFermiDensity.hh"
    3838#include "G4NuclearShellModelDensity.hh"
    39 #include "G4NucleiPropertiesTable.hh"
     39#include "G4NucleiProperties.hh"
    4040#include "Randomize.hh"
    4141#include "G4ios.hh"
    4242#include <algorithm>
    4343#include "G4HadronicException.hh"
     44
    4445
    4546G4Fancy3DNucleus::G4Fancy3DNucleus()
     
    131132}
    132133
     134   bool G4Fancy3DNucleusHelperForSortInZ(const G4Nucleon* nuc1, const G4Nucleon* nuc2)
     135{
     136        return nuc1->GetPosition().z() < nuc2->GetPosition().z();
     137}   
     138
     139void 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
    133165G4double G4Fancy3DNucleus::BindingEnergy()
    134166{
    135         return G4NucleiPropertiesTable::GetBindingEnergy(myZ,myA);
    136 }
     167  return G4NucleiProperties::GetBindingEnergy(myA,myZ);
     168}
     169
    137170
    138171G4double G4Fancy3DNucleus::GetNuclearRadius()
     
    261294        G4bool          freeplace;
    262295        static G4double nd2 = sqr(nucleondistance);
    263         G4double maxR=GetNuclearRadius(0.01);   //  there are no nucleons at a
     296        G4double maxR=GetNuclearRadius(0.001);   //  there are no nucleons at a
    264297                                                //  relative Density of 0.01
    265298        G4int jr=0;
Note: See TracChangeset for help on using the changeset viewer.