105 std::unique_ptr<std::vector<l1t::EtSum>>
MHTCollection(
new std::vector<l1t::EtSum>(0));
110 std::vector<TkJetWord>::const_iterator jetIter;
113 LogError(
"TkHTMissEmulatorProducer") <<
"\nWarning: TkJetCollection not found in the event. Exit\n";
118 LogError(
"TkHTMissEmulatorProducer") <<
"\nWarning: TkJetExtendedCollection not found in the event. Exit\n";
134 for (jetIter = L1TkJetsHandle->begin(); jetIter != L1TkJetsHandle->end(); ++jetIter) {
136 float tmp_jet_px_ = jetIter->pt() *
cos(jetIter->glbphi());
137 float tmp_jet_py_ = jetIter->pt() *
sin(jetIter->glbphi());
139 float tmp_jet_pt_ = jetIter->pt();
143 l1tmhtemu::eta_t tmp_jet_eta = l1tmhtemu::digitizeSignedValue<l1tmhtemu::eta_t>(
145 l1tmhtemu::phi_t tmp_jet_phi = l1tmhtemu::digitizeSignedValue<l1tmhtemu::phi_t>(
152 if (tmp_jet_phi >= 0) {
153 tmp_jet_cos_phi =
cosLUT_[tmp_jet_phi];
161 tmp_jet_cos_phi =
cosLUT_[-1 * tmp_jet_phi];
163 if (
cosLUTbins / 2 + 1 - (-1 * tmp_jet_phi) >= 0)
176 <<
"****JET EMULATION" << jetn <<
"****\n" 177 <<
"FLOATS ORIGINAL\n" 178 <<
"PT: " << jetIter->pt() <<
"| ETA: " << jetIter->glbeta() <<
"| PHI: " << jetIter->glbphi()
179 <<
"| NTRACKS: " << jetIter->nt() <<
"| COS(PHI): " <<
cos(jetIter->glbphi())
180 <<
"| SIN(PHI): " <<
sin(jetIter->glbphi()) <<
"| Px: " << jetIter->pt() *
cos(jetIter->glbphi())
181 <<
"| Py: " << jetIter->pt() *
sin(jetIter->glbphi()) <<
"\n" 183 <<
"PT: " << jetIter->ptWord() <<
"| ETA: " << jetIter->glbEtaWord() <<
"| PHI: " << jetIter->glbPhiWord()
184 <<
"| NTRACKS: " << jetIter->ntWord() <<
"\n" 186 <<
"PT: " << tmp_jet_pt <<
"| ETA: " << tmp_jet_eta <<
"| PHI: " << tmp_jet_phi <<
"| NTRACKS: " << tmp_jet_nt
187 <<
"| COS(PHI): " << tmp_jet_cos_phi <<
"| SIN(PHI): " << tmp_jet_sin_phi <<
"| Px: " << tmp_jet_px
188 <<
"| Py: " << tmp_jet_py <<
"\n" 189 <<
"AP_INTS NEW TO FLOATS\n" 196 <<
"-------------------------------------------------------------------------\n";
203 if (tmp_jet_nt < minNtracksLowPt_ && tmp_jet_pt > 200)
205 if (tmp_jet_nt < minNtracksHighPt_ && tmp_jet_pt > 400)
209 sumPx_ += tmp_jet_px_;
210 sumPy_ += tmp_jet_py_;
214 sumPx += tmp_jet_pt * tmp_jet_cos_phi;
215 sumPy += tmp_jet_pt * tmp_jet_sin_phi;
229 if ((sumPx < 0) && (sumPy < 0))
231 else if ((sumPx >= 0) && (sumPy >= 0))
233 else if ((sumPx >= 0) && (sumPy < 0))
235 else if ((sumPx < 0) && (sumPy >= 0))
240 <<
"-------------------------------------------------------------------------\n" 241 <<
"====MHT FLOATS====\n" 242 <<
"sumPx: " << sumPx_ <<
"| sumPy: " << sumPy_ <<
"| ET: " <<
sqrt(sumPx_ * sumPx_ + sumPy_ * sumPy_)
243 <<
"| HT: " << HT_ <<
"| PHI: " << atan2(sumPy_, sumPx_) <<
"\n" 244 <<
"====MHT AP_INTS====\n" 245 <<
"sumPx: " << sumPx <<
"| sumPy: " << sumPy <<
"| ET: " << EtMiss.
Et <<
"| HT: " <<
HT <<
"| PHI: " <<
phi 247 <<
"====MHT AP_INTS TO FLOATS====\n" 251 <<
"-------------------------------------------------------------------------\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