11 constexpr
int tecp1l_id = 28;
12 constexpr
int tecp1u_id = 29;
13 constexpr
int tecp2l_id = 30;
14 constexpr
int tecp2u_id = 31;
15 constexpr
int tecn1l_id = 50;
16 constexpr
int tecn1u_id = 51;
17 constexpr
int tecn2l_id = 52;
18 constexpr
int tecntu_id = 53;
20 [[maybe_unused]]
void partitionSeeds1(
const TrackerInfo &trk_info,
28 const auto &
L = trk_info;
29 const float tecp1_rin =
std::min(
L[tecp1l_id].rin(),
L[tecp1u_id].rin());
30 const float tecp1_rout =
std::max(
L[tecp1l_id].rout(),
L[tecp1u_id].rout());
33 const float tecp2_rin =
std::min(
L[tecp2l_id].rin(),
L[tecp2u_id].rin());
36 const float tecn1_rin =
std::min(
L[tecn1l_id].rin(),
L[tecn1u_id].rin());
37 const float tecn1_rout =
std::max(
L[tecn1l_id].rout(),
L[tecn1u_id].rout());
40 const float tecn2_rin =
std::min(
L[tecn2l_id].rin(),
L[tecntu_id].rin());
43 const float tec_z_extra = 0.0f;
45 const int size = in_seeds.size();
47 auto barrel_pos_check = [](
const Track &
S,
float maxR,
float rin,
float zmax) ->
bool {
48 bool inside = maxR > rin &&
S.zAtR(rin) <
zmax;
52 auto barrel_neg_check = [](
const Track &
S,
float maxR,
float rin,
float zmin) ->
bool {
53 bool inside = maxR > rin &&
S.zAtR(rin) >
zmin;
57 auto endcap_pos_check = [](
const Track &
S,
float maxR,
float rout,
float rin,
float zmin) ->
bool {
58 bool inside = maxR > rout ?
S.zAtR(rout) >
zmin : (maxR > rin &&
S.zAtR(maxR) >
zmin);
62 auto endcap_neg_check = [](
const Track &
S,
float maxR,
float rout,
float rin,
float zmax) ->
bool {
63 bool inside = maxR > rout ?
S.zAtR(rout) <
zmax : (maxR > rin &&
S.zAtR(maxR) <
zmax);
67 for (
int i = 0;
i <
size; ++
i) {
76 const bool z_dir_pos =
S.pz() > 0;
77 const float maxR =
S.maxReachRadius();
80 bool in_tec_as_brl = barrel_pos_check(
S, maxR, tecp2_rin, tecp2_zmax);
85 bool in_tec = endcap_pos_check(
S, maxR, tecp1_rout, tecp1_rin, tecp1_zmin - tec_z_extra);
94 bool in_tec_as_brl = barrel_neg_check(
S, maxR, tecn2_rin, tecn2_zmin);
99 bool in_tec = endcap_neg_check(
S, maxR, tecn1_rout, tecn1_rin, tecn1_zmax + tec_z_extra);
109 part.m_region[
i] = reg;
110 if (
part.m_phi_eta_foo)
115 [[maybe_unused]]
void partitionSeeds1debug(
const TrackerInfo &trk_info,
123 const auto &
L = trk_info;
124 const float tecp1_rin =
std::min(
L[tecp1l_id].rin(),
L[tecp1u_id].rin());
125 const float tecp1_rout =
std::max(
L[tecp1l_id].rout(),
L[tecp1u_id].rout());
128 const float tecp2_rin =
std::min(
L[tecp2l_id].rin(),
L[tecp2u_id].rin());
131 const float tecn1_rin =
std::min(
L[tecn1l_id].rin(),
L[tecn1u_id].rin());
132 const float tecn1_rout =
std::max(
L[tecn1l_id].rout(),
L[tecn1u_id].rout());
135 const float tecn2_rin =
std::min(
L[tecn2l_id].rin(),
L[tecntu_id].rin());
138 const float tec_z_extra = 0.0f;
140 const int size = in_seeds.size();
142 auto barrel_pos_check = [](
const Track &
S,
float maxR,
float rin,
float zmax,
const char *det) ->
bool {
143 bool inside = maxR > rin &&
S.zAtR(rin) <
zmax;
145 printf(
" in_%s=%d maxR=%7.3f, rin=%7.3f -- ", det, inside, maxR, rin);
147 printf(
"maxR > rin: S.zAtR(rin) < zmax -- %.3f <? %.3f\n",
S.zAtR(rin),
zmax);
149 printf(
"maxR < rin: no pie.\n");
155 auto barrel_neg_check = [](
const Track &
S,
float maxR,
float rin,
float zmin,
const char *det) ->
bool {
156 bool inside = maxR > rin &&
S.zAtR(rin) >
zmin;
158 printf(
" in_%s=%d maxR=%7.3f, rin=%7.3f -- ", det, inside, maxR, rin);
160 printf(
"maxR > rin: S.zAtR(rin) > zmin -- %.3f >? %.3f\n",
S.zAtR(rin),
zmin);
162 printf(
"maxR < rin: no pie.\n");
168 auto endcap_pos_check = [](
const Track &
S,
float maxR,
float rout,
float rin,
float zmin,
const char *det) ->
bool {
169 bool inside = maxR > rout ?
S.zAtR(rout) >
zmin : (maxR > rin &&
S.zAtR(maxR) >
zmin);
171 printf(
" in_%s=%d maxR=%7.3f, rout=%7.3f, rin=%7.3f -- ", det, inside, maxR, rout, rin);
173 printf(
"maxR > rout: S.zAtR(rout) > zmin -- %.3f >? %.3f\n",
S.zAtR(rout),
zmin);
174 }
else if (maxR > rin) {
175 printf(
"maxR > rin: S.zAtR(maxR) > zmin) -- %.3f >? %.3f\n",
S.zAtR(maxR),
zmin);
177 printf(
"maxR < rin: no pie.\n");
183 auto endcap_neg_check = [](
const Track &
S,
float maxR,
float rout,
float rin,
float zmax,
const char *det) ->
bool {
184 bool inside = maxR > rout ?
S.zAtR(rout) <
zmax : (maxR > rin &&
S.zAtR(maxR) <
zmax);
186 printf(
" in_%s=%d maxR=%7.3f, rout=%7.3f, rin=%7.3f -- ", det, inside, maxR, rout, rin);
188 printf(
"maxR > rout: S.zAtR(rout) < zmax -- %.3f <? %.3f\n",
S.zAtR(rout),
zmax);
189 }
else if (maxR > rin) {
190 printf(
"maxR > rin: S.zAtR(maxR) < zmax -- %.3f <? %.3f\n",
S.zAtR(maxR),
zmax);
192 printf(
"maxR < rin: no pie.\n");
198 for (
int i = 0;
i <
size; ++
i) {
208 const bool z_dir_pos =
S.pz() > 0;
209 const float maxR =
S.maxReachRadius();
211 printf(
"partitionSeeds1debug seed index %d, z_dir_pos=%d (pz=%.3f), maxR=%.3f\n",
i, z_dir_pos,
S.pz(), maxR);
214 bool in_tec_as_brl = barrel_pos_check(
S, maxR, tecp2_rin, tecp2_zmax,
"TECasBarrelp");
216 if (!in_tec_as_brl) {
218 printf(
" --> region = %d, endcap pos\n", reg);
220 bool in_tec = endcap_pos_check(
S, maxR, tecp1_rout, tecp1_rin, tecp1_zmin - tec_z_extra,
"TECp");
224 printf(
" --> region = %d, barrel\n", reg);
227 printf(
" --> region = %d, transition pos\n", reg);
231 bool in_tec_as_brl = barrel_neg_check(
S, maxR, tecn2_rin, tecn2_zmin,
"TECasBarreln");
233 if (!in_tec_as_brl) {
235 printf(
" --> region = %d, endcap neg\n", reg);
237 bool in_tec = endcap_neg_check(
S, maxR, tecn1_rout, tecn1_rin, tecn1_zmax + tec_z_extra,
"TECn");
241 printf(
" --> region = %d, barrel\n", reg);
244 printf(
" --> region = %d, transition neg\n", reg);
249 part.m_region[
i] = reg;
250 if (
part.m_phi_eta_foo)
256 register_seed_partitioners() {
static void register_seed_partitioner(const std::string &name, partition_seeds_func func)
std::vector< Track > TrackVec