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++) {
219 totShift.
add(
up.dpx(),
up.dpy(),
up.dsumEt());
231 throw cms::Exception(
"Unsupported",
"MET uncertainty does not exist");
236 totShift.
add(
up.dpx(),
up.dpy(),
up.dsumEt());
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();
355 corrections_.resize(MET::METCorrectionType::METCorrectionTypeSize);
362 return shiftedP2(MET::METUncertainty::NoShift, MET::METCorrectionLevel::RawCalo);
374 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
377 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
379 if (
shift != MET::METUncertainty::NoShift)
382 "MET uncertainties not available for the specified correction type (only central value available)\n");
383 auto const &
p =
v.front();
384 return Vector2{(
px() +
p.unpackDpx()), (
py() +
p.unpackDpy())};
393 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
396 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
398 if (
shift != MET::METUncertainty::NoShift)
401 "MET uncertainties not available for the specified correction type (only central value available)\n");
402 auto const &
p =
v.front();
403 return Vector(
px() +
p.unpackDpx(),
py() +
p.unpackDpy(), 0);
406 return Vector(
px() +
p.unpackDpx(),
py() +
p.unpackDpy(), 0);
411 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
414 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
416 if (
shift != MET::METUncertainty::NoShift)
419 "MET uncertainties not available for the specified correction type (only central value available)\n");
420 auto const &
p =
v.front();
421 double x =
px() +
p.unpackDpx(),
y =
py() +
p.unpackDpy();
425 double x =
px() +
p.unpackDpx(),
y =
py() +
p.unpackDpy();
431 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
434 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
436 if (
shift != MET::METUncertainty::NoShift)
439 "MET uncertainties not available for the specified correction type (only central value available)\n");
440 return sumEt() +
v.front().unpackDSumEt();
Analysis-level MET class.
LorentzVector uncorP4() const
std::vector< double > dsumEt() const
UnpackedMETUncertainty unpack() const
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Basic3DVector & operator=(const Basic3DVector &)=default
Assignment operator.
MPlex< T, D1, D2, N > hypot(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
LorentzVector shiftedP4_74x(METUncertainty shift, METCorrectionLevel level) const
double y() const final
rapidity
math::XYZVector Vector
point in the space
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
LorentzVector shiftedP4(METUncertainty shift, METCorrectionLevel level=Type1) const
Vector shiftedP3_74x(METUncertainty shift, METCorrectionLevel level) const
ret
prodAgent to be discontinued
std::vector< PackedMETUncertainty > uncertainties_
void setSignificanceMatrix(const reco::METCovMatrix &matrix)
UnpackedMETUncertainty findMETTotalShift(MET::METCorrectionLevel cor, MET::METUncertainty shift) const
double caloMETPhi() const
Vector2 corP2(METCorrectionLevel level=Type1) const
void setUncShift(double px, double py, double sumEt, METUncertainty shift, bool isSmeared=false)
~MET() override
destructor
Vector2 caloMETP2() const
static float float16to32(uint16_t h)
const reco::GenMET * genMET() const
return the associated GenMET
float unpackDSumEt() const
double px() const final
x coordinate of momentum vector
double p() const final
magnitude of momentum vector
double metSumPtUnclustered() const
PackedMETUncertainty caloPackedMet_
void add(float dpx, float dpy, float dsumEt)
static uint16_t float32to16(float x)
LorentzVector corP4(METCorrectionLevel level=Type1) const
Vector corP3(METCorrectionLevel level=Type1) const
std::vector< reco::GenMET > genMET_
double py() const final
y coordinate of momentum vector
double shiftedSumEt(METUncertainty shift, METCorrectionLevel level=Type1) const
T const * get() const
Returns C++ pointer to the item.
MET & operator=(MET const &)
void setMETSumPtUnclustered(const double &sumPtUnclustered)
std::map< MET::METCorrectionLevel, std::vector< MET::METCorrectionType > > corMap_
std::vector< SpecificCaloMETData > caloMET_
this below should be private but Reflex doesn't like it
Vector2 shiftedP2(METUncertainty shift, METCorrectionLevel level=Type1) const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Vector2 shiftedP2_74x(METUncertainty shift, METCorrectionLevel level) const
std::vector< PackedMETUncertainty > uncertaintiesType1_
std::vector< PackedMETUncertainty > corrections_
double caloMETSumEt() const
double shiftedSumEt_74x(METUncertainty shift, METCorrectionLevel level) const
math::XYZVector Vector
point in the space
static unsigned int const shift
Templated PAT object container.
void setCorShift(double px, double py, double sumEt, METCorrectionType level)
Vector shiftedP3(METUncertainty shift, METCorrectionLevel level=Type1) const
void pack(float dpx, float dpy, float dsumEt)
void setGenMET(const reco::GenMET &gm)
set the associated GenMET
std::vector< SpecificPFMETData > pfMET_
double uncorSumEt() const
value_type const * get() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void setMETSignificance(const double &metSig)
double metSignificance() const
double corSumEt(METCorrectionLevel level=Type1) const