53 G4bool lmin =
true, lmax =
true, lval =
true;
94 G4double logmin = 0., logmax = 0., logval = 0.;
99 if(lmax) logmax = std::log10(
fMaxVal);
100 if(lval) logval = std::log10(val);
102 if(lmax) value = (logval-logmin)/(logmax-logmin);
104 if(value > 1.) {value=1.;}
105 if(value < 0.) {value=0.;}
108 const int NCOLOR = 6;
112 } colormap[] = {{0.0, {1., 1., 1., 1.}},
113 {0.2, {0., 0., 1., 1.}},
114 {0.4, {0., 1., 1., 1.}},
115 {0.6, {0., 1., 0., 1.}},
116 {0.8, {1., 1., 0., 1.}},
117 {1.0, {1., 0., 0., 1.}}};
120 G4int during[2] = {0, 0};
121 for(
int i = 1; i < NCOLOR; i++) {
122 if(colormap[i].val >= value) {
130 G4double a = std::fabs(value - colormap[during[0]].val);
131 G4double b = std::fabs(value - colormap[during[1]].val);
132 for(
int i = 0; i < 4; i++) {
133 color[i] = (b*colormap[during[0]].rgb[i] + a*colormap[during[1]].rgb[i])
134 /(colormap[during[1]].val - colormap[during[0]].val);
135 if(color[i] > 1.) color[i] = 1.;
144 G4bool lmin =
true, lmax =
true;
145 if(
fMinVal <= 0.) lmin =
false;
146 if(
fMaxVal <= 0.) lmax =
false;
148 if(lmin) min = std::log10(
fMinVal);
150 if(lmax) max = std::log10(
fMaxVal);
161 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == 0)
return;
162 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == -1.)
continue;
171 G4bool lmin =
true, lmax =
true;
172 if(
fMinVal <= 0.) lmin =
false;
173 if(
fMaxVal <= 0.) lmax =
false;
176 if(lmin) min = std::log10(
fMinVal);
181 if(lmax) max = std::log10(
fMaxVal);
187 for(
int n = 0;
n < _nPoint;
n++) {
192 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == 0)
return;
193 if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == -1.)
continue;
196 for(
int l = 0; l < 21; l++) {
198 line.push_back(
G4Point3D(-0.908, -0.905+0.05*
n+0.002*l, 0.));
199 line.push_back(
G4Point3D(-0.705, -0.905+0.05*
n+0.002*l, 0.));
208 std::ostringstream oss;
209 oss << std::setw(8) << std::setprecision(1) << std::scientific << std::pow(10., v);
210 std::string str = oss.str();
228 for(
int l = 0; l < 22; l++) {
230 line.push_back(
G4Point3D(-0.9, -0.965+0.002*l, 0.));
231 line.push_back(
G4Point3D(-0.9+0.025*lpsname, -0.965+0.002*l, 0.));
253 for(
int l = 0; l < 21; l++) {
255 line.push_back(
G4Point3D(-0.7, -0.9+0.002*l, 0.));
256 line.push_back(
G4Point3D(-0.7+0.3, -0.9+0.002*l, 0.));