CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Stage2Layer2DemuxJetAlgoFirmwareImp1.cc
Go to the documentation of this file.
1 
10 
12 
13 
14 #include <vector>
15 #include <algorithm>
16 
17 inline bool operator> ( l1t::Jet& a, l1t::Jet& b )
18 {
19  if ( a.hwPt() > b.hwPt() ){
20  return true;
21  } else {
22  return false;
23  }
24 }
25 
27 
29  params_(params)
30 {
31 
32 
33 }
34 
35 
37 
38 
39 }
40 
41 
43  std::vector<l1t::Jet> & outputJets) {
44 
45  // Set the output jets to the input jets
46  outputJets = inputJets;
47 
48  // Sort the jets by pT
49  std::vector<l1t::Jet>::iterator start(outputJets.begin());
50  std::vector<l1t::Jet>::iterator end(outputJets.end());
51 
52  BitonicSort< l1t::Jet >(down,start,end);
53 
54  // Transform the eta and phi onto the ouput scales to GT
55  for (std::vector<l1t::Jet>::iterator jet = outputJets.begin(); jet != outputJets.end(); ++jet )
56  {
57 
58  jet->setHwPhi(2*jet->hwPhi());
59  jet->setHwEta(2*jet->hwEta());
60 
61  if (jet->hwPt()>0x7FF){
62  jet->setHwPt(0x7FF);
63  } else {
64  jet->setHwPt(jet->hwPt() & 0x7FF);
65  }
66 
67  }
68 
69 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
bool operator>(l1t::Jet &a, l1t::Jet &b)
Definition: Jet.h:13
#define end
Definition: vmac.h:37
int hwPt() const
Definition: L1Candidate.cc:69
virtual void processEvent(const std::vector< l1t::Jet > &inputJets, std::vector< l1t::Jet > &outputJets)
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121