146 std::unique_ptr<CorrMETData> type1Correction(
new CorrMETData());
147 for (
typename std::vector<type2BinningEntryType*>::iterator type2BinningEntry =
type2Binning_.begin();
149 ++type2BinningEntry) {
150 (*type2BinningEntry)->binUnclEnergySum_ =
CorrMETData();
151 (*type2BinningEntry)->binOffsetEnergySum_ =
CorrMETData();
167 int numJets = jets->size();
168 for (
int jetIndex = 0; jetIndex < numJets; ++jetIndex) {
169 const T&
jet = jets->at(jetIndex);
174 double emEnergyFraction = jet.chargedEmEnergyFraction() + jet.neutralEmEnergyFraction();
182 const std::vector<reco::CandidatePtr>&
cands = jet.daughterPtrVector();
183 for (std::vector<reco::CandidatePtr>::const_iterator
cand = cands.begin();
cand != cands.end(); ++
cand) {
195 if (checkInputType.isPatJet(jet))
205 if (checkInputType.isPatJet(jet))
210 for (
typename std::vector<type2BinningEntryType*>::iterator type2BinningEntry =
type2Binning_.begin();
212 ++type2BinningEntry) {
213 if (!(*type2BinningEntry)->binSelection_ || (*(*type2BinningEntry)->binSelection_)(corrJetP4)) {
214 (*type2BinningEntry)->binOffsetEnergySum_.mex += (rawJetP4.px() - rawJetP4offsetCorr.px());
215 (*type2BinningEntry)->binOffsetEnergySum_.mey += (rawJetP4.py() - rawJetP4offsetCorr.py());
216 (*type2BinningEntry)->binOffsetEnergySum_.sumet += (rawJetP4.Et() - rawJetP4offsetCorr.Et());
223 type1Correction->mex -= (corrJetP4.px() - rawJetP4offsetCorr.px());
224 type1Correction->mey -= (corrJetP4.py() - rawJetP4offsetCorr.py());
225 type1Correction->sumet += (corrJetP4.Et() - rawJetP4offsetCorr.Et());
227 for (
typename std::vector<type2BinningEntryType*>::iterator type2BinningEntry =
type2Binning_.begin();
229 ++type2BinningEntry) {
230 if (!(*type2BinningEntry)->binSelection_ || (*(*type2BinningEntry)->binSelection_)(corrJetP4)) {
231 (*type2BinningEntry)->binUnclEnergySum_.mex += rawJetP4.px();
232 (*type2BinningEntry)->binUnclEnergySum_.mey += rawJetP4.py();
233 (*type2BinningEntry)->binUnclEnergySum_.sumet += rawJetP4.Et();
245 for (
typename std::vector<type2BinningEntryType*>::const_iterator type2BinningEntry =
type2Binning_.begin();
247 ++type2BinningEntry) {
248 evt.
put(std::unique_ptr<CorrMETData>(
new CorrMETData((*type2BinningEntry)->binUnclEnergySum_)),
249 (*type2BinningEntry)->getInstanceLabel_full(
"type2"));
250 evt.
put(std::unique_ptr<CorrMETData>(
new CorrMETData((*type2BinningEntry)->binOffsetEnergySum_)),
251 (*type2BinningEntry)->getInstanceLabel_full(
"offset"));
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
std::vector< Jet > JetCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
T const * get() const
Returns C++ pointer to the item.
reco::MuonRef muonRef() const
T const * product() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Particle reconstructed by the particle flow algorithm.