CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MissEtPacker.cc
Go to the documentation of this file.
3 
4 #include "CaloTokens.h"
5 #include "MissEtPacker.h"
6 
7 namespace l1t {
8 namespace stage1 {
9  Blocks
11  {
13  event.getByToken(static_cast<const CaloTokens*>(toks)->getEtSumToken(), etSums);
14 
15  std::vector<uint32_t> load;
16 
17  for (int i = etSums->getFirstBX(); i <= etSums->getLastBX(); ++i) {
18  int n = 0;
19 
20  uint16_t objectMissingEt=0;
21  uint16_t objectMissingEtPhi=0;
22 
23  int flagMissingEt=0;
24 
25  for (auto j = etSums->begin(i); j != etSums->end(i) && n < 4; ++j, ++n) {
26  if (j->getType()==l1t::EtSum::kMissingEt){
27  flagMissingEt=j->hwQual() & 0x1;
28  objectMissingEt=std::min(j->hwPt(), 0xFFF)|(flagMissingEt<<12);
29  objectMissingEtPhi=std::min(j->hwPhi(), 0x7F);
30  }
31  }
32 
33  uint32_t word0= (objectMissingEt & 0xFFFF);
34  uint32_t word1= (objectMissingEtPhi & 0xFFFF);
35 
36  word0 |= (1 << 15);
37  word1 |= ((i == 0) << 15);
38 
39 
40  load.push_back(word0);
41  load.push_back(word1);
42  }
43 
44  return {Block(95, load)};
45  }
46 }
47 }
48 
int i
Definition: DBlmapReader.cc:9
def load
Definition: svgfig.py:546
virtual Blocks pack(const edm::Event &, const PackerTokens *) override
Definition: MissEtPacker.cc:10
std::vector< Block > Blocks
Definition: Block.h:68
int j
Definition: DBlmapReader.cc:9
T min(T a, T b)
Definition: MathUtil.h:58
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
#define DEFINE_L1T_PACKER(type)
Definition: PackerFactory.h:22