00001 #ifndef RecoLocalCalo_EcalRecProducers_EcalUncalibRecHitWorkerFixedAlphaBetaFit_hh 00002 #define RecoLocalCalo_EcalRecProducers_EcalUncalibRecHitWorkerFixedAlphaBetaFit_hh 00003 00004 #include "FWCore/Framework/interface/ESHandle.h" 00005 00006 #include "RecoLocalCalo/EcalRecProducers/interface/EcalUncalibRecHitWorkerBaseClass.h" 00007 00008 #include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitFixedAlphaBetaAlgo.h" 00009 00010 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h" 00011 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" 00012 00013 #include "CondFormats/EcalObjects/interface/EcalGainRatios.h" 00014 #include "CondFormats/EcalObjects/interface/EcalPedestals.h" 00015 00016 namespace edm { 00017 class Event; 00018 class EventSetup; 00019 class ParameterSet; 00020 } 00021 00022 class EcalUncalibRecHitWorkerFixedAlphaBetaFit : public EcalUncalibRecHitWorkerBaseClass { 00023 00024 public: 00025 EcalUncalibRecHitWorkerFixedAlphaBetaFit(const edm::ParameterSet& ps); 00026 virtual ~EcalUncalibRecHitWorkerFixedAlphaBetaFit() {}; 00027 00028 void set(const edm::EventSetup& es); 00029 bool run(const edm::Event& evt, const EcalDigiCollection::const_iterator & digi, EcalUncalibratedRecHitCollection & result); 00030 00031 private: 00032 00033 double AmplThrEB_; 00034 double AmplThrEE_; 00035 00036 EcalUncalibRecHitFixedAlphaBetaAlgo<EBDataFrame> algoEB_; 00037 EcalUncalibRecHitFixedAlphaBetaAlgo<EEDataFrame> algoEE_; 00038 00039 double alphaEB_; 00040 double betaEB_; 00041 double alphaEE_; 00042 double betaEE_; 00043 std::vector<std::vector<std::pair<double,double> > > alphaBetaValues_; // List of alpha and Beta values [SM#][CRY#](alpha, beta) 00044 bool useAlphaBetaArray_; 00045 std::string alphabetaFilename_; 00046 00047 bool setAlphaBeta(); // Sets the alphaBetaValues_ vectors by the values provided in alphabetaFilename_ 00048 00049 edm::ESHandle<EcalGainRatios> pRatio; 00050 edm::ESHandle<EcalPedestals> pedHandle; 00051 }; 00052 #endif