Ignore:
Timestamp:
Sep 10, 2008, 5:40:37 PM (16 years ago)
Author:
garnier
Message:

geant4.8.2 beta

Location:
trunk/source/global/management/src
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/global/management/src/G4AllocatorPool.cc

    r833 r850  
    2626//
    2727// $Id: G4AllocatorPool.cc,v 1.4 2006/06/29 19:03:57 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4DataVector.cc

    r833 r850  
    2626//
    2727// $Id: G4DataVector.cc,v 1.9 2007/11/13 17:35:06 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4ErrorPropagatorData.cc

    r833 r850  
    2626//
    2727// $Id: G4ErrorPropagatorData.cc,v 1.3 2007/06/05 13:04:30 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4Exception.cc

    r833 r850  
    2626//
    2727// $Id: G4Exception.cc,v 1.21 2007/11/13 17:35:06 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4GeometryTolerance.cc

    r833 r850  
    2525//
    2626//
    27 // $Id: G4GeometryTolerance.cc,v 1.2.4.1 2008/04/23 09:22:49 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4GeometryTolerance.cc,v 1.3 2008/02/15 07:29:51 gcosmo Exp $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// class G4GeometryTolerance
  • trunk/source/global/management/src/G4LPhysicsFreeVector.cc

    r833 r850  
    2525//
    2626//
    27 // $Id: G4LPhysicsFreeVector.cc,v 1.12 2007/05/14 10:27:06 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4LPhysicsFreeVector.cc,v 1.17 2008/09/06 19:52:16 vnivanch Exp $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
     
    3737//
    3838// 27-MAR-97 FWJ: first version for Alpha release
     39// 05-SEP-2008, V.Ivanchenko : added protections for zero-length vector
     40// --------------------------------------------------------------------
    3941
    4042#include "G4LPhysicsFreeVector.hh"
     
    4244#include "G4ios.hh"
    4345
     46// --------------------------------------------------------------------
     47
    4448G4LPhysicsFreeVector::G4LPhysicsFreeVector()
    45    : verboseLevel(0)
     49   : G4PhysicsVector(), verboseLevel(0)
    4650{
    47    type = T_G4LPhysicsFreeVector;
     51  type = T_G4LPhysicsFreeVector;
     52}
    4853
    49    edgeMin = 0.0;
    50    edgeMax = 0.0;
    51    numberOfBin = 0;
    52 }
     54// --------------------------------------------------------------------
    5355
    5456G4LPhysicsFreeVector::G4LPhysicsFreeVector(size_t nbin,
    5557                                           G4double binmin,
    5658                                           G4double binmax)
    57    : verboseLevel(0)
     59  : G4PhysicsVector(), verboseLevel(0)
    5860{
    59    type = T_G4LPhysicsFreeVector;
     61  type = T_G4LPhysicsFreeVector;
     62   
     63  numberOfBin = nbin;
     64  if(nbin > 0) {
     65    binVector.resize(nbin+1);
     66    dataVector.resize(nbin+1);
     67    edgeMin = binmin;
     68    edgeMax = binmax;
     69    for (size_t i=0; i<=numberOfBin; i++) {
     70      binVector[i] = binmin;
     71      dataVector[i]= 0.0;
     72    }
     73  }
     74
    6075
    61    edgeMin = binmin;
    62    edgeMax = binmax;
    63    numberOfBin = nbin;
    64    lastEnergy = 0.;
    65    lastValue = 0.;
    66    lastBin = 0;
    67    binVector.reserve(nbin+1);
    68    dataVector.reserve(nbin+1);
    69    for (size_t i=0; i<=numberOfBin; i++)
    70    {
    71      binVector.push_back(0.0);
    72      dataVector.push_back(0.0);
    73    }
    74 
     76// --------------------------------------------------------------------
    7577
    7678G4LPhysicsFreeVector::~G4LPhysicsFreeVector()
    7779{
    7880}
     81
     82// --------------------------------------------------------------------
    7983
    8084void G4LPhysicsFreeVector::DumpValues()
  • trunk/source/global/management/src/G4OrderedTable.cc

    r833 r850  
    2626//
    2727// $Id: G4OrderedTable.cc,v 1.6 2007/11/13 17:35:06 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4PhysicsFreeVector.cc

    r833 r850  
    2626//
    2727// $Id: G4PhysicsFreeVector.cc,v 1.10 2006/06/29 19:04:10 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4PhysicsLinearVector.cc

    r833 r850  
    2626//
    2727// $Id: G4PhysicsLinearVector.cc,v 1.12 2006/06/29 19:04:13 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4PhysicsLnVector.cc

    r833 r850  
    2626//
    2727// $Id: G4PhysicsLnVector.cc,v 1.15 2006/06/29 19:04:15 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4PhysicsLogVector.cc

    r833 r850  
    2525//
    2626//
    27 // $Id: G4PhysicsLogVector.cc,v 1.13 2006/06/29 19:04:17 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4PhysicsLogVector.cc,v 1.16 2008/09/06 19:52:16 vnivanch Exp $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
     
    4141//    11 Nov. 2000, H.Kurashige : use STL vector for dataVector and binVector
    4242//    9  Mar. 2001, H.Kurashige : add PhysicsVector type and Retrieve
     43//    05 Sep. 2008, V.Ivanchenko : added protections for zero-length vector
    4344//
    4445// --------------------------------------------------------------
     
    4748
    4849G4PhysicsLogVector::G4PhysicsLogVector()
    49   : dBin(0.), baseBin(0.)
     50  : G4PhysicsVector(), dBin(0.), baseBin(0.)
    5051{
    5152  type = T_G4PhysicsLogVector;
     
    5354
    5455G4PhysicsLogVector::G4PhysicsLogVector(size_t theNbin)
    55   : dBin(0.), baseBin(0.)
     56  : G4PhysicsVector(), dBin(0.), baseBin(0.)
    5657{
    5758  type = T_G4PhysicsLogVector;
     
    5960  // Add extra one bin (hidden to user) to handle correctly when
    6061  // Energy=theEmax in getValue.
    61   dataVector.reserve(theNbin+1);
    62   binVector.reserve(theNbin+1);
    6362
    6463  numberOfBin = theNbin;
    6564
    66   edgeMin = 0.;
    67   edgeMax = 0.;
    68 
    69   lastBin = INT_MAX;
    70   lastEnergy = -DBL_MAX;
    71   lastValue = DBL_MAX;
    72  
    73   for (size_t i=0; i<=numberOfBin; i++)
    74   {
    75      binVector.push_back(0.0);
    76      dataVector.push_back(0.0);
     65  if(numberOfBin > 0) {
     66    dataVector.resize(theNbin+1);
     67    binVector.resize(theNbin+1);
     68    edgeMin = 1;
     69    edgeMax = numberOfBin;
     70    for (size_t i=0; i<=numberOfBin; i++) {
     71      binVector[i] = i + 1;
     72      dataVector[i]= 0.0;
     73    }
    7774  }
    7875
     
    8077G4PhysicsLogVector::G4PhysicsLogVector(G4double theEmin,
    8178                                       G4double theEmax, size_t theNbin)
    82   : dBin(std::log10(theEmax/theEmin)/theNbin),
     79  : G4PhysicsVector(), dBin(std::log10(theEmax/theEmin)/theNbin),
    8380    baseBin(std::log10(theEmin)/dBin)
    8481{
     
    8784  // Add extra one bin (hidden to user) to handle correctly when
    8885  // Energy=theEmax in getValue.
    89   dataVector.reserve(theNbin+1);
    90   binVector.reserve(theNbin+1);
     86  dataVector.resize(theNbin+1);
     87  binVector.resize(theNbin+1);
    9188
    9289  numberOfBin = theNbin;
    9390
    94   for (size_t i=0; i<numberOfBin+1; i++)
    95   {
    96     binVector.push_back(std::pow(10., std::log10(theEmin)+i*dBin));
    97     dataVector.push_back(0.0);
     91  if(numberOfBin > 0) {
     92    for (size_t i=0; i<=numberOfBin; i++) {
     93      binVector[i] = std::pow(10., std::log10(theEmin)+i*dBin);
     94      dataVector[i]= 0.0;
     95    }
     96    edgeMin = binVector[0];
     97    edgeMax = binVector[numberOfBin-1];
    9898  }
    99 
    100   edgeMin = binVector[0];
    101   edgeMax = binVector[numberOfBin-1];
    102 
    103   lastBin = INT_MAX;
    104   lastEnergy = -DBL_MAX;
    105   lastValue = DBL_MAX;
    10699
    107100
  • trunk/source/global/management/src/G4PhysicsOrderedFreeVector.cc

    r833 r850  
    2626//
    2727// $Id: G4PhysicsOrderedFreeVector.cc,v 1.10 2006/06/29 19:04:20 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030////////////////////////////////////////////////////////////////////////
  • trunk/source/global/management/src/G4PhysicsTable.cc

    r833 r850  
    2626//
    2727// $Id: G4PhysicsTable.cc,v 1.15 2007/11/13 17:35:06 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4PhysicsVector.cc

    r833 r850  
    2525//
    2626//
    27 // $Id: G4PhysicsVector.cc,v 1.17 2006/06/29 19:04:25 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4PhysicsVector.cc,v 1.22 2008/09/05 18:04:45 vnivanch Exp $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
     
    4242//    18 Jan. 2001, H.Kurashige : removed ptrNextTable
    4343//    09 Mar. 2001, H.Kurashige : added G4PhysicsVector type
     44//    05 Sep. 2008, V.Ivanchenko : added protections for zero-length vector
    4445// --------------------------------------------------------------
    4546
     
    4748#include <iomanip>
    4849
    49 G4PhysicsVector::G4PhysicsVector()
     50// --------------------------------------------------------------
     51
     52G4PhysicsVector::G4PhysicsVector(G4bool spline)
    5053 : type(T_G4PhysicsVector),
    51    edgeMin(0.), edgeMax(0.), numberOfBin(0),
    52    lastEnergy(0.), lastValue(0.), lastBin(0)
    53 {
    54 }
     54   edgeMin(DBL_MAX), edgeMax(0.), numberOfBin(0),
     55   lastEnergy(0.), lastValue(0.), lastBin(0),
     56   secDerivative(0), useSpline(spline)
     57{
     58  binVector.push_back(edgeMin);
     59  dataVector.push_back(0.0);
     60}
     61
     62// --------------------------------------------------------------
    5563
    5664G4PhysicsVector::~G4PhysicsVector()
    5765{
    58   dataVector.clear();
    59   binVector.clear();
    60   type = T_G4PhysicsVector;
    61 }
     66  delete [] secDerivative;
     67}
     68
     69// --------------------------------------------------------------
    6270
    6371G4PhysicsVector::G4PhysicsVector(const G4PhysicsVector& right)
     
    6573  *this=right;
    6674}
     75
     76// --------------------------------------------------------------
    6777
    6878G4PhysicsVector& G4PhysicsVector::operator=(const G4PhysicsVector& right)
     
    8090  dataVector = right.dataVector;
    8191  binVector = right.binVector;
     92  secDerivative = right.secDerivative;
     93  useSpline = right.useSpline;
    8294  comment = right.comment;
    8395  return *this;
    8496}
    8597
     98// --------------------------------------------------------------
     99
    86100G4int G4PhysicsVector::operator==(const G4PhysicsVector &right) const
    87101{
     
    89103}
    90104
     105// --------------------------------------------------------------
     106
    91107G4int G4PhysicsVector::operator!=(const G4PhysicsVector &right) const
    92108{
     
    94110}
    95111
     112// --------------------------------------------------------------
     113
    96114G4double G4PhysicsVector::GetLowEdgeEnergy(size_t binNumber) const
    97115{
    98116  return binVector[binNumber];
    99117}
     118
     119// --------------------------------------------------------------
    100120
    101121G4bool G4PhysicsVector::Store(std::ofstream& fOut, G4bool ascii)
     
    129149  return true;
    130150}
     151
     152// --------------------------------------------------------------
    131153
    132154G4bool G4PhysicsVector::Retrieve(std::ifstream& fIn, G4bool ascii)
     
    153175    binVector.reserve(size);
    154176    dataVector.reserve(size);
     177    G4double vBin, vData;
     178
    155179    for(size_t i = 0; i < size ; i++)
    156180    {
    157       G4double vBin=0., vData=0.;
     181      vBin = 0.;
     182      vData= 0.;
    158183      fIn >> vBin >> vData;
    159184      if (fIn.fail())  { return false; }
     
    176201  G4double* value = new G4double[2*size];
    177202  fIn.read((char*)(value),  2*size*(sizeof(G4double)) );
    178   if (G4int(fIn.gcount()) != G4int(2*size*(sizeof(G4double))) ){
     203  if (G4int(fIn.gcount()) != G4int(2*size*(sizeof(G4double))) )
     204  {
    179205    delete [] value;
    180206    return false;
     
    183209  binVector.reserve(size);
    184210  dataVector.reserve(size);
    185   for(size_t i = 0; i < size; i++) {
     211  for(size_t i = 0; i < size; i++)
     212  {
    186213    binVector.push_back(value[2*i]);
    187214    dataVector.push_back(value[2*i+1]);
     
    190217  return true;
    191218}
    192    
     219
     220// --------------------------------------------------------------
     221
     222void G4PhysicsVector::FillSecondDerivatives()
     223
     224  secDerivative = new G4double [numberOfBin];
     225
     226  secDerivative[0] = 0.0 ;
     227
     228  // cannot compute derivatives for less than 3 points
     229  if(3 > numberOfBin) {
     230    secDerivative[numberOfBin-1] = 0.0 ;
     231    return;
     232  }
     233
     234  G4double* u = new G4double [numberOfBin];
     235  u[0] = 0.0 ;
     236   
     237  // Decomposition loop for tridiagonal algorithm. secDerivative[i]
     238  // and u[i] are used for temporary storage of the decomposed factors.
     239   
     240  for(size_t i=1; i<numberOfBin-1; i++)
     241  {
     242    G4double sig = (binVector[i]-binVector[i-1])
     243                 / (binVector[i+1]-binVector[i-1]) ;
     244    G4double p = sig*secDerivative[i-1] + 2.0 ;
     245    secDerivative[i] = (sig - 1.0)/p ;
     246    u[i] = (dataVector[i+1]-dataVector[i])/(binVector[i+1]-binVector[i])
     247         - (dataVector[i]-dataVector[i-1])/(binVector[i]-binVector[i-1]) ;
     248    u[i] =(6.0*u[i]/(binVector[i+1]-binVector[i-1]) - sig*u[i-1])/p ;
     249  }
     250
     251  G4double qn = 0.0 ;
     252  G4double un = 0.0 ;
     253
     254  secDerivative[numberOfBin-1] = (un - qn*u[numberOfBin-2])
     255                               / (qn*secDerivative[numberOfBin-2] + 1.0) ;
     256   
     257  // The back-substitution loop for the triagonal algorithm of solving
     258  // a linear system of equations.
     259   
     260  for(G4int k=numberOfBin-2; k>=0; k--)
     261  {
     262    secDerivative[k] = secDerivative[k]*secDerivative[k+1] + u[k];
     263  }
     264  delete [] u;
     265}
     266   
     267// --------------------------------------------------------------
     268
    193269std::ostream& operator<<(std::ostream& out, const G4PhysicsVector& pv)
    194270{
  • trunk/source/global/management/src/G4SliceTimer.cc

    r833 r850  
    2626//
    2727// $Id: G4SliceTimer.cc,v 1.2 2006/11/02 15:39:39 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4StateManager.cc

    r833 r850  
    2626//
    2727// $Id: G4StateManager.cc,v 1.13 2006/11/23 00:41:56 asaim Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4Timer.cc

    r833 r850  
    2626//
    2727// $Id: G4Timer.cc,v 1.15 2006/06/29 19:04:30 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4UnitsTable.cc

    r833 r850  
    2525//
    2626//
    27 // $Id: G4UnitsTable.cc,v 1.36 2006/11/30 10:37:57 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4UnitsTable.cc,v 1.37 2008/05/06 17:17:08 maire Exp $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4242//           MeV*cm2/g ..etc.. ("Energy*Surface/Mass")
    4343// 18-08-06: remove symbol mum (mma)
     44// 06-05-08: V/m ("Electric field")  (mma)
    4445//
    4546//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    296297 new G4UnitDefinition("megavolt","MV","Electric potential",megavolt);
    297298 
     299 //Electric field
     300 new G4UnitDefinition(  "volt/m","V/m","Electric field",volt/m);
     301   
    298302 //Magnetic flux
    299303 new G4UnitDefinition("weber","Wb","Magnetic flux",weber);
  • trunk/source/global/management/src/G4VExceptionHandler.cc

    r833 r850  
    2626//
    2727// $Id: G4VExceptionHandler.cc,v 1.3 2006/06/29 19:04:35 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4VNotifier.cc

    r833 r850  
    2626//
    2727// $Id: G4VNotifier.cc,v 1.2 2006/06/29 19:04:37 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030// G4VNotifier
  • trunk/source/global/management/src/G4VStateDependent.cc

    r833 r850  
    2626//
    2727// $Id: G4VStateDependent.cc,v 1.5 2006/06/29 19:04:39 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4coutDestination.cc

    r833 r850  
    2626//
    2727// $Id: G4coutDestination.cc,v 1.2 2006/06/29 19:04:41 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
  • trunk/source/global/management/src/G4ios.cc

    r833 r850  
    2626//
    2727// $Id: G4ios.cc,v 1.9 2006/06/29 19:04:43 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
Note: See TracChangeset for help on using the changeset viewer.