Dear experts,
is it possibile to define a random variable equal to the product of two random variables? Notice I’m not talking about a 2d model.
What I’m exactly doing is the following. I’m considering only Z->ee back to back, and I’m considering only e in a very narrow energy window (so a dirac delta) and I know the resolution of my detector. I want to know how the distribution of the Z mass changes if I change the response of the detector (now a gaussian)
In this case the formula (the product) is sqrt(4E1E2)
const float true_z_mass_value = 91.1876;
// observables
RooRealVar z_mass("z_mass", "m_{ee}", true_z_mass_value, 0, 100);
RooRealVar E1("E1", "E_1", 20, 60);
RooRealVar E2("E2", "E_2", 20, 60);
// parameters
// first electron -> 40 GeV
RooRealVar E1_true("E1_true", "true E_1", 40, 20, 60);
// second electron: compute the energy to have m_ee = m_Z
RooRealVar E2_true("E2_true", "energy electron 2", z_mass.getVal() * z_mass.getVal() / 4. / E1_true.getVal(), 20, 60);
RooRealVar width("width", "resolution", 1., 0., 10.);
RooGaussian E1_model("E1_rec", "E_{1}^{rec}", E1, E1_true, width);
RooGaussian E2_model("E2_rec", "E_{2}^{rec}", E2, E2_true, width);
RooGenericPdf Z_model("Z_model", "Z model", "sqrt(4*E1_rec*E2_rec)", RooArgSet(E1_model, E2_model));
RooDataSet *dataZ = Z_model.generate(z_mass, 200000);
RooPlot* dataZ_frame = z_mass.frame();
dataZ->plotOn(dataZ_frame);
dataZ_frame->Draw();
what I get is a uniform distribution