- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/digits_hits/scorer/src/G4PSPassageCellFlux.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PSPassageCellFlux.cc,v 1. 2 2008/12/28 20:32:00 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PSPassageCellFlux.cc,v 1.4 2010/07/22 23:42:01 taso Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // G4PSPassageCellFlux … … 47 47 // 48 48 // Created: 2005-11-14 Tsukasa ASO, Akinori Kimura. 49 // 2010-07-22 Introduce Unit specification. 50 // 2010-07-22 Add weighted option 49 51 // 50 52 /////////////////////////////////////////////////////////////////////////////// 51 53 52 54 G4PSPassageCellFlux::G4PSPassageCellFlux(G4String name, G4int depth) 55 :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCellFlux(0), 56 weighted(true) 57 { 58 DefineUnitAndCategory(); 59 SetUnit("percm2"); 60 } 61 62 G4PSPassageCellFlux::G4PSPassageCellFlux(G4String name, const G4String& unit, 63 G4int depth) 53 64 :G4VPrimitiveScorer(name,depth),HCID(-1),fCurrentTrkID(-1),fCellFlux(0) 54 {;} 65 { 66 DefineUnitAndCategory(); 67 SetUnit(unit); 68 } 55 69 56 70 G4PSPassageCellFlux::~G4PSPassageCellFlux() … … 92 106 G4int trkid = aStep->GetTrack()->GetTrackID(); 93 107 G4double trklength = aStep->GetStepLength(); 94 trklength *= aStep->GetPreStepPoint()->GetWeight();108 if ( weighted ) trklength *= aStep->GetPreStepPoint()->GetWeight(); 95 109 96 110 if ( IsEnter &&IsExit ){ // Passed at one step … … 143 157 for(; itr != EvtMap->GetMap()->end(); itr++) { 144 158 G4cout << " copy no.: " << itr->first 145 << " cell flux : " << *(itr->second)*cm*cm << " [cm^-2]" 159 << " cell flux : " << *(itr->second)/GetUnitValue() 160 << " [" << GetUnit() 146 161 << G4endl; 147 162 } 148 163 } 149 164 165 void G4PSPassageCellFlux::SetUnit(const G4String& unit) 166 { 167 CheckAndSetUnit(unit,"Per Unit Surface"); 168 } 169 170 void G4PSPassageCellFlux::DefineUnitAndCategory(){ 171 // Per Unit Surface 172 new G4UnitDefinition("percentimeter2","percm2","Per Unit Surface",(1./cm2)); 173 new G4UnitDefinition("permillimeter2","permm2","Per Unit Surface",(1./mm2)); 174 new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2)); 175 } 176 177
Note: See TracChangeset
for help on using the changeset viewer.