CMS 3D CMS Logo

TkEm.h
Go to the documentation of this file.
1 #ifndef DataFormatsL1TCorrelator_TkEm_h
2 #define DataFormatsL1TCorrelator_TkEm_h
3 
4 // -*- C++ -*-
5 //
6 // Package: L1Trigger
7 // Class : TkEm
8 //
9 
12 
14 
16 #include <ap_int.h>
17 
18 namespace l1t {
19 
20  class TkEm : public L1Candidate {
21  public:
22  TkEm();
23 
24  TkEm(const LorentzVector& p4, const edm::Ref<EGammaBxCollection>& egRef, float tkisol = -999.);
25 
26  TkEm(const LorentzVector& p4,
27  const edm::Ref<EGammaBxCollection>& egRef,
28  float tkisol = -999.,
29  float tkisolPV = -999);
30 
31  // ---------- const member functions ---------------------
32 
33  const edm::Ref<EGammaBxCollection>& EGRef() const { return egRef_; }
34 
35  const double l1RefEta() const { return egRef_->eta(); }
36 
37  const double l1RefPhi() const { return egRef_->phi(); }
38 
39  const double l1RefEt() const { return egRef_->et(); }
40 
41  float trkIsol() const { return trkIsol_; } // not constrained to the PV, just track ptSum
42  float trkIsolPV() const { return trkIsolPV_; } // constrained to the PV by DZ
43  float pfIsol() const { return pfIsol_; } // not constrained to the PV, just track ptSum
44  float pfIsolPV() const { return pfIsolPV_; } // constrained to the PV by DZ
45  float puppiIsol() const { return puppiIsol_; } // not constrained to the PV, just track ptSum
46  float puppiIsolPV() const { return puppiIsolPV_; } // constrained to the PV by DZ
47 
48  // ---------- member functions ---------------------------
49 
50  void setTrkIsol(float TrkIsol) { trkIsol_ = TrkIsol; }
51  void setTrkIsolPV(float TrkIsolPV) { trkIsolPV_ = TrkIsolPV; }
52  void setPFIsol(float pfIsol) { pfIsol_ = pfIsol; }
56  void setEGRef(const edm::Ref<EGammaBxCollection>& egRef) { egRef_ = egRef; }
57 
58  template <int N>
59  void setEgBinaryWord(ap_uint<N> word) {
61  egBinaryWord1_ = (word >> 32);
62  egBinaryWord2_ = (word >> 64);
63  }
64 
65  template <int N>
66  ap_uint<N> egBinaryWord() const {
67  return ap_uint<N>(egBinaryWord0_) | (ap_uint<N>(egBinaryWord1_) << 32) | (ap_uint<N>(egBinaryWord2_) << 64);
68  }
69 
70  private:
72  float trkIsol_;
73  float trkIsolPV_;
74  float pfIsol_;
75  float pfIsolPV_;
76  float puppiIsol_;
77  float puppiIsolPV_;
78  uint32_t egBinaryWord0_;
79  uint32_t egBinaryWord1_;
80  uint32_t egBinaryWord2_;
81  };
82 } // namespace l1t
83 
84 #endif
float trkIsolPV() const
Definition: TkEm.h:42
float trkIsol() const
Definition: TkEm.h:41
float puppiIsol_
Definition: TkEm.h:76
uint32_t egBinaryWord2_
Definition: TkEm.h:80
void setPuppiIsol(float puppiIsol)
Definition: TkEm.h:54
void setEGRef(const edm::Ref< EGammaBxCollection > &egRef)
Definition: TkEm.h:56
delete x;
Definition: CaloConfig.h:22
edm::Ref< EGammaBxCollection > egRef_
Definition: TkEm.h:71
uint32_t egBinaryWord0_
Definition: TkEm.h:78
const edm::Ref< EGammaBxCollection > & EGRef() const
Definition: TkEm.h:33
const LorentzVector & p4() const final
four-momentum Lorentz vector
float trkIsolPV_
Definition: TkEm.h:73
const double l1RefEt() const
Definition: TkEm.h:39
float trkIsol_
Definition: TkEm.h:72
const double l1RefPhi() const
Definition: TkEm.h:37
uint64_t word
Definition: TkEm.h:20
ap_uint< N > egBinaryWord() const
Definition: TkEm.h:66
float pfIsolPV() const
Definition: TkEm.h:44
void setTrkIsolPV(float TrkIsolPV)
Definition: TkEm.h:51
float pfIsolPV_
Definition: TkEm.h:75
float puppiIsolPV_
Definition: TkEm.h:77
TkEm()
Definition: TkEm.cc:11
void setTrkIsol(float TrkIsol)
Definition: TkEm.h:50
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
const double l1RefEta() const
Definition: TkEm.h:35
float pfIsol_
Definition: TkEm.h:74
void setEgBinaryWord(ap_uint< N > word)
Definition: TkEm.h:59
void setPFIsolPV(float pfIsolPV)
Definition: TkEm.h:53
void setPuppiIsolPV(float puppiIsolPV)
Definition: TkEm.h:55
uint32_t egBinaryWord1_
Definition: TkEm.h:79
void setPFIsol(float pfIsol)
Definition: TkEm.h:52
float pfIsol() const
Definition: TkEm.h:43
float puppiIsolPV() const
Definition: TkEm.h:46
float puppiIsol() const
Definition: TkEm.h:45