107 std::unique_ptr<std::vector<l1t::EtSum>>
MHTCollection(
new std::vector<l1t::EtSum>(0));
112 std::vector<TkJetWord>::const_iterator jetIter;
115 LogError(
"TkHTMissEmulatorProducer") <<
"\nWarning: TkJetCollection not found in the event. Exit\n";
120 LogError(
"TkHTMissEmulatorProducer") <<
"\nWarning: TkJetExtendedCollection not found in the event. Exit\n";
136 for (jetIter = L1TkJetsHandle->begin(); jetIter != L1TkJetsHandle->end(); ++jetIter) {
138 float tmp_jet_px_ = jetIter->pt() *
cos(jetIter->glbphi());
139 float tmp_jet_py_ = jetIter->pt() *
sin(jetIter->glbphi());
141 float tmp_jet_pt_ = jetIter->pt();
143 bool tmp_jet_isDisplaced_ = jetIter->dispflag();
147 l1tmhtemu::eta_t tmp_jet_eta = l1tmhtemu::digitizeSignedValue<l1tmhtemu::eta_t>(
149 l1tmhtemu::phi_t tmp_jet_phi = l1tmhtemu::digitizeSignedValue<l1tmhtemu::phi_t>(
156 if (tmp_jet_phi >= 0) {
157 tmp_jet_cos_phi =
cosLUT_[tmp_jet_phi];
165 tmp_jet_cos_phi =
cosLUT_[-1 * tmp_jet_phi];
167 if (
cosLUTbins / 2 + 1 - (-1 * tmp_jet_phi) >= 0)
180 <<
"****JET EMULATION" << jetn <<
"****\n" 181 <<
"FLOATS ORIGINAL\n" 182 <<
"PT: " << jetIter->pt() <<
"| ETA: " << jetIter->glbeta() <<
"| PHI: " << jetIter->glbphi()
183 <<
"| NTRACKS: " << jetIter->nt() <<
"| COS(PHI): " <<
cos(jetIter->glbphi())
184 <<
"| SIN(PHI): " <<
sin(jetIter->glbphi()) <<
"| Px: " << jetIter->pt() *
cos(jetIter->glbphi())
185 <<
"| Py: " << jetIter->pt() *
sin(jetIter->glbphi()) <<
"\n" 187 <<
"PT: " << jetIter->ptWord() <<
"| ETA: " << jetIter->glbEtaWord() <<
"| PHI: " << jetIter->glbPhiWord()
188 <<
"| NTRACKS: " << jetIter->ntWord() <<
"\n" 190 <<
"PT: " << tmp_jet_pt <<
"| ETA: " << tmp_jet_eta <<
"| PHI: " << tmp_jet_phi <<
"| NTRACKS: " << tmp_jet_nt
191 <<
"| COS(PHI): " << tmp_jet_cos_phi <<
"| SIN(PHI): " << tmp_jet_sin_phi <<
"| Px: " << tmp_jet_px
192 <<
"| Py: " << tmp_jet_py <<
"\n" 193 <<
"AP_INTS NEW TO FLOATS\n" 200 <<
"-------------------------------------------------------------------------\n";
207 if (tmp_jet_nt < minNtracksLowPt_ && tmp_jet_pt > 200)
209 if (tmp_jet_nt < minNtracksHighPt_ && tmp_jet_pt > 400)
215 sumPx_ += tmp_jet_px_;
216 sumPy_ += tmp_jet_py_;
220 sumPx += tmp_jet_pt * tmp_jet_cos_phi;
221 sumPy += tmp_jet_pt * tmp_jet_sin_phi;
235 if ((sumPx < 0) && (sumPy < 0))
237 else if ((sumPx >= 0) && (sumPy >= 0))
239 else if ((sumPx >= 0) && (sumPy < 0))
241 else if ((sumPx < 0) && (sumPy >= 0))
246 <<
"-------------------------------------------------------------------------\n" 247 <<
"====MHT FLOATS====\n" 248 <<
"sumPx: " << sumPx_ <<
"| sumPy: " << sumPy_ <<
"| ET: " <<
sqrt(sumPx_ * sumPx_ + sumPy_ * sumPy_)
249 <<
"| HT: " << HT_ <<
"| PHI: " <<
atan2(sumPy_, sumPx_) <<
"\n" 250 <<
"====MHT AP_INTS====\n" 251 <<
"sumPx: " << sumPx <<
"| sumPy: " << sumPy <<
"| ET: " << EtMiss.
Et <<
"| HT: " <<
HT <<
"| PHI: " <<
phi 253 <<
"====MHT AP_INTS TO FLOATS====\n" 257 <<
"-------------------------------------------------------------------------\n";
std::vector< l1tmhtemu::MHTphi_t > atanLUT_
Log< level::Info, true > LogVerbatim
const edm::EDGetTokenT< TkJetWordCollection > jetToken_
Sin< T >::type sin(const T &t)
ap_uint< kMHTPhiSize > MHTphi_t
EtMiss cordicSqrt(Et_t x, Et_t y, int cordicSteps, std::vector< l1tmhtemu::MHTphi_t > atanLUT, std::vector< Et_t > magNormalisationLUT)
Log< level::Error, false > LogError
const unsigned int kInternalPhiWidth
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
ap_uint< kInternalPtWidth > pt_t
std::vector< l1tmhtemu::Et_t > magNormalisationLUT_
ap_ufixed< kMHTSize, kMHTIntSize > MHT_t
l1tmhtemu::eta_t jetMaxEta_
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
Cos< T >::type cos(const T &t)
std::vector< pat::MHT > MHTCollection
l1tmhtemu::pt_t jetMinPt_
const unsigned int kInternalPtWidth
ap_int< kInternalEtaWidth > eta_t
const unsigned int kInternalEtaWidth
std::vector< l1tmhtemu::phi_t > cosLUT_
const unsigned int kMHTPhiBins
std::string L1MHTCollectionName_
ap_int< kInternalPhiWidth > phi_t
MPlex< T, D1, D2, N > atan2(const MPlex< T, D1, D2, N > &y, const MPlex< T, D1, D2, N > &x)