00001 #ifndef EgammaHLTAlgos_EgammaHLTHcalIsolation_h
00002 #define EgammaHLTAlgos_EgammaHLTHcalIsolation_h
00003
00004
00005
00006
00007
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "DataFormats/EgammaCandidates/interface/Electron.h"
00028 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00029
00030 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00031
00032 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00033 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00034 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00035 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00036 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00037 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00038
00039 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
00040
00041 class HcalSeverityLevelComputer;
00042 class HcalChannelQuality;
00043
00044 class EgammaHLTHcalIsolation
00045 {
00046
00047 public:
00048
00049 EgammaHLTHcalIsolation(float eMinHB,float eMinHE,float etMinHB,float etMinHE,
00050 float innerCone,float outerCone,int depth) :
00051 eMinHB_(eMinHB),eMinHE_(eMinHE),etMinHB_(etMinHB),etMinHE_(etMinHE),
00052 innerCone_(innerCone),outerCone_(outerCone),depth_(depth),
00053 useRecoveredHcalHits_(1),hcalAcceptSeverityLevel_(9){}
00054
00055
00056 std::pair<float,float> getSum(float candEta,float candPhi,
00057 const HBHERecHitCollection* hbhe, const CaloGeometry* geometry,
00058 const HcalSeverityLevelComputer* hcalSevLvlAlgo=NULL,
00059 const HcalChannelQuality* dbHcalChStatus=NULL)const;
00060 float getESum(float candEta,float candPhi,
00061 const HBHERecHitCollection* hbhe,
00062 const CaloGeometry* geometry)const{return getSum(candEta,candPhi,hbhe,geometry).first;}
00063 float getEtSum(float candEta,float candPhi,
00064 const HBHERecHitCollection* hbhe,
00065 const CaloGeometry* geometry)const{return getSum(candEta,candPhi,hbhe,geometry).second;}
00066 float getESum(float candEta,float candPhi,
00067 const HBHERecHitCollection* hbhe,
00068 const CaloGeometry* geometry,
00069 const HcalSeverityLevelComputer* hcalSevLvlAlgo,
00070 const HcalChannelQuality* dbHcalChStatus)const{return getSum(candEta,candPhi,hbhe,geometry,
00071 hcalSevLvlAlgo,dbHcalChStatus).first;}
00072 float getEtSum(float candEta,float candPhi,
00073 const HBHERecHitCollection* hbhe,
00074 const CaloGeometry* geometry,
00075 const HcalSeverityLevelComputer* hcalSevLvlAlgo,
00076 const HcalChannelQuality* dbHcalChStatus)const{return getSum(candEta,candPhi,hbhe,geometry,
00077 hcalSevLvlAlgo,dbHcalChStatus).second;}
00078
00079
00080
00081 static int getEffectiveDepth(const HcalDetId id);
00082
00083 private:
00084 bool acceptHit_(const HcalDetId id,const GlobalPoint& pos,const float hitEnergy,
00085 const float candEta,const float candPhi)const;
00086 bool passMinE_(float energy,const HcalDetId id)const;
00087 bool passMinEt_(float et,const HcalDetId id)const;
00088 bool passDepth_(const HcalDetId id)const;
00089
00090 bool passCleaning_(const CaloRecHit* hit,const HcalSeverityLevelComputer* hcalSevLvlComp,
00091 const HcalChannelQuality* hcalChanStatus)const;
00092
00093 private:
00094
00095
00096
00097 float eMinHB_;
00098 float eMinHE_;
00099 float etMinHB_;
00100 float etMinHE_;
00101 float innerCone_;
00102 float outerCone_;
00103 int depth_;
00104
00105
00106 bool useRecoveredHcalHits_;
00107 int hcalAcceptSeverityLevel_;
00108 };
00109
00110
00111 #endif