CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.cc

Go to the documentation of this file.
00001 #include "DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.h"
00002 
00003 #include "FWCore/Framework/interface/Event.h"
00004 #include "DataFormats/Common/interface/Handle.h"
00005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00006 #include "FWCore/Utilities/interface/InputTag.h"
00007 
00008 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00009 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00010 
00011 #include "DQMServices/Core/interface/DQMStore.h"
00012 #include "FWCore/ServiceRegistry/interface/Service.h"
00013 
00014 // #include "DQMServices/Core/interface/MonitorElement.h"
00015 // #include <TH1F.h>
00016 
00017 using namespace reco;
00018 using namespace edm;
00019 using namespace std;
00020 
00021 
00022 
00023 PFCandidateManagerAnalyzer::PFCandidateManagerAnalyzer(const edm::ParameterSet& parameterSet) : 
00024   BenchmarkAnalyzer(parameterSet),
00025   PFCandidateManager( parameterSet.getParameter<double>("dRMax"),
00026                       parameterSet.getParameter<bool>("matchCharge"), 
00027                       (Benchmark::Mode) parameterSet.getParameter<int>("mode") ),
00028   matchLabel_( parameterSet.getParameter<InputTag>("MatchCollection") )
00029 {
00030   setRange( parameterSet.getParameter<double>("ptMin"),
00031             parameterSet.getParameter<double>("ptMax"),
00032             parameterSet.getParameter<double>("etaMin"),
00033             parameterSet.getParameter<double>("etaMax"),
00034             parameterSet.getParameter<double>("phiMin"),
00035             parameterSet.getParameter<double>("phiMax") );
00036 
00037 }
00038 
00039 
00040 void 
00041 PFCandidateManagerAnalyzer::beginJob()
00042 {
00043 
00044   BenchmarkAnalyzer::beginJob();
00045   setup();
00046 }
00047 
00048 void 
00049 PFCandidateManagerAnalyzer::analyze(const edm::Event& iEvent, 
00050                                       const edm::EventSetup& iSetup) {
00051   
00052 
00053   
00054   Handle<PFCandidateCollection> collection; 
00055   iEvent.getByLabel( inputLabel_, collection); 
00056 
00057   Handle< View<Candidate> >  matchCollection;
00058   iEvent.getByLabel( matchLabel_, matchCollection);
00059 
00060   fill( *collection, *matchCollection );
00061 }
00062 
00063 void PFCandidateManagerAnalyzer::endJob() {
00064 }