| 147 | } |
| 148 | |
| 149 | void G4ScoreLogColorMap::DrawColorChartBar(G4int _nPoint) |
| 150 | { |
| 151 | G4bool lmin = true, lmax = true; |
| 152 | if(fMinVal <= 0.) |
| 153 | lmin = false; |
| 154 | if(fMaxVal <= 0.) |
| 155 | lmax = false; |
| 156 | G4double min = 0.; |
| 157 | if(lmin) |
| 158 | min = std::log10(fMinVal); |
| 159 | G4double max = 0.; |
| 160 | if(lmax) |
| 161 | max = std::log10(fMaxVal); |
| 162 | |
| 163 | G4double smin = -0.89, smax = smin + 0.05 * (_nPoint) *0.83, step = 0.001; |
| 164 | G4double c[4]; |
| 165 | for(auto y = smin; y < smax; y += step) |
| 166 | { |
| 167 | G4double ra = (y - smin) / (smax - smin), rb = 1. - ra; |
| 168 | G4Polyline line; |
| 169 | line.push_back(G4Point3D(-0.96, y, 0.)); |
| 170 | line.push_back(G4Point3D(-0.91, y, 0.)); |
| 171 | G4double val = std::pow(10., (ra * max + rb * min) / (ra + rb)); |
| 172 | this->GetMapColor(val, c); |
| 173 | if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == 0) |
| 174 | return; |
| 175 | if(c[0] == 0 && c[1] == 0 && c[2] == 0 && c[3] == -1.) |
| 176 | continue; |
| 177 | G4Colour col(c[0], c[1], c[2]); |
| 178 | G4VisAttributes att(col); |
| 179 | line.SetVisAttributes(&att); |
| 180 | fVisManager->Draw2D(line); |
| 181 | } |
| 182 | } |
| 183 | void G4ScoreLogColorMap::DrawColorChartText(G4int _nPoint) |
| 184 | { |
| 185 | G4bool lmin = true, lmax = true; |
nothing calls this directly
no test coverage detected