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.getUntrackedParameter<edm::InputTag>("hfclusters")), 00032 algo_(conf.getParameter<bool>("Correct"),conf.getParameter<double>("e9e25Cut"),conf.getParameter<double>("intercept2DCut")){ 00033 00034 produces<reco::RecoEcalCandidateCollection>(); 00035 00036 } 00037 00038 void HFRecoEcalCandidateProducer::produce(edm::Event & e, edm::EventSetup const& iSetup) { 00039 00040 00041 edm::Handle<reco::SuperClusterCollection> super_clus; 00042 edm::Handle<reco::HFEMClusterShapeAssociationCollection> hf_assoc; 00043 00044 e.getByLabel(hfclusters_,super_clus); 00045 e.getByLabel(hfclusters_,hf_assoc); 00046 00047 00048 00049 // create return data 00050 std::auto_ptr<reco::RecoEcalCandidateCollection> retdata1(new reco::RecoEcalCandidateCollection()); 00051 00052 00053 algo_.produce(super_clus,*hf_assoc,*retdata1); 00054 00055 e.put(retdata1); 00056 00057 } 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069