53 G4bool lmin =
true, lmax =
true, lval =
true;
57 G4String message =
" The min. value (fMinVal) is negative. : ";
60 "DigiHitsUtilsScoreLogColorMap000",
JustWarning, message);
65 G4String message =
" The max. value (fMaxVal) is negative. : ";
68 "DigiHitsUtilsScoreLogColorMap001",
JustWarning, message);
82 G4String message =
" 'val' (first argument) is negative : ";
85 "DigiHitsUtilsScoreLogColorMap002",
JustWarning, message);
96 G4double logmin = 0., logmax = 0., logval = 0.;
107 logval = std::log10(val);
110 value = (logval - logmin) / (logmax - logmin);
122 const int NCOLOR = 6;
127 } colormap[] = { { 0.0, { 1., 1., 1., 1. } },
128 { 0.2, { 0., 0., 1., 1. } }, { 0.4, { 0., 1., 1., 1. } },
129 { 0.6, { 0., 1., 0., 1. } }, { 0.8, { 1., 1., 0., 1. } },
130 { 1.0, { 1., 0., 0., 1. } } };
133 G4int during[2] = { 0, 0 };
134 for(
int i = 1; i < NCOLOR; i++)
136 if(colormap[i].val >= value)
145 G4double a = std::fabs(value - colormap[during[0]].val);
146 G4double b = std::fabs(value - colormap[during[1]].val);
147 for(
int i = 0; i < 4; i++)
150 (b * colormap[during[0]].rgb[i] + a * colormap[during[1]].rgb[i]) /
151 (colormap[during[1]].val - colormap[during[0]].val);
160 G4bool lmin =
true, lmax =
true;
172 G4double smin = -0.89, smax = smin + 0.05 * (_nPoint) *0.83, step = 0.001;
174 for(
G4double y = smin; y < smax; y += step)
176 G4double ra = (y - smin) / (smax - smin), rb = 1. - ra;
182 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == 0)
184 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == -1.)
194 G4bool lmin =
true, lmax =
true;
214 for(
int n = 0;
n < _nPoint;
n++)
216 G4double a =
n / (_nPoint - 1.), b = 1. - a;
220 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == 0)
222 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == -1.)
226 for(
int l = 0; l < 21; l++)
229 line.push_back(
G4Point3D(-0.908, -0.905 + 0.05 *
n + 0.002 * l, 0.));
230 line.push_back(
G4Point3D(-0.705, -0.905 + 0.05 *
n + 0.002 * l, 0.));
239 std::ostringstream oss;
240 oss << std::setw(8) << std::setprecision(1) << std::scientific
242 std::string str = oss.str();
260 for(
int l = 0; l < 22; l++)
263 line.push_back(
G4Point3D(-0.9, -0.965 + 0.002 * l, 0.));
264 line.push_back(
G4Point3D(-0.9 + 0.025 * lpsname, -0.965 + 0.002 * l, 0.));
285 for(
int l = 0; l < 21; l++)
288 line.push_back(
G4Point3D(-0.7, -0.9 + 0.002 * l, 0.));
289 line.push_back(
G4Point3D(-0.7 + 0.3, -0.9 + 0.002 * l, 0.));
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
HepGeom::Point3D< G4double > G4Point3D
virtual void GetMapColor(G4double val, G4double color[4])
G4ScoreLogColorMap(G4String mName)
virtual ~G4ScoreLogColorMap()
virtual void DrawColorChartBar(G4int nPoint)
virtual void DrawColorChartText(G4int nPoint)
static G4String ConvertToString(G4bool boolVal)
void SetScreenSize(G4double)
G4VVisManager * fVisManager
virtual void Draw2D(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
void SetVisAttributes(const G4VisAttributes *)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments