CMS 3D CMS Logo

L1EGPuppiIsoAlgo.h
Go to the documentation of this file.
1 #ifndef L1Trigger_Phase2L1ParticleFlow_L1EGPuppiIsoAlgo_h
2 #define L1Trigger_Phase2L1ParticleFlow_L1EGPuppiIsoAlgo_h
3 
4 #include <list>
5 #include <string>
6 #include <vector>
7 #include <memory>
8 
14 
15 namespace l1ct {
16 
18  enum { kPFIso, kPuppiIso };
19 
22  ap_int<z0_t::width + 1> dZMax_;
23  int dRMin2_;
24  int dRMax2_;
26 
27  L1EGPuppiIsoAlgoConfig(const std::string& pfIsoTypeStr,
28  const float ptMin,
29  const float dZMax,
30  const float dRMin,
31  const float dRMax,
32  const bool pfCandReuse)
33  : pfIsoType_(pfIsoTypeStr == "PF" ? kPFIso : kPuppiIso),
34  ptMin_(Scales::makePtFromFloat(ptMin)),
35  dZMax_(Scales::makeZ0(dZMax)),
39  };
40 
41  typedef std::vector<EGIsoObjEmu> EGIsoObjsEmu;
42  typedef std::vector<EGIsoEleObjEmu> EGIsoEleObjsEmu;
43  typedef std::vector<PuppiObj> PuppiObjs;
44 
46  public:
49  virtual ~L1EGPuppiIsoAlgo() = default;
50 
51  void run(const EGIsoObjsEmu& l1EGs, const PuppiObjs& l1PFCands, EGIsoObjsEmu& outL1EGs, z0_t z0 = 0) const;
52  void run(EGIsoObjsEmu& l1EGs, const PuppiObjs& l1PFCands, z0_t z0 = 0) const;
53  void run(EGIsoEleObjsEmu& l1Eles, const PuppiObjs& l1PFCands) const;
54 
55  private:
56  iso_t calcIso(const EGIsoObj& l1EG, std::list<const PuppiObj*>& workPFCands, z0_t z0 = 0) const;
57 
59  };
60 
61 } // namespace l1ct
62 #endif
z0_t makeZ0(float z0)
Definition: datatypes.h:185
std::vector< EGIsoEleObjEmu > EGIsoEleObjsEmu
constexpr float ptMin
const L1EGPuppiIsoAlgoConfig config_
std::vector< PuppiObj > PuppiObjs
Definition: config.py:1
pt_t makePtFromFloat(float pt)
Definition: datatypes.h:183
int makeDR2FromFloatDR(float dr)
Definition: datatypes.h:209
ap_ufixed< 11, 9, AP_TRN, AP_SAT > iso_t
Definition: datatypes.h:40
L1EGPuppiIsoAlgoConfig(const std::string &pfIsoTypeStr, const float ptMin, const float dZMax, const float dRMin, const float dRMax, const bool pfCandReuse)
ap_int< 10 > z0_t
Definition: datatypes.h:21
ap_ufixed< 14, 12, AP_TRN, AP_SAT > pt_t
Definition: datatypes.h:10
L1EGPuppiIsoAlgo(const L1EGPuppiIsoAlgoConfig &config)
std::vector< EGIsoObjEmu > EGIsoObjsEmu
ap_int< z0_t::width+1 > dZMax_
virtual ~L1EGPuppiIsoAlgo()=default
void run(const EGIsoObjsEmu &l1EGs, const PuppiObjs &l1PFCands, EGIsoObjsEmu &outL1EGs, z0_t z0=0) const
iso_t calcIso(const EGIsoObj &l1EG, std::list< const PuppiObj *> &workPFCands, z0_t z0=0) const
Definition: datatypes.h:8