00001
00002
00003
00004
00005
00006
00007
00008 #include "DataFormats/Math/interface/LorentzVector.h"
00009 #include "RecoMET/METAlgorithms/interface/PFSpecificAlgo.h"
00010 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
00011
00012 using namespace reco;
00013 using namespace std;
00014
00015
00016
00017
00018
00019 reco::PFMET PFSpecificAlgo::addInfo(edm::Handle<edm::View<Candidate> > PFCandidates, CommonMETData met)
00020 {
00021
00022 SpecificPFMETData specific;
00023
00024 specific.NeutralEMFraction = 0.0;
00025 specific.NeutralHadFraction = 0.0;
00026 specific.ChargedEMFraction = 0.0;
00027 specific.ChargedHadFraction = 0.0;
00028 specific.MuonFraction = 0.0;
00029
00030
00031 if(!PFCandidates->size())
00032 {
00033 const LorentzVector p4( met.mex, met.mey, 0.0, met.met);
00034 const Point vtx(0.0, 0.0, 0.0 );
00035 PFMET specificPFMET( specific, met.sumet, p4, vtx);
00036 return specificPFMET;
00037 }
00038
00039
00040
00041
00042
00043
00044 const LorentzVector p4(met.mex , met.mey, 0.0, met.met);
00045 const Point vtx(0.0,0.0,0.0);
00046 PFMET specificPFMET( specific, met.sumet, p4, vtx );
00047 return specificPFMET;
00048 }