added a NPP, PPC switch and performed some clean-up
This commit is contained in:
@ -154,9 +154,11 @@ bool PFitter::DoFit()
|
|||||||
break;
|
break;
|
||||||
case PMN_MINOS:
|
case PMN_MINOS:
|
||||||
status = ExecuteMinos();
|
status = ExecuteMinos();
|
||||||
// set positive errors true
|
// set positive errors true if minos has been successfull
|
||||||
for (unsigned int i=0; i<fParams.size(); i++) {
|
if (status) {
|
||||||
fRunInfo->SetMsrParamPosErrorPresent(i, true);
|
for (unsigned int i=0; i<fParams.size(); i++) {
|
||||||
|
fRunInfo->SetMsrParamPosErrorPresent(i, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PMN_PLOT:
|
case PMN_PLOT:
|
||||||
@ -366,10 +368,12 @@ bool PFitter::ExecuteMigrad()
|
|||||||
ROOT::Minuit2::FunctionMinimum min = migrad(maxfcn, tolerance);
|
ROOT::Minuit2::FunctionMinimum min = migrad(maxfcn, tolerance);
|
||||||
if (!min.IsValid()) {
|
if (!min.IsValid()) {
|
||||||
cout << endl << "**WARNING**: PFitter::ExecuteMigrad(): Fit did not converge, sorry ...";
|
cout << endl << "**WARNING**: PFitter::ExecuteMigrad(): Fit did not converge, sorry ...";
|
||||||
|
/*
|
||||||
// set flag positive error present to false
|
// set flag positive error present to false
|
||||||
for (unsigned int i=0; i<fParams.size(); i++) {
|
for (unsigned int i=0; i<fParams.size(); i++) {
|
||||||
fRunInfo->SetMsrParamPosErrorPresent(i, false);
|
fRunInfo->SetMsrParamPosErrorPresent(i, false);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,10 +439,12 @@ bool PFitter::ExecuteMinimize()
|
|||||||
ROOT::Minuit2::FunctionMinimum min = minimize(maxfcn, tolerance);
|
ROOT::Minuit2::FunctionMinimum min = minimize(maxfcn, tolerance);
|
||||||
if (!min.IsValid()) {
|
if (!min.IsValid()) {
|
||||||
cout << endl << "**WARNING**: PFitter::ExecuteMinimize(): Fit did not converge, sorry ...";
|
cout << endl << "**WARNING**: PFitter::ExecuteMinimize(): Fit did not converge, sorry ...";
|
||||||
|
/*
|
||||||
// set flag positive error present to false
|
// set flag positive error present to false
|
||||||
for (unsigned int i=0; i<fParams.size(); i++) {
|
for (unsigned int i=0; i<fParams.size(); i++) {
|
||||||
fRunInfo->SetMsrParamPosErrorPresent(i, false);
|
fRunInfo->SetMsrParamPosErrorPresent(i, false);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ using namespace std;
|
|||||||
*/
|
*/
|
||||||
PFunction::PFunction(tree_parse_info<> info)
|
PFunction::PFunction(tree_parse_info<> info)
|
||||||
{
|
{
|
||||||
cout << endl << "in PFunction ...";
|
// cout << endl << "in PFunction ...";
|
||||||
|
|
||||||
fInfo = info;
|
fInfo = info;
|
||||||
|
|
||||||
@ -528,7 +528,7 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i)
|
|||||||
} else if (i->value.id() == PFunctionGrammar::termID) {
|
} else if (i->value.id() == PFunctionGrammar::termID) {
|
||||||
termOp++;
|
termOp++;
|
||||||
if (*i->value.begin() == '*') {
|
if (*i->value.begin() == '*') {
|
||||||
cout << endl << ">> i->children.size() = " << i->children.size() << endl;
|
//cout << endl << ">> i->children.size() = " << i->children.size() << endl;
|
||||||
assert(i->children.size() == 2);
|
assert(i->children.size() == 2);
|
||||||
EvalTreeForStringExpression(i->children.begin());
|
EvalTreeForStringExpression(i->children.begin());
|
||||||
fFuncString += " * ";
|
fFuncString += " * ";
|
||||||
|
@ -47,7 +47,7 @@ PFunctionHandler::PFunctionHandler(PMsrLines lines)
|
|||||||
fValid = true;
|
fValid = true;
|
||||||
fLines = lines;
|
fLines = lines;
|
||||||
|
|
||||||
cout << endl << "in PFunctionHandler(PMsrLines lines)";
|
// cout << endl << "in PFunctionHandler(PMsrLines lines)";
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
@ -59,7 +59,7 @@ PFunctionHandler::PFunctionHandler(PMsrLines lines)
|
|||||||
*/
|
*/
|
||||||
PFunctionHandler::~PFunctionHandler()
|
PFunctionHandler::~PFunctionHandler()
|
||||||
{
|
{
|
||||||
cout << endl << "in ~PFunctionHandler()" << endl << endl;
|
// cout << endl << "in ~PFunctionHandler()" << endl << endl;
|
||||||
|
|
||||||
fLines.clear();
|
fLines.clear();
|
||||||
fFuncs.clear();
|
fFuncs.clear();
|
||||||
@ -74,7 +74,7 @@ PFunctionHandler::~PFunctionHandler()
|
|||||||
*/
|
*/
|
||||||
bool PFunctionHandler::DoParse()
|
bool PFunctionHandler::DoParse()
|
||||||
{
|
{
|
||||||
cout << endl << "in PFunctionHandler::DoParse() ...";
|
// cout << endl << "in PFunctionHandler::DoParse() ...";
|
||||||
|
|
||||||
bool success = true;
|
bool success = true;
|
||||||
PFunctionGrammar function;
|
PFunctionGrammar function;
|
||||||
@ -82,7 +82,7 @@ bool PFunctionHandler::DoParse()
|
|||||||
|
|
||||||
// feed the function block into the parser. Start with i=1, since i=0 is FUNCTIONS
|
// feed the function block into the parser. Start with i=1, since i=0 is FUNCTIONS
|
||||||
for (unsigned int i=1; i<fLines.size(); i++) {
|
for (unsigned int i=1; i<fLines.size(); i++) {
|
||||||
cout << endl << "fLines[" << i << "] = '" << fLines[i].fLine.Data() << "'";
|
// cout << endl << "fLines[" << i << "] = '" << fLines[i].fLine.Data() << "'";
|
||||||
|
|
||||||
// function line to upper case
|
// function line to upper case
|
||||||
line = fLines[i].fLine;
|
line = fLines[i].fLine;
|
||||||
@ -92,7 +92,7 @@ cout << endl << "fLines[" << i << "] = '" << fLines[i].fLine.Data() << "'";
|
|||||||
tree_parse_info<> info = ast_parse(line.Data(), function, space_p);
|
tree_parse_info<> info = ast_parse(line.Data(), function, space_p);
|
||||||
|
|
||||||
if (info.full) {
|
if (info.full) {
|
||||||
cout << endl << "parse successful ..." << endl;
|
// cout << endl << "parse successful ..." << endl;
|
||||||
PFunction func(info);
|
PFunction func(info);
|
||||||
fFuncs.push_back(func);
|
fFuncs.push_back(func);
|
||||||
} else {
|
} else {
|
||||||
@ -115,10 +115,10 @@ cout << endl << "fLines[" << i << "] = '" << fLines[i].fLine.Data() << "'";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (success) {
|
// if (success) {
|
||||||
for (unsigned int i=0; i<fFuncs.size(); i++)
|
// for (unsigned int i=0; i<fFuncs.size(); i++)
|
||||||
cout << endl << "func number = " << fFuncs[i].GetFuncNo();
|
// cout << endl << "func number = " << fFuncs[i].GetFuncNo();
|
||||||
}
|
// }
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
@ -612,6 +612,7 @@ void PMusrCanvas::UpdateInfoPad()
|
|||||||
// energy if present
|
// energy if present
|
||||||
tstr += TString("E=");
|
tstr += TString("E=");
|
||||||
dval = fRunList->GetEnergy(runs[runNo].fRunName);
|
dval = fRunList->GetEnergy(runs[runNo].fRunName);
|
||||||
|
cout << endl << ">> dval = " << dval << " (Engery)";
|
||||||
if (dval == -9.9e99) {
|
if (dval == -9.9e99) {
|
||||||
tstr += TString("??,");
|
tstr += TString("??,");
|
||||||
} else {
|
} else {
|
||||||
|
@ -161,9 +161,9 @@ bool PRunDataHandler::ReadFile()
|
|||||||
return false;
|
return false;
|
||||||
// everything looks fine, hence try to read the data file
|
// everything looks fine, hence try to read the data file
|
||||||
if (!run_it->fFileFormat.CompareTo("root-npp")) // not post pile up corrected histos
|
if (!run_it->fFileFormat.CompareTo("root-npp")) // not post pile up corrected histos
|
||||||
success = ReadRootFile();
|
success = ReadRootFile(true);
|
||||||
else if (!run_it->fFileFormat.CompareTo("root-ppc")) // post pile up corrected histos
|
else if (!run_it->fFileFormat.CompareTo("root-ppc")) // post pile up corrected histos
|
||||||
success = ReadRootFile();
|
success = ReadRootFile(false);
|
||||||
else if (!run_it->fFileFormat.CompareTo("nexus"))
|
else if (!run_it->fFileFormat.CompareTo("nexus"))
|
||||||
success = ReadNexusFile();
|
success = ReadNexusFile();
|
||||||
else if (!run_it->fFileFormat.CompareTo("psi-bin"))
|
else if (!run_it->fFileFormat.CompareTo("psi-bin"))
|
||||||
@ -342,12 +342,15 @@ cout << endl << ">> generated path: " << str.Data() << endl;
|
|||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
|
* \param notPostPileup This flag is used as a switch between "Not Post Pileup Corrected"
|
||||||
|
* and "Post Pileup Corrected" histogramms.
|
||||||
*/
|
*/
|
||||||
bool PRunDataHandler::ReadRootFile()
|
bool PRunDataHandler::ReadRootFile(bool notPostPileup)
|
||||||
{
|
{
|
||||||
PDoubleVector histoData;
|
PDoubleVector histoData;
|
||||||
PRawRunData runData;
|
PRawRunData runData;
|
||||||
|
|
||||||
|
//cout << endl << ">> in ReadRootFile() ...";
|
||||||
TFile f(fRunPathName.Data());
|
TFile f(fRunPathName.Data());
|
||||||
if (f.IsZombie()) {
|
if (f.IsZombie()) {
|
||||||
return false;
|
return false;
|
||||||
@ -379,6 +382,7 @@ bool PRunDataHandler::ReadRootFile()
|
|||||||
|
|
||||||
// get implantation energy
|
// get implantation energy
|
||||||
runData.fEnergy = runHeader->GetImpEnergy();
|
runData.fEnergy = runHeader->GetImpEnergy();
|
||||||
|
//cout << endl << ">> runData.fEnergy = " << runData.fEnergy;
|
||||||
|
|
||||||
// get setup
|
// get setup
|
||||||
runData.fSetup = runHeader->GetLemSetup().GetString();
|
runData.fSetup = runHeader->GetLemSetup().GetString();
|
||||||
@ -408,38 +412,42 @@ bool PRunDataHandler::ReadRootFile()
|
|||||||
}
|
}
|
||||||
// get all the data
|
// get all the data
|
||||||
char histoName[32];
|
char histoName[32];
|
||||||
// read first the data which are NOT post pileup corrected
|
if (notPostPileup) { // read the data which are NOT post pileup corrected
|
||||||
for (int i=0; i<noOfHistos; i++) {
|
for (int i=0; i<noOfHistos; i++) {
|
||||||
sprintf(histoName, "hDecay%02d", i);
|
sprintf(histoName, "hDecay%02d", i);
|
||||||
TH1F *histo = dynamic_cast<TH1F*>(folder->FindObjectAny(histoName));
|
//cout << endl << ">> histoName = " << histoName;
|
||||||
if (!histo) {
|
TH1F *histo = dynamic_cast<TH1F*>(folder->FindObjectAny(histoName));
|
||||||
cout << endl << "PRunDataHandler::ReadRootFile: Couldn't get histo " << histoName;
|
if (!histo) {
|
||||||
return false;
|
cout << endl << "PRunDataHandler::ReadRootFile: Couldn't get histo " << histoName;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// fill data
|
||||||
|
for (int j=1; j<histo->GetNbinsX(); j++)
|
||||||
|
histoData.push_back(histo->GetBinContent(j));
|
||||||
|
// store them in runData vector
|
||||||
|
runData.fDataBin.push_back(histoData);
|
||||||
|
// clear histoData for the next histo
|
||||||
|
histoData.clear();
|
||||||
}
|
}
|
||||||
// fill data
|
} else { // read the data which ARE post pileup corrected
|
||||||
for (int j=1; j<histo->GetNbinsX(); j++)
|
for (int i=0; i<noOfHistos; i++) {
|
||||||
histoData.push_back(histo->GetBinContent(j));
|
sprintf(histoName, "hDecay%02d", i+POST_PILEUP_HISTO_OFFSET);
|
||||||
// store them in runData vector
|
//cout << endl << ">> histoName = " << histoName;
|
||||||
runData.fDataBin.push_back(histoData);
|
TH1F *histo = dynamic_cast<TH1F*>(folder->FindObjectAny(histoName));
|
||||||
// clear histoData for the next histo
|
if (!histo) {
|
||||||
histoData.clear();
|
cout << endl << "PRunDataHandler::ReadRootFile: Couldn't get histo " << histoName;
|
||||||
}
|
return false;
|
||||||
// now read the data which ARE post pileup corrected
|
}
|
||||||
for (int i=0; i<noOfHistos; i++) {
|
// fill data
|
||||||
sprintf(histoName, "hDecay%02d", i+POST_PILEUP_HISTO_OFFSET);
|
for (int j=1; j<histo->GetNbinsX(); j++)
|
||||||
TH1F *histo = dynamic_cast<TH1F*>(folder->FindObjectAny(histoName));
|
histoData.push_back(histo->GetBinContent(j));
|
||||||
if (!histo) {
|
// store them in runData vector
|
||||||
cout << endl << "PRunDataHandler::ReadRootFile: Couldn't get histo " << histoName;
|
runData.fDataBin.push_back(histoData);
|
||||||
return false;
|
// clear histoData for the next histo
|
||||||
|
histoData.clear();
|
||||||
}
|
}
|
||||||
// fill data
|
|
||||||
for (int j=1; j<histo->GetNbinsX(); j++)
|
|
||||||
histoData.push_back(histo->GetBinContent(j));
|
|
||||||
// store them in runData vector
|
|
||||||
runData.fDataBin.push_back(histoData);
|
|
||||||
// clear histoData for the next histo
|
|
||||||
histoData.clear();
|
|
||||||
}
|
}
|
||||||
|
//cout << endl;
|
||||||
|
|
||||||
f.Close();
|
f.Close();
|
||||||
|
|
||||||
|
@ -92,11 +92,11 @@ bool PRunListCollection::Add(int runNo, EPMusrHandleTag tag)
|
|||||||
{
|
{
|
||||||
bool success = true;
|
bool success = true;
|
||||||
|
|
||||||
PMsrRunStructure *runList = &(*fMsrInfo->GetMsrRunList())[runNo];
|
// PMsrRunStructure *runList = &(*fMsrInfo->GetMsrRunList())[runNo];
|
||||||
|
|
||||||
cout << endl << "PRunListCollection::Add(): will add run no " << runNo;
|
// cout << endl << "PRunListCollection::Add(): will add run no " << runNo;
|
||||||
cout << ", name = " << runList->fRunName.Data();
|
// cout << ", name = " << runList->fRunName.Data();
|
||||||
cout << ", type = " << runList->fFitType;
|
// cout << ", type = " << runList->fFitType;
|
||||||
|
|
||||||
int fitType = (*fMsrInfo->GetMsrRunList())[runNo].fFitType;
|
int fitType = (*fMsrInfo->GetMsrRunList())[runNo].fFitType;
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ PTheory::PTheory(PMsrHandler *msrInfo, unsigned int runNo, const bool hasParent)
|
|||||||
|
|
||||||
// if userFcn, the first entry is the function name and needs to be handled specially
|
// if userFcn, the first entry is the function name and needs to be handled specially
|
||||||
if ((fType == THEORY_USER_FCN) && ((i == 1) || (i == 2))) {
|
if ((fType == THEORY_USER_FCN) && ((i == 1) || (i == 2))) {
|
||||||
cout << endl << ">> userFcn: i=" << i << ", str=" << str.Data() << endl;
|
//cout << endl << ">> userFcn: i=" << i << ", str=" << str.Data() << endl;
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
fUserFcnSharedLibName = str;
|
fUserFcnSharedLibName = str;
|
||||||
}
|
}
|
||||||
@ -282,7 +282,7 @@ cout << endl << ">> userFcn: i=" << i << ", str=" << str.Data() << endl;
|
|||||||
// invoke user function object
|
// invoke user function object
|
||||||
fUserFcn = 0;
|
fUserFcn = 0;
|
||||||
fUserFcn = (PUserFcnBase*)TClass::GetClass(fUserFcnClassName.Data())->New();
|
fUserFcn = (PUserFcnBase*)TClass::GetClass(fUserFcnClassName.Data())->New();
|
||||||
cout << endl << ">> fUserFcn = " << fUserFcn << endl;
|
//cout << endl << ">> fUserFcn = " << fUserFcn << endl;
|
||||||
if (fUserFcn == 0) {
|
if (fUserFcn == 0) {
|
||||||
cout << endl << "**ERROR**: PTheory: user function object could not be invoked. See line no " << line->fLineNo;
|
cout << endl << "**ERROR**: PTheory: user function object could not be invoked. See line no " << line->fLineNo;
|
||||||
fValid = false;
|
fValid = false;
|
||||||
@ -690,7 +690,7 @@ void PTheory::MakeCleanAndTidyTheoryBlock(PMsrLines *fullTheoryBlock)
|
|||||||
str.Resize(index);
|
str.Resize(index);
|
||||||
// tokenize line
|
// tokenize line
|
||||||
tokens = str.Tokenize(" \t");
|
tokens = str.Tokenize(" \t");
|
||||||
cout << endl << ">> #tokens=" << tokens->GetEntries() << ", str=" << str.Data();
|
//cout << endl << ">> #tokens=" << tokens->GetEntries() << ", str=" << str.Data();
|
||||||
// make a handable string out of the asymmetry token
|
// make a handable string out of the asymmetry token
|
||||||
ostr = dynamic_cast<TObjString*>(tokens->At(0));
|
ostr = dynamic_cast<TObjString*>(tokens->At(0));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
@ -765,7 +765,7 @@ void PTheory::MakeCleanAndTidyPolynom(unsigned int i, PMsrLines *fullTheoryBlock
|
|||||||
TObjString *ostr;
|
TObjString *ostr;
|
||||||
char substr[256];
|
char substr[256];
|
||||||
|
|
||||||
cout << endl << ">> MakeCleanAndTidyPolynom: " << (*fullTheoryBlock)[i].fLine.Data();
|
//cout << endl << ">> MakeCleanAndTidyPolynom: " << (*fullTheoryBlock)[i].fLine.Data();
|
||||||
|
|
||||||
// init tidy
|
// init tidy
|
||||||
tidy = TString("polynom ");
|
tidy = TString("polynom ");
|
||||||
@ -811,7 +811,7 @@ void PTheory::MakeCleanAndTidyUserFcn(unsigned int i, PMsrLines *fullTheoryBlock
|
|||||||
TObjArray *tokens = 0;
|
TObjArray *tokens = 0;
|
||||||
TObjString *ostr;
|
TObjString *ostr;
|
||||||
|
|
||||||
cout << endl << ">> MakeCleanAndTidyUserFcn: " << (*fullTheoryBlock)[i].fLine.Data();
|
//cout << endl << ">> MakeCleanAndTidyUserFcn: " << (*fullTheoryBlock)[i].fLine.Data();
|
||||||
|
|
||||||
// init tidy
|
// init tidy
|
||||||
tidy = TString("userFcn ");
|
tidy = TString("userFcn ");
|
||||||
@ -1448,6 +1448,7 @@ double PTheory::Polynom(register double t, const PDoubleVector& paramValues, con
|
|||||||
*/
|
*/
|
||||||
double PTheory::UserFcn(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const
|
double PTheory::UserFcn(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
static bool first = true;
|
static bool first = true;
|
||||||
if (first) {
|
if (first) {
|
||||||
cout << endl << ">> UserFcn: fParamNo.size()=" << fParamNo.size() << ", fUserParam.size()=" << fUserParam.size();
|
cout << endl << ">> UserFcn: fParamNo.size()=" << fParamNo.size() << ", fUserParam.size()=" << fUserParam.size();
|
||||||
@ -1456,6 +1457,7 @@ if (first) {
|
|||||||
}
|
}
|
||||||
cout << endl;
|
cout << endl;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// check if FUNCTIONS are used
|
// check if FUNCTIONS are used
|
||||||
for (unsigned int i=0; i<fUserParam.size(); i++) {
|
for (unsigned int i=0; i<fUserParam.size(); i++) {
|
||||||
@ -1466,6 +1468,7 @@ if (first) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (first) {
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
for (unsigned int i=0; i<fUserParam.size(); i++) {
|
for (unsigned int i=0; i<fUserParam.size(); i++) {
|
||||||
@ -1475,6 +1478,6 @@ if (first) {
|
|||||||
cout << endl << ">> t=" << t << ", function value=" << (*fUserFcn)(t, fUserParam);
|
cout << endl << ">> t=" << t << ", function value=" << (*fUserFcn)(t, fUserParam);
|
||||||
cout << endl;
|
cout << endl;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return (*fUserFcn)(t, fUserParam);
|
return (*fUserFcn)(t, fUserParam);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ class PRunDataHandler
|
|||||||
virtual bool ReadFile();
|
virtual bool ReadFile();
|
||||||
virtual bool FileAlreadyRead(PMsrRunStructure &runInfo);
|
virtual bool FileAlreadyRead(PMsrRunStructure &runInfo);
|
||||||
virtual bool FileExistsCheck(PMsrRunStructure &runInfo);
|
virtual bool FileExistsCheck(PMsrRunStructure &runInfo);
|
||||||
virtual bool ReadRootFile();
|
virtual bool ReadRootFile(bool notPostPileup);
|
||||||
virtual bool ReadNexusFile();
|
virtual bool ReadNexusFile();
|
||||||
virtual bool ReadNemuFile();
|
virtual bool ReadNemuFile();
|
||||||
virtual bool ReadPsiBinFile();
|
virtual bool ReadPsiBinFile();
|
||||||
|
@ -505,6 +505,7 @@ void PMusrFourier::ApodizeData(int apodizationTag) {
|
|||||||
|
|
||||||
switch (apodizationTag) {
|
switch (apodizationTag) {
|
||||||
case F_APODIZATION_NONE:
|
case F_APODIZATION_NONE:
|
||||||
|
return;
|
||||||
break;
|
break;
|
||||||
case F_APODIZATION_WEAK:
|
case F_APODIZATION_WEAK:
|
||||||
c[0] = cweak[0]+cweak[1]+cweak[2];
|
c[0] = cweak[0]+cweak[1]+cweak[2];
|
||||||
|
@ -185,7 +185,7 @@ cout << endl << "#bins=" << histo->GetNbinsX();
|
|||||||
|
|
||||||
cout << endl << ">> Do you wish to apodize your data (y/n)? ";
|
cout << endl << ">> Do you wish to apodize your data (y/n)? ";
|
||||||
cin >> answer;
|
cin >> answer;
|
||||||
unsigned int apodizationTag=0;
|
unsigned int apodizationTag = F_APODIZATION_NONE;
|
||||||
if (strstr(answer, "y")) {
|
if (strstr(answer, "y")) {
|
||||||
cout << endl << ">> apodization (1=weak, 2=medium, 3=strong, 4=user) = ";
|
cout << endl << ">> apodization (1=weak, 2=medium, 3=strong, 4=user) = ";
|
||||||
cin >> apodizationTag;
|
cin >> apodizationTag;
|
||||||
|
@ -78,17 +78,17 @@ void minuit2test()
|
|||||||
// set parameters
|
// set parameters
|
||||||
gFitFcn->SetParNames("N0", "asym", "lambda", "B", "phase", "Bkg");
|
gFitFcn->SetParNames("N0", "asym", "lambda", "B", "phase", "Bkg");
|
||||||
gFitFcn->SetParameter(0, 30.0); // N0
|
gFitFcn->SetParameter(0, 30.0); // N0
|
||||||
// gFitFcn->SetParLimits(0, 0.0, 1.0e6);
|
gFitFcn->SetParLimits(0, 0.0, 1.0e6);
|
||||||
gFitFcn->SetParameter(1, 0.26); // asym
|
gFitFcn->SetParameter(1, 0.26); // asym
|
||||||
// gFitFcn->SetParLimits(1, 0.0, 0.33);
|
gFitFcn->SetParLimits(1, 0.0, 0.33);
|
||||||
gFitFcn->SetParameter(2, 0.3); // lambda
|
gFitFcn->SetParameter(2, 0.3); // lambda
|
||||||
// gFitFcn->SetParLimits(2, 0.0, 100.0);
|
gFitFcn->SetParLimits(2, 0.0, 100.0);
|
||||||
gFitFcn->SetParameter(3, 100.0); // B
|
gFitFcn->SetParameter(3, 100.0); // B
|
||||||
// gFitFcn->SetParLimits(3, 0.0, 1000.0);
|
gFitFcn->SetParLimits(3, 0.0, 1000.0);
|
||||||
gFitFcn->SetParameter(4, 0.0); // phase
|
gFitFcn->SetParameter(4, 0.0); // phase
|
||||||
// gFitFcn->SetParLimits(4, -90.0, 90.0);
|
gFitFcn->SetParLimits(4, -90.0, 90.0);
|
||||||
gFitFcn->SetParameter(5, 5.0); // Bkg
|
gFitFcn->SetParameter(5, 5.0); // Bkg
|
||||||
// gFitFcn->SetParLimits(5, 0.0, 1000.0);
|
gFitFcn->SetParLimits(5, 0.0, 1000.0);
|
||||||
|
|
||||||
cout << endl << "gFitFcn->Integral(0.0, 12.0) = " << gFitFcn->Integral(0.0, 12.0);
|
cout << endl << "gFitFcn->Integral(0.0, 12.0) = " << gFitFcn->Integral(0.0, 12.0);
|
||||||
cout << endl;
|
cout << endl;
|
||||||
@ -100,9 +100,13 @@ void minuit2test()
|
|||||||
|
|
||||||
histo->Draw();
|
histo->Draw();
|
||||||
|
|
||||||
gFitFcn->SetParameter(0, 150.0); // N0
|
gFitFcn->SetParameter(0, 1000.0); // N0
|
||||||
gFitFcn->SetParameter(5, 23.0); // Bkg
|
gFitFcn->SetParameter(1, 0.1); // asym
|
||||||
|
gFitFcn->SetParameter(2, 1.0); // lambda
|
||||||
|
gFitFcn->SetParameter(3, 50.0); // B
|
||||||
|
gFitFcn->SetParameter(4, 0.0); // phase
|
||||||
|
gFitFcn->SetParameter(5, 300.0); // Bkg
|
||||||
|
|
||||||
TVirtualFitter::SetDefaultFitter("Minuit2");
|
TVirtualFitter::SetDefaultFitter("Minuit2");
|
||||||
histo->Fit("gFitFcn", "L"); // L->likleyhood, E->minos
|
histo->Fit("gFitFcn", ""); // L->likleyhood, E->minos
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user