Ignore:
Timestamp:
Nov 25, 2009, 5:13:58 PM (16 years ago)
Author:
garnier
Message:

update CVS release candidate geant4.9.3.01

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

Legend:

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

    r962 r1196  
    1414     * Please list in reverse chronological order (last date on top)
    1515     ---------------------------------------------------------------
     16
     1719 November 2009 Gunter Folger     hadr-mod-util-V09-02-04
     18-  Restore methods storing/retrieving G4SplitableHadron*,
     19   now in use in FTF
     20
     2113-November 2009 Gunter Folger     hadr-mod-util-V09-02-03
     22--------------------------------------------------------
     23- Correct use of G4ThreeVector, ie. avoid vector=0;
     24
     2519 December 2008 V, Uzhinsky (hadr-mod-util-V09-02-02)
     26--------------------------------------------------------
     27New method (SortNucleonsDecZ()) for sorting nucleons on decreasing Z-coordanates
     28is inserted in G4Fancy3DNucleus class. It is needed for nucleus-nucleus collision.
     29SortNucleonsInc() is re-named in SortNucleonsIncZ().
     30
     3112 December 2008 Gunter Folger    (hadr-mod-util-V09-02-01)
     32-------------------------------------------------------
     33-  Correct G4Nucleon: typo, and ctor need to init isHit
     34
     3510 December 2008 Gunter Folger    (hadr-mod-util-V09-02-00)
     36-------------------------------------------------------
     37-  G4Nucleon.hh: Hit was storing G4SplitableHadron*, but this is no
     38   longer used. Can use bool isHit instead. Avoids confusing reinterpret_cast.
    1639
    174024 October 2008 Dennis Wright (hadr-mod-util-V09-01-07)
  • trunk/source/processes/hadronic/models/util/include/G4Fancy3DNucleus.hh

    r962 r1196  
    8585      void DoTranslation(const G4ThreeVector & theShift);
    8686      const G4VNuclearDensity * GetNuclearDensity() const;
    87       void SortNucleonsInZ();
     87      void SortNucleonsIncZ();            // on increased Z-coordinates Uzhi 29.08.08
     88      void SortNucleonsDecZ();            // on decreased Z-coordinates Uzhi 29.08.08
    8889     
    8990  private:
  • trunk/source/processes/hadronic/models/util/include/G4Nucleon.hh

    r819 r1196  
    8080           void Boost(const G4LorentzVector & aMomentum);
    8181
    82     inline void Hit(G4VSplitableHadron * aHit) { theSplitableHadron=aHit;}
     82    inline void Hit(G4VSplitableHadron *aHit) { theSplitableHadron=aHit;}
     83//    inline void Hit(G4int ) { isHit=true;}   
    8384    inline void Hit(G4int )
    8485    {
    8586      theSplitableHadron=reinterpret_cast<G4VSplitableHadron *>(1111);
    86       // G4cout << "$%$#%@%$#@%@%%% "<<theSplitableHadron<<G4endl;
    8787    }
    8888    inline G4VSplitableHadron * GetSplitableHadron() const { return theSplitableHadron;}
    89    
    90     inline G4bool AreYouHit() const
    91     {
    92       G4bool result = true;
    93       if (theSplitableHadron==NULL) result = false;
    94       return result;
    95     }
    96  
     89    inline G4bool AreYouHit() const {  return theSplitableHadron!=0;}
     90
    9791  private:
    9892
  • trunk/source/processes/hadronic/models/util/src/G4Fancy3DNucleus.cc

    r962 r1196  
    6868  if(theNucleons) delete [] theNucleons;
    6969
    70 // this was delected already:
    71 //  std::for_each(theRWNucleons.begin(), theRWNucleons.end(), DeleteNucleon());
    7270  theRWNucleons.clear();
    7371
     
    119117}
    120118
    121 
    122119const std::vector<G4Nucleon *> & G4Fancy3DNucleus::GetNucleons()
    123120{
     
    132129}
    133130
     131//void G4Fancy3DNucleus::SortNucleonsIncZ() // on increased Z-coordinates Uzhi 29.08.08
     132
    134133   bool G4Fancy3DNucleusHelperForSortInZ(const G4Nucleon* nuc1, const G4Nucleon* nuc2)
    135134{
     
    137136}   
    138137
    139 void G4Fancy3DNucleus::SortNucleonsInZ()
     138//void G4Fancy3DNucleus::SortNucleonsInZ()
     139void G4Fancy3DNucleus::SortNucleonsIncZ() // on increased Z-coordinates Uzhi 29.08.08
    140140{
    141141       
     
    162162}
    163163
     164void G4Fancy3DNucleus::SortNucleonsDecZ() // on decreased Z-coordinates Uzhi 29.08.08
     165{
     166        G4Nucleon * sortedNucleons = new G4Nucleon[myA];
     167       
     168        GetNucleons();   // make sure theRWNucleons is initialised
     169
     170        if (theRWNucleons.size() < 2 ) return;
     171        sort( theRWNucleons.begin(),theRWNucleons.end(),G4Fancy3DNucleusHelperForSortInZ);
     172
     173// now copy sorted nucleons to theNucleons array. TheRWNucleons are pointers in theNucleons
     174//  so we need to copy to new, and then swap.
     175        for ( unsigned int i=0; i<theRWNucleons.size(); i++ )
     176        {
     177           sortedNucleons[i]= *(theRWNucleons[myA-1-i]);  // Uzhi 29.08.08
     178        }
     179        theRWNucleons.clear();   // about to delete array elements these point to....
     180        delete [] theNucleons;
     181        theNucleons=sortedNucleons;
     182
     183        return;
     184}
    164185
    165186G4double G4Fancy3DNucleus::BindingEnergy()
     
    300321        G4double arand[600];
    301322        G4double *prand=arand;
    302 //      G4int Attempt=0;
    303323        while ( i < myA )
    304324        {
    305325           do
    306326           {   
    307 //              ++Attempt;
    308327                if ( jr < 3 )
    309328                {
     
    350369           }
    351370        }
    352 //      G4cout << "Att " << myA << " " << Attempt << G4endl;
    353371
    354372}
     
    384402              {
    385403                  G4cerr << "G4Fancy3DNucleus: difficulty finding proton momentum" << G4endl;
    386                   mom=0;
     404                  mom=G4ThreeVector(0,0,0);
    387405              }
    388406
     
    400418//     ;
    401419//     G4cout << "final sum / mag() " << sum << " / " << sum.mag() << G4endl;
    402 
    403420
    404421    G4double energy;
     
    531548        // Now we have a nucleon with a bigger Fermi Momentum.
    532549        // Exchange with last nucleon.. and iterate.
    533 //      G4cout << " Nucleon to swap with : " << swapit << G4endl;
    534 //      G4cout << " Fermi momentum test, and better.. " << PFermi << " / "
    535 //             << theFermi.GetFermiMomentum(density) << G4endl;
    536 //      cout << theNucleons[swapit]<< G4endl << theNucleons[myA-1] << G4endl;
    537 //      cout << momentum[swapit] << G4endl << momentum[myA-1] << G4endl;
    538550        G4Nucleon swap= theNucleons[swapit];
    539551        G4ThreeVector mom_swap=momentum[swapit];
     
    545557        momentum[myA-1]=mom_swap;
    546558        pFermiM[myA-1]=pf;
    547 //      cout << "after swap" <<G4endl<< theNucleons[swapit] << G4endl << theNucleons[myA-1] << G4endl;
    548 //      cout << momentum[swapit] << G4endl << momentum[myA-1] << G4endl;
    549559        return ReduceSum(momentum,pFermiM);
    550560}
  • trunk/source/processes/hadronic/models/util/src/G4KineticTrack.cc

    r819 r1196  
    487487//   Select a possible decay channel
    488488//
    489   //  G4int index1;
    490   //  for (index1 = nChannels - 1; index1 >= 0; index1--)
    491     //  cout << "DECAY Actual Width IND/ActualW " << index1 << "  " << theActualWidth[index1] << G4endl;
    492     //  cout << "DECAY Actual Mass " << theActualMass << G4endl;
     489/*
     490    G4int index1;
     491    for (index1 = nChannels - 1; index1 >= 0; index1--)
     492      G4cout << "DECAY Actual Width IND/ActualW " << index1 << "  " << theActualWidth[index1] << G4endl;
     493      G4cout << "DECAY Actual Mass " << theActualMass << G4endl;
     494*/
    493495 
    494496 G4int chargeBalance = G4lrint(theDefinition->GetPDGCharge() );     
  • trunk/source/processes/hadronic/models/util/src/G4Nucleon.cc

    r819 r1196  
    3737
    3838G4Nucleon::G4Nucleon()
    39 : theBindingE(0.) , theParticleType(NULL), theSplitableHadron(NULL)
     39: theBindingE(0.) , theParticleType(0), theSplitableHadron(0)
    4040{}
    4141
Note: See TracChangeset for help on using the changeset viewer.