00001 // -*- C++ -*- 00002 // 00003 // Package: EgammaHLTProducers 00004 // Class: EgammaHLTElectronDetaDphiProducer 00005 // 00008 // 00009 // Original Author: Roberto Covarelli (CERN) 00010 // 00011 // $Id: EgammaHLTElectronDetaDphiProducer.h,v 1.6 2013/05/25 15:05:15 chrjones Exp $ 00012 // 00013 // 00014 00015 00016 // system include files 00017 #include <memory> 00018 00019 // user include files 00020 #include "FWCore/Framework/interface/Frameworkfwd.h" 00021 #include "FWCore/Framework/interface/EDProducer.h" 00022 00023 #include "FWCore/Framework/interface/Event.h" 00024 #include "FWCore/Framework/interface/MakerMacros.h" 00025 00026 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00027 00028 #include "DataFormats/Common/interface/Handle.h" 00029 #include "DataFormats/BeamSpot/interface/BeamSpot.h" 00030 #include "DataFormats/Common/interface/Ref.h" 00031 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h" 00032 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h" 00033 00034 class MagneticField; 00035 00036 #include "TTree.h" 00037 00038 class MagneticField; 00039 // 00040 // class declaration 00041 // 00042 00043 class EgammaHLTElectronDetaDphiProducer : public edm::EDProducer { 00044 public: 00045 explicit EgammaHLTElectronDetaDphiProducer(const edm::ParameterSet&); 00046 ~EgammaHLTElectronDetaDphiProducer(); 00047 00048 00049 virtual void produce(edm::Event&, const edm::EventSetup&) override; 00050 virtual void beginRun(edm::Run const&, edm::EventSetup const&) override; 00051 private: 00052 std::pair<float,float> calDEtaDPhiSCTrk(reco::ElectronRef& eleref, const reco::BeamSpot::Point& BSPosition,const MagneticField *magField); 00053 static reco::ElectronRef getEleRef(const reco::RecoEcalCandidateRef& recoEcalCandRef,const edm::Handle<reco::ElectronCollection>& electronHandle); 00054 00055 edm::InputTag electronProducer_; 00056 edm::InputTag recoEcalCandidateProducer_; 00057 00058 bool useSCRefs_; 00059 bool useTrackProjectionToEcal_; 00060 bool variablesAtVtx_; 00061 const MagneticField* magField_; 00062 edm::InputTag bsProducer_; 00063 00064 }; 00065