69 caloJetBTagCollection_(
71 caloJetIDTagCollection_(
75 rho_(consumes<double>(iConfig.getParameter<edm::
InputTag>(
"rho"))),
76 caloJetPtCut(iConfig.getParameter<double>(
"caloJetPtCut")),
78 doMet(iConfig.getParameter<bool>(
"doMet")),
79 doJetBTags(iConfig.getParameter<bool>(
"doJetBTags")),
80 doJetIDTags(iConfig.getParameter<bool>(
"doJetIDTags")) {
82 produces<Run3ScoutingCaloJetCollection>();
83 produces<double>(
"rho");
84 produces<double>(
"caloMetPt");
85 produces<double>(
"caloMetPhi");
100 bool haveJetBTags =
false;
105 bool haveJetIDTags =
false;
107 haveJetIDTags =
true;
113 float bTagValue = -20;
114 float bTagMinDR2 = 0.01;
116 for (
auto&
tag : *caloJetBTagCollection) {
118 if (dR2 < bTagMinDR2) {
120 bTagValue =
tag.second;
124 float idTagValue = -20;
125 float idTagMinDR2 = 0.01;
127 for (
auto&
tag : *caloJetIDTagCollection) {
129 if (dR2 < idTagMinDR2) {
131 idTagValue =
tag.second;
135 outCaloJets->emplace_back(
jet.pt(),
140 jet.maxEInEmTowers(),
141 jet.maxEInHadTowers(),
157 std::unique_ptr<double> outRho(
new double(-999));
159 outRho = std::make_unique<double>(*rho);
164 std::unique_ptr<double> outMetPt(
new double(-999));
165 std::unique_ptr<double> outMetPhi(
new double(-999));
167 outMetPt = std::make_unique<double>(
metCollection->front().pt());
168 outMetPhi = std::make_unique<double>(
metCollection->front().phi());
188 desc.
add<
double>(
"caloJetPtCut", 20.0);
189 desc.
add<
double>(
"caloJetEtaCut", 3.0);
190 desc.
add<
bool>(
"doMet",
true);
191 desc.
add<
bool>(
"doJetBTags",
false);
192 desc.
add<
bool>(
"doJetIDTags",
false);
193 descriptions.
add(
"hltScoutingCaloProducer", desc);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::EDGetTokenT< reco::VertexCollection > vertexCollection_
const edm::EDGetTokenT< reco::CaloMETCollection > metCollection_
#define DEFINE_FWK_MODULE(type)
HLTScoutingCaloProducer(const edm::ParameterSet &)
JetFloatAssociation::Container JetTagCollection
std::vector< Vertex > VertexCollection
const edm::EDGetTokenT< reco::CaloJetCollection > caloJetCollection_
void produce(edm::StreamID sid, edm::Event &iEvent, edm::EventSetup const &setup) const final
std::vector< Run3ScoutingCaloJet > Run3ScoutingCaloJetCollection
ParameterDescriptionBase * add(U const &iLabel, T const &value)
~HLTScoutingCaloProducer() override
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const edm::EDGetTokenT< double > rho_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const double caloJetPtCut
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
tuple caloJetBTagCollection
const double caloJetEtaCut
const edm::EDGetTokenT< reco::JetTagCollection > caloJetIDTagCollection_
tuple caloJetIDTagCollection
const edm::EDGetTokenT< reco::JetTagCollection > caloJetBTagCollection_
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects