Hi,
I am using a root file which contains information about position and direction of the particles ( e.g. px, py, pz, x, y, z etc…) .
I need to to make a smearing to the variable pz according to a gaussian, centered to zero. I do not need to draw this variable, but when I call it, I require to get the new pz with the applied smearing on it. I found an example below but I don’t really understand how to do the variable correction, and also why the event number of the file is used as a seed? Any help would be appreciated.
for (int i = 0; i < Tree->GetEntries(); i++) {
…
myrandom3->SetSeed(TheEventNumberOfFile);
myrandom3->Gaus(0,a given value);
//make the correction to the variable
…
}
Thanks a lot,
Steve