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); | // Get barrier factors ('resonance' factor is already accounted for internally via propagator 'Gamma' matrix) | ||||
Double_t fFactorB(1.0); | |||||
const Int_t resSpin = this->getSpin(); | |||||
const Double_t pstar = this->getPstar(); | |||||
if ( resSpin > 0 ) { | |||||
const LauBlattWeisskopfFactor* parBWFactor = this->getParBWFactor(); | |||||
if ( parBWFactor != nullptr ) { | |||||
switch ( parBWFactor->getRestFrame() ) { | |||||
case LauBlattWeisskopfFactor::ResonanceFrame: | |||||
fFactorB = parBWFactor->calcFormFactor(this->getP()); | |||||
break; | |||||
case LauBlattWeisskopfFactor::ParentFrame: | |||||
fFactorB = parBWFactor->calcFormFactor(pstar); | |||||
break; | |||||
case LauBlattWeisskopfFactor::Covariant: | |||||
{ | |||||
Double_t covFactor = this->getCovFactor(); | |||||
if ( resSpin > 2 ) { | |||||
covFactor = TMath::Power( covFactor, 1.0/resSpin ); | |||||
} else if ( resSpin == 2 ) { | |||||
covFactor = TMath::Sqrt( covFactor ); | |||||
} | |||||
fFactorB = parBWFactor->calcFormFactor(pstar*covFactor); | |||||
break; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
// Make sure the K-matrix propagator is up-to-date for | |||||
// the given centre-of-mass squared value ("s") | |||||
thePropagator_->updatePropagator(mass*mass); | |||||
// Sum the pole denominator terms over all channels j, multiplying by | // Sum the pole denominator terms over all channels j, multiplying by | ||||
// the propagator terms. Note that we do not sum over poles, since we | // the propagator terms. Note that we do not sum over poles, since we | ||||
// only want one of the production pole terms. | // only want one of the production pole terms. | ||||
Int_t nChannels = thePropagator_->getNChannels(); | Int_t nChannels = thePropagator_->getNChannels(); | ||||
Int_t jChannel; | Int_t jChannel; | ||||
for (jChannel = 0; jChannel < nChannels; jChannel++) { | for (jChannel = 0; jChannel < nChannels; jChannel++) { | ||||
Show All 13 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_ ); | |||||
} | |||||
} | |||||
for (int iPole = 0 ; iPole < thePropagator_->getNPoles() ; iPole++) | |||||
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 | |||||
{ | |||||
LauParameter& par_polemasssq_ = thePropagator_->getPoleMassSqParameter(poleIndex_); | |||||
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.