56 virtual void endJob();
60 std::vector<l1tmetemu::global_phi_t>
cosLUT_;
82 bool cordicDebug_ =
false;
84 bool GTTinput_ =
false;
115 maxZ0_ = l1tmetemu::digitizeSignedValue<l1tmetemu::z_t>(
117 minZ0_ = (1 << TTTrack_TrackWord::TrackBitWidths::kZ0Size) -
maxZ0_;
119 maxEta_ = l1tmetemu::digitizeSignedValue<l1tmetemu::eta_t>(
128 minPt_ = l1tmetemu::digitizeSignedValue<l1tmetemu::pt_t>(
157 std::unique_ptr<std::vector<l1t::EtSum>>
METCollection(
new std::vector<l1t::EtSum>(0));
168 if (!L1VertexHandle.
isValid()) {
169 LogError(
"L1TrackerEtMissEmulatorProducer") <<
"\nWarning: VertexCollection not found in the event. Exit\n";
173 if (!L1TTTrackHandle.
isValid()) {
174 LogError(
"L1TrackerEtMissEmulatorProducer") <<
"\nWarning: L1TTTrackCollection not found in the event. Exit\n";
180 l1tmetemu::Et_t sumPx[
l1tmetemu::kNSector * 2] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
181 l1tmetemu::Et_t sumPy[
l1tmetemu::kNSector * 2] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
186 int num_assoc_tracks{0};
187 int num_quality_tracks{0};
192 for (
const auto&
track : *L1TTTrackHandle) {
228 num_quality_tracks++;
248 <<
"Track to Vertex ID: " << num_tracks <<
"\n" 249 <<
"Phi Sector: " << EtTrack.
Sector <<
" pT: " << EtTrack.
pt <<
" Phi: " << EtTrack.
globalPhi 250 <<
" TanL: " << EtTrack.
eta <<
" Z0: " << EtTrack.
z0 <<
" Nstub: " << EtTrack.
nstubs 252 <<
" bendChi2: " << EtTrack.
bendChi2 <<
" PV: " << EtTrack.
pV <<
"\n" 253 <<
"--------------------------------------------------------------\n";
258 <<
"========================Phi debug=================================\n" 259 <<
"Int pT: " << EtTrack.
pt <<
"\n" 260 <<
"Int Phi: " << EtTrack.
globalPhi <<
" Float Phi: " << EtTrack.
phi 261 <<
" Actual Float Cos(Phi): " <<
cos(EtTrack.
phi) <<
" Actual Float Sin(Phi): " <<
sin(EtTrack.
phi) <<
"\n";
268 sector_totals[EtTrack.
Sector] += 1;
275 <<
"Sector: " << EtTrack.
Sector <<
" Quadrant: " << 1 <<
"\n" 281 <<
" Float Sin(Phi): " 290 <<
"Sector: " << EtTrack.
Sector <<
" Quadrant: " << 2 <<
"\n" 291 <<
"Int Phi: " << EtTrack.
globalPhi <<
" Int Cos(Phi): -" 306 <<
"Sector: " << EtTrack.
Sector <<
" Quadrant: " << 3 <<
"\n" 312 <<
" Float Sin(Phi): -" 322 <<
"Sector: " << EtTrack.
Sector <<
" Quadrant: " << 4 <<
"\n" 329 <<
" Float Sin(Phi): -" 360 GlobalPx = tempsumPx;
361 GlobalPy = tempsumPy;
370 if ((GlobalPx < 0) && (GlobalPy < 0))
372 else if ((GlobalPx >= 0) && (GlobalPy >= 0))
374 else if ((GlobalPx >= 0) && (GlobalPy < 0))
376 else if ((GlobalPx < 0) && (GlobalPy >= 0))
393 totalsarray[
i] =
to_string(sector_totals[
i]) +
"|";
397 <<
"====Sector Pt====\n" 398 <<
"Float Px: " << flpxarray <<
"Float Py: " << flpyarray <<
"Integer Px: " << intpyarray
399 <<
"Integer Px: " << intpyarray <<
"Sector Totals: " << totalsarray
401 <<
"====Global Pt====\n" 402 <<
"Integer Global Px: " << GlobalPx <<
"| Integer Global Py: " << GlobalPy <<
"\n" 410 <<
"Integer MET: " << EtMiss.
Et <<
"| Integer MET phi: " << EtMiss.
Phi <<
"\n" 413 <<
"# Intial Tracks: " << num_tracks <<
"\n" 414 <<
"# Tracks after Quality Cuts: " << num_quality_tracks <<
"\n" 415 <<
"# Tracks Associated to Vertex: " << num_assoc_tracks <<
"\n" 416 <<
"========================================================\n";
const unsigned int kGlobalPhiBins
Log< level::Info, true > LogVerbatim
static constexpr std::array< double, 1<< TrackBitWidths::kChi2RPhiSize > chi2RPhiBins
std::vector< eta_t > generateEtaRegionLUT(std::vector< double > EtaRegions)
ap_uint< kMETPhiSize > METphi_t
T getParameter(std::string const &) const
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
~L1TrackerEtMissEmulatorProducer() override
TTTrack_TrackWord::chi2rphi_t chi2rphidof
std::vector< l1tmetemu::global_phi_t > phiQuadrants_
#define DEFINE_FWK_MODULE(type)
Sin< T >::type sin(const T &t)
int unpackSignedValue(unsigned int bits, unsigned int nBits)
std::vector< l1tmetemu::z_t > DeltaZLUT_
ap_uint< kInternalVTXWidth > z_t
std::string to_string(const V &value)
std::vector< z_t > generateDeltaZLUT(std::vector< double > DeltaZBins)
TTTrack_TrackWord::chi2rphi_t chi2rphiMax_
std::vector< l1tmetemu::eta_t > EtaRegionsLUT_
EtMiss cordicSqrt(Et_t x, Et_t y, int cordicSteps, std::vector< l1tmhtemu::MHTphi_t > atanLUT, std::vector< Et_t > magNormalisationLUT)
const unsigned int kNEtaRegion
static constexpr std::array< double, 1<< TrackBitWidths::kBendChi2Size > bendChi2Bins
Log< level::Error, false > LogError
std::vector< reco::MET > METCollection
collection of MET objects
TTTrack_TrackWord::chi2rz_t chi2rzdof
const edm::EDGetTokenT< L1VertexCollectionType > pvToken_
const unsigned int kNSector
const unsigned int kInternalVTXWidth
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
L1TkEtMissEmuTrackTransform TrackTransform
const edm::EDGetTokenT< L1TTTrackCollectionType > trackToken_
void addDefault(ParameterSetDescription const &psetDescription)
void produce(edm::Event &, const edm::EventSetup &) override
vector< double > z0Thresholds_
L1TrackerEtMissEmulatorProducer(const edm::ParameterSet &)
TTTrack_TrackWord::chi2rz_t chi2rzMax_
Cos< T >::type cos(const T &t)
const unsigned int kMETPhiBins
Abs< T >::type abs(const T &t)
const unsigned int kMETSize
std::vector< VertexWord > VertexWordCollection
ap_uint< kInternalEtaWidth > eta_t
ap_uint< TrackBitWidths::kChi2RZSize > chi2rz_t
l1t::VertexWordCollection L1VertexCollectionType
const unsigned int kInternalPtWidth
std::vector< l1tmetemu::global_phi_t > phiShifts_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
l1tmetemu::nstub_t nstubs
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Class to store the L1 Track Trigger tracks.
unsigned int getBin(double value, const T &bins)
std::vector< global_phi_t > generateCosLUT(unsigned int size)
l1t::VertexWord L1VertexType
l1tmetemu::global_phi_t globalPhi
const float kMaxCosLUTPhi
std::vector< l1tmetemu::global_phi_t > cosLUT_
TTTrack_TrackWord::bendChi2_t bendChi2
const unsigned int kInternalEtaWidth
static constexpr std::array< double, 1<< TrackBitWidths::kChi2RZSize > chi2RZBins
TTTrack_TrackWord::bendChi2_t bendChi2Max_
std::string L1MetCollectionName_
std::vector< L1TTTrackType > L1TTTrackCollectionType
l1tmetemu::nstub_t nStubsmin_
ap_uint< TrackBitWidths::kChi2RPhiSize > chi2rphi_t
vector< double > etaRegions_
ap_uint< kInternalPtWidth > pt_t
ap_int< kInternalPtWidth+kEtExtra > Et_t
ap_uint< TrackBitWidths::kBendChi2Size > bendChi2_t