Commit d7ad2d68 authored by Hendrik Hoeth's avatar Hendrik Hoeth
Browse files

retry event on negative hadron energies, rather than exiting the run. (merge c19375 from trunk)

parent c0151a55
#include "AHADIC++/Formation/Cluster_Former.H" #include "AHADIC++/Formation/Cluster_Former.H"
#include "ATOOLS/Org/Message.H" #include "ATOOLS/Org/Message.H"
#include "ATOOLS/Org/Return_Value.H"
using namespace AHADIC; using namespace AHADIC;
using namespace ATOOLS; using namespace ATOOLS;
...@@ -18,10 +19,10 @@ void Cluster_Former::ConstructClusters(Proto_Particle_List * plin, Cluster_List ...@@ -18,10 +19,10 @@ void Cluster_Former::ConstructClusters(Proto_Particle_List * plin, Cluster_List
pit2 = pit1;pit2++; pit2 = pit1;pit2++;
cluster = new Cluster((*pit1),(*pit2)); cluster = new Cluster((*pit1),(*pit2));
if ((*pit1)->m_mom[0]<0. || (*pit2)->m_mom[0]<0.) { if ((*pit1)->m_mom[0]<0. || (*pit2)->m_mom[0]<0.) {
msg_Out()<<"Error in "<<METHOD<<": negative hadron energies\n" msg_Error()<<"Error in "<<METHOD<<": negative hadron energies\n"
<<(*cluster)<<"\n" <<(*cluster)<<"\n"
<<" Will exit the run.\n"; <<" Will retry event.\n";
exit(1); throw Return_Value::Retry_Event;
} }
#ifdef memchecker #ifdef memchecker
std::cout<<"*** New cluster ("<<cluster->Number()<<"/"<<cluster<<") with " std::cout<<"*** New cluster ("<<cluster->Number()<<"/"<<cluster<<") with "
......
#include "AHADIC++/Tools/Soft_Cluster_Handler.H" #include "AHADIC++/Tools/Soft_Cluster_Handler.H"
#include "ATOOLS/Math/Random.H" #include "ATOOLS/Math/Random.H"
#include "ATOOLS/Org/Message.H" #include "ATOOLS/Org/Message.H"
#include "ATOOLS/Org/Return_Value.H"
using namespace AHADIC; using namespace AHADIC;
using namespace ATOOLS; using namespace ATOOLS;
...@@ -875,8 +876,8 @@ void Soft_Cluster_Handler::FixHHDecay(Cluster * cluster,Blob * blob, ...@@ -875,8 +876,8 @@ void Soft_Cluster_Handler::FixHHDecay(Cluster * cluster,Blob * blob,
if (p1[0]<0. || p2[0]<0.) { if (p1[0]<0. || p2[0]<0.) {
msg_Error()<<"Error in "<<METHOD<<": negative hadron energies\n" msg_Error()<<"Error in "<<METHOD<<": negative hadron energies\n"
<<(*cluster)<<"\n" <<(*cluster)<<"\n"
<<" Will exit the run.\n"; <<" Will retry event.\n";
exit(1); throw Return_Value::Retry_Event;
} }
if (cluster->GetLeft()) { if (cluster->GetLeft()) {
......
...@@ -23,5 +23,5 @@ ...@@ -23,5 +23,5 @@
}(selector) }(selector)
(mi){ (mi){
MI_HANDLER = Amisic MI_HANDLER = None
}(mi) }(mi)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment