From 793d13bc7a560da3bddecc76a64950eaefc006f4 Mon Sep 17 00:00:00 2001
From: BrieucF <brieucfrancois@hotmail.com>
Date: Thu, 28 Nov 2024 11:03:37 +0100
Subject: [PATCH] Increase max number of particles allowed for hepevt input

---
 DDG4/plugins/Geant4EventReaderHepEvt.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/DDG4/plugins/Geant4EventReaderHepEvt.cpp b/DDG4/plugins/Geant4EventReaderHepEvt.cpp
index beddbab88..49572e917 100644
--- a/DDG4/plugins/Geant4EventReaderHepEvt.cpp
+++ b/DDG4/plugins/Geant4EventReaderHepEvt.cpp
@@ -183,8 +183,8 @@ Geant4EventReaderHepEvt::readParticles(int /* event_number */,
   //check loop variable read from input file and chack that is reasonable
   // should fix coverity issue: "Using tainted variable NHEP as a loop boundary."
 
-  if( NHEP > 1e6 ){ 
-    printout(ERROR,"EventReaderHepEvt::readParticles","Cannot read in more than million particles, but  %d requested", NHEP );
+  if( NHEP > 5e7 ){
+    printout(ERROR,"EventReaderHepEvt::readParticles","Cannot read in too many particles, %d requested but an (arbitrary) limit has been set to 50 M", NHEP );
     return EVENT_READER_EOF; 
   }