Changeset 921 for trunk/source/global/management/src/G4PhysicsLnVector.cc
- Timestamp:
- Feb 16, 2009, 10:14:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/global/management/src/G4PhysicsLnVector.cc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsLnVector.cc,v 1.1 5 2006/06/29 19:04:15 gunterExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsLnVector.cc,v 1.17 2008/09/22 14:49:57 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 34 34 // G4PhysicsLnVector.cc 35 35 // 36 // History: 37 // 27 Apr. 1999, M.G. Pia: Created, copying from G4PhysicsLogVector 38 // 11 Nov. 2000, H.Kurashige : use STL vector for dataVector and binVector 39 // 9 Mar. 2001, H.Kurashige : add PhysicsVector type and Retrieve 36 // 27 Apr 1999 - M.G.Pia: Created from G4PhysicsLogVector 40 37 // 41 38 // -------------------------------------------------------------- … … 44 41 45 42 G4PhysicsLnVector::G4PhysicsLnVector() 46 : dBin(0.), baseBin(0.)43 : G4PhysicsVector(), dBin(0.), baseBin(0.) 47 44 { 48 45 type = T_G4PhysicsLnVector; … … 50 47 51 48 G4PhysicsLnVector::G4PhysicsLnVector(size_t theNbin) 52 : dBin(0.), baseBin(0.)49 : G4PhysicsVector(), dBin(0.), baseBin(0.) 53 50 { 54 51 type = T_G4PhysicsLnVector; … … 61 58 numberOfBin = theNbin; 62 59 63 edgeMin = 0.;64 edgeMax = 0.;65 66 lastBin = INT_MAX;67 lastEnergy = -DBL_MAX;68 lastValue = DBL_MAX;69 70 60 for (size_t i=0; i<=numberOfBin; i++) 71 61 { … … 77 67 G4PhysicsLnVector::G4PhysicsLnVector(G4double theEmin, 78 68 G4double theEmax, size_t theNbin) 79 : dBin(std::log(theEmax/theEmin)/theNbin), 69 : G4PhysicsVector(), 70 dBin(std::log(theEmax/theEmin)/theNbin), 80 71 baseBin(std::log(theEmin)/dBin) 81 72 { … … 97 88 edgeMin = binVector[0]; 98 89 edgeMax = binVector[numberOfBin-1]; 99 100 lastBin = INT_MAX;101 lastEnergy = -DBL_MAX;102 lastValue = DBL_MAX;103 90 } 104 91 … … 116 103 return success; 117 104 } 105 106 G4PhysicsLnVector::G4PhysicsLnVector(const G4PhysicsLnVector& right) 107 : G4PhysicsVector(right) 108 { 109 dBin = right.dBin; 110 baseBin = right.baseBin; 111 } 112 113 G4PhysicsLnVector& 114 G4PhysicsLnVector::operator=(const G4PhysicsLnVector& right) 115 { 116 // Check assignment to self 117 // 118 if(this == &right) { return *this; } 119 120 DeleteData(); 121 CopyData(right); 122 123 dBin = right.dBin; 124 baseBin = right.baseBin; 125 return *this; 126 }
Note: See TracChangeset
for help on using the changeset viewer.