00001 #ifndef RecoEcal_EgammaCoreTools_EcalClusterLazyTools_h
00002 #define RecoEcal_EgammaCoreTools_EcalClusterLazyTools_h
00003
00014 #include "FWCore/Framework/interface/Event.h"
00015 #include "DataFormats/EgammaReco/interface/BasicCluster.h"
00016 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00017
00018
00019 class CaloTopology;
00020 class CaloGeometry;
00021
00022 class EcalClusterLazyTools {
00023 public:
00024 EcalClusterLazyTools( const edm::Event &ev, const edm::EventSetup &es, edm::InputTag redEBRecHits, edm::InputTag redEERecHits );
00025 ~EcalClusterLazyTools();
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 float e1x3( const reco::BasicCluster &cluster );
00036 float e3x1( const reco::BasicCluster &cluster );
00037 float e1x5( const reco::BasicCluster &cluster );
00038
00039 float e2x2( const reco::BasicCluster &cluster );
00040 float e3x2( const reco::BasicCluster &cluster );
00041 float e3x3( const reco::BasicCluster &cluster );
00042 float e4x4( const reco::BasicCluster &cluster );
00043 float e5x5( const reco::BasicCluster &cluster );
00044
00045
00046 float e2x5Right( const reco::BasicCluster &cluster );
00047
00048 float e2x5Left( const reco::BasicCluster &cluster );
00049
00050
00051 float e2x5Top( const reco::BasicCluster &cluster );
00052
00053 float e2x5Bottom( const reco::BasicCluster &cluster );
00054
00055
00056
00057 float e2x5Max( const reco::BasicCluster &cluster );
00058
00059 float eLeft( const reco::BasicCluster &cluster );
00060 float eRight( const reco::BasicCluster &cluster );
00061 float eTop( const reco::BasicCluster &cluster );
00062 float eBottom( const reco::BasicCluster &cluster );
00063
00064 float eMax( const reco::BasicCluster &cluster );
00065
00066 float e2nd( const reco::BasicCluster &cluster );
00067
00068 std::pair<DetId, float> getMaximum( const reco::BasicCluster &cluster );
00069 std::vector<float> energyBasketFractionEta( const reco::BasicCluster &cluster );
00070 std::vector<float> energyBasketFractionPhi( const reco::BasicCluster &cluster );
00071
00072 std::vector<float> lat( const reco::BasicCluster &cluster, bool logW = true, float w0 = 4.7 );
00073
00074 std::vector<float> covariances(const reco::BasicCluster &cluster, float w0 = 4.7 );
00075
00076
00077
00078
00079
00080
00081 std::vector<float> localCovariances(const reco::BasicCluster &cluster, float w0 = 4.7);
00082 double zernike20( const reco::BasicCluster &cluster, double R0 = 6.6, bool logW = true, float w0 = 4.7 );
00083 double zernike42( const reco::BasicCluster &cluster, double R0 = 6.6, bool logW = true, float w0 = 4.7 );
00084
00085
00086
00087 std::vector<DetId> matrixDetId( DetId id, int ixMin, int ixMax, int iyMin, int iyMax );
00088
00089
00090 float matrixEnergy( const reco::BasicCluster &cluster, DetId id, int ixMin, int ixMax, int iyMin, int iyMax );
00091
00092 private:
00093 void getGeometry( const edm::EventSetup &es );
00094 void getTopology( const edm::EventSetup &es );
00095 void getEBRecHits( const edm::Event &ev, edm::InputTag redEBRecHits );
00096 void getEERecHits( const edm::Event &ev, edm::InputTag redEERecHits );
00097 const EcalRecHitCollection * getEcalRecHitCollection( const reco::BasicCluster &cluster );
00098
00099 const CaloGeometry *geometry_;
00100 const CaloTopology *topology_;
00101 const EcalRecHitCollection *ebRecHits_;
00102 const EcalRecHitCollection *eeRecHits_;
00103 };
00104
00105 #endif