Message: Bug in S-value example Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Bug in S-value example 

Forum: DNA/Very Low Energy
Date: Dec 06, 11:35
From: Baljeet Seniwal <Baljeet Seniwal>

Dear all

I was facing mysterious problem with s-value example. The rms value was increasing with increase in histories. After comparing the B1 example and svalue example where it computes the edeposit, rms and svalue.

It actually uses

  fEdeposit /= numberOfEvent; fEdeposit2 /= numberOfEvent;
  G4double rms = fEdeposit2 - fEdeposit*fEdeposit;        
  if (rms>0.) rms = std::sqrt(rms); else rms = 0.;

but I believe it should be

   fEdeposit /= numberOfEvent; fEdeposit2 /= (numberOfEvent*numberOfEvent);
      G4double rms = fEdeposit2 - fEdeposit*fEdeposit/numberOfEvent;
      if (rms>0.) rms = std::sqrt(rms); else rms = 0.;

Please correct me if I am wrong. I am adding my results with this report to support my findings


Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Bug in S-value example   (Sebastien INCERTI - Dec 07, 06:11)
 Add Message Add Message
to: "Bug in S-value example"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews