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

geant4.8.2 beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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()
Note: See TracChangeset for help on using the changeset viewer.