Changeset View
Changeset View
Standalone View
Standalone View
src/LauPolNR.cc
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | void LauPolNR::initialise() | ||||
// Make the spin term purely the Legendre polynomial of the cos(helicity angle) | // Make the spin term purely the Legendre polynomial of the cos(helicity angle) | ||||
this->setSpinType( LauAbsResonance::Legendre ); | this->setSpinType( LauAbsResonance::Legendre ); | ||||
Double_t omega = 0.5*(daughters->getMassParent()+(1.0/3.0)*(daughters->getMassDaug1()+daughters->getMassDaug2()+daughters->getMassDaug3())); | Double_t omega = 0.5*(daughters->getMassParent()+(1.0/3.0)*(daughters->getMassDaug1()+daughters->getMassDaug2()+daughters->getMassDaug3())); | ||||
this->setOmega( omega ); | this->setOmega( omega ); | ||||
TString name = this->getResonanceName(); | TString name = this->getResonanceName(); | ||||
name = name.ReplaceAll("+",""); // strip off any trailing ++ | |||||
if (name.EndsWith("0",TString::kExact)){ | if (name.EndsWith("0",TString::kExact)){ | ||||
order_ = 0; | order_ = 0; | ||||
} | } | ||||
else if (name.EndsWith("1",TString::kExact)){ | else if (name.EndsWith("1",TString::kExact)){ | ||||
order_ = 1; | order_ = 1; | ||||
} | } | ||||
else if (name.EndsWith("2",TString::kExact)){ | else if (name.EndsWith("2",TString::kExact)){ | ||||
order_ = 2; | order_ = 2; | ||||
} | } | ||||
else if (name.EndsWith("3",TString::kExact)){ | else if (name.EndsWith("3",TString::kExact)){ | ||||
order_ = 3; | order_ = 3; | ||||
} | } | ||||
else{ | else{ | ||||
std::cerr << "ERROR in LauPolNR::initialise : Resonance order unknown (known orders : 0, 1, 2 and 3)" << std::endl; | std::cerr << "ERROR in LauPolNR::initialise : Resonance order unknown (known orders : 0, 1, 2 and 3)" << std::endl; | ||||
std::cerr << " : Defaulting to 0." << std::endl; | std::cerr << " : Defaulting to 0." << std::endl; | ||||
} | } | ||||
std::cout << "Setting order of LauPolNR as " << order_ << std::endl; | |||||
} | } | ||||
LauComplex LauPolNR::resAmp(Double_t mass, Double_t spinTerm) | LauComplex LauPolNR::resAmp(Double_t mass, Double_t spinTerm) | ||||
{ | { | ||||
Double_t magnitude( spinTerm ); | Double_t magnitude( spinTerm ); | ||||
Double_t massDiff = mass - omega_; | Double_t massDiff = mass - omega_; | ||||
for ( UInt_t i(0); i < order_; ++i ) { | for ( UInt_t i(0); i < order_; ++i ) { | ||||
magnitude *= massDiff; | magnitude *= massDiff; | ||||
} | } | ||||
LauComplex resAmplitude(magnitude, 0.0); | LauComplex resAmplitude(magnitude, 0.0); | ||||
return resAmplitude; | return resAmplitude; | ||||
} | } | ||||