Import Geant4 9.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:15:05 +02:00
parent b79225fb37
commit 74cad5e589
3877 changed files with 234205 additions and 167127 deletions
@@ -24,12 +24,15 @@
// ********************************************************************
//
//
// $Id: G4ScoreLogColorMap.cc,v 1.2 2008/03/25 04:06:08 akimura Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ScoreLogColorMap.cc,v 1.3 2009/05/04 15:57:33 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
#include "G4ScoreLogColorMap.hh"
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include "G4VVisManager.hh"
@@ -151,9 +154,13 @@ void G4ScoreLogColorMap::DrawColorChartText(G4int _nPoint) {
fVisManager->Draw2D(line);
}
// text
char cstring[80];
std::sprintf(cstring, "%8.1e", std::pow(10., v));
G4String value(cstring);
//char cstring[80];
//std::sprintf(cstring, "%8.1e", std::pow(10., v));
//G4String value(cstring);
std::ostringstream oss;
oss << std::setw(8) << std::setprecision(1) << std::scientific << std::pow(10., v);
std::string str = oss.str();
G4String value(str.c_str());
G4Text text(value, G4Point3D(-0.9, -0.9+0.05*n, 0));
G4double size = 12.;
text.SetScreenSize(size);
@@ -24,11 +24,14 @@
// ********************************************************************
//
//
// $Id: G4VScoreColorMap.cc,v 1.3 2008/02/14 10:45:12 akimura Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VScoreColorMap.cc,v 1.4 2009/05/04 15:57:33 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
#include "G4VScoreColorMap.hh"
#include <string>
#include <sstream>
#include <iomanip>
#include "G4VVisManager.hh"
#include "G4VisAttributes.hh"
@@ -93,9 +96,14 @@ void G4VScoreColorMap::DrawColorChartText(G4int _nPoint) {
fVisManager->Draw2D(line);
}
// text
char cstring[80];
std::sprintf(cstring, "%8.2e", v);
G4String value(cstring);
//char cstring[80];
//std::sprintf(cstring, "%8.2e", v);
//G4String value(cstring);
std::ostringstream oss;
oss << std::setw(8) << std::setprecision(1) << std::scientific << v;
std::string str = oss.str();
G4String value(str.c_str());
G4Text text(value, G4Point3D(-0.9, -0.9+0.05*n, 0));
G4double size = 12.;
text.SetScreenSize(size);
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VScoringMesh.cc,v 1.35 2008/03/23 14:32:13 akimura Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VScoringMesh.cc,v 1.37 2009/10/12 04:11:25 akimura Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
#include "G4VScoringMesh.hh"
@@ -63,6 +63,12 @@ void G4VScoringMesh::SetSize(G4double size[3]) {
for(int i = 0; i < 3; i++) fSize[i] = size[i];
sizeIsSet = true;
}
G4ThreeVector G4VScoringMesh::GetSize() const {
if(sizeIsSet)
return G4ThreeVector(fSize[0], fSize[1], fSize[2]);
else
return G4ThreeVector(0., 0., 0.);
}
void G4VScoringMesh::SetCenterPosition(G4double centerPosition[3]) {
fCenterPosition = G4ThreeVector(centerPosition[0], centerPosition[1], centerPosition[2]);
}