36 std::vector<edm::EDGetTokenT<reco::CandidateView>>
ecalCands_;
37 std::vector<edm::EDGetTokenT<reco::CandidateView>>
hcalCands_;
39 std::vector<edm::EDGetTokenT<HcalTrigPrimDigiCollection>>
hcalDigis_;
51 std::unique_ptr<l1tpf_calo::SimpleCaloLinkerBase>
caloLinker_;
70 : ecalOnly_(iConfig.existsAs<
bool>(
"ecalOnly") ? iConfig.getParameter<
bool>(
"ecalOnly") :
false),
71 debug_(iConfig.getUntrackedParameter<
int>(
"debug", 0)),
73 emCorrector_(iConfig.getParameter<
std::
string>(
"emCorrector"), -1, debug_),
74 hcCorrector_(iConfig.getParameter<
std::
string>(
"hcCorrector"), -1, debug_),
75 hadCorrector_(iConfig.getParameter<
std::
string>(
"hadCorrector"),
76 iConfig.getParameter<double>(
"hadCorrectorEmfMax"),
78 ecalClusterer_(iConfig.getParameter<
edm::
ParameterSet>(
"ecalClusterer")),
79 hcalClusterer_(iConfig.getParameter<
edm::
ParameterSet>(
"hcalClusterer")),
81 iConfig.getParameter<
edm::
ParameterSet>(
"linker"), ecalClusterer_, hcalClusterer_)),
83 produces<l1t::PFClusterCollection>(
"ecalCells");
85 produces<l1t::PFClusterCollection>(
"emCalibrated");
86 produces<l1t::PFClusterCollection>(
"emUncalibrated");
88 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"ecalCandidates")) {
95 produces<l1t::PFClusterCollection>(
"hcalCells");
97 produces<l1t::PFClusterCollection>(
"hcalUnclustered");
98 produces<l1t::PFClusterCollection>(
"hcalUncalibrated");
99 produces<l1t::PFClusterCollection>(
"hcalCalibrated");
101 produces<l1t::PFClusterCollection>(
"uncalibrated");
102 produces<l1t::PFClusterCollection>(
"calibrated");
104 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"hcalCandidates")) {
108 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"hcalDigis")) {
109 hcalDigis_.push_back(consumes<HcalTrigPrimDigiCollection>(
tag));
116 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"phase2barrelCaloTowers")) {
120 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"hcalHGCTowers")) {
136 <<
"adding ECal input pt " << it.pt() <<
", eta " << it.eta() <<
", phi " << it.phi() <<
"\n";
149 <<
"adding HCal cand input pt " << it.pt() <<
", eta " << it.eta() <<
", phi " << it.phi() <<
"\n";
181 <<
"corrected ECal cluster pt " << it.pt() <<
", eta " << it.eta() <<
", phi " << it.phi() <<
"\n";
216 edm::LogWarning(
"L1TPFCaloProducer") <<
"raw linked cluster pt " <<
c.et <<
", eta " <<
c.eta <<
", phi " 217 <<
c.phi <<
", emPt " <<
c.ecal_et <<
"\n";
222 std::unique_ptr<l1t::PFClusterCollection>
clusters =
caloLinker_->fetch(ecalClustH, hcalClustH);
226 edm::LogWarning(
"L1TPFCaloProducer") <<
"calibrated linked cluster pt " <<
c.pt() <<
", eta " <<
c.eta()
227 <<
", phi " <<
c.phi() <<
", emPt " <<
c.emEt() <<
"\n";
241 for (
const auto &itr : *hcalTPs) {
243 double et = decoder.hcaletValue(itr.id(), itr.t0());
254 <<
"adding HCal digi input pt " <<
et <<
", eta " << towerEta <<
", phi " << towerPhi <<
"\n";
264 for (
const auto &
t : *
towers) {
266 if ((
int)
t.towerIEta() == -1016 && (
int)
t.towerIPhi() == -962)
268 if (
debug_ && (
t.hcalTowerEt() > 0 ||
t.ecalTowerEt() > 0)) {
270 <<
"adding phase2 L1 CaloTower eta " <<
t.towerEta() <<
" phi " <<
t.towerPhi() <<
" ieta " 271 <<
t.towerIEta() <<
" iphi " <<
t.towerIPhi() <<
" ecal " <<
t.ecalTowerEt() <<
" hcal " 272 <<
t.hcalTowerEt() <<
"\n";
285 for (
auto it = hgcTowers->
begin(0), ed = hgcTowers->
end(0); it != ed; ++it) {
288 <<
"adding HGC Tower hadEt " << it->etHad() <<
", emEt " << it->etEm() <<
", pt " << it->pt() <<
", eta " 289 << it->eta() <<
", phi " << it->phi() <<
"\n";
std::vector< edm::EDGetTokenT< HcalTrigPrimDigiCollection > > hcalDigis_
T getParameter(std::string const &) const
l1tpf_calo::SingleCaloClusterer hcalClusterer_
void readHcalDigis_(edm::Event &event, const edm::EventSetup &)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
l1tpf::corrector hadCorrector_
float correctedPt(float et, float emEt, float eta) const
l1tpf_calo::SingleCaloClusterer ecalClusterer_
void readHcalHGCTowers_(edm::Event &event, const edm::EventSetup &)
std::vector< edm::EDGetTokenT< reco::CandidateView > > ecalCands_
std::vector< edm::EDGetTokenT< l1t::HGCalTowerBxCollection > > hcalHGCTowers_
std::unique_ptr< SimpleCaloLinkerBase > makeCaloLinker(const edm::ParameterSet &pset, const SingleCaloClusterer &ecal, const SingleCaloClusterer &hcal)
SimpleHGCTC(float aet, float aeta, float aphi)
void add(const reco::Candidate &c)
const_iterator begin(int bx) const
void readPhase2BarrelCaloTowers_(edm::Event &event, const edm::EventSetup &)
Abs< T >::type abs(const T &t)
std::unique_ptr< l1t::PFClusterCollection > fetchCells(bool unclusteredOnly=false, float ptMin=0.) const
#define DEFINE_FWK_MODULE(type)
l1tpf::corrector hcCorrector_
void correct(const Corrector &corrector)
std::vector< edm::EDGetTokenT< reco::CandidateView > > hcalCands_
bool hcalHGCTowersHadOnly_
L1TPFCaloProducer(const edm::ParameterSet &)
std::unique_ptr< l1t::PFClusterCollection > fetch(float ptMin=0.) const
const_iterator end(int bx) const
l1tpf::corrector emCorrector_
std::unique_ptr< l1tpf_calo::SimpleCaloLinkerBase > caloLinker_
Log< level::Warning, false > LogWarning
l1tpf::ParametricResolution resol_
std::vector< edm::EDGetTokenT< l1tp2::CaloTowerCollection > > phase2barrelTowers_
void produce(edm::Event &, const edm::EventSetup &) override
edm::ESGetToken< CaloTPGTranscoder, CaloTPGRecord > decoderTag_