37 EMTFTrackCollection::iterator best_tracks_it = best_tracks.begin();
38 EMTFTrackCollection::iterator best_tracks_end = best_tracks.end();
40 for (; best_tracks_it != best_tracks_end; ++best_tracks_it) {
59 bool use_ones_complem_gmt_eta =
true;
60 if (use_ones_complem_gmt_eta) {
61 gmt_eta = (gmt_eta < 0) ? ~(-gmt_eta) : gmt_eta;
65 address_t address = 0;
69 if (
track.Mode() != 1) {
76 edm::LogError(
"L1T") <<
"EMTF pT assignment mismatch: xmlpt = " << xmlpt
77 <<
", pt_assign_engine_->calculate_pt(track)) = "
81 pt = (xmlpt < 0.) ? 1. : xmlpt;
88 gmt_pt = 10 - (
abs(gmt_eta) / 32);
91 pt = (gmt_pt <= 0) ? 0 : (gmt_pt - 1) * 0.5;
94 if (
track.Mode() != 1) {
97 gmt_quality =
track.Hits().front().Pattern() / 4;
100 std::pair<int, int> gmt_charge = std::make_pair(0, 0);
101 if (
track.Mode() != 1) {
102 std::vector<int> phidiffs;
109 int CLCT =
track.Hits().front().Pattern();
112 gmt_charge = std::make_pair((CLCT % 2) == 0 ? 0 : 1, 1);
114 gmt_charge = std::make_pair((CLCT % 2) == 0 ? 1 : 0, 1);
124 track.set_PtLUT(tmp_LUT);
125 track.set_pt_XML(xmlpt);
127 track.set_charge((gmt_charge.second == 1) ? ((gmt_charge.first == 1) ? -1 : +1) : 0);
129 track.set_gmt_pt(gmt_pt);
130 track.set_gmt_phi(gmt_phi);
131 track.set_gmt_eta(gmt_eta);
132 track.set_gmt_quality(gmt_quality);
133 track.set_gmt_charge(gmt_charge.first);
134 track.set_gmt_charge_valid(gmt_charge.second);
138 bool disable_worst_track_in_same_bank =
true;
139 if (disable_worst_track_in_same_bank) {
146 unsigned rhs_addr = rhs.PtLUT().address;
147 unsigned lhs_addr_1 = (lhs_addr >> 26) & 0xF;
148 unsigned rhs_addr_1 = (rhs_addr >> 26) & 0xF;
149 unsigned lhs_addr_2 = (lhs_addr >> 2) & 0xF;
150 unsigned rhs_addr_2 = (rhs_addr >> 2) & 0xF;
151 return (lhs_addr_1 == rhs_addr_1) && (lhs_addr_2 == rhs_addr_2);
155 if (best_tracks.size() == 3) {
156 bool same_bank = is_in_same_bank(best_tracks.at(0), best_tracks.at(2)) ||
157 is_in_same_bank(best_tracks.at(1), best_tracks.at(2));
160 best_tracks.at(2).set_pt(0);
161 best_tracks.at(2).set_gmt_pt(0);
167 for (
const auto&
track : best_tracks) {
169 <<
" GMT pt: " <<
track.GMT_pt() <<
" pt: " <<
track.Pt() <<
" mode: " <<
track.Mode()
170 <<
" GMT charge: " <<
track.GMT_charge() <<
" quality: " <<
track.GMT_quality()
171 <<
" eta: " <<
track.GMT_eta() <<
" phi: " <<
track.GMT_phi() << std::endl;