Changeset View
Changeset View
Standalone View
Standalone View
src/LauKMatrixPropagator.cc
Show All 39 Lines | |||||
using std::cout; | using std::cout; | ||||
using std::endl; | using std::endl; | ||||
using std::cerr; | using std::cerr; | ||||
ClassImp(LauKMatrixPropagator) | ClassImp(LauKMatrixPropagator) | ||||
LauKMatrixPropagator::LauKMatrixPropagator(const TString& name, const TString& paramFile, | LauKMatrixPropagator::LauKMatrixPropagator(const TString& name, const TString& paramFile, | ||||
Int_t resPairAmpInt, Int_t nChannels, | Int_t resPairAmpInt, Int_t nChannels, | ||||
Int_t nPoles, Int_t rowIndex) : | Int_t nPoles, Int_t rowIndex) : | ||||
name_(name), | name_(name), | ||||
paramFileName_(paramFile), | paramFileName_(paramFile), | ||||
resPairAmpInt_(resPairAmpInt), | resPairAmpInt_(resPairAmpInt), | ||||
index_(rowIndex - 1), | index_(rowIndex - 1), | ||||
previousS_(0.0), | previousS_(0.0), | ||||
scattSVP_(0.0), | scattSVP_(0.0), | ||||
prodSVP_(0.0), | prodSVP_(0.0), | ||||
▲ Show 20 Lines • Show All 390 Lines • ▼ Show 20 Lines | void LauKMatrixPropagator::storePole(const std::vector<std::string>& theLine) | ||||
if (nWords == nExpect) { | if (nWords == nExpect) { | ||||
Int_t poleIndex = std::atoi(theLine[1].c_str()) - 1; | Int_t poleIndex = std::atoi(theLine[1].c_str()) - 1; | ||||
if (poleIndex >= 0 && poleIndex < nPoles_) { | if (poleIndex >= 0 && poleIndex < nPoles_) { | ||||
Double_t poleMass = std::atof(theLine[2].c_str()); | Double_t poleMass = std::atof(theLine[2].c_str()); | ||||
Double_t poleMassSq = poleMass*poleMass; | Double_t poleMassSq = poleMass*poleMass; | ||||
LauParameter mPoleParam(poleMassSq); | LauParameter mPoleParam(poleMassSq); | ||||
tlatham: This parameter has not been given a name, should probably follow line 463. | |||||
mSqPoles_[poleIndex] = mPoleParam; | mSqPoles_[poleIndex] = mPoleParam; | ||||
cout<<"Added bare pole mass "<<poleMass<<" GeV for pole number "<<poleIndex+1<<endl; | cout<<"Added bare pole mass "<<poleMass<<" GeV for pole number "<<poleIndex+1<<endl; | ||||
for (Int_t iChannel = 0; iChannel < nChannels_; iChannel++) { | for (Int_t iChannel = 0; iChannel < nChannels_; iChannel++) { | ||||
Double_t couplingConst = std::atof(theLine[iChannel+3].c_str()); | Double_t couplingConst = std::atof(theLine[iChannel+3].c_str()); | ||||
LauParameter couplingParam(couplingConst); | LauParameter couplingParam(Form("KM_gCoupling_%i_%i",poleIndex,iChannel),couplingConst); | ||||
tlathamUnsubmitted Done Inline ActionsIt would be good to use the name_ of this propagator in forming the names of all the parameters, in case we have more than one K-matrix instance in a fit (e.g. for pipi and Kpi S-wave in B -> Kpipi). tlatham: It would be good to use the `name_` of this propagator in forming the names of all the… | |||||
gCouplings_[poleIndex][iChannel] = couplingParam; | gCouplings_[poleIndex][iChannel] = couplingParam; | ||||
cout<<"Added coupling parameter g^{"<<poleIndex+1<<"}_" | cout<<"Added coupling parameter g^{"<<poleIndex+1<<"}_" | ||||
<<iChannel+1<<" = "<<couplingConst<<endl; | <<iChannel+1<<" = "<<couplingConst<<endl; | ||||
} | } | ||||
} | } | ||||
Show All 22 Lines | void LauKMatrixPropagator::storeScattering(const std::vector<std::string>& theLine) | ||||
if (nWords == nExpect) { | if (nWords == nExpect) { | ||||
Int_t scattIndex = std::atoi(theLine[1].c_str()) - 1; | Int_t scattIndex = std::atoi(theLine[1].c_str()) - 1; | ||||
if (scattIndex >= 0 && scattIndex < nChannels_) { | if (scattIndex >= 0 && scattIndex < nChannels_) { | ||||
for (Int_t iChannel = 0; iChannel < nChannels_; iChannel++) { | for (Int_t iChannel = 0; iChannel < nChannels_; iChannel++) { | ||||
Double_t scattConst = std::atof(theLine[iChannel+2].c_str()); | Double_t scattConst = std::atof(theLine[iChannel+2].c_str()); | ||||
LauParameter scattParam(scattConst); | LauParameter scattParam(scattConst); | ||||
tlathamUnsubmitted Done Inline ActionsThese parameters have not been given names - should probably be done as per line 463 tlatham: These parameters have not been given names - should probably be done as per line 463 | |||||
fScattering_[scattIndex][iChannel] = scattParam; | fScattering_[scattIndex][iChannel] = scattParam; | ||||
cout<<"Added scattering parameter f("<<scattIndex+1<<"," | cout<<"Added scattering parameter f("<<scattIndex+1<<"," | ||||
<<iChannel+1<<") = "<<scattConst<<endl; | <<iChannel+1<<") = "<<scattConst<<endl; | ||||
} | } | ||||
} | } | ||||
Show All 23 Lines | if (!keyword.CompareTo("msq0")) { | ||||
Double_t s0ScattValue = std::atof(parString.Data()); | Double_t s0ScattValue = std::atof(parString.Data()); | ||||
cout<<"Adler zero constant s0Scatt = "<<s0ScattValue<<endl; | cout<<"Adler zero constant s0Scatt = "<<s0ScattValue<<endl; | ||||
s0Scatt_ = LauParameter("s0Scatt", s0ScattValue); | s0Scatt_ = LauParameter("s0Scatt", s0ScattValue); | ||||
} else if (!keyword.CompareTo("s0prod")) { | } else if (!keyword.CompareTo("s0prod")) { | ||||
Double_t s0ProdValue = std::atof(parString.Data()); | Double_t s0ProdValue = std::atof(parString.Data()); | ||||
cout<<"Adler zero constant s0Prod = "<<s0ProdValue<<endl; | cout<<"Adler zero constant s0Prod = "<<s0ProdValue<<endl; | ||||
s0Prod_ = LauParameter("s0Scatt", s0ProdValue); | s0Prod_ = LauParameter("s0Prod", s0ProdValue); | ||||
} else if (!keyword.CompareTo("sa0")) { | } else if (!keyword.CompareTo("sa0")) { | ||||
Double_t sA0Value = std::atof(parString.Data()); | Double_t sA0Value = std::atof(parString.Data()); | ||||
cout<<"Adler zero constant sA0 = "<<sA0Value<<endl; | cout<<"Adler zero constant sA0 = "<<sA0Value<<endl; | ||||
sA0_ = LauParameter("sA0", sA0Value); | sA0_ = LauParameter("sA0", sA0Value); | ||||
} else if (!keyword.CompareTo("sa")) { | } else if (!keyword.CompareTo("sa")) { | ||||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | Double_t LauKMatrixPropagator::getCouplingConstant(Int_t poleIndex, Int_t channelIndex) const | ||||
if (poleIndex < 0 || poleIndex >= nPoles_) {return 0.0;} | if (poleIndex < 0 || poleIndex >= nPoles_) {return 0.0;} | ||||
if (channelIndex < 0 || channelIndex >= nChannels_) {return 0.0;} | if (channelIndex < 0 || channelIndex >= nChannels_) {return 0.0;} | ||||
Double_t couplingConst = gCouplings_[poleIndex][channelIndex].unblindValue(); | Double_t couplingConst = gCouplings_[poleIndex][channelIndex].unblindValue(); | ||||
return couplingConst; | return couplingConst; | ||||
} | } | ||||
LauParameter& LauKMatrixPropagator::getCouplingParameter(Int_t poleIndex, Int_t channelIndex) | |||||
{ | |||||
if ( (parametersSet_ == kFALSE) || (poleIndex < 0 || poleIndex >= nPoles_) || (channelIndex < 0 || channelIndex >= nChannels_) ) { | |||||
std::cerr << "ERROR from LauKMatrixPropagator::getCouplingParameter(). Invalid coupling." << std::endl; | |||||
gSystem->Exit(EXIT_FAILURE); | |||||
} | |||||
//std::cout << "Minvalue + range for " << poleIndex << ", " << channelIndex << ": " << gCouplings_[poleIndex][channelIndex].minValue() << " => + " << gCouplings_[poleIndex][channelIndex].range() << | |||||
// " and init value: " << gCouplings_[poleIndex][channelIndex].initValue() << std::endl; | |||||
return gCouplings_[poleIndex][channelIndex]; | |||||
} | |||||
Double_t LauKMatrixPropagator::getScatteringConstant(Int_t channel1Index, Int_t channel2Index) const | Double_t LauKMatrixPropagator::getScatteringConstant(Int_t channel1Index, Int_t channel2Index) const | ||||
{ | { | ||||
if (parametersSet_ == kFALSE) {return 0.0;} | if (parametersSet_ == kFALSE) {return 0.0;} | ||||
if (channel1Index < 0 || channel1Index >= nChannels_) {return 0.0;} | if (channel1Index < 0 || channel1Index >= nChannels_) {return 0.0;} | ||||
if (channel2Index < 0 || channel2Index >= nChannels_) {return 0.0;} | if (channel2Index < 0 || channel2Index >= nChannels_) {return 0.0;} | ||||
Double_t scatteringConst = fScattering_[channel1Index][channel2Index].unblindValue(); | Double_t scatteringConst = fScattering_[channel1Index][channel2Index].unblindValue(); | ||||
return scatteringConst; | return scatteringConst; | ||||
} | } | ||||
LauParameter& LauKMatrixPropagator::getScatteringParameter(Int_t channel1Index, Int_t channel2Index) | |||||
{ | |||||
if ( (parametersSet_ == kFALSE) || (channel1Index < 0 || channel1Index >= nChannels_) || (channel2Index < 0 || channel2Index >= nChannels_) ) { | |||||
std::cerr << "ERROR from LauKMatrixPropagator::getScatteringParameter(). Invalid chanel index." << std::endl; | |||||
gSystem->Exit(EXIT_FAILURE); | |||||
} | |||||
return fScattering_[channel1Index][channel2Index]; | |||||
} | |||||
Double_t LauKMatrixPropagator::calcSVPTerm(Double_t s, Double_t s0) const | Double_t LauKMatrixPropagator::calcSVPTerm(Double_t s, Double_t s0) const | ||||
{ | { | ||||
if (parametersSet_ == kFALSE) {return 0.0;} | if (parametersSet_ == kFALSE) {return 0.0;} | ||||
// Calculate the "slowly-varying part" (SVP) | // Calculate the "slowly-varying part" (SVP) | ||||
Double_t result(0.0); | Double_t result(0.0); | ||||
Double_t deltaS = s - s0; | Double_t deltaS = s - s0; | ||||
▲ Show 20 Lines • Show All 447 Lines • Show Last 20 Lines |
This parameter has not been given a name, should probably follow line 463.