Changeset View
Changeset View
Standalone View
Standalone View
src/LauIsobarDynamics.cc
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
#include "LauKMatrixPropagator.hh" | #include "LauKMatrixPropagator.hh" | ||||
#include "LauKMatrixPropFactory.hh" | #include "LauKMatrixPropFactory.hh" | ||||
#include "LauNRAmplitude.hh" | #include "LauNRAmplitude.hh" | ||||
#include "LauPrint.hh" | #include "LauPrint.hh" | ||||
#include "LauRandom.hh" | #include "LauRandom.hh" | ||||
#include "LauResonanceInfo.hh" | #include "LauResonanceInfo.hh" | ||||
#include "LauResonanceMaker.hh" | #include "LauResonanceMaker.hh" | ||||
#include "LauRhoOmegaMix.hh" | #include "LauRhoOmegaMix.hh" | ||||
#include "LauASqMaxFinder.hh" | |||||
ClassImp(LauIsobarDynamics) | ClassImp(LauIsobarDynamics) | ||||
// for Kpipi: only one scfFraction 2D histogram is needed | // for Kpipi: only one scfFraction 2D histogram is needed | ||||
LauIsobarDynamics::LauIsobarDynamics(LauDaughters* daughters, LauAbsEffModel* effModel, LauAbsEffModel* scfFractionModel) : | LauIsobarDynamics::LauIsobarDynamics(LauDaughters* daughters, LauAbsEffModel* effModel, LauAbsEffModel* scfFractionModel) : | ||||
daughters_(daughters), | daughters_(daughters), | ||||
kinematics_(daughters_ ? daughters_->getKinematics() : 0), | kinematics_(daughters_ ? daughters_->getKinematics() : 0), | ||||
effModel_(effModel), | effModel_(effModel), | ||||
▲ Show 20 Lines • Show All 2,213 Lines • ▼ Show 20 Lines | |||||
Bool_t LauIsobarDynamics::generate() | Bool_t LauIsobarDynamics::generate() | ||||
{ | { | ||||
// Routine to generate a signal event according to the Dalitz plot | // Routine to generate a signal event according to the Dalitz plot | ||||
// model we have defined. | // model we have defined. | ||||
// We need to make sure to calculate everything for every resonance | // We need to make sure to calculate everything for every resonance | ||||
integralsToBeCalculated_.clear(); | integralsToBeCalculated_.clear(); | ||||
for ( UInt_t i(0); i < nAmp_+nIncohAmp_; ++i ) { | for ( UInt_t i{0}; i < nAmp_+nIncohAmp_; ++i ) { | ||||
integralsToBeCalculated_.insert(i); | integralsToBeCalculated_.insert(i); | ||||
} | } | ||||
if ( aSqMaxAuto_ ) { | |||||
std::cout<<"INFO in LauIsobarDynamics::generate : Starting auto-location of |A|^2 maximum"<<std::endl; | |||||
LauASqMaxFinder finder{*this}; | |||||
aSqMaxSet_ = finder.find(); | |||||
aSqMaxAuto_ = kFALSE; | |||||
std::cout<<"INFO in LauIsobarDynamics::generate : auto-location of |A|^2 maximum finds: "<<aSqMaxSet_<<std::endl; | |||||
aSqMaxSet_ *= 1.10; | |||||
std::cout<<" : applying safety factor of 10\% gives: "<<aSqMaxSet_<<std::endl; | |||||
} | |||||
nSigGenLoop_ = 0; | nSigGenLoop_ = 0; | ||||
Bool_t generatedSig(kFALSE); | Bool_t generatedSig(kFALSE); | ||||
while (generatedSig == kFALSE && nSigGenLoop_ < iterationsMax_) { | while (generatedSig == kFALSE && nSigGenLoop_ < iterationsMax_) { | ||||
// Generates uniform DP phase-space distribution | // Generates uniform DP phase-space distribution | ||||
Double_t m13Sq(0.0), m23Sq(0.0); | Double_t m13Sq(0.0), m23Sq(0.0); | ||||
kinematics_->genFlatPhaseSpace(m13Sq, m23Sq); | kinematics_->genFlatPhaseSpace(m13Sq, m23Sq); | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | if ( aSqMaxSet_ > 1.01 * aSqMaxVar_ ) { | ||||
iterationsMax_ *= 2; | iterationsMax_ *= 2; | ||||
std::cout<<"INFO in LauIsobarDynamics::checkToyMC : max number of iterations reset to "<<iterationsMax_<<std::endl; | std::cout<<"INFO in LauIsobarDynamics::checkToyMC : max number of iterations reset to "<<iterationsMax_<<std::endl; | ||||
ok = MaxIterError; | ok = MaxIterError; | ||||
} | } | ||||
} else if (aSqMaxVar_ > aSqMaxSet_) { | } else if (aSqMaxVar_ > aSqMaxSet_) { | ||||
// Found a value of ASq higher than the accept/reject ceiling - the generation is biased | // Found a value of ASq higher than the accept/reject ceiling - the generation is biased | ||||
if (printErrorMessages) { | if (printErrorMessages) { | ||||
std::cerr<<"WARNING in LauIsobarDynamics::checkToyMC : |A|^2 maximum was set to "<<aSqMaxSet_<<" but a value exceeding this was found: "<<aSqMaxVar_<<std::endl; | std::cerr<<"WARNING in LauIsobarDynamics::checkToyMC : |A|^2 maximum was set to "<<aSqMaxSet_<<" but a value exceeding this was found: "<<aSqMaxVar_<<std::endl; | ||||
std::cerr<<" : This value was found at m13Sq = "<<kinematics_->getm13Sq()<<" and m23Sq = "<<kinematics_->getm23Sq()<<std::endl; | |||||
std::cerr<<" : Run was invalid, as any generated MC will be biased, according to the accept/reject method!"<<std::endl; | std::cerr<<" : Run was invalid, as any generated MC will be biased, according to the accept/reject method!"<<std::endl; | ||||
std::cerr<<" : The value of |A|^2 maximum be reset to be > "<<aSqMaxVar_<<" and the generation restarted."<<std::endl; | std::cerr<<" : The value of |A|^2 maximum be reset to be > "<<aSqMaxVar_<<" and the generation restarted."<<std::endl; | ||||
} | } | ||||
aSqMaxSet_ = 1.01 * aSqMaxVar_; | aSqMaxSet_ = 1.01 * aSqMaxVar_; | ||||
std::cout<<"INFO in LauIsobarDynamics::checkToyMC : |A|^2 max reset to "<<aSqMaxSet_<<std::endl; | std::cout<<"INFO in LauIsobarDynamics::checkToyMC : |A|^2 max reset to "<<aSqMaxSet_<<std::endl; | ||||
ok = ASqMaxError; | ok = ASqMaxError; | ||||
} else if (printInfoMessages) { | } else if (printInfoMessages) { | ||||
std::cout<<"INFO in LauIsobarDynamics::checkToyMC : aSqMaxSet = "<<aSqMaxSet_<<" and aSqMaxVar = "<<aSqMaxVar_<<std::endl; | std::cout<<"INFO in LauIsobarDynamics::checkToyMC : aSqMaxSet = "<<aSqMaxSet_<<" and aSqMaxVar = "<<aSqMaxVar_<<std::endl; | ||||
▲ Show 20 Lines • Show All 307 Lines • Show Last 20 Lines |