- Timestamp:
- Sep 10, 2008, 5:40:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/global/management/src/G4LPhysicsFreeVector.cc
r833 r850 25 25 // 26 26 // 27 // $Id: G4LPhysicsFreeVector.cc,v 1.1 2 2007/05/14 10:27:06 gcosmoExp $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 $ 29 29 // 30 30 // … … 37 37 // 38 38 // 27-MAR-97 FWJ: first version for Alpha release 39 // 05-SEP-2008, V.Ivanchenko : added protections for zero-length vector 40 // -------------------------------------------------------------------- 39 41 40 42 #include "G4LPhysicsFreeVector.hh" … … 42 44 #include "G4ios.hh" 43 45 46 // -------------------------------------------------------------------- 47 44 48 G4LPhysicsFreeVector::G4LPhysicsFreeVector() 45 : verboseLevel(0)49 : G4PhysicsVector(), verboseLevel(0) 46 50 { 47 type = T_G4LPhysicsFreeVector; 51 type = T_G4LPhysicsFreeVector; 52 } 48 53 49 edgeMin = 0.0; 50 edgeMax = 0.0; 51 numberOfBin = 0; 52 } 54 // -------------------------------------------------------------------- 53 55 54 56 G4LPhysicsFreeVector::G4LPhysicsFreeVector(size_t nbin, 55 57 G4double binmin, 56 58 G4double binmax) 57 :verboseLevel(0)59 : G4PhysicsVector(), verboseLevel(0) 58 60 { 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 } 60 75 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 // -------------------------------------------------------------------- 75 77 76 78 G4LPhysicsFreeVector::~G4LPhysicsFreeVector() 77 79 { 78 80 } 81 82 // -------------------------------------------------------------------- 79 83 80 84 void G4LPhysicsFreeVector::DumpValues()
Note: See TracChangeset
for help on using the changeset viewer.