CMS 3D CMS Logo

pfalgo3_ref.h
Go to the documentation of this file.
1 #ifndef PFALGO3_REF_H
2 #define PFALGO3_REF_H
3 
4 #include "pfalgo_common_ref.h"
5 
6 namespace edm {
7  class ParameterSet;
9 } // namespace edm
10 
11 namespace l1ct {
12 
14  public:
15  PFAlgo3Emulator(unsigned int nTrack,
16  unsigned int nEmCalo,
17  unsigned int nCalo,
18  unsigned int nMu,
19  unsigned int nPhoton,
20  unsigned int nSelCalo,
21  unsigned int nAllNeutral,
22  unsigned int dR2Max_Tk_Mu,
23  unsigned int dR2Max_Tk_Em,
24  unsigned int dR2Max_Em_Calo,
25  unsigned int dR2Max_Tk_Calo,
26  pt_t tk_MaxInvPt_Loose,
27  pt_t tk_MaxInvPt_Tight)
29  nTrack, nCalo, nMu, nSelCalo, dR2Max_Tk_Mu, dR2Max_Tk_Calo, tk_MaxInvPt_Loose, tk_MaxInvPt_Tight),
33  dR2MAX_TK_EM_(dR2Max_Tk_Em),
34  dR2MAX_EM_CALO_(dR2Max_Em_Calo) {}
35 
36  // note: this one will work only in CMSSW
37  PFAlgo3Emulator(const edm::ParameterSet& iConfig);
38 
39  ~PFAlgo3Emulator() override {}
40 
42 
43  void run(const PFInputRegion& in, OutputRegion& out) const override;
44 
45  void toFirmware(const PFInputRegion& in,
47  HadCaloObj calo[/*nCALO*/],
48  EmCaloObj emcalo[/*nEMCALO*/],
49  TkObj track[/*nTRACK*/],
50  MuObj mu[/*nMU*/]) const;
51  void toFirmware(const OutputRegion& out,
52  PFChargedObj outch[/*nTRACK*/],
53  PFNeutralObj outpho[/*nPHOTON*/],
54  PFNeutralObj outne[/*nSELCALO*/],
55  PFChargedObj outmu[/*nMU*/]) const;
56 
58  void mergeNeutrals(OutputRegion& out) const override;
59 
60  protected:
61  unsigned int nEMCALO_, nPHOTON_, nALLNEUTRAL_;
62  unsigned int dR2MAX_TK_EM_;
63  unsigned int dR2MAX_EM_CALO_;
64 
65  int tk_best_match_ref(unsigned int dR2MAX,
66  const std::vector<l1ct::EmCaloObjEmu>& calo,
67  const l1ct::TkObjEmu& track) const;
68  int em_best_match_ref(unsigned int dR2MAX,
69  const std::vector<l1ct::HadCaloObjEmu>& calo,
70  const l1ct::EmCaloObjEmu& em) const;
71 
72  void pfalgo3_em_ref(const PFInputRegion& in,
73  const std::vector<int>& iMu /*[nTRACK]*/,
74  std::vector<int>& iEle /*[nTRACK]*/,
76  std::vector<HadCaloObjEmu>& hadcalo_out /*[nCALO]*/) const;
77  };
78 
79 } // namespace l1ct
80 
81 #endif
void pfalgo3_em_ref(const PFInputRegion &in, const std::vector< int > &iMu, std::vector< int > &iEle, OutputRegion &out, std::vector< HadCaloObjEmu > &hadcalo_out) const
unsigned int nALLNEUTRAL_
Definition: pfalgo3_ref.h:61
static edm::ParameterSetDescription getParameterSetDescription()
int em_best_match_ref(unsigned int dR2MAX, const std::vector< l1ct::HadCaloObjEmu > &calo, const l1ct::EmCaloObjEmu &em) const
void run(const PFInputRegion &in, OutputRegion &out) const override
unsigned int nPHOTON_
Definition: pfalgo3_ref.h:61
void mergeNeutrals(OutputRegion &out) const override
moves all objects from out.pfphoton to the beginning of out.pfneutral
PFAlgo3Emulator(unsigned int nTrack, unsigned int nEmCalo, unsigned int nCalo, unsigned int nMu, unsigned int nPhoton, unsigned int nSelCalo, unsigned int nAllNeutral, unsigned int dR2Max_Tk_Mu, unsigned int dR2Max_Tk_Em, unsigned int dR2Max_Em_Calo, unsigned int dR2Max_Tk_Calo, pt_t tk_MaxInvPt_Loose, pt_t tk_MaxInvPt_Tight)
Definition: pfalgo3_ref.h:15
unsigned int dR2MAX_EM_CALO_
Definition: pfalgo3_ref.h:63
int tk_best_match_ref(unsigned int dR2MAX, const std::vector< l1ct::EmCaloObjEmu > &calo, const l1ct::TkObjEmu &track) const
void toFirmware(const PFInputRegion &in, PFRegion &region, HadCaloObj calo[], EmCaloObj emcalo[], TkObj track[], MuObj mu[]) const
ap_ufixed< 14, 12, AP_TRN, AP_SAT > pt_t
Definition: datatypes.h:19
unsigned int nEMCALO_
Definition: pfalgo3_ref.h:61
HLT enums.
unsigned int dR2MAX_TK_EM_
Definition: pfalgo3_ref.h:62
~PFAlgo3Emulator() override
Definition: pfalgo3_ref.h:39
Definition: Common.h:9
Definition: datatypes.h:17