From: morsch Date: Wed, 29 May 2013 14:59:10 +0000 (+0000) Subject: CID 21213: Other violation (DIVIDE_BY_ZERO) X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=c81f4322d0d3bd53e65456d680c42bfa55f85b02 CID 21213: Other violation (DIVIDE_BY_ZERO) --- diff --git a/PYTHIA8/pythia8175/src/HelicityMatrixElements.cxx b/PYTHIA8/pythia8175/src/HelicityMatrixElements.cxx index 8488efc2fe4..d226de7fec0 100644 --- a/PYTHIA8/pythia8175/src/HelicityMatrixElements.cxx +++ b/PYTHIA8/pythia8175/src/HelicityMatrixElements.cxx @@ -713,8 +713,10 @@ void HMEUnpolarized::calculateRho(unsigned int idx, for (int i = 0; i < p[idx].spinStates(); i++ ) { for (int j = 1; j < p[idx].spinStates(); j++) { - if (i == j) p[idx].rho[i][j] = 1.0 / - static_cast(p[idx].spinStates()); + if ((i == j) && static_cast(p[idx].spinStates()) != 0.) { + p[idx].rho[i][j] = 1.0 / + static_cast(p[idx].spinStates()); + } else p[idx].rho[i][j] = 0; } }