Changeset View
Changeset View
Standalone View
Standalone View
src/LauKMatrixProdPole.cc
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | LauComplex LauKMatrixProdPole::resAmp(Double_t mass, Double_t spinTerm) | ||||
std::cerr << " Returning zero amplitude for mass = " << mass << " and spinTerm = " << spinTerm << "." << std::endl; | std::cerr << " Returning zero amplitude for mass = " << mass << " and spinTerm = " << spinTerm << "." << std::endl; | ||||
return LauComplex(0.0, 0.0); | return LauComplex(0.0, 0.0); | ||||
} | } | ||||
LauComplex LauKMatrixProdPole::amplitude(const LauKinematics* kinematics) | LauComplex LauKMatrixProdPole::amplitude(const LauKinematics* kinematics) | ||||
{ | { | ||||
// Calculate the amplitude for the K-matrix production pole. | // Calculate the amplitude for the K-matrix production pole. | ||||
// First, make sure the K-matrix propagator is up-to-date for | |||||
// the given centre-of-mass squared value ("s") from the kinematics. | |||||
LauComplex amp(0.0, 0.0); | LauComplex amp(0.0, 0.0); | ||||
if (thePropagator_ == 0) { | if (thePropagator_ == 0) { | ||||
std::cerr << "ERROR in LauKMatrixProdPole::amplitude : The propagator is null" << std::endl; | std::cerr << "ERROR in LauKMatrixProdPole::amplitude : The propagator is null" << std::endl; | ||||
return amp; | return amp; | ||||
} | } | ||||
thePropagator_->updatePropagator(kinematics); | thePropagator_->updatePropagator(kinematics); | ||||
Show All 21 Lines | LauComplex LauKMatrixProdPole::amplitude(const LauKinematics* kinematics) | ||||
Double_t adlerZero(1.0); | Double_t adlerZero(1.0); | ||||
if (useProdAdler_) {adlerZero = thePropagator_->getAdlerZero();} | if (useProdAdler_) {adlerZero = thePropagator_->getAdlerZero();} | ||||
amp.rescale(poleDenom*adlerZero); | amp.rescale(poleDenom*adlerZero); | ||||
return amp; | return amp; | ||||
} | } | ||||
const std::vector<LauParameter*>& LauKMatrixProdPole::getFloatingParameters() | |||||
{ | |||||
this->clearFloatingParameters(); | |||||
Int_t nChannels = thePropagator_->getNChannels(); | |||||
for (int jChannel = 0 ; jChannel < nChannels ; jChannel++) | |||||
{ | |||||
LauParameter& par_gj_ = thePropagator_->getCouplingParameter(poleIndex_, jChannel); | |||||
if ( !par_gj_.fixed() ) | |||||
{ | |||||
tlatham: I always prefer to have the braces, even for one-line if's or loops. | |||||
this->addFloatingParameter( &par_gj_ ); | |||||
} | |||||
} | |||||
LauParameter& par_polemasssq_ = thePropagator_->getPoleMassSqParameter(poleIndex_); | |||||
Done Inline ActionsMight we want to provide the option to also float the pole mass? tlatham: Might we want to provide the option to also float the pole mass? | |||||
Done Inline ActionsYes johndan: Yes | |||||
if ( !par_polemasssq_.fixed() ) | |||||
{ | |||||
this->addFloatingParameter( &par_polemasssq_ ); | |||||
} | |||||
return this->getParameters(); | |||||
} | |||||
No newline at end of file |
I always prefer to have the braces, even for one-line if's or loops.