diff --git a/Generator/src/BeamBackgroundFileParserV1.cpp b/Generator/src/BeamBackgroundFileParserV1.cpp index a39d2cd332364dce4543b8063ab91bf2c468d5dc..fc17b2ba3e9f2b0ab8fb08e9f5043c4c4d38a5e9 100644 --- a/Generator/src/BeamBackgroundFileParserV1.cpp +++ b/Generator/src/BeamBackgroundFileParserV1.cpp @@ -69,8 +69,7 @@ bool BeamBackgroundFileParserV1::load(IBeamBackgroundFileParser::BeamBackgroundD bool BeamBackgroundFileParserV1::SampleParticleNum(int& npart, int& start ){ if(m_Nmcp==-1){ - npart = int(m_rate * m_timewindow); - npart = CLHEP::RandPoisson::shoot(npart); + npart = int( CLHEP::RandPoisson::shoot(m_rate * m_timewindow) ) ; } else npart = m_Nmcp;