CMS 3D CMS Logo

L1TCtL2EgProducer.cc
Go to the documentation of this file.
6 
12 
15 //#include "L1Trigger/Phase2L1ParticleFlow/src/newfirmware/egamma/l2egsorter_ref.cpp"
17 //#include "L1Trigger/Phase2L1ParticleFlow/src/newfirmware/egamma/l2egencoder_ref.cpp"
18 
21 
22 #include <iostream>
23 #include <vector>
24 
25 using namespace l1ct;
26 
28 public:
29  explicit L1TCtL2EgProducer(const edm::ParameterSet &);
30  ~L1TCtL2EgProducer() override;
31 
32 private:
33  ap_uint<64> encodeLayer1(const EGIsoObjEmu &egiso) const;
34  ap_uint<128> encodeLayer1(const EGIsoEleObjEmu &egiso) const;
35 
36  std::vector<ap_uint<64>> encodeLayer1(const std::vector<EGIsoObjEmu> &photons) const;
37  std::vector<ap_uint<64>> encodeLayer1(const std::vector<EGIsoEleObjEmu> &electrons) const;
38 
39  std::vector<ap_uint<64>> encodeLayer1EgObjs(unsigned int nObj,
40  const std::vector<EGIsoObjEmu> &photons,
41  const std::vector<EGIsoEleObjEmu> &electrons) const;
42 
43  void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override;
44 
45  void endJob() override;
46 
47  struct RefRemapper {
49 
51  std::map<edm::Ref<BXVector<l1t::EGamma>>, edm::Ref<BXVector<l1t::EGamma>>> old2newRefMap;
52  std::vector<std::pair<edm::Ref<l1t::EGammaBxCollection>, edm::Ptr<L1TTTrackType>>> origRefAndPtr;
53  };
54 
55  void convertToEmu(const l1t::TkElectron &tkele, RefRemapper &refRemapper, l1ct::OutputBoard &boarOut) const;
56  void convertToEmu(const l1t::TkEm &tkele, RefRemapper &refRemapper, l1ct::OutputBoard &boarOut) const;
57 
58  template <class T>
60  public:
61  typedef std::vector<std::pair<edm::EDGetTokenT<T>, std::vector<int>>> InputTokenAndChannels;
62  PFInstanceInputs(L1TCtL2EgProducer *prod, const std::vector<edm::ParameterSet> &confs) {
63  for (const auto &conf : confs) {
64  const auto &producer_tag = conf.getParameter<edm::InputTag>("pfProducer");
65  tokensAndChannels_.push_back(std::make_pair(
66  prod->consumes<T>(edm::InputTag(producer_tag.label(), producer_tag.instance(), producer_tag.process())),
67  conf.getParameter<std::vector<int>>("channels")));
68  }
69  }
70 
71  const InputTokenAndChannels &tokensAndChannels() const { return tokensAndChannels_; }
72 
73  private:
75  };
76 
77  class PatternWriter {
78  public:
79  PatternWriter(const edm::ParameterSet &conf) : dataWriter_(nullptr) {
80  unsigned int nFramesPerBX = conf.getParameter<uint32_t>("nFramesPerBX");
81 
82  std::map<l1t::demo::LinkId, std::pair<l1t::demo::ChannelSpec, std::vector<size_t>>> channelSpecs;
83 
84  for (const auto &channelConf : conf.getParameter<std::vector<edm::ParameterSet>>("channels")) {
85  unsigned int inTMUX = channelConf.getParameter<uint32_t>("TMUX");
86  unsigned int eventGap =
87  inTMUX * nFramesPerBX - channelConf.getParameter<uint32_t>("nWords"); // assuming 96bit (= 3/2 word)
88  // words = TMUX*9-2*3/2*words
89  std::vector<uint32_t> chns = channelConf.getParameter<std::vector<uint32_t>>("channels");
90  channelSpecs[l1t::demo::LinkId{channelConf.getParameter<std::string>("interface"),
91  channelConf.getParameter<uint32_t>("id")}] =
92  std::make_pair(l1t::demo::ChannelSpec{inTMUX, eventGap},
93  std::vector<size_t>(std::begin(chns), std::end(chns)));
94  }
95 
96  dataWriter_ = std::make_unique<l1t::demo::BoardDataWriter>(
98  conf.getParameter<std::string>("outputFilename"),
100  conf.getParameter<uint32_t>("TMUX"),
101  conf.getParameter<uint32_t>("maxLinesPerFile"),
102  channelSpecs);
103  }
104 
105  void addEvent(const l1t::demo::EventData &eventData) { dataWriter_->addEvent(eventData); }
106 
107  void flush() { dataWriter_->flush(); }
108 
109  private:
110  std::unique_ptr<l1t::demo::BoardDataWriter> dataWriter_;
111  };
112 
113  template <class TT, class T>
116  RefRemapper &refRemapper,
117  std::unique_ptr<TT> &out) const {
119  for (const auto &tokenAndChannel : instance.tokensAndChannels()) {
120  iEvent.getByToken(tokenAndChannel.first, handle);
121  populate(out, handle, tokenAndChannel.second, refRemapper);
122  }
123  remapRefs(iEvent, out, refRemapper);
124  }
125 
126  template <class TT>
127  void remapRefs(edm::Event &iEvent, std::unique_ptr<TT> &out, RefRemapper &refRemapper) const {}
128 
130  edm::RefProd<BXVector<l1t::EGamma>> ref_egs = iEvent.getRefBeforePut<BXVector<l1t::EGamma>>(tkEGInstanceLabel_);
131  edm::Ref<BXVector<l1t::EGamma>>::key_type idx = 0;
132  for (std::size_t ix = 0; ix < out->size(); ix++) {
133  refRemapper.old2newRefMap[refRemapper.oldRefs[ix]] = edm::Ref<BXVector<l1t::EGamma>>(ref_egs, idx++);
134  }
135  }
136 
137  template <class TT, class T>
138  void populate(std::unique_ptr<T> &out,
139  const edm::Handle<TT> &in,
140  const std::vector<int> &links,
141  RefRemapper &refRemapper) const {
142  assert(links.size() == in->nRegions());
143  for (unsigned int iBoard = 0, nBoard = in->nRegions(); iBoard < nBoard; ++iBoard) {
144  auto region = in->region(iBoard);
145  int linkID = links[iBoard];
146  if (linkID < 0)
147  continue;
148  // std::cout << "Board eta: " << in->eta(iBoard) << " phi: " << in->phi(iBoard) << " link: " << linkID << std::endl;
149  for (const auto &obj : region) {
150  convertToEmu(obj, refRemapper, out->at(linkID));
151  }
152  }
153  }
154 
157  const std::vector<int> &links,
158  RefRemapper &refRemapper) const {
159  edm::Ref<BXVector<l1t::EGamma>>::key_type idx = 0;
160  for (int bx = in->getFirstBX(); bx <= in->getLastBX(); bx++) {
161  for (auto egee_itr = in->begin(bx); egee_itr != in->end(bx); egee_itr++) {
162  out->push_back(bx, *egee_itr);
163  // this to ensure that the old ref and the new object have the same
164  // index in the BXVector collection so that we can still match them no
165  // matter which BX we will insert next
167  }
168  }
169  }
170 
171  template <class Tout, class Tin>
173  const RefRemapper &refRemapper,
174  const std::string &label,
175  const std::vector<Tin> emulated) const {
176  auto egobjs = std::make_unique<Tout>();
177  for (const auto &emu : emulated) {
178  if (emu.hwPt == 0)
179  continue;
180  auto obj = convertFromEmu(emu, refRemapper);
181  egobjs->push_back(obj);
182  }
183  iEvent.put(std::move(egobjs), label);
184  }
185 
186  l1t::TkEm convertFromEmu(const l1ct::EGIsoObjEmu &emu, const RefRemapper &refRemapper) const;
187  l1t::TkElectron convertFromEmu(const l1ct::EGIsoEleObjEmu &emu, const RefRemapper &refRemapper) const;
188 
197  bool doInPtrn_;
199  std::unique_ptr<PatternWriter> inPtrnWrt_;
200  std::unique_ptr<PatternWriter> outPtrnWrt_;
201 };
202 
204  : tkEGInputs_(this, conf.getParameter<std::vector<edm::ParameterSet>>("tkEgs")),
205  tkEmInputs_(this, conf.getParameter<std::vector<edm::ParameterSet>>("tkEms")),
206  tkEleInputs_(this, conf.getParameter<std::vector<edm::ParameterSet>>("tkElectrons")),
207  tkEGInstanceLabel_(conf.getParameter<std::string>("egStaInstanceLabel")),
208  tkEmInstanceLabel_(conf.getParameter<std::string>("tkEmInstanceLabel")),
209  tkEleInstanceLabel_(conf.getParameter<std::string>("tkEleInstanceLabel")),
210  l2egsorter(conf.getParameter<edm::ParameterSet>("sorter")),
211  l2encoder(conf.getParameter<edm::ParameterSet>("encoder")),
212  doInPtrn_(conf.getParameter<bool>("writeInPattern")),
213  doOutPtrn_(conf.getParameter<bool>("writeOutPattern")),
214  inPtrnWrt_(nullptr),
215  outPtrnWrt_(nullptr) {
216  produces<BXVector<l1t::EGamma>>(tkEGInstanceLabel_);
217  produces<l1t::TkEmCollection>(tkEmInstanceLabel_);
218  produces<l1t::TkElectronCollection>(tkEleInstanceLabel_);
219 
220  if (doInPtrn_) {
221  inPtrnWrt_ = std::make_unique<PatternWriter>(conf.getParameter<edm::ParameterSet>("inPatternFile"));
222  }
223  if (doOutPtrn_) {
224  outPtrnWrt_ = std::make_unique<PatternWriter>(conf.getParameter<edm::ParameterSet>("outPatternFile"));
225  }
226 }
227 
229 
230 ap_uint<64> L1TCtL2EgProducer::encodeLayer1(const EGIsoObjEmu &egiso) const {
231  ap_uint<64> ret = 0;
232  ret(EGIsoObjEmu::BITWIDTH, 0) = egiso.pack();
233  return ret;
234 }
235 
236 ap_uint<128> L1TCtL2EgProducer::encodeLayer1(const EGIsoEleObjEmu &egiso) const {
237  ap_uint<128> ret = 0;
238  ret(EGIsoEleObjEmu::BITWIDTH, 0) = egiso.pack();
239  return ret;
240 }
241 
242 std::vector<ap_uint<64>> L1TCtL2EgProducer::encodeLayer1(const std::vector<EGIsoObjEmu> &photons) const {
243  std::vector<ap_uint<64>> ret;
244  ret.reserve(photons.size());
245  for (const auto &phot : photons) {
246  ret.push_back(encodeLayer1(phot));
247  }
248  return ret;
249 }
250 
251 std::vector<ap_uint<64>> L1TCtL2EgProducer::encodeLayer1(const std::vector<EGIsoEleObjEmu> &electrons) const {
252  std::vector<ap_uint<64>> ret;
253  ret.reserve(2 * electrons.size());
254  for (const auto &ele : electrons) {
255  auto eleword = encodeLayer1(ele);
256  ret.push_back(eleword(63, 0));
257  ret.push_back(eleword(127, 64));
258  }
259  return ret;
260 }
261 
262 std::vector<ap_uint<64>> L1TCtL2EgProducer::encodeLayer1EgObjs(unsigned int nObj,
263  const std::vector<EGIsoObjEmu> &photons,
264  const std::vector<EGIsoEleObjEmu> &electrons) const {
265  std::vector<ap_uint<64>> ret;
266  auto encoded_photons = encodeLayer1(photons);
267  encoded_photons.resize(nObj, {0});
268  auto encoded_eles = encodeLayer1(electrons);
269  encoded_eles.resize(2 * nObj, {0});
270 
271  std::copy(encoded_photons.begin(), encoded_photons.end(), std::back_inserter(ret));
272  std::copy(encoded_eles.begin(), encoded_eles.end(), std::back_inserter(ret));
273 
274  return ret;
275 }
276 
278  RefRemapper refmapper;
279 
280  auto outEgs = std::make_unique<BXVector<l1t::EGamma>>();
281  merge(tkEGInputs_, iEvent, refmapper, outEgs);
282  iEvent.put(std::move(outEgs), tkEGInstanceLabel_);
283 
284  auto boards = std::make_unique<std::vector<l1ct::OutputBoard>>(l2egsorter.nInputBoards());
285 
286  merge(tkEleInputs_, iEvent, refmapper, boards);
287  merge(tkEmInputs_, iEvent, refmapper, boards);
288 
289  if (doInPtrn_) {
290  l1t::demo::EventData inData;
291  for (unsigned int ibrd = 0; ibrd < boards->size(); ibrd++) {
292  inData.add(
293  {"eglayer1", ibrd},
294  encodeLayer1EgObjs(l2egsorter.nInputObjPerBoard(), (*boards)[ibrd].egphoton, (*boards)[ibrd].egelectron));
295  }
296  inPtrnWrt_->addEvent(inData);
297  }
298 
299  std::vector<EGIsoObjEmu> out_photons_emu;
300  std::vector<EGIsoEleObjEmu> out_eles_emu;
301  l2egsorter.run(*boards, out_photons_emu, out_eles_emu);
302 
303  if (doOutPtrn_) {
304  l1t::demo::EventData outData;
305  outData.add({"eglayer2", 0}, l2encoder.encodeLayer2EgObjs(out_photons_emu, out_eles_emu));
306  outPtrnWrt_->addEvent(outData);
307  }
308 
309  putEgObjects<l1t::TkEmCollection>(iEvent, refmapper, tkEmInstanceLabel_, out_photons_emu);
310  putEgObjects<l1t::TkElectronCollection>(iEvent, refmapper, tkEleInstanceLabel_, out_eles_emu);
311 }
312 
314  // Writing pending events to file before exiting
315  if (doOutPtrn_)
316  outPtrnWrt_->flush();
317  if (doInPtrn_)
318  inPtrnWrt_->flush();
319 }
320 
322  RefRemapper &refRemapper,
323  l1ct::OutputBoard &boarOut) const {
324  EGIsoEleObjEmu emu;
325  emu.initFromBits(tkele.egBinaryWord<EGIsoEleObj::BITWIDTH>());
326  emu.srcCluster = nullptr;
327  emu.srcTrack = nullptr;
328  auto refEg = tkele.EGRef();
329  const auto newref = refRemapper.old2newRefMap.find(refEg);
330  if (newref != refRemapper.old2newRefMap.end()) {
331  refEg = newref->second;
332  }
333  refRemapper.origRefAndPtr.push_back(std::make_pair(refEg, tkele.trkPtr()));
334  emu.sta_idx = refRemapper.origRefAndPtr.size() - 1;
335  // NOTE: The emulator and FW data-format stores absolute iso while the CMSSW object stores relative iso
336  emu.setHwIso(EGIsoEleObjEmu::IsoType::TkIso, l1ct::Scales::makeIso(tkele.trkIsol() * tkele.pt()));
337  emu.setHwIso(EGIsoEleObjEmu::IsoType::PfIso, l1ct::Scales::makeIso(tkele.pfIsol() * tkele.pt()));
338  // std::cout << "[convertToEmu] TkEle pt: " << emu.hwPt << " eta: " << emu.hwEta << " phi: " << emu.hwPhi << " staidx: " << emu.sta_idx << std::endl;
339 
340  boarOut.egelectron.push_back(emu);
341 }
342 
344  RefRemapper &refRemapper,
345  l1ct::OutputBoard &boarOut) const {
346  EGIsoObjEmu emu;
347  emu.initFromBits(tkem.egBinaryWord<EGIsoObj::BITWIDTH>());
348  emu.srcCluster = nullptr;
349  auto refEg = tkem.EGRef();
350  const auto newref = refRemapper.old2newRefMap.find(refEg);
351  if (newref != refRemapper.old2newRefMap.end()) {
352  refEg = newref->second;
353  }
354  refRemapper.origRefAndPtr.push_back(std::make_pair(refEg, edm::Ptr<RefRemapper::L1TTTrackType>(nullptr, 0)));
355  emu.sta_idx = refRemapper.origRefAndPtr.size() - 1;
356  // NOTE: The emulator and FW data-format stores absolute iso while the CMSSW object stores relative iso
357  emu.setHwIso(EGIsoObjEmu::IsoType::TkIso, l1ct::Scales::makeIso(tkem.trkIsol() * tkem.pt()));
358  emu.setHwIso(EGIsoObjEmu::IsoType::PfIso, l1ct::Scales::makeIso(tkem.pfIsol() * tkem.pt()));
359  emu.setHwIso(EGIsoObjEmu::IsoType::TkIsoPV, l1ct::Scales::makeIso(tkem.trkIsolPV() * tkem.pt()));
360  emu.setHwIso(EGIsoObjEmu::IsoType::PfIsoPV, l1ct::Scales::makeIso(tkem.pfIsolPV() * tkem.pt()));
361  // std::cout << "[convertToEmu] TkEM pt: " << emu.hwPt << " eta: " << emu.hwEta << " phi: " << emu.hwPhi << " staidx: " << emu.sta_idx << std::endl;
362  boarOut.egphoton.push_back(emu);
363 }
364 
366  // std::cout << "[convertFromEmu] TkEm pt: " << egiso.hwPt << " eta: " << egiso.hwEta << " phi: " << egiso.hwPhi << " staidx: " << egiso.sta_idx << std::endl;
367  // NOTE: the TkEM object is created with the accuracy as in GT object (not the Correlator internal one)!
368  const auto gteg = egiso.toGT();
370  l1gt::Scales::floatPt(gteg.v3.pt), l1gt::Scales::floatEta(gteg.v3.eta), l1gt::Scales::floatPhi(gteg.v3.phi), 0.);
371  // NOTE: The emulator and FW data-format stores absolute iso while the CMSSW object stores relative iso
373  refRemapper.origRefAndPtr[egiso.sta_idx].first,
374  egiso.floatRelIso(l1ct::EGIsoObjEmu::IsoType::TkIso),
375  egiso.floatRelIso(l1ct::EGIsoObjEmu::IsoType::TkIsoPV));
376  tkem.setHwQual(gteg.quality);
377  tkem.setPFIsol(egiso.floatRelIso(l1ct::EGIsoObjEmu::IsoType::PfIso));
378  tkem.setPFIsolPV(egiso.floatRelIso(l1ct::EGIsoObjEmu::IsoType::PfIsoPV));
379  tkem.setEgBinaryWord(gteg.pack());
380  return tkem;
381 }
382 
384  const RefRemapper &refRemapper) const {
385  // std::cout << "[convertFromEmu] TkEle pt: " << egele.hwPt << " eta: " << egele.hwEta << " phi: " << egele.hwPhi << " staidx: " << egele.sta_idx << std::endl;
386  // NOTE: the TkElectron object is created with the accuracy as in GT object (not the Correlator internal one)!
387  const auto gteg = egele.toGT();
389  l1gt::Scales::floatPt(gteg.v3.pt), l1gt::Scales::floatEta(gteg.v3.eta), l1gt::Scales::floatPhi(gteg.v3.phi), 0.);
390  // NOTE: The emulator and FW data-format stores absolute iso while the CMSSW object stores relative iso
392  refRemapper.origRefAndPtr[egele.sta_idx].first,
393  refRemapper.origRefAndPtr[egele.sta_idx].second,
394  egele.floatRelIso(l1ct::EGIsoEleObjEmu::IsoType::TkIso));
395  tkele.setHwQual(gteg.quality);
396  tkele.setPFIsol(egele.floatRelIso(l1ct::EGIsoEleObjEmu::IsoType::PfIso));
397  tkele.setEgBinaryWord(gteg.pack());
398  return tkele;
399 }
400 
std::unique_ptr< l1t::demo::BoardDataWriter > dataWriter_
std::vector< ap_uint< 64 > > encodeLayer2EgObjs(const std::vector< EGIsoObjEmu > &photons, const std::vector< EGIsoEleObjEmu > &electrons) const
std::string tkEGInstanceLabel_
float floatPhi(phi_t phi)
Definition: gt_datatypes.h:46
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
float trkIsolPV() const
Definition: TkEm.h:42
l1gt::Electron toGT() const
Definition: egamma.h:157
PFInstanceInputs(L1TCtL2EgProducer *prod, const std::vector< edm::ParameterSet > &confs)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Logical ID for link within any given time slice (e.g. ["tracks", 0] -> ["tracks", 17] for links from ...
Definition: LinkId.h:10
float floatEta(eta_t eta)
Definition: gt_datatypes.h:45
void setHwIso(IsoType type, iso_t value)
double pt() const final
transverse momentum
BXVector< edm::Ref< BXVector< l1t::EGamma > > > oldRefs
InputTokenAndChannels tokensAndChannels_
float trkIsol() const
Definition: TkEm.h:41
void merge(const PFInstanceInputs< T > &instance, edm::Event &iEvent, RefRemapper &refRemapper, std::unique_ptr< TT > &out) const
void remapRefs(edm::Event &iEvent, std::unique_ptr< BXVector< l1t::EGamma >> &out, RefRemapper &refRemapper) const
const l1t::PFTrack * srcTrack
static PFTauRenderPlugin instance
ret
prodAgent to be discontinued
void remapRefs(edm::Event &iEvent, std::unique_ptr< TT > &out, RefRemapper &refRemapper) const
PatternWriter(const edm::ParameterSet &conf)
ap_uint< BITWIDTH > pack() const
Definition: egamma.h:45
void endJob() override
std::unique_ptr< PatternWriter > outPtrnWrt_
void setHwQual(int qual)
Definition: L1Candidate.h:31
FileFormat parseFileFormat(const std::string &)
Definition: utilities.cc:70
std::vector< EGIsoEleObjEmu > egelectron
const l1t::PFCluster * srcCluster
void add(const LinkId &, const std::vector< ap_uint< 64 >> &)
Definition: EventData.cc:14
iso_t makeIso(float iso)
Definition: datatypes.h:194
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
assert(be >=bs)
const edm::Ref< EGammaBxCollection > & EGRef() const
Definition: TkEm.h:33
float floatRelIso(IsoType type) const
float floatRelIso(IsoType type) const
char const * label
void run(const std::vector< l1ct::OutputBoard > &in, std::vector< EGIsoObjEmu > &out_photons, std::vector< EGIsoEleObjEmu > &out_eles) const
PFInstanceInputs< l1t::TkElectronRegionalOutput > tkEleInputs_
int iEvent
Definition: GenABIO.cc:224
Definition: TkEm.h:20
~L1TCtL2EgProducer() override
ap_uint< 64 > encodeLayer1(const EGIsoObjEmu &egiso) const
ap_uint< N > egBinaryWord() const
Definition: TkEm.h:66
void setHwIso(IsoType type, iso_t value)
void putEgObjects(edm::Event &iEvent, const RefRemapper &refRemapper, const std::string &label, const std::vector< Tin > emulated) const
ap_uint< BITWIDTH > pack() const
Definition: egamma.h:124
void initFromBits(const ap_uint< BITWIDTH > &src)
Definition: egamma.h:144
unsigned int nInputBoards() const
float floatPt(pt_t pt)
Definition: gt_datatypes.h:44
PFInstanceInputs< l1t::TkEmRegionalOutput > tkEmInputs_
l1gt::Photon toGT() const
Definition: egamma.h:70
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< std::pair< edm::EDGetTokenT< T >, std::vector< int > > > InputTokenAndChannels
float pfIsolPV() const
Definition: TkEm.h:44
l1ct::L2EgSorterEmulator l2egsorter
void populate(std::unique_ptr< T > &out, const edm::Handle< TT > &in, const std::vector< int > &links, RefRemapper &refRemapper) const
unsigned int nInputObjPerBoard() const
std::string tkEleInstanceLabel_
void populate(std::unique_ptr< BXVector< l1t::EGamma >> &out, const edm::Handle< BXVector< l1t::EGamma >> &in, const std::vector< int > &links, RefRemapper &refRemapper) const
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
std::unique_ptr< PatternWriter > inPtrnWrt_
void initFromBits(const ap_uint< BITWIDTH > &src)
Definition: egamma.h:61
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
std::vector< EGIsoObjEmu > egphoton
HLT enums.
l1t::TkEm convertFromEmu(const l1ct::EGIsoObjEmu &emu, const RefRemapper &refRemapper) const
const edm::Ptr< L1TTTrackType > & trkPtr() const
Definition: TkElectron.h:38
const l1t::PFCluster * srcCluster
L1TCtL2EgProducer(const edm::ParameterSet &)
std::map< edm::Ref< BXVector< l1t::EGamma > >, edm::Ref< BXVector< l1t::EGamma > > > old2newRefMap
l1ct::L2EgEncoderEmulator l2encoder
std::vector< ap_uint< 64 > > encodeLayer1EgObjs(unsigned int nObj, const std::vector< EGIsoObjEmu > &photons, const std::vector< EGIsoEleObjEmu > &electrons) const
PFInstanceInputs< BXVector< l1t::EGamma > > tkEGInputs_
long double T
std::vector< std::pair< edm::Ref< l1t::EGammaBxCollection >, edm::Ptr< L1TTTrackType > > > origRefAndPtr
float pfIsol() const
Definition: TkEm.h:43
Class representing information phase-2 ATCA I/O data corresponding to a single event, with logical channel IDs (essentially string-uint pairs, e.g. tracks-0 to tracks-17).
Definition: EventData.h:28
void addEvent(const l1t::demo::EventData &eventData)
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
def move(src, dest)
Definition: eostools.py:511
const InputTokenAndChannels & tokensAndChannels() const
void push_back(int bx, T object)
void convertToEmu(const l1t::TkElectron &tkele, RefRemapper &refRemapper, l1ct::OutputBoard &boarOut) const
Definition: datatypes.h:19
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
std::string tkEmInstanceLabel_