Changeset View
Changeset View
Standalone View
Standalone View
src/LauKMatrixProdSVP.cc
Show All 36 Lines | LauKMatrixProdSVP::LauKMatrixProdSVP(const TString& SVPName, Int_t channelIndex, Int_t resPairAmpInt, | ||||
LauKMatrixPropagator* propagator, const LauDaughters* daughters, | LauKMatrixPropagator* propagator, const LauDaughters* daughters, | ||||
Bool_t useProdAdler) : | Bool_t useProdAdler) : | ||||
LauAbsResonance(SVPName, resPairAmpInt, daughters), | LauAbsResonance(SVPName, resPairAmpInt, daughters), | ||||
thePropagator_(propagator), | thePropagator_(propagator), | ||||
channelIndex_(channelIndex - 1), // channelIndex goes from 1 to nChannels. | channelIndex_(channelIndex - 1), // channelIndex goes from 1 to nChannels. | ||||
useProdAdler_(useProdAdler) | useProdAdler_(useProdAdler) | ||||
{ | { | ||||
// Constructor | // Constructor | ||||
if (useProdAdler_) { | if (useProdAdler_) { | ||||
std::cout<<"Creating K matrix production SVP "<<SVPName<<" with channelIndex = " | std::cout <<"Creating K matrix production SVP "<<SVPName<<" with channelIndex = " | ||||
<<channelIndex<<" with s-dependent production Adler zero term"<<std::endl; | <<channelIndex<<" with s-dependent production Adler zero term"<<std::endl; | ||||
} else { | } else { | ||||
std::cout<<"Creating K matrix production SVP "<<SVPName<<" with channelIndex = " | std::cout <<"Creating K matrix production SVP "<<SVPName<<" with channelIndex = " | ||||
<<channelIndex<<" with production Adler zero factor = 1"<<std::endl; | <<channelIndex<<" with production Adler zero factor = 1"<<std::endl; | ||||
} | } | ||||
} | } | ||||
LauKMatrixProdSVP::~LauKMatrixProdSVP() | LauKMatrixProdSVP::~LauKMatrixProdSVP() | ||||
{ | { | ||||
// Destructor | // Destructor | ||||
} | } | ||||
LauComplex LauKMatrixProdSVP::resAmp(Double_t mass, Double_t spinTerm) | LauComplex LauKMatrixProdSVP::resAmp(Double_t mass, Double_t spinTerm) | ||||
Show All 11 Lines | LauComplex LauKMatrixProdSVP::amplitude(const LauKinematics* kinematics) | ||||
// the given centre-of-mass squared value ("s") from the kinematics. | // 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 LauKMatrixProdSVP::amplitude : The propagator is null" << std::endl; | std::cerr << "ERROR in LauKMatrixProdSVP::amplitude : The propagator is null" << std::endl; | ||||
return amp; | return amp; | ||||
} | } | ||||
const Int_t resSpin = this->getSpin(); | |||||
const Double_t q = this->getQ(); | |||||
const Double_t p = this->getP(); | |||||
const Double_t pstar = this->getPstar(); | |||||
// Get barrier scaling factors | |||||
Double_t fFactorR(1.0); | |||||
Double_t fFactorB(1.0); | |||||
if ( thePropagator_->getL(0) > 0 ) { | |||||
const LauBlattWeisskopfFactor* resBWFactor = this->getResBWFactor(); | |||||
if ( resBWFactor != nullptr ) { | |||||
fFactorR = resBWFactor->calcFormFactor(q); | |||||
} | |||||
const LauBlattWeisskopfFactor* parBWFactor = this->getParBWFactor(); | |||||
if ( parBWFactor != nullptr ) { | |||||
switch ( parBWFactor->getRestFrame() ) { | |||||
case LauBlattWeisskopfFactor::ResonanceFrame: | |||||
fFactorB = parBWFactor->calcFormFactor(p); | |||||
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; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
thePropagator_->updatePropagator(kinematics); | thePropagator_->updatePropagator(kinematics); | ||||
Double_t SVPTerm = thePropagator_->getProdSVPTerm(); | Double_t SVPTerm = thePropagator_->getProdSVPTerm(); | ||||
amp = thePropagator_->getPropTerm(channelIndex_); | amp = thePropagator_->getPropTerm(channelIndex_); | ||||
// Include Adler zero factor if requested | // Include Adler zero factor if requested | ||||
Double_t adlerZero(1.0); | Double_t adlerZero(1.0); | ||||
if (useProdAdler_) {adlerZero = thePropagator_->getAdlerZero();} | if (useProdAdler_) {adlerZero = thePropagator_->getAdlerZero();} | ||||
amp.rescale(SVPTerm*adlerZero); | amp.rescale(SVPTerm*adlerZero); | ||||
amp.rescale(fFactorR); | |||||
amp.rescale(fFactorB); | |||||
return amp; | return amp; | ||||
} | } | ||||
const std::vector<LauParameter*>& LauKMatrixProdSVP::getFloatingParameters() | |||||
{ | |||||
this->clearFloatingParameters(); | |||||
Int_t nChannels = thePropagator_->getNChannels(); | |||||
for (int jChannel = 0 ; jChannel < nChannels ; jChannel++) | |||||
{ | |||||
LauParameter& par_f_ = thePropagator_->getScatteringParameter(channelIndex_, jChannel); | |||||
if ( !par_f_.fixed() ) | |||||
this->addFloatingParameter( &par_f_ ); | |||||
} | |||||
LauParameter& par_s0Prod_ = thePropagator_->gets0Prod(); | |||||
if ( !par_s0Prod_.fixed() ) | |||||
{ | |||||
this->addFloatingParameter( &par_s0Prod_ ); | |||||
} | |||||
return this->getParameters(); | |||||
} | |||||
No newline at end of file |