1 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
9 namespace SiPixelUtils {
19 float upper_edge_first_pix,
20 float lower_edge_last_pix,
27 float eff_charge_cut_low,
28 float eff_charge_cut_high,
31 float geom_center = 0.5f * (upper_edge_first_pix + lower_edge_last_pix);
42 float w_inner = lower_edge_last_pix - upper_edge_first_pix;
45 float w_pred = theThickness * cot_angle
49 float sum_of_edge = 2.0f;
56 float w_eff =
std::abs(w_pred) - w_inner;
64 if ((size >= size_cut) || ((w_eff / pitch < eff_charge_cut_low) | (w_eff / pitch > eff_charge_cut_high))) {
65 w_eff = pitch * 0.5f * sum_of_edge;
70 float q_diff = q_l - q_f;
71 float q_sum = q_l + q_f;
77 float hit_pos = geom_center + 0.5f * (q_diff / q_sum) * w_eff;
88 float upper_edge_first_pix,
89 float lower_edge_last_pix,
96 float eff_charge_cut_low,
97 float eff_charge_cut_high,
100 const auto geom_center = 0.5f * (upper_edge_first_pix + lower_edge_last_pix);
108 const auto w_inner = lower_edge_last_pix - upper_edge_first_pix;
111 const auto w_pred = theThickness * cot_angle
115 auto sum_of_edge = 2.0f;
131 if (size >= size_cut) {
132 w_eff = pitch * 0.5f * sum_of_edge;
137 const auto q_diff = q_l - q_f;
138 auto q_sum = q_l + q_f;
139 const auto q_b_corr = q_l_b + q_f_b;
146 geom_center + 0.5f * (q_diff / q_sum) * w_eff + 0.5
f * (q_b_corr / q_sum) * w_eff;
float generic_position_formula_y_bricked(int size, int q_f, int q_l, int q_f_b, int q_l_b, float upper_edge_first_pix, float lower_edge_last_pix, float lorentz_shift, float theThickness, float cot_angle, float pitch, bool first_is_big, bool last_is_big, float eff_charge_cut_low, float eff_charge_cut_high, float size_cut)
Abs< T >::type abs(const T &t)
float generic_position_formula(int size, int q_f, int q_l, float upper_edge_first_pix, float lower_edge_last_pix, float lorentz_shift, float theThickness, float cot_angle, float pitch, bool first_is_big, bool last_is_big, float eff_charge_cut_low, float eff_charge_cut_high, float size_cut)
tuple size
Write out results.