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 "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionFactory.h"
00034 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionBaseClass.h"
00035 #include "CondFormats/EcalObjects/interface/EcalFunctionParameters.h"
00036
00037
00038 class PhotonProducer : public edm::EDProducer {
00039
00040 public:
00041
00042 PhotonProducer (const edm::ParameterSet& ps);
00043 ~PhotonProducer();
00044
00045 virtual void beginRun (edm::Run& r, edm::EventSetup const & es);
00046 virtual void endRun(edm::Run &, edm::EventSetup const&);
00047 virtual void produce(edm::Event& evt, const edm::EventSetup& es);
00048
00049 private:
00050
00051 void fillPhotonCollection(edm::Event& evt,
00052 edm::EventSetup const & es,
00053 const edm::Handle<reco::PhotonCoreCollection> & photonCoreHandle,
00054 const CaloTopology *topology,
00055 const EcalRecHitCollection* ecalBarrelHits,
00056 const EcalRecHitCollection* ecalEndcapHits,
00057 const edm::Handle<CaloTowerCollection> & hcalTowersHandle,
00058 math::XYZPoint & vtx,
00059 reco::PhotonCollection & outputCollection,
00060 int& iSC);
00061
00062
00063
00064
00065
00066
00067 std::string PhotonCollection_;
00068 edm::InputTag photonCoreProducer_;
00069 edm::InputTag barrelEcalHits_;
00070 edm::InputTag endcapEcalHits_;
00071
00072 edm::InputTag hcalTowers_;
00073
00074 std::string conversionProducer_;
00075 std::string conversionCollection_;
00076
00077 double hOverEConeSize_;
00078 double maxHOverE_;
00079 double minSCEt_;
00080 double highEt_;
00081 double minR9Barrel_;
00082 double minR9Endcap_;
00083
00084 bool validConversions_;
00085 std::string pixelSeedProducer_;
00086 std::string vertexProducer_;
00087 bool usePrimaryVertex_;
00088 edm::ParameterSet conf_;
00089
00090 PositionCalc posCalculator_;
00091
00092
00093 edm::ESHandle<CaloGeometry> theCaloGeom_;
00094 edm::ESHandle<CaloTopology> theCaloTopo_;
00095
00096
00097
00098 bool validPixelSeeds_;
00099 PhotonIsolationCalculator* thePhotonIsolationCalculator_;
00100
00101
00102 std::vector<double> preselCutValuesBarrel_;
00103 std::vector<double> preselCutValuesEndcap_;
00104
00105 EcalClusterFunctionBaseClass* energyCorrectionF;
00106
00107 };
00108 #endif