- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/digits_hits/scorer/src/G4PSPassageTrackLength.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageTrackLength.cc,v 1. 1 2007/07/11 01:31:03 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageTrackLength.cc,v 1.2 2010/07/22 07:23:45 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSPassageTrackLength … … 41 41 // 42 42 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 43 // 2010-07-22 Introduce Unit specification. 43 44 // 44 45 /////////////////////////////////////////////////////////////////////////////// … … 47 48 :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fTrackLength(0.), 48 49 weighted(false) 49 {;} 50 { 51 SetUnit("mm"); 52 } 53 54 G4PSPassageTrackLength::G4PSPassageTrackLength(G4String name, 55 const G4String& unit, 56 G4int depth) 57 :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fTrackLength(0.), 58 weighted(false) 59 { 60 SetUnit(unit); 61 } 62 50 63 51 64 G4PSPassageTrackLength::~G4PSPassageTrackLength() … … 120 133 for(; itr != EvtMap->GetMap()->end(); itr++) { 121 134 G4cout << " copy no.: " << itr->first 122 << " track length : " << G4BestUnit(*(itr->second),"Length") 135 << " track length : " 136 << *(itr->second)/GetUnitValue() 137 << " [" << GetUnit()<< "]" 123 138 << G4endl; 124 139 } 125 140 } 126 141 142 void G4PSPassageTrackLength::SetUnit(const G4String& unit) 143 { 144 CheckAndSetUnit(unit,"Length"); 145 }
Note: See TracChangeset
for help on using the changeset viewer.