Changeset 1340 for trunk/source/digits_hits/scorer/src/G4PSDoseDeposit.cc
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/digits_hits/scorer/src/G4PSDoseDeposit.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSDoseDeposit.cc,v 1. 2 2008/12/28 20:32:00asaim Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSDoseDeposit.cc,v 1.5 2010/09/16 06:44:44 asaim Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSDoseDeposit … … 41 41 // 42 42 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 43 // 2010-07-22 Introduce Unit specification. 43 44 // 44 45 /////////////////////////////////////////////////////////////////////////////// … … 46 47 G4PSDoseDeposit::G4PSDoseDeposit(G4String name, G4int depth) 47 48 :G4VPrimitiveScorer(name,depth),HCID(-1) 48 {;} 49 { 50 SetUnit("Gy"); 51 } 52 53 G4PSDoseDeposit::G4PSDoseDeposit(G4String name, const G4String& unit, 54 G4int depth) 55 :G4VPrimitiveScorer(name,depth),HCID(-1) 56 { 57 SetUnit(unit); 58 } 49 59 50 60 G4PSDoseDeposit::~G4PSDoseDeposit() … … 63 73 G4int idx = ((G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable())) 64 74 ->GetReplicaNumber(indexDepth); 75 if(idx<0) 76 { 77 G4Exception("G4PSDoseDeposit","G4PSDoseDeposit::ProcessHits",JustWarning, 78 "Incorrect replica number"); 79 G4cerr << " --- GetReplicaNumber : " << idx << G4endl; 80 } 65 81 solid = physParam->ComputeSolid(idx, physVol); 66 82 solid->ComputeDimensions(physParam,idx,physVol); … … 71 87 } 72 88 73 G4double density = aStep->GetTrack()->Get Material()->GetDensity();89 G4double density = aStep->GetTrack()->GetStep()->GetPreStepPoint()->GetMaterial()->GetDensity(); 74 90 G4double dose = edep / ( density * (solid->GetCubicVolume()) ); 75 91 dose *= aStep->GetPreStepPoint()->GetWeight(); … … 106 122 for(; itr != EvtMap->GetMap()->end(); itr++) { 107 123 G4cout << " copy no.: " << itr->first 108 << " dose deposit: " << G4BestUnit(*(itr->second),"Dose") 124 << " dose deposit: " 125 << *(itr->second)/GetUnitValue() 126 << " ["<<GetUnit() <<"]" 109 127 << G4endl; 110 128 } 111 129 } 112 130 131 void G4PSDoseDeposit::SetUnit(const G4String& unit) 132 { 133 CheckAndSetUnit(unit,"Dose"); 134 } 135 136 137
Note: See TracChangeset
for help on using the changeset viewer.