Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:22

0001 #ifndef RecoLocalCalo_EcalRecProducers_EcalUncalibRecHitWorkerFixedAlphaBetaFit_hh
0002 #define RecoLocalCalo_EcalRecProducers_EcalUncalibRecHitWorkerFixedAlphaBetaFit_hh
0003 
0004 #include "FWCore/Framework/interface/ESHandle.h"
0005 #include "FWCore/Utilities/interface/ESGetToken.h"
0006 
0007 #include "RecoLocalCalo/EcalRecProducers/interface/EcalUncalibRecHitWorkerRunOneDigiBase.h"
0008 
0009 #include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitFixedAlphaBetaAlgo.h"
0010 
0011 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0012 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0013 
0014 #include "CondFormats/EcalObjects/interface/EcalGainRatios.h"
0015 #include "CondFormats/EcalObjects/interface/EcalPedestals.h"
0016 #include "CondFormats/DataRecord/interface/EcalGainRatiosRcd.h"
0017 #include "CondFormats/DataRecord/interface/EcalPedestalsRcd.h"
0018 namespace edm {
0019   class Event;
0020   class EventSetup;
0021   class ParameterSet;
0022   class ParameterSetDescription;
0023 }  // namespace edm
0024 
0025 class EcalUncalibRecHitWorkerFixedAlphaBetaFit : public EcalUncalibRecHitWorkerRunOneDigiBase {
0026 public:
0027   EcalUncalibRecHitWorkerFixedAlphaBetaFit(const edm::ParameterSet& ps, edm::ConsumesCollector&);
0028   EcalUncalibRecHitWorkerFixedAlphaBetaFit(){};
0029   ~EcalUncalibRecHitWorkerFixedAlphaBetaFit() override{};
0030 
0031   void set(const edm::EventSetup& es) override;
0032   bool run(const edm::Event& evt,
0033            const EcalDigiCollection::const_iterator& digi,
0034            EcalUncalibratedRecHitCollection& result) override;
0035 
0036   edm::ParameterSetDescription getAlgoDescription() override;
0037 
0038 private:
0039   double AmplThrEB_;
0040   double AmplThrEE_;
0041 
0042   EcalUncalibRecHitFixedAlphaBetaAlgo<EBDataFrame> algoEB_;
0043   EcalUncalibRecHitFixedAlphaBetaAlgo<EEDataFrame> algoEE_;
0044 
0045   double alphaEB_;
0046   double betaEB_;
0047   double alphaEE_;
0048   double betaEE_;
0049   std::vector<std::vector<std::pair<double, double> > >
0050       alphaBetaValues_;  // List of alpha and Beta values [SM#][CRY#](alpha, beta)
0051   bool useAlphaBetaArray_;
0052   std::string alphabetaFilename_;
0053 
0054   bool setAlphaBeta();  // Sets the alphaBetaValues_ vectors by the values provided in alphabetaFilename_
0055 
0056   edm::ESHandle<EcalGainRatios> pRatio;
0057   edm::ESHandle<EcalPedestals> pedHandle;
0058   edm::ESGetToken<EcalGainRatios, EcalGainRatiosRcd> ratiosToken_;
0059   edm::ESGetToken<EcalPedestals, EcalPedestalsRcd> pedestalsToken_;
0060 };
0061 #endif