16 const reco::PFMET *
pf = dynamic_cast<const reco::PFMET *>(&aMET);
19 const pat::MET *pm = dynamic_cast<const pat::MET *>(&aMET);
36 const pat::MET *pm = dynamic_cast<const pat::MET *>(aMETRef.
get());
53 const pat::MET *pm = dynamic_cast<const pat::MET *>(aMETRef.
get());
65 genMET_(iOther.genMET_),
66 caloMET_(iOther.caloMET_),
67 pfMET_(iOther.pfMET_),
68 metSig_(iOther.metSig_),
69 sumPtUnclustered_(iOther.sumPtUnclustered_),
70 uncertaintiesRaw_(iOther.uncertaintiesRaw_),
71 uncertaintiesType1_(iOther.uncertaintiesType1_),
72 uncertaintiesType1p2_(iOther.uncertaintiesType1p2_),
73 uncertainties_(iOther.uncertainties_),
74 corrections_(iOther.corrections_),
75 caloPackedMet_(iOther.caloPackedMet_) {
87 sumPtUnclustered_(
srcMET.sumPtUnclustered_),
88 caloPackedMet_(
srcMET.caloPackedMet_) {
133 std::vector<MET::METCorrectionType> tmpRaw;
134 std::vector<MET::METCorrectionType> tmpType1;
135 std::vector<MET::METCorrectionType> tmpType01;
136 std::vector<MET::METCorrectionType> tmpTypeXY;
137 std::vector<MET::METCorrectionType> tmpType1XY;
138 std::vector<MET::METCorrectionType> tmpType01XY;
139 std::vector<MET::METCorrectionType> tmpType1Smear;
140 std::vector<MET::METCorrectionType> tmpType01Smear;
141 std::vector<MET::METCorrectionType> tmpType1SmearXY;
142 std::vector<MET::METCorrectionType> tmpType01SmearXY;
149 tmpType01XY.push_back(
MET::T1);
150 tmpType1Smear.push_back(
MET::T1);
151 tmpType01Smear.push_back(
MET::T1);
152 tmpType1SmearXY.push_back(
MET::T1);
153 tmpType01SmearXY.push_back(
MET::T1);
156 tmpType01XY.push_back(
MET::T0);
157 tmpType01Smear.push_back(
MET::T0);
158 tmpType01SmearXY.push_back(
MET::T0);
183 std::vector<MET::METCorrectionType> tmpRawCalo;
188 std::vector<MET::METCorrectionType> tmpRawChs;
193 std::vector<MET::METCorrectionType> tmpRawTrk;
198 std::vector<MET::METCorrectionType> tmpDeepResponse;
203 std::vector<MET::METCorrectionType> tmpDeepResolution;
210 std::map<MET::METCorrectionLevel, std::vector<MET::METCorrectionType> >
::const_iterator itCor_ =
corMap_.find(cor);
212 throw cms::Exception(
"Unsupported",
"Specified MET correction scheme does not exist");
214 bool isSmeared =
false;
216 unsigned int scor = itCor_->second.size();
217 for (
unsigned int i = 0;
i < scor;
i++) {
232 throw cms::Exception(
"Unsupported",
"MET uncertainty does not exist");
248 if (cor != MET::METCorrectionLevel::RawCalo) {
269 if (cor != MET::METCorrectionLevel::RawCalo) {
290 if (cor != MET::METCorrectionLevel::RawCalo) {
299 double x =
px() +
v.dpx(),
y =
py() +
v.dpy();
313 if (cor != MET::METCorrectionLevel::RawCalo) {
321 sumEto =
sumEt() +
v.dsumEt();
354 corrections_.resize(MET::METCorrectionType::METCorrectionTypeSize);
361 return shiftedP2(MET::METUncertainty::NoShift, MET::METCorrectionLevel::RawCalo);
373 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
376 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
378 if (
shift != MET::METUncertainty::NoShift)
381 "MET uncertainties not available for the specified correction type (only central value available)\n");
382 return Vector2{(
px() +
v.front().dpx()), (
py() +
v.front().dpy())};
390 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
393 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
395 if (
shift != MET::METUncertainty::NoShift)
398 "MET uncertainties not available for the specified correction type (only central value available)\n");
399 return Vector(
px() +
v.front().dpx(),
py() +
v.front().dpy(), 0);
406 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
409 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
411 if (
shift != MET::METUncertainty::NoShift)
414 "MET uncertainties not available for the specified correction type (only central value available)\n");
415 double x =
px() +
v.front().dpx(),
y =
py() +
v.front().dpy();
424 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
427 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
429 if (
shift != MET::METUncertainty::NoShift)
432 "MET uncertainties not available for the specified correction type (only central value available)\n");
433 return sumEt() +
v.front().dsumEt();