- Timestamp:
- Feb 16, 2009, 10:14:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/global/management/src/G4LPhysicsFreeVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4LPhysicsFreeVector.cc,v 1. 17 2008/09/06 19:52:16 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4LPhysicsFreeVector.cc,v 1.22 2008/09/22 08:26:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 36 36 // F.W. Jones, TRIUMF, 04-JUN-96 37 37 // 38 // 27-MAR-97 FWJ: first version for Alpha release39 // 05-SEP-2008, V.Ivanchenko : added protections for zero-length vector40 38 // -------------------------------------------------------------------- 41 39 … … 49 47 : G4PhysicsVector(), verboseLevel(0) 50 48 { 51 type = T_G4LPhysicsFreeVector;49 type = T_G4LPhysicsFreeVector; 52 50 } 53 51 … … 59 57 : G4PhysicsVector(), verboseLevel(0) 60 58 { 61 type = T_G4LPhysicsFreeVector;59 type = T_G4LPhysicsFreeVector; 62 60 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 } 61 edgeMin = binmin; 62 edgeMax = binmax; 63 numberOfBin = nbin; 64 binVector.reserve(nbin+1); 65 dataVector.reserve(nbin+1); 66 for (size_t i=0; i<=numberOfBin; i++) 67 { 68 binVector.push_back(0.0); 69 dataVector.push_back(0.0); 70 } 74 71 } 75 72 … … 78 75 G4LPhysicsFreeVector::~G4LPhysicsFreeVector() 79 76 { 77 } 78 79 // -------------------------------------------------------------------- 80 81 G4LPhysicsFreeVector::G4LPhysicsFreeVector(const G4LPhysicsFreeVector& right) 82 : G4PhysicsVector(right) 83 { 84 verboseLevel = right.verboseLevel; 85 } 86 87 // -------------------------------------------------------------------- 88 89 G4LPhysicsFreeVector& 90 G4LPhysicsFreeVector::operator=(const G4LPhysicsFreeVector& right) 91 { 92 // Check assignment to self 93 // 94 if(this == &right) { return *this; } 95 96 DeleteData(); 97 CopyData(right); 98 99 verboseLevel = right.verboseLevel; 100 return *this; 80 101 } 81 102
Note: See TracChangeset
for help on using the changeset viewer.