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;
200 std::map<MET::METCorrectionLevel, std::vector<MET::METCorrectionType> >
::const_iterator itCor_ =
corMap_.find(cor);
202 throw cms::Exception(
"Unsupported",
"Specified MET correction scheme does not exist");
204 bool isSmeared =
false;
206 unsigned int scor = itCor_->second.size();
207 for (
unsigned int i = 0;
i < scor;
i++) {
222 throw cms::Exception(
"Unsupported",
"MET uncertainty does not exist");
238 if (cor != MET::METCorrectionLevel::RawCalo) {
259 if (cor != MET::METCorrectionLevel::RawCalo) {
280 if (cor != MET::METCorrectionLevel::RawCalo) {
303 if (cor != MET::METCorrectionLevel::RawCalo) {
344 corrections_.resize(MET::METCorrectionType::METCorrectionTypeSize);
351 return shiftedP2(MET::METUncertainty::NoShift, MET::METCorrectionLevel::RawCalo);
363 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
366 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
368 if (shift != MET::METUncertainty::NoShift)
371 "MET uncertainties not available for the specified correction type (only central value available)\n");
372 return Vector2{(
px() + v.front().dpx()), (
py() + v.front().dpy())};
380 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
383 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
385 if (shift != MET::METUncertainty::NoShift)
388 "MET uncertainties not available for the specified correction type (only central value available)\n");
389 return Vector(
px() + v.front().dpx(),
py() + v.front().dpy(), 0);
391 return Vector(
px() + v[shift].dpx(),
py() + v[shift].dpy(), 0);
396 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
399 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
401 if (shift != MET::METUncertainty::NoShift)
404 "MET uncertainties not available for the specified correction type (only central value available)\n");
405 double x =
px() + v.front().dpx(),
y =
py() + v.front().dpy();
414 throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
417 throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
419 if (shift != MET::METUncertainty::NoShift)
422 "MET uncertainties not available for the specified correction type (only central value available)\n");
423 return sumEt() + v.front().dsumEt();
Analysis-level MET class.
std::vector< double > dsumEt() const
value_type const * get() const
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Vector2 shiftedP2_74x(METUncertainty shift, METCorrectionLevel level) const
const PackedMETUncertainty findMETTotalShift(MET::METCorrectionLevel cor, MET::METUncertainty shift) const
SpecificPFMETData getSpecific() const
math::XYZVector Vector
point in the space
Vector2 caloMETP2() const
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
ret
prodAgent to be discontinued
Vector2 corP2(METCorrectionLevel level=Type1) const
T const * get() const
Returns C++ pointer to the item.
std::vector< PackedMETUncertainty > uncertainties_
double px() const final
x coordinate of momentum vector
void setSignificanceMatrix(const reco::METCovMatrix &matrix)
double y() const final
rapidity
LorentzVector shiftedP4(METUncertainty shift, METCorrectionLevel level=Type1) const
void setUncShift(double px, double py, double sumEt, METUncertainty shift, bool isSmeared=false)
~MET() override
destructor
double metSignificance() const
Vector corP3(METCorrectionLevel level=Type1) const
static float float16to32(uint16_t h)
double caloMETSumEt() const
double corSumEt(METCorrectionLevel level=Type1) const
void add(float dpx, float dpy, float dsumEt)
SpecificCaloMETData getSpecific() const
PackedMETUncertainty caloPackedMet_
static uint16_t float32to16(float x)
LorentzVector corP4(METCorrectionLevel level=Type1) const
Vector2 shiftedP2(METUncertainty shift, METCorrectionLevel level=Type1) const
double caloMETPhi() const
double shiftedSumEt(METUncertainty shift, METCorrectionLevel level=Type1) const
std::vector< reco::GenMET > genMET_
LorentzVector shiftedP4_74x(METUncertainty shift, METCorrectionLevel level) const
double shiftedSumEt_74x(METUncertainty shift, METCorrectionLevel level) const
double uncorSumEt() const
MET & operator=(MET const &)
void setMETSumPtUnclustered(const double &sumPtUnclustered)
std::map< MET::METCorrectionLevel, std::vector< MET::METCorrectionType > > corMap_
const reco::GenMET * genMET() const
return the associated GenMET
double py() const final
y coordinate of momentum vector
std::vector< SpecificCaloMETData > caloMET_
this below should be private but Reflex doesn't like it
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< PackedMETUncertainty > uncertaintiesType1_
std::vector< PackedMETUncertainty > corrections_
math::XYZVector Vector
point in the space
static unsigned int const shift
LorentzVector uncorP4() const
Templated PAT object container.
void setCorShift(double px, double py, double sumEt, METCorrectionType level)
void setGenMET(const reco::GenMET &gm)
set the associated GenMET
std::vector< SpecificPFMETData > pfMET_
double metSumPtUnclustered() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void setMETSignificance(const double &metSig)
Vector shiftedP3_74x(METUncertainty shift, METCorrectionLevel level) const
reco::METCovMatrix getSignificanceMatrix(void) const
Vector shiftedP3(METUncertainty shift, METCorrectionLevel level=Type1) const