Go to the documentation of this file.00001 #ifndef RecoEgamma_EgammaPhotonProducers_PhotonProducer_h
00002 #define RecoEgamma_EgammaPhotonProducers_PhotonProducer_h
00003
00013 #include "FWCore/Framework/interface/EDProducer.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "FWCore/Framework/interface/Event.h"
00016 #include "FWCore/Framework/interface/EventSetup.h"
00017 #include "DataFormats/Common/interface/Handle.h"
00018 #include "FWCore/Framework/interface/ESHandle.h"
00019 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00020 #include "Geometry/CaloTopology/interface/CaloTopology.h"
00021 #include "DataFormats/EgammaCandidates/interface/Conversion.h"
00022 #include "DataFormats/EgammaReco/interface/BasicCluster.h"
00023 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00024 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00025 #include "DataFormats/EgammaCandidates/interface/PhotonCore.h"
00026 #include "DataFormats/EgammaReco/interface/BasicClusterShapeAssociation.h"
00027 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
00028 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
00029 #include "DataFormats/EgammaReco/interface/ElectronSeedFwd.h"
00030 #include "RecoCaloTools/MetaCollections/interface/CaloRecHitMetaCollections.h"
00031 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterTools.h"
00032 #include "RecoEgamma/PhotonIdentification/interface/PhotonIsolationCalculator.h"
00033 #include "RecoEgamma/PhotonIdentification/interface/PhotonMIPHaloTagger.h"
00034 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionFactory.h"
00035 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionBaseClass.h"
00036 #include "CondFormats/EcalObjects/interface/EcalFunctionParameters.h"
00037
00038
00039 class PhotonProducer : public edm::EDProducer {
00040
00041 public:
00042
00043 PhotonProducer (const edm::ParameterSet& ps);
00044 ~PhotonProducer();
00045
00046 virtual void beginRun (edm::Run& r, edm::EventSetup const & es);
00047 virtual void endRun(edm::Run &, edm::EventSetup const&);
00048 virtual void produce(edm::Event& evt, const edm::EventSetup& es);
00049
00050 private:
00051
00052 void fillPhotonCollection(edm::Event& evt,
00053 edm::EventSetup const & es,
00054 const edm::Handle<reco::PhotonCoreCollection> & photonCoreHandle,
00055 const CaloTopology *topology,
00056 const EcalRecHitCollection* ecalBarrelHits,
00057 const EcalRecHitCollection* ecalEndcapHits,
00058 const edm::Handle<CaloTowerCollection> & hcalTowersHandle,
00059 math::XYZPoint & vtx,
00060 reco::PhotonCollection & outputCollection,
00061 int& iSC);
00062
00063
00064
00065
00066
00067
00068 std::string PhotonCollection_;
00069 edm::InputTag photonCoreProducer_;
00070 edm::InputTag barrelEcalHits_;
00071 edm::InputTag endcapEcalHits_;
00072
00073 edm::InputTag hcalTowers_;
00074
00075 std::string conversionProducer_;
00076 std::string conversionCollection_;
00077
00078 double hOverEConeSize_;
00079 double maxHOverE_;
00080 double minSCEt_;
00081 double highEt_;
00082 double minR9Barrel_;
00083 double minR9Endcap_;
00084 bool runMIPTagger_;
00085
00086 bool validConversions_;
00087 std::string pixelSeedProducer_;
00088 std::string vertexProducer_;
00089 bool usePrimaryVertex_;
00090 edm::ParameterSet conf_;
00091
00092 PositionCalc posCalculator_;
00093
00094
00095 edm::ESHandle<CaloGeometry> theCaloGeom_;
00096 edm::ESHandle<CaloTopology> theCaloTopo_;
00097
00098
00099
00100 bool validPixelSeeds_;
00101 PhotonIsolationCalculator* thePhotonIsolationCalculator_;
00102
00103
00104 PhotonMIPHaloTagger* thePhotonMIPHaloTagger_;
00105
00106 std::vector<double> preselCutValuesBarrel_;
00107 std::vector<double> preselCutValuesEndcap_;
00108
00109 EcalClusterFunctionBaseClass* energyCorrectionF;
00110
00111 };
00112 #endif