CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoEgamma/EgammaHFProducers/plugins/HFRecoEcalCandidateProducer.cc

Go to the documentation of this file.
00001 
00009 #include <iostream>
00010 #include <vector>
00011 #include <memory>
00012 
00013 // Framework
00014 #include "FWCore/Framework/interface/Event.h"
00015 #include "FWCore/Framework/interface/EventSetup.h"
00016 #include "DataFormats/Common/interface/Handle.h"
00017 #include "FWCore/Framework/interface/ESHandle.h"
00018 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00019 #include "FWCore/Utilities/interface/Exception.h"
00020 //
00021 #include "DataFormats/EgammaReco/interface/HFEMClusterShape.h"
00022 #include "DataFormats/EgammaReco/interface/HFEMClusterShapeAssociation.h"
00023 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00024 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
00025 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
00026 
00027 #include "RecoEgamma/EgammaHFProducers/plugins/HFRecoEcalCandidateProducer.h"
00028 
00029 
00030 HFRecoEcalCandidateProducer::HFRecoEcalCandidateProducer(edm::ParameterSet const& conf):
00031   hfclusters_(conf.getParameter<edm::InputTag>("hfclusters")),
00032   algo_(conf.getParameter<bool>("Correct"),
00033         conf.getParameter<double>("e9e25Cut"),
00034         conf.getParameter<double>("intercept2DCut"),
00035         conf.getParameter<std::vector<double> >("e1e9Cut"),
00036         conf.getParameter<std::vector<double> >("eCOREe9Cut"),
00037         conf.getParameter<std::vector<double> >("eSeLCut")) {
00038 
00039   produces<reco::RecoEcalCandidateCollection>();
00040 
00041 } 
00042 
00043 void HFRecoEcalCandidateProducer::produce(edm::Event & e, edm::EventSetup const& iSetup) {  
00044   
00045   
00046   edm::Handle<reco::SuperClusterCollection> super_clus;
00047   edm::Handle<reco::HFEMClusterShapeAssociationCollection> hf_assoc;
00048  
00049   e.getByLabel(hfclusters_,super_clus);
00050   e.getByLabel(hfclusters_,hf_assoc);
00051 
00052   
00053   
00054   // create return data
00055   std::auto_ptr<reco::RecoEcalCandidateCollection> retdata1(new reco::RecoEcalCandidateCollection());
00056 
00057   
00058   algo_.produce(super_clus,*hf_assoc,*retdata1);
00059  
00060   e.put(retdata1);
00061 
00062 }
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074