Ignore:
Timestamp:
Nov 3, 2009, 11:17:28 AM (15 years ago)
Author:
garnier
Message:

update to CVS

Location:
trunk/source/digits_hits/utils
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/digits_hits/utils/include/G4VScoringMesh.hh

    r998 r1140  
    2525//
    2626//
    27 // $Id: G4VScoringMesh.hh,v 1.27 2007/11/06 17:17:14 asaim Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4VScoringMesh.hh,v 1.29 2009/10/12 04:11:25 akimura Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030
     
    9494  // set size of this mesh
    9595  void SetSize(G4double size[3]);
     96  // get size of this mesh
     97  G4ThreeVector GetSize() const;
    9698  // set position of center of this mesh
    9799  void SetCenterPosition(G4double centerPosition[3]);
     100  // get position of center of this mesh
     101  G4ThreeVector GetTranslation() const {return fCenterPosition;}
    98102  // set a rotation angle around the x axis
    99103  void RotateX(G4double delta);
     
    102106  // set a rotation angle around the z axis
    103107  void RotateZ(G4double delta);
     108  // get a rotation matrix
     109  G4RotationMatrix GetRotationMatrix() const {
     110    if(fRotationMatrix) return *fRotationMatrix;
     111    else return G4RotationMatrix::IDENTITY;
     112  }
    104113  // set number of segments of this mesh
    105114  void SetNumberOfSegments(G4int nSegment[3]);
  • trunk/source/digits_hits/utils/src/G4ScoreLogColorMap.cc

    r998 r1140  
    2525//
    2626//
    27 // $Id: G4ScoreLogColorMap.cc,v 1.2 2008/03/25 04:06:08 akimura Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4ScoreLogColorMap.cc,v 1.3 2009/05/04 15:57:33 akimura Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030
    3131#include "G4ScoreLogColorMap.hh"
    3232#include <cmath>
     33#include <string>
     34#include <sstream>
     35#include <iomanip>
    3336
    3437
     
    152155    }
    153156    // text
    154     char cstring[80];
    155     std::sprintf(cstring, "%8.1e", std::pow(10., v));
    156     G4String value(cstring);
     157    //char cstring[80];
     158    //std::sprintf(cstring, "%8.1e", std::pow(10., v));
     159    //G4String value(cstring);
     160    std::ostringstream oss;
     161    oss << std::setw(8) << std::setprecision(1) << std::scientific << std::pow(10., v);
     162    std::string str = oss.str();
     163    G4String value(str.c_str());
    157164    G4Text text(value, G4Point3D(-0.9, -0.9+0.05*n, 0));
    158165    G4double size = 12.;
  • trunk/source/digits_hits/utils/src/G4VScoreColorMap.cc

    r998 r1140  
    2525//
    2626//
    27 // $Id: G4VScoreColorMap.cc,v 1.3 2008/02/14 10:45:12 akimura Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4VScoreColorMap.cc,v 1.4 2009/05/04 15:57:33 akimura Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030
    3131#include "G4VScoreColorMap.hh"
     32#include <string>
     33#include <sstream>
     34#include <iomanip>
    3235
    3336#include "G4VVisManager.hh"
     
    9497    }
    9598    // text
    96     char cstring[80];
    97     std::sprintf(cstring, "%8.2e", v);
    98     G4String value(cstring);
     99    //char cstring[80];
     100    //std::sprintf(cstring, "%8.2e", v);
     101    //G4String value(cstring);
     102    std::ostringstream oss;
     103    oss << std::setw(8) << std::setprecision(1) << std::scientific << v;
     104    std::string str = oss.str();
     105    G4String value(str.c_str());
     106
    99107    G4Text text(value, G4Point3D(-0.9, -0.9+0.05*n, 0));
    100108    G4double size = 12.;
  • trunk/source/digits_hits/utils/src/G4VScoringMesh.cc

    r998 r1140  
    2525//
    2626//
    27 // $Id: G4VScoringMesh.cc,v 1.35 2008/03/23 14:32:13 akimura Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4VScoringMesh.cc,v 1.37 2009/10/12 04:11:25 akimura Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030
     
    6363  for(int i = 0; i < 3; i++) fSize[i] = size[i];
    6464  sizeIsSet = true;
     65}
     66G4ThreeVector G4VScoringMesh::GetSize() const {
     67  if(sizeIsSet)
     68    return G4ThreeVector(fSize[0], fSize[1], fSize[2]);
     69  else
     70    return G4ThreeVector(0., 0., 0.);
    6571}
    6672void G4VScoringMesh::SetCenterPosition(G4double centerPosition[3]) {
Note: See TracChangeset for help on using the changeset viewer.