00001 #ifndef RecoLocalCalo_EcalRecProducers_EcalRecHitWorkerRecover_hh 00002 #define RecoLocalCalo_EcalRecProducers_EcalRecHitWorkerRecover_hh 00003 00012 #include "RecoLocalCalo/EcalRecProducers/interface/EcalRecHitWorkerBaseClass.h" 00013 #include "RecoLocalCalo/EcalRecAlgos/interface/EcalRecHitSimpleAlgo.h" 00014 00015 #include "FWCore/Framework/interface/ESHandle.h" 00016 #include <vector> 00017 00018 #include "CondFormats/EcalObjects/interface/EcalChannelStatus.h" 00019 00020 #include "Geometry/CaloTopology/interface/CaloTopology.h" 00021 #include "Geometry/CaloGeometry/interface/CaloGeometry.h" 00022 #include "Geometry/CaloTopology/interface/EcalTrigTowerConstituentsMap.h" 00023 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" 00024 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h" 00025 00026 #include "CalibCalorimetry/EcalTPGTools/interface/EcalTPGScale.h" 00027 #include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbService.h" 00028 #include "CalibCalorimetry/EcalTPGTools/interface/EcalTPGScale.h" 00029 00030 class EcalRecHitWorkerRecover : public EcalRecHitWorkerBaseClass { 00031 public: 00032 EcalRecHitWorkerRecover(const edm::ParameterSet&); 00033 virtual ~EcalRecHitWorkerRecover() {}; 00034 00035 void set(const edm::EventSetup& es); 00036 bool run(const edm::Event& evt, const EcalUncalibratedRecHit& uncalibRH, EcalRecHitCollection & result); 00037 00038 protected: 00039 00040 void insertRecHit( const EcalRecHit &hit, EcalRecHitCollection &collection ); 00041 float recCheckCalib(float energy, int ieta); 00042 bool alreadyInserted( const DetId & id ); 00043 float estimateEnergy(int ieta, EcalRecHitCollection* hits, 00044 std::set<DetId> sId, 00045 std::vector<DetId> vId); 00046 bool checkChannelStatus(const DetId& id, 00047 const std::vector<int>& statusestoexclude); 00048 00049 edm::ESHandle<EcalLaserDbService> laser; 00050 00051 // isolated dead channels 00052 edm::ESHandle<CaloTopology> caloTopology_; 00053 edm::ESHandle<CaloGeometry> caloGeometry_; 00054 edm::ESHandle<EcalChannelStatus> chStatus_; 00055 00056 00057 double singleRecoveryThreshold_; 00058 std::string singleRecoveryMethod_; 00059 bool killDeadChannels_; 00060 00061 bool recoverEBIsolatedChannels_; 00062 bool recoverEEIsolatedChannels_; 00063 bool recoverEBVFE_; 00064 bool recoverEEVFE_; 00065 bool recoverEBFE_; 00066 bool recoverEEFE_; 00067 00068 // list of channel statuses for which recovery in EE should 00069 // not be attempted 00070 std::vector<int> dbStatusToBeExcludedEE_; 00071 std::vector<int> dbStatusToBeExcludedEB_; 00072 00073 // dead FE 00074 EcalTPGScale ecalScale_; 00075 edm::InputTag tpDigiCollection_; 00076 edm::ESHandle< EcalElectronicsMapping > pEcalMapping_; 00077 const EcalElectronicsMapping *ecalMapping_; 00078 double logWarningEtThreshold_EB_FE_; 00079 double logWarningEtThreshold_EE_FE_; 00080 00081 edm::ESHandle<EcalTrigTowerConstituentsMap> ttMap_; 00082 00083 edm::ESHandle<CaloSubdetectorGeometry> pEBGeom_; 00084 edm::ESHandle<CaloSubdetectorGeometry> pEEGeom_; 00085 const CaloSubdetectorGeometry * ebGeom_; 00086 const CaloSubdetectorGeometry * eeGeom_; 00087 const CaloGeometry* geo_; 00088 00089 EcalRecHitSimpleAlgo * rechitMaker_; 00090 00091 std::set<DetId> recoveredDetIds_EB_; 00092 std::set<DetId> recoveredDetIds_EE_; 00093 00094 EcalTPGScale tpgscale_; 00095 }; 00096 00097 #endif