23 const auto& tp_hit_id = tp_info.
hit_id;
28 const auto& tp_data =
tp.getME0Data();
33 const int tp_raw_id = tp_det_id.rawId();
35 const int tp_endcap_pm = tp_info.
endcap_pm;
36 const int tp_subsector = tp_info.
subsector;
37 const int tp_station = tp_info.
station;
38 const int tp_ring = tp_info.
ring;
39 const int tp_layer = tp_info.
layer;
42 const int tp_csc_id = tp_info.
csc_id;
46 const int tp_phiposition = tp_data.phiposition;
47 const int tp_partition = tp_data.partition;
49 const int tp_bend =
static_cast<int>(tp_data.deltaphi) * (tp_data.bend == 0 ? 1 : -1);
51 const int tp_bx = tp_info.
bx;
52 const int tp_subbx = 0;
53 const float tp_time = 0;
55 const auto tp_selection = tp_info.
selection;
57 const int tp_quality = tp_data.quality;
60 const int tp_ilink = tp_info.
ilink;
65 const float glob_theta =
tp::radToDeg(gp.theta().value());
66 const double glob_rho = gp.perp();
67 const double glob_z = gp.z();
71 const int emtf_bend = std::clamp(tp_bend / 2, -64, 63);
73 const int emtf_qual = std::clamp(tp_quality, 0, 15);
79 emtf_assert((1 <= emtf_theta) and (emtf_theta < 128));
84 const bool tp_flag_valid =
true;
89 hit.setRawDetId(tp_raw_id);
91 hit.setEndcap(tp_endcap_pm);
93 hit.setSubsector(tp_subsector);
94 hit.setStation(tp_station);
96 hit.setLayer(tp_layer);
97 hit.setChamber(tp_det_id.chamber());
99 hit.setCscId(tp_csc_id);
102 hit.setStrip(tp_phiposition);
103 hit.setStripLo(tp_phiposition);
104 hit.setStripHi(tp_phiposition);
106 hit.setWire1(tp_partition);
109 hit.setBend(tp_bend);
112 hit.setSubbx(tp_subbx);
114 hit.setQuality(tp_quality);
117 hit.setGlobPhi(glob_phi);
118 hit.setGlobTheta(glob_theta);
119 hit.setGlobPerp(glob_rho);
120 hit.setGlobZ(glob_z);
121 hit.setGlobTime(tp_time);
123 hit.setEmtfChamber(tp_ilink);
124 hit.setEmtfSegment(tp_segment_id);
125 hit.setEmtfPhi(emtf_phi);
126 hit.setEmtfBend(emtf_bend);
127 hit.setEmtfTheta1(emtf_theta);
128 hit.setEmtfTheta2(0);
129 hit.setEmtfQual1(emtf_qual);
131 hit.setEmtfSite(emtf_site);
132 hit.setEmtfHost(emtf_host);
133 hit.setEmtfZones(emtf_zones);
135 hit.setFlagNeighbor(tp_flag_neighbor);
136 hit.setFlagSubstitute(tp_flag_substitute);
137 hit.setFlagValid(tp_flag_valid);
void convert(const TriggerPrimitive &, const TPInfo &, EMTFHit &) const final
GlobalPoint getGlobalPoint(const TriggerPrimitive &) const
const EMTFContext & context_
const int & lookup(const std::tuple< int, int, int > &) const
int calcThetaInt(int, float)
GE0TPConverter(const EMTFContext &, const int &, const int &)
int calcPhiInt(int, float)
int getZones(const int &, const int &) const
float radToDeg(float rad)
const int & lookup(const std::tuple< int, int, int > &) const
GeometryTranslator geometry_translator_