CMS 3D CMS Logo

Namespaces | Functions
PhysCandPacker.cc File Reference
#include "FWCore/Framework/interface/Event.h"
#include "EventFilter/L1TRawToDigi/plugins/PackerFactory.h"
#include "CaloTokens.h"
#include "PhysCandPacker.h"

Go to the source code of this file.

Namespaces

 l1t
 delete x;
 
 l1t::stage1
 

Functions

template<typename T , typename F >
l1t::Blocks process (unsigned int id1, unsigned int id2, const BXVector< T > &coll, F filter)
 
static const l1t::PackerFactoryT ::PMaker< l1t::stage1::IsoEGammaPackers_maker__LINE__ ("l1t::stage1::IsoEGammaPacker")
 
static const l1t::PackerFactoryT ::PMaker< l1t::stage1::NonIsoEGammaPackers_maker__LINE__ ("l1t::stage1::NonIsoEGammaPacker")
 
static const l1t::PackerFactoryT ::PMaker< l1t::stage1::CentralJetPackers_maker__LINE__ ("l1t::stage1::CentralJetPacker")
 
static const l1t::PackerFactoryT ::PMaker< l1t::stage1::ForwardJetPackers_maker__LINE__ ("l1t::stage1::ForwardJetPacker")
 
static const l1t::PackerFactoryT ::PMaker< l1t::stage1::TauPackers_maker__LINE__ ("l1t::stage1::TauPacker")
 
static const l1t::PackerFactoryT ::PMaker< l1t::stage1::IsoTauPackers_maker__LINE__ ("l1t::stage1::IsoTauPacker")
 

Function Documentation

◆ process()

template<typename T , typename F >
l1t::Blocks process ( unsigned int  id1,
unsigned int  id2,
const BXVector< T > &  coll,
F  filter 
)

Definition at line 8 of file PhysCandPacker.cc.

References funct::abs(), BXVector< T >::begin(), BXVector< T >::end(), ALCARECOTkAlBeamHalo_cff::filter, BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), mps_fire::i, globals_cff::id1, globals_cff::id2, dqmiolumiharvest::j, svgfig::load(), SiStripPI::min, dqmiodumpmetadata::n, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by l1t::stage1::IsoEGammaPacker::pack(), l1t::stage1::NonIsoEGammaPacker::pack(), l1t::stage1::CentralJetPacker::pack(), l1t::stage1::ForwardJetPacker::pack(), l1t::stage1::TauPacker::pack(), and l1t::stage1::IsoTauPacker::pack().

8  {
9  std::vector<uint32_t> load[2];
10 
11  for (int i = coll.getFirstBX(); i <= coll.getLastBX(); ++i) {
12  uint16_t jetbit[4] = {0, 0, 0, 0};
13  int n = 0;
14  for (auto j = coll.begin(i); j != coll.end(i) && n < 4; ++j) {
15  if (!filter(*j))
16  continue;
17  //std::cout << j->hwPt() << " @ " << j->hwEta() << ", " << j->hwPhi() << " > " << j->hwQual() << " > " << j->hwIso() << std::endl;
18  jetbit[n++] = std::min(j->hwPt(), 0x3F) | (abs(j->hwEta()) & 0x7) << 6 | ((j->hwEta() >> 3) & 0x1) << 9 |
19  (j->hwPhi() & 0x1F) << 10;
20  }
21  uint32_t word0 = (jetbit[0] & 0xFFFF);
22  uint32_t word1 = (jetbit[1] & 0xFFFF);
23  uint32_t word2 = (jetbit[2] & 0xFFFF);
24  uint32_t word3 = (jetbit[3] & 0xFFFF);
25 
26  load[0].push_back(word0);
27  load[0].push_back(word2);
28 
29  load[1].push_back(word1);
30  load[1].push_back(word3);
31  }
32 
33  return {l1t::Block(id1, load[0]), l1t::Block(id2, load[1])};
34 }
int getLastBX() const
int getFirstBX() const
const_iterator begin(int bx) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def load(fileName)
Definition: svgfig.py:547
const_iterator end(int bx) const

◆ s_maker__LINE__() [1/6]

static const l1t::PackerFactoryT ::PMaker< l1t::stage1::IsoEGammaPacker > s_maker__LINE__ ( "l1t::stage1::IsoEGammaPacker"  )
static

◆ s_maker__LINE__() [2/6]

static const l1t::PackerFactoryT ::PMaker< l1t::stage1::NonIsoEGammaPacker > s_maker__LINE__ ( "l1t::stage1::NonIsoEGammaPacker"  )
static

◆ s_maker__LINE__() [3/6]

static const l1t::PackerFactoryT ::PMaker< l1t::stage1::CentralJetPacker > s_maker__LINE__ ( "l1t::stage1::CentralJetPacker"  )
static

◆ s_maker__LINE__() [4/6]

static const l1t::PackerFactoryT ::PMaker< l1t::stage1::ForwardJetPacker > s_maker__LINE__ ( "l1t::stage1::ForwardJetPacker"  )
static

◆ s_maker__LINE__() [5/6]

static const l1t::PackerFactoryT ::PMaker< l1t::stage1::TauPacker > s_maker__LINE__ ( "l1t::stage1::TauPacker"  )
static

◆ s_maker__LINE__() [6/6]

static const l1t::PackerFactoryT ::PMaker< l1t::stage1::IsoTauPacker > s_maker__LINE__ ( "l1t::stage1::IsoTauPacker"  )
static