changed compiler optimization flag, and added an additional function value check

This commit is contained in:
nemu 2009-04-09 14:00:25 +00:00
parent 33a6a88c79
commit ef87d3983e
3 changed files with 5 additions and 4 deletions

View File

@ -42,7 +42,8 @@ endif
# -- Linux
ifeq ($(OS),LINUX)
CXX = g++
CXXFLAGS = -O3 -Wall -Wno-trigraphs -fPIC
#CXXFLAGS = -O3 -Wall -Wno-trigraphs -fPIC
CXXFLAGS = -O1 -Wall -Wno-trigraphs -fPIC
PMUSRPATH = ../include
MNPATH = $(ROOTSYS)/include
GSLPATH = /usr/include/gsl

View File

@ -930,7 +930,7 @@ bool PRunAsymmetry::PrepareViewData(PRawRunData* runData, unsigned int histoNo[2
for (unsigned int i=0; i<size; i++) {
time = startTime + (double)i*fTimeResolution;
value = fTheory->Func(time, par, fFuncValues);
if (value > 10.0) { // dirty hack needs to be fixed!!
if (fabs(value) > 10.0) { // dirty hack needs to be fixed!!
value = 0.0;
}
fData.fTheory.push_back(value);

View File

@ -668,7 +668,7 @@ cout << endl << ">> data start time = " << fData.fDataTimeStart;
for (unsigned int i=0; i<size; i++) {
time = fData.fTheoryTimeStart + i*fTimeResolution;
theoryValue = fTheory->Func(time, par, fFuncValues);
if (theoryValue > 10.0) { // dirty hack needs to be fixed!!
if (fabs(theoryValue) > 10.0) { // dirty hack needs to be fixed!!
theoryValue = 0.0;
}
fData.fTheory.push_back(N0*TMath::Exp(-time/tau)*(1+theoryValue)+bkg);
@ -823,7 +823,7 @@ cout << endl << "--------------------------------";
for (unsigned int i=0; i<size; i++) {
time = fData.fTheoryTimeStart + (double)i*fTimeResolution;
theoryValue = fTheory->Func(time, par, fFuncValues);
if (theoryValue > 10.0) { // dirty hack needs to be fixed!!
if (fabs(theoryValue) > 10.0) { // dirty hack needs to be fixed!!
theoryValue = 0.0;
}
fData.fTheory.push_back(theoryValue);