i use the following code to count the number of particles for each energy bin :
G4double E_min=1.,Pas=1.;
for (i=0;i<100;i++)
{
if(E_min<Energy && Energy<E_min+Pas)
{
counter[i]+=1;
fEventAction-> AddCounter(counter[i],i);
E_min+=Pas;
}
}
but i get this error
i hope someone can help,
Thank you