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 >();
32 produces<reco::PFJetCollection >();
36 produces<reco::GenJetCollection >();
41 throw cms::Exception(
"InvalidInput") <<
"invalid jet type in HiL1Subtractor\n";
65 auto jets = std::make_unique<reco::GenJetCollection>();
73 int rsize = rs->size();
75 for(
int j = 0; j < rsize; j++){
76 double medianpt=rs->at(j);
81 int jetsize = h_jets->size();
82 for(
int ijet = 0; ijet < jetsize; ++ijet){
86 double jet_eta = jet.
eta();
87 double jet_et = jet.
et();
95 if (jet_eta<-2.5 && jet_eta>-3.5)rho=
medianPtkt[2];
96 if (jet_eta<-1.5 && jet_eta>-2.5)rho=
medianPtkt[3];
97 if (jet_eta<-0.5 && jet_eta>-1.5)rho=
medianPtkt[4];
98 if (jet_eta<0.5 && jet_eta>-0.5)rho=
medianPtkt[5];
99 if (jet_eta<1.5 && jet_eta>0.5)rho=
medianPtkt[6];
100 if (jet_eta<2.5 && jet_eta>1.5)rho=
medianPtkt[7];
101 if (jet_eta<3.5 && jet_eta>2.5)rho=
medianPtkt[8];
103 double jet_area = jet.
jetArea();
105 double CorrFactor =0.;
106 if(rho*jet_area<jet_et) CorrFactor = 1.0 - rho*jet_area/jet_et;
114 jets->push_back(jet);
121 auto jets = std::make_unique<reco::CaloJetCollection>();
130 int rsize = rs->size();
132 for(
int j = 0; j < rsize; j++){
133 double medianpt=rs->at(j);
139 int jetsize = h_jets->size();
141 for(
int ijet = 0; ijet < jetsize; ++ijet){
145 double jet_eta = jet.
eta();
146 double jet_et = jet.
et();
150 if(fabs(jet_eta)<=3){
154 if (jet_eta<-2.5 && jet_eta>-3.5)rho=
medianPtkt[2];
155 if (jet_eta<-1.5 && jet_eta>-2.5)rho=
medianPtkt[3];
156 if (jet_eta<-0.5 && jet_eta>-1.5)rho=
medianPtkt[4];
157 if (jet_eta<0.5 && jet_eta>-0.5)rho=
medianPtkt[5];
158 if (jet_eta<1.5 && jet_eta>0.5)rho=
medianPtkt[6];
159 if (jet_eta<2.5 && jet_eta>1.5)rho=
medianPtkt[7];
160 if (jet_eta<3.5 && jet_eta>2.5)rho=
medianPtkt[8];
162 double jet_area = jet.
jetArea();
164 double CorrFactor =0.;
165 if(rho*jet_area<jet_et) CorrFactor = 1.0 - rho*jet_area/jet_et;
174 jets->push_back(jet);
182 auto jets = std::make_unique<reco::PFJetCollection>();
191 int rsize = rs->size();
193 for(
int j = 0; j < rsize; j++){
194 double medianpt=rs->at(j);
200 int jetsize = h_jets->size();
202 for(
int ijet = 0; ijet < jetsize; ++ijet){
206 double jet_eta = jet.
eta();
207 double jet_et = jet.
et();
211 if(fabs(jet_eta)<=3){
215 if (jet_eta<-2.5 && jet_eta>-3.5)rho=
medianPtkt[2];
216 if (jet_eta<-1.5 && jet_eta>-2.5)rho=
medianPtkt[3];
217 if (jet_eta<-0.5 && jet_eta>-1.5)rho=
medianPtkt[4];
218 if (jet_eta<0.5 && jet_eta>-0.5)rho=
medianPtkt[5];
219 if (jet_eta<1.5 && jet_eta>0.5)rho=
medianPtkt[6];
220 if (jet_eta<2.5 && jet_eta>1.5)rho=
medianPtkt[7];
221 if (jet_eta<3.5 && jet_eta>2.5)rho=
medianPtkt[8];
223 double jet_area = jet.
jetArea();
225 double CorrFactor =0.;
226 if(rho*jet_area<jet_et) CorrFactor = 1.0 - rho*jet_area/jet_et;
235 jets->push_back(jet);
T getParameter(std::string const &) const
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
virtual double eta() const final
momentum pseudorapidity
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_
virtual double et() const final
transverse energy
edm::EDGetTokenT< edm::View< reco::GenJet > > genJetSrc_
Jets made from MC generator particles.
edm::EDGetTokenT< edm::View< reco::CaloJet > > caloJetSrc_
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< edm::View< reco::PFJet > > pfJetSrc_
virtual float jetArea() const
get jet area
edm::EDGetTokenT< std::vector< double > > rhoTag_