17 const std::map<int, int>& seg_to_hit,
18 const std::vector<track_t>&
tracks,
19 const bool& displaced_en,
34 const auto& site_seg_id =
track.site_segs[
i];
35 const auto& site_bit =
track.site_mask[
i];
36 const auto& site_rm_bit =
track.site_rm_mask[
i];
46 if ((site_bit == 1) || (site_rm_bit == 1)) {
47 hit_id = seg_to_hit.at(site_seg_id);
51 site_hits.push_back(hit_id);
52 site_segs.push_back(site_seg_id);
53 site_mask.push_back(site_bit);
54 site_rm_mask.push_back(site_rm_bit);
58 if (!
track.valid && hit_count == 0) {
66 model_features.push_back(
track.features[
i]);
74 auto& out_trk = out_tracks.emplace_back();
76 out_trk.setEndcap(endcap_pm);
79 out_trk.setUnconstrained(displaced_en ?
true :
false);
80 out_trk.setValid(
track.valid);
82 out_trk.setModelPtAddress(
track.pt_address);
83 out_trk.setModelRelsAddress(
track.rels_address);
84 out_trk.setModelDxyAddress(
track.dxy_address);
85 out_trk.setModelPattern(
track.pattern);
86 out_trk.setModelQual(
track.quality);
87 out_trk.setModelPhi(
track.phi);
88 out_trk.setModelEta(
track.theta);
89 out_trk.setModelFeatures(model_features);
91 out_trk.setEmtfQ(
track.q);
92 out_trk.setEmtfPt(
track.pt);
93 out_trk.setEmtfRels(
track.rels);
96 out_trk.setEmtfBeta(0);
97 out_trk.setEmtfModeV1(emtf_mode_v1);
98 out_trk.setEmtfModeV2(emtf_mode_v2);
100 out_trk.setSiteHits(site_hits);
101 out_trk.setSiteSegs(site_segs);
102 out_trk.setSiteMask(site_mask);
103 out_trk.setSiteRMMask(site_rm_mask);
166 int cnt_ye11 =
x[0] +
x[9];
167 int cnt_ye12 =
x[1] +
x[5];
168 int cnt_ye22 =
x[2] +
x[10] +
x[6];
169 int cnt_ye23 =
x[3] +
x[7];
170 int cnt_ye24 =
x[4] +
x[8];
171 int cnt_ye2a = (cnt_ye22 != 0) + (cnt_ye23 != 0) + (cnt_ye24 != 0);
172 int cnt_ye2b = (cnt_ye23 != 0) + (cnt_ye24 != 0);
175 int cnt_me14 =
x[11];
176 int cnt_me2a = (
x[2] != 0) + (
x[3] != 0) + (
x[4] != 0);
180 bool rule_a_i = (cnt_me12 != 0) and (cnt_me2a >= 1);
181 bool rule_a_ii = (cnt_ye12 != 0) and (cnt_me2a >= 1) and (cnt_ye2a >= 2);
182 bool rule_b_i = (cnt_me11 != 0) and (cnt_me2a >= 1) and (cnt_ye2a >= 2);
183 bool rule_b_ii = (cnt_ye11 != 0) and (cnt_me2a >= 2);
184 bool rule_c_i = (cnt_me14 != 0) and (cnt_me11 != 0) and (cnt_ye2b >= 1);
185 bool rule_c_ii = (cnt_me14 != 0) and (cnt_me2a >= 1) and (cnt_ye2a >= 2);
187 if (rule_a_i
or rule_a_ii
or rule_b_i
or rule_b_ii
or rule_c_i
or rule_c_ii) {
194 if (
mode < (1 << 3)) {
195 bool rule_a_i = (cnt_me12 != 0) and (cnt_ye2a >= 1);
196 bool rule_a_ii = (cnt_me11 != 0) and (cnt_ye2a >= 1);
197 bool rule_b_i = (cnt_ye12 != 0) and (cnt_me2a >= 1);
198 bool rule_b_ii = (cnt_ye11 != 0) and (cnt_me2a >= 1);
199 bool rule_c_i = (cnt_me14 != 0) and (cnt_me11 != 0) and (cnt_ye2a >= 1);
200 bool rule_c_ii = (cnt_me14 != 0) and (cnt_me2a >= 1);
202 if (rule_a_i
or rule_a_ii
or rule_b_i
or rule_b_ii
or rule_c_i
or rule_c_ii) {
208 if (
mode < (1 << 2)) {
209 bool rule_a_i = (cnt_me12 != 0) and (cnt_ye2a >= 1);
210 bool rule_a_ii = (cnt_me11 != 0) and (cnt_ye2a >= 1);
211 bool rule_b_i = (cnt_ye12 != 0) and (cnt_me2a >= 1);
212 bool rule_b_ii = (cnt_ye11 != 0) and (cnt_me2a >= 1);
213 bool rule_c_i = (cnt_me14 != 0) and (cnt_me11 != 0) and (cnt_ye2a >= 1);
214 bool rule_c_ii = (cnt_me14 != 0) and (cnt_me2a >= 1);
215 bool rule_d = (cnt_me2a >= 2);
217 if (rule_a_i
or rule_a_ii
or rule_b_i
or rule_b_ii
or rule_c_i
or rule_c_ii
or rule_d) {
std::vector< int16_t > features_t
l1t::phase2::EMTFTrackCollection EMTFTrackCollection
constexpr int kNumTrackFeatures
int findEMTFModeV2(const track_t::site_mask_t &) const
int findEMTFModeV1(const track_t::site_mask_t &) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< uint8_t > site_mask_t
Abs< T >::type abs(const T &t)
std::vector< uint16_t > site_segs_t
std::vector< uint16_t > site_hits_t
constexpr int kNumTrackSites
OutputLayer(const EMTFContext &)
void apply(const int &, const int &, const int &, const std::map< int, int > &, const std::vector< track_t > &, const bool &, EMTFTrackCollection &) const
std::array< trk_site_bit_t, v3::kNumTrackSites > site_mask_t