59 genMET_(iOther.genMET_),
60 caloMET_(iOther.caloMET_),
61 pfMET_(iOther.pfMET_),
62 metSig_(iOther.metSig_),
63 uncertaintiesRaw_(iOther.uncertaintiesRaw_),
64 uncertaintiesType1_(iOther.uncertaintiesType1_),
65 uncertaintiesType1p2_(iOther.uncertaintiesType1p2_),
66 uncertainties_(iOther.uncertainties_),
67 corrections_(iOther.corrections_),
68 caloPackedMet_(iOther.caloPackedMet_) {
77 genMET_(srcMET.genMET_),
78 caloMET_(srcMET.caloMET_),
79 pfMET_(srcMET.pfMET_),
80 metSig_(srcMET.metSig_),
81 caloPackedMet_(srcMET.caloPackedMet_) {
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);
182 std::vector<MET::METCorrectionType> tmpRawCalo;
191 std::map<MET::METCorrectionLevel, std::vector<MET::METCorrectionType> >
::const_iterator itCor_ =
corMap_.find(cor);
192 if(itCor_==
corMap_.end() )
throw cms::Exception(
"Unsupported",
"Specified MET correction scheme does not exist");
194 bool isSmeared=
false;
196 unsigned int scor=itCor_->second.size();
197 for(
unsigned int i=0;
i<scor;
i++) {
232 if(cor!=MET::METCorrectionLevel::RawCalo) {
255 if(cor!=MET::METCorrectionLevel::RawCalo) {
278 if(cor!=MET::METCorrectionLevel::RawCalo) {
303 if(cor!=MET::METCorrectionLevel::RawCalo) {
363 corrections_.resize(MET::METCorrectionType::METCorrectionTypeSize);
371 return shiftedP2(MET::METUncertainty::NoShift, MET::METCorrectionLevel::RawCalo );
388 if (level !=
Type1 && level !=
Raw)
throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
390 if (v.empty())
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
392 if (shift != MET::METUncertainty::NoShift)
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type (only central value available)\n");
393 return Vector2{ (
px() + v.front().dpx()), (
py() + v.front().dpy()) };
400 if (level !=
Type1 && level !=
Raw)
throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples \n");
402 if (v.empty())
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
404 if (shift != MET::METUncertainty::NoShift)
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type (only central value available)\n");
405 return Vector(
px() + v.front().dpx(),
py() + v.front().dpy(), 0);
407 return Vector(
px() + v[shift].dpx(),
py() + v[shift].dpy(), 0);
411 if (level !=
Type1 && level !=
Raw)
throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
413 if (v.empty())
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
415 if (shift != MET::METUncertainty::NoShift)
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type (only central value available)\n");
416 double x =
px() + v.front().dpx(),
y =
py() + v.front().dpy();
424 if (level !=
Type1 && level !=
Raw)
throw cms::Exception(
"Unsupported",
"MET uncertainties only supported for Raw and Type1 in 74X samples\n");
426 if (v.empty())
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type\n");
428 if (shift != MET::METUncertainty::NoShift)
throw cms::Exception(
"Unsupported",
"MET uncertainties not available for the specified correction type (only central value available)\n");
429 return sumEt() + v.front().dsumEt();
Analysis-level MET class.
std::vector< double > dsumEt() const
value_type const * get() const
tuple ret
prodAgent to be discontinued
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)
virtual 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)
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_
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
virtual double py() const final
y coordinate of momentum vector
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 &)
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
virtual double px() const final
x coordinate of momentum vector
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_
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