CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/RecoEgamma/EgammaPhotonProducers/interface/PhotonProducer.h

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 "RecoLocalCalo/EcalRecAlgos/interface/EcalSeverityLevelAlgo.h"
00034 #include "RecoEgamma/PhotonIdentification/interface/PhotonMIPHaloTagger.h"
00035 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionFactory.h"
00036 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionBaseClass.h" 
00037 #include "CondFormats/EcalObjects/interface/EcalFunctionParameters.h" 
00038 #include "RecoEgamma/EgammaPhotonAlgos/interface/PhotonEnergyCorrector.h"
00039 
00040 // PhotonProducer inherits from EDProducer, so it can be a module:
00041 class PhotonProducer : public edm::EDProducer {
00042 
00043  public:
00044 
00045   PhotonProducer (const edm::ParameterSet& ps);
00046   ~PhotonProducer();
00047 
00048   virtual void beginRun (edm::Run& r, edm::EventSetup const & es);
00049   virtual void endRun(edm::Run &,  edm::EventSetup const&);
00050   virtual void produce(edm::Event& evt, const edm::EventSetup& es);
00051 
00052  private:
00053 
00054   void fillPhotonCollection(edm::Event& evt,
00055                             edm::EventSetup const & es,
00056                             const edm::Handle<reco::PhotonCoreCollection> & photonCoreHandle,
00057                             const CaloTopology *topology,
00058                             const EcalRecHitCollection* ecalBarrelHits,
00059                             const EcalRecHitCollection* ecalEndcapHits,
00060                             const edm::Handle<CaloTowerCollection> & hcalTowersHandle,
00061                             //math::XYZPoint & vtx,
00062                             reco::VertexCollection& pvVertices,
00063                             reco::PhotonCollection & outputCollection,
00064                             int& iSC,
00065                             const EcalSeverityLevelAlgo * sevLv);
00066 
00067   // std::string PhotonCoreCollection_;
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   //AA
00079   //Flags and severities to be excluded from calculations
00080   
00081   std::vector<int> flagsexclEB_;
00082   std::vector<int> flagsexclEE_;
00083   std::vector<int> severitiesexclEB_;
00084   std::vector<int> severitiesexclEE_;
00085 
00086 
00087   double hOverEConeSize_;
00088   double maxHOverE_;
00089   double minSCEt_;
00090   double highEt_;
00091   double  minR9Barrel_;
00092   double  minR9Endcap_;
00093   bool   runMIPTagger_;
00094 
00095   bool validConversions_;
00096   std::string pixelSeedProducer_;
00097   std::string vertexProducer_;
00098   bool usePrimaryVertex_;
00099   edm::ParameterSet conf_;
00100 
00101   PositionCalc posCalculator_;
00102 
00103   edm::ESHandle<CaloGeometry> theCaloGeom_;
00104   edm::ESHandle<CaloTopology> theCaloTopo_;
00105  
00106   bool validPixelSeeds_;
00107   PhotonIsolationCalculator* thePhotonIsolationCalculator_;
00108 
00109   //MIP
00110   PhotonMIPHaloTagger* thePhotonMIPHaloTagger_;
00111 
00112   std::vector<double>  preselCutValuesBarrel_; 
00113   std::vector<double>  preselCutValuesEndcap_; 
00114 
00115   EcalClusterFunctionBaseClass* energyCorrectionF;
00116   PhotonEnergyCorrector* thePhotonEnergyCorrector_;
00117   std::string  candidateP4type_;
00118 
00119 };
00120 #endif