About AddWhiteNoise() not working

Hi experts,

I have a question about AddWhiteNoise() function. In my code I am trying to add a white noise to the induced current signal of sense wire in a diamond detector. The core code is like this:

for (const auto& cluster : track.GetClusters()) {
++nc;
nesum += cluster.electrons.size();
drift.DisablePlotting();

  for (const auto& electron : cluster.electrons) {
    drift.DriftElectron(electron.x, electron.y, electron.z, electron.t);
  }
  for (const auto& hole : cluster.ions) {
    drift.DriftHole(hole.x, hole.y, hole.z, hole.t);
  }
}
std::cout << nesum << " electrons, " 
          << nesum * ElementaryCharge << " fC.\n";

sensor.AddWhiteNoise("sign",100.,true,1.0);
//sensor.ConvoluteSignals();

outfile << "x0 = " << x0 << "  " << "y0 = " << y0 <<"\n";
outfile << "********************************************" << "\n";

I didn’t convolute the signal with transfer function, and I hope to see some fuzzing shape in the signal… but I didn’t, here is the signal I got, it is smooth, and I tried to change ENC and q0, also not working.


Do you know what could be wrong with it?

Thanks!
Huazhen

Hi,
AddWhiteNoise calculates the frequency with which it adds noise pulses to the induced current such that it reproduces a given RMS equivalent-noise charge after convoluting the induced current with the transfer function. So you indeed need to specify a transfer function first.

Hi,

Thank you so much for help. It works after I set the transfer function first. The add-noise function is really convenient.

Cheers
Huazhen

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.