Changeset 1340 for trunk/source/digits_hits/scorer/src/G4PSNofCollision.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/G4PSNofCollision.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSNofCollision.cc,v 1. 1 2007/07/11 01:31:02 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSNofCollision.cc,v 1.3 2010/07/23 04:35:38 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSNofCollision … … 37 37 // 38 38 // Created: 2007-02-02 Tsukasa ASO, Akinori Kimura. 39 // 2010-07-22 Introduce Unit specification. 39 40 // 40 41 /////////////////////////////////////////////////////////////////////////////// … … 42 43 G4PSNofCollision::G4PSNofCollision(G4String name, G4int depth) 43 44 :G4VPrimitiveScorer(name,depth),HCID(-1),weighted(false) 44 {;} 45 { 46 SetUnit(""); 47 } 45 48 46 49 G4PSNofCollision::~G4PSNofCollision() … … 83 86 for(; itr != EvtMap->GetMap()->end(); itr++) { 84 87 G4cout << " copy no.: " << itr->first 85 << " collisions: " << *(itr->second) 88 << " collisions: " << *(itr->second)/GetUnitValue() 89 << " [collision] " 86 90 << G4endl; 87 91 } 88 92 } 89 93 94 95 void G4PSNofCollision::SetUnit(const G4String& unit) 96 { 97 if (unit == "" ){ 98 unitName = unit; 99 unitValue = 1.0; 100 }else{ 101 G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )"; 102 G4Exception(GetName(),"DetScorer0000",JustWarning,msg); 103 } 104 } 105 106
Note: See TracChangeset
for help on using the changeset viewer.