10 double puCent[11] = {-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5};
21 : jetType_(iConfig.getParameter<std::
string>(
"jetType")),
22 rhoTagString_(iConfig.getParameter<std::
string>(
"rhoTag"))
28 produces<reco::CaloJetCollection>();
31 produces<reco::PFJetCollection>();
34 produces<reco::GenJetCollection>();
38 throw cms::Exception(
"InvalidInput") <<
"invalid jet type in HiL1Subtractor\n";
54 auto jets = std::make_unique<reco::GenJetCollection>();
62 int rsize = rs->size();
64 for (
int j = 0;
j < rsize;
j++) {
65 double medianpt = rs->at(
j);
70 int jetsize = h_jets->size();
71 for (
int ijet = 0; ijet < jetsize; ++ijet) {
74 double jet_eta = jet.
eta();
75 double jet_et = jet.
et();
79 if (fabs(jet_eta) <= 3) {
82 if (jet_eta < -2.5 && jet_eta > -3.5)
84 if (jet_eta < -1.5 && jet_eta > -2.5)
86 if (jet_eta < -0.5 && jet_eta > -1.5)
88 if (jet_eta < 0.5 && jet_eta > -0.5)
90 if (jet_eta < 1.5 && jet_eta > 0.5)
92 if (jet_eta < 2.5 && jet_eta > 1.5)
94 if (jet_eta < 3.5 && jet_eta > 2.5)
97 double jet_area = jet.
jetArea();
99 double CorrFactor = 0.;
100 if (rho * jet_area < jet_et)
101 CorrFactor = 1.0 - rho * jet_area / jet_et;
109 jets->push_back(jet);
114 auto jets = std::make_unique<reco::CaloJetCollection>();
122 int rsize = rs->size();
124 for (
int j = 0;
j < rsize;
j++) {
125 double medianpt = rs->at(
j);
131 int jetsize = h_jets->size();
133 for (
int ijet = 0; ijet < jetsize; ++ijet) {
136 double jet_eta = jet.
eta();
137 double jet_et = jet.
et();
141 if (fabs(jet_eta) <= 3) {
144 if (jet_eta < -2.5 && jet_eta > -3.5)
146 if (jet_eta < -1.5 && jet_eta > -2.5)
148 if (jet_eta < -0.5 && jet_eta > -1.5)
150 if (jet_eta < 0.5 && jet_eta > -0.5)
152 if (jet_eta < 1.5 && jet_eta > 0.5)
154 if (jet_eta < 2.5 && jet_eta > 1.5)
156 if (jet_eta < 3.5 && jet_eta > 2.5)
159 double jet_area = jet.
jetArea();
161 double CorrFactor = 0.;
162 if (rho * jet_area < jet_et)
163 CorrFactor = 1.0 - rho * jet_area / jet_et;
172 jets->push_back(jet);
177 auto jets = std::make_unique<reco::PFJetCollection>();
185 int rsize = rs->size();
187 for (
int j = 0;
j < rsize;
j++) {
188 double medianpt = rs->at(
j);
194 int jetsize = h_jets->size();
196 for (
int ijet = 0; ijet < jetsize; ++ijet) {
199 double jet_eta = jet.
eta();
200 double jet_et = jet.
et();
204 if (fabs(jet_eta) <= 3) {
207 if (jet_eta < -2.5 && jet_eta > -3.5)
209 if (jet_eta < -1.5 && jet_eta > -2.5)
211 if (jet_eta < -0.5 && jet_eta > -1.5)
213 if (jet_eta < 0.5 && jet_eta > -0.5)
215 if (jet_eta < 1.5 && jet_eta > 0.5)
217 if (jet_eta < 2.5 && jet_eta > 1.5)
219 if (jet_eta < 3.5 && jet_eta > 2.5)
222 double jet_area = jet.
jetArea();
224 double CorrFactor = 0.;
225 if (rho * jet_area < jet_et)
226 CorrFactor = 1.0 - rho * jet_area / jet_et;
235 jets->push_back(jet);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Jets made from CaloTowers.
virtual void scaleEnergy(double fScale)
scale energy of the jet
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void setPileup(float fEnergy)
Set pileup energy contribution as calculated by algorithm.
#define DEFINE_FWK_MODULE(type)
HiL1Subtractor(const edm::ParameterSet &)
Jets made from PFObjects.
std::string rhoTagString_
edm::EDGetTokenT< edm::View< reco::GenJet > > genJetSrc_
void produce(edm::Event &, const edm::EventSetup &) override
Jets made from MC generator particles.
edm::EDGetTokenT< edm::View< reco::CaloJet > > caloJetSrc_
edm::EDGetTokenT< edm::View< reco::PFJet > > pfJetSrc_
~HiL1Subtractor() override
T getParameter(std::string const &) const
double et() const final
transverse energy
virtual float jetArea() const
get jet area
edm::EDGetTokenT< std::vector< double > > rhoTag_
double eta() const final
momentum pseudorapidity