73 rho_(consumes<double>(iConfig.getParameter<edm::
InputTag>(
"rho"))),
74 caloJetPtCut(iConfig.getParameter<double>(
"caloJetPtCut")),
75 caloJetEtaCut(iConfig.getParameter<double>(
"caloJetEtaCut")),
76 doMet(iConfig.getParameter<bool>(
"doMet")),
77 doJetBTags(iConfig.getParameter<bool>(
"doJetBTags")),
78 doJetIDTags(iConfig.getParameter<bool>(
"doJetIDTags"))
81 produces<ScoutingCaloJetCollection>();
82 produces<ScoutingVertexCollection>();
83 produces<double>(
"rho");
84 produces<double>(
"caloMetPt");
85 produces<double>(
"caloMetPhi");
103 bool haveJetBTags =
false;
108 bool haveJetIDTags =
false;
110 haveJetIDTags =
true;
113 for(
auto &
jet : *caloJetCollection){
116 float bTagValue = -20;
117 float bTagMinDR2 = 0.01;
119 for(
auto &
tag : *caloJetBTagCollection){
121 if(dR2 < bTagMinDR2){
123 bTagValue =
tag.second;
127 float idTagValue = -20;
128 float idTagMinDR2 = 0.01;
130 for(
auto &
tag : *caloJetIDTagCollection){
132 if(dR2 < idTagMinDR2){
134 idTagValue =
tag.second;
138 outCaloJets->emplace_back(
140 jet.jetArea(),
jet.maxEInEmTowers(),
jet.maxEInHadTowers(),
141 jet.hadEnergyInHB(),
jet.hadEnergyInHE(),
jet.hadEnergyInHF(),
142 jet.emEnergyInEB(),
jet.emEnergyInEE(),
jet.emEnergyInHF(),
143 jet.towersArea(), idTagValue, bTagValue
155 outVertices->emplace_back(
156 vtx.x(), vtx.y(), vtx.z(), vtx.zError()
163 std::auto_ptr<double> outRho(
new double(-999));
165 outRho.reset(
new double(*
rho));
170 std::auto_ptr<double> outMetPt(
new double(-999));
171 std::auto_ptr<double> outMetPhi(
new double(-999));
178 iEvent.
put(outCaloJets);
179 iEvent.
put(outVertices);
180 iEvent.
put(outRho,
"rho");
181 iEvent.
put(outMetPt,
"caloMetPt");
182 iEvent.
put(outMetPhi,
"caloMetPhi");
195 desc.
add<
double>(
"caloJetPtCut", 20.0);
196 desc.
add<
double>(
"caloJetEtaCut", 3.0);
197 desc.
add<
bool>(
"doMet",
true);
198 desc.
add<
bool>(
"doJetBTags",
false);
199 desc.
add<
bool>(
"doJetIDTags",
false);
200 descriptions.
add(
"hltScoutingCaloProducer", desc);
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 &)
std::vector< Vertex > VertexCollection
collection of Vertex objects
JetFloatAssociation::Container JetTagCollection
std::vector< ScoutingCaloJet > ScoutingCaloJetCollection
const edm::EDGetTokenT< reco::CaloJetCollection > caloJetCollection_
std::vector< ScoutingVertex > ScoutingVertexCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual void produce(edm::StreamID sid, edm::Event &iEvent, edm::EventSetup const &setup) const overridefinal
const edm::EDGetTokenT< double > rho_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const double caloJetPtCut
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const double caloJetEtaCut
const edm::EDGetTokenT< reco::JetTagCollection > caloJetIDTagCollection_
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
const edm::EDGetTokenT< reco::JetTagCollection > caloJetBTagCollection_
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
~HLTScoutingCaloProducer()