00001 #ifndef PhotonIsolationCalculator_H
00002 #define PhotonIsolationCalculator_H
00003
00004 #include "FWCore/Framework/interface/Event.h"
00005 #include "FWCore/Framework/interface/EventSetup.h"
00006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00007 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00008
00009 #include "CondFormats/EcalObjects/interface/EcalChannelStatus.h"
00010 #include "RecoLocalCalo/EcalRecAlgos/interface/EcalSeverityLevelAlgo.h"
00011
00012 #include <string>
00013
00014 class PhotonIsolationCalculator {
00015
00016 public:
00017
00018 PhotonIsolationCalculator(){};
00019
00020 virtual ~PhotonIsolationCalculator(){};
00021
00022 void setup(const edm::ParameterSet& conf,
00023 std::vector<int> flagsEB_,
00024 std::vector<int> flagsEE_,
00025 std::vector<int> severitiesEB_,
00026 std::vector<int> severitiesEE_);
00027
00028 void calculate(const reco::Photon*,
00029 const edm::Event&, const edm::EventSetup& es,
00030 reco::Photon::FiducialFlags& phofid,
00031 reco::Photon::IsolationVariables& phoisolR03,
00032 reco::Photon::IsolationVariables& phoisolR04 );
00033
00034 void classify(const reco::Photon* photon,
00035 bool &isEBPho,
00036 bool &isEEPho,
00037 bool &isEBEtaGap,
00038 bool &isEBPhiGap,
00039 bool &isEERingGap,
00040 bool &isEEDeeGap,
00041 bool &isEBEEGap);
00042 void calculateTrackIso(const reco::Photon* photon,
00043 const edm::Event &e,
00044 double &trkCone,
00045 int &ntrkCone,
00046 double pTThresh=0,
00047 double RCone=.4,
00048 double RinnerCone=.1,
00049 double etaSlice=0.015,
00050 double lip=0.2,
00051 double d0=0.1);
00052
00053
00054
00055 double calculateEcalRecHitIso(const reco::Photon* photon,
00056 const edm::Event& iEvent,
00057 const edm::EventSetup& iSetup,
00058 double RCone,
00059 double RConeInner,
00060 double etaSlice,
00061 double eMin,
00062 double etMin,
00063 bool vetoClusteredHits,
00064 bool useNumCrystals);
00065
00066 double calculateHcalTowerIso(const reco::Photon* photon,
00067 const edm::Event& iEvent,
00068 const edm::EventSetup& iSetup,
00069 double RCone,
00070 double RConeInner,
00071 double eMin,
00072 signed int depth);
00073
00074
00075 double calculateHcalTowerIso(const reco::Photon* photon,
00076 const edm::Event& iEvent,
00077 const edm::EventSetup& iSetup,
00078 double RCone,
00079 double eMin,
00080 signed int depth);
00081
00082
00083
00084
00085 protected:
00086
00087 edm::InputTag barrelecalCollection_;
00088 edm::InputTag endcapecalCollection_;
00089 edm::InputTag hcalCollection_;
00090
00091 edm::InputTag trackInputTag_;
00092 edm::InputTag beamSpotProducerTag_;
00093 double modulePhiBoundary_;
00094 std::vector<double> moduleEtaBoundary_;
00095 bool vetoClusteredEcalHits_;
00096 bool useNumCrystals_;
00097
00098 std::vector<double> trkIsoBarrelRadiusA_;
00099 std::vector<double> ecalIsoBarrelRadiusA_;
00100 std::vector<double> hcalIsoBarrelRadiusA_;
00101 std::vector<double> trkIsoBarrelRadiusB_;
00102 std::vector<double> ecalIsoBarrelRadiusB_;
00103 std::vector<double> hcalIsoBarrelRadiusB_;
00104
00105 std::vector<double> trkIsoEndcapRadiusA_;
00106 std::vector<double> ecalIsoEndcapRadiusA_;
00107 std::vector<double> hcalIsoEndcapRadiusA_;
00108 std::vector<double> trkIsoEndcapRadiusB_;
00109 std::vector<double> ecalIsoEndcapRadiusB_;
00110 std::vector<double> hcalIsoEndcapRadiusB_;
00111
00112
00113 double photonEcalRecHitConeInnerRadiusA_;
00114 double photonEcalRecHitConeOuterRadiusA_;
00115 double photonEcalRecHitEtaSliceA_;
00116 double photonEcalRecHitThreshEA_;
00117 double photonEcalRecHitThreshEtA_;
00118 double photonHcalTowerConeInnerRadiusA_;
00119 double photonHcalTowerConeOuterRadiusA_;
00120 double photonHcalTowerThreshEA_;
00121 double photonHcalDepth1TowerConeInnerRadiusA_;
00122 double photonHcalDepth1TowerConeOuterRadiusA_;
00123 double photonHcalDepth1TowerThreshEA_;
00124 double photonHcalDepth2TowerConeInnerRadiusA_;
00125 double photonHcalDepth2TowerConeOuterRadiusA_;
00126 double photonHcalDepth2TowerThreshEA_;
00127 double trackConeOuterRadiusA_;
00128 double trackConeInnerRadiusA_;
00129 double isolationtrackThresholdA_;
00130 double isolationtrackEtaSliceA_;
00131 double trackLipRadiusA_;
00132 double trackD0RadiusA_;
00133
00134 std::vector<int> flagsEB_;
00135 std::vector<int> flagsEE_;
00136 std::vector<int> severityExclEB_;
00137 std::vector<int> severityExclEE_;
00138
00139 double photonEcalRecHitConeInnerRadiusB_;
00140 double photonEcalRecHitConeOuterRadiusB_;
00141 double photonEcalRecHitEtaSliceB_;
00142 double photonEcalRecHitThreshEB_;
00143 double photonEcalRecHitThreshEtB_;
00144 double photonHcalTowerConeInnerRadiusB_;
00145 double photonHcalTowerConeOuterRadiusB_;
00146 double photonHcalTowerThreshEB_;
00147 double photonHcalDepth1TowerConeInnerRadiusB_;
00148 double photonHcalDepth1TowerConeOuterRadiusB_;
00149 double photonHcalDepth1TowerThreshEB_;
00150 double photonHcalDepth2TowerConeInnerRadiusB_;
00151 double photonHcalDepth2TowerConeOuterRadiusB_;
00152 double photonHcalDepth2TowerThreshEB_;
00153 double trackConeOuterRadiusB_;
00154 double trackConeInnerRadiusB_;
00155 double isolationtrackThresholdB_;
00156 double isolationtrackEtaSliceB_;
00157 double trackLipRadiusB_;
00158 double trackD0RadiusB_;
00159 };
00160
00161 #endif // PhotonIsolationCalculator_H