37 std::vector<edm::EDGetTokenT<reco::CandidateView>>
ecalCands_;
38 std::vector<edm::EDGetTokenT<reco::CandidateView>>
hcalCands_;
40 std::vector<edm::EDGetTokenT<HcalTrigPrimDigiCollection>>
hcalDigis_;
52 std::unique_ptr<l1tpf_calo::SimpleCaloLinkerBase>
caloLinker_;
71 : ecalOnly_(iConfig.existsAs<
bool>(
"ecalOnly") ? iConfig.getParameter<
bool>(
"ecalOnly") :
false),
72 debug_(iConfig.getUntrackedParameter<
int>(
"debug", 0)),
74 emCorrector_(iConfig.getParameter<
std::
string>(
"emCorrector"), -1, debug_),
75 hcCorrector_(iConfig.getParameter<
std::
string>(
"hcCorrector"), -1, debug_),
76 hadCorrector_(iConfig.getParameter<
std::
string>(
"hadCorrector"),
77 iConfig.getParameter<double>(
"hadCorrectorEmfMax"),
79 ecalClusterer_(iConfig.getParameter<
edm::
ParameterSet>(
"ecalClusterer")),
80 hcalClusterer_(iConfig.getParameter<
edm::
ParameterSet>(
"hcalClusterer")),
82 iConfig.getParameter<
edm::
ParameterSet>(
"linker"), ecalClusterer_, hcalClusterer_)),
84 produces<l1t::PFClusterCollection>(
"ecalCells");
86 produces<l1t::PFClusterCollection>(
"emCalibrated");
87 produces<l1t::PFClusterCollection>(
"emUncalibrated");
89 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"ecalCandidates")) {
96 produces<l1t::PFClusterCollection>(
"hcalCells");
98 produces<l1t::PFClusterCollection>(
"hcalUnclustered");
99 produces<l1t::PFClusterCollection>(
"hcalUncalibrated");
100 produces<l1t::PFClusterCollection>(
"hcalCalibrated");
102 produces<l1t::PFClusterCollection>(
"uncalibrated");
103 produces<l1t::PFClusterCollection>(
"calibrated");
105 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"hcalCandidates")) {
109 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"hcalDigis")) {
110 hcalDigis_.push_back(consumes<HcalTrigPrimDigiCollection>(
tag));
117 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"phase2barrelCaloTowers")) {
121 for (
auto &
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"hcalHGCTowers")) {
137 <<
"adding ECal input pt " << it.pt() <<
", eta " << it.eta() <<
", phi " << it.phi() <<
"\n";
150 <<
"adding HCal cand input pt " << it.pt() <<
", eta " << it.eta() <<
", phi " << it.phi() <<
"\n";
182 <<
"corrected ECal cluster pt " << it.pt() <<
", eta " << it.eta() <<
", phi " << it.phi() <<
"\n";
217 edm::LogWarning(
"L1TPFCaloProducer") <<
"raw linked cluster pt " <<
c.et <<
", eta " <<
c.eta <<
", phi " 218 <<
c.phi <<
", emPt " <<
c.ecal_et <<
"\n";
223 std::unique_ptr<l1t::PFClusterCollection>
clusters =
caloLinker_->fetch(ecalClustH, hcalClustH);
227 edm::LogWarning(
"L1TPFCaloProducer") <<
"calibrated linked cluster pt " <<
c.pt() <<
", eta " <<
c.eta()
228 <<
", phi " <<
c.phi() <<
", emPt " <<
c.emEt() <<
"\n";
242 for (
const auto &itr : *hcalTPs) {
244 double et = decoder.hcaletValue(itr.id(), itr.t0());
255 <<
"adding HCal digi input pt " <<
et <<
", eta " << towerEta <<
", phi " << towerPhi <<
"\n";
265 for (
const auto &
t : *
towers) {
267 if ((
int)
t.towerIEta() == -1016 && (
int)
t.towerIPhi() == -962)
269 if (
debug_ && (
t.hcalTowerEt() > 0 ||
t.ecalTowerEt() > 0)) {
271 <<
"adding phase2 L1 CaloTower eta " <<
t.towerEta() <<
" phi " <<
t.towerPhi() <<
" ieta " 272 <<
t.towerIEta() <<
" iphi " <<
t.towerIPhi() <<
" ecal " <<
t.ecalTowerEt() <<
" hcal " 273 <<
t.hcalTowerEt() <<
"\n";
286 for (
auto it = hgcTowers->
begin(0), ed = hgcTowers->
end(0); it != ed; ++it) {
289 <<
"adding HGC Tower hadEt " << it->etHad() <<
", emEt " << it->etEm() <<
", pt " << it->pt() <<
", eta " 290 << 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 &)
l1tpf::corrector hadCorrector_
float correctedPt(float et, float emEt, float eta) const
#define DEFINE_FWK_MODULE(type)
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
bool getData(T &iHolder) const
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_