- Timestamp:
- Feb 16, 2009, 10:14:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/global/management/src/G4PhysicsLinearVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsLinearVector.cc,v 1.1 2 2006/06/29 19:04:13 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsLinearVector.cc,v 1.14 2008/09/22 14:49:57 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 34 34 // G4PhysicsLinearVector.cc 35 35 // 36 // History: 37 // 02 Dec. 1995, G.Cosmo : Structure created based on object model 38 // 15 Feb. 1996, K.Amako : Implemented the 1st version 39 // 01 Jul. 1996, K.Amako : Cache mechanism and hidden bin from the 40 // user introduced. 41 // 26 Sep. 1996, K.Amako : Constructor with only 'bin size' added. 42 // 11 Nov. 2000, H.Kurashige : use STL vector for dataVector and binVector 43 // 9 Mar. 2001, H.Kurashige : add PhysicsVector type and Retrieve 36 // 15 Feb 1996 - K.Amako : 1st version 44 37 // 45 38 //-------------------------------------------------------------------- … … 48 41 49 42 G4PhysicsLinearVector::G4PhysicsLinearVector() 50 : dBin(0.), baseBin(0.)43 : G4PhysicsVector(), dBin(0.), baseBin(0.) 51 44 { 52 edgeMin = 0.0;53 edgeMax = 0.0;54 numberOfBin = 0;55 45 type = T_G4PhysicsLinearVector; 56 46 } 57 47 58 48 G4PhysicsLinearVector::G4PhysicsLinearVector(size_t theNbin) 59 : dBin(0.), baseBin(0.)49 : G4PhysicsVector(), dBin(0.), baseBin(0.) 60 50 { 61 51 type = T_G4PhysicsLinearVector; … … 68 58 numberOfBin = theNbin; 69 59 70 edgeMin = 0.;71 edgeMax = 0.;72 73 lastBin = INT_MAX;74 lastEnergy = -DBL_MAX;75 lastValue = DBL_MAX;76 77 60 for (size_t i=0; i<=numberOfBin; i++) 78 61 { … … 84 67 G4PhysicsLinearVector::G4PhysicsLinearVector(G4double theEmin, 85 68 G4double theEmax, size_t theNbin) 86 : dBin((theEmax-theEmin)/theNbin), 69 : G4PhysicsVector(), 70 dBin((theEmax-theEmin)/theNbin), 87 71 baseBin(theEmin/dBin) 88 72 { … … 105 89 edgeMax = binVector[numberOfBin-1]; 106 90 107 lastBin = INT_MAX;108 lastEnergy = -DBL_MAX;109 lastValue = DBL_MAX;110 91 } 111 92 … … 123 104 return success; 124 105 } 106 107 G4PhysicsLinearVector::G4PhysicsLinearVector(const G4PhysicsLinearVector& right) 108 : G4PhysicsVector(right) 109 { 110 dBin = right.dBin; 111 baseBin = right.baseBin; 112 } 113 114 G4PhysicsLinearVector& 115 G4PhysicsLinearVector::operator=(const G4PhysicsLinearVector& right) 116 { 117 // Check assignment to self 118 // 119 if(this == &right) { return *this; } 120 121 DeleteData(); 122 CopyData(right); 123 124 dBin = right.dBin; 125 baseBin = right.baseBin; 126 return *this; 127 }
Note: See TracChangeset
for help on using the changeset viewer.