From 267fc384198969b9edc02cd0e05d85fc2ffe730d Mon Sep 17 00:00:00 2001 From: oafedulidis <oafedulidis@ep1.rub.de> Date: Thu, 31 Oct 2024 12:50:40 +0100 Subject: [PATCH] bugfix in PwaUtils/FVectorIntensityDynamics, fixed false phsp factor calculation; added keep_alive to acceptor in NetworkServer; minor changes in SetEnv_rub_mn2standalone.bash script --- PwaUtils/FVectorIntensityDynamics.cc | 11 ++++------- PwaUtils/NetworkServer.cc | 3 ++- SetEnv_rub_mn2standalone.bash | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/PwaUtils/FVectorIntensityDynamics.cc b/PwaUtils/FVectorIntensityDynamics.cc index 859bdfa9..cc242314 100644 --- a/PwaUtils/FVectorIntensityDynamics.cc +++ b/PwaUtils/FVectorIntensityDynamics.cc @@ -72,7 +72,7 @@ FVectorIntensityDynamics::FVectorIntensityDynamics(std::string& name, std::vecto std::string prodMomParamsStr=thePiPiScatteringParser->prodMomParamsStr(); std::stringstream prodMomParamsStringStr; prodMomParamsStringStr << prodMomParamsStr; - + std::string L2prodStr; prodMomParamsStringStr >> L2prodStr; _L2prod=atof(L2prodStr.c_str()); @@ -120,7 +120,7 @@ complex<double> FVectorIntensityDynamics::eval(EvtData* theData, AbsXdecAmp* gra // double currentResult = pow(currentMass*currentMass,_sProdExp)*norm(_currentAmplitudeVal*currentFAmp*sqrt(thePhpVecs.at(_prodProjectionIndex)->factor(currentMass, _orbitalL).real()*currentMass/2. * momQ2L) ); // double currentResult = pow(currentMass*currentMass,_sProdExp)*norm(_currentAmplitudeVal*currentFAmp*sqrt(thePhpVecs.at(_prodProjectionIndex)->factor(currentMass).real()*currentMass/2. * momQ2L) ); - double currentResult = pow(currentMass*currentMass,_sProdExp)*norm(currentFAmp*sqrt(thePhpVecs.at(_prodProjectionIndex)->factor(currentMass).real()*currentMass/2. * momQ2L)); + double currentResult = pow(currentMass*currentMass,_sProdExp)*norm(currentFAmp*sqrt(thePhpVecs.at(_decProjectionIndex)->factor(currentMass).real()*currentMass/2. * momQ2L)); theData->DoubleId.at(IdStringMapRegistry::instance()->stringId(EvtDataScatteringList::FIT_PIPISCAT_NAME)) = currentResult; return currentFAmp; } @@ -144,12 +144,9 @@ bool FVectorIntensityDynamics::checkRecalculation(std::shared_ptr<AbsPawianParam void FVectorIntensityDynamics::updateFitParams(std::shared_ptr<AbsPawianParameters> fitPar){ KMatrixDynamics::updateFitParams(fitPar); - //_currentAmplitudeVal = std::polar( std::abs(fitPar->Value(_nameOfAmplitudeMag)), + //_currentAmplitudeVal = std::polar( std::abs(fitPar->Value(_nameOfAmplitudeMag)), // fitPar->Value(_nameOfAmplitudePhi) ); - // _currentAmplitudeVal = std::polar( fitPar->Value(_nameOfAmplitudeMag), + // _currentAmplitudeVal = std::polar( fitPar->Value(_nameOfAmplitudeMag), // fitPar->Value(_nameOfAmplitudePhi) ); } - - - diff --git a/PwaUtils/NetworkServer.cc b/PwaUtils/NetworkServer.cc index bb7f4f5f..afdff92c 100644 --- a/PwaUtils/NetworkServer.cc +++ b/PwaUtils/NetworkServer.cc @@ -60,7 +60,8 @@ NetworkServer::NetworkServer(int port, unsigned short noOfClients, std::map<Chan theAcceptor = std::shared_ptr<tcp::acceptor>(new tcp::acceptor(*theIOService, tcp::endpoint(tcp::v4(), _port))); theDeadlineTimer = std::shared_ptr<boost::asio::deadline_timer>(new boost::asio::deadline_timer(*theIOService)); - theAcceptor->set_option(boost::asio::ip::tcp::no_delay(true)); //diable nagels + theAcceptor->set_option(boost::asio::socket_base::keep_alive(true)); + theAcceptor->set_option(boost::asio::ip::tcp::no_delay(true)); //disable nagels for(int i=0; i<_noOfClients; i++){ theStreams.push_back( std::shared_ptr<tcp::iostream>(new tcp::iostream) ); diff --git a/SetEnv_rub_mn2standalone.bash b/SetEnv_rub_mn2standalone.bash index e47eeef0..1bf5b01b 100755 --- a/SetEnv_rub_mn2standalone.bash +++ b/SetEnv_rub_mn2standalone.bash @@ -31,7 +31,7 @@ fi #### user defined variables ############################ # path to root installation (will only be used if root is not already sourced -> ROOTSYS not set) -ROOT_DIR="/opt/root/6-32.04-AL9.4-gcc12.2.0" +ROOT_DIR="/opt/root/6-28.04-AL9.2-gcc12.2.0" # path to Minuit2 package MINUIT2_STANDALONE="/data/iltschi/pawian_utils/Minuit2/Minuit2-6.33.01_AlmaLinux9.4_gcc12.2.0" # path to boost build -- GitLab