File indexing completed on 2024-04-06 12:04:45
0001 #include "DataFormats/METReco/interface/GlobalHaloData.h"
0002 #include "DataFormats/Math/interface/Point3D.h"
0003 #include "DataFormats/Math/interface/LorentzVector.h"
0004
0005
0006
0007
0008
0009
0010
0011
0012 using namespace reco;
0013
0014 GlobalHaloData::GlobalHaloData() {
0015 METOverSumEt_ = 0.;
0016 dMEx_ = 0.;
0017 dMEy_ = 0.;
0018 dSumEt_ = 0.;
0019
0020 segmentisEBcalomatched = false;
0021 segmentisEEcalomatched = false;
0022 segmentisHBcalomatched = false;
0023 segmentisHEcalomatched = false;
0024 halopatternfoundEB = false;
0025 halopatternfoundEE = false;
0026 halopatternfoundHB = false;
0027 halopatternfoundHE = false;
0028 }
0029
0030 reco::CaloMET GlobalHaloData::GetCorrectedCaloMET(const reco::CaloMET& RawMET) const {
0031 double mex = RawMET.px() + dMEx_;
0032 double mey = RawMET.py() + dMEy_;
0033 double mez = RawMET.pz();
0034 double sumet = RawMET.sumEt() + dSumEt_;
0035 const math::XYZTLorentzVector p4(mex, mey, mez, std::sqrt(mex * mex + mey * mey + mez * mez));
0036 const math::XYZPoint vtx(0., 0., 0.);
0037
0038 reco::CaloMET CorrectedMET(RawMET.getSpecific(), sumet, p4, vtx);
0039 return CorrectedMET;
0040 }