Changeset 1340 for trunk/source/digits_hits/utils/src/G4VScoringMesh.cc
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/digits_hits/utils/src/G4VScoringMesh.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VScoringMesh.cc,v 1. 37 2009/10/12 04:11:25akimura Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VScoringMesh.cc,v 1.42 2010/07/27 01:44:54 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 39 39 : fWorldName(wName),fConstructed(false),fActive(true), 40 40 fRotationMatrix(NULL), fMFD(new G4MultiFunctionalDetector(wName)), 41 verboseLevel(0),sizeIsSet(false),nMeshIsSet(false) 41 verboseLevel(0),sizeIsSet(false),nMeshIsSet(false), 42 fDrawUnit(""), fDrawUnitValue(1.) 42 43 { 43 44 G4SDManager::GetSDMpointer()->AddNewDetector(fMFD); … … 45 46 fSize[0] = fSize[1] = fSize[2] = 0.; 46 47 fNSegment[0] = fNSegment[1] = fNSegment[2] = 1; 48 fDivisionAxisNames[0] = fDivisionAxisNames[1] = fDivisionAxisNames[2] = ""; 47 49 } 48 50 … … 150 152 if(itr == fMap.end()) return false; 151 153 return true; 154 } 155 156 G4String G4VScoringMesh::GetPSUnit(G4String & psname) { 157 std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.find(psname);; 158 if(itr == fMap.end()) { 159 return G4String(""); 160 } else { 161 return GetPrimitiveScorer(psname)->GetUnit(); 162 } 163 } 164 165 G4String G4VScoringMesh::GetCurrentPSUnit(){ 166 G4String unit = ""; 167 if(fCurrentPS == NULL) { 168 G4String msg = "ERROR : G4VScoringMesh::GetCurrentPSUnit() : "; 169 msg += " Current primitive scorer is null."; 170 G4cerr << msg << G4endl; 171 }else{ 172 unit = fCurrentPS->GetUnit(); 173 } 174 return unit; 175 } 176 177 void G4VScoringMesh::SetCurrentPSUnit(const G4String& unit){ 178 if(fCurrentPS == NULL) { 179 G4String msg = "ERROR : G4VScoringMesh::GetCurrentPSUnit() : "; 180 msg += " Current primitive scorer is null."; 181 G4cerr << msg << G4endl; 182 }else{ 183 fCurrentPS->SetUnit(unit); 184 } 185 } 186 187 G4double G4VScoringMesh::GetPSUnitValue(G4String & psname) { 188 std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.find(psname);; 189 if(itr == fMap.end()) { 190 return 1.; 191 } else { 192 return GetPrimitiveScorer(psname)->GetUnitValue(); 193 } 194 } 195 196 void G4VScoringMesh::GetDivisionAxisNames(G4String divisionAxisNames[3]) { 197 for(int i = 0; i < 3; i++) divisionAxisNames[i] = fDivisionAxisNames[i]; 152 198 } 153 199
Note: See TracChangeset
for help on using the changeset viewer.