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";
133 int jetnpasscuts = 0;
135 for (jetIter = L1TkJetsHandle->begin(); jetIter != L1TkJetsHandle->end(); ++jetIter) {
137 float tmp_jet_px_ = jetIter->pt() *
cos(jetIter->glbphi());
138 float tmp_jet_py_ = jetIter->pt() *
sin(jetIter->glbphi());
140 float tmp_jet_pt_ = jetIter->pt();
144 l1tmhtemu::eta_t tmp_jet_eta = l1tmhtemu::digitizeSignedValue<l1tmhtemu::eta_t>(
146 l1tmhtemu::phi_t tmp_jet_phi = l1tmhtemu::digitizeSignedValue<l1tmhtemu::phi_t>(
153 if (tmp_jet_phi >= 0) {
154 tmp_jet_cos_phi =
cosLUT_[tmp_jet_phi];
162 tmp_jet_cos_phi =
cosLUT_[-1 * tmp_jet_phi];
164 if (
cosLUTbins / 2 + 1 - (-1 * tmp_jet_phi) >= 0)
177 <<
"****JET EMULATION" << jetn <<
"****\n" 178 <<
"FLOATS ORIGINAL\n" 179 <<
"PT: " << jetIter->pt() <<
"| ETA: " << jetIter->glbeta() <<
"| PHI: " << jetIter->glbphi()
180 <<
"| NTRACKS: " << jetIter->nt() <<
"| COS(PHI): " <<
cos(jetIter->glbphi())
181 <<
"| SIN(PHI): " <<
sin(jetIter->glbphi()) <<
"| Px: " << jetIter->pt() *
cos(jetIter->glbphi())
182 <<
"| Py: " << jetIter->pt() *
sin(jetIter->glbphi()) <<
"\n" 184 <<
"PT: " << jetIter->ptWord() <<
"| ETA: " << jetIter->glbEtaWord() <<
"| PHI: " << jetIter->glbPhiWord()
185 <<
"| NTRACKS: " << jetIter->ntWord() <<
"\n" 187 <<
"PT: " << tmp_jet_pt <<
"| ETA: " << tmp_jet_eta <<
"| PHI: " << tmp_jet_phi <<
"| NTRACKS: " << tmp_jet_nt
188 <<
"| COS(PHI): " << tmp_jet_cos_phi <<
"| SIN(PHI): " << tmp_jet_sin_phi <<
"| Px: " << tmp_jet_px
189 <<
"| Py: " << tmp_jet_py <<
"\n" 190 <<
"AP_INTS NEW TO FLOATS\n" 197 <<
"-------------------------------------------------------------------------\n";
204 if (tmp_jet_nt < minNtracksLowPt_ && tmp_jet_pt > 200)
206 if (tmp_jet_nt < minNtracksHighPt_ && tmp_jet_pt > 400)
212 sumPx_ += tmp_jet_px_;
213 sumPy_ += tmp_jet_py_;
217 sumPx += tmp_jet_pt * tmp_jet_cos_phi;
218 sumPy += tmp_jet_pt * tmp_jet_sin_phi;
232 if ((sumPx < 0) && (sumPy < 0))
234 else if ((sumPx >= 0) && (sumPy >= 0))
236 else if ((sumPx >= 0) && (sumPy < 0))
238 else if ((sumPx < 0) && (sumPy >= 0))
243 <<
"-------------------------------------------------------------------------\n" 244 <<
"====MHT FLOATS====\n" 245 <<
"sumPx: " << sumPx_ <<
"| sumPy: " << sumPy_ <<
"| ET: " <<
sqrt(sumPx_ * sumPx_ + sumPy_ * sumPy_)
246 <<
"| HT: " << HT_ <<
"| PHI: " << atan2(sumPy_, sumPx_) <<
"\n" 247 <<
"====MHT AP_INTS====\n" 248 <<
"sumPx: " << sumPx <<
"| sumPy: " << sumPy <<
"| ET: " << EtMiss.
Et <<
"| HT: " <<
HT <<
"| PHI: " <<
phi 250 <<
"====MHT AP_INTS TO FLOATS====\n" 254 <<
"-------------------------------------------------------------------------\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