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;
8 }
9 
10 namespace l1ct {
11 
13  public:
14  PFAlgo3Emulator(unsigned int nTrack,
15  unsigned int nEmCalo,
16  unsigned int nCalo,
17  unsigned int nMu,
18  unsigned int nPhoton,
19  unsigned int nSelCalo,
20  unsigned int nAllNeutral,
21  unsigned int dR2Max_Tk_Mu,
22  unsigned int dR2Max_Tk_Em,
23  unsigned int dR2Max_Em_Calo,
24  unsigned int dR2Max_Tk_Calo,
25  pt_t tk_MaxInvPt_Loose,
26  pt_t tk_MaxInvPt_Tight)
28  nTrack, nCalo, nMu, nSelCalo, dR2Max_Tk_Mu, dR2Max_Tk_Calo, tk_MaxInvPt_Loose, tk_MaxInvPt_Tight),
32  dR2MAX_TK_EM_(dR2Max_Tk_Em),
33  dR2MAX_EM_CALO_(dR2Max_Em_Calo) {}
34 
35  // note: this one will work only in CMSSW
36  PFAlgo3Emulator(const edm::ParameterSet& iConfig);
37 
38  ~PFAlgo3Emulator() override {}
39 
40  void run(const PFInputRegion& in, OutputRegion& out) const override;
41 
42  void toFirmware(const PFInputRegion& in,
44  HadCaloObj calo[/*nCALO*/],
45  EmCaloObj emcalo[/*nEMCALO*/],
46  TkObj track[/*nTRACK*/],
47  MuObj mu[/*nMU*/]) const;
48  void toFirmware(const OutputRegion& out,
49  PFChargedObj outch[/*nTRACK*/],
50  PFNeutralObj outpho[/*nPHOTON*/],
51  PFNeutralObj outne[/*nSELCALO*/],
52  PFChargedObj outmu[/*nMU*/]) const;
53 
55  void mergeNeutrals(OutputRegion& out) const override;
56 
57  protected:
58  unsigned int nEMCALO_, nPHOTON_, nALLNEUTRAL_;
59  unsigned int dR2MAX_TK_EM_;
60  unsigned int dR2MAX_EM_CALO_;
61 
62  int tk_best_match_ref(unsigned int dR2MAX,
63  const std::vector<l1ct::EmCaloObjEmu>& calo,
64  const l1ct::TkObjEmu& track) const;
65  int em_best_match_ref(unsigned int dR2MAX,
66  const std::vector<l1ct::HadCaloObjEmu>& calo,
67  const l1ct::EmCaloObjEmu& em) const;
68 
69  void pfalgo3_em_ref(const PFInputRegion& in,
70  const std::vector<int>& iMu /*[nTRACK]*/,
71  std::vector<int>& iEle /*[nTRACK]*/,
73  std::vector<HadCaloObjEmu>& hadcalo_out /*[nCALO]*/) const;
74  };
75 
76 } // namespace l1ct
77 
78 #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:58
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:58
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:14
unsigned int dR2MAX_EM_CALO_
Definition: pfalgo3_ref.h:60
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:58
HLT enums.
unsigned int dR2MAX_TK_EM_
Definition: pfalgo3_ref.h:59
~PFAlgo3Emulator() override
Definition: pfalgo3_ref.h:38
Definition: Common.h:9
Definition: datatypes.h:17