Skip to content
Snippets Groups Projects
Commit 5d22514a authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'master_Pythia8SmallWeightPatch' into 'master'

Using a much smaller minimum weight value in Pythia8

See merge request atlas/athena!41464
parents bea24374 3c264332
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,8 @@
#include "AthenaKernel/IAtRndmGenSvc.h"
#include <sstream>
// For limits
#include <limits>
// Name of AtRndmGenSvc stream
std::string Pythia8_i::pythia_stream = "PYTHIA8_INIT";
......@@ -401,11 +403,15 @@ StatusCode Pythia8_i::callGenerator(){
if(returnCode != StatusCode::FAILURE &&
(std::abs(eventWeight) < 1.e-18 ||
// Here this is a double, but it may be converted into float at some point downstream
(std::abs(eventWeight) < std::numeric_limits<float>::min() ||
m_pythia->event.size() < 2)){
returnCode = this->callGenerator();
}else{
} else if ( std::abs(eventWeight) < std::numeric_limits<float>::min() &&
std::abs(eventWeight) > std::numeric_limits<double>::min() ){
ATH_MSG_WARNING("Found event weight " << eventWeight << " between the float and double precision limits. Rejecting event.");
} else {
m_nMerged += eventWeight;
++m_internal_event_number;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment