11 using namespace l1tpf_impl;
17 if (algo ==
"pfalgo3") {
30 bitwiseConfig.
getParameter<uint32_t>(
"TK_MAXINVPT_LOOSE"),
31 bitwiseConfig.
getParameter<uint32_t>(
"TK_MAXINVPT_TIGHT"));
32 }
else if (algo ==
"pfalgo2hgc") {
40 bitwiseConfig.
getParameter<uint32_t>(
"TK_MAXINVPT_LOOSE"),
41 bitwiseConfig.
getParameter<uint32_t>(
"TK_MAXINVPT_TIGHT"));
43 throw cms::Exception(
"Configuration",
"Unsupported bitwiseAlgo " + algo);
65 "BitwisePF\nBitwisePF region eta [ %+5.2f , %+5.2f ], phi [ %+5.2f , %+5.2f ], fiducial eta [ %+5.2f , %+5.2f "
66 "], phi [ %+5.2f , %+5.2f ], algo = %d\n",
75 static_cast<int>(
algo_));
76 dbgPrintf(
"BitwisePF \t N(track) %3lu N(em) %3lu N(calo) %3lu N(mu) %3lu\n",
81 for (
int itk = 0, ntk = r.
track.size(); itk < ntk; ++itk) {
82 const auto &tk = r.
track[itk];
84 "BitwisePF \t track %3d: pt %7.2f +- %5.2f vtx eta %+5.2f vtx phi %+5.2f calo eta %+5.2f calo phi %+5.2f "
85 " fid %1d calo ptErr %7.2f stubs %2d chi2 %7.1f\n",
98 for (
int iem = 0, nem = r.
emcalo.size(); iem < nem; ++iem) {
99 const auto &em = r.
emcalo[iem];
101 "BitwisePF \t EM %3d: pt %7.2f +- %5.2f vtx eta %+5.2f vtx phi %+5.2f calo eta %+5.2f calo phi %+5.2f "
102 " fid %1d calo ptErr %7.2f\n",
113 for (
int ic = 0, nc = r.
calo.size(); ic < nc; ++ic) {
114 auto &calo = r.
calo[ic];
116 "BitwisePF \t calo %3d: pt %7.2f +- %5.2f vtx eta %+5.2f vtx phi %+5.2f calo eta %+5.2f calo phi %+5.2f "
117 " fid %1d calo ptErr %7.2f em pt %7.2f \n",
129 for (
int im = 0, nm = r.
muon.size(); im < nm; ++im) {
130 auto &mu = r.
muon[im];
132 "BitwisePF \t muon %3d: pt %7.2f vtx eta %+5.2f vtx phi %+5.2f calo eta %+5.2f calo phi %+5.2f "
173 dbgPrintf(
"BitwisePF \t Output N(ch) %3u/%3u N(nh) %3u/%3u N(ph) %3u/%u [all/fiducial]\n",
180 for (
int ipf = 0, npf = r.
pf.size(); ipf < npf; ++ipf) {
181 const auto &pf = r.
pf[ipf];
183 "BitwisePF \t pf %3d: pt %7.2f pid %d vtx eta %+5.2f vtx phi %+5.2f calo eta %+5.2f calo phi %+5.2f "
T getUntrackedParameter(std::string const &, T const &) const
enum l1tpf_impl::BitwisePFAlgo::AlgoChoice algo_
std::shared_ptr< pfalgo_config > config_
void convert(const l1tpf_impl::PropagatedTrack &in, TkObj &out)
BitwisePFAlgo(const edm::ParameterSet &)
void dbgPrintf(const char *formatString, Args &&...args)
void convert(const PFChargedObj &src, const l1tpf_impl::PropagatedTrack &track, std::vector< l1tpf_impl::PFParticle > &out)
void runPF(Region &r) const override
void pfalgo3_ref(const pfalgo3_config &cfg, const EmCaloObj emcalo[], const HadCaloObj hadcalo[], const TkObj track[], const MuObj mu[], PFChargedObj outch[], PFNeutralObj outpho[], PFNeutralObj outne[], PFChargedObj outmu[], bool debug)
std::vector< PFParticle > pf
void pfalgo2hgc_ref(const pfalgo_config &cfg, const HadCaloObj calo[], const TkObj track[], const MuObj mu[], PFChargedObj outch[], PFNeutralObj outne[], PFChargedObj outmu[], bool debug)
void initRegion(Region &r) const
~BitwisePFAlgo() override
T getParameter(std::string const &) const
unsigned int nOutput(OutputType type, bool puppi, bool fiducial=true) const
bool fiducialLocal(float localEta, float localPhi) const