134 std::vector<MET::METCorrectionType> tmpRaw;
135 std::vector<MET::METCorrectionType> tmpType1;
136 std::vector<MET::METCorrectionType> tmpType01;
137 std::vector<MET::METCorrectionType> tmpTypeXY;
138 std::vector<MET::METCorrectionType> tmpType1XY;
139 std::vector<MET::METCorrectionType> tmpType01XY;
140 std::vector<MET::METCorrectionType> tmpType1Smear;
141 std::vector<MET::METCorrectionType> tmpType01Smear;
142 std::vector<MET::METCorrectionType> tmpType1SmearXY;
143 std::vector<MET::METCorrectionType> tmpType01SmearXY;
150 tmpType01XY.push_back(
MET::T1);
151 tmpType1Smear.push_back(
MET::T1);
152 tmpType01Smear.push_back(
MET::T1);
153 tmpType1SmearXY.push_back(
MET::T1);
154 tmpType01SmearXY.push_back(
MET::T1);
157 tmpType01XY.push_back(
MET::T0);
158 tmpType01Smear.push_back(
MET::T0);
159 tmpType01SmearXY.push_back(
MET::T0);
184 std::vector<MET::METCorrectionType> tmpRawCalo;
193 std::map<MET::METCorrectionLevel, std::vector<MET::METCorrectionType> >
::const_iterator itCor_ =
corMap_.find(cor);
194 if(itCor_==
corMap_.end() )
throw cms::Exception(
"Unsupported",
"Specified MET correction scheme does not exist");
196 bool isSmeared=
false;
198 unsigned int scor=itCor_->second.size();
199 for(
unsigned int i=0;
i<scor;
i++) {
234 if(cor!=MET::METCorrectionLevel::RawCalo) {
257 if(cor!=MET::METCorrectionLevel::RawCalo) {
280 if(cor!=MET::METCorrectionLevel::RawCalo) {
305 if(cor!=MET::METCorrectionLevel::RawCalo) {
365 corrections_.resize(MET::METCorrectionType::METCorrectionTypeSize);
373 return shiftedP2(MET::METUncertainty::NoShift, MET::METCorrectionLevel::RawCalo );
390 if (level !=
Type1 && level !=
Raw)
throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
392 if (v.empty())
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
394 if (shift != MET::METUncertainty::NoShift)
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type (only central value available)\n");
395 return Vector2{ (
px() + v.front().dpx()), (
py() + v.front().dpy()) };
402 if (level !=
Type1 && level !=
Raw)
throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
404 if (v.empty())
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
406 if (shift != MET::METUncertainty::NoShift)
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type (only central value available)\n");
407 return Vector(
px() + v.front().dpx(),
py() + v.front().dpy(), 0);
409 return Vector(
px() + v[shift].dpx(),
py() + v[shift].dpy(), 0);
413 if (level !=
Type1 && level !=
Raw)
throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
415 if (v.empty())
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
417 if (shift != MET::METUncertainty::NoShift)
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type (only central value available)\n");
418 double x =
px() + v.front().dpx(),
y =
py() + v.front().dpy();
426 if (level !=
Type1 && level !=
Raw)
throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
428 if (v.empty())
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
430 if (shift != MET::METUncertainty::NoShift)
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type (only central value available)\n");
431 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_
Vector2 corP2(METCorrectionLevel level=Type1) const
T const * get() const
Returns C++ pointer to the item.
std::vector< PackedMETUncertainty > uncertainties_
void setSignificanceMatrix(const reco::METCovMatrix &matrix)
LorentzVector shiftedP4(METUncertainty shift, METCorrectionLevel level=Type1) const
void setUncShift(double px, double py, double sumEt, METUncertainty shift, bool isSmeared=false)
double metSignificance() const
Vector corP3(METCorrectionLevel level=Type1) const
static float float16to32(uint16_t h)
double caloMETSumEt() const
double corSumEt(METCorrectionLevel level=Type1) const
T x() const
Cartesian x coordinate.
void add(float dpx, float dpy, float dsumEt)
SpecificCaloMETData getSpecific() const
PackedMETUncertainty caloPackedMet_
virtual double px() const final
x coordinate of momentum vector
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 &)
virtual double y() const final
rapidity
std::map< MET::METCorrectionLevel, std::vector< MET::METCorrectionType > > corMap_
const reco::GenMET * genMET() const
return the associated GenMET
std::vector< SpecificCaloMETData > caloMET_
this below should be private but Reflex doesn't like it
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< std::vector< double > > tmp
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_
virtual double py() const final
y coordinate of momentum vector
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