test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MissHtPacker.cc
Go to the documentation of this file.
3 
4 #include "CaloTokens.h"
5 #include "MissHtPacker.h"
6 
7 // Implementation
8 
9 namespace l1t {
10  namespace stage1 {
11  Blocks
13  {
15  event.getByToken(static_cast<const CaloTokens*>(toks)->getEtSumToken(), etSums);
16 
17  std::vector<uint32_t> load;
18 
19  for (int i = etSums->getFirstBX(); i <= etSums->getLastBX(); ++i) {
20  int n = 0;
21 
22  int htmissphi=0;
23  int htmiss=0;
24 
25  int flaghtmiss=0;
26 
27  for (auto j = etSums->begin(i); j != etSums->end(i) && n < 4; ++j, ++n) {
28  if (j->getType()==l1t::EtSum::kMissingHt){
29 
30  flaghtmiss=j->hwQual() & 0x1;
31  htmiss=std::min(j->hwPt(),0x7F);
32  htmissphi=std::min(j->hwPhi(),0x1F);
33  }
34  }
35 
36  uint16_t object[2]={0,0};
37 
38  object[0]=htmissphi|((htmiss & 0x7F) << 5 ) |(flaghtmiss<<12)|(0x1 << 14);
39  object[1]= 0x1 | (0x1 << 2) | (0x1 << 4) | (0x1 << 6) |(0x1 << 8) | (0x1 << 10) | (0x1 << 12) | (0x1 << 14);
40 
41  uint32_t word0=(object[0] & 0xFFFF);
42  uint32_t word1=(object[1] & 0xFFFF);
43 
44  word0 |= (1 << 15);
45  word1 |= ((i == 0) << 15);
46 
47  load.push_back(word0);
48  load.push_back(word1);
49  }
50 
51  return {Block(99, load)};
52  }
53  }
54 }
55 
int i
Definition: DBlmapReader.cc:9
virtual Blocks pack(const edm::Event &, const PackerTokens *) override
Definition: MissHtPacker.cc:12
def load
Definition: svgfig.py:546
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