15 using namespace mkfit;
17 [[maybe_unused]]
void partitionSeeds0(
const TrackerInfo &trk_info,
21 const size_t size = in_seeds.size();
23 for (
size_t i = 0;
i <
size; ++
i) {
26 const bool z_dir_pos = S.
pz() > 0;
29 const float eta = eoh[hot.layer].refHit(hot.index).eta();
35 constexpr
float maxEta_regSort = 7.0;
40 constexpr
int tib1_id = 4;
41 constexpr
int tob1_id = 10;
42 constexpr
int tecp1_id = 27;
43 constexpr
int tecn1_id = 54;
51 const LayerInfo &tec_first = z_dir_pos ? tecp1 : tecn1;
58 bool misses_first_tec;
59 if (can_reach_outer_brl) {
60 z_at_outer_brl = S.
zAtR(outer_brl.
rout());
62 misses_first_tec = z_at_outer_brl < tec_first.
zmin();
64 misses_first_tec = z_at_outer_brl > tec_first.
zmax();
66 z_at_maxr = S.
zAtR(maxR);
68 misses_first_tec = z_at_maxr < tec_first.
zmin();
70 misses_first_tec = z_at_maxr > tec_first.
zmax();
73 if (misses_first_tec) {
92 [[maybe_unused]]
void partitionSeeds1(
const TrackerInfo &trk_info,
97 constexpr
int tib1_id = 4;
98 constexpr
int tob1_id = 10;
99 constexpr
int tidp1_id = 21;
100 constexpr
int tidn1_id = 48;
101 constexpr
int tecp1_id = 27;
102 constexpr
int tecn1_id = 54;
115 const auto &
L = trk_info;
116 const float tidp_rin =
std::min(
L[tidp1_id].rin(),
L[tidp1_id + 1].rin());
117 const float tidp_rout =
std::max(
L[tidp1_id].rout(),
L[tidp1_id + 1].rout());
118 const float tecp_rin =
std::min(
L[tecp1_id].rin(),
L[tecp1_id + 1].rin());
119 const float tecp_rout =
std::max(
L[tecp1_id].rout(),
L[tecp1_id + 1].rout());
120 const float tidn_rin =
std::min(
L[tidn1_id].rin(),
L[tidn1_id + 1].rin());
121 const float tidn_rout =
std::max(
L[tidn1_id].rout(),
L[tidn1_id + 1].rout());
122 const float tecn_rin =
std::min(
L[tecn1_id].rin(),
L[tecn1_id + 1].rin());
123 const float tecn_rout =
std::max(
L[tecn1_id].rout(),
L[tecn1_id + 1].rout());
127 const float tid_z_extra = 0.0f;
128 const float tec_z_extra = 0.0f;
130 const size_t size = in_seeds.size();
132 auto barrel_pos_check = [](
const Track &S,
float maxR,
float rin,
float zmax) ->
bool {
133 bool inside = maxR > rin && S.
zAtR(rin) < zmax;
137 auto barrel_neg_check = [](
const Track &S,
float maxR,
float rin,
float zmin) ->
bool {
138 bool inside = maxR > rin && S.
zAtR(rin) > zmin;
142 auto endcap_pos_check = [](
const Track &S,
float maxR,
float rout,
float rin,
float zmin) ->
bool {
143 bool inside = maxR > rout ? S.
zAtR(rout) > zmin : (maxR > rin && S.
zAtR(maxR) > zmin);
147 auto endcap_neg_check = [](
const Track &S,
float maxR,
float rout,
float rin,
float zmax) ->
bool {
148 bool inside = maxR > rout ? S.
zAtR(rout) < zmax : (maxR > rin && S.
zAtR(maxR) < zmax);
152 for (
size_t i = 0;
i <
size; ++
i) {
153 const Track &S = in_seeds[
i];
156 const float eta = eoh[hot.layer].refHit(hot.index).eta();
162 constexpr
float maxEta_regSort = 7.0;
164 const bool z_dir_pos = S.
pz() > 0;
168 const bool in_tib = barrel_pos_check(S, maxR, tib1.
rin(), tib1.
zmax());
169 const bool in_tob = barrel_pos_check(S, maxR, tob1.
rin(), tob1.
zmax());
171 if (!in_tib && !in_tob) {
174 const bool in_tid = endcap_pos_check(S, maxR, tidp_rout, tidp_rin, tidp1.
zmin() - tid_z_extra);
175 const bool in_tec = endcap_pos_check(S, maxR, tecp_rout, tecp_rin, tecp1.
zmin() - tec_z_extra);
177 if (!in_tid && !in_tec) {
184 const bool in_tib = barrel_neg_check(S, maxR, tib1.
rin(), tib1.
zmin());
185 const bool in_tob = barrel_neg_check(S, maxR, tob1.
rin(), tob1.
zmin());
187 if (!in_tib && !in_tob) {
190 const bool in_tid = endcap_neg_check(S, maxR, tidn_rout, tidn_rin, tidn1.
zmax() + tid_z_extra);
191 const bool in_tec = endcap_neg_check(S, maxR, tecn_rout, tecn_rin, tecn1.
zmax() + tec_z_extra);
193 if (!in_tid && !in_tec) {
229 desc.
add<
std::string>(
"ComponentName")->setComment(
"Product label");
230 desc.
add<
edm::FileInPath>(
"config")->setComment(
"Path to the JSON file for the mkFit configuration parameters");
238 it_conf->m_partition_seeds = partitionSeeds1;
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const std::string configFile_
bool is_within_z_limits(float z) const
const LayerInfo & layer(int l) const
std::unique_ptr< mkfit::IterationConfig > produce(const TrackerRecoGeometryRecord &iRecord)
float zAtR(float R, float *r_reached=nullptr) const
bool canReachRadius(float R) const
const LayerInfo & outer_barrel_layer() const
HitOnTrack getLastHitOnTrack() const
std::vector< int > m_region
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< float > m_sort_score
std::vector< Track > TrackVec
const edm::ESGetToken< MkFitGeometry, TrackerRecoGeometryRecord > geomToken_
std::unique_ptr< IterationConfig > load_File(const std::string &fname)
T getParameter(std::string const &) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
float maxReachRadius() const
tuple size
Write out results.
MkFitIterationConfigESProducer(const edm::ParameterSet &iConfig)