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/include/G4VScoringMesh.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VScoringMesh.hh,v 1.30 2010/06/14 13:28:17 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4VScoringMesh.hh,v 1.40 2010/07/27 01:44:54 akimura Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030
     
    8787  virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111) = 0;
    8888  // draw a column of a quantity on a current viewer
    89   virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 
    90                           G4int idxProj, G4int idxColumn) = 0;
     89  virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap,
     90                          G4int idxProj, G4int idxColumn) = 0;
    9191  // reset registered primitive scorers
    9292  void ResetScore();
     
    115115  // get number of segments of this mesh
    116116  void GetNumberOfSegments(G4int nSegment[3]);
    117   // set positions to segment this mesh
    118   inline void SetSegmentPositions(std::vector<G4double> & sp) {fSegmentPositions = sp;}
    119117
    120118  // register a primitive scorer to the MFD & set it to the current primitive scorer
     
    131129    else return false;
    132130  }
     131  // get unit of primitive scorer by the name
     132  G4String GetPSUnit(G4String & psname);
     133  // get unit of current primitive scorer
     134  G4String GetCurrentPSUnit();
     135  // set unit of current primitive scorer
     136  void SetCurrentPSUnit(const G4String& unit);
     137  // get unit value of primitive scorer by the name
     138  G4double GetPSUnitValue(G4String & psname);
     139  // set PS name to be drawn
     140  void SetDrawPSName(G4String & psname) {fDrawPSName = psname;}
     141
     142  // get axis names of the hierarchical division in the divided order
     143  void GetDivisionAxisNames(G4String divisionAxisNames[3]);
     144
    133145  // set current  primitive scorer to NULL
    134146  void SetNullToCurrentPrimitiveScorer() {fCurrentPS = NULL;}
     
    157169  G4RotationMatrix * fRotationMatrix;
    158170  G4int fNSegment[3];
    159   std::vector<G4double> fSegmentPositions;
    160171
    161172  std::map<G4String, G4THitsMap<G4double>* > fMap;
     
    167178  G4bool nMeshIsSet;
    168179
     180  G4String fDrawUnit;
     181  G4double fDrawUnitValue;
     182  G4String fDrawPSName;
     183
     184  G4String fDivisionAxisNames[3];
    169185};
    170186
     
    192208void G4VScoringMesh::DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int axflg)
    193209{
     210  fDrawPSName = psName;
    194211  std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName);
    195   if(fMapItr!=fMap.end())
    196   { Draw(fMapItr->second->GetMap(),colorMap,axflg); }
    197   else
    198   { G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; }
     212  if(fMapItr!=fMap.end()) {
     213    fDrawUnit = GetPSUnit(psName);
     214    fDrawUnitValue = GetPSUnitValue(psName);
     215    Draw(fMapItr->second->GetMap(), colorMap,axflg);
     216  } else {
     217    G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl;
     218  }
    199219}
    200220
    201221void G4VScoringMesh::DrawMesh(G4String psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap)
    202222{
     223  fDrawPSName = psName;
    203224  std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName);
    204   if(fMapItr!=fMap.end())
    205   { DrawColumn(fMapItr->second->GetMap(),colorMap,idxPlane,iColumn); }
    206   else
    207   { G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; }
     225  if(fMapItr!=fMap.end()) {
     226    fDrawUnit = GetPSUnit(psName);
     227    fDrawUnitValue = GetPSUnitValue(psName);
     228    DrawColumn(fMapItr->second->GetMap(),colorMap,idxPlane,iColumn);
     229  } else {
     230    G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl;
     231  }
    208232}
    209233
Note: See TracChangeset for help on using the changeset viewer.