CMS 3D CMS Logo

TkElectron.h
Go to the documentation of this file.
1 #ifndef DataFormatsL1TCorrelator_TkElectron_h
2 #define DataFormatsL1TCorrelator_TkElectron_h
3 
4 // -*- C++ -*-
5 //
6 // Package: L1Trigger
7 // Class : TkEm
8 //
9 
11 
13 
16 
18 
19 #include <vector>
20 
21 namespace l1t {
22 
23  class TkElectron : public TkEm {
24  public:
26  typedef std::vector<L1TTTrackType> L1TTTrackCollection;
27 
28  TkElectron();
29 
33  float tkisol = -999.);
34 
35  TkElectron(const LorentzVector& p4, float tkisol = -999.);
36 
37  // ---------- const member functions ---------------------
38 
39  const edm::Ptr<L1TTTrackType>& trkPtr() const { return trkPtr_; }
40 
41  float trkzVtx() const { return trkzVtx_; }
42  float idScore() const { return idScore_; }
43  // ---------- member functions ---------------------------
44 
45  void setTrkPtr(const edm::Ptr<L1TTTrackType>& tkPtr) { trkPtr_ = tkPtr; }
46  void setTrkzVtx(float TrkzVtx) { trkzVtx_ = TrkzVtx; }
47  void setIdScore(float score) { idScore_ = score; }
48 
50  if (encoding() != HWEncoding::GT) {
51  throw cms::Exception("RuntimeError") << "TkElectron::hwObj : encoding is not in GT format!" << std::endl;
52  }
53  return l1gt::Electron::unpack_ap(egBinaryWord<l1gt::Electron::BITWIDTH>());
54  }
55 
56  private:
58  float trkzVtx_;
59  float idScore_;
60  };
61 } // namespace l1t
62 #endif
l1gt::Electron hwObj() const
Definition: TkElectron.h:49
edm::Ptr< L1TTTrackType > trkPtr_
Definition: TkElectron.h:57
std::vector< L1TTTrackType > L1TTTrackCollection
Definition: TkElectron.h:26
delete x;
Definition: CaloConfig.h:22
const LorentzVector & p4() const final
four-momentum Lorentz vector
float trkzVtx() const
Definition: TkElectron.h:41
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
Definition: TkElectron.h:25
Definition: TkEm.h:23
const edm::Ptr< L1Candidate > & egCaloPtr() const
Definition: TkEm.h:35
void setIdScore(float score)
Definition: TkElectron.h:47
void setTrkzVtx(float TrkzVtx)
Definition: TkElectron.h:46
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
const edm::Ptr< L1TTTrackType > & trkPtr() const
Definition: TkElectron.h:39
float idScore() const
Definition: TkElectron.h:42
HWEncoding encoding() const
Definition: TkEm.h:74
void setTrkPtr(const edm::Ptr< L1TTTrackType > &tkPtr)
Definition: TkElectron.h:45
static Electron unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:294