CMS 3D CMS Logo

PFSpecificAlgo.cc

Go to the documentation of this file.
00001 /*
00002 class: PFSpecificAlgo.cc
00003 description:  MET made from Particle Flow candidates
00004 authors: R. Remington (UF), R. Cavanaugh (UIC/Fermilab)
00005 date: 10/27/08
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 // This algorithm adds Particle Flow specific global event information to the MET object
00017 //--------------------------------------------------------------------------------------
00018 
00019 reco::PFMET PFSpecificAlgo::addInfo(edm::Handle<edm::View<Candidate> > PFCandidates, CommonMETData met)
00020 {
00021   // Instantiate the container to hold the PF specific information
00022   SpecificPFMETData specific;
00023   // Initialize the container
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()) // if no Particle Flow candidates in the event
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   //Insert code to retreive / calculate specific pf data here:  
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 }

Generated on Tue Jun 9 17:44:06 2009 for CMSSW by  doxygen 1.5.4