Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/digits_hits/utils/src/G4VScoringMesh.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VScoringMesh.cc,v 1.37 2009/10/12 04:11:25 akimura 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: $
    2929//
    3030
     
    3939  : fWorldName(wName),fConstructed(false),fActive(true),
    4040    fRotationMatrix(NULL), fMFD(new G4MultiFunctionalDetector(wName)),
    41     verboseLevel(0),sizeIsSet(false),nMeshIsSet(false)
     41    verboseLevel(0),sizeIsSet(false),nMeshIsSet(false),
     42    fDrawUnit(""), fDrawUnitValue(1.)
    4243{
    4344  G4SDManager::GetSDMpointer()->AddNewDetector(fMFD);
     
    4546  fSize[0] = fSize[1] = fSize[2] = 0.;
    4647  fNSegment[0] = fNSegment[1] = fNSegment[2] = 1;
     48  fDivisionAxisNames[0] = fDivisionAxisNames[1] = fDivisionAxisNames[2] = "";
    4749}
    4850
     
    150152  if(itr == fMap.end()) return false;
    151153  return true;
     154}
     155
     156G4String 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
     165G4String 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
     177void  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
     187G4double 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
     196void G4VScoringMesh::GetDivisionAxisNames(G4String divisionAxisNames[3]) {
     197  for(int i = 0; i < 3; i++) divisionAxisNames[i] = fDivisionAxisNames[i];
    152198}
    153199
Note: See TracChangeset for help on using the changeset viewer.