@@ -246,17 +246,17 @@ std::string ObserverParticleIdVeto::getDescription() const {
246
246
ObserverTimeEvolution::ObserverTimeEvolution () {}
247
247
248
248
ObserverTimeEvolution::ObserverTimeEvolution (double min, double dist, double numb) {
249
+ setIsLogarithmicScaling (false );
249
250
setMaximum (min + (numb - 1 ) * dist);
250
251
setMinimum (min);
251
252
setNIntervals (numb);
252
- setIsLogarithmicScaling (false );
253
253
}
254
254
255
255
ObserverTimeEvolution::ObserverTimeEvolution (double min, double max, double numb, bool log) {
256
+ setIsLogarithmicScaling (log);
256
257
setMinimum (min);
257
258
setMaximum (max);
258
259
setNIntervals (numb);
259
- setIsLogarithmicScaling (log);
260
260
}
261
261
262
262
ObserverTimeEvolution::ObserverTimeEvolution (const std::vector<double > &detList){
@@ -335,7 +335,7 @@ void ObserverTimeEvolution::addTimeRange(double min, double max, double numb, bo
335
335
if (log) {
336
336
if ( min <= 0 ){
337
337
std::cout << " min can not be <= 0 if log=true" << std::endl;
338
- throw new std::invalid_argument (" min can not be <= 0 if log=true" );
338
+ throw new std::runtime_error (" min can not be <= 0 if log=true" );
339
339
}
340
340
addTime (min * pow (max / min, i / (numb - 1.0 )));
341
341
} else {
@@ -355,9 +355,9 @@ void ObserverTimeEvolution::setTimes(const std::vector<double> &detList){
355
355
}
356
356
357
357
void ObserverTimeEvolution::setMinimum (double min){
358
- if ( min <= 0 ){
358
+ if ( ( min <= 0 ) && isLogarithmicScaling ){
359
359
std::cout << " minimum can not be <= 0 if isLogarithmicScaling=true" << std::endl;
360
- throw new std::invalid_argument (" minimum can not be <= 0 if isLogarithmicScaling=true" );
360
+ throw new std::runtime_error (" minimum can not be <= 0 if isLogarithmicScaling=true" );
361
361
}
362
362
this ->minimum = min;
363
363
}
0 commit comments