95 auto pOut = std::make_unique<reco::JPTJetCollection>();
97 for (
unsigned i = 0;
i < jets_h->size(); ++
i) {
104 double factorZSP = 1.;
112 double scaleJPT = 1.;
124 corrected.
py() * scaleJPT,
125 corrected.
pz() * scaleJPT,
126 corrected.
energy() * scaleJPT);
159 double deEta2Tr = 0.;
160 double dePhi2Tr = 0.;
164 double denominator_tracks = 0.;
169 double deR =
deltaR((*it)->eta(), (*it)->phi(),
p4.eta(),
p4.phi());
170 double deEta = (*it)->eta() -
p4.eta();
171 double dePhi =
deltaPhi((*it)->phi(),
p4.phi());
172 if ((**it).ptError() / (**it).pt() < 0.1) {
173 deR2Tr = deR2Tr + deR * deR * (*it)->pt();
174 deEta2Tr = deEta2Tr + deEta * deEta * (*it)->pt();
175 dePhi2Tr = dePhi2Tr + dePhi * dePhi * (*it)->pt();
176 denominator_tracks = denominator_tracks + (*it)->pt();
177 Zch = Zch + (*it)->pt();
179 Pout2 = Pout2 + (**it).p() * (**it).p() - (Zch *
p4.P()) * (Zch *
p4.P());
186 double deR =
deltaR((*it)->eta(), (*it)->phi(),
p4.eta(),
p4.phi());
187 double deEta = (*it)->eta() -
p4.eta();
188 double dePhi =
deltaPhi((*it)->phi(),
p4.phi());
189 if ((**it).ptError() / (**it).pt() < 0.1) {
190 deR2Tr = deR2Tr + deR * deR * (*it)->pt();
191 deEta2Tr = deEta2Tr + deEta * deEta * (*it)->pt();
192 dePhi2Tr = dePhi2Tr + dePhi * dePhi * (*it)->pt();
193 denominator_tracks = denominator_tracks + (*it)->pt();
194 Zch = Zch + (*it)->pt();
196 Pout2 = Pout2 + (**it).p() * (**it).p() - (Zch *
p4.P()) * (Zch *
p4.P());
202 double deR =
deltaR((*it)->eta(), (*it)->phi(),
p4.eta(),
p4.phi());
203 double deEta = (*it)->eta() -
p4.eta();
204 double dePhi =
deltaPhi((*it)->phi(),
p4.phi());
205 if ((**it).ptError() / (**it).pt() < 0.1) {
206 deR2Tr = deR2Tr + deR * deR * (*it)->pt();
207 deEta2Tr = deEta2Tr + deEta * deEta * (*it)->pt();
208 dePhi2Tr = dePhi2Tr + dePhi * dePhi * (*it)->pt();
209 denominator_tracks = denominator_tracks + (*it)->pt();
210 Zch = Zch + (*it)->pt();
212 Pout2 = Pout2 + (**it).p() * (**it).p() - (Zch *
p4.P()) * (Zch *
p4.P());
219 Zch = Zch + (*it)->pt();
222 it !=
muons.inVertexOutOfCalo_.end();
224 Zch = Zch + (*it)->pt();
227 it !=
elecs.inVertexOutOfCalo_.end();
229 Zch = Zch + (*it)->pt();
238 Pout =
sqrt(fabs(Pout2)) / ntracks;
240 if (denominator_tracks != 0) {
241 deR2Tr = deR2Tr / denominator_tracks;
242 deEta2Tr = deEta2Tr / denominator_tracks;
243 dePhi2Tr = dePhi2Tr / denominator_tracks;
269 if (fJet.pt() >
ptCUT)
270 pOut->push_back(fJet);