Index: trunk/src/LauResultsExtractor.cc =================================================================== --- trunk/src/LauResultsExtractor.cc (revision 563) +++ trunk/src/LauResultsExtractor.cc (revision 564) @@ -1,295 +1,292 @@ /* Copyright 2005 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ #include "LauResultsExtractor.hh" #include #include #include #include #include #include "TChain.h" #include "TFile.h" #include "TH1.h" #include "TLeaf.h" #include "TObjArray.h" #include "TSystem.h" -using std::cout; -using std::cerr; -using std::flush; -using std::endl; -using std::vector; -using std::map; -using std::pair; -using std::ofstream; +ClassImp(LauResultsExtractor) -ResultsExtractor::ResultsExtractor(const TString& inputFileName, const TString& outputFileName, const TString& treeName) : + +LauResultsExtractor::LauResultsExtractor(const TString& inputFileName, const TString& outputFileName, const TString& treeName) : inputFileName_(inputFileName), outputFileName_(outputFileName), treeName_(treeName), inputTree_(0), outputFile_(0), outputTree_(0), nEntries_(0) { } -ResultsExtractor::~ResultsExtractor() +LauResultsExtractor::~LauResultsExtractor() { this->clearMaps(); delete inputTree_; inputTree_ = 0; if (outputFile_ && outputFile_->IsOpen()) { delete outputTree_; outputTree_ = 0; } delete outputFile_; outputFile_ = 0; } -void ResultsExtractor::setupInputTree() +void LauResultsExtractor::setupInputTree() { TObjArray* leaves = inputTree_->GetListOfLeaves(); Int_t nLeaves = leaves->GetEntries(); - cout<<"Setting branches for input tree \""<GetName()<<"\" with "<GetName()<<"\" with "<SetBranchAddress("iExpt",&iExpt_); inputTree_->SetBranchAddress("fitStatus",&fitStatus_); inputTree_->SetBranchAddress("NLL",&NLL_); + inputTree_->SetBranchAddress("EDM",&EDM_); for (Int_t iLeaf(3); iLeaf((*leaves)[iLeaf]); TString type = leaf->GetTypeName(); TString name = leaf->GetName(); Int_t size = leaf->GetNdata(); if ((type != "Double_t") || (size != 1)) { continue; } std::pair::iterator,bool> result = otherVars_.insert(std::make_pair(name,0.0)); std::map::iterator iter = result.first; bool ok = result.second; if (ok) { inputTree_->SetBranchAddress(name,&(iter->second)); } } - cout<<"Set branch addresses for "<GetName()<<"\"..."<GetName()<<"\"..."<Branch("iExpt",&iExpt_,"iExpt/I"); tree->Branch("fitStatus",&fitStatus_,"fitStatus/I"); tree->Branch("NLL",&NLL_,"NLL/D"); + tree->Branch("EDM",&EDM_,"EDM/D"); for (std::map::iterator iter = otherVars_.begin(); iter != otherVars_.end(); ++iter) { TString name = iter->first; Double_t * address = &(iter->second); TString thirdBit = name; thirdBit += "/D"; tree->Branch(name,address,thirdBit); } - cout<<"Created "<SetBranchStatus("iExpt",kTRUE); inputTree_->SetBranchStatus("fitStatus",kTRUE); inputTree_->SetBranchStatus("NLL",kTRUE); + inputTree_->SetBranchStatus("EDM",kTRUE); for (std::map::iterator iter = otherVars_.begin(); iter != otherVars_.end(); ++iter) { TString name = iter->first; inputTree_->SetBranchStatus(name,status); } } -void ResultsExtractor::clearMaps() +void LauResultsExtractor::clearMaps() { - for (map::iterator iter = nllHistos_.begin(); iter != nllHistos_.end(); ++iter) { + for (std::map::iterator iter = nllHistos_.begin(); iter != nllHistos_.end(); ++iter) { delete (iter->second); } bestNLL_.clear(); worstNLL_.clear(); allNLLs_.clear(); nllHistos_.clear(); } -void ResultsExtractor::process(Int_t numExpts) +void LauResultsExtractor::process(Int_t numExpts) { // open the text file - cout << "\n" << "Chaining...\n" << endl; + std::cout << "\n" << "Chaining...\n" << std::endl; std::ifstream textFile(inputFileName_, std::ios::in); if (!textFile.good()) { - cerr<<"Problem opening file: \""<Exit(EXIT_FAILURE); } if (inputTree_) { delete inputTree_; inputTree_ = 0; } inputTree_ = new TChain(treeName_); // Read the text file and add each valid entry to the chain TString inputFileName = ""; while(inputFileName.ReadLine(textFile) && (!inputFileName.IsNull())) { if (inputFileName.EndsWith(".root") && !inputFileName.BeginsWith("#")) { - cout << inputFileName << endl; + std::cout << inputFileName << std::endl; inputTree_->Add(inputFileName); } else { - cout << inputFileName << "\t *** Skipped ***" << endl; + std::cout << inputFileName << "\t *** Skipped ***" << std::endl; } } textFile.close(); - cout << "\n" << "... finished.\n" << endl; + std::cout << "\n" << "... finished.\n" << std::endl; nEntries_ = inputTree_->GetEntries(); this->setupInputTree(); outputTree_ = new TTree(treeName_,""); this->setupOutputTree(outputTree_); // setup the map: // for each experiment there is a pair object holding // the best NLL and the tree entry for that NLL value // each expt starts out with NLL = 0.0 and entry = -1 - cout<<"Setting up the map..."<clearMaps(); for (Int_t i(0); i())); + allNLLs_.insert(std::make_pair(i, std::vector())); allNLLs_[i].reserve(nEntries_); } - cout<<" done.\n"<setInputTreeBranchStatus(kFALSE); // loop over the tree and store the best entries for each expt - cout<<"Starting to store best entry info..."<GetEntry(j); if ( (fitStatus_ == 3) && (NLL_ > -DBL_MAX/10.0) ) { allNLLs_[iExpt_].push_back(NLL_); Double_t curBestNLL = bestNLL_[iExpt_].first; Int_t curBestEntry = bestNLL_[iExpt_].second; if ((NLL_ < curBestNLL) || (curBestEntry == -1)) { bestNLL_[iExpt_] = std::make_pair(NLL_,j); } Double_t curWorstNLL = worstNLL_[iExpt_].first; Int_t curWorstEntry = worstNLL_[iExpt_].second; if ((NLL_ > curWorstNLL) || (curWorstEntry == -1)) { worstNLL_[iExpt_] = std::make_pair(NLL_,j); } } } - cout<<"Finished storing best entry info.\n"<::const_iterator iter = allNLLs_[i].begin(); iter != allNLLs_[i].end(); ++iter) { + for (std::vector::const_iterator iter = allNLLs_[i].begin(); iter != allNLLs_[i].end(); ++iter) { histo->Fill(*iter); } nllHistos_.insert(std::make_pair(i, histo)); } - cout<<" done.\n"<setInputTreeBranchStatus(kTRUE); std::ofstream fout("best-fit.txt"); // loop over the experiments, grab the best entry and store it - cout<<"Starting to retrieve best entries and fill output tree."<GetEntry(bestEntry); outputTree_->Fill(); } if ((numExpts<100) || (i%(numExpts/100)==0)) { - cout<<"Writing out experiment "<GetCurrentFile()->GetName()); bestFit.Remove(0,3); Int_t index = bestFit.Index("_"); if ( index < 1 ) { index = bestFit.Index("."); } bestFit.Remove(index); - fout<<"Experiment "<writeFile(); } -void ResultsExtractor::writeFile() +void LauResultsExtractor::writeFile() { if (!outputFile_) { outputFile_ = new TFile(outputFileName_,"recreate"); } - for (map::iterator iter = nllHistos_.begin(); iter != nllHistos_.end(); ++iter) { + for (std::map::iterator iter = nllHistos_.begin(); iter != nllHistos_.end(); ++iter) { (iter->second)->SetDirectory(outputFile_); } outputTree_->SetDirectory(outputFile_); outputFile_->Write(); outputFile_->Close(); delete outputFile_; outputFile_ = 0; nllHistos_.clear(); } Index: trunk/src/LauPolarFormFactorNR.cc =================================================================== --- trunk/src/LauPolarFormFactorNR.cc (revision 563) +++ trunk/src/LauPolarFormFactorNR.cc (revision 564) @@ -1,148 +1,148 @@ /* -Copyright 2004 University of Warwick +Copyright 2018 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ -/*! \file LauBelleNR.cc - \brief File containing implementation of LauBelleNR class. +/*! \file LauPolarFormFactorNR.cc + \brief File containing implementation of LauPolarFormFactorNR class. */ #include #include "TMath.h" #include "LauConstants.hh" #include "LauPolarFormFactorNR.hh" #include "LauDaughters.hh" #include "LauParameter.hh" #include "LauResonanceInfo.hh" ClassImp(LauPolarFormFactorNR) LauPolarFormFactorNR::LauPolarFormFactorNR(LauResonanceInfo* resInfo, const LauAbsResonance::LauResonanceModel resType, const Int_t resPairAmpInt, const LauDaughters* daughters) : LauAbsResonance(resInfo, resPairAmpInt, daughters), lambda_(0), model_(resType) { TString parName = this->getSanitisedName(); parName += "_lambda"; lambda_ = resInfo->getExtraParameter( parName ); if ( lambda_ == 0 ) { lambda_ = new LauParameter( parName, 1.0, 0.0, 10.0, kTRUE ); lambda_->secondStage(kTRUE); resInfo->addExtraParameter( lambda_ ); } } LauPolarFormFactorNR::~LauPolarFormFactorNR() { } void LauPolarFormFactorNR::initialise() { const LauDaughters* daughters = this->getDaughters(); Int_t resPairAmpInt = this->getPairInt(); if ( daughters->gotSymmetricalDP() && resPairAmpInt != 3 ) { std::cerr << "WARNING in LauPolarFormFactorNR::initialise : Dalitz plot is symmetric - this lineshape is not appropriate." << std::endl; } if ( model_ != LauAbsResonance::PolarFFNR) { std::cerr << "WARNING in LauPolarFormFactorNR::initialise : Unknown model requested, defaulting to Polar Form Factor." << std::endl; model_ = LauAbsResonance::PolarFFNR; } } LauComplex LauPolarFormFactorNR::resAmp(Double_t mass, Double_t) { Double_t magnitude(1.0); Double_t lambda = this->getLambda(); magnitude = 1.0/(1.0 + mass*mass /(lambda*lambda)); LauComplex resAmplitude(magnitude, 0.0); return resAmplitude; } const std::vector& LauPolarFormFactorNR::getFloatingParameters() { this->clearFloatingParameters(); if ( ! this->fixLambda() ) { this->addFloatingParameter( lambda_ ); } return this->getParameters(); } void LauPolarFormFactorNR::setResonanceParameter(const TString& name, const Double_t value) { // Set various parameters for the lineshape if (name == "lambda") { this->setLambda(value); std::cout << "INFO in LauPolarFormFactorNR::setResonanceParameter : Setting parameter lambda = " << this->getLambda() << std::endl; } else { std::cerr << "WARNING in LauPolarFormFactorNR::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl; } } void LauPolarFormFactorNR::floatResonanceParameter(const TString& name) { if (name == "lambda") { if ( lambda_->fixed() ) { lambda_->fixed( kFALSE ); this->addFloatingParameter( lambda_ ); } else { std::cerr << "WARNING in LauPolarFormFactorNR::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else { std::cerr << "WARNING in LauPolarFormFactorNR::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl; } } LauParameter* LauPolarFormFactorNR::getResonanceParameter(const TString& name) { if (name == "lambda") { return lambda_; } else { std::cerr << "WARNING in LauPolarFormFactorNR::getResonanceParameter: Parameter name not reconised." << std::endl; return 0; } } void LauPolarFormFactorNR::setLambda(const Double_t lambda) { lambda_->value( lambda ); lambda_->genValue( lambda ); lambda_->initValue( lambda ); } Index: trunk/src/LauRescatteringRes.cc =================================================================== --- trunk/src/LauRescatteringRes.cc (revision 563) +++ trunk/src/LauRescatteringRes.cc (revision 564) @@ -1,466 +1,454 @@ /* -Copyright 2008 University of Warwick +Copyright 2018 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauRescatteringRes.cc \brief File containing implementation of LauRescatteringRes class. */ #include #include "TMath.h" #include "TSystem.h" #include "LauConstants.hh" #include "LauRescatteringRes.hh" #include "LauDaughters.hh" #include "LauParameter.hh" #include "LauResonanceInfo.hh" ClassImp(LauRescatteringRes) LauRescatteringRes::LauRescatteringRes(LauResonanceInfo* resInfo, const LauAbsResonance::LauResonanceModel resType, const Int_t resPairAmpInt, const LauDaughters* daughters) : LauAbsResonance(resInfo, resPairAmpInt, daughters), lambdaPiPi_(0), lambdaKK_(0), Mf_(0), Ms_(0), Mprime_(0), Eps1_(0), Eps2_(0), C0_(0), - type_(0), model_(resType) { TString parNameBase = this->getSanitisedName(); TString lambdaPiPiName(parNameBase); lambdaPiPiName += "_lambdaPiPi"; lambdaPiPi_ = resInfo->getExtraParameter( lambdaPiPiName ); if ( lambdaPiPi_ == 0 ) { lambdaPiPi_ = new LauParameter( lambdaPiPiName, 1.0, 0.0, 10.0, kTRUE ); lambdaPiPi_->secondStage(kTRUE); resInfo->addExtraParameter( lambdaPiPi_ ); } TString lambdaKKName(parNameBase); lambdaKKName += "_lambdaKK"; lambdaKK_ = resInfo->getExtraParameter( lambdaKKName ); if ( lambdaKK_ == 0 ) { lambdaKK_ = new LauParameter( lambdaKKName, 2.8, 0.0, 10.0, kTRUE ); lambdaKK_->secondStage(kTRUE); resInfo->addExtraParameter( lambdaKK_ ); } TString MfName(parNameBase); MfName += "_Mf"; Mf_ = resInfo->getExtraParameter( MfName ); if ( Mf_ == 0 ) { Mf_ = new LauParameter( MfName, 1.32, 0.0, 10.0, kTRUE ); Mf_->secondStage(kTRUE); resInfo->addExtraParameter( Mf_ ); } TString MsName(parNameBase); MsName += "_Ms"; Ms_ = resInfo->getExtraParameter( MsName ); if ( Ms_ == 0 ) { Ms_ = new LauParameter( MsName, 0.92, 0.0, 10.0, kTRUE ); Ms_->secondStage(kTRUE); resInfo->addExtraParameter( Ms_ ); } TString MprimeName(parNameBase); MprimeName += "_Mprime"; Mprime_ = resInfo->getExtraParameter( MprimeName ); if ( Mprime_ == 0 ) { Mprime_ = new LauParameter( MprimeName, 1.5, 0.0, 10.0, kTRUE ); Mprime_->secondStage(kTRUE); resInfo->addExtraParameter( Mprime_ ); } TString Eps1Name(parNameBase); Eps1Name += "_Eps1"; Eps1_ = resInfo->getExtraParameter( Eps1Name ); if ( Eps1_ == 0 ) { Eps1_ = new LauParameter( Eps1Name, 2.4, 0.0, 10.0, kTRUE ); Eps1_->secondStage(kTRUE); resInfo->addExtraParameter( Eps1_ ); } TString Eps2Name(parNameBase); Eps2Name += "_Eps2"; Eps2_ = resInfo->getExtraParameter( Eps2Name ); if ( Eps2_ == 0 ) { Eps2_ = new LauParameter( Eps2Name, -5.5, -10.0, 10.0, kTRUE ); Eps2_->secondStage(kTRUE); resInfo->addExtraParameter( Eps2_ ); } TString C0Name(parNameBase); C0Name += "_C0"; C0_ = resInfo->getExtraParameter( C0Name ); if ( C0_ == 0 ) { C0_ = new LauParameter( C0Name, 1.3, 0.0, 10.0, kTRUE ); C0_->secondStage(kTRUE); resInfo->addExtraParameter( C0_ ); } } LauRescatteringRes::~LauRescatteringRes() { - delete lambdaPiPi_; - delete lambdaKK_; - delete Mf_; - delete Ms_; - delete Mprime_; - delete Eps1_; - delete Eps2_; - delete C0_; } void LauRescatteringRes::initialise() { - - const LauDaughters* daughters = this->getDaughters(); Int_t resPairAmpInt = this->getPairInt(); if ( daughters->gotSymmetricalDP() && resPairAmpInt != 3 ) { std::cerr << "WARNING in LauRescatteringRes::initialise : Dalitz plot is symmetric - this lineshape is not appropriate." << std::endl; std::cerr << "WARNING I think that this warning is not appropiate because Laura Simetrize at LauIsobarModel level." << std::endl; } if ( (model_ != LauAbsResonance::Rescattering) && (model_ != LauAbsResonance::RescatteringNoInter)) { std::cerr << "WARNING in LauRescatteringRes::initialise : Unknown model requested, defaulting to exponential." << std::endl; model_ = LauAbsResonance::Rescattering; } if ( (model_ != LauAbsResonance::RescatteringNoInter) && (this->getSpin() != 0) ) { std::cerr << "WARNING in LauRescatteringRes::initialise : Non-zero spin will be ignored for this model - perhaps you should use LauAbsResonance::BelleSymNRNoInter instead" << std::endl; } } LauComplex LauRescatteringRes::amplitude(const LauKinematics* kinematics) { // This function returns the complex dynamical amplitude for a Reescatering distribution o original // pelaez paper parameters Eq 2.15a [Pelaez et Yndúrain: arXiv:hep-ph/0411334v2 Mar 2005] Double_t Mprime = this->getMprime(); Double_t Mf = this->getMf(); Double_t Ms = this->getMs(); Double_t eps1 = this->getEps1(); Double_t eps2 = this->getEps2(); Double_t c0 = this->getC0(); Double_t lambPiPi = this->getLambdaPiPi(); Double_t lambKK = this->getLambdaKK(); Double_t mk = LauConstants::mK; // Calculate Mandelstam variables: s = m_13^2, t = m_23^2, u = m_12^2. Double_t s = 0; Double_t t = 0; Int_t resPairAmpInt = getPairInt(); if (resPairAmpInt == 1) { s = kinematics->getm23Sq(); t = kinematics->getm12Sq(); } else if (resPairAmpInt == 2) { s = kinematics->getm13Sq(); t = kinematics->getm23Sq(); } else if (resPairAmpInt == 3) { s = kinematics->getm12Sq(); t = kinematics->getm13Sq(); } else { std::cerr << "ERROR in LauAbsResonance::amplitude : Nonsense setup of resPairAmp array." << std::endl; gSystem->Exit(EXIT_FAILURE); } // Calculate amplitude for s variable. Double_t mass_s = TMath::Sqrt(s); Double_t k2Square_s = (s - 4.0*mk*mk)/4.0; Double_t k2Abs_s=0; if (k2Square_s > 0) k2Abs_s = TMath::Sqrt(k2Square_s); else k2Abs_s = TMath::Sqrt(-1.0*k2Square_s); Double_t cotdelta0_s = c0*(s - Ms*Ms)*(Mf*Mf - s)*k2Abs_s/(Mf*Mf*mass_s*k2Square_s); // Eq 2.15a Double_t delta0_s = TMath::ATan(1.0/cotdelta0_s); Double_t eta0_s = 1.0 - (eps1*k2Abs_s/mass_s + eps2*k2Square_s/s)*(Mprime*Mprime-s)/s; // Eq 2.15a if ((mass_s < 2.0*mk)||(mass_s > Mprime )) eta0_s = 1; Double_t mag_s = TMath::Sqrt( 1-eta0_s*eta0_s); Double_t tauRe_s = mag_s*TMath::Cos(2.0*delta0_s); Double_t tauIm_s = mag_s*TMath::Sin(2.0*delta0_s); Double_t NR1_s = 1.0/(1.0+s/(lambPiPi*lambPiPi)); Double_t NR2_s = 1.0/(1.0+s/(lambKK*lambKK)); //LauComplex resAmplitude(-tauIm_s*NR1_s*NR2_s - tauIm_t*NR1_t*NR2_t, tauRe_s*NR1_s*NR2_s + tauRe_t*NR1_t*NR2_t ); if ((model_ == LauAbsResonance::RescatteringNoInter)&&(t<=s)) { NR1_s=0.0; NR2_s=0.0; tauRe_s=0.0; tauIm_s=0.0; } LauComplex resAmplitude(-tauIm_s*NR1_s*NR2_s ,tauRe_s*NR1_s*NR2_s); return resAmplitude; - } LauComplex LauRescatteringRes::resAmp(Double_t mass, Double_t spinTerm) { std::cerr << "ERROR in LauRescatteringRes : This method should never be called." << std::endl; std::cerr << " : Returning zero amplitude for mass = " << mass << " and spinTerm = " << spinTerm << "." << std::endl; return LauComplex(0.0, 0.0); } const std::vector& LauRescatteringRes::getFloatingParameters() { this->clearFloatingParameters(); if ( ! this->fixLambdaPiPi() ) { this->addFloatingParameter( lambdaPiPi_ ); } if ( ! this->fixLambdaKK() ) { this->addFloatingParameter( lambdaKK_ ); } if ( ! this->fixMf() ) { this->addFloatingParameter( Mf_ ); } if ( ! this->fixMs() ) { this->addFloatingParameter( Ms_ ); } if ( ! this->fixMprime() ) { this->addFloatingParameter( Mprime_ ); } if ( ! this->fixEps1() ) { this->addFloatingParameter( Eps1_ ); } if ( ! this->fixEps2() ) { this->addFloatingParameter( Eps2_ ); } if ( ! this->fixC0() ) { this->addFloatingParameter( C0_ ); } return this->getParameters(); } void LauRescatteringRes::setResonanceParameter(const TString& name, const Double_t value) { // Set various parameters for the lineshape if (name == "lambdaPiPi") { this->setLambdaPiPi(value); std::cout << "INFO in LauRescatteringRes::setResonanceParameter : Setting parameter lambdaPiPi = " << this->getLambdaPiPi() << std::endl; } else if (name == "lambdaKK") { this->setLambdaKK(value); std::cout << "INFO in LauRescatteringRes::setResonanceParameter : Setting parameter lambdaKK = " << this->getLambdaKK() << std::endl; } else if (name == "Mf") { this->setMf(value); std::cout << "INFO in LauRescatteringRes::setResonanceParameter : Setting parameter Mf = " << this->getMf() << std::endl; } else if (name == "Ms") { this->setMs(value); std::cout << "INFO in LauRescatteringRes::setResonanceParameter : Setting parameter Ms = " << this->getMs() << std::endl; } else if (name == "Mprime") { this->setMprime(value); std::cout << "INFO in LauRescatteringRes::setResonanceParameter : Setting parameter Mprime = " << this->getMprime() << std::endl; } else if (name == "Eps1") { this->setEps1(value); std::cout << "INFO in LauRescatteringRes::setResonanceParameter : Setting parameter eps1 = " << this->getEps1() << std::endl; } else if (name == "Eps2") { this->setEps2(value); std::cout << "INFO in LauRescatteringRes::setResonanceParameter : Setting parameter eps2 = " << this->getEps2() << std::endl; } else if (name == "C0") { this->setC0(value); std::cout << "INFO in LauRescatteringRes::setResonanceParameter : Setting parameter eps2 = " << this->getC0() << std::endl; } else { std::cerr << "WARNING in LauRescatteringRes::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl; } } void LauRescatteringRes::floatResonanceParameter(const TString& name) { if (name == "lambdaPiPi") { if ( lambdaPiPi_->fixed() ) { lambdaPiPi_->fixed( kFALSE ); this->addFloatingParameter( lambdaPiPi_ ); } else { std::cerr << "WARNING in LauRescatteringRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "lambdaKK") { if ( lambdaKK_->fixed() ) { lambdaKK_->fixed( kFALSE ); this->addFloatingParameter( lambdaKK_ ); } else { std::cerr << "WARNING in LauRescatteringRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "Mf") { if ( Mf_->fixed() ) { Mf_->fixed( kFALSE ); this->addFloatingParameter( Mf_ ); } else { std::cerr << "WARNING in LauRescatteringRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "Ms") { if ( Ms_->fixed() ) { Ms_->fixed( kFALSE ); this->addFloatingParameter( Ms_ ); } else { std::cerr << "WARNING in LauRescatteringRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "Mprime") { if ( Mprime_->fixed() ) { Mprime_->fixed( kFALSE ); this->addFloatingParameter( Mprime_ ); } else { std::cerr << "WARNING in LauRescatteringRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "Eps1") { if ( Eps1_->fixed() ) { Eps1_->fixed( kFALSE ); this->addFloatingParameter( Eps1_ ); } else { std::cerr << "WARNING in LauRescatteringRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "Eps2") { if ( Eps2_->fixed() ) { Eps2_->fixed( kFALSE ); this->addFloatingParameter( Eps2_ ); } else { std::cerr << "WARNING in LauRescatteringRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "C0") { if ( C0_->fixed() ) { C0_->fixed( kFALSE ); this->addFloatingParameter( C0_ ); } else { std::cerr << "WARNING in LauRescatteringRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else { std::cerr << "WARNING in LauRescatteringRes::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl; } } LauParameter* LauRescatteringRes::getResonanceParameter(const TString& name) { if (name == "lambdaPiPi") { return lambdaPiPi_; } else if (name == "lambdaKK") { return lambdaKK_; } if (name == "Mf") { return Mf_; } else if (name == "Ms") { return Ms_; } if (name == "Mprime") { return Mprime_; } if (name == "Eps1") { return Eps1_; } if (name == "Eps2") { return Eps2_; } if (name == "C0") { return C0_; } else { std::cerr << "WARNING in LauRescatteringRes::getResonanceParameter: Parameter name not reconised." << std::endl; return 0; } } void LauRescatteringRes::setLambdaPiPi(const Double_t lambda) { lambdaPiPi_->value( lambda ); lambdaPiPi_->genValue( lambda ); lambdaPiPi_->initValue( lambda ); } void LauRescatteringRes::setLambdaKK(const Double_t lambda) { lambdaKK_->value( lambda ); lambdaKK_->genValue( lambda ); lambdaKK_->initValue( lambda ); } void LauRescatteringRes::setMf(const Double_t Mf) { Mf_->value( Mf ); Mf_->genValue( Mf ); Mf_->initValue( Mf ); } void LauRescatteringRes::setMs(const Double_t Ms) { Ms_->value( Ms ); Ms_->genValue( Ms ); Ms_->initValue( Ms ); } void LauRescatteringRes::setMprime(const Double_t Mprime) { Mprime_->value( Mprime ); Mprime_->genValue( Mprime); Mprime_->initValue( Mprime ); } void LauRescatteringRes::setEps1(const Double_t Eps1) { Eps1_->value( Eps1 ); Eps1_->genValue( Eps1 ); Eps1_->initValue( Eps1 ); } void LauRescatteringRes::setEps2(const Double_t Eps2) { Eps2_->value( Eps2 ); Eps2_->genValue( Eps2 ); Eps2_->initValue( Eps2 ); } void LauRescatteringRes::setC0(const Double_t C0) { C0_->value( C0 ); C0_->genValue( C0 ); C0_->initValue( C0 ); } Index: trunk/src/LauMinuit.cc =================================================================== --- trunk/src/LauMinuit.cc (revision 563) +++ trunk/src/LauMinuit.cc (revision 564) @@ -1,280 +1,282 @@ /* Copyright 2013 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauMinuit.cc \brief File containing implementation of LauMinuit methods. */ #include #include #include "TMatrixD.h" #include "TVirtualFitter.h" #include "LauFitObject.hh" #include "LauFitter.hh" #include "LauMinuit.hh" #include "LauParameter.hh" #include "LauParamFixed.hh" // It's necessary to define an external function that specifies the address of the function // that Minuit needs to minimise. Minuit doesn't know about any classes - therefore // use gMinuit->SetFCN(external_function), gMinuit->SetObjectFit(this). // Here, we use TVirtualFitter* fitter instead of gMinuit, defined below. // Then, within the external function, invoke an object from this class (LauAllModel), // and use the member functions to access the parameters/variables. extern void logLikeFun(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag); +ClassImp(LauMinuit) + LauMinuit::LauMinuit( Int_t maxPar ) : LauAbsFitter(), minuit_(0), maxPar_(maxPar), nParams_(0), nFreeParams_(0), twoStageFit_(kFALSE), useAsymmFitErrors_(kFALSE), fitStatus_({-1,0.0,0.0}) { TVirtualFitter::SetDefaultFitter( "Minuit" ); minuit_ = TVirtualFitter::Fitter( 0, maxPar_ ); } LauMinuit::~LauMinuit() { } void LauMinuit::initialise( LauFitObject* fitObj, const std::vector& parameters ) { // Check whether we're going to use asymmetric errors if (useAsymmFitErrors_ == kTRUE) { std::cout << "INFO in LauMinuit::fit : We are going to calculate the asymmetric fit errors." << std::endl; std::cout << " : This will, in general, significantly increase the CPU time required for fitting." << std::endl; } else { std::cout << "INFO in LauMinuit::fit : Only parabolic errors will be calculated." << std::endl; } // Store the parameters params_ = parameters; // Hook the external likelihood function to this LauFitter::fitter() and this class. minuit_->SetFCN( logLikeFun ); minuit_->SetObjectFit( fitObj ); // Clear any stored parameters etc... before using minuit_->Clear(); nParams_ = params_.size(); std::cout << "INFO in LauMinuit::initialise : Setting fit parameters" << std::endl; std::cout << " : Total number of parameters = " << nParams_ << std::endl; // Define the default relative error const Double_t defaultError(0.01); // Set-up the parameters for (UInt_t i = 0; i < nParams_; ++i) { TString name = params_[i]->name(); Double_t initVal = params_[i]->initValue(); Double_t initErr = params_[i]->error(); // If we do not have a supplied estimate of the error, we should make a reasonable guess if ( initErr == 0.0 ) { if ( initVal == 0.0 ) { initErr = defaultError; } else if ( TMath::Abs(initErr/initVal) < 1e-6 ) { initErr = TMath::Abs(defaultError * initVal); } } Double_t minVal = params_[i]->minValue(); Double_t maxVal = params_[i]->maxValue(); Bool_t secondStage = params_[i]->secondStage(); if (this->twoStageFit() && secondStage == kTRUE) { params_[i]->fixed(kTRUE); } Bool_t fixVar = params_[i]->fixed(); std::cout << " : Setting parameter " << i << " called " << name << " to have initial value " << initVal << ", error " << initErr << " and range " << minVal << " to " << maxVal << std::endl; minuit_->SetParameter(i, name, initVal, initErr, minVal, maxVal); // Fix parameter if required if (fixVar == kTRUE) { std::cout << " : Fixing parameter " << i << std::endl; minuit_->FixParameter(i); } } LauParamFixed pred; nFreeParams_ = nParams_ - std::count_if(params_.begin(),params_.end(),pred); // Need to set the "SET ERR" command to +0.5 for +/-1 sigma errors // for maximum likelihood fit. Very important command, otherwise all // extracted errors will be too big, and pull distributions will be too narrow! // TODO - The alternative to this is to make FCN = -2log(L) rather than -log(L) Double_t argL[2]; argL[0] = 0.5; fitStatus_.status = minuit_->ExecuteCommand("SET ERR", argL, 1); //argL[0] = 0; //fitStatus_.status = minuit_->ExecuteCommand("SET STRATEGY", argL, 1); } LauFitObject* LauMinuit::getFitObject() { return (minuit_!=0) ? dynamic_cast( minuit_->GetObjectFit() ) : 0; } const LauAbsFitter::FitStatus& LauMinuit::minimise() { Double_t arglist[2]; arglist[0] = 1000*nParams_; // maximum iterations arglist[1] = 0.05; // tolerance -> min EDM = 0.001*tolerance (0.05) fitStatus_.status = minuit_->ExecuteCommand("MIGRAD", arglist, 2); // Dummy variables - need to feed them to the function // used for getting NLL, EDM and error matrix status Double_t errdef; Int_t nvpar, nparx; if (fitStatus_.status != 0) { std::cerr << "ERROR in LauMinuit::minimise : Error in minimising loglike." << std::endl; } else { // Check that the error matrix is ok fitStatus_.status = minuit_->GetStats(fitStatus_.NLL, fitStatus_.EDM, errdef, nvpar, nparx); std::cout << "INFO in LauMinuit::minimise : Error matrix status after MIGRAD is: " << fitStatus_.status << std::endl; // 0= not calculated at all // 1= approximation only, not accurate // 2= full matrix, but forced positive-definite // 3= full accurate covariance matrix // Fit result was OK. Now get the more precise errors. fitStatus_.status = minuit_->ExecuteCommand("HESSE", arglist, 1); if (fitStatus_.status != 0) { std::cerr << "ERROR in LauMinuit::minimise : Error in HESSE routine." << std::endl; } else { // Check that the error matrix is ok fitStatus_.status = minuit_->GetStats(fitStatus_.NLL, fitStatus_.EDM, errdef, nvpar, nparx); std::cout << "INFO in LauMinuit::minimise : Error matrix status after HESSE is: " << fitStatus_.status << std::endl; // 0= not calculated at all // 1= approximation only, not accurate // 2= full matrix, but forced positive-definite // 3= full accurate covariance matrix // Symmetric errors and eror matrix were OK. // Get asymmetric errors if asked for. if (useAsymmFitErrors_ == kTRUE) { LauFitObject* fitObj = this->getFitObject(); fitObj->withinAsymErrorCalc( kTRUE ); fitStatus_.status = minuit_->ExecuteCommand("MINOS", arglist, 1); fitObj->withinAsymErrorCalc( kFALSE ); if (fitStatus_.status != 0) { std::cerr << "ERROR in LauMinuit::minimise : Error in MINOS routine." << std::endl; } } } } // Print results fitStatus_.status = minuit_->GetStats(fitStatus_.NLL, fitStatus_.EDM, errdef, nvpar, nparx); std::cout << "INFO in LauMinuit::minimise : Final error matrix status is: " << fitStatus_.status << std::endl; // 0= not calculated at all // 1= approximation only, not accurate // 2= full matrix, but forced positive-definite // 3= full accurate covariance matrix minuit_->PrintResults(3, fitStatus_.NLL); // Retrieve the covariance matrix from the fitter // For some reason the array returned is as if the matrix is of dimension nParams_ x nParams_ // but only the elements within the sub-matrix nFreeParams_ x nFreeParams_ have values, // the "trailing" elements are zero, so we trim them off. Double_t* covMatrix = minuit_->GetCovarianceMatrix(); covMatrix_.Clear(); covMatrix_.ResizeTo( nParams_, nParams_ ); covMatrix_.SetMatrixArray( covMatrix ); covMatrix_.ResizeTo( nFreeParams_, nFreeParams_ ); return fitStatus_; } void LauMinuit::fixSecondStageParameters() { for (UInt_t i = 0; i < nParams_; ++i) { Bool_t secondStage = params_[i]->secondStage(); if (secondStage == kTRUE) { params_[i]->fixed(kTRUE); minuit_->FixParameter(i); } } LauParamFixed pred; nFreeParams_ = nParams_ - std::count_if(params_.begin(),params_.end(),pred); } void LauMinuit::releaseSecondStageParameters() { for (UInt_t i = 0; i < nParams_; ++i) { Bool_t secondStage = params_[i]->secondStage(); if (secondStage == kTRUE) { params_[i]->fixed(kFALSE); minuit_->ReleaseParameter(i); } } LauParamFixed pred; nFreeParams_ = nParams_ - std::count_if(params_.begin(),params_.end(),pred); } void LauMinuit::updateParameters() { for (UInt_t i = 0; i < nParams_; ++i) { // Get the value and errors from MINUIT Double_t value = minuit_->GetParameter(i); Double_t error(0.0); Double_t negError(0.0); Double_t posError(0.0); Double_t globalcc(0.0); minuit_->GetErrors(i, posError, negError, error, globalcc); params_[i]->valueAndErrors(value, error, negError, posError); params_[i]->globalCorrelationCoeff(globalcc); } } // Definition of the fitting function for Minuit void logLikeFun(Int_t& npar, Double_t* /*first_derivatives*/, Double_t& f, Double_t* par, Int_t /*iflag*/) { // Routine that specifies the negative log-likelihood function for the fit. // Used by the MINUIT minimising code. LauFitObject* theModel = LauFitter::fitter()->getFitObject(); // Set the internal parameters for this model using parameters from Minuit (pars): theModel->setParsFromMinuit( par, npar ); // Set the value of f to be the total negative log-likelihood for the data sample. f = theModel->getTotNegLogLikelihood(); } Index: trunk/src/LauKMatrixPropFactory.cc =================================================================== --- trunk/src/LauKMatrixPropFactory.cc (revision 563) +++ trunk/src/LauKMatrixPropFactory.cc (revision 564) @@ -1,87 +1,90 @@ /* Copyright 2008 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauKMatrixPropFactory.cc \brief File containing implementation of LauKMatrixPropFactory class. */ // Class for storing K-matrix propagator objects // using the factory method. #include "LauKMatrixPropFactory.hh" #include "LauKMatrixPropagator.hh" #include using std::cout; using std::endl; +ClassImp(LauKMatrixPropFactory) + + // the singleton instance LauKMatrixPropFactory* LauKMatrixPropFactory::theFactory_ = 0; LauKMatrixPropFactory::LauKMatrixPropFactory() { // Constructor map_.clear(); } LauKMatrixPropFactory::~LauKMatrixPropFactory() { // Destructor KMatrixPropMap::iterator iter; for (iter = map_.begin(); iter != map_.end(); ++iter) { LauKMatrixPropagator* thePropagator = iter->second; delete thePropagator; } map_.clear(); } LauKMatrixPropFactory* LauKMatrixPropFactory::getInstance() { if (theFactory_ == 0) { theFactory_ = new LauKMatrixPropFactory(); } return theFactory_; } LauKMatrixPropagator* LauKMatrixPropFactory::getPropagator(const TString& name, const TString& paramFileName, Int_t resPairAmpInt, Int_t nChannels, Int_t nPoles, Int_t rowIndex) { LauKMatrixPropagator* thePropagator(0); KMatrixPropMap::iterator iter = map_.find(name); if ( iter != map_.end() ) { // We have already made this propagator thePropagator = iter->second; } else { // The propagator does not exist. Create it and store it in the map. thePropagator = new LauKMatrixPropagator(name, paramFileName, resPairAmpInt, nChannels, nPoles, rowIndex); map_[name] = thePropagator; } return thePropagator; } Index: trunk/src/LauMergeDataFiles.cc =================================================================== --- trunk/src/LauMergeDataFiles.cc (revision 563) +++ trunk/src/LauMergeDataFiles.cc (revision 564) @@ -1,303 +1,306 @@ /* Copyright 2008 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ #include "LauMergeDataFiles.hh" #include #include #include "TLeaf.h" #include "TObjArray.h" #include "TSystem.h" -MergeDataFiles::MergeDataFiles(const TString& fileName1, const TString& fileName2, const TString& treeName) : +ClassImp(LauMergeDataFiles) + + +LauMergeDataFiles::LauMergeDataFiles(const TString& fileName1, const TString& fileName2, const TString& treeName) : fileName1_(fileName1), fileName2_(fileName2), treeName_(treeName), inputFile1_(0), inputFile2_(0), inputTree1_(0), inputTree2_(0), outputFile_(0), outputTree_(0) { } -MergeDataFiles::~MergeDataFiles() +LauMergeDataFiles::~LauMergeDataFiles() { if (inputFile1_ && inputFile1_->IsOpen()) { inputFile1_->Close(); } delete inputFile1_; if (inputFile2_ && inputFile2_->IsOpen()) { inputFile2_->Close(); } delete inputFile2_; if (outputFile_ && outputFile_->IsOpen()) { outputFile_->Close(); } delete outputFile_; } -void MergeDataFiles::openInputFiles() +void LauMergeDataFiles::openInputFiles() { // open the two input ROOT files inputFile1_ = TFile::Open(fileName1_); if (!inputFile1_ || inputFile1_->IsZombie()) { std::cerr<<"Problem opening file: \""<Exit(EXIT_FAILURE); } inputTree1_ = dynamic_cast( inputFile1_->Get(treeName_) ); if (!inputTree1_) { std::cerr<<"Problem getting tree called "<Exit(EXIT_FAILURE); } inputFile2_ = TFile::Open(fileName2_); if (!inputFile2_ || inputFile2_->IsZombie()) { std::cerr<<"Problem opening file: \""<Exit(EXIT_FAILURE); } inputTree2_ = dynamic_cast( inputFile2_->Get(treeName_) ); if (!inputTree2_) { std::cerr<<"Problem getting tree called "<Exit(EXIT_FAILURE); } } -void MergeDataFiles::setupInputTrees() +void LauMergeDataFiles::setupInputTrees() { TObjArray* leaves1 = inputTree1_->GetListOfLeaves(); TObjArray* leaves2 = inputTree2_->GetListOfLeaves(); Int_t nLeaves1 = leaves1->GetEntries(); Int_t nLeaves2 = leaves2->GetEntries(); if ( nLeaves1 != nLeaves2 ) { std::cerr<<"Different number of leaves in the two input trees, not continuing."<SetBranchAddress("iExpt",&iExpt_); inputTree1_->SetBranchAddress("iEvtWithinExpt",&iEvtWithinExpt_); inputTree2_->SetBranchAddress("iExpt",&iExpt_); inputTree2_->SetBranchAddress("iEvtWithinExpt",&iEvtWithinExpt_); for (Int_t iLeaf(0); iLeaf((*leaves1)[iLeaf]); TString type = leaf->GetTypeName(); TString name = leaf->GetName(); Int_t size = leaf->GetNdata(); if ((name == "iExpt") || (name == "iEvtWithinExpt") || (size != 1)) { continue; } if ( type == "Double_t" ) { std::pair result = doubleVars_.insert(std::make_pair(name,0.0)); LeafDoubleMap::iterator iter = result.first; bool ok = result.second; if (ok) { inputTree1_->SetBranchAddress(name,&(iter->second)); inputTree2_->SetBranchAddress(name,&(iter->second)); } } else if ( type == "Int_t" ) { std::pair result = integerVars_.insert(std::make_pair(name,0)); LeafIntegerMap::iterator iter = result.first; bool ok = result.second; if (ok) { inputTree1_->SetBranchAddress(name,&(iter->second)); inputTree2_->SetBranchAddress(name,&(iter->second)); } } } std::cout<<"Set branch addresses for "<GetName()<<"\"..."<Branch("iExpt",&iExpt_,"iExpt/I"); outputTree_->Branch("iEvtWithinExpt",&iEvtWithinExpt_,"iEvtWithinExpt/I"); for (LeafDoubleMap::iterator iter = doubleVars_.begin(); iter != doubleVars_.end(); ++iter) { TString name = iter->first; Double_t * address = &(iter->second); TString thirdBit = name; thirdBit += "/D"; outputTree_->Branch(name,address,thirdBit); } for (LeafIntegerMap::iterator iter = integerVars_.begin(); iter != integerVars_.end(); ++iter) { TString name = iter->first; Int_t * address = &(iter->second); TString thirdBit = name; thirdBit += "/I"; outputTree_->Branch(name,address,thirdBit); } std::cout<<"Created "<openInputFiles(); this->setupInputTrees(); outputFile_ = TFile::Open(fileName,"recreate"); outputTree_ = new TTree(treeName_,""); this->setupOutputTree(); // loop over the trees and combine the corresponding experiments std::cout<<"Starting to combine the trees..."<findExperiments( inputTree1_, tree1Expts_ ); this->findExperiments( inputTree2_, tree2Expts_ ); // Check that the experiments in the two trees match if ( !this->checkExperimentMaps() ) { return; } // Loop through the experiments for ( ExptsMap::const_iterator iter1 = tree1Expts_.begin(); iter1 != tree1Expts_.end(); ++iter1 ) { // get the map element for tree2 Int_t expt = iter1->first; ExptsMap::const_iterator iter2 = tree2Expts_.find( expt ); // determine the number of entries in tree1 Int_t nEntriesInTree1 = iter1->second.second - iter1->second.first + 1; // read the entries from the trees, filling the output tree this->readExperiment( inputTree1_, iter1, 0 ); this->readExperiment( inputTree2_, iter2, nEntriesInTree1 ); } // Write the output file this->writeFile(); } -void MergeDataFiles::findExperiments(TTree* tree, ExptsMap& exptsMap) +void LauMergeDataFiles::findExperiments(TTree* tree, ExptsMap& exptsMap) { const Int_t nEntries = tree->GetEntries(); // loop through the tree for ( Int_t iEntry(0); iEntryGetEntry(iEntry); // see if we already have an element in the map for the // current experiment ExptsMap::iterator iter = exptsMap.find(iExpt_); if ( iter == exptsMap.end() ) { // if not, we need to add an element that points to // this entry in the tree as the start entry exptsMap.insert( std::make_pair( iExpt_, std::make_pair( iEntry, -99 ) ) ); // also we need to complete the map element for the // previous experiment with the previous tree entry // as the last entry ExptsMap::iterator previter = exptsMap.find(iExpt_-1); if ( previter != exptsMap.end() ) { previter->second.second = iEntry-1; } } } // need to complete the map element for the final experiment exptsMap[iExpt_].second = nEntries-1; } -Bool_t MergeDataFiles::checkExperimentMaps() const +Bool_t LauMergeDataFiles::checkExperimentMaps() const { // first check that the two maps are the same size UInt_t size1 = tree1Expts_.size(); UInt_t size2 = tree2Expts_.size(); if ( size1 != size2 ) { - std::cerr<<"ERROR in MergeDataFiles::checkExperimentMaps : Experiment maps are not the same size.\n"; - std::cerr<<" : Tree from "<first; ExptsMap::const_iterator iter2 = tree2Expts_.find( expt ); if ( iter2 == tree2Expts_.end() ) { - std::cerr<<"ERROR in MergeDataFiles::checkExperimentMaps : Cannot find experiment "<second.first; const Int_t lastEntry = expt->second.second; // loop through all the entries for ( Int_t iEntry(firstEntry); iEntry<=lastEntry; ++iEntry ) { // get the entry from the tree tree->GetEntry( iEntry ); // apply the offset to the "event within experiment" variable iEvtWithinExpt_ += offset; // fill the output tree outputTree_->Fill(); } } -void MergeDataFiles::writeFile() +void LauMergeDataFiles::writeFile() { std::cout<<"Building experiment:event index"<BuildIndex("iExpt","iEvtWithinExpt"); std::cout<<"Writing data to outputfile "<GetName()<SetDirectory(outputFile_); outputFile_->Write(); // clean-up outputFile_->Close(); delete outputFile_; outputFile_ = 0; outputTree_ = 0; inputFile1_->Close(); delete inputFile1_; inputFile1_ = 0; inputTree1_ = 0; inputFile2_->Close(); delete inputFile2_; inputFile2_ = 0; inputTree2_ = 0; doubleVars_.clear(); integerVars_.clear(); tree1Expts_.clear(); tree2Expts_.clear(); } Index: trunk/src/Lau2DCubicSpline.cc =================================================================== --- trunk/src/Lau2DCubicSpline.cc (revision 563) +++ trunk/src/Lau2DCubicSpline.cc (revision 564) @@ -1,371 +1,374 @@ /* Copyright 2013 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file Lau2DCubicSpline.cc \brief File containing implementation of Lau2DCubicSpline class. Class for defining a 2D cubic spline based on RooBinned2DBicubicBase by Manuel Tobias Schiller (2012-08-29). */ #include #include #include #include #include #include "Lau2DCubicSpline.hh" +ClassImp(Lau2DCubicSpline) + + Lau2DCubicSpline::~Lau2DCubicSpline() { } inline Double_t Lau2DCubicSpline::histcont( const TH2& h, Int_t xbin, Int_t ybin) const { //reflect until we're in range while(xbin < 0 || xbin >= nBinsX - 1) { if(xbin < 0) xbin = -xbin-1; if(xbin >= nBinsX -1) xbin = 2*(nBinsX-1) - xbin - 1; } while(ybin < 0 || ybin >= nBinsY - 1) { if(ybin < 0) ybin = -ybin-1; if(ybin >= nBinsY -1) ybin = 2*(nBinsY-1) - ybin - 1; } return h.GetBinContent(1 + xbin, 1 + ybin); } inline Double_t Lau2DCubicSpline::dhistdx( const TH2& h, Int_t xbin, Int_t ybin) const { return 0.5 * (histcont(h, xbin + 1, ybin) - histcont(h, xbin - 1, ybin)); } inline Double_t Lau2DCubicSpline::dhistdy( const TH2& h, Int_t xbin, Int_t ybin) const { return 0.5 * (histcont(h, xbin, ybin + 1) - histcont(h, xbin, ybin - 1)); } inline Double_t Lau2DCubicSpline::d2histdxdy( const TH2& h, Int_t xbin, Int_t ybin) const { return 0.5 * (histcont(h, xbin - 1, ybin - 1) - histcont(h, xbin + 1, ybin - 1) + histcont(h, xbin + 1, ybin + 1) - histcont(h, xbin - 1, ybin + 1)); } Lau2DCubicSpline::Lau2DCubicSpline(const TH2& h) : nBinsX(1 + h.GetNbinsX()), nBinsY(1 + h.GetNbinsY()), binSizeX(h.GetXaxis()->GetBinWidth(1)), binSizeY(h.GetYaxis()->GetBinWidth(1)), xmin(h.GetXaxis()->GetBinCenter(1) - binSizeX), xmax(h.GetXaxis()->GetBinCenter(nBinsX - 1) + binSizeX), ymin(h.GetYaxis()->GetBinCenter(1) - binSizeY), ymax(h.GetYaxis()->GetBinCenter(nBinsY - 1) + binSizeY), coeffs(CoeffRecLen * nBinsX * nBinsY) { const TAxis* xaxis = h.GetXaxis(); const TAxis* yaxis = h.GetYaxis(); // verify that all bins have same size for (Int_t i = 1; i < nBinsX; ++i) { if (std::abs(xaxis->GetBinWidth(i) / binSizeX - 1.) > 1e-9) { std::cerr << "ERROR in Lau2DCubicSpline constructor : the histogram has variable bin sizes." << std::endl; gSystem->Exit(EXIT_FAILURE); } } for (Int_t i = 1; i < nBinsY; ++i) { if (std::abs(yaxis->GetBinWidth(i) / binSizeY - 1.) > 1e-9) { std::cerr << "ERROR in Lau2DCubicSpline constructor : the histogram has variable bin sizes." << std::endl; gSystem->Exit(EXIT_FAILURE); } } // ok, go through histogram to precalculate the interpolation coefficients // in rectangles between bin centres // // for that purpose, we map each of those rectangles to the unit square for (Int_t j = -1; j < nBinsY - 1; ++j) { for (Int_t i = -1; i < nBinsX - 1; ++i) { const Double_t rhs[NCoeff] = { // function values in bin centres histcont(h, i, j), histcont(h, i + 1, j), histcont(h, i, j + 1), histcont(h, i + 1, j + 1), // df/dx in bin centres (finite difference approximation) dhistdx(h, i, j), dhistdx(h, i + 1, j), dhistdx(h, i, j + 1), dhistdx(h, i + 1, j + 1), // df/dy in bin centres (finite difference approximation) dhistdy(h, i, j), dhistdy(h, i + 1, j), dhistdy(h, i, j + 1), dhistdy(h, i + 1, j + 1), // d^2f/dxdy in bin centres (finite difference approximation) d2histdxdy(h, i, j), d2histdxdy(h, i + 1, j), d2histdxdy(h, i, j + 1), d2histdxdy(h, i + 1, j + 1) }; // work out solution - strange array placement is due to the fact // that terms with x/y to high powers can be small, so they should // be added up first during evaluation to avoid cancellation // issues; at the same time you want to access them in order to // not confuse the CPU cache, so they're stored back to front // // a_00 ... a_30 coeff(1 + i, 1 + j, 15) = rhs[0]; coeff(1 + i, 1 + j, 14) = rhs[4]; coeff(1 + i, 1 + j, 13) = 3. * (-rhs[0] + rhs[1]) - 2. * rhs[4] - rhs[5]; coeff(1 + i, 1 + j, 12) = 2. * (rhs[0] - rhs[1]) + rhs[4] + rhs[5]; // a_31 ... a_31 coeff(1 + i, 1 + j, 11) = rhs[8]; coeff(1 + i, 1 + j, 10) = rhs[12]; coeff(1 + i, 1 + j, 9) = 3. * (-rhs[8] + rhs[9]) - 2. * rhs[12] - rhs[13]; coeff(1 + i, 1 + j, 8) = 2. * (rhs[8] - rhs[9]) + rhs[12] + rhs[13]; // a_02 ... a_32 coeff(1 + i, 1 + j, 7) = 3. * (-rhs[0] + rhs[2]) - 2. * rhs[8] - rhs[10]; coeff(1 + i, 1 + j, 6) = 3. * (-rhs[4] + rhs[6]) - 2. * rhs[12] - rhs[14]; coeff(1 + i, 1 + j, 5) = 9. * (rhs[0] - rhs[1] - rhs[2] + rhs[3]) + 6. * (rhs[4] - rhs[6] + rhs[8] - rhs[9]) + 4. * rhs[12] + 3. * (rhs[5] - rhs[7] + rhs[10] - rhs[11]) + 2. * (rhs[13] + rhs[14]) + rhs[15]; coeff(1 + i, 1 + j, 4) = 6. * (-rhs[0] + rhs[1] + rhs[2] - rhs[3]) + 4. * (-rhs[8] + rhs[9]) + 3. * (-rhs[4] - rhs[5] + rhs[6] + rhs[7]) + 2. * (-rhs[10] + rhs[11] - rhs[12] - rhs[13]) - rhs[14] - rhs[15]; // a_03 ... a_33 coeff(1 + i, 1 + j, 3) = 2. * (rhs[0] - rhs[2]) + rhs[8] + rhs[10]; coeff(1 + i, 1 + j, 2) = 2. * (rhs[4] - rhs[6]) + rhs[12] + rhs[14]; coeff(1 + i, 1 + j, 1) = 6. * (-rhs[0] + rhs[1] + rhs[2] - rhs[3]) + 4. * (-rhs[4] + rhs[6]) + 3. * (-rhs[8] + rhs[9] - rhs[10] + rhs[11]) + 2. * (- rhs[5] + rhs[7] - rhs[12] - rhs[14]) - rhs[13] - rhs[15]; coeff(1 + i, 1 + j, 0) = 4. * (rhs[0] - rhs[1] - rhs[2] + rhs[3]) + 2. * (rhs[4] + rhs[5] - rhs[6] - rhs[7] + rhs[8] - rhs[9] + rhs[10] - rhs[11]) + rhs[12] + rhs[13] + rhs[14] + rhs[15]; // coeff(1 + i, 1 + j, 17) contains integral of function over the // square in "unit square coordinates", i.e. neglecting bin widths // this is done to help speed up calculations of 2D integrals Double_t sum = 0.; for (Int_t k = 0; k < NCoeff; ++k) sum += coeff(1 + i, 1 + j, k) / Double_t((4 - (k % 4)) * (4 - (k / 4))); coeff(1 + i, 1 + j, NCoeff) = sum; } } } Double_t Lau2DCubicSpline::evaluate(Double_t x, Double_t y) const { // protect against NaN and out of range if (x <= xmin || x >= xmax || y <= ymin || y >= ymax || x != x || y != y) return 0.; // find the bin in question const Int_t binx = Int_t(Double_t(nBinsX) * (x - xmin) / (xmax - xmin)); const Int_t biny = Int_t(Double_t(nBinsY) * (y - ymin) / (ymax - ymin)); // get low edge of bin const Double_t xlo = Double_t(nBinsX - binx) / Double_t(nBinsX) * xmin + Double_t(binx) / Double_t(nBinsX) * xmax; const Double_t ylo = Double_t(nBinsY - biny) / Double_t(nBinsY) * ymin + Double_t(biny) / Double_t(nBinsY) * ymax; // normalise to coordinates in unit sqare const Double_t hx = (x - xlo) / binSizeX; const Double_t hy = (y - ylo) / binSizeY; // monomials const Double_t hxton[4] = { hx * hx * hx, hx * hx, hx, 1. }; const Double_t hyton[4] = { hy * hy * hy, hy * hy, hy, 1. }; // sum up Double_t retVal = 0.; for (Int_t k = 0; k < NCoeff; ++k) retVal += coeff(binx, biny, k) * hxton[k % 4] * hyton[k / 4]; return retVal; } Double_t Lau2DCubicSpline::analyticalIntegral() const { return evalXY(xmin,xmax,ymin,ymax); } Double_t Lau2DCubicSpline::analyticalIntegral(Double_t x1, Double_t x2, Double_t y1, Double_t y2) const { if(y1==y2) return evalX(x1, x2, y1); if(x1==x2) return evalY(x1, y1, y2); return evalXY(x1, x2, y1, y2); } Double_t Lau2DCubicSpline::evalX(Double_t x1, Double_t x2, Double_t y) const { // protect against NaN if (x1 != x1 || x2 != x2 || y != y) return 0.; // find the bin in question const Int_t biny = Int_t(Double_t(nBinsY) * (y - ymin) / (ymax - ymin)); // get low edge of bin const Double_t ylo = Double_t(nBinsY - biny) / Double_t(nBinsY) * ymin + Double_t(biny) / Double_t(nBinsY) * ymax; // normalise to coordinates in unit sqare const Double_t hy = (y - ylo) / binSizeY; // monomials const Double_t hyton[4] = { hy * hy * hy, hy * hy, hy, 1. }; // integral Double_t sum = 0.; for (Int_t binx = 0; binx < nBinsX; ++binx) { // get low/high edge of bin const Double_t xhi = Double_t(nBinsX - binx - 1) / Double_t(nBinsX) * xmin + Double_t(binx + 1) / Double_t(nBinsX) * xmax; if (xhi < x1) continue; const Double_t xlo = Double_t(nBinsX - binx) / Double_t(nBinsX) * xmin + Double_t(binx) / Double_t(nBinsX) * xmax; if (xlo > x2) break; // work out integration range const Double_t a = ((xlo > x1) ? 0. : (x1 - xlo)) / binSizeX; const Double_t b = ((xhi < x2) ? binSizeX : (x2 - xlo)) / binSizeX; // integrated monomials const Double_t hxton[4] = { 0.25 * (b * b * b * b - a * a * a * a), (b * b * b - a * a * a) / 3., 0.5 * (b * b - a * a), b - a }; Double_t lsum = 0.; for (Int_t k = 0; k < NCoeff; ++k) lsum += coeff(binx, biny, k) * hxton[k % 4] * hyton[k / 4]; sum += lsum; } // move from unit square coordinates to user coordinates return sum * binSizeX; } Double_t Lau2DCubicSpline::evalY(Double_t x, Double_t y1, Double_t y2) const { // protect against NaN if (x != x || y1 != y1 || y2 != y2) return 0.; // find the bin in question const Int_t binx = Int_t(Double_t(nBinsX) * (x - xmin) / (xmax - xmin)); // get low edge of bin const Double_t xlo = Double_t(nBinsX - binx) / Double_t(nBinsX) * xmin + Double_t(binx) / Double_t(nBinsX) * xmax; // normalise to coordinates in unit sqare const Double_t hx = (x - xlo) / binSizeX; // monomials const Double_t hxton[4] = { hx * hx * hx, hx * hx, hx, 1. }; // integral Double_t sum = 0.; for (Int_t biny = 0; biny < nBinsY; ++biny) { // get low/high edge of bin const Double_t yhi = Double_t(nBinsY - biny - 1) / Double_t(nBinsY) * ymin + Double_t(biny + 1) / Double_t(nBinsY) * ymax; if (yhi < y1) continue; const Double_t ylo = Double_t(nBinsY - biny) / Double_t(nBinsY) * ymin + Double_t(biny) / Double_t(nBinsY) * ymax; if (ylo > y2) break; // work out integration range const Double_t a = ((ylo > y1) ? 0. : (y1 - ylo)) / binSizeY; const Double_t b = ((yhi < y2) ? binSizeY : (y2 - ylo)) / binSizeY; // integrated monomials const Double_t hyton[4] = { 0.25 * (b * b * b * b - a * a * a * a), (b * b * b - a * a * a) / 3., 0.5 * (b * b - a * a), b - a }; Double_t lsum = 0.; for (Int_t k = 0; k < NCoeff; ++k) lsum += coeff(binx, biny, k) * hxton[k % 4] * hyton[k / 4]; sum += lsum; } // move from unit square coordinates to user coordinates return sum * binSizeY; } Double_t Lau2DCubicSpline::evalXY( Double_t x1, Double_t x2, Double_t y1, Double_t y2) const { // protect against NaN if (x1 != x1 || x2 != x2 || y1 != y1 || y2 != y2) return 0.; // integral Double_t sum = 0.; for (Int_t biny = 0; biny < nBinsY; ++biny) { // get low/high edge of bin const Double_t yhi = Double_t(nBinsY - biny - 1) / Double_t(nBinsY) * ymin + Double_t(biny + 1) / Double_t(nBinsY) * ymax; if (yhi < y1) continue; const Double_t ylo = Double_t(nBinsY - biny) / Double_t(nBinsY) * ymin + Double_t(biny) / Double_t(nBinsY) * ymax; if (ylo > y2) break; // work out integration range const Double_t ay = ((ylo > y1) ? 0. : (y1 - ylo)) / binSizeY; const Double_t by = ((yhi < y2) ? binSizeY : (y2 - ylo)) / binSizeY; const Bool_t yFullyContained = std::abs(by - ay - 1.0) < 1e-15; // integrated monomials const Double_t hyton[4] = { 0.25 * (by * by * by * by - ay * ay * ay * ay), (by * by * by - ay * ay * ay) / 3., 0.5 * (by * by - ay * ay), by - ay }; for (Int_t binx = 0; binx < nBinsX; ++binx) { // get low/high edge of bin const Double_t xhi = Double_t(nBinsX - binx - 1) / Double_t(nBinsX) * xmin + Double_t(binx + 1) / Double_t(nBinsX) * xmax; if (xhi < x1) continue; const Double_t xlo = Double_t(nBinsX - binx) / Double_t(nBinsX) * xmin + Double_t(binx) / Double_t(nBinsX) * xmax; if (xlo > x2) break; // work out integration range const Double_t ax = ((xlo > x1) ? 0. : (x1 - xlo)) / binSizeX; const Double_t bx = ((xhi < x2) ? binSizeX : (x2 - xlo)) / binSizeX; const Bool_t xFullyContained = std::abs(bx - ax - 1.0) < 1e-15; if (xFullyContained && yFullyContained) { // for fully contained bins, we have cached the integral sum += coeff(binx, biny, NCoeff); continue; } // integrated monomials const Double_t hxton[4] = { 0.25 * (bx * bx * bx * bx - ax * ax * ax * ax), (bx * bx * bx - ax * ax * ax) / 3., 0.5 * (bx * bx - ax * ax), bx - ax }; // integrate over bin Double_t lsum = 0.; for (Int_t k = 0; k < NCoeff; ++k) lsum += coeff(binx, biny, k) * hxton[k % 4] * hyton[k / 4]; sum += lsum; } } // move from unit square coordinates to user coordinates return sum * binSizeX * binSizeY; } Index: trunk/src/LauCalcChiSq.cc =================================================================== --- trunk/src/LauCalcChiSq.cc (revision 563) +++ trunk/src/LauCalcChiSq.cc (revision 564) @@ -1,546 +1,544 @@ /* Copyright 2008 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ // Code to produce an adaptive binning scheme and calculate the 2D chi-square between // two datasets (e.g. low-stat data and high-stat toyMC). // To run the code, do "./CalcChiSq chiSqInput.txt", where chiSqInput.txt is // an input control file, and contains the following lines: // Low_stat_file_name Low_stat_histo_name // High_stat_file_name High_stat_histo_name // Min_bin_content N_free_params Low/high stat_histo_ratio // Note that the low and high stat histograms must have the same bin axes // ranges and number of bins. // It works by using the low stat (first) histogram to find a binning scheme such // that the total number of entries in each bin is >= Min_bin_content. The number // of entries in the histogram is divided by the desired minimum bin content to // give a target number of bins. The largest number of bins that can be expressed // as a product of powers of four, nine, 25, 49 and 121 that does not exceed the // target value is chosen. The histogram is the recursively subdivided in 2x2, 3x3, // 5x5, 7x7 or 11x11 bins. For each stage of the subdivision, each bin is first // divided into equally populated bins in x then each of these is further divded // into equally popiulated bins in y. // The (Pearson) chi-squared is then the sum of the chi-squared contributions // of all bins: // (low_stat_number - high_stat_number)^2/(high_stat_number) // The nDof = number of bins - number of free params - 1 #include "LauCalcChiSq.hh" #include "TAxis.h" #include "TFile.h" #include "TMath.h" #include "TSystem.h" #include "TTree.h" #include "TCanvas.h" #include "TColor.h" #include "TStyle.h" #include #include #include #include -using std::cout; -using std::cerr; -using std::endl; +ClassImp(LauCalcChiSq) -CalcChiSq::CalcChiSq(TString inputFileName) : + +LauCalcChiSq::LauCalcChiSq(const TString& inputFileName) : inputFileName_(inputFileName), fileName1_(""), fileName2_(""), treeName1_(""), treeName2_(""), xName1_(""), xName2_(""), yName1_(""), yName2_(""), minContent_(10.0), histo1_(0), histo2_(0), chiSqHisto_(0), chiSqSignedHisto_(0), xMin_(0.0), xMax_(0.0), yMin_(0.0), yMax_(0.0), nParams_(0), scaleFactor_(1.0), verbose_(kFALSE) - { } -CalcChiSq::~CalcChiSq() +LauCalcChiSq::~LauCalcChiSq() { } -void CalcChiSq::run() +void LauCalcChiSq::run() { - - cout<<"Running chi-squared algorithm"<initialiseHistos(); - cout<<"Calculating chi-squared"<calculateChiSq(); //make plots - makePlots(); + this->makePlots(); // Output the various histograms - cout<<"Writing out histogram output"<SetDirectory(outFile); histo2_->SetDirectory(outFile); pullHisto_->SetDirectory(outFile); chiSqHisto_->SetDirectory(outFile); chiSqSignedHisto_->SetDirectory(outFile); outFile->Write(); outFile->Close(); - cout<<"Done"<GetBinContent(1); for(Int_t i=1; i<=histo1_->GetNumberOfBins(); ++i) { //keep track of actual minimum if(histo1_->GetBinContent(i)GetBinContent(i); } // Calculate Pearson chi-square for this bin, using the // second histogram for the expected distribution chiSq = 0.; toyVal = histo2_->GetBinContent(i); dataVal = histo1_->GetBinContent(i); diff = dataVal-toyVal; if(toyVal>0) chiSq = (diff*diff)/toyVal; totalChiSq += chiSq; chiSqHisto_->SetBinContent(i, chiSq); if(diff>0) { chiSqSignedHisto_->SetBinContent(i, chiSq); pullHisto_->SetBinContent(i, sqrt(chiSq)); } else { chiSqSignedHisto_->SetBinContent(i, -chiSq); pullHisto_->SetBinContent(i, -sqrt(chiSq)); } } ndof = histo1_->GetNumberOfBins()-nParams_-1; - cout<<"Total ChiSq/nDof = "<SetPalette(1,0); const Int_t NRGBs = 5; const Int_t NCont = 255; Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00}; Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51}; Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00}; Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00}; TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); gStyle->SetNumberContours(NCont); gStyle->SetOptStat(0000); TCanvas can; can.SetTopMargin(0.05); can.SetRightMargin(0.17); can.SetBottomMargin(0.16); can.SetLeftMargin(0.14); histo1_->SetLabelFont(62,"x"); histo1_->SetLabelFont(62,"y"); histo1_->SetTitleFont(62,"x"); histo1_->SetTitleFont(62,"y"); histo1_->SetTitleSize(0.06,"x"); histo1_->SetTitleSize(0.06,"y"); histo1_->SetLabelSize(0.05,"x"); histo1_->SetLabelSize(0.05,"y"); histo1_->SetXTitle(xName1_); histo1_->SetYTitle(yName1_); histo1_->Draw("colz"); can.SaveAs("data.pdf"); histo2_->SetLabelFont(62,"x"); histo2_->SetLabelFont(62,"y"); histo2_->SetTitleFont(62,"x"); histo2_->SetTitleFont(62,"y"); histo2_->SetTitleSize(0.06,"x"); histo2_->SetTitleSize(0.06,"y"); histo2_->SetLabelSize(0.05,"x"); histo2_->SetLabelSize(0.05,"y"); histo2_->SetXTitle(xName1_); histo2_->SetYTitle(yName1_); histo2_->Draw("colz"); can.SaveAs("toy.pdf"); if(-1.*pullHisto_->GetMinimum() > pullHisto_->GetMaximum()) pullHisto_->SetMaximum(-1.*pullHisto_->GetMinimum()); else pullHisto_->SetMinimum(-1.*pullHisto_->GetMaximum()); pullHisto_->SetLabelFont(62,"x"); pullHisto_->SetLabelFont(62,"y"); pullHisto_->SetTitleFont(62,"x"); pullHisto_->SetTitleFont(62,"y"); pullHisto_->SetTitleSize(0.06,"x"); pullHisto_->SetTitleSize(0.06,"y"); pullHisto_->SetLabelSize(0.05,"x"); pullHisto_->SetLabelSize(0.05,"y"); pullHisto_->SetXTitle(xName1_); pullHisto_->SetYTitle(yName1_); pullHisto_->Draw("colz"); can.SaveAs("pull.pdf"); chiSqHisto_->SetLabelFont(62,"x"); chiSqHisto_->SetLabelFont(62,"y"); chiSqHisto_->SetTitleFont(62,"x"); chiSqHisto_->SetTitleFont(62,"y"); chiSqHisto_->SetTitleSize(0.06,"x"); chiSqHisto_->SetTitleSize(0.06,"y"); chiSqHisto_->SetLabelSize(0.05,"x"); chiSqHisto_->SetLabelSize(0.05,"y"); chiSqHisto_->SetXTitle(xName1_); chiSqHisto_->SetYTitle(yName1_); chiSqHisto_->Draw("colz"); can.SaveAs("chiSq.pdf"); chiSqSignedHisto_->SetLabelFont(62,"x"); chiSqSignedHisto_->SetLabelFont(62,"y"); chiSqSignedHisto_->SetTitleFont(62,"x"); chiSqSignedHisto_->SetTitleFont(62,"y"); chiSqSignedHisto_->SetTitleSize(0.06,"x"); chiSqSignedHisto_->SetTitleSize(0.06,"y"); chiSqSignedHisto_->SetLabelSize(0.05,"x"); chiSqSignedHisto_->SetLabelSize(0.05,"y"); chiSqSignedHisto_->SetXTitle(xName1_); chiSqSignedHisto_->SetYTitle(yName1_); chiSqSignedHisto_->Draw("colz"); can.SaveAs("chiSqSigned.pdf"); } -void CalcChiSq::initialiseHistos() +void LauCalcChiSq::initialiseHistos() { // Open the input control file: // Low_stat_file_name Low_stat_tree_name Low_stat_x_axis_name Low_stat_y_axis_name // High_stat_file_name High_stat_tree_name High_stat_x_axis_name High_stat_y_axis_name // Min_bin_content N_free_params Low/high_stat_histo_ratio xMin xMax yMin yMax std::ifstream getData(inputFileName_.Data()); // get the info on the low stat histo getData >> fileName1_ >> treeName1_ >> xName1_ >> yName1_; if (!getData.good()) { - cerr<<"Error. Could not read first line of the input file "<Exit(EXIT_FAILURE); } // open the file that contains the low stat histogram TFile * file1 = TFile::Open(fileName1_.Data(), "read"); if (file1 == 0) {gSystem->Exit(EXIT_FAILURE);} // retrieve the low stat histogram TTree* tree1 = dynamic_cast(file1->Get(treeName1_.Data())); if (tree1 == 0) { - cerr<<"Error. Could not find the tree "<Exit(EXIT_FAILURE); } // get the info on the high stat histogram getData >> fileName2_ >> treeName2_ >> xName2_ >> yName2_; if (!getData.good()) { - cerr<<"Error. Could not read the second line of the input file "<Exit(EXIT_FAILURE); } // if both histograms are in the same file then just retrieve the // high stat histogram from the file we already have open TFile * file2(0); TTree* tree2(0); if ( fileName2_ == fileName1_ ) { tree2 = dynamic_cast(file1->Get(treeName2_.Data())); } // otherwise open the other file and retrieve the high stat histogram from there else { file2 = TFile::Open(fileName2_.Data(), "read"); if (file2 == 0) {gSystem->Exit(EXIT_FAILURE);} tree2 = dynamic_cast(file2->Get(treeName2_.Data())); } if (tree2 == 0) { - cerr<<"Error. Could not find the tree "<Exit(EXIT_FAILURE); } // get the info on the minimum content, number of parameters and scalefactor Int_t nParameters(0); Float_t minContent(0.0), scaleFactor(1.0), xMin(0.0), xMax(1.0), yMin(0.0), yMax(1.0); getData >> minContent >> nParameters >> scaleFactor >> xMin >> xMax >> yMin >> yMax; if (getData.good()) { minContent_ = minContent; nParams_ = nParameters; scaleFactor_ = scaleFactor; xMin_ = xMin; xMax_ = xMax; yMin_ = yMin; yMax_ = yMax; } // close the text file getData.close(); - cout<<"Using the files and trees: "<SetBranchAddress(xName1_.Data(),&x); tree1->SetBranchAddress(yName1_.Data(),&y); Int_t nEntries = tree1->GetEntries(); Double_t* xs = new Double_t[nEntries]; Double_t* ys = new Double_t[nEntries]; for ( Int_t i=0; i < nEntries; ++i ) { tree1->GetEntry( i ); xs[i] = x; ys[i] = y; } theHisto_ = new TH2Poly("theHisto_", "", xMin_, xMax_, yMin_, yMax_); //select the number of divisions to get us closest to minContent entries per bin std::vector divisions; - pickBinning(xs,ys,nEntries,divisions); + this->pickBinning(xs,ys,nEntries,divisions); //perform the adaptive bining based on histo1_ - getHisto(xMin_, xMax_, yMin_, yMax_, xs, ys, nEntries, divisions); + this->getHisto(xMin_, xMax_, yMin_, yMax_, xs, ys, nEntries, divisions); histo1_ = dynamic_cast(theHisto_->Clone("histo1_")); histo2_ = dynamic_cast(theHisto_->Clone("histo2_")); pullHisto_ = dynamic_cast(theHisto_->Clone("pullHisto_")); chiSqHisto_ = dynamic_cast(theHisto_->Clone("chiSqHisto_")); chiSqSignedHisto_ = dynamic_cast(theHisto_->Clone("chiSqSignedHisto_")); delete[] xs; delete[] ys; //fill the two histograms from the trees TString drawString1, drawString2, weightString2; drawString1 += yName1_; drawString1 += ":"; drawString1 += xName1_; drawString1 += ">>histo1_"; drawString2 += yName2_; drawString2 += ":"; drawString2 += xName2_; drawString2 += ">>histo2_"; weightString2 += scaleFactor_; tree1->Draw(drawString1); tree2->Draw(drawString2,weightString2); histo1_->SetDirectory(0); histo2_->SetDirectory(0); pullHisto_->SetDirectory(0); chiSqHisto_->SetDirectory(0); chiSqSignedHisto_->SetDirectory(0); // close the file(s) containing the trees if (file1 != 0) {file1->Close();} delete file1; if (file2 != 0) {file2->Close();} delete file2; - } -void CalcChiSq::pickBinning(Double_t* xs, Double_t* ys, Int_t nEntries, std::vector& divisions) { +void LauCalcChiSq::pickBinning(const Double_t* xs, const Double_t* ys, const Int_t nEntries, std::vector& divisions) +{ //first check how many events we have within the histogram limits Int_t nIn(0); for(Int_t i=0; i= xMin_ && ys[i]= yMin_) { ++nIn; } } //aim to have exactly minContent events in each bin Int_t nBinsTarget = nIn / minContent_; std::cout << "Target is " << minContent_ << " entries per bin" << std::endl; std::cout << "Aiming to divide " << nIn << " entries between " << nBinsTarget << " bins" << std::endl; //we will iteratively sub-divide histogram bins into either 4, 9, 25, 49 or 121 //here we figure out how many 4s, 9s, 25s, 49s and 121s to use to best match our target without exceeding it Int_t nDivisions(0), nNines(0), nTwentyFives(0), nFortyNines(0), nEleventyElevens(0), nBins(1); Int_t nDivisionsBest(0), nNinesBest(0), nTwentyFivesBest(0), nFortyNinesBest(0), nEleventyElevensBest(0), nBinsBest(1); do { ++nDivisions; for(nNines=0; nNines<=nDivisions; ++nNines) { for(nTwentyFives=0; nTwentyFives<=nDivisions-nNines; ++nTwentyFives) { for(nFortyNines=0; nFortyNines<=nDivisions-nNines-nTwentyFives; ++nFortyNines) { for(nEleventyElevens=0; nEleventyElevens<=nDivisions-nNines-nTwentyFives-nFortyNines; ++nEleventyElevens) { nBins = TMath::Power(4,nDivisions-nNines-nTwentyFives-nFortyNines-nEleventyElevens) *TMath::Power(9,nNines)*TMath::Power(25,nTwentyFives) *TMath::Power(49,nFortyNines)*TMath::Power(121,nEleventyElevens); if(nBins < nBinsTarget && nBins > nBinsBest) { //keep track of the best number of bins so far nBinsBest = nBins; nDivisionsBest = nDivisions; nNinesBest = nNines; nTwentyFivesBest = nTwentyFives; nFortyNinesBest = nFortyNines; nEleventyElevensBest = nEleventyElevens; } } } } } } while(TMath::Power(4,nDivisions+1) < nBinsTarget);//if 4^n > target then we've gone far enough std::cout << "Using " << nBinsBest << " bins" << std::endl; //fill the vector with the divisions that we want to make for(Int_t i=0; i& divisions, UInt_t iter) { +void LauCalcChiSq::getHisto(const Double_t xMin, const Double_t xMax, const Double_t yMin, const Double_t yMax, const Double_t* xs, const Double_t* ys, const Int_t nEntries, const std::vector& divisions, const UInt_t iter) +{ //If it's the last iteration create the bin and return if(iter == divisions.size()) { Double_t * x_new = new Double_t[5]; Double_t * y_new = new Double_t[5]; x_new[0] = xMin; x_new[1] = xMin; x_new[2] = xMax; x_new[3] = xMax; x_new[4] = xMin; y_new[0] = yMin; y_new[1] = yMax; y_new[2] = yMax; y_new[3] = yMin; y_new[4] = yMin; theHisto_->AddBin(5, x_new, y_new); if(verbose_) std::cout << "Adding bin from (" << xMin << "," << yMin << ") to (" << xMax << "," << yMax << ")" << std::endl; return; } //If not the last iteration then divide the bin Int_t n_divx=divisions[iter]; Int_t n_divy=divisions[iter]; if(verbose_) std::cout << "Dividing bin from (" << xMin << "," << yMin << ") to (" << xMax << "," << yMax << ") into " << n_divx << " by " << n_divy << " subbins" << std::endl; Double_t *xIn = new Double_t[nEntries]; Double_t *yIn = new Double_t[nEntries]; Int_t *xIndex = new Int_t [nEntries+2]; Int_t *yIndex = new Int_t [nEntries+2]; Int_t xCountIn = 0; for(Int_t i = 0; ixMax)||(ys[i]yMax)) continue; xIn[xCountIn] = xs[i]; ++xCountIn; } //find the delimitting x and y values for the sub bins Double_t xLimits[n_divx + 1]; Double_t yLimits[n_divx][n_divy + 1]; //first sort entries in x and divide bin into equally populated bins in x TMath::Sort(xCountIn, xIn, xIndex, false); xLimits[0] = xMin; xLimits[n_divx] = xMax; for (Int_t nDivx = 0; nDivx < n_divx; ++nDivx){ if (nDivx < (n_divx-1)){ xLimits[nDivx+1] = xIn[xIndex[xCountIn*(nDivx+1)/n_divx]]; } //for each bin in x divide into equally populated bins in y yLimits[nDivx][0] = yMin; yLimits[nDivx][n_divy] = yMax; Int_t yCountIn = 0; for(Int_t i = 0; ixMax)||(ys[i]yMax)) continue; if ((xs[i]=xLimits[nDivx+1])||(ys[i]yMax)) continue; yIn[yCountIn] = ys[i]; ++yCountIn; } TMath::Sort(yCountIn, yIn, yIndex, false); for (Int_t nDivy = 1; nDivy < n_divy; ++nDivy){ yLimits[nDivx][nDivy] = yIn[yIndex[yCountIn*nDivy/n_divy]]; } } delete[] xIn; delete[] yIn; delete[] xIndex; delete[] yIndex; //call for each sub bin for (Int_t nDivx = 0; nDivx < n_divx; ++nDivx){ for (Int_t nDivy = 0; nDivy < n_divy; ++nDivy){ - getHisto(xLimits[nDivx], xLimits[nDivx + 1], yLimits[nDivx][nDivy], yLimits[nDivx][nDivy + 1], xs, ys, nEntries, divisions,iter+1); + this->getHisto(xLimits[nDivx], xLimits[nDivx + 1], yLimits[nDivx][nDivy], yLimits[nDivx][nDivy + 1], xs, ys, nEntries, divisions,iter+1); } } } Index: trunk/src/LauResonanceMaker.cc =================================================================== --- trunk/src/LauResonanceMaker.cc (revision 563) +++ trunk/src/LauResonanceMaker.cc (revision 564) @@ -1,990 +1,990 @@ /* Copyright 2004 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauResonanceMaker.cc \brief File containing implementation of LauResonanceMaker class. */ #include #include "LauAbsResonance.hh" #include "LauBelleNR.hh" #include "LauBelleSymNR.hh" #include "LauBreitWignerRes.hh" #include "LauDabbaRes.hh" #include "LauDaughters.hh" #include "LauEFKLLMRes.hh" #include "LauFlatteRes.hh" #include "LauFlatNR.hh" #include "LauGaussIncohRes.hh" #include "LauGounarisSakuraiRes.hh" #include "LauKappaRes.hh" #include "LauLASSRes.hh" #include "LauLASSBWRes.hh" #include "LauLASSNRRes.hh" #include "LauModIndPartWaveMagPhase.hh" #include "LauModIndPartWaveRealImag.hh" #include "LauNRAmplitude.hh" #include "LauRescatteringRes.hh" #include "LauRescattering2Res.hh" #include "LauPolNR.hh" #include "LauPoleRes.hh" #include "LauPolarFormFactorNR.hh" #include "LauPolarFormFactorSymNR.hh" #include "LauRelBreitWignerRes.hh" #include "LauResonanceInfo.hh" #include "LauResonanceMaker.hh" #include "LauRhoOmegaMix.hh" #include "LauSigmaRes.hh" ClassImp(LauResonanceMaker); LauResonanceMaker* LauResonanceMaker::resonanceMaker_ = 0; LauResonanceMaker::LauResonanceMaker() : nResDefMax_(0), bwBarrierType_(LauBlattWeisskopfFactor::BWPrimeBarrier), bwRestFrame_(LauBlattWeisskopfFactor::ResonanceFrame), spinFormalism_(LauAbsResonance::Zemach_P), summaryPrinted_(kFALSE) { this->createResonanceVector(); this->setDefaultBWRadius( LauBlattWeisskopfFactor::Parent, 4.0 ); } LauResonanceMaker::~LauResonanceMaker() { for ( std::vector::iterator iter = bwIndepFactors_.begin(); iter != bwIndepFactors_.end(); ++iter ) { delete *iter; } bwIndepFactors_.clear(); for ( BWFactorCategoryMap::iterator iter = bwFactors_.begin(); iter != bwFactors_.end(); ++iter ) { delete iter->second.bwFactor_; } bwFactors_.clear(); } LauResonanceMaker& LauResonanceMaker::get() { if ( resonanceMaker_ == 0 ) { resonanceMaker_ = new LauResonanceMaker(); } return *resonanceMaker_; } void LauResonanceMaker::createResonanceVector() { // Function to create all possible resonances that this class supports. // Also add in the sigma and kappa - but a special paramterisation is used // instead of the PDG "pole mass and width" values. std::cout << "INFO in LauResonanceMaker::createResonanceVector : Setting up possible resonance states..." << std::endl; LauResonanceInfo* neutral(0); LauResonanceInfo* positve(0); LauResonanceInfo* negatve(0); // Define the resonance names and store them in the array resInfo_.clear(); resInfo_.reserve(100); // rho resonances name, mass, width, spin, charge, default BW category, BW radius parameter (defaults to 4.0) // rho(770) neutral = new LauResonanceInfo("rho0(770)", 0.77526, 0.1478, 1, 0, LauBlattWeisskopfFactor::Light, 5.3); positve = new LauResonanceInfo("rho+(770)", 0.77511, 0.1491, 1, 1, LauBlattWeisskopfFactor::Light, 5.3); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // The following two lines of code are placed here in order to allow the following, rather niche, scenario: // The LauRhoOmegaMix code permits (through the use of the optional independentPar argument of LauResonanceInfo::addExtraParameter) the magnitude and phase of the rho/omega mixing to potentially differ between the decay of the parent particle to rho0 X and the parent antiparticle to rho0 Xbar. // This can be acheived by using the rho0(770) record in one case and the rho0(770)_COPY record in the other. neutral = neutral->createSharedParameterRecord("rho0(770)_COPY"); resInfo_.push_back( neutral ); // rho(1450) neutral = new LauResonanceInfo("rho0(1450)", 1.465, 0.400, 1, 0, LauBlattWeisskopfFactor::Light ); positve = new LauResonanceInfo("rho+(1450)", 1.465, 0.400, 1, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // rho_3(1690) neutral = new LauResonanceInfo("rho0_3(1690)", 1.686, 0.186, 3, 0, LauBlattWeisskopfFactor::Light ); positve = new LauResonanceInfo("rho+_3(1690)", 1.686, 0.186, 3, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // rho(1700) neutral = new LauResonanceInfo("rho0(1700)", 1.720, 0.250, 1, 0, LauBlattWeisskopfFactor::Light ); positve = new LauResonanceInfo("rho+(1700)", 1.720, 0.250, 1, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // rho(1900) neutral = new LauResonanceInfo("rho0(1900)", 1.909, 0.130, 1, 0, LauBlattWeisskopfFactor::Light ); positve = new LauResonanceInfo("rho+(1900)", 1.909, 0.130, 1, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // rho_3(1990) neutral = new LauResonanceInfo("rho0_3(1990)", 1.982, 0.188, 3, 0, LauBlattWeisskopfFactor::Light ); positve = new LauResonanceInfo("rho+_3(1990)", 1.982, 0.188, 3, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // K* resonances name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // K*(892) neutral = new LauResonanceInfo("K*0(892)", 0.89581, 0.0474, 1, 0, LauBlattWeisskopfFactor::Kstar, 3.0); positve = new LauResonanceInfo("K*+(892)", 0.89166, 0.0508, 1, 1, LauBlattWeisskopfFactor::Kstar, 3.0); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // K*(1410) neutral = new LauResonanceInfo("K*0(1410)", 1.414, 0.232, 1, 0, LauBlattWeisskopfFactor::Kstar ); positve = new LauResonanceInfo("K*+(1410)", 1.414, 0.232, 1, 1, LauBlattWeisskopfFactor::Kstar ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // K*_0(1430) neutral = new LauResonanceInfo("K*0_0(1430)", 1.425, 0.270, 0, 0, LauBlattWeisskopfFactor::Kstar ); positve = new LauResonanceInfo("K*+_0(1430)", 1.425, 0.270, 0, 1, LauBlattWeisskopfFactor::Kstar ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // LASS nonresonant model neutral = neutral->createSharedParameterRecord("LASSNR0"); positve = positve->createSharedParameterRecord("LASSNR+"); negatve = negatve->createSharedParameterRecord("LASSNR-"); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // K*_2(1430) neutral = new LauResonanceInfo("K*0_2(1430)", 1.4324, 0.109, 2, 0, LauBlattWeisskopfFactor::Kstar ); positve = new LauResonanceInfo("K*+_2(1430)", 1.4256, 0.0985, 2, 1, LauBlattWeisskopfFactor::Kstar ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // K*(1680) neutral = new LauResonanceInfo("K*0(1680)", 1.717, 0.322, 1, 0, LauBlattWeisskopfFactor::Kstar ); positve = new LauResonanceInfo("K*+(1680)", 1.717, 0.322, 1, 1, LauBlattWeisskopfFactor::Kstar ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // K*(1950) neutral = new LauResonanceInfo("K*0_0(1950)", 1.945, 0.201, 0, 0, LauBlattWeisskopfFactor::Kstar ); positve = new LauResonanceInfo("K*+_0(1950)", 1.945, 0.201, 0, 1, LauBlattWeisskopfFactor::Kstar ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // phi resonances name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // phi(1020) neutral = new LauResonanceInfo("phi(1020)", 1.019461, 0.004266, 1, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // phi(1680) neutral = new LauResonanceInfo("phi(1680)", 1.680, 0.150, 1, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f resonances name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // f_0(980) neutral = new LauResonanceInfo("f_0(980)", 0.990, 0.070, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_2(1270) neutral = new LauResonanceInfo("f_2(1270)", 1.2751, 0.1851, 2, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_0(1370) neutral = new LauResonanceInfo("f_0(1370)", 1.370, 0.350, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f'_0(1300), from Belle's Kspipi paper neutral = new LauResonanceInfo("f'_0(1300)", 1.449, 0.126, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_2(1430) neutral = new LauResonanceInfo("f_2(1430)", 1.430, 0.150, 2, 0, LauBlattWeisskopfFactor::Light ); // PDG width in the range 13 - 150 resInfo_.push_back( neutral ); // f_0(1500) neutral = new LauResonanceInfo("f_0(1500)", 1.505, 0.109, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f'_2(1525) neutral = new LauResonanceInfo("f'_2(1525)", 1.525, 0.073, 2, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_2(1565) neutral = new LauResonanceInfo("f_2(1565)", 1.562, 0.134, 2, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_2(1640) neutral = new LauResonanceInfo("f_2(1640)", 1.639, 0.099, 2, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_0(1710) neutral = new LauResonanceInfo("f_0(1710)", 1.722, 0.135, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_2(1810) neutral = new LauResonanceInfo("f_2(1810)", 1.816, 0.197, 2, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_2(1910) neutral = new LauResonanceInfo("f_2(1910)", 1.903, 0.196, 2, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_2(1950) neutral = new LauResonanceInfo("f_2(1950)", 1.944, 0.472, 2, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_2(2010) neutral = new LauResonanceInfo("f_2(2010)", 2.011, 0.202, 2, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_0(2020) neutral = new LauResonanceInfo("f_0(2020)", 1.992, 0.442, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_4(2050) neutral = new LauResonanceInfo("f_4(2050)", 2.018, 0.237, 4, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // f_0(2100) neutral = new LauResonanceInfo("f_0(2100)", 2.101, 0.224, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // omega resonances name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // omega(782) neutral = new LauResonanceInfo("omega(782)", 0.78265, 0.00849, 1, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // a resonances name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // a_0(980) neutral = new LauResonanceInfo("a0_0(980)", 0.980, 0.092, 0, 0, LauBlattWeisskopfFactor::Light ); positve = new LauResonanceInfo("a+_0(980)", 0.980, 0.092, 0, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // a_0(1450) neutral = new LauResonanceInfo("a0_0(1450)", 1.474, 0.265, 0, 0, LauBlattWeisskopfFactor::Light ); positve = new LauResonanceInfo("a+_0(1450)", 1.474, 0.265, 0, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // a_2(1320) neutral = new LauResonanceInfo("a0_2(1320)", 1.3190, 0.1050, 2, 0, LauBlattWeisskopfFactor::Light ); positve = new LauResonanceInfo("a+_2(1320)", 1.3190, 0.1050, 2, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // charmonium resonances name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // chi_c0 neutral = new LauResonanceInfo("chi_c0", 3.41475, 0.0105, 0, 0, LauBlattWeisskopfFactor::Charmonium ); resInfo_.push_back( neutral ); // chi_c1 neutral = new LauResonanceInfo("chi_c1", 3.51066, 0.00084, 0, 0, LauBlattWeisskopfFactor::Charmonium ); resInfo_.push_back( neutral ); // chi_c2 neutral = new LauResonanceInfo("chi_c2", 3.55620, 0.00193, 2, 0, LauBlattWeisskopfFactor::Charmonium ); resInfo_.push_back( neutral ); // X(3872) neutral = new LauResonanceInfo("X(3872)", 3.87169, 0.0012, 1, 0, LauBlattWeisskopfFactor::Charmonium ); resInfo_.push_back( neutral ); // unknown scalars name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // sigma neutral = new LauResonanceInfo("sigma0", 0.475, 0.550, 0, 0, LauBlattWeisskopfFactor::Light ); positve = new LauResonanceInfo("sigma+", 0.475, 0.550, 0, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // kappa neutral = new LauResonanceInfo("kappa0", 0.682, 0.547, 0, 0, LauBlattWeisskopfFactor::Kstar ); positve = new LauResonanceInfo("kappa+", 0.682, 0.547, 0, 1, LauBlattWeisskopfFactor::Kstar ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // dabba neutral = new LauResonanceInfo("dabba0", 2.098, 0.520, 0, 0, LauBlattWeisskopfFactor::Charm ); positve = new LauResonanceInfo("dabba+", 2.098, 0.520, 0, 1, LauBlattWeisskopfFactor::Charm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // excited charm states name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // D* neutral = new LauResonanceInfo("D*0", 2.00696, 0.0021, 1, 0, LauBlattWeisskopfFactor::Charm ); positve = new LauResonanceInfo("D*+", 2.01026, 83.4e-6, 1, 1, LauBlattWeisskopfFactor::Charm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // D*_0 neutral = new LauResonanceInfo("D*0_0", 2.318, 0.267, 0, 0, LauBlattWeisskopfFactor::Charm ); positve = new LauResonanceInfo("D*+_0", 2.403, 0.283, 0, 1, LauBlattWeisskopfFactor::Charm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // D*_2 //AVERAGE--neutral = new LauResonanceInfo("D*0_2", 2.4618, 0.049, 2, 0 ); neutral = new LauResonanceInfo("D*0_2", 2.4626, 0.049, 2, 0, LauBlattWeisskopfFactor::Charm ); positve = new LauResonanceInfo("D*+_2", 2.4643, 0.037, 2, 1, LauBlattWeisskopfFactor::Charm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // D1(2420) neutral = new LauResonanceInfo("D0_1(2420)", 2.4214, 0.0274, 1, 0, LauBlattWeisskopfFactor::Charm ); positve = new LauResonanceInfo("D+_1(2420)", 2.4232, 0.025, 1, 1, LauBlattWeisskopfFactor::Charm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // D(2600) //OLD--neutral = new LauResonanceInfo("D0(2600)", 2.6087, 0.093, 0, 0 ); //OLD--positve = new LauResonanceInfo("D+(2600)", 2.6213, 0.093, 0, 1 ); neutral = new LauResonanceInfo("D0(2600)", 2.612, 0.093, 0, 0, LauBlattWeisskopfFactor::Charm ); positve = new LauResonanceInfo("D+(2600)", 2.612, 0.093, 0, 1, LauBlattWeisskopfFactor::Charm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // D(2760) //OLD-- neutral = new LauResonanceInfo("D0(2760)", 2.7633, 0.061, 1, 0 ); //OLD-- positve = new LauResonanceInfo("D+(2760)", 2.7697, 0.061, 1, 1 ); neutral = new LauResonanceInfo("D0(2760)", 2.761, 0.063, 1, 0, LauBlattWeisskopfFactor::Charm ); positve = new LauResonanceInfo("D+(2760)", 2.761, 0.063, 1, 1, LauBlattWeisskopfFactor::Charm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // D(2900) neutral = new LauResonanceInfo("D0(3000)", 3.0, 0.15, 0, 0, LauBlattWeisskopfFactor::Charm ); resInfo_.push_back( neutral ); // D(3400) neutral = new LauResonanceInfo("D0(3400)", 3.4, 0.15, 0, 0, LauBlattWeisskopfFactor::Charm ); resInfo_.push_back( neutral ); // excited strange charm name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // Ds* positve = new LauResonanceInfo("Ds*+", 2.1121, 0.0019, 1, 1, LauBlattWeisskopfFactor::StrangeCharm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // Ds0*(2317) positve = new LauResonanceInfo("Ds*+_0(2317)", 2.3177, 0.0038, 0, 1, LauBlattWeisskopfFactor::StrangeCharm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // Ds2*(2573) positve = new LauResonanceInfo("Ds*+_2(2573)", 2.5719, 0.017, 2, 1, LauBlattWeisskopfFactor::StrangeCharm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // Ds1*(2700) positve = new LauResonanceInfo("Ds*+_1(2700)", 2.709, 0.117, 1, 1, LauBlattWeisskopfFactor::StrangeCharm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // Ds1*(2860) positve = new LauResonanceInfo("Ds*+_1(2860)", 2.862, 0.180, 1, 1, LauBlattWeisskopfFactor::StrangeCharm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // Ds3*(2860) positve = new LauResonanceInfo("Ds*+_3(2860)", 2.862, 0.058, 3, 1, LauBlattWeisskopfFactor::StrangeCharm ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // excited bottom states name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // B* neutral = new LauResonanceInfo("B*0", 5.3252, 0.00, 1, 0, LauBlattWeisskopfFactor::Beauty, 6.0); positve = new LauResonanceInfo("B*+", 5.3252, 0.00, 1, 1, LauBlattWeisskopfFactor::Beauty, 6.0); negatve = positve->createChargeConjugate(); resInfo_.push_back( neutral ); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // excited strange bottom name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // Bs* neutral = new LauResonanceInfo("Bs*0", 5.4154, 0.00, 1, 0, LauBlattWeisskopfFactor::StrangeBeauty, 6.0); resInfo_.push_back( neutral ); // nonresonant models name, mass, width, spin, charge, BW category, BW radius parameter (defaults to 4.0) // Phase-space nonresonant model neutral = new LauResonanceInfo("NonReson", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // Theory-based nonresonant model neutral = new LauResonanceInfo("NRModel", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // Belle nonresonant models neutral = new LauResonanceInfo("BelleSymNR", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); neutral = new LauResonanceInfo("BelleNR", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); positve = new LauResonanceInfo("BelleNR+", 0.0, 0.0, 0, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); neutral = new LauResonanceInfo("BelleNR_Swave", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); positve = new LauResonanceInfo("BelleNR_Swave+",0.0, 0.0, 0, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); neutral = new LauResonanceInfo("BelleNR_Pwave", 0.0, 0.0, 1, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); positve = new LauResonanceInfo("BelleNR_Pwave+",0.0, 0.0, 1, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); neutral = new LauResonanceInfo("BelleNR_Dwave", 0.0, 0.0, 2, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); positve = new LauResonanceInfo("BelleNR_Dwave+",0.0, 0.0, 2, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); neutral = new LauResonanceInfo("BelleNR_Fwave", 0.0, 0.0, 3, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); positve = new LauResonanceInfo("BelleNR_Fwave+",0.0, 0.0, 3, 1, LauBlattWeisskopfFactor::Light ); negatve = positve->createChargeConjugate(); resInfo_.push_back( positve ); resInfo_.push_back( negatve ); // Taylor expansion nonresonant model neutral = new LauResonanceInfo("NRTaylor", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // Polynomial nonresonant models neutral = new LauResonanceInfo("PolNR_S0", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); neutral = new LauResonanceInfo("PolNR_S1", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); neutral = new LauResonanceInfo("PolNR_S2", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); neutral = new LauResonanceInfo("PolNR_P0", 0.0, 0.0, 1, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); neutral = new LauResonanceInfo("PolNR_P1", 0.0, 0.0, 1, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); neutral = new LauResonanceInfo("PolNR_P2", 0.0, 0.0, 1, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // Fake resonances for S-Wave splines neutral = new LauResonanceInfo("Spline_S0", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); neutral = new LauResonanceInfo("Spline_S0_Bar", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // Polar Form Factor nonresonant model neutral = new LauResonanceInfo("PolarFFSymNR", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); neutral = new LauResonanceInfo("PolarFFNR", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); // PiPi-KK Inelastic Scattering neutral = new LauResonanceInfo("Rescattering", 0.0, 0.0, 0, 0, LauBlattWeisskopfFactor::Light ); resInfo_.push_back( neutral ); nResDefMax_ = resInfo_.size(); } void LauResonanceMaker::setBWType(const LauBlattWeisskopfFactor::BarrierType bwType) { // Check whether any BW factors have been created and bail out if so if ( ! bwIndepFactors_.empty() ) { std::cerr << "ERROR in LauResonanceMaker::setBWType : some barrier factors have already been created - cannot change the barrier type now!" << std::endl; return; } for ( BWFactorCategoryMap::const_iterator iter = bwFactors_.begin(); iter != bwFactors_.end(); ++iter ) { if ( iter->second.bwFactor_ != 0 ) { std::cerr << "ERROR in LauResonanceMaker::setBWType : some barrier factors have already been created - cannot change the barrier type now!" << std::endl; return; } } bwBarrierType_ = bwType; } void LauResonanceMaker::setBWBachelorRestFrame(const LauBlattWeisskopfFactor::RestFrame restFrame) { // Check whether any BW factors have been created and bail out if so if ( ! bwIndepFactors_.empty() ) { std::cerr << "ERROR in LauResonanceMaker::setBWBachelorRestFrame : some barrier factors have already been created - cannot change the rest frame now!" << std::endl; return; } for ( BWFactorCategoryMap::const_iterator iter = bwFactors_.begin(); iter != bwFactors_.end(); ++iter ) { if ( iter->second.bwFactor_ != 0 ) { std::cerr << "ERROR in LauResonanceMaker::setBWBachelorRestFrame : some barrier factors have already been created - cannot change the rest frame now!" << std::endl; return; } } bwRestFrame_ = restFrame; } void LauResonanceMaker::setSpinFormalism(const LauAbsResonance::LauSpinType spinType) { if ( summaryPrinted_ ) { std::cerr << "ERROR in LauResonanceMaker::setSpinFormalism : cannot redefine the spin formalism after creating one or more resonances" << std::endl; return; } spinFormalism_ = spinType; } void LauResonanceMaker::setDefaultBWRadius(const LauBlattWeisskopfFactor::BlattWeisskopfCategory bwCategory, const Double_t bwRadius) { if ( bwCategory == LauBlattWeisskopfFactor::Default || bwCategory == LauBlattWeisskopfFactor::Indep ) { std::cerr << "WARNING in LauResonanceMaker::setDefaultBWRadius : cannot set radius values for Default or Indep categories" << std::endl; return; } // Check if we have an information object for this category BWFactorCategoryMap::iterator factor_iter = bwFactors_.find( bwCategory ); if ( factor_iter != bwFactors_.end() ) { // If so, we can set the value in the information object BlattWeisskopfCategoryInfo& categoryInfo = factor_iter->second; categoryInfo.defaultRadius_ = bwRadius; // Then we can check if a LauBlattWeisskopfFactor object has been created for this category LauBlattWeisskopfFactor* bwFactor = categoryInfo.bwFactor_; if ( bwFactor != 0 ) { // If it has then we can also set its radius value directly LauParameter* radius = bwFactor->getRadiusParameter(); radius->value(bwRadius); radius->initValue(bwRadius); radius->genValue(bwRadius); } } else { // If not then we just store the value to be used later BlattWeisskopfCategoryInfo& categoryInfo = bwFactors_[bwCategory]; categoryInfo.bwFactor_ = 0; categoryInfo.defaultRadius_ = bwRadius; categoryInfo.radiusFixed_ = kTRUE; } } void LauResonanceMaker::fixBWRadius(const LauBlattWeisskopfFactor::BlattWeisskopfCategory bwCategory, const Bool_t fixRadius) { if ( bwCategory == LauBlattWeisskopfFactor::Default || bwCategory == LauBlattWeisskopfFactor::Indep ) { std::cerr << "WARNING in LauResonanceMaker::fixBWRadius : cannot fix/float radius values for Default or Indep categories" << std::endl; return; } // Check if we have an information object for this category BWFactorCategoryMap::iterator factor_iter = bwFactors_.find( bwCategory ); if ( factor_iter != bwFactors_.end() ) { // If so, we can set the value in the information object BlattWeisskopfCategoryInfo& categoryInfo = factor_iter->second; categoryInfo.radiusFixed_ = fixRadius; // Then we can check if a LauBlattWeisskopfFactor object has been created for this category LauBlattWeisskopfFactor* bwFactor = categoryInfo.bwFactor_; if ( bwFactor != 0 ) { // If it has then we can also fix/float its radius value directly LauParameter* radius = bwFactor->getRadiusParameter(); radius->fixed(fixRadius); } } else { // If not then we just store the value to be used later BlattWeisskopfCategoryInfo& categoryInfo = bwFactors_[bwCategory]; categoryInfo.bwFactor_ = 0; categoryInfo.defaultRadius_ = -1.0; categoryInfo.radiusFixed_ = fixRadius; } } LauBlattWeisskopfFactor* LauResonanceMaker::getBWFactor( const LauBlattWeisskopfFactor::BlattWeisskopfCategory bwCategory, const LauResonanceInfo* resInfo ) { LauBlattWeisskopfFactor* bwFactor(0); // If this is an independent factor, create it and add it to the list of independent factors, then return it if ( bwCategory == LauBlattWeisskopfFactor::Indep ) { bwFactor = new LauBlattWeisskopfFactor( *resInfo, bwBarrierType_, bwRestFrame_, bwCategory ); bwIndepFactors_.push_back(bwFactor); return bwFactor; } // Otherwise, look up the category in the category information map BWFactorCategoryMap::iterator factor_iter = bwFactors_.find( bwCategory ); if ( factor_iter == bwFactors_.end() ) { // If the category is currently undefined we need to create it bwFactor = new LauBlattWeisskopfFactor( *resInfo, bwBarrierType_, bwRestFrame_, bwCategory ); BlattWeisskopfCategoryInfo& categoryInfo = bwFactors_[bwCategory]; categoryInfo.bwFactor_ = bwFactor; categoryInfo.defaultRadius_ = bwFactor->getRadiusParameter()->value(); categoryInfo.radiusFixed_ = kTRUE; } else { // If it exists, we can check if the factor object has been created BlattWeisskopfCategoryInfo& categoryInfo = factor_iter->second; if ( categoryInfo.bwFactor_ != 0 ) { // If so, simply clone it const UInt_t resSpin = resInfo->getSpin(); bwFactor = categoryInfo.bwFactor_->createClone( resSpin ); } else { // Otherwise we need to create it, using the default value if it has been set if ( categoryInfo.defaultRadius_ >= 0.0 ) { bwFactor = new LauBlattWeisskopfFactor( *resInfo, categoryInfo.defaultRadius_, bwBarrierType_, bwRestFrame_, bwCategory ); } else { bwFactor = new LauBlattWeisskopfFactor( *resInfo, bwBarrierType_, bwRestFrame_, bwCategory ); } categoryInfo.bwFactor_ = bwFactor; // Set whether the radius should be fixed/floated LauParameter* radius = bwFactor->getRadiusParameter(); radius->fixed( categoryInfo.radiusFixed_ ); } } return bwFactor; } LauAbsResonance* LauResonanceMaker::getResonance(const LauDaughters* daughters, const TString& resName, const Int_t resPairAmpInt, const LauAbsResonance::LauResonanceModel resType, const LauBlattWeisskopfFactor::BlattWeisskopfCategory bwCategory) { // Routine to return the appropriate LauAbsResonance object given the resonance // name (resName), which daughter is the bachelor track (resPairAmpInt = 1,2 or 3), // and the resonance type ("BW" = Breit-Wigner, "Flatte" = Flatte distribution). // If this is the first resonance we are making, first print a summary of the formalism if ( ! summaryPrinted_ ) { std::cout << "INFO in LauResonanceMaker::getResonance : Freezing amplitude formalism:" << std::endl; switch ( spinFormalism_ ) { case LauAbsResonance::Zemach_P : std::cout << " : Spin factors use Zemach spin tensors, with bachelor momentum in resonance rest frame" << std::endl; break; case LauAbsResonance::Zemach_Pstar : std::cout << " : Spin factors use Zemach spin tensors, with bachelor momentum in parent rest frame" << std::endl; break; case LauAbsResonance::Covariant : std::cout << " : Spin factors use Covariant spin tensors" << std::endl; break; case LauAbsResonance::Legendre : std::cout << " : Spin factors are just Legendre polynomials" << std::endl; break; } switch ( bwBarrierType_ ) { case LauBlattWeisskopfFactor::BWBarrier : std::cout << " : Blatt-Weisskopf barrier factors are the 'non-primed' form" << std::endl; break; case LauBlattWeisskopfFactor::BWPrimeBarrier : std::cout << " : Blatt-Weisskopf barrier factors are the 'primed' form" << std::endl; break; case LauBlattWeisskopfFactor::ExpBarrier : std::cout << " : Blatt-Weisskopf barrier factors are the exponential form" << std::endl; break; } switch ( bwRestFrame_ ) { case LauBlattWeisskopfFactor::ParentFrame : std::cout << " : Blatt-Weisskopf barrier factors use bachelor momentum in parent rest frame" << std::endl; break; case LauBlattWeisskopfFactor::ResonanceFrame : std::cout << " : Blatt-Weisskopf barrier factors use bachelor momentum in resonance rest frame" << std::endl; break; case LauBlattWeisskopfFactor::Covariant : std::cout << " : Blatt-Weisskopf barrier factors use covariant expression" << std::endl; break; } summaryPrinted_ = kTRUE; } // Loop over all possible resonance states we have defined in // createResonanceVector() until we get a match with the name of the resonance LauResonanceInfo* resInfo(0); for (std::vector::const_iterator iter=resInfo_.begin(); iter!=resInfo_.end(); ++iter) { if (resName == (*iter)->getName()) { // We have recognised the resonance name. std::cout<<"INFO in LauResonanceMaker::getResonance : Creating resonance: "<getBWCategory(); } LauBlattWeisskopfFactor* resBWFactor = this->getBWFactor( resCategory, resInfo ); LauBlattWeisskopfFactor* parBWFactor = this->getBWFactor( parCategory, resInfo ); theResonance->setBarrierRadii( resBWFactor, parBWFactor ); break; } case LauAbsResonance::GS : { // Gounaris-Sakurai function to try and model the rho(770) better std::cout<<" : Using Gounaris-Sakurai lineshape. "<getBWCategory(); } LauBlattWeisskopfFactor* resBWFactor = this->getBWFactor( resCategory, resInfo ); LauBlattWeisskopfFactor* parBWFactor = this->getBWFactor( parCategory, resInfo ); theResonance->setBarrierRadii( resBWFactor, parBWFactor ); break; } case LauAbsResonance::Flatte : // Flatte distribution - coupled channel Breit-Wigner std::cout<<" : Using Flatte lineshape. "<getBWCategory(); } LauBlattWeisskopfFactor* resBWFactor = this->getBWFactor( resCategory, resInfo ); LauBlattWeisskopfFactor* parBWFactor = this->getBWFactor( parCategory, resInfo ); theResonance->setBarrierRadii( resBWFactor, parBWFactor ); break; } // Set the spin formalism choice theResonance->setSpinType( spinFormalism_ ); return theResonance; } Int_t LauResonanceMaker::resTypeInt(const TString& name) const { // Internal function that returns the resonance integer, specified by the // order of the resonance vector defined in createResonanceVector(), // for a given resonance name. Int_t resTypInt(-99); Int_t i(0); for (std::vector::const_iterator iter=resInfo_.begin(); iter!=resInfo_.end(); ++iter) { if (name.BeginsWith((*iter)->getName(), TString::kExact) == kTRUE) { // We have recognised the resonance from those that are available resTypInt = i; return resTypInt; } ++i; } return resTypInt; } void LauResonanceMaker::printAll( std::ostream& stream ) const { for ( std::vector::const_iterator iter = resInfo_.begin(); iter != resInfo_.end(); ++iter ) { stream << (**iter) << std::endl; } } LauResonanceInfo* LauResonanceMaker::getResInfo(const TString& resName) const { LauResonanceInfo* resInfo(0); for (std::vector::const_iterator iter=resInfo_.begin(); iter!=resInfo_.end(); ++iter) { if (resName == (*iter)->getName()) { // We have recognised the resonance name. resInfo = (*iter); // stop looping break; } } return resInfo; } Index: trunk/src/LauFitter.cc =================================================================== --- trunk/src/LauFitter.cc (revision 563) +++ trunk/src/LauFitter.cc (revision 564) @@ -1,61 +1,64 @@ /* Copyright 2005 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauFitter.cc \brief File containing implementation of LauFitter methods. */ #include #include "LauFitter.hh" #include "LauAbsFitter.hh" #include "LauMinuit.hh" +ClassImp(LauFitter) + + LauAbsFitter* LauFitter::theInstance_ = 0; LauFitter::Type LauFitter::fitterType_ = LauFitter::Minuit; void LauFitter::setFitterType( Type type ) { if ( theInstance_ != 0 ) { std::cerr << "ERROR in LauFitter::setFitterType : The fitter has already been created, cannot change the type now." << std::endl; return; } fitterType_ = type; } LauAbsFitter* LauFitter::fitter() { // Returns a pointer to a singleton LauAbsFitter object. // Creates the object the first time it is called. if ( theInstance_ == 0 ) { if ( fitterType_ == Minuit ) { theInstance_ = new LauMinuit(); } } return theInstance_; } Index: trunk/src/LauPoleRes.cc =================================================================== --- trunk/src/LauPoleRes.cc (revision 563) +++ trunk/src/LauPoleRes.cc (revision 564) @@ -1,77 +1,77 @@ /* -Copyright 2004 University of Warwick +Copyright 2018 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ -/*! \file LauBelleNR.cc - \brief File containing implementation of LauBelleNR class. +/*! \file LauPoleRes.cc + \brief File containing implementation of LauPoleRes class. */ #include "LauPoleRes.hh" ClassImp(LauPoleRes) LauPoleRes::LauPoleRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) : LauAbsResonance(resInfo, resPairAmpInt, daughters) { } LauPoleRes::~LauPoleRes() { } void LauPoleRes::initialise() { } LauComplex LauPoleRes::resAmp(Double_t mass, Double_t spinTerm) { // This function returns the complex dynamical amplitude for a pole. 1/((mpole*mpole)-m*m) - // mpole==(m0-iw0)==(rePole-i imPole), to use the already defined mass and width of the resonance + // mpole==(m0-iw0)==(rePole-i*imPole), to use the already defined mass and width of the resonance Double_t rePole = this->getMass(); Double_t imPole = this->getWidth(); Double_t reTerm = rePole*rePole -imPole*imPole -mass*mass; - Double_t imTerm = 2.0*rePole*imPole; + Double_t imTerm = 2.0*rePole*imPole; LauComplex resAmplitude(reTerm, imTerm); resAmplitude.rescale(1./(reTerm*reTerm + imTerm*imTerm)); return resAmplitude.scale(spinTerm); } const std::vector& LauPoleRes::getFloatingParameters() { this->clearFloatingParameters(); if ( ! this->fixMass() ) { this->addFloatingParameter( this->getMassPar() ); } if ( ! this->fixWidth() ) { this->addFloatingParameter( this->getWidthPar() ); } return this->getParameters(); } Index: trunk/src/Lau1DCubicSpline.cc =================================================================== --- trunk/src/Lau1DCubicSpline.cc (revision 563) +++ trunk/src/Lau1DCubicSpline.cc (revision 564) @@ -1,340 +1,343 @@ /* Copyright 2015 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file Lau1DCubicSpline.cc \brief File containing implementation of Lau1DCubicSpline class. */ #include #include #include #include #include #include "Lau1DCubicSpline.hh" +ClassImp(Lau1DCubicSpline) + + Lau1DCubicSpline::Lau1DCubicSpline(const std::vector& xs, const std::vector& ys, LauSplineType type, LauSplineBoundaryType leftBound, LauSplineBoundaryType rightBound, Double_t dydx0, Double_t dydxn) : nKnots_(xs.size()), x_(xs), y_(ys), type_(type), leftBound_(leftBound), rightBound_(rightBound), dydx0_(dydx0), dydxn_(dydxn) { init(); } Lau1DCubicSpline::~Lau1DCubicSpline() { } Double_t Lau1DCubicSpline::evaluate(Double_t x) const { // do not attempt to extrapolate the spline if( xx_[nKnots_-1] ) { std::cout << "WARNING in Lau1DCubicSpline::evaluate : function is only defined between " << x_[0] << " and " << x_[nKnots_-1] << std::endl; std::cout << " value at " << x << " returned as 0" << std::endl; return 0.; } // first determine which 'cell' of the spline x is in // cell i runs from knot i to knot i+1 Int_t cell(0); while( x > x_[cell+1] ) { ++cell; } // obtain x- and y-values of the neighbouring knots Double_t xLow = x_[cell]; Double_t xHigh = x_[cell+1]; Double_t yLow = y_[cell]; Double_t yHigh = y_[cell+1]; if(type_ == Lau1DCubicSpline::LinearInterpolation) { return yHigh*(x-xLow)/(xHigh-xLow) + yLow*(xHigh-x)/(xHigh-xLow); } // obtain t, the normalised x-coordinate within the cell, // and the coefficients a and b, which are defined in cell i as: // // a_i = k_i *(x_i+1 - x_i) - (y_i+1 - y_i), // b_i = -k_i+1*(x_i+1 - x_i) + (y_i+1 - y_i) // // where k_i is (by construction) the first derivative at knot i Double_t t = (x - xLow) / (xHigh - xLow); Double_t a = dydx_[cell] * (xHigh - xLow) - (yHigh - yLow); Double_t b = -1.*dydx_[cell+1] * (xHigh - xLow) + (yHigh - yLow); Double_t retVal = (1 - t) * yLow + t * yHigh + t * (1 - t) * ( a * (1 - t) + b * t ); return retVal; } void Lau1DCubicSpline::updateYValues(const std::vector& ys) { y_ = ys; this->calcDerivatives(); } void Lau1DCubicSpline::updateType(LauSplineType type) { if(type_ != type) { type_ = type; this->calcDerivatives(); } } void Lau1DCubicSpline::updateBoundaryConditions(LauSplineBoundaryType leftBound, LauSplineBoundaryType rightBound, Double_t dydx0, Double_t dydxn) { Bool_t updateDerivatives(kFALSE); if(leftBound_ != leftBound || rightBound_ != rightBound) { leftBound_ = leftBound; rightBound_ = rightBound; updateDerivatives = kTRUE; } if(dydx0_ != dydx0) { dydx0_ = dydx0; if(leftBound_ == Lau1DCubicSpline::Clamped) updateDerivatives = kTRUE; } if(dydxn_ != dydxn) { dydxn_ = dydxn; if(rightBound_ == Lau1DCubicSpline::Clamped) updateDerivatives = kTRUE; } if(updateDerivatives) { this->calcDerivatives(); } } void Lau1DCubicSpline::init() { if( y_.size() != x_.size()) { std::cout << "ERROR in Lau1DCubicSpline::init : The number of y-values given does not match the number of x-values" << std::endl; std::cout << " Found " << y_.size() << ", expected " << x_.size() << std::endl; gSystem->Exit(EXIT_FAILURE); } dydx_.insert(dydx_.begin(),nKnots_,0.); a_.insert(a_.begin(),nKnots_,0.); b_.insert(b_.begin(),nKnots_,0.); c_.insert(c_.begin(),nKnots_,0.); d_.insert(d_.begin(),nKnots_,0.); this->calcDerivatives(); } void Lau1DCubicSpline::calcDerivatives() { switch ( type_ ) { case Lau1DCubicSpline::StandardSpline : this->calcDerivativesStandard(); break; case Lau1DCubicSpline::AkimaSpline : this->calcDerivativesAkima(); break; case Lau1DCubicSpline::LinearInterpolation : //derivatives not needed for linear interpolation break; } } void Lau1DCubicSpline::calcDerivativesStandard() { // derivatives are determined such that the second derivative is continuous at internal knots // derivatives, k_i, are the solutions to a set of linear equations of the form: // a_i * k_i-1 + b_i * k+i + c_i * k_i+1 = d_i with a_0 = 0, c_n-1 = 0 // this is solved using the tridiagonal matrix algorithm as on en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm // first and last equations give boundary conditions // - for natural boundary, require f''(x) = 0 at end knot // - for 'not a knot' boundary, require f'''(x) continuous at second knot // - for clamped boundary, require predefined value of f'(x) at end knot // non-zero values of a_0 and c_n-1 would give cyclic boundary conditions a_[0] = 0.; c_[nKnots_-1] = 0.; // set left boundary condition if(leftBound_ == Lau1DCubicSpline::Natural) { b_[0] = 2./(x_[1]-x_[0]); c_[0] = 1./(x_[1]-x_[0]); d_[0] = 3.*(y_[1]-y_[0])/((x_[1]-x_[0])*(x_[1]-x_[0])); } else if(leftBound_ == Lau1DCubicSpline::NotAKnot) { // define the width, h, and the 'slope', delta, of the first cell Double_t h1(x_[1]-x_[0]), h2(x_[2]-x_[0]); Double_t delta1((y_[1]-y_[0])/h1), delta2((y_[2]-y_[1])/h2); // these coefficients can be determined by requiring f'''_0(x_1) = f'''_1(x_1) // the requirement f''_0(x_1) = f''_1(x_1) has been used to remove the dependence on k_2 b_[0] = h2; c_[0] = h1+h2; d_[0] = delta1*(2.*h2*h2 + 3.*h1*h2)/(h1+h2) + delta2*5.*h1*h1/(h1+h2); } else { //Clamped b_[0] = 1.; c_[0] = 0.; d_[0] = dydx0_; } // set right boundary condition if(rightBound_ == Lau1DCubicSpline::Natural) { a_[nKnots_-1] = 1./(x_[nKnots_-1]-x_[nKnots_-2]); b_[nKnots_-1] = 2./(x_[nKnots_-1]-x_[nKnots_-2]); d_[nKnots_-1] = 3.*(y_[nKnots_-1]-y_[nKnots_-2])/((x_[nKnots_-1]-x_[nKnots_-2])*(x_[nKnots_-1]-x_[nKnots_-2])); } else if(rightBound_ == Lau1DCubicSpline::NotAKnot) { // define the width, h, and the 'slope', delta, of the last cell Double_t hnm1(x_[nKnots_-1]-x_[nKnots_-2]), hnm2(x_[nKnots_-2]-x_[nKnots_-3]); Double_t deltanm1((y_[nKnots_-1]-y_[nKnots_-2])/hnm1), deltanm2((y_[nKnots_-2]-y_[nKnots_-3])/hnm2); // these coefficients can be determined by requiring f'''_n-3(x_n-2) = f'''_n-2(x_n-2) // the requirement f''_n-3(x_n-2) = f''_n-2(x_n-2) has been used to remove // the dependence on k_n-3 a_[nKnots_-1] = hnm2 + hnm1; b_[nKnots_-1] = hnm1; d_[nKnots_-1] = deltanm2*hnm1*hnm1/(hnm2+hnm1) + deltanm1*(2.*hnm2*hnm2 + 3.*hnm2*hnm1)/(hnm2+hnm1); } else { //Clamped a_[nKnots_-1] = 0.; b_[nKnots_-1] = 1.; d_[nKnots_-1] = dydxn_; } // the remaining equations ensure that f_i-1''(x_i) = f''_i(x_i) for all internal knots for(UInt_t i=1; i=0; --i) { dydx_[i] = d_[i] - c_[i]*dydx_[i+1]; } } void Lau1DCubicSpline::calcDerivativesAkima() { //derivatives are calculated according to the Akima method // J.ACM vol. 17 no. 4 pp 589-602 Double_t am1(0.), an(0.), anp1(0.); // a[i] is the slope of the segment from point i-1 to point i // // n.b. segment 0 is before point 0 and segment n is after point n-1 // internal segments are numbered 1 - n-1 for(UInt_t i=1; i #include "TSystem.h" #include "LauAbsResonance.hh" #include "LauConstants.hh" #include "LauDaughters.hh" #include "LauKinematics.hh" #include "LauParameter.hh" #include "LauResonanceInfo.hh" ClassImp(LauAbsResonance) bool LauAbsResonance::isIncoherentModel(LauResonanceModel model) { switch(model) { case BW: case RelBW: case GS: case Flatte: case Sigma: case Kappa: case Dabba: case LASS: case LASS_BW: case LASS_NR: case EFKLLM: case KMatrix: case FlatNR: case NRModel: case BelleNR: case PowerLawNR: case BelleSymNR: case BelleSymNRNoInter: case TaylorNR: case PolNR: - case POLE: - case PolarFFNR: - case PolarFFSymNR: - case PolarFFSymNRNoInter: - case Rescattering: - case Rescattering2: - case RescatteringNoInter: + case Pole: + case PolarFFNR: + case PolarFFSymNR: + case PolarFFSymNRNoInter: + case Rescattering: + case Rescattering2: + case RescatteringNoInter: case MIPW_MagPhase: case MIPW_RealImag: case RhoOmegaMix_GS: case RhoOmegaMix_RBW: case RhoOmegaMix_GS_1: case RhoOmegaMix_RBW_1: break; case GaussIncoh: return true; } return false; } // Constructor LauAbsResonance::LauAbsResonance(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) : resInfo_(resInfo), daughters_(daughters), nameParent_(""), nameDaug1_(""), nameDaug2_(""), nameBachelor_(""), chargeParent_(0), chargeDaug1_(0), chargeDaug2_(0), chargeBachelor_(0), massParent_(0.0), massDaug1_(0.0), massDaug2_(0.0), massBachelor_(0.0), resName_( (resInfo!=0) ? resInfo->getName() : "" ), sanitisedName_( (resInfo!=0) ? resInfo->getSanitisedName() : "" ), resMass_( (resInfo!=0) ? resInfo->getMass() : 0 ), resWidth_( (resInfo!=0) ? resInfo->getWidth() : 0 ), resSpin_( (resInfo!=0) ? resInfo->getSpin() : 0 ), resCharge_( (resInfo!=0) ? resInfo->getCharge() : 0 ), resPairAmpInt_(resPairAmpInt), parBWFactor_(0), resBWFactor_(0), spinType_(Zemach_P), flipHelicity_(kFALSE), ignoreMomenta_(kFALSE), ignoreSpin_(kFALSE), ignoreBarrierScaling_(kFALSE), mass_(0.0), cosHel_(0.0), q_(0.0), p_(0.0), pstar_(0.0), erm_(1.0), covFactor_(1.0) { if ( resInfo == 0 ) { std::cerr << "ERROR in LauAbsResonance constructor : null LauResonanceInfo object provided" << std::endl; gSystem->Exit(EXIT_FAILURE); } if ( daughters_ == 0 ) { std::cerr << "ERROR in LauAbsResonance constructor : null LauDaughters object provided" << std::endl; gSystem->Exit(EXIT_FAILURE); } nameParent_ = this->getNameParent(); nameDaug1_ = this->getNameDaug1(); nameDaug2_ = this->getNameDaug2(); nameBachelor_ = this->getNameBachelor(); massParent_ = this->getMassParent(); massDaug1_ = this->getMassDaug1(); massDaug2_ = this->getMassDaug2(); massBachelor_ = this->getMassBachelor(); chargeParent_ = this->getChargeParent(); chargeDaug1_ = this->getChargeDaug1(); chargeDaug2_ = this->getChargeDaug2(); chargeBachelor_ = this->getChargeBachelor(); // check that the total charge adds up to that of the resonance Int_t totalCharge = chargeDaug1_ + chargeDaug2_; if ( (totalCharge != resCharge_) && (resPairAmpInt_ != 0) ) { std::cerr << "ERROR in LauAbsResonance : Total charge of daughters = " << totalCharge << ". Resonance charge = " << resCharge_ << "." << std::endl; gSystem->Exit(EXIT_FAILURE); } } // Constructor LauAbsResonance::LauAbsResonance(const TString& resName, const Int_t resPairAmpInt, const LauDaughters* daughters) : resInfo_(0), daughters_(daughters), nameParent_(""), nameDaug1_(""), nameDaug2_(""), nameBachelor_(""), chargeParent_(0), chargeDaug1_(0), chargeDaug2_(0), chargeBachelor_(0), massParent_(0.0), massDaug1_(0.0), massDaug2_(0.0), massBachelor_(0.0), resName_(resName), sanitisedName_(resName), resMass_(0), resWidth_(0), resSpin_(0), resCharge_(0), resPairAmpInt_(resPairAmpInt), parBWFactor_(0), resBWFactor_(0), spinType_(Zemach_P), flipHelicity_(kFALSE), ignoreMomenta_(kFALSE), ignoreSpin_(kFALSE), ignoreBarrierScaling_(kFALSE), mass_(0.0), cosHel_(0.0), q_(0.0), p_(0.0), pstar_(0.0), erm_(1.0), covFactor_(1.0) { if ( daughters_ == 0 ) { std::cerr << "ERROR in LauAbsResonance constructor : null LauDaughters object provided" << std::endl; gSystem->Exit(EXIT_FAILURE); } nameParent_ = this->getNameParent(); nameDaug1_ = this->getNameDaug1(); nameDaug2_ = this->getNameDaug2(); nameBachelor_ = this->getNameBachelor(); massParent_ = this->getMassParent(); massDaug1_ = this->getMassDaug1(); massDaug2_ = this->getMassDaug2(); massBachelor_ = this->getMassBachelor(); chargeParent_ = this->getChargeParent(); chargeDaug1_ = this->getChargeDaug1(); chargeDaug2_ = this->getChargeDaug2(); chargeBachelor_ = this->getChargeBachelor(); // Since we haven't been provided with a LauResonanceInfo object we can just // set the change of the resonance to be the sum of the daughter charges resCharge_ = chargeDaug1_ + chargeDaug2_; } // Destructor LauAbsResonance::~LauAbsResonance() { } LauComplex LauAbsResonance::amplitude(const LauKinematics* kinematics) { // Use LauKinematics interface for amplitude // For resonance made from tracks i, j, we need the momenta // of tracks i and k in the i-j rest frame for spin helicity calculations // in the Zemach tensor formalism. // Also need the momentum of track k in the parent rest-frame for // calculation of the Blatt-Weisskopf factors. mass_ = 0.0; cosHel_ = 0.0; q_ = 0.0; p_ = 0.0; pstar_ = 0.0; erm_ = 1.0; covFactor_ = 1.0; if (resPairAmpInt_ == 1) { mass_ = kinematics->getm23(); cosHel_ = kinematics->getc23(); q_ = kinematics->getp2_23(); p_ = kinematics->getp1_23(); pstar_ = kinematics->getp1_Parent(); erm_ = kinematics->getcov23(); } else if (resPairAmpInt_ == 2) { mass_ = kinematics->getm13(); cosHel_ = kinematics->getc13(); q_ = kinematics->getp1_13(); p_ = kinematics->getp2_13(); pstar_ = kinematics->getp2_Parent(); erm_ = kinematics->getcov13(); } else if (resPairAmpInt_ == 3) { mass_ = kinematics->getm12(); cosHel_ = kinematics->getc12(); q_ = kinematics->getp1_12(); p_ = kinematics->getp3_12(); pstar_ = kinematics->getp3_Parent(); erm_ = kinematics->getcov12(); } else { std::cerr << "ERROR in LauAbsResonance::amplitude : Nonsense setup of resPairAmp array." << std::endl; gSystem->Exit(EXIT_FAILURE); } if (this->flipHelicity()) { cosHel_ *= -1.0; } if (this->ignoreMomenta()) { q_ = 1.0; p_ = 1.0; pstar_ = 1.0; erm_ = 1.0; } // Calculate the spin factors Double_t spinTerm(1.0); Double_t pProd(1.0); if (!this->ignoreSpin()) { switch ( this->getSpinType() ) { case Zemach_P: pProd = q_*p_; spinTerm = this->calcZemachSpinFactor( pProd ); break; case Zemach_Pstar: pProd = q_*pstar_; spinTerm = this->calcZemachSpinFactor( pProd ); break; case Covariant: pProd = q_*pstar_; spinTerm = this->calcCovSpinFactor( pProd ); break; case Legendre: spinTerm = this->calcLegendrePoly(); break; } } // Calculate the full amplitude LauComplex resAmplitude = this->resAmp(mass_, spinTerm); return resAmplitude; } void LauAbsResonance::calcCovFactor( const Double_t erm ) { if (resSpin_ == 0) { covFactor_ = 1.0; } else if (resSpin_ == 1) { covFactor_ = erm; } else if (resSpin_ == 2) { covFactor_ = erm*erm + 0.5; } else if (resSpin_ == 3) { covFactor_ = erm*(erm*erm + 1.5); } else if (resSpin_ == 4) { covFactor_ = (8.*erm*erm*erm*erm + 24.*erm*erm + 3.)/35.; } else if (resSpin_ > 4) { std::cerr << "WARNING in LauAbsResonance::calcCovFactor : covariant spin factor cannot (yet) be fully calculated for spin >= 5" << std::endl; std::cerr << " : the function of sqrt(1 + (p/mParent)^2) part will be missing" << std::endl; covFactor_ = 1.0; } } Double_t LauAbsResonance::calcCovSpinFactor( const Double_t pProd ) { if (resSpin_ == 0) { covFactor_ = 1.0; return 1.0; } // Covariant spin factor is (p* q)^L * f_L(erm) * P_L(cosHel) Double_t spinFactor(pProd); for ( Int_t i(1); i < resSpin_; ++i ) { spinFactor *= pProd; } this->calcCovFactor( erm_ ); spinFactor *= covFactor_; spinFactor *= this->calcLegendrePoly(); return spinFactor; } Double_t LauAbsResonance::calcZemachSpinFactor( const Double_t pProd ) const { // Calculate the spin factors // // These are calculated as follows // // -2^j * (q*p)^j * cj * Pj(cosHel) // // where Pj(coshHel) is the jth order Legendre polynomial and // // cj = j! / (2j-1)!! if (resSpin_ == 0) { return 1.0; } Double_t spinFactor(pProd); for ( Int_t i(1); i < resSpin_; ++i ) { spinFactor *= pProd; } spinFactor *= this->calcLegendrePoly(); return spinFactor; } Double_t LauAbsResonance::calcLegendrePoly( const Double_t cosHel ) { cosHel_ = cosHel; return this->calcLegendrePoly(); } Double_t LauAbsResonance::calcLegendrePoly() const { Double_t legPol = 1.0; if (resSpin_ == 1) { // Calculate vector resonance Legendre polynomial legPol = -2.0*cosHel_; } else if (resSpin_ == 2) { // Calculate tensor resonance Legendre polynomial legPol = 4.0*(3.0*cosHel_*cosHel_ - 1.0)/3.0; } else if (resSpin_ == 3) { // Calculate spin 3 resonance Legendre polynomial legPol = -8.0*(5.0*cosHel_*cosHel_*cosHel_ - 3.0*cosHel_)/5.0; } else if (resSpin_ == 4) { // Calculate spin 4 resonance Legendre polynomial legPol = 16.0*(35.0*cosHel_*cosHel_*cosHel_*cosHel_ - 30.0*cosHel_*cosHel_ + 3.0)/35.0; } else if (resSpin_ == 5) { // Calculate spin 5 resonance Legendre polynomial legPol = -32.0*(63.0*cosHel_*cosHel_*cosHel_*cosHel_*cosHel_ - 70.0*cosHel_*cosHel_*cosHel_ + 15.0*cosHel_)/63.0; } else if (resSpin_ > 5) { std::cerr << "WARNING in LauAbsResonance::calcLegendrePoly : Legendre polynomials not (yet) implemented for spin > 5" << std::endl; } return legPol; } void LauAbsResonance::changeResonance(const Double_t newMass, const Double_t newWidth, const Int_t newSpin) { if (newMass > 0.0) { resMass_->valueAndRange(newMass,0.0,3.0*newMass); resMass_->initValue(newMass); resMass_->genValue(newMass); std::cout << "INFO in LauAbsResonance::changeResonance : Setting mass to " << resMass_->value() << std::endl; } if (newWidth > 0.0) { resWidth_->valueAndRange(newWidth,0.0,3.0*newWidth); resWidth_->initValue(newWidth); resWidth_->genValue(newWidth); std::cout << "INFO in LauAbsResonance::changeResonance : Setting width to " << resWidth_->value() << std::endl; } if (newSpin > -1) { resSpin_ = newSpin; std::cout << "INFO in LauAbsResonance::changeResonance : Setting spin to " << resSpin_ << std::endl; } } void LauAbsResonance::changeBWBarrierRadii(const Double_t resRadius, const Double_t parRadius) { if ( resRadius >= 0.0 && resBWFactor_ != 0 ) { LauParameter* resBWRadius = resBWFactor_->getRadiusParameter(); resBWRadius->value(resRadius); resBWRadius->initValue(resRadius); resBWRadius->genValue(resRadius); std::cout << "INFO in LauAbsResonance::changeBWBarrierRadii : Setting resonance factor radius to " << resBWRadius->value() << std::endl; } if ( parRadius >= 0.0 && parBWFactor_ != 0 ) { LauParameter* parBWRadius = parBWFactor_->getRadiusParameter(); parBWRadius->value(parRadius); parBWRadius->initValue(parRadius); parBWRadius->genValue(parRadius); std::cout << "INFO in LauAbsResonance::changeBWBarrierRadii : Setting parent factor radius to " << parBWRadius->value() << std::endl; } } void LauAbsResonance::setResonanceParameter(const TString& name, const Double_t value) { //This function should always be overwritten if needed in classes inheriting from LauAbsResonance. std::cerr << "WARNING in LauAbsResonance::setResonanceParameter : Unable to set parameter \"" << name << "\" to value: " << value << "." << std::endl; } void LauAbsResonance::floatResonanceParameter(const TString& name) { //This function should always be overwritten if needed in classes inheriting from LauAbsResonance. std::cerr << "WARNING in LauAbsResonance::floatResonanceParameter : Unable to release parameter \"" << name << "\"." << std::endl; } LauParameter* LauAbsResonance::getResonanceParameter(const TString& name) { //This function should always be overwritten if needed in classes inheriting from LauAbsResonance. std::cerr << "WARNING in LauAbsResonance::getResonanceParameter : Unable to get parameter \"" << name << "\"." << std::endl; return 0; } void LauAbsResonance::addFloatingParameter( LauParameter* param ) { if ( param == 0 ) { return; } if ( param->clone() ) { resParameters_.push_back( param->parent() ); } else { resParameters_.push_back( param ); } } void LauAbsResonance::fixBarrierRadii(const Bool_t fixResRad, const Bool_t fixParRad) { if ( resBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::fixBarrierRadii : resonance barrier factor not present, cannot fix/float it" << std::endl; return; } if ( parBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::fixBarrierRadii : parent barrier factor not present, cannot fix/float it" << std::endl; return; } LauParameter* resBWRadius = resBWFactor_->getRadiusParameter(); resBWRadius->fixed(fixResRad); LauParameter* parBWRadius = parBWFactor_->getRadiusParameter(); parBWRadius->fixed(fixParRad); } Bool_t LauAbsResonance::fixResRadius() const { if ( resBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::fixResRadius : resonance barrier factor not present" << std::endl; return kTRUE; } LauParameter* bwRadius = resBWFactor_->getRadiusParameter(); return bwRadius->fixed(); } Bool_t LauAbsResonance::fixParRadius() const { if ( parBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::fixParRadius : parent barrier factor not present" << std::endl; return kTRUE; } LauParameter* bwRadius = parBWFactor_->getRadiusParameter(); return bwRadius->fixed(); } Double_t LauAbsResonance::getResRadius() const { if ( resBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::getResRadius : resonance barrier factor not present" << std::endl; return -1.0; } LauParameter* bwRadius = resBWFactor_->getRadiusParameter(); return bwRadius->unblindValue(); } Double_t LauAbsResonance::getParRadius() const { if ( parBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::getParRadius : parent barrier factor not present" << std::endl; return -1.0; } LauParameter* bwRadius = parBWFactor_->getRadiusParameter(); return bwRadius->unblindValue(); } Double_t LauAbsResonance::getMassParent() const { // Get the parent mass Double_t mass(LauConstants::mB); if (daughters_) { mass = daughters_->getMassParent(); } return mass; } Double_t LauAbsResonance::getMassDaug1() const { // Get the daughter mass Double_t mass(LauConstants::mPi); if (daughters_) { if (resPairAmpInt_ == 1) { mass = daughters_->getMassDaug2(); } else if (resPairAmpInt_ == 2) { mass = daughters_->getMassDaug1(); } else if (resPairAmpInt_ == 3) { mass = daughters_->getMassDaug1(); } } return mass; } Double_t LauAbsResonance::getMassDaug2() const { // Get the daughter mass Double_t mass(LauConstants::mPi); if (daughters_) { if (resPairAmpInt_ == 1) { mass = daughters_->getMassDaug3(); } else if (resPairAmpInt_ == 2) { mass = daughters_->getMassDaug3(); } else if (resPairAmpInt_ == 3) { mass = daughters_->getMassDaug2(); } } return mass; } Double_t LauAbsResonance::getMassBachelor() const { // Get the bachelor mass Double_t mass(LauConstants::mPi); if (daughters_) { if (resPairAmpInt_ == 1) { mass = daughters_->getMassDaug1(); } else if (resPairAmpInt_ == 2) { mass = daughters_->getMassDaug2(); } else if (resPairAmpInt_ == 3) { mass = daughters_->getMassDaug3(); } } return mass; } Int_t LauAbsResonance::getChargeParent() const { // Get the parent charge Int_t charge(0); if (daughters_) { charge = daughters_->getChargeParent(); } return charge; } Int_t LauAbsResonance::getChargeDaug1() const { // Get the daughter charge Int_t charge(0); if (daughters_) { if (resPairAmpInt_ == 1) { charge = daughters_->getChargeDaug2(); } else if (resPairAmpInt_ == 2) { charge = daughters_->getChargeDaug1(); } else if (resPairAmpInt_ == 3) { charge = daughters_->getChargeDaug1(); } } return charge; } Int_t LauAbsResonance::getChargeDaug2() const { // Get the daughter charge Int_t charge(0); if (daughters_) { if (resPairAmpInt_ == 1) { charge = daughters_->getChargeDaug3(); } else if (resPairAmpInt_ == 2) { charge = daughters_->getChargeDaug3(); } else if (resPairAmpInt_ == 3) { charge = daughters_->getChargeDaug2(); } } return charge; } Int_t LauAbsResonance::getChargeBachelor() const { // Get the bachelor charge Int_t charge(0); if (daughters_) { if (resPairAmpInt_ == 1) { charge = daughters_->getChargeDaug1(); } else if (resPairAmpInt_ == 2) { charge = daughters_->getChargeDaug2(); } else if (resPairAmpInt_ == 3) { charge = daughters_->getChargeDaug3(); } } return charge; } TString LauAbsResonance::getNameParent() const { // Get the parent name TString name(""); if (daughters_) { name = daughters_->getNameParent(); } return name; } TString LauAbsResonance::getNameDaug1() const { // Get the daughter name TString name(""); if (daughters_) { if (resPairAmpInt_ == 1) { name = daughters_->getNameDaug2(); } else if (resPairAmpInt_ == 2) { name = daughters_->getNameDaug1(); } else if (resPairAmpInt_ == 3) { name = daughters_->getNameDaug1(); } } return name; } TString LauAbsResonance::getNameDaug2() const { // Get the daughter name TString name(""); if (daughters_) { if (resPairAmpInt_ == 1) { name = daughters_->getNameDaug3(); } else if (resPairAmpInt_ == 2) { name = daughters_->getNameDaug3(); } else if (resPairAmpInt_ == 3) { name = daughters_->getNameDaug2(); } } return name; } TString LauAbsResonance::getNameBachelor() const { // Get the bachelor name TString name(""); if (daughters_) { if (resPairAmpInt_ == 1) { name = daughters_->getNameDaug1(); } else if (resPairAmpInt_ == 2) { name = daughters_->getNameDaug2(); } else if (resPairAmpInt_ == 3) { name = daughters_->getNameDaug3(); } } return name; } Index: trunk/src/LauRescattering2Res.cc =================================================================== --- trunk/src/LauRescattering2Res.cc (revision 563) +++ trunk/src/LauRescattering2Res.cc (revision 564) @@ -1,658 +1,672 @@ -// Copyright University of Warwick 2004 - 2014. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// Authors: -// Thomas Latham -// John Back -// Paul Harrison +/* +Copyright 2018 University of Warwick + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Laura++ package authors: +John Back +Paul Harrison +Thomas Latham +*/ /*! \file LauRescattering2Res.cc \brief File containing implementation of LauRescattering2Res class. */ #include #include "LauConstants.hh" #include "LauRescattering2Res.hh" #include "LauResonanceInfo.hh" ClassImp(LauRescattering2Res) LauRescattering2Res::LauRescattering2Res(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) : LauAbsResonance(resInfo, resPairAmpInt, daughters), B1_(0),B2_(0),B3_(0), C1_(0),C2_(0),C3_(0),C4_(0),C5_(0), D0_(0),D1_(0),D2_(0),D3_(0), F1_(0),F2_(0),F3_(0),F4_(0) { // Default values for parameters, taken from const Double_t B1Val(23.6); const Double_t B2Val(29.4); const Double_t B3Val(0.6); const Double_t C1Val(34.39); const Double_t C2Val(4.4); const Double_t C3Val(-32.9); const Double_t C4Val(-16.); const Double_t C5Val(7.4); const Double_t D0Val(0.59); const Double_t D1Val(-0.38); const Double_t D2Val(0.12); const Double_t D3Val(-0.09); const Double_t F1Val(-0.043); const Double_t F2Val(-0.008); const Double_t F3Val(-0.28); const Double_t F4Val(0.026); const TString& parNameBase = this->getSanitisedName(); TString B1Name(parNameBase); B1Name += "_B1"; B1_ = resInfo->getExtraParameter( B1Name ); if ( B1_ == 0 ) { B1_ = new LauParameter( B1Name, B1Val, -100.,100., kTRUE ); B1_->secondStage(kTRUE); resInfo->addExtraParameter( B1_ ); } TString B2Name(parNameBase); B2Name += "_B2"; B2_ = resInfo->getExtraParameter( B2Name ); if ( B2_ == 0 ) { B2_ = new LauParameter( B2Name, B2Val, -100.,100., kTRUE ); B2_->secondStage(kTRUE); resInfo->addExtraParameter( B2_ ); } TString B3Name(parNameBase); B3Name += "_B3"; B3_ = resInfo->getExtraParameter( B3Name ); if ( B3_ == 0 ) { B3_ = new LauParameter( B3Name, B3Val, -100.,100., kTRUE ); B3_->secondStage(kTRUE); resInfo->addExtraParameter( B3_ ); } TString C1Name(parNameBase); C1Name += "_C1"; C1_ = resInfo->getExtraParameter( C1Name ); if ( C1_ == 0 ) { C1_ = new LauParameter( C1Name, C1Val, -100.,100., kTRUE ); C1_->secondStage(kTRUE); resInfo->addExtraParameter( C1_ ); } TString C2Name(parNameBase); C2Name += "_C2"; C2_ = resInfo->getExtraParameter( C2Name ); if ( C2_ == 0 ) { C2_ = new LauParameter( C2Name, C2Val, -100.,100., kTRUE ); C2_->secondStage(kTRUE); resInfo->addExtraParameter( C2_ ); } TString C3Name(parNameBase); C3Name += "_C3"; C3_ = resInfo->getExtraParameter( C3Name ); if ( C3_ == 0 ) { C3_ = new LauParameter( C3Name, C3Val, -100.,100., kTRUE ); C3_->secondStage(kTRUE); resInfo->addExtraParameter( C3_ ); } TString C4Name(parNameBase); C4Name += "_C4"; C4_ = resInfo->getExtraParameter( C4Name ); if ( C4_ == 0 ) { C4_ = new LauParameter( C4Name, C4Val, -100.,100., kTRUE ); C4_->secondStage(kTRUE); resInfo->addExtraParameter( C4_ ); } TString C5Name(parNameBase); C5Name += "_C5"; C5_ = resInfo->getExtraParameter( C5Name ); if ( C5_ == 0 ) { C5_ = new LauParameter( C5Name, C5Val, -100.,100., kTRUE ); C5_->secondStage(kTRUE); resInfo->addExtraParameter( C5_ ); } TString D0Name(parNameBase); D0Name += "_D0"; D0_ = resInfo->getExtraParameter( D0Name ); if ( D0_ == 0 ) { D0_ = new LauParameter( D0Name, D0Val, -100.,100., kTRUE ); D0_->secondStage(kTRUE); resInfo->addExtraParameter( D0_ ); } TString D1Name(parNameBase); D1Name += "_D1"; D1_ = resInfo->getExtraParameter( D1Name ); if ( D1_ == 0 ) { D1_ = new LauParameter( D1Name, D1Val, -100.,100., kTRUE ); D1_->secondStage(kTRUE); resInfo->addExtraParameter( D1_ ); } TString D2Name(parNameBase); D2Name += "_D2"; D2_ = resInfo->getExtraParameter( D2Name ); if ( D2_ == 0 ) { D2_ = new LauParameter( D2Name, D2Val,-100.,100., kTRUE ); D2_->secondStage(kTRUE); resInfo->addExtraParameter( D2_ ); } TString D3Name(parNameBase); D3Name += "_D3"; D3_ = resInfo->getExtraParameter( D3Name ); if ( D3_ == 0 ) { D3_ = new LauParameter( D3Name, D3Val, -100.,100., kTRUE ); D3_->secondStage(kTRUE); resInfo->addExtraParameter( D3_ ); } TString F1Name(parNameBase); F1Name += "_F1"; F1_ = resInfo->getExtraParameter( F1Name ); if ( F1_ == 0 ) { F1_ = new LauParameter( F1Name, F1Val, -100.,100., kTRUE ); F1_->secondStage(kTRUE); resInfo->addExtraParameter( F1_ ); } TString F2Name(parNameBase); F2Name += "_F2"; F2_ = resInfo->getExtraParameter( F2Name ); if ( F2_ == 0 ) { F2_ = new LauParameter( F2Name, F2Val, -100.,100., kTRUE ); F2_->secondStage(kTRUE); resInfo->addExtraParameter( F2_ ); } TString F3Name(parNameBase); F3Name += "_F3"; F3_ = resInfo->getExtraParameter( F3Name ); if ( F3_ == 0 ) { F3_ = new LauParameter( F3Name, F3Val, -100.,100., kTRUE ); F3_->secondStage(kTRUE); resInfo->addExtraParameter( F3_ ); } TString F4Name(parNameBase); F4Name += "_F4"; F4_ = resInfo->getExtraParameter( F4Name ); if ( F4_ == 0 ) { F4_ = new LauParameter( F4Name, F4Val, -100.,100., kTRUE ); F4_->secondStage(kTRUE); resInfo->addExtraParameter( F4_ ); } } LauRescattering2Res::~LauRescattering2Res() { delete B1_;delete B2_;delete B3_; delete C1_;delete C2_;delete C3_;delete C4_;delete C5_; delete D0_;delete D1_;delete D2_;delete D3_; delete F1_;delete F2_;delete F3_;delete F4_; } void LauRescattering2Res::initialise() { sqr_tmin[1] = 2.00*LauConstants::mK; sqr_tmin[2] = 1.47; sqr_tmax[1] = 1.47; sqr_tmax[2] = 2.00; B0_ = 226.5*TMath::Pi()/180.0 + B1_->value() - B2_->value() + B3_->value(); C0_ = phi00(sqr_tmax[1]*sqr_tmax[1], 1) + C1_->value() - C2_->value() + C3_->value() - C4_->value() + C5_->value(); F0_ = g00(sqr_tmax[1]*sqr_tmax[1], 1) + F1_->value() - F2_->value() + F3_->value() - F4_->value(); std::cout << "##### B = " << this->B1_->value()<<", "<< this->B2_->value()<<", "<< this->B3_->value()<C2_->value()<<", "<< this->C3_->value()<<", "<< this->C4_->value()<<", "<< this->C5_->value()<D1_->value()<<", "<< this->D2_->value()<<", "<< this->D3_->value()<< std::endl; std::cout << "##### F = " << this->F1_->value()<<", "<< this->F2_->value()<<", "<< this->F3_->value()<<", "<< this->F4_->value()< sqr_tmax[1] && mass < sqr_tmax[2]) i = 2; if (i == 0) { std::cout << " ERROR MASS = " << mass <<" out of limmits mI, mII" << std::endl; return LauComplex(0,0); } Double_t sqr_t = mass; Double_t mag = this->g00(sqr_t, i); Double_t phase = this->phi00(sqr_t, i); return LauComplex(mag*TMath::Cos(phase), mag*TMath::Sin(phase)); } Double_t LauRescattering2Res::pn(const Double_t x_, const Double_t n) const { if (n==0) return 1.0; if (n==1) return x_; return 2*x_*pn(x_,n-1) - pn(x_,n-2); } Double_t LauRescattering2Res::x(const Double_t sqr_t, const Int_t i) const { return 2.0*(sqr_t-sqr_tmin[i])/(sqr_tmax[i]-sqr_tmin[i]) -1.0; } Double_t LauRescattering2Res::phi00(const Double_t sqr_t, const Int_t i) const { Double_t x_t = x(sqr_t, i); if (i==1) return B0_*this->pn(x_t,0)+ B1_->value()*this->pn(x_t,1)+ B2_->value()*this->pn(x_t,2)+ B3_->value()*this->pn(x_t,3); if (i==2) return C0_*this->pn(x_t,0)+ C1_->value()*this->pn(x_t,1)+ C2_->value()*this->pn(x_t,2)+ C3_->value()*this->pn(x_t,3)+ C4_->value()*this->pn(x_t,4)+ C5_->value()*this->pn(x_t,5); return 0; } Double_t LauRescattering2Res::g00(const Double_t sqr_t, const Int_t i) const { Double_t x_t = x(sqr_t, i); if (i==1) return D0_->value()*this->pn(x_t,0)+ D1_->value()*this->pn(x_t,1)+ D2_->value()*this->pn(x_t,2)+ D3_->value()*this->pn(x_t,3); if (i==2) return F0_*this->pn(x_t,0)+ F1_->value()*this->pn(x_t,1)+ F2_->value()*this->pn(x_t,2)+ F3_->value()*this->pn(x_t,3)+ F4_->value()*this->pn(x_t,4); return 0; } // TODO up to here! const std::vector& LauRescattering2Res::getFloatingParameters() { this->clearFloatingParameters(); if ( ! this->fixB1Parameter() ) { this->addFloatingParameter( B1_ ); } if ( ! this->fixB2Parameter() ) { this->addFloatingParameter( B2_ ); } if ( ! this->fixB3Parameter() ) { this->addFloatingParameter( B3_ ); } if ( ! this->fixC1Parameter() ) { this->addFloatingParameter( C1_ ); } if ( ! this->fixC2Parameter() ) { this->addFloatingParameter( C2_ ); } if ( ! this->fixC3Parameter() ) { this->addFloatingParameter( C3_ ); } if ( ! this->fixC4Parameter() ) { this->addFloatingParameter( C4_ ); } if ( ! this->fixC5Parameter() ) { this->addFloatingParameter( C5_ ); } if ( ! this->fixD0Parameter() ) { this->addFloatingParameter( D0_ ); } if ( ! this->fixD1Parameter() ) { this->addFloatingParameter( D1_ ); } if ( ! this->fixD2Parameter() ) { this->addFloatingParameter( D2_ ); } if ( ! this->fixD3Parameter() ) { this->addFloatingParameter( D3_ ); } if ( ! this->fixF1Parameter() ) { this->addFloatingParameter( F1_ ); } if ( ! this->fixF2Parameter() ) { this->addFloatingParameter( F2_ ); } if ( ! this->fixF3Parameter() ) { this->addFloatingParameter( F3_ ); } if ( ! this->fixF4Parameter() ) { this->addFloatingParameter( F4_ ); } return this->getParameters(); } void LauRescattering2Res::setResonanceParameter(const TString& name, const Double_t value) { // Set various parameters for the NRAmplitude lineshape dynamics if (name == "B1") { this->setB1Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude B1 = " << this->getB1Parameter() << std::endl; } else if (name == "B2") { this->setB2Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude B2 = " << this->getB2Parameter() << std::endl; } else if (name == "B3") { this->setB3Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude B3 = " << this->getB3Parameter() << std::endl; } else if (name == "C1") { this->setC1Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C1 = " << this->getC1Parameter() << std::endl; } else if (name == "C2") { this->setC2Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C2 = " << this->getC2Parameter() << std::endl; } else if (name == "C3") { this->setC3Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C3 = " << this->getC3Parameter() << std::endl; } else if (name == "C4") { this->setC4Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C4 = " << this->getC4Parameter() << std::endl; } else if (name == "C5") { this->setC5Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C5 = " << this->getC5Parameter() << std::endl; } else if (name == "D0") { this->setD0Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude D0 = " << this->getD0Parameter() << std::endl; } else if (name == "D1") { this->setD1Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude D1 = " << this->getD1Parameter() << std::endl; } else if (name == "D2") { this->setD2Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude D2 = " << this->getD2Parameter() << std::endl; } else if (name == "D3") { this->setD3Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude D3 = " << this->getD3Parameter() << std::endl; } else if (name == "F1") { this->setF1Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude F1 = " << this->getF1Parameter() << std::endl; } else if (name == "F2") { this->setF2Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude F2 = " << this->getF2Parameter() << std::endl; } else if (name == "F3") { this->setF3Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude F3 = " << this->getF3Parameter() << std::endl; } else if (name == "F4") { this->setF4Parameter(value); std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude F4 = " << this->getF4Parameter() << std::endl; } else { std::cerr << "WARNING in LauRescattering2Res::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl; } } void LauRescattering2Res::floatResonanceParameter(const TString& name) { if (name == "B1") { if ( B1_->fixed() ) { B1_->fixed( kFALSE ); this->addFloatingParameter( B1_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "B2") { if ( B2_->fixed() ) { B2_->fixed( kFALSE ); this->addFloatingParameter( B2_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "B3") { if ( B3_->fixed() ) { B3_->fixed( kFALSE ); this->addFloatingParameter( B3_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "C1") { if ( C1_->fixed() ) { C1_->fixed( kFALSE ); this->addFloatingParameter( C1_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "C2") { if ( C2_->fixed() ) { C2_->fixed( kFALSE ); this->addFloatingParameter( C2_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "C3") { if ( C3_->fixed() ) { C3_->fixed( kFALSE ); this->addFloatingParameter( C3_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "C4") { if ( C4_->fixed() ) { C4_->fixed( kFALSE ); this->addFloatingParameter( C4_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "C5") { if ( C5_->fixed() ) { C5_->fixed( kFALSE ); this->addFloatingParameter( C5_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "D0") { if ( D0_->fixed() ) { D0_->fixed( kFALSE ); this->addFloatingParameter( D0_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "D1") { if ( D1_->fixed() ) { D1_->fixed( kFALSE ); this->addFloatingParameter( D1_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "D2") { if ( D2_->fixed() ) { D2_->fixed( kFALSE ); this->addFloatingParameter( D2_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "D3") { if ( D3_->fixed() ) { D3_->fixed( kFALSE ); this->addFloatingParameter( D3_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "F1") { if ( F1_->fixed() ) { F1_->fixed( kFALSE ); this->addFloatingParameter( F1_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "F2") { if ( F2_->fixed() ) { F2_->fixed( kFALSE ); this->addFloatingParameter( F2_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "F3") { if ( F3_->fixed() ) { F3_->fixed( kFALSE ); this->addFloatingParameter( F3_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else if (name == "4F") { if ( F4_->fixed() ) { F4_->fixed( kFALSE ); this->addFloatingParameter( F4_ ); } else { std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else { std::cerr << "WARNING in LauRescattering2Res::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl; } } LauParameter* LauRescattering2Res::getResonanceParameter(const TString& name) { if (name == "B1") { return B1_; } else if (name == "B2") { return B2_; } else if (name == "B3") { return B3_; } else if (name == "C1") { return C1_; } else if (name == "C2") { return C2_; } else if (name == "C3") { return C3_; } else if (name == "C4") { return C4_; } else if (name == "C5") { return C5_; } else if (name == "D0") { return D0_; } else if (name == "D1") { return D1_; } else if (name == "D2") { return D2_; } else if (name == "D3") { return D3_; } else if (name == "F1") { return F1_; } else if (name == "F2") { return F2_; } else if (name == "F3") { return F3_; } else if (name == "F4") { return F4_; } else { std::cerr << "WARNING in LauRescattering2Res::getResonanceParameter: Parameter name not reconised." << std::endl; return 0; } } void LauRescattering2Res::setB1Parameter(const Double_t B1) { B1_->value( B1 ); B1_->genValue( B1 ); B1_->initValue( B1 ); } void LauRescattering2Res::setB2Parameter(const Double_t B2) { B2_->value( B2 ); B2_->genValue( B2 ); B2_->initValue( B2 ); } void LauRescattering2Res::setB3Parameter(const Double_t B3) { B3_->value( B3 ); B3_->genValue( B3 ); B3_->initValue( B3 ); } void LauRescattering2Res::setC1Parameter(const Double_t C1) { C1_->value( C1 ); C1_->genValue( C1 ); C1_->initValue( C1 ); } void LauRescattering2Res::setC2Parameter(const Double_t C2) { C2_->value( C2 ); C2_->genValue( C2 ); C2_->initValue( C2 ); } void LauRescattering2Res::setC3Parameter(const Double_t C3) { C3_->value( C3 ); C3_->genValue( C3 ); C3_->initValue( C3 ); } void LauRescattering2Res::setC4Parameter(const Double_t C4) { C4_->value( C4 ); C4_->genValue( C4 ); C4_->initValue( C4 ); } void LauRescattering2Res::setC5Parameter(const Double_t C5) { C5_->value( C5 ); C5_->genValue( C5 ); C5_->initValue( C5 ); } void LauRescattering2Res::setD0Parameter(const Double_t D0) { D0_->value( D0 ); D0_->genValue( D0 ); D0_->initValue( D0 ); } void LauRescattering2Res::setD1Parameter(const Double_t D1) { D1_->value( D1 ); D1_->genValue( D1 ); D1_->initValue( D1 ); } void LauRescattering2Res::setD2Parameter(const Double_t D2) { D2_->value( D2 ); D2_->genValue( D2 ); D2_->initValue( D2 ); } void LauRescattering2Res::setD3Parameter(const Double_t D3) { D3_->value( D3 ); D3_->genValue( D3 ); D3_->initValue( D3 ); } void LauRescattering2Res::setF1Parameter(const Double_t F1) { F1_->value( F1 ); F1_->genValue( F1 ); F1_->initValue( F1 ); } void LauRescattering2Res::setF2Parameter(const Double_t F2) { F2_->value( F2 ); F2_->genValue( F2 ); F2_->initValue( F2 ); } void LauRescattering2Res::setF3Parameter(const Double_t F3) { F3_->value( F3 ); F3_->genValue( F3 ); F3_->initValue( F3 ); } void LauRescattering2Res::setF4Parameter(const Double_t F4) { F4_->value( F4 ); F4_->genValue( F4 ); F4_->initValue( F4 ); } Index: trunk/src/LauPolarFormFactorSymNR.cc =================================================================== --- trunk/src/LauPolarFormFactorSymNR.cc (revision 563) +++ trunk/src/LauPolarFormFactorSymNR.cc (revision 564) @@ -1,186 +1,185 @@ /* -Copyright 2004 University of Warwick +Copyright 2018 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauPolarFormFactorSymNR.cc \brief File containing implementation of LauPolarFormFactorSymNR class. */ #include #include "TMath.h" #include "LauConstants.hh" #include "LauPolarFormFactorSymNR.hh" #include "LauDaughters.hh" #include "LauParameter.hh" #include "LauResonanceInfo.hh" ClassImp(LauPolarFormFactorSymNR) LauPolarFormFactorSymNR::LauPolarFormFactorSymNR(LauResonanceInfo* resInfo, const LauAbsResonance::LauResonanceModel resType, const Int_t resPairAmpInt, const LauDaughters* daughters) : LauAbsResonance(resInfo, resPairAmpInt, daughters), lambda_(0), model_(resType) { TString parName = this->getSanitisedName(); parName += "_lambda"; lambda_ = resInfo->getExtraParameter( parName ); if ( lambda_ == 0 ) { lambda_ = new LauParameter( parName, 1.0, 0.0, 10.0, kTRUE ); lambda_->secondStage(kTRUE); resInfo->addExtraParameter( lambda_ ); } } LauPolarFormFactorSymNR::~LauPolarFormFactorSymNR() { - } void LauPolarFormFactorSymNR::initialise() { const LauDaughters* daughters = this->getDaughters(); if ( ! daughters->gotSymmetricalDP() ) { std::cerr << "WARNING in LauPolarFormFactorSymNR::initialise : Dalitz plot is symmetric - this lineshape is not appropriate." << std::endl; } Int_t resPairAmpInt = this->getPairInt(); if ( resPairAmpInt == 3 ) { std::cerr << "WARNING in LauPolarFormFactorSymNR::initialise : This lineshape is intended to be on the symmetrised axes of the DP." << std::endl; } if ( (model_ != LauAbsResonance::PolarFFSymNR) && (model_ != LauAbsResonance::PolarFFSymNRNoInter)) { std::cerr << "WARNING in LauPolarFormFactorSymNR::initialise : Unknown model requested, defaulting to Polar Form Factor." << std::endl; model_ = LauAbsResonance::PolarFFSymNR; } if ( (model_ != LauAbsResonance::PolarFFSymNR) && (this->getSpin() != 0) ) { std::cerr << "WARNING in LauPolarFormFactorSymNR::initialise : Non-zero spin will be ignored for this model - perhaps you should use LauAbsResonance::PolarFFSymNRNoInter instead" << std::endl; } // NB we do not need to call setSpinType(LauAbsResonance::Legendre) here (as is done in LauPolarFormFactorNR) since override the amplitude method and explicitly use calcLegendrePoly } LauComplex LauPolarFormFactorSymNR::resAmp(Double_t mass, Double_t spinTerm) { std::cerr << "ERROR in LauPolarFormFactorSymNR : This method should never be called." << std::endl; std::cerr << " : Returning zero amplitude for mass = " << mass << " and spinTerm = " << spinTerm << "." << std::endl; return LauComplex(0.0, 0.0); } LauComplex LauPolarFormFactorSymNR::amplitude(const LauKinematics* kinematics) { // This function returns the complex dynamical amplitude for a Polar Form Factor Non-Resonant distribution // Calculate for symmetric DPs, e.g. 3pi or 3K, by using shapeNo = 1 or 2 // Have s<->t symmetry already done in Dynamics flip function. // For Kpipi or similar plots, one can use the separate terms // and consider them as two separate components with their own mag and phase. // For this shapeNo = 3 and shapeNo = 4 need to be used to create the two // individual amplitudes (with the same value of lambda). // Calculate Mandelstam variables. // s = m_13^2, t = m_23^2 const Double_t s = kinematics->getm13Sq(); const Double_t t = kinematics->getm23Sq(); Double_t magnitude(1.0); const Double_t lambda = this->getLambda(); if ( model_ == LauAbsResonance::PolarFFSymNR ) { magnitude = 1.0/(1.0 + s /(lambda*lambda)) + 1.0/(1.0 + t /(lambda*lambda)); } else if ( model_ == LauAbsResonance::PolarFFSymNRNoInter ) { magnitude = (s <= t) ? 1.0/(1.0 + s /(lambda*lambda)) : 1.0/(1.0 + t /(lambda*lambda)); } LauComplex resAmplitude(magnitude, 0.0); return resAmplitude; } const std::vector& LauPolarFormFactorSymNR::getFloatingParameters() { this->clearFloatingParameters(); if ( ! this->fixLambda() ) { this->addFloatingParameter( lambda_ ); } return this->getParameters(); } void LauPolarFormFactorSymNR::setResonanceParameter(const TString& name, const Double_t value) { // Set various parameters for the lineshape if (name == "lambda") { this->setLambda(value); std::cout << "INFO in LauPolarFormFactorSymNR::setResonanceParameter : Setting parameter lambda = " << this->getLambda() << std::endl; } else { std::cerr << "WARNING in LauPolarFormFactorSymNR::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl; } } void LauPolarFormFactorSymNR::floatResonanceParameter(const TString& name) { if (name == "lambda") { if ( lambda_->fixed() ) { lambda_->fixed( kFALSE ); this->addFloatingParameter( lambda_ ); } else { std::cerr << "WARNING in LauPolarFormFactorSymNR::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl; } } else { std::cerr << "WARNING in LauPolarFormFactorSymNR::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl; } } LauParameter* LauPolarFormFactorSymNR::getResonanceParameter(const TString& name) { if (name == "lambda") { return lambda_; } else { std::cerr << "WARNING in LauPolarFormFactorSymNR::getResonanceParameter: Parameter name not reconised." << std::endl; return 0; } } void LauPolarFormFactorSymNR::setLambda(const Double_t lambda) { lambda_->value( lambda ); lambda_->genValue( lambda ); lambda_->initValue( lambda ); } Index: trunk/inc/LauAbsResonance.hh =================================================================== --- trunk/inc/LauAbsResonance.hh (revision 563) +++ trunk/inc/LauAbsResonance.hh (revision 564) @@ -1,578 +1,578 @@ /* Copyright 2004 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauAbsResonance.hh \brief File containing declaration of LauAbsResonance class. */ /*! \class LauAbsResonance \brief Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc.) Abstract Class for defining the type for all classes used to model resonances in the Dalitz plot, such as Breit-Wigner functions. In addition, some common functionality is implemented, including data such as the mass and width of the desired state. */ #ifndef LAU_ABS_RESONANCE #define LAU_ABS_RESONANCE #include "TString.h" #include "LauBlattWeisskopfFactor.hh" #include "LauComplex.hh" #include "LauParameter.hh" class LauDaughters; class LauKinematics; class LauResonanceInfo; class LauAbsResonance { public: //! Define the allowed resonance types enum LauResonanceModel { BW, /*!< simple Breit-Wigner */ RelBW, /*!< relativistic Breit-Wigner */ GS, /*!< a modified Breit-Wigner from Gounaris-Sakurai */ Flatte, /*!< Flatte or coupled-channel Breit-Wigner */ Sigma, /*!< special shape for the sigma or f_0(600) */ Kappa, /*!< special shape for the kappa, a low-mass Kpi scalar */ Dabba, /*!< special shape for the dabba, a low-mass Dpi scalar */ LASS, /*!< the LASS amplitude to describe the Kpi S-wave */ LASS_BW, /*!< the resonant part of the LASS amplitude */ LASS_NR, /*!< the nonresonant part of the LASS amplitude */ EFKLLM, /*!< a form-factor-based description of the Kpi S-wave */ KMatrix, /*!< S-wave description using K-matrix and P-vector */ FlatNR, /*!< a uniform nonresonant amplitude */ NRModel, /*!< a theoretical model nonresonant amplitude */ BelleNR, /*!< an empirical exponential nonresonant amplitude */ PowerLawNR, /*!< an empirical power law nonresonant amplitude */ BelleSymNR, /*!< an empirical exponential nonresonant amplitude for symmetrised DPs */ BelleSymNRNoInter, /*!< an empirical exponential nonresonant amplitude for symmetrised DPs without interference */ TaylorNR, /*!< an empirical Taylor expansion nonresonant amplitude for symmetrised DPs */ PolNR, /*!< an empirical polynomial nonresonant amplitude */ - POLE, /*!< scalar Pole lineshape */ + Pole, /*!< scalar Pole lineshape */ PolarFFNR, /*!< Polar Form Factor nonresonant amplitude */ - PolarFFSymNR, /*!< Polar Form Factor nonresonant amplitude for symmetrised DPs without interference */ - PolarFFSymNRNoInter, /*!< Polar Form Factor nonresonant amplitude */ + PolarFFSymNR, /*!< Polar Form Factor nonresonant amplitude for symmetrised DPs */ + PolarFFSymNRNoInter, /*!< Polar Form Factor nonresonant amplitude for symmetrised DPs without interference */ Rescattering, /*!< KK-PiPi inelastic scattering amplitude */ Rescattering2, /*!< KK-PiPi inelastic scattering amplitude */ RescatteringNoInter, /*!< KK-PiPi inelastic scattering amplitude */ MIPW_MagPhase, /*!< a model independent partial wave - magnitude and phase representation */ MIPW_RealImag, /*!< a model independent partial wave - real and imaginary part representation */ GaussIncoh, /*!< an incoherent Gaussian shape */ - RhoOmegaMix_GS, /*!< mass mixing model using GS for res 1 and RBW for res 2 */ - RhoOmegaMix_RBW, /*!< mass mixing model using two RBWs */ - RhoOmegaMix_GS_1, /*!< mass mixing model using GS for res 1 and RBW for res 2, with denominator factor = 1 */ - RhoOmegaMix_RBW_1 /*!< mass mixing model using two RBWs, with denominator factor = 1 */ + RhoOmegaMix_GS, /*!< mass mixing model using GS for res 1 and RBW for res 2 */ + RhoOmegaMix_RBW, /*!< mass mixing model using two RBWs */ + RhoOmegaMix_GS_1, /*!< mass mixing model using GS for res 1 and RBW for res 2, with denominator factor = 1 */ + RhoOmegaMix_RBW_1 /*!< mass mixing model using two RBWs, with denominator factor = 1 */ }; //! Define the allowed spin formalisms enum LauSpinType { Zemach_P, /*!< Zemach tensor formalism, bachelor momentum in resonance rest frame */ Zemach_Pstar, /*!< Zemach tensor formalism, bachelor momentum in parent rest frame */ Covariant, /*!< Covariant tensor formalism */ Legendre /*!< Legendre polynomials only */ }; //! Is the resonance model incoherent? /*! \param [in] model the resonance model \return true if the model is incoherent */ static bool isIncoherentModel(LauResonanceModel model); //! Constructor (for use by standard resonances) /*! \param [in] resInfo the object containing information on the resonance name, mass, width, spin, charge, etc. \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] daughters the daughter particles */ LauAbsResonance(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters); //! Constructor (for use by K-matrix components) /*! \param [in] resName the name of the component \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] daughters the daughter particles */ LauAbsResonance(const TString& resName, const Int_t resPairAmpInt, const LauDaughters* daughters); //! Destructor virtual ~LauAbsResonance(); //! Initialise the model virtual void initialise() = 0; //! Calculate the complex amplitude /*! \param [in] kinematics the kinematic variables of the current event \return the complex amplitude */ virtual LauComplex amplitude(const LauKinematics* kinematics); //! Get the resonance model type /*! \return the resonance model type */ virtual LauResonanceModel getResonanceModel() const = 0; //! Get the spin type /*! \return the spin formalism */ LauSpinType getSpinType() const {return spinType_;} //! Get the name of the resonance /*! \return the resonance name */ const TString& getResonanceName() const {return resName_;} //! Get the name of the resonance /*! \return the resonance name */ const TString& getSanitisedName() const {return sanitisedName_;} //! Get the integer to identify which DP axis the resonance belongs to /*! \return the DP axis identification number, the ID of the bachelor */ Int_t getPairInt() const {return resPairAmpInt_;} //! Get the spin of the resonance /*! \return the resonance spin */ Int_t getSpin() const {return resSpin_;} //! Get the charge of the resonance /*! \return the resonance charge */ Int_t getCharge() const {return resCharge_;} //! Get the mass of the resonance /*! \return the resonance mass */ Double_t getMass() const {return (resMass_!=0) ? resMass_->unblindValue() : -1.0;} //! Get the width of the resonance /*! \return the resonance width */ Double_t getWidth() const {return (resWidth_!=0) ? resWidth_->unblindValue() : -1.0;} //! Get the mass parameter of the resonance /*! \return the resonance mass parameter */ LauParameter* getMassPar() {return resMass_;} //! Get the width parameter of the resonance /*! \return the resonance width parameter */ LauParameter* getWidthPar() {return resWidth_;} //! Retrieve the resonance parameters, e.g. so that they can be loaded into a fit /*! \return floating parameters of the resonance */ virtual const std::vector& getFloatingParameters() { return this->getParameters(); }; //! Is the amplitude pre-symmetrised? /*! The default value is kFALSE, so pre-symmetrised lineshapes should override this. \return whether the amplitude is already symmetrised */ virtual Bool_t preSymmetrised() const {return kFALSE;} //! Get the helicity flip flag /*! \return the flip helicity flag */ Bool_t flipHelicity() const {return flipHelicity_;} //! Set the helicity flip flag /*! \param [in] boolean the helicity flip status */ void flipHelicity(const Bool_t boolean) {flipHelicity_ = boolean;} //! Get the ignore momenta flag /*! Whether to ignore the momentum factors in both the spin factor and the mass-dependent width \return the ignore momenta flag */ Bool_t ignoreMomenta() const {return ignoreMomenta_;} //! Set the ignore momenta flag /*! Whether to ignore the momentum factors in both the spin factor and the mass-dependent width \param [in] boolean the ignore momenta status */ void ignoreMomenta(const Bool_t boolean) {ignoreMomenta_ = boolean;} //! Get the ignore spin flag /*! Whether to set the spinTerm to unity always \return the ignore spin flag */ Bool_t ignoreSpin() const {return ignoreSpin_;} //! Set the ignore spin flag /*! Whether to set the spinTerm to unity always \param [in] boolean the ignore spin status */ void ignoreSpin(const Bool_t boolean) {ignoreSpin_ = boolean;} //! Get the ignore barrier factor scaling flag /*! Whether to ignore barrier factor scaling in the amplitude numerator, they are still used for the mass-dependent width \return the ignore barrier amplitude scaling flag */ Bool_t ignoreBarrierScaling() const {return ignoreBarrierScaling_;} //! Set the ignore barrier factor scaling flag /*! Whether to ignore barrier factor scaling in the amplitude numerator, they are still used for the mass-dependent width \param [in] boolean the ignore barrier factor scaling status */ void ignoreBarrierScaling(const Bool_t boolean) {ignoreBarrierScaling_ = boolean;} //! Allow the mass, width and spin of the resonance to be changed /*! Negative values wil be ignored, so if, for example, you want to only change the spin you can provide negative values for the mass and width \param [in] newMass new value of the resonance mass \param [in] newWidth new value of the resonance width \param [in] newSpin new value of the resonance spin */ void changeResonance(const Double_t newMass, const Double_t newWidth, const Int_t newSpin); //! Allow the Blatt-Weisskopf radius for the resonance and parent factors to be changed /*! Negative values wil be ignored, so if, for example, you want to only change the parent radius you can provide a negative value for the resonance radius \param [in] resRadius new value of the resonance radius \param [in] parRadius new value of the parent radius */ void changeBWBarrierRadii(const Double_t resRadius, const Double_t parRadius); //! Set value of the various parameters /*! \param [in] name the name of the parameter to be changed \param [in] value the new parameter value */ virtual void setResonanceParameter(const TString& name, const Double_t value); //! Allow the various parameters to float in the fit /*! \param [in] name the name of the parameter to be floated */ virtual void floatResonanceParameter(const TString& name); //! Access the given resonance parameter /*! \param [in] name the name of the parameter \return the corresponding parameter */ virtual LauParameter* getResonanceParameter(const TString& name); //! Fix or release the resonance mass /*! \param [in] parFixed new status of mass */ void fixMass(const Bool_t parFixed) { if (resMass_!=0) { resMass_->fixed(parFixed); } } //! Fix or release the resonance width /*! \param [in] parFixed new status of width */ void fixWidth(const Bool_t parFixed) { if (resWidth_!=0) { resWidth_->fixed(parFixed); } } //! Get the status of resonance mass (fixed or released) /*! \return the status of resonance mass (fixed or released) */ Bool_t fixMass() const { return (resMass_!=0) ? resMass_->fixed() : kTRUE; } //! Get the status of resonance width (fixed or released) /*! \return the status of resonance width (fixed or released) */ Bool_t fixWidth() const { return (resWidth_!=0) ? resWidth_->fixed() : kTRUE; } //! Set the spin formalism to be used /*! \param [in] spinType the spin formalism */ void setSpinType(const LauSpinType spinType) {spinType_ = spinType;} //! Set the form factor model and parameters /*! \param [in] resFactor the barrier factor for the resonance decay \param [in] parFactor the barrier factor for the parent decay */ void setBarrierRadii(LauBlattWeisskopfFactor* resFactor, LauBlattWeisskopfFactor* parFactor) { resBWFactor_ = resFactor; parBWFactor_ = parFactor; } //! Fix or release the Blatt-Weisskopf barrier radii void fixBarrierRadii(const Bool_t fixResRadius, const Bool_t fixParRadius); //! Get the status of resonance barrier radius (fixed or released) Bool_t fixResRadius() const; //! Get the status of parent barrier radius (fixed or released) Bool_t fixParRadius() const; //! Get the radius of the resonance barrier factor Double_t getResRadius() const; //! Get the radius of the parent barrier factor Double_t getParRadius() const; protected: //! Get the name of the parent particle TString getNameParent() const; //! Get the name of the first daughter of the resonance TString getNameDaug1() const; //! Get the name of the second daughter of the resonance TString getNameDaug2() const; //! Get the name of the daughter that does not originate form the resonance TString getNameBachelor() const; //! Get the parent particle mass Double_t getMassParent() const; //! Get the mass of daughter 1 Double_t getMassDaug1() const; //! Get the mass of daughter 2 Double_t getMassDaug2() const; //! Get the mass of the bachelor daughter Double_t getMassBachelor() const; //! Get the Charge of the parent particle Int_t getChargeParent() const; //! Get the charge of daughter 1 Int_t getChargeDaug1() const; //! Get the charge of daughter 2 Int_t getChargeDaug2() const; //! Get the charge of the bachelor daughter Int_t getChargeBachelor() const; //! Get the current value of the daughter momentum in the resonance rest frame Double_t getQ() const {return q_;} //! Get the current value of the bachelor momentum in the resonance rest frame Double_t getP() const {return p_;} //! Get the current value of the bachelor momentum in the parent rest frame Double_t getPstar() const {return pstar_;} //! Get the current value of the full spin-dependent covariant factor Double_t getCovFactor() const {return covFactor_;} //! Get the centrifugal barrier for the parent decay LauBlattWeisskopfFactor* getParBWFactor() {return parBWFactor_;} const LauBlattWeisskopfFactor* getParBWFactor() const {return parBWFactor_;} //! Get the centrifugal barrier for the resonance decay LauBlattWeisskopfFactor* getResBWFactor() {return resBWFactor_;} const LauBlattWeisskopfFactor* getResBWFactor() const {return resBWFactor_;} //! Access the resonance info object LauResonanceInfo* getResInfo() const {return resInfo_;} //! Access the daughters object const LauDaughters* getDaughters() const {return daughters_;} //! Calculate the amplitude spin term using the Zemach tensor formalism /*! \param [in] pProd the momentum factor (either q * p or q * pstar) */ Double_t calcZemachSpinFactor( const Double_t pProd ) const; //! Calculate the amplitude spin term using the covariant tensor formalism /*! \param [in] pProd the momentum factor (q * pstar) */ Double_t calcCovSpinFactor( const Double_t pProd ); //! Calculate the spin-dependent covariant factor /*! \param [in] erm E_ij in the parent rest-frame divided by m_ij (equivalent to sqrt(1 + p^2/mParent^2)) */ void calcCovFactor( const Double_t erm ); //! Calculate the Legendre polynomial for the spin factor /*! Uses the current-event value of cosHel_ */ Double_t calcLegendrePoly() const; //! Calculate the Legendre polynomial for the spin factor (specifying the cosHel value) /*! \param [in] cosHel the cosine of the helicity angle */ Double_t calcLegendrePoly( const Double_t cosHel ); //! Complex resonant amplitude /*! \param [in] mass appropriate invariant mass for the resonance \param [in] spinTerm spin term */ virtual LauComplex resAmp(Double_t mass, Double_t spinTerm) = 0; //! Clear list of floating parameters void clearFloatingParameters() { resParameters_.clear(); } //! Add parameter to the list of floating parameters /*! \param [in] param the parameter to be added to the list */ void addFloatingParameter( LauParameter* param ); //! Access the list of floating parameters std::vector& getParameters() { return resParameters_; } private: //! Copy constructor (not implemented) LauAbsResonance(const LauAbsResonance& rhs); //! Copy assignment operator (not implemented) LauAbsResonance& operator=(const LauAbsResonance& rhs); //! Information on the resonance LauResonanceInfo* resInfo_; //! Information on the particles const LauDaughters* daughters_; //! Parent name TString nameParent_; //! Daughter 1 name TString nameDaug1_; //! Daughter 2 name TString nameDaug2_; //! Bachelor name TString nameBachelor_; //! Parent charge Int_t chargeParent_; //! Daughter 1 charge Int_t chargeDaug1_; //! Daughter 2 charge Int_t chargeDaug2_; //! Bachelor charge Int_t chargeBachelor_; //! Parent mass Double_t massParent_; //! Daughter 1 mass Double_t massDaug1_; //! Daughter 2 mass Double_t massDaug2_; // Bachelor mass Double_t massBachelor_; //! Resonance name TString resName_; //! Resonance name with illegal characters removed TString sanitisedName_; //! Resonance mass LauParameter* resMass_; //! Resonance width LauParameter* resWidth_; //! All parameters of the resonance std::vector resParameters_; //! Resonance spin Int_t resSpin_; //! Resonance charge Int_t resCharge_; //! DP axis identifier Int_t resPairAmpInt_; //! Blatt Weisskopf barrier for parent decay LauBlattWeisskopfFactor* parBWFactor_; //! Blatt Weisskopf barrier for resonance decay LauBlattWeisskopfFactor* resBWFactor_; //! Spin formalism LauSpinType spinType_; //! Boolean to flip helicity Bool_t flipHelicity_; //! Boolean to ignore the momentum factors in both the spin factor and the mass-dependent width Bool_t ignoreMomenta_; //! Boolean to set the spinTerm to unity always Bool_t ignoreSpin_; //! Boolean to ignore barrier factor scaling in the amplitude numerator, they are still used for the mass-dependent width Bool_t ignoreBarrierScaling_; // Event kinematics information //! Invariant mass Double_t mass_; //! Helicity angle cosine Double_t cosHel_; //! Daughter momentum in resonance rest frame Double_t q_; //! Bachelor momentum in resonance rest frame Double_t p_; //! Bachelor momentum in parent rest frame Double_t pstar_; //! Covariant factor /*! sqrt(1 + z*z), where z = p / mParent Can also be expressed as E_ij in the parent rest-frame divided by m_ij - indeed this is how LauKinematics calculates it. \see LauKinematics::getcov12 \see LauKinematics::getcov13 \see LauKinematics::getcov23 */ Double_t erm_; //! Covariant factor (full spin-dependent expression) Double_t covFactor_; ClassDef(LauAbsResonance,0) // Abstract resonance class }; #endif Index: trunk/inc/LauKMatrixPropagator.hh =================================================================== --- trunk/inc/LauKMatrixPropagator.hh (revision 563) +++ trunk/inc/LauKMatrixPropagator.hh (revision 564) @@ -1,500 +1,499 @@ /* Copyright 2008 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauKMatrixPropagator.hh \brief File containing declaration of LauKMatrixPropagator class. */ /*! \class LauKMatrixPropagator \brief Class for defining a K-matrix propagator. Class used to define a K-matrix propagator. See the following papers for info: hep-ph/0204328, hep-ex/0312040, [hep-ex]0804.2089 and hep-ph/9705401. */ #ifndef LAU_KMATRIX_PROPAGATOR #define LAU_KMATRIX_PROPAGATOR #include "LauComplex.hh" #include "LauKinematics.hh" #include "LauParameter.hh" #include "TMatrixD.h" #include "TString.h" #include #include class LauKMatrixPropagator { public: //! Constructor /*! \param [in] name name of the propagator \param [in] paramFileName the parameter file name \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] nChannels the number of channels \param [in] nPoles the number of poles \param [in] rowIndex this specifies which row of the propagator should be used when summing over the amplitude channels */ LauKMatrixPropagator(const TString& name, const TString& paramFileName, Int_t resPairAmpInt, Int_t nChannels, Int_t nPoles, Int_t rowIndex = 1); //! Destructor virtual ~LauKMatrixPropagator(); //! Calculate the invariant mass squared s /*! \param [in] kinematics the kinematics of the current event */ void updatePropagator(const LauKinematics* kinematics); //! Calculate the K-matrix propagator for the given s value /*! \param [in] s the invariant mass squared */ void updatePropagator(Double_t s); //! Read an input file to set parameters /*! \param [in] inputFile name of the input file */ void setParameters(const TString& inputFile); //! Get the scattering K matrix /*! \return the real, symmetric scattering K matrix */ TMatrixD getKMatrix() const {return ScattKMatrix_;} //! Get the real part of the propagator full matrix /*! \return the real part of the propagator full matrix */ TMatrixD getRealPropMatrix() const {return realProp_;} //! Get the negative imaginary part of the full propagator matrix /*! \return the negative imaginary part of the full propagator matrix */ TMatrixD getNegImagPropMatrix() const {return negImagProp_;} //! Get the real part of the term of the propagator /*! \param [in] channelIndex the channel number \return the real part of the propagator term */ Double_t getRealPropTerm(Int_t channelIndex) const; //! Get the imaginary part of the term of the propagator /*! \param [in] channelIndex the channel number \return the imaginiary part of the propagator term */ Double_t getImagPropTerm(Int_t channelIndex) const; //! Get the 1/(m_pole^2 -s) terms for the scattering and production K-matrix formulae /*! \param [in] poleIndex the number of the pole required \return the value of 1/(m_pole^2 -s) */ Double_t getPoleDenomTerm(Int_t poleIndex) const; //! Get coupling constants that were loaded from the input file /*! \param [in] poleIndex number of the required pole \param [in] channelIndex number of the required channel \return the value of the coupling constant */ Double_t getCouplingConstant(Int_t poleIndex, Int_t channelIndex) const; //! Get scattering constants that were loaded from the input file /*! \param [in] channel1Index number of the first channel index \param [in] channel2Index number of the second channel index \return the value of the scattering constant */ Double_t getScatteringConstant(Int_t channel1Index, Int_t channel2Index) const; //! Get the "slowly-varying part" term of the amplitude /*! \return the svp term */ Double_t getProdSVPTerm() const {return prodSVP_;} //! Get the full complex propagator term for a given channel /*! \param [in] channelIndex the number of the required channel \return the complex propagator term */ LauComplex getPropTerm(Int_t channelIndex) const; //! Get the DP axis identifier /*! /return the value to identify the DP axis in question */ Int_t getResPairAmpInt() const {return resPairAmpInt_;} //! Get the number of channels /*! /return the number of channels */ Int_t getNChannels() const {return nChannels_;} //! Get the number of poles /*! /return the number of poles */ Int_t getNPoles() const {return nPoles_;} //! Get the propagator name /*! /return the name of the propagator */ TString getName() const {return name_;} //! Get the unitary transition amplitude for the given channel /*! \param [in] s The invariant mass squared \param [in] channel The index number of the channel process \return the complex amplitude T */ LauComplex getTransitionAmp(Double_t s, Int_t channel); //! Get the complex phase space term for the given channel and invariant mass squared /*! \param [in] s The invariant mass squared \param [in] channel The index number of the channel process \return the complex phase space term rho(channel, channel) */ LauComplex getPhaseSpaceTerm(Double_t s, Int_t channel); //! Get the Adler zero factor, which is set when updatePropagator is called /*! \return the Adler zero factor */ Double_t getAdlerZero() const {return adlerZeroFactor_;} //! Get the THat amplitude for the given s and channel number /*! \param [in] s The invariant mass squared \param [in] channel The index number of the channel process \return the complex THat amplitude */ LauComplex getTHat(Double_t s, Int_t channel); protected: //! Calculate the scattering K-matrix for the given value of s /*! \param [in] s the invariant mass squared */ void calcScattKMatrix(Double_t s); //! Calculate the real and imaginary part of the phase space density diagonal matrix /*! \param [in] s the invariant mass squared */ void calcRhoMatrix(Double_t s); //! Calulate the term 1/(m_pole^2 - s) for the scattering and production K-matrix formulae /*! \param [in] s the invariant mass squared */ void calcPoleDenomVect(Double_t s); //! Calculate the pipi phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcPiPiRho(Double_t s) const; //! Calculate the KK phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcKKRho(Double_t s) const; //! Calculate the 4 pi phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcFourPiRho(Double_t s) const; //! Calculate the eta-eta phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcEtaEtaRho(Double_t s) const; //! Calculate the eta-eta' phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcEtaEtaPRho(Double_t s) const; //! Calculate the Kpi phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcKPiRho(Double_t s) const; //! Calculate the K-eta' phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcKEtaPRho(Double_t s) const; //! Calculate the Kpipipi phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcKThreePiRho(Double_t s) const; //! Calculate the "slow-varying part" /*! \param [in] s the invariant mass squared \param [in] s0 the invariant mass squared at the Adler zero \return the SVP term */ Double_t calcSVPTerm(Double_t s, Double_t s0) const; //! Update the scattering "slowly-varying part" /*! \param [in] s the invariant mass squared */ void updateScattSVPTerm(Double_t s); //! Update the production "slowly-varying part" /*! \param [in] s the invariant mass squared */ void updateProdSVPTerm(Double_t s); //! Calculate the multiplicative factor containing severa Adler zero constants /*! \param [in] s the invariant mass squared */ void updateAdlerZeroFactor(Double_t s); //! Check the phase space factors that need to be used /*! \param [in] phaseSpaceInt phase space types \return true of false */ Bool_t checkPhaseSpaceType(Int_t phaseSpaceInt) const; //! Get the unitary transition amplitude matrix for the given kinematics /*! \param [in] kinematics The pointer to the constant kinematics */ void getTMatrix(const LauKinematics* kinematics); //! Get the unitary transition amplitude matrix for the given kinematics /*! \param [in] s The invariant mass squared of the system */ void getTMatrix(Double_t s); //! Get the square root of the phase space matrix void getSqrtRhoMatrix(); private: //! Copy constructor (not implemented) LauKMatrixPropagator(const LauKMatrixPropagator& rhs); //! Copy assignment operator (not implemented) LauKMatrixPropagator& operator=(const LauKMatrixPropagator& rhs); //! Create a map for the K-matrix parameters typedef std::map > KMatrixParamMap; //! Initialise and set the dimensions for the internal matrices and parameter arrays void initialiseMatrices(); //! Store the (phase space) channel indices from a line in the parameter file /*! \param [in] theLine Vector of strings corresponding to the line from the parameter file */ void storeChannels(const std::vector& theLine); //! Store the pole mass and couplings from a line in the parameter file /*! \param [in] theLine Vector of strings corresponding to the line from the parameter file */ void storePole(const std::vector& theLine); //! Store the scattering coefficients from a line in the parameter file /*! \param [in] theLine Vector of strings corresponding to the line from the parameter file */ void storeScattering(const std::vector& theLine); //! Store miscelleanous parameters from a line in the parameter file /*! \param [in] keyword the name of the parameter to be set \param [in] parString the string containing the value of the parameter */ void storeParameter(const TString& keyword, const TString& parString); //! String to store the propagator name TString name_; //! Name of the input parameter file TString paramFileName_; //! Number to identify the DP axis in question Int_t resPairAmpInt_; //! Row index - 1 Int_t index_; //! s value of the previous pole Double_t previousS_; //! "slowly-varying part" for the scattering K-matrix Double_t scattSVP_; //! "slowly-varying part" for the production K-matrix Double_t prodSVP_; //! Real part of the propagator matrix TMatrixD realProp_; //! Imaginary part of the propagator matrix TMatrixD negImagProp_; // Integers to specify the allowed channels for the phase space calculations. // Please keep Zero at the start and leave TotChannels at the end // whenever more channels are added to this. //! Integers to specify the allowed channels for the phase space calculations enum KMatrixChannels {Zero, PiPi, KK, FourPi, EtaEta, EtaEtaP, KPi, KEtaP, KThreePi, TotChannels}; //! Scattering K-matrix TMatrixD ScattKMatrix_; //! Real part of the phase space density diagonal matrix TMatrixD ReRhoMatrix_; //! Imaginary part of the phase space density diagonal matrix TMatrixD ImRhoMatrix_; //! Identity matrix TMatrixD IMatrix_; //! Null matrix TMatrixD zeroMatrix_; //! Real part of the square root of the phase space density diagonal matrix TMatrixD ReSqrtRhoMatrix_; //! Imaginary part of the square root of the phase space density diagonal matrix TMatrixD ImSqrtRhoMatrix_; //! Real part of the unitary T matrix TMatrixD ReTMatrix_; //! Imaginary part of the unitary T matrix TMatrixD ImTMatrix_; //! Number of channels Int_t nChannels_; //! Number of poles Int_t nPoles_; //! Vector of squared pole masses std::vector mSqPoles_; //! Array of coupling constants LauParArray gCouplings_; //! Array of scattering SVP values LauParArray fScattering_; //! Vector of phase space types std::vector phaseSpaceTypes_; //! Vector of squared masses std::vector mSumSq_; //! Vector of mass differences std::vector mDiffSq_; //! Vector of 1/(m_pole^2 - s) terms for scattering and production K-matrix formulae std::vector poleDenomVect_; //! Constant from input file LauParameter mSq0_; //! Constant from input file LauParameter s0Scatt_; //! Constant from input file LauParameter s0Prod_; //! Constant from input file LauParameter sA_; //! Constant from input file LauParameter sA0_; //! Defined as 0.5*sA*mPi*mPi Double_t sAConst_; //! Defined as 4*mPi*mPi Double_t m2piSq_; //! Defined as 4*mK*mK Double_t m2KSq_; //! Defined as 4*mEta*mEta Double_t m2EtaSq_; //! Defined as (mEta+mEta')^2 Double_t mEtaEtaPSumSq_; //! Defined as (mEta-mEta')^2 Double_t mEtaEtaPDiffSq_; //! Defined as (mK+mPi)^2 Double_t mKpiSumSq_; //! Defined as (mK-mPi)^2 Double_t mKpiDiffSq_; //! Defined as (mK+mEta')^2 Double_t mKEtaPSumSq_; //! Defined as (mK-mEta')^2 Double_t mKEtaPDiffSq_; //! Defined as (mK-3*mPi)^2 Double_t mK3piDiffSq_; //! Factor used to calculate the Kpipipi phase space term Double_t k3piFactor_; //! Factor used to calculate the pipipipi phase space term Double_t fourPiFactor1_; //! Factor used to calculate the pipipipi phase space term Double_t fourPiFactor2_; //! Multiplicative factor containing various Adler zero constants Double_t adlerZeroFactor_; //! Tracks if all params have been set Bool_t parametersSet_; //! Control the output of the functions Bool_t verbose_; //! Control if scattering constants are channel symmetric: f_ji = f_ij Bool_t scattSymmetry_; ClassDef(LauKMatrixPropagator,0) // K-matrix amplitude model - }; #endif Index: trunk/inc/LauRescattering2Res.hh =================================================================== --- trunk/inc/LauRescattering2Res.hh (revision 563) +++ trunk/inc/LauRescattering2Res.hh (revision 564) @@ -1,174 +1,187 @@ +/* +Copyright 2018 University of Warwick -// Copyright University of Warwick 2004 - 2014. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// Authors: -// Thomas Latham -// John Back -// Paul Harrison +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Laura++ package authors: +John Back +Paul Harrison +Thomas Latham +*/ /*! \file LauRescattering2Res.hh \brief File containing declaration of LauRescattering2Res class. */ /*! \class LauRescattering2Res - \brief Class for defining the NR amplitude model. + \brief Class for defining an alternative rescattering model. - Class for defining pipi SWave poposed by J.Schechter as used by Cleo (PRD76,01200(2007) + Model for pipi SWave proposed by J.Schechter as used by Cleo (PRD76,01200(2007) to replace the sigma and f0(980) contributions. */ -#ifndef LAU_RESCATERING2_RES -#define LAU_RESCATERING2_RES +#ifndef LAU_RESCATTERING2_RES +#define LAU_RESCATTERING2_RES #include "TString.h" #include "LauAbsResonance.hh" #include "LauComplex.hh" class LauKinematics; class LauRescattering2Res : public LauAbsResonance { public: //! Constructor /*! \param [in] resInfo the object containing information on the resonance name, mass, width, spin, charge, etc. \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] daughters the daughter particles */ LauRescattering2Res(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters); //! Destructor virtual ~LauRescattering2Res(); //! Initialise the model virtual void initialise(); //! Get the resonance model type /*! \return the resonance model type */ virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return LauAbsResonance::Rescattering2;} //! Set value of a resonance parameter /*! \param [in] name the name of the parameter to be changed \param [in] value the new parameter value */ virtual void setResonanceParameter(const TString& name, const Double_t value); //! Allow the various parameters to float in the fit /*! \param [in] name the name of the parameter to be floated */ virtual void floatResonanceParameter(const TString& name); //! Access the given resonance parameter /*! \param [in] name the name of the parameter \return the corresponding parameter */ virtual LauParameter* getResonanceParameter(const TString& name); //! Retrieve the resonance parameters, e.g. so that they can be loaded into a fit /*! \return floating parameters of the resonance */ virtual const std::vector& getFloatingParameters(); protected: //! This is not meant to be called virtual LauComplex resAmp(Double_t mass, Double_t spinTerm); Double_t pn(const Double_t x, const Double_t n) const; Double_t x(const Double_t sqr_t, const Int_t i) const; Double_t phi00(const Double_t sqr_t, const Int_t i) const; Double_t g00(const Double_t sqr_t, const Int_t i) const; void setB1Parameter(const Double_t B1); void setB2Parameter(const Double_t B2); void setB3Parameter(const Double_t B3); void setC1Parameter(const Double_t C1); void setC2Parameter(const Double_t C2); void setC3Parameter(const Double_t C3); void setC4Parameter(const Double_t C4); void setC5Parameter(const Double_t C5); void setD0Parameter(const Double_t D0); void setD1Parameter(const Double_t D1); void setD2Parameter(const Double_t D2); void setD3Parameter(const Double_t D3); void setF1Parameter(const Double_t F1); void setF2Parameter(const Double_t F2); void setF3Parameter(const Double_t F3); void setF4Parameter(const Double_t F4); Double_t getB1Parameter() const {return (B1_!=0) ? B1_->value() : 0.0;} Bool_t fixB1Parameter() const {return (B1_!=0) ? B1_->fixed() : kTRUE;} Double_t getB2Parameter() const {return (B2_!=0) ? B2_->value() : 0.0;} Bool_t fixB2Parameter() const {return (B2_!=0) ? B2_->fixed() : kTRUE;} Double_t getB3Parameter() const {return (B3_!=0) ? B3_->value() : 0.0;} Bool_t fixB3Parameter() const {return (B3_!=0) ? B3_->fixed() : kTRUE;} Double_t getC1Parameter() const {return (C1_!=0)? C1_->value() : 0.0;} Bool_t fixC1Parameter() const {return (C1_!=0) ?C1_->fixed() : kTRUE;} Double_t getC2Parameter() const {return (C2_!=0)? C2_->value() : 0.0;} Bool_t fixC2Parameter() const {return (C2_!=0) ?C2_->fixed() : kTRUE;} Double_t getC3Parameter() const {return (C3_!=0)? C3_->value() : 0.0;} Bool_t fixC3Parameter() const {return (C3_!=0) ?C3_->fixed() : kTRUE;} Double_t getC4Parameter() const {return (C4_!=0)? C4_->value() : 0.0;} Bool_t fixC4Parameter() const {return (C4_!=0) ?C4_->fixed() : kTRUE;} Double_t getC5Parameter() const {return (C5_!=0)? C5_->value() : 0.0;} Bool_t fixC5Parameter() const {return (C5_!=0) ?C5_->fixed() : kTRUE;} Double_t getD0Parameter() const {return (D0_!=0) ? D0_->value() : 0.0;} Bool_t fixD0Parameter() const {return (D0_!=0) ? D0_->fixed() : kTRUE;} Double_t getD1Parameter() const {return (D1_!=0) ? D1_->value() : 0.0;} Bool_t fixD1Parameter() const {return (D1_!=0) ? D1_->fixed() : kTRUE;} Double_t getD2Parameter() const {return (D2_!=0) ? D2_->value() : 0.0;} Bool_t fixD2Parameter() const {return (D2_!=0) ? D2_->fixed() : kTRUE;} Double_t getD3Parameter() const {return (D3_!=0) ? D3_->value() : 0.0;} Bool_t fixD3Parameter() const {return (D3_!=0) ? D3_->fixed() : kTRUE;} Double_t getF1Parameter() const {return (F1_!=0) ? F1_->value() : 0.0;} Bool_t fixF1Parameter() const {return (F1_!=0) ? F1_->fixed() : kTRUE;} Double_t getF2Parameter() const {return (F2_!=0) ? F2_->value() : 0.0;} Bool_t fixF2Parameter() const {return (F2_!=0) ? F2_->fixed() : kTRUE;} Double_t getF3Parameter() const {return (F3_!=0) ? F3_->value() : 0.0;} Bool_t fixF3Parameter() const {return (F3_!=0) ? F3_->fixed() : kTRUE;} Double_t getF4Parameter() const {return (F4_!=0) ? F4_->value() : 0.0;} Bool_t fixF4Parameter() const {return (F4_!=0) ? F4_->fixed() : kTRUE;} private: //! Copy constructor (not implemented) LauRescattering2Res(const LauRescattering2Res& rhs); //! Copy assignment operator (not implemented) LauRescattering2Res& operator=(const LauRescattering2Res& rhs); //! Parameter LauParameter* B1_; LauParameter* B2_; LauParameter* B3_; LauParameter* C1_; LauParameter* C2_; LauParameter* C3_; LauParameter* C4_; LauParameter* C5_; LauParameter* D0_; LauParameter* D1_; LauParameter* D2_; LauParameter* D3_; LauParameter* F1_; LauParameter* F2_; LauParameter* F3_; LauParameter* F4_; Double_t sqr_tmin[3], sqr_tmax[3]; Double_t B0_, C0_, F0_; ClassDef(LauRescattering2Res,0) // pipi S wave model by Schechter amplitude model }; #endif Index: trunk/inc/LauPolarFormFactorSymNR.hh =================================================================== --- trunk/inc/LauPolarFormFactorSymNR.hh (revision 563) +++ trunk/inc/LauPolarFormFactorSymNR.hh (revision 564) @@ -1,134 +1,149 @@ -// Copyright University of Warwick 2004 - 2014. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// Authors: -// Thomas Latham -// John Back -// Paul Harrison +/* +Copyright 2018 University of Warwick + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Laura++ package authors: +John Back +Paul Harrison +Thomas Latham +*/ /*! \file LauPolarFormFactorSymNR.hh \brief File containing declaration of LauPolarFormFactorSymNR class. */ /*! \class LauPolarFormFactorSymNR - \brief Class for defining the Reescatering model. + \brief Class for defining a nonresonant form factor model - Defines the reescatering model from: - Pelaez et Yndúrain: arXiv:hep-ph/0411334v2 Mar 2005 - Nogueira, Bediaga, Cavalcante, Frederico, Lorenco: JHEP ??? + Defines the nonresonant form factor model from: + Nogueira, Bediaga, Cavalcante, Frederico, Lorenco: Phys. Rev. D92 (2015) 054010, arXiv:1506.08332 [hep-ph] + Pelaez, Yndurain: Phys. Rev. D71 (2005) 074016, arXiv:hep-ph/0411334 + modified for symmetric DPs. */ #ifndef LAU_POLAR_FORM_FACTOR_SYM_NR #define LAU_POLAR_FORM_FACTOR_SYM_NR #include "TString.h" #include "LauComplex.hh" #include "LauAbsResonance.hh" class LauKinematics; class LauParameter; class LauPolarFormFactorSymNR : public LauAbsResonance { public: //! Constructor /*! \param [in] resInfo the object containing information on the resonance name, mass, width, spin, charge, etc. \param [in] resType the model of the resonance \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] daughters the daughter particles */ LauPolarFormFactorSymNR(LauResonanceInfo* resInfo, const LauAbsResonance::LauResonanceModel resType, const Int_t resPairAmpInt, const LauDaughters* daughters); //! Destructor virtual ~LauPolarFormFactorSymNR(); //! Initialise the model virtual void initialise(); //! Get the complex dynamical amplitude /*! \param [in] kinematics the kinematic variables of the current event \return the complex amplitude */ virtual LauComplex amplitude(const LauKinematics* kinematics); //! Get the resonance model type /*! \return the resonance model type */ virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return model_;} //! Set value of the various parameters /*! \param [in] name the name of the parameter to be changed \param [in] value the new parameter value */ virtual void setResonanceParameter(const TString& name, const Double_t value); //! Allow the various parameters to float in the fit /*! \param [in] name the name of the parameter to be floated */ virtual void floatResonanceParameter(const TString& name); //! Access the given resonance parameter /*! \param [in] name the name of the parameter \return the corresponding parameter */ virtual LauParameter* getResonanceParameter(const TString& name); //! Retrieve the resonance parameters, e.g. so that they can be loaded into a fit /*! \return floating parameters of the resonance */ virtual const std::vector& getFloatingParameters(); protected: - //! Set the parameter lambda, the NR term for the + //! Set the parameter lambda, the NR shape parameter /*! - \param [in] lambda, the NR term for the + \param [in] lambda the NR shape parameter */ void setLambda(const Double_t lambda); - //! Get the lambda, the NR term for the + //! Get the parameter lambda, the NR shape parameter /*! - \return the lambda, the NR term for the + \return lambda the NR shape parameter */ Double_t getLambda() const {return (lambda_!=0) ? lambda_->value() : 0.0;} //! See if the lambda parameter is fixed or floating /*! \return kTRUE if the lambda parameter is fixed, kFALSE otherwise */ Bool_t fixLambda() const {return (lambda_!=0) ? lambda_->fixed() : kTRUE;} //! Complex resonant amplitude /*! \param [in] mass appropriate invariant mass for the resonance \param [in] spinTerm Zemach spin term */ virtual LauComplex resAmp(Double_t mass, Double_t spinTerm); private: //! Copy constructor (not implemented) LauPolarFormFactorSymNR(const LauPolarFormFactorSymNR& rhs); //! Copy assignment operator (not implemented) LauPolarFormFactorSymNR& operator=(const LauPolarFormFactorSymNR& rhs); LauParameter* lambda_; //! The model to use LauAbsResonance::LauResonanceModel model_; ClassDef(LauPolarFormFactorSymNR,0) }; #endif Index: trunk/inc/Laura++_LinkDef.h =================================================================== --- trunk/inc/Laura++_LinkDef.h (revision 563) +++ trunk/inc/Laura++_LinkDef.h (revision 564) @@ -1,152 +1,155 @@ /* Copyright 2013 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ #ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class Lau1DCubicSpline+; #pragma link C++ class Lau1DHistPdf+; #pragma link C++ class Lau2DAbsDP+; #pragma link C++ class Lau2DAbsDPPdf+; #pragma link C++ class Lau2DAbsHistDP+; #pragma link C++ class Lau2DAbsHistDPPdf+; #pragma link C++ class Lau2DCubicSpline+; #pragma link C++ class Lau2DHistDP+; #pragma link C++ class Lau2DHistDPPdf+; #pragma link C++ class Lau2DHistPdf+; #pragma link C++ class Lau2DSplineDP+; #pragma link C++ class Lau2DSplineDPPdf+; #pragma link C++ class LauAbsBkgndDPModel+; #pragma link C++ class LauAbsCoeffSet+; #pragma link C++ class LauAbsEffModel+; #pragma link C++ class LauAbsFitter+; #pragma link C++ class LauAbsFitModel+; #pragma link C++ class LauAbsIncohRes+; #pragma link C++ class LauAbsModIndPartWave+; #pragma link C++ class LauAbsPdf+; #pragma link C++ class LauAbsResonance+; #pragma link C++ class LauAbsRValue+; #pragma link C++ class LauArgusPdf+; #pragma link C++ class LauAsymmCalc+; #pragma link C++ class LauBelleCPCoeffSet+; #pragma link C++ class LauBelleNR+; #pragma link C++ class LauBelleSymNR+; #pragma link C++ class LauBifurcatedGaussPdf+; #pragma link C++ class LauBkgndDPModel+; #pragma link C++ class LauBlattWeisskopfFactor+; #pragma link C++ class LauBlind+; #pragma link C++ class LauBreitWignerRes+; #pragma link C++ class LauCacheData+; +#pragma link C++ class LauCalcChiSq+; #pragma link C++ class LauCartesianCPCoeffSet+; #pragma link C++ class LauCartesianGammaCPCoeffSet+; #pragma link C++ class LauChebychevPdf+; #pragma link C++ class LauCleoCPCoeffSet+; #pragma link C++ class LauComplex+; #pragma link C++ class LauCPFitModel+; #pragma link C++ class LauCruijffPdf+; #pragma link C++ class LauCrystalBallPdf+; #pragma link C++ class LauDabbaRes+; #pragma link C++ class LauDatabasePDG+; #pragma link C++ class LauDaughters+; #pragma link C++ class LauDPDepBifurGaussPdf+; #pragma link C++ class LauDPDepCruijffPdf+; #pragma link C++ class LauDPDepGaussPdf+; #pragma link C++ class LauDPDepMapPdf+; #pragma link C++ class LauDPDepSumPdf+; #pragma link C++ class LauEffModel+; #pragma link C++ class LauEFKLLMRes+; #pragma link C++ class LauEmbeddedData+; #pragma link C++ class LauExponentialPdf+; #pragma link C++ class LauFitDataTree+; #pragma link C++ class LauFitNtuple+; #pragma link C++ class LauFitter+; #pragma link C++ class LauFitObject+; #pragma link C++ class LauFlatteRes+; #pragma link C++ class LauFlatNR+; #pragma link C++ class LauFormulaPar+; #pragma link C++ class LauGaussIncohRes+; #pragma link C++ class LauGaussPdf+; #pragma link C++ class LauGenNtuple+; #pragma link C++ class LauGounarisSakuraiRes+; #pragma link C++ class LauIntegrals+; #pragma link C++ class LauDPPartialIntegralInfo+; #pragma link C++ class LauIsobarDynamics+; #pragma link C++ class LauKappaRes+; #pragma link C++ class LauKinematics+; #pragma link C++ class LauKMatrixProdPole+; #pragma link C++ class LauKMatrixProdSVP+; #pragma link C++ class LauKMatrixPropagator+; #pragma link C++ class LauKMatrixPropFactory+; #pragma link C++ class LauLASSBWRes+; #pragma link C++ class LauLASSNRRes+; #pragma link C++ class LauLASSRes+; #pragma link C++ class LauLinearPdf+; #pragma link C++ class LauMagPhaseCoeffSet+; #pragma link C++ class LauMagPhaseCPCoeffSet+; +#pragma link C++ class LauMergeDataFiles+; #pragma link C++ class LauMinuit+; #pragma link C++ class LauModIndPartWaveMagPhase+; #pragma link C++ class LauModIndPartWaveRealImag+; #pragma link C++ class LauNovosibirskPdf+; #pragma link C++ class LauNRAmplitude+; #pragma link C++ class LauParameter+; #pragma link C++ class LauParametricStepFuncPdf+; #pragma link C++ class LauParamFixed+; #pragma link C++ class LauParticlePDG+; #pragma link C++ class LauPolNR+; #pragma link C++ class LauPoleRes+; #pragma link C++ class LauPolarFormFactorNR+; #pragma link C++ class LauPolarFormFactorSymNR+; #pragma link C++ class LauPolarGammaCPCoeffSet+; #pragma link C++ class LauPrint+; #pragma link C++ class LauRealImagCoeffSet+; #pragma link C++ class LauRealImagCPCoeffSet+; #pragma link C++ class LauRealImagGammaCPCoeffSet+; #pragma link C++ class LauRelBreitWignerRes+; #pragma link C++ class LauResonanceInfo+; #pragma link C++ class LauRescatteringRes+; #pragma link C++ class LauRescattering2Res+; #pragma link C++ class LauResonanceMaker+; +#pragma link C++ class LauResultsExtractor+; #pragma link C++ class LauRhoOmegaMix+; #ifdef DOLAUROOFITSLAVE #pragma link C++ class LauRooFitSlave+; #endif #pragma link C++ class LauScfMap+; #pragma link C++ class LauSigmaRes+; #pragma link C++ class LauSigmoidPdf+; #pragma link C++ class LauSimpleFitModel+; #pragma link C++ class LauSimFitMaster+; #pragma link C++ class LauSimFitSlave+; #pragma link C++ class LauSPlot+; #pragma link C++ class LauString+; #pragma link C++ class LauSumPdf+; #pragma link C++ class LauTextFileParser+; #pragma link C++ class LauVetoes+; #pragma link C++ class LauWeightedSumEffModel+; #pragma link C++ namespace LauConstants+; #pragma link C++ namespace LauRandom+; #endif Index: trunk/inc/LauResultsExtractor.hh =================================================================== --- trunk/inc/LauResultsExtractor.hh (revision 563) +++ trunk/inc/LauResultsExtractor.hh (revision 564) @@ -1,85 +1,126 @@ /* Copyright 2005 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ #include #include #include "TString.h" class TChain; class TFile; class TH1; class TTree; -/* - A utility class to allow the extraction of the best fit from a series of - fits to a given data sample. - When fitting amplitude models, the likelihood parameter space is highly - complex. Hence the fitter can often wander into local minima. To mitigate - this effect a data sample can be fitted many times with randomised starting - values of the isobar parameters. It is then necessary to determine which of - these fits gives the best solution, i.e. the minimum NLL. This class - performs this task, reading in a series of fits for each data sample and - writing out a single file that contains the results of the best fit for each - data sample. +/*! \file LauResultsExtractor.hh + \brief File containing declaration of LauResultsExtractor class. +*/ + +/*! \class LauResultsExtractor + \brief Utility class to allow the extraction of the best fit from a series of fits to a given data sample + + A utility class to allow the extraction of the best fit from a series of fits to a given data sample. + + When fitting amplitude models, the likelihood parameter space is highly complex. + Hence the fitter can often wander into local minima. + To mitigate this effect a data sample can be fitted many times with randomised starting values of the isobar parameters. + It is then necessary to determine which of these fits gives the best solution, i.e. the minimum NLL. + This class performs this task, reading in a series of fits for each data sample and writing out a single file that contains the results of the best fit for each data sample. */ -class ResultsExtractor +class LauResultsExtractor { public: - ResultsExtractor(const TString& inputFileName, const TString& outputFileName, const TString& treeName); - ~ResultsExtractor(); - - void process(Int_t numExpts); + //! Constructor + /*! + \param [in] inputFileName name of text file containing the input ROOT files + \param [in] outputFileName name of the file to which the best fit info should be written + \param [in] treeName name of the tree to read from the input files + */ + LauResultsExtractor(const TString& inputFileName, const TString& outputFileName, const TString& treeName); + + //! Destructor + virtual ~LauResultsExtractor(); + + //! Run the calculations + /*! + \param [in] numExpts the number of experiments to process + */ + void process(const Int_t numExpts); protected: + //! Create storage for leaves and call SetBranchAddress for each void setupInputTree(); + //! Create branches in the output tree void setupOutputTree(TTree * tree); - void setInputTreeBranchStatus(Bool_t status); + //! Toggle branch status of input tree branches (except iExpt, fitStatus and NLL) + void setInputTreeBranchStatus(const Bool_t status); + //! Clear all information void clearMaps(); + //! Write the output file void writeFile(); private: + //! Name of text file containing list of input files TString inputFileName_; + //! Name of output ROOT file TString outputFileName_; + //! Name of tree in input ROOT files TString treeName_; + + //! Chain of inputs TChain * inputTree_; + + //! Output file TFile * outputFile_; + //! Output tree TTree * outputTree_; + + //! Number of entries in the input chain Int_t nEntries_; // Tree variables + //! Storage for experiment ID variable Int_t iExpt_; + //! Storage for fit status variable Int_t fitStatus_; + //! Storage for NLL variable Double_t NLL_; - + //! Storage for EDM variable + Double_t EDM_; + //! Storage for other input variables std::map otherVars_; + //! Best NLL and corresponding tree entries for each experiment std::map< Int_t, std::pair > bestNLL_; + //! Worst NLL and corresponding tree entries for each experiment std::map< Int_t, std::pair > worstNLL_; + //! All NLL values for each experiment std::map< Int_t, std::vector > allNLLs_; + //! Histograms of the NLL values for each experiment std::map< Int_t, TH1* > nllHistos_; + + ClassDef(LauResultsExtractor,0) }; Index: trunk/inc/LauPolarFormFactorNR.hh =================================================================== --- trunk/inc/LauPolarFormFactorNR.hh (revision 563) +++ trunk/inc/LauPolarFormFactorNR.hh (revision 564) @@ -1,134 +1,141 @@ -// Copyright University of Warwick 2004 - 2014. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// Authors: -// Thomas Latham -// John Back -// Paul Harrison +/* +Copyright 2018 University of Warwick + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Laura++ package authors: +John Back +Paul Harrison +Thomas Latham +*/ /*! \file LauPolarFormFactorNR.hh \brief File containing declaration of LauPolarFormFactorNR class. */ /*! \class LauPolarFormFactorNR - \brief Class for defining the Reescatering model. + \brief Class for defining a nonresonant form factor model - Defines the reescatering model from: - Pelaez et Yndúrain: arXiv:hep-ph/0411334v2 Mar 2005 - Nogueira, Bediaga, Cavalcante, Frederico, Lorenco: JHEP ??? + Defines the nonresonant form factor model from: + Nogueira, Bediaga, Cavalcante, Frederico, Lorenco: Phys. Rev. D92 (2015) 054010, arXiv:1506.08332 [hep-ph] + Pelaez, Yndurain: Phys. Rev. D71 (2005) 074016, arXiv:hep-ph/0411334 */ #ifndef LAU_POLAR_FORM_FACTOR_NR #define LAU_POLAR_FORM_FACTOR_NR #include "TString.h" #include "LauComplex.hh" #include "LauAbsResonance.hh" class LauKinematics; class LauParameter; class LauPolarFormFactorNR : public LauAbsResonance { public: //! Constructor /*! \param [in] resInfo the object containing information on the resonance name, mass, width, spin, charge, etc. \param [in] resType the model of the resonance \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] daughters the daughter particles */ LauPolarFormFactorNR(LauResonanceInfo* resInfo, const LauAbsResonance::LauResonanceModel resType, const Int_t resPairAmpInt, const LauDaughters* daughters); //! Destructor virtual ~LauPolarFormFactorNR(); //! Initialise the model virtual void initialise(); - //! Get the complex dynamical amplitude - /*! - \param [in] kinematics the kinematic variables of the current event - \return the complex amplitude - */ - //virtual LauComplex amplitude(const LauKinematics* kinematics); - //! Get the resonance model type /*! \return the resonance model type */ virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return model_;} //! Set value of the various parameters /*! \param [in] name the name of the parameter to be changed \param [in] value the new parameter value */ virtual void setResonanceParameter(const TString& name, const Double_t value); //! Allow the various parameters to float in the fit /*! \param [in] name the name of the parameter to be floated */ virtual void floatResonanceParameter(const TString& name); //! Access the given resonance parameter /*! \param [in] name the name of the parameter \return the corresponding parameter */ virtual LauParameter* getResonanceParameter(const TString& name); //! Retrieve the resonance parameters, e.g. so that they can be loaded into a fit /*! \return floating parameters of the resonance */ virtual const std::vector& getFloatingParameters(); protected: - //! Set the parameter lambda, the NR term for the + //! Set the parameter lambda, the NR shape parameter /*! - \param [in] lambda, the NR term for the + \param [in] lambda the NR shape parameter */ void setLambda(const Double_t lambda); - //! Get the lambda, the NR term for the + //! Get the parameter lambda, the NR shape parameter /*! - \return the lambda, the NR term for the + \return lambda, the NR shape parameter */ Double_t getLambda() const {return (lambda_!=0) ? lambda_->value() : 0.0;} //! See if the lambda parameter is fixed or floating /*! \return kTRUE if the lambda parameter is fixed, kFALSE otherwise */ Bool_t fixLambda() const {return (lambda_!=0) ? lambda_->fixed() : kTRUE;} //! Complex resonant amplitude /*! \param [in] mass appropriate invariant mass for the resonance \param [in] spinTerm Zemach spin term */ virtual LauComplex resAmp(Double_t mass, Double_t spinTerm); private: //! Copy constructor (not implemented) LauPolarFormFactorNR(const LauPolarFormFactorNR& rhs); //! Copy assignment operator (not implemented) LauPolarFormFactorNR& operator=(const LauPolarFormFactorNR& rhs); LauParameter* lambda_; //! The model to use LauAbsResonance::LauResonanceModel model_; ClassDef(LauPolarFormFactorNR,0) }; #endif Index: trunk/inc/LauRescatteringRes.hh =================================================================== --- trunk/inc/LauRescatteringRes.hh (revision 563) +++ trunk/inc/LauRescatteringRes.hh (revision 564) @@ -1,306 +1,304 @@ /* -Copyright 2008 University of Warwick +Copyright 2018 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauRescatteringRes.hh \brief File containing declaration of LauRescatteringRes class. */ /*! \class LauRescatteringRes - \brief Class for defining the Rescatering model. + \brief Class for defining the rescattering model. Defines the Rescatering models from PiPi-KK Inelastic Scatering : 2005: J.R. Pelaez, F. J. Ynduráin: PHYSICAL REVIEW D 71, 074016 (2005) 2015: J. H. Alvarenga Nogueira, I. Bediaga, A. B. R. Cavalcante, T. Frederico, and O. Lourenço: PHYSICAL REVIEW D 92, 054010 (2015) 2018: J.R. Pelaez, A.Rodas: Unpublished yet PiPi -> KK scattering up to 1.47 GeV with hyperbolic dispersion relations. */ -#ifndef LAU_RESCATERING_RES -#define LAU_RESCATERING_RES +#ifndef LAU_RESCATTERING_RES +#define LAU_RESCATTERING_RES #include "TString.h" #include "LauComplex.hh" #include "LauAbsResonance.hh" class LauKinematics; class LauParameter; class LauRescatteringRes : public LauAbsResonance { public: //! Constructor /*! \param [in] resInfo the object containing information on the resonance name, mass, width, spin, charge, etc. \param [in] resType the model of the resonance \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] daughters the daughter particles */ LauRescatteringRes(LauResonanceInfo* resInfo, const LauAbsResonance::LauResonanceModel resType, const Int_t resPairAmpInt, const LauDaughters* daughters); //! Destructor virtual ~LauRescatteringRes(); //! Initialise the model virtual void initialise(); //! Get the complex dynamical amplitude /*! \param [in] kinematics the kinematic variables of the current event \return the complex amplitude */ virtual LauComplex amplitude(const LauKinematics* kinematics); //! Get the resonance model type /*! \return the resonance model type */ virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return model_;} //! Set value of the various parameters /*! \param [in] name the name of the parameter to be changed \param [in] value the new parameter value */ virtual void setResonanceParameter(const TString& name, const Double_t value); //! Allow the various parameters to float in the fit /*! \param [in] name the name of the parameter to be floated */ virtual void floatResonanceParameter(const TString& name); //! Access the given resonance parameter /*! \param [in] name the name of the parameter \return the corresponding parameter */ virtual LauParameter* getResonanceParameter(const TString& name); //! Retrieve the resonance parameters, e.g. so that they can be loaded into a fit /*! \return floating parameters of the resonance */ virtual const std::vector& getFloatingParameters(); protected: //! Set the parameter lambdaPiPi, the term for the PiPi /*! - \param [in] lambdaPiPi, the term for the PiPi + \param [in] lambda the term for the PiPi */ void setLambdaPiPi(const Double_t lambda); //! Get the lambdaPiPi, the term for the PiPi /*! - \return the lambdaPiPi, the term for the PiPi + \return lambdaPiPi, the term for the PiPi */ Double_t getLambdaPiPi() const {return (lambdaPiPi_!=0) ? lambdaPiPi_->value() : 0.0;} //! See if the lambdaPiPi parameter is fixed or floating /*! \return kTRUE if the lambdaPiPi parameter is fixed, kFALSE otherwise */ Bool_t fixLambdaPiPi() const {return (lambdaPiPi_!=0) ? lambdaPiPi_->fixed() : kTRUE;} //! Set the parameter lambdaKK, the term for the KK /*! - \param [in] lambdaKK, the term for the KK + \param [in] lambda the term for the KK */ void setLambdaKK(const Double_t lambda); //! Get the lambdaKK, the term for the KK /*! - \return the lambdaKK, the term for the KK + \return lambdaKK, the term for the KK */ Double_t getLambdaKK() const {return (lambdaKK_!=0) ? lambdaKK_->value() : 0.0;} //! See if the lambdaKK parameter is fixed or floating /*! \return kTRUE if the lambdaKK parameter is fixed, kFALSE otherwise */ Bool_t fixLambdaKK() const {return (lambdaKK_!=0) ? lambdaKK_->fixed() : kTRUE;} //! Set the parameter Ms /*! \param [in] Ms */ void setMs(const Double_t Ms); //! Get the Ms /*! \return the Ms */ Double_t getMs() const {return (Ms_!=0) ? Ms_->value() : 0.0;} //! See if the Ms parameter is fixed or floating /*! \return kTRUE if the Ms parameter is fixed, kFALSE otherwise */ Bool_t fixMs() const {return (Ms_!=0) ? Ms_->fixed() : kTRUE;} //! Set the parameter Mf /*! \param [in] Mf */ void setMf(const Double_t Mf); //! Get the Mf /*! \return the Mf */ Double_t getMf() const {return (Mf_!=0) ? Mf_->value() : 0.0;} //! See if the Mf parameter is fixed or floating /*! \return kTRUE if the Mf parameter is fixed, kFALSE otherwise */ Bool_t fixMf() const {return (Mf_!=0) ? Mf_->fixed() : kTRUE;} //! Set the parameter Mprime /*! \param [in] Mprime */ void setMprime(const Double_t Mprime); //! Get the Mprime /*! \return the Mprime */ Double_t getMprime() const {return (Mprime_!=0) ? Mprime_->value() : 0.0;} //! See if the Mprime parameter is fixed or floating /*! \return kTRUE if the Mprime parameter is fixed, kFALSE otherwise */ Bool_t fixMprime() const {return (Mprime_!=0) ? Mprime_->fixed() : kTRUE;} //! Set the parameter Eps1 /*! \param [in] Eps1 */ void setEps1(const Double_t Eps1); //! Get the Eps1 /*! \return the Eps1 */ Double_t getEps1() const {return (Eps1_!=0) ? Eps1_->value() : 0.0;} //! See if the Eps1 parameter is fixed or floating /*! \return kTRUE if the Eps1 parameter is fixed, kFALSE otherwise */ Bool_t fixEps1() const {return (Eps1_!=0) ? Eps1_->fixed() : kTRUE;} //! Set the parameter Eps2 /*! \param [in] Eps2 */ void setEps2(const Double_t Eps2); //! Get the Eps2 /*! \return the Eps2 */ Double_t getEps2() const {return (Eps2_!=0) ? Eps2_->value() : 0.0;} //! See if the Eps2 parameter is fixed or floating /*! \return kTRUE if the Eps2 parameter is fixed, kFALSE otherwise */ Bool_t fixEps2() const {return (Eps2_!=0) ? Eps2_->fixed() : kTRUE;} //! Set the parameter C0 /*! \param [in] C0 */ void setC0(const Double_t C0); //! Get the C0 /*! \return the C0 */ Double_t getC0() const {return (C0_!=0) ? C0_->value() : 0.0;} //! See if the C0 parameter is fixed or floating /*! \return kTRUE if the C0 parameter is fixed, kFALSE otherwise */ Bool_t fixC0() const {return (C0_!=0) ? C0_->fixed() : kTRUE;} //! Complex resonant amplitude /*! \param [in] mass appropriate invariant mass for the resonance \param [in] spinTerm Zemach spin term */ virtual LauComplex resAmp(Double_t mass, Double_t spinTerm); private: //! Copy constructor (not implemented) LauRescatteringRes(const LauRescatteringRes& rhs); //! Copy assignment operator (not implemented) LauRescatteringRes& operator=(const LauRescatteringRes& rhs); //! the term for the PiPi LauParameter* lambdaPiPi_; //! the term for the KK LauParameter* lambdaKK_; //! the term for the Mf_ LauParameter* Mf_; //! the term for the Ms LauParameter* Ms_; //! the term for the Mprime LauParameter* Mprime_; //! the term for the Eps1 LauParameter* Eps1_; //! the term for the Eps2 LauParameter* Eps2_; //! the term for the C0 LauParameter* C0_; - UInt_t type_; - //! The model to use LauAbsResonance::LauResonanceModel model_; ClassDef(LauRescatteringRes,0) }; #endif Index: trunk/inc/LauKMatrixPropFactory.hh =================================================================== --- trunk/inc/LauKMatrixPropFactory.hh (revision 563) +++ trunk/inc/LauKMatrixPropFactory.hh (revision 564) @@ -1,89 +1,91 @@ /* Copyright 2008 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ /*! \file LauKMatrixPropFactory.hh \brief File containing declaration of LauKMatrixPropFactory class. */ /*! \class LauKMatrixPropFactory \brief Factory class for the K-matrix propagators. Factory class for creating and storing K-matrix propagator objects. */ #ifndef LAU_KMATRIX_PROP_FACTORY #define LAU_KMATRIX_PROP_FACTORY class LauKMatrixPropagator; #include "TString.h" #include class LauKMatrixPropFactory { public: //! Destructor virtual ~LauKMatrixPropFactory(); //! Get a static instance of this factory class. Only one is created per application. static LauKMatrixPropFactory* getInstance(); //! Retrieve the propagator if it already exists, otherwise create one. /*! \param [in] name name of the propagator \param [in] paramFileName the parameter file \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] nChannels the number of channels \param [in] nPoles the number of poles \param [in] rowIndex this specifies which row of the propagator should be used when summing over the amplitude channels \return the propagator */ LauKMatrixPropagator* getPropagator(const TString& name, const TString& paramFileName, Int_t resPairAmpInt, Int_t nChannels, Int_t nPoles, Int_t rowIndex); protected: //! A typedef to define a map used to keep track of which propagators have been created. typedef std::map KMatrixPropMap; private: //! Private constructor (to ensure the singleton nature of this class) LauKMatrixPropFactory(); //! Copy constructor (not implemented) LauKMatrixPropFactory(const LauKMatrixPropFactory& rhs); //! Copy assignment operator (not implemented) LauKMatrixPropFactory& operator=(const LauKMatrixPropFactory& rhs); //! The singleton instance static LauKMatrixPropFactory* theFactory_; //! The map used to store the propagator information KMatrixPropMap map_; + + ClassDef(LauKMatrixPropFactory,0) }; #endif Index: trunk/inc/LauMergeDataFiles.hh =================================================================== --- trunk/inc/LauMergeDataFiles.hh (revision 563) +++ trunk/inc/LauMergeDataFiles.hh (revision 564) @@ -1,81 +1,127 @@ /* Copyright 2008 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ #include #include #include "TFile.h" #include "TString.h" #include "TTree.h" -// A utility class to allow the merging of data files on a expt-by-expt basis, -// i.e. such that events for expt 0 from tree 1 will be followed by events for expt 0 from tree 2, -// then expt 1 from tree1, expt 1 from tree 2 etc. +/*! \file LauMergeDataFiles.hh + \brief File containing declaration of LauMergeDataFiles class. +*/ + +/*! \class LauResultsExtractor + \brief Utility class to allow the merging of data files on a expt-by-expt basis + + The files are merged such that events for expt 0 from tree 1 will be followed + by events for expt 0 from tree 2, then expt 1 from tree1, expt 1 from tree 2, etc. +*/ -class MergeDataFiles +class LauMergeDataFiles { public: - MergeDataFiles(const TString& fileName1, const TString& fileName2, const TString& treeName); - ~MergeDataFiles(); - + //! Constructor + /*! + \param [in] fileName1 name of first file to be merged + \param [in] fileName2 name of second file to be merged + \param [in] treeName name of the tree to read from the input files + */ + LauMergeDataFiles(const TString& fileName1, const TString& fileName2, const TString& treeName); + + //! Destructor + virtual ~LauMergeDataFiles(); + + //! Do the merge + /*! + \param [in] fileName name of file to which to write the merged tree + */ void process(const TString& fileName); protected: + //! Type to relate leaf names with their double-precision value typedef std::map LeafDoubleMap; + //! Type to relate leaf names with their integer value typedef std::map LeafIntegerMap; + //! Type to hold for each experiment the first and last entry numbers in a tree typedef std::map< Int_t,std::pair > ExptsMap; + //! Open the specified input files and check that the trees can be read void openInputFiles(); + //! Read the structure of the input trees, create appropriate storage and set the branch addresses void setupInputTrees(); + //! Create the structure of the output tree void setupOutputTree(); + //! Determine the experiments stored a given tree void findExperiments(TTree* tree, ExptsMap& exptsMap); + //! Check that the experiments in each tree match Bool_t checkExperimentMaps() const; + //! Read the entries for a given experiment from the given tree and store in the output tree void readExperiment(TTree* tree, const ExptsMap::const_iterator& exptsMap, Int_t offset); + //! Write the output file void writeFile(); private: + //! Name of file 1 TString fileName1_; + //! Name of file 2 TString fileName2_; + //! Name of the tree TString treeName_; + //! Input file 1 TFile * inputFile1_; + //! Input file 2 TFile * inputFile2_; + //! Input tree 1 TTree * inputTree1_; + //! Input tree 2 TTree * inputTree2_; + //! Output file TFile * outputFile_; + //! Output tree TTree * outputTree_; // Tree variables + //! Storage for the experiment index variable Int_t iExpt_; + //! Storage for the event-within-experiment index variable Int_t iEvtWithinExpt_; + //! Storage for double-precision leaves LeafDoubleMap doubleVars_; + //! Storage for integer leaves LeafIntegerMap integerVars_; + //! Experiment -> first and last tree entry for tree 1 ExptsMap tree1Expts_; + //! Experiment -> first and last tree entry for tree 2 ExptsMap tree2Expts_; + + ClassDef(LauMergeDataFiles,0) }; Index: trunk/inc/LauCalcChiSq.hh =================================================================== --- trunk/inc/LauCalcChiSq.hh (revision 563) +++ trunk/inc/LauCalcChiSq.hh (revision 564) @@ -1,73 +1,163 @@ /* Copyright 2008 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ #include "TH2Poly.h" #include "TString.h" #include -/* - A utility class to allow the calculation of the chisq of the fit to the Dalitz plot. - A text config file is provided that gives the datasets for the data and - toy MC generated from the fit results. These can be in the traditional DP - or the square DP. A sample config file is provided. The fields are: - - - +/*! \file LauCalcChiSq.hh + \brief File containing declaration of LauCalcChiSq class. */ -class CalcChiSq { +/*! \class LauCalcChiSq + \brief Utility class to allow the calculation of the chisq of the fit to the Dalitz plot -public: + A utility class to allow the calculation of the chisq of the fit to the Dalitz plot. - CalcChiSq(TString inputFileName = "chiSqInput.txt"); - virtual ~CalcChiSq(); + A text config file is provided that gives the datasets for the data and toy + MC generated from the fit results. These can be in the traditional DP or + the square DP. - void run(); - inline void setVerbose(Bool_t flag) {verbose_ = flag;} + A sample config file is provided. The fields are: -private: + + + +*/ - void initialiseHistos(); - void pickBinning(Double_t* xs, Double_t* ys, Int_t nEntries, std::vector& divisions); - void getHisto(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t* xs, Double_t* ys, Int_t nEntries, std::vector& divisions, UInt_t iter=0); +class LauCalcChiSq { - void calculateChiSq(); - void makePlots(); + public: - TString inputFileName_; - TString fileName1_, fileName2_, treeName1_, treeName2_, xName1_, xName2_, yName1_, yName2_; - Float_t minContent_; + //! Constructor + /*! + \param [in] inputFileName name of the config file + */ + LauCalcChiSq(const TString& inputFileName = "chiSqInput.txt"); + + //! Destructor + virtual ~LauCalcChiSq(); + + //! Toggle verbose printout + /*! + \param [in] flag true to enable verbose printout, false to disable + */ + inline void setVerbose(const Bool_t flag) {verbose_ = flag;} + + //! Run the calculations + void run(); + + private: + //! Read the config file, read the data and create histograms + void initialiseHistos(); + + //! Choose the binning scheme + /*! + \param [in] xs x coordinates of low statistics sample + \param [in] ys y coordinates of low statistics sample + \param [in] nEntries number of entries in low statistics sample + \param [out] divisions resulting binning scheme + */ + void pickBinning(const Double_t* xs, const Double_t* ys, const Int_t nEntries, std::vector& divisions); + + //! Create the template histogram based on the binning scheme + /*! + This function is called recursively to perform subdivisions + + \param [in] xMin the minimum x coordinate of the region to be (sub)divided + \param [in] xMax the maximum x coordinate of the region to be (sub)divided + \param [in] yMin the minimum y coordinate of the region to be (sub)divided + \param [in] yMax the maximum y coordinate of the region to be (sub)divided + \param [in] xs x coordinates of low statistics sample + \param [in] ys y coordinates of low statistics sample + \param [in] nEntries number of entries in low statistics sample + \param [in] divisions the binning scheme + \param [in] iter indicates depth of the subdivisions + */ + void getHisto(const Double_t xMin, const Double_t xMax, const Double_t yMin, const Double_t yMax, const Double_t* xs, const Double_t* ys, const Int_t nEntries, const std::vector& divisions, const UInt_t iter=0); + + //! Calculate the chisq from the data histograms + void calculateChiSq(); + + //! Create plots + void makePlots(); + + //! Name of the config file + TString inputFileName_; + + //! Name of the low stats data file + TString fileName1_; + //! Name of the high stats data file + TString fileName2_; + //! Name of the low stats data tree + TString treeName1_; + //! Name of the high stats data tree + TString treeName2_; + + //! Name of the x-coordinate branch in tree 1 + TString xName1_; + //! Name of the x-coordinate branch in tree 2 + TString xName2_; + //! Name of the y-coordinate branch in tree 1 + TString yName1_; + //! Name of the y-coordinate branch in tree 2 + TString yName2_; + + //! The minimum bin content + Float_t minContent_; + + //! Template histogram constructed from the binning scheme + TH2Poly* theHisto_; + //! Histogram (constructed from template) filled from tree 1 + TH2Poly* histo1_; + //! Histogram (constructed from template) filled from tree 2 + TH2Poly* histo2_; + //! Histogram (constructed from template) filled with pulls of tree1 vs tree2 + TH2Poly* pullHisto_; + //! Histogram (constructed from template) filled with chisq of tree1 vs tree2 + TH2Poly* chiSqHisto_; + //! Histogram (constructed from template) filled with signed chisq of tree1 vs tree2 + TH2Poly* chiSqSignedHisto_; + + //! Minimum x coordinate of histograms + Float_t xMin_; + //! Maximum x coordinate of histograms + Float_t xMax_; + //! Minimum y coordinate of histograms + Float_t yMin_; + //! Maximum y coordinate of histograms + Float_t yMax_; + + //! Number of free parameters in fit (used for calculating the ndof) + Int_t nParams_; - TH2Poly *theHisto_, *histo1_, *histo2_; - TH2Poly *pullHisto_; - TH2Poly *chiSqHisto_; - TH2Poly *chiSqSignedHisto_; + //! Scalefactor between low and high stats data samples + Float_t scaleFactor_; - Float_t xMin_, xMax_, yMin_, yMax_; - Int_t nParams_; - Float_t scaleFactor_; - Bool_t verbose_; + //! Verbose flag + Bool_t verbose_; + ClassDef(LauCalcChiSq,0) }; Index: trunk/inc/LauPoleRes.hh =================================================================== --- trunk/inc/LauPoleRes.hh (revision 563) +++ trunk/inc/LauPoleRes.hh (revision 564) @@ -1,79 +1,94 @@ -// Copyright University of Warwick 2004 - 2014. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// Authors: -// Thomas Latham -// John Back -// Paul Harrison +/* +Copyright 2018 University of Warwick + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Laura++ package authors: +John Back +Paul Harrison +Thomas Latham +*/ /*! \file LauPoleRes.hh \brief File containing declaration of LauPoleRes class. */ /*! \class LauPoleRes - \brief Class for defining the simple Breit-Wigner resonance model + \brief Class for defining a pole-type resonance model - Class for defining the simple Breit-Wigner resonance model. + Class for defining a pole-type resonance model. This is a pole type resonance 1/((m_s)^2-m^2); m_s=m0-iw0, good to represent the sigma (f0(500)). + J. A. Oller, Final state interactions in hadronic D decays, Phys. Rev. D71 (2005) 054030, arXiv:hep-ph/0411105. */ #ifndef LAU_POLE_RES #define LAU_POLE_RES #include "TString.h" #include "LauComplex.hh" #include "LauAbsResonance.hh" class LauPoleRes : public LauAbsResonance { public: //! Constructor /*! \param [in] resInfo the object containing information on the resonance name, mass, width, spin, charge, etc. \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] daughters the daughter particles */ LauPoleRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters); //! Destructor virtual ~LauPoleRes(); //! Initialise the model virtual void initialise(); //! Get the resonance model type /*! \return the resonance model type */ - virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return LauAbsResonance::POLE;} + virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return LauAbsResonance::Pole;} //! Retrieve the resonance parameters, e.g. so that they can be loaded into a fit /*! \return floating parameters of the resonance */ virtual const std::vector& getFloatingParameters(); protected: //! Complex resonant amplitude /*! \param [in] mass appropriate invariant mass for the resonance \param [in] spinTerm Zemach spin term */ virtual LauComplex resAmp(Double_t mass, Double_t spinTerm); private: //! Copy constructor (not implemented) LauPoleRes(const LauPoleRes& rhs); //! Copy assignment operator (not implemented) LauPoleRes& operator=(const LauPoleRes& rhs); ClassDef(LauPoleRes,0) // Pole resonance model }; #endif Index: trunk/examples/CalcChiSq.cc =================================================================== --- trunk/examples/CalcChiSq.cc (revision 563) +++ trunk/examples/CalcChiSq.cc (revision 564) @@ -1,44 +1,44 @@ /* Copyright 2013 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ #include "LauCalcChiSq.hh" #include "TString.h" int main(const int argc, const char** argv) { TString inputFile("chiSqInput.txt"); if (argc > 1) {inputFile = TString(argv[1]);} - CalcChiSq a(inputFile); + LauCalcChiSq a(inputFile); //a.setVerbose(kTRUE); a.run(); return 0; } Index: trunk/examples/ResultsExtractor.cc =================================================================== --- trunk/examples/ResultsExtractor.cc (revision 563) +++ trunk/examples/ResultsExtractor.cc (revision 564) @@ -1,55 +1,55 @@ /* Copyright 2013 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ #include #include "TString.h" #include "LauResultsExtractor.hh" int main(const int argc, const char** argv) { Int_t nExpt(1); TString inputFileName("input-list.txt"); TString outputFileName("output.root"); TString treeName("fitResults"); if (argc > 1) { nExpt = atoi(argv[1]); } if (argc > 2) { inputFileName = argv[2]; } if (argc > 3) { outputFileName = argv[3]; } if (argc > 4) { treeName = argv[4]; } - ResultsExtractor myExtractor(inputFileName,outputFileName,treeName); + LauResultsExtractor myExtractor(inputFileName,outputFileName,treeName); myExtractor.process(nExpt); return EXIT_SUCCESS; } Index: trunk/examples/MergeDataFiles.cc =================================================================== --- trunk/examples/MergeDataFiles.cc (revision 563) +++ trunk/examples/MergeDataFiles.cc (revision 564) @@ -1,55 +1,55 @@ /* Copyright 2013 University of Warwick Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Laura++ package authors: John Back Paul Harrison Thomas Latham */ #include #include "TString.h" #include "LauMergeDataFiles.hh" int main(const int argc, const char** argv) { if (argc < 3) { std::cerr<<"Usage: "< [treeName] [outputFileName]"< 3) { treeName = argv[3]; } TString outputFileName("test.root"); if (argc > 4) { outputFileName = argv[4]; } - MergeDataFiles myMerger(inputFileName1,inputFileName2,treeName); + LauMergeDataFiles myMerger(inputFileName1,inputFileName2,treeName); myMerger.process(outputFileName); return EXIT_SUCCESS; } Index: trunk/Doxyfile =================================================================== --- trunk/Doxyfile (revision 563) +++ trunk/Doxyfile (revision 564) @@ -1,1792 +1,2441 @@ -# Doxyfile 1.8.1.2 +# Doxyfile 1.8.13 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # -# All text after a hash (#) is considered a comment and will be ignored. +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. # The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" "). +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or sequence of words) that should -# identify the project. Note that if you do not use Doxywizard you need -# to put quotes around the project name if it contains spaces. +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. PROJECT_NAME = Laura++ -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. -PROJECT_NUMBER = v3r4 +PROJECT_NUMBER = v3r5 # Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer -# a quick idea about the purpose of the project. Keep the description short. +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = "A maximum likelihood fitting package for performing Dalitz-plot analysis." -# With the PROJECT_LOGO tag one can specify an logo or icon that is -# included in the documentation. The maximum height of the logo should not -# exceed 55 pixels and the maximum width should not exceed 200 pixels. -# Doxygen will copy the logo to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. OUTPUT_DIRECTORY = doxygen -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. CREATE_SUBDIRS = NO +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. +# The default value is: YES. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# doxygen will generate a detailed section even if there is only a brief # description. +# The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. +# The default value is: NO. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. JAVADOC_AUTOBRIEF = NO -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding -# "class=itcl::class" will allow you to use the command class in the -# itcl::class meaning. +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. TCL_SUBST = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. EXTENSION_MAPPING = -# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all -# comments according to the Markdown format, which allows for more readable +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you -# can mix doxygen, HTML, and XML commands with Markdown formatting. -# Disable only in case of backward compatibilities issues. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. MARKDOWN_SUPPORT = YES +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. +# The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. +# The default value is: NO. CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. +# The default value is: NO. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. SUBGROUPING = YES -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and -# unions are shown inside the group in which they are included (e.g. using -# @ingroup) instead of on a separate page (for HTML and Man pages) or -# section (for LaTeX and RTF). +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. INLINE_GROUPED_CLASSES = NO -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and -# unions with only public data fields will be shown inline in the documentation -# of the scope in which they are defined (i.e. file, namespace, or group -# documentation), provided this scope is documented. If set to NO (the default), -# structs, classes, and unions are shown on a separate page (for HTML and Man -# pages) or section (for LaTeX and RTF). +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. INLINE_SIMPLE_STRUCTS = NO -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. TYPEDEF_HIDES_STRUCT = NO -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penalty. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will roughly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols. - -SYMBOL_CACHE_SIZE = 0 - -# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be -# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given -# their name and scope. Since this can be an expensive process and often the -# same symbol appear multiple times in the code, doxygen keeps a cache of -# pre-resolved symbols. If the cache is too small doxygen will become slower. -# If the cache is too large, memory is wasted. The cache size is given by this -# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols. +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespaces are hidden. +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. +# The default value is: system dependent. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. SHOW_INCLUDE_FILES = YES -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. FORCE_LOCAL_INCLUDES = NO -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. SORT_BRIEF_DOCS = NO -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. SORT_BY_SCOPE_NAME = NO -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to -# do proper type resolution of all parameters of a function it will reject a -# match between the prototype and the implementation of a member function even -# if there is only one candidate or it is obvious which candidate to choose -# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen -# will still accept a match between prototype and implementation in such cases. +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. +# The default value is: YES. SHOW_USED_FILES = YES -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. LAYOUT_FILE = -# The CITE_BIB_FILES tag can be used to specify one or more bib files -# containing the references data. This must be a list of .bib files. The -# .bib extension is automatically appended if omitted. Using this command -# requires the bibtex tool to be installed. See also -# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style -# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this -# feature you need bibtex and perl available in the search path. +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- -# configuration options related to warning and progress messages +# Configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. WARN_IF_DOC_ERROR = YES -# The WARN_NO_PARAMDOC option can be enabled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- -# configuration options related to the input files +# Configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = inc src doc/mainpage.dox +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = inc \ + src \ + doc/mainpage.dox # This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. FILE_PATTERNS = -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. +# # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. +# The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) -# and it is also possible to disable source filtering for a specific pattern -# using *.ext= (so without naming a filter). This option only has effect when -# FILTER_SOURCE_FILES is enabled. +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + #--------------------------------------------------------------------------- -# configuration options related to source browsing +# Configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. SOURCE_BROWSER = YES -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C, C++ and Fortran comments will always remain visible. +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. REFERENCED_BY_RELATION = NO -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. REFERENCES_RELATION = NO -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. VERBATIM_HEADERS = YES +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + #--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index +# Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. ALPHABETICAL_INDEX = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. Note that when using a custom header you are responsible -# for the proper inclusion of any scripts and style sheets that doxygen -# needs, which is dependent on the configuration options used. -# It is advised to generate a default header using "doxygen -w html -# header.html footer.html stylesheet.css YourConfigFile" and then modify -# that header. Note that the header is subject to change so you typically -# have to redo this when upgrading to a newer version of doxygen or when -# changing the value of configuration settings such as GENERATE_TREEVIEW! +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# style sheet in the HTML output directory as well, or it will be erased! +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the -# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that -# the files will be copied as-is; there are no commands or markers available. +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the style sheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of -# entries shown in the various tree structured indices initially; the user -# can expand and collapse entries dynamically later on. Doxygen will expand -# the tree to such a level that at most the specified number of entries are -# visible (unless a fully collapsed tree already exceeds this amount). -# So setting the number of entries 1 will produce a full collapsed tree by -# default. 0 is a special value representing an infinite number of entries -# and will result in a full expanded tree by default. +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be # written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project -# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) -# at top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. Since the tabs have the same information as the -# navigation tree you can set this option to NO if you already set -# GENERATE_TREEVIEW to YES. +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. -# Since the tree basically has the same information as the tab index you -# could consider to set DISABLE_INDEX to NO when enabling this option. - -GENERATE_TREEVIEW = NONE - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values -# (range [0,1..20]) that doxygen will group on one line in the generated HTML -# documentation. Note that a value of 0 will completely suppress the enum -# values from appearing in the overview section. +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered bitmaps. Use this if you do not -# have LaTeX installed or if you want to formulas look prettier in the HTML -# output. When enabled you may also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO -# When MathJax is enabled you need to specify the location relative to the -# HTML output directory using the MATHJAX_RELPATH option. The destination -# directory should contain the MathJax.js script. For instance, if the mathjax -# directory is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to -# the MathJax Content Delivery Network so you can quickly see the result without -# installing MathJax. -# However, it is strongly recommended to install a local -# copy of MathJax from http://www.mathjax.org before deployment. +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest -# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension -# names that should be enabled during MathJax rendering. +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /