36 const double center_r = hit.
center_r();
37 const double center_z = hit.
center_z();
39 const float dist000 = TMath::Sqrt(center_r * center_r + center_z * center_z);
40 const float eta_jakobi = TMath::Abs(2.0 * TMath::Exp(-center_eta) /
41 (1.0 + TMath::Exp(-2 * center_eta)));
43 const float delta_eta = hit.
eta() - center_eta;
44 const float delta_phi = hit.
phi() - center_phi;
45 const float delta_eta_mm = delta_eta * eta_jakobi * dist000;
46 const float delta_phi_mm = delta_phi * center_r;
47 const float delta_r_mm =
48 TMath::Sqrt(delta_eta_mm * delta_eta_mm + delta_phi_mm * delta_phi_mm);
57 float meanweight =
m_hist->GetBinContent(
bin);
58 float weight = meanweight;
61 float logweight = CLHEP::RandGaussZiggurat::shoot(simulstate.
randomEngine(),
62 -0.5 * RMS * RMS, RMS);
63 weight *= TMath::Exp(logweight);
65 if (meanweight <= 1) {
74 float prob = 1.0 / meanweight;
83 <<
" meanweight=" << meanweight
84 <<
" weight=" << weight);