File indexing completed on 2023-03-17 10:50:21
0001 #ifndef DataFormatsL1TCorrelator_TkEm_h
0002 #define DataFormatsL1TCorrelator_TkEm_h
0003
0004
0005
0006
0007
0008
0009
0010 #include "DataFormats/L1Trigger/interface/L1Candidate.h"
0011 #include "DataFormats/Common/interface/Ref.h"
0012
0013 #include "DataFormats/L1Trigger/interface/EGamma.h"
0014
0015 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0016 #include <ap_int.h>
0017
0018 namespace l1t {
0019
0020 class TkEm : public L1Candidate {
0021 public:
0022 TkEm();
0023
0024 TkEm(const LorentzVector& p4, const edm::Ref<EGammaBxCollection>& egRef, float tkisol = -999.);
0025
0026 TkEm(const LorentzVector& p4,
0027 const edm::Ref<EGammaBxCollection>& egRef,
0028 float tkisol = -999.,
0029 float tkisolPV = -999);
0030
0031
0032
0033 const edm::Ref<EGammaBxCollection>& EGRef() const { return egRef_; }
0034
0035 const double l1RefEta() const { return egRef_->eta(); }
0036
0037 const double l1RefPhi() const { return egRef_->phi(); }
0038
0039 const double l1RefEt() const { return egRef_->et(); }
0040
0041 float trkIsol() const { return trkIsol_; }
0042 float trkIsolPV() const { return trkIsolPV_; }
0043 float pfIsol() const { return pfIsol_; }
0044 float pfIsolPV() const { return pfIsolPV_; }
0045 float puppiIsol() const { return puppiIsol_; }
0046 float puppiIsolPV() const { return puppiIsolPV_; }
0047
0048
0049
0050 void setTrkIsol(float TrkIsol) { trkIsol_ = TrkIsol; }
0051 void setTrkIsolPV(float TrkIsolPV) { trkIsolPV_ = TrkIsolPV; }
0052 void setPFIsol(float pfIsol) { pfIsol_ = pfIsol; }
0053 void setPFIsolPV(float pfIsolPV) { pfIsolPV_ = pfIsolPV; }
0054 void setPuppiIsol(float puppiIsol) { puppiIsol_ = puppiIsol; }
0055 void setPuppiIsolPV(float puppiIsolPV) { puppiIsolPV_ = puppiIsolPV; }
0056 void setEGRef(const edm::Ref<EGammaBxCollection>& egRef) { egRef_ = egRef; }
0057
0058 template <int N>
0059 void setEgBinaryWord(ap_uint<N> word) {
0060 egBinaryWord0_ = word;
0061 egBinaryWord1_ = (word >> 32);
0062 egBinaryWord2_ = (word >> 64);
0063 }
0064
0065 template <int N>
0066 ap_uint<N> egBinaryWord() const {
0067 return ap_uint<N>(egBinaryWord0_) | (ap_uint<N>(egBinaryWord1_) << 32) | (ap_uint<N>(egBinaryWord2_) << 64);
0068 }
0069
0070 private:
0071 edm::Ref<EGammaBxCollection> egRef_;
0072 float trkIsol_;
0073 float trkIsolPV_;
0074 float pfIsol_;
0075 float pfIsolPV_;
0076 float puppiIsol_;
0077 float puppiIsolPV_;
0078 uint32_t egBinaryWord0_;
0079 uint32_t egBinaryWord1_;
0080 uint32_t egBinaryWord2_;
0081 };
0082 }
0083
0084 #endif