Changeset View
Changeset View
Standalone View
Standalone View
src/LauKMatrixProdPole.cc
Show All 32 Lines | |||||
ClassImp(LauKMatrixProdPole) | ClassImp(LauKMatrixProdPole) | ||||
LauKMatrixProdPole::LauKMatrixProdPole(const TString& poleName, Int_t poleIndex, Int_t resPairAmpInt, | LauKMatrixProdPole::LauKMatrixProdPole(const TString& poleName, Int_t poleIndex, Int_t resPairAmpInt, | ||||
LauKMatrixPropagator* propagator, const LauDaughters* daughters, | LauKMatrixPropagator* propagator, const LauDaughters* daughters, | ||||
Bool_t useProdAdler) : | Bool_t useProdAdler) : | ||||
LauAbsResonance(poleName, resPairAmpInt, daughters), | LauAbsResonance(poleName, resPairAmpInt, daughters), | ||||
thePropagator_(propagator), | thePropagator_(propagator), | ||||
poleIndex_(poleIndex - 1), // poleIndex goes from 1 to nPoles | poleIndex_(poleIndex - 1), // poleIndex goes from 1 to nPoles | ||||
useProdAdler_(useProdAdler) | useProdAdler_(useProdAdler) | ||||
{ | { | ||||
if (useProdAdler_) { | if (useProdAdler_) { | ||||
std::cout<<"Creating K matrix production pole "<<poleName<<" with poleIndex = " | std::cout <<"Creating K matrix production pole "<<poleName<<" with poleIndex = " | ||||
<<poleIndex<<" with s-dependent production Adler zero term"<<std::endl; | <<poleIndex<<" with s-dependent production Adler zero term"<<std::endl; | ||||
} else { | } else { | ||||
std::cout<<"Creating K matrix production pole "<<poleName<<" with poleIndex = " | std::cout <<"Creating K matrix production pole "<<poleName<<" with poleIndex = " | ||||
<<poleIndex<<" with production Adler zero factor = 1"<<std::endl; | <<poleIndex<<" with production Adler zero factor = 1"<<std::endl; | ||||
} | } | ||||
} | } | ||||
LauKMatrixProdPole::~LauKMatrixProdPole() | LauKMatrixProdPole::~LauKMatrixProdPole() | ||||
{ | { | ||||
} | } | ||||
Show All 12 Lines | LauComplex LauKMatrixProdPole::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 LauKMatrixProdPole::amplitude : The propagator is null" << std::endl; | std::cerr << "ERROR in LauKMatrixProdPole::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 ) { | |||||
johndan: @jback, here I assume the 0th channel is the one for which the amplitude is requested. This… | |||||
jbackUnsubmitted Done Inline ActionsWell, you could have the case where the first channel has L = 0, but others have L > 0. So we should check if the propagator has any non-zero L channels, perhaps by returning a cached boolean that keeps track of this condition at initialisation. Do we need to include the resBWFactor? I thought this was already in the "D" matrices (denominator terms involving q, a and R). jback: Well, you could have the case where the first channel has L = 0, but others have L > 0. So we… | |||||
johndanAuthorUnsubmitted Done Inline ActionsOn the first point, I don't think it matters if other channels have L>0 does it? Why do we need to track it? On the second, I think you're spot on - the resBWFactor has been dropped as you say. johndan: On the first point, I don't think it matters if other channels have L>0 does it? Why do we need… | |||||
jbackUnsubmitted Done Inline ActionsYes, we don't need to track this since we have changed how the angular dependence is included. jback: Yes, we don't need to track this since we have changed how the angular dependence is included. | |||||
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); | ||||
// 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; | ||||
Show All 11 Lines | LauComplex LauKMatrixProdPole::amplitude(const LauKinematics* kinematics) | ||||
Double_t poleDenom = thePropagator_->getPoleDenomTerm(poleIndex_); | Double_t poleDenom = thePropagator_->getPoleDenomTerm(poleIndex_); | ||||
// 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(poleDenom*adlerZero); | amp.rescale(poleDenom*adlerZero); | ||||
amp.rescale(fFactorR); | |||||
amp.rescale(fFactorB); | |||||
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() ) | |||||
this->addFloatingParameter( &par_gj_ ); | |||||
} | |||||
return this->getParameters(); | |||||
} | |||||
Done Inline ActionsBraces have gone missing tlatham: Braces have gone missing | |||||
No newline at end of file |
@jback, here I assume the 0th channel is the one for which the amplitude is requested. This assumption has precedence in your code, right?