Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoLocalCalo_EcalRecAlgos_ESRecHitSimAlgo_HH
0002 #define RecoLocalCalo_EcalRecAlgos_ESRecHitSimAlgo_HH
0003 
0004 #include "DataFormats/EcalDigi/interface/ESDataFrame.h"
0005 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0006 #include "CondFormats/ESObjects/interface/ESPedestals.h"
0007 #include "CondFormats/ESObjects/interface/ESIntercalibConstants.h"
0008 #include "CondFormats/ESObjects/interface/ESChannelStatus.h"
0009 #include "CondFormats/ESObjects/interface/ESRecHitRatioCuts.h"
0010 #include "CondFormats/ESObjects/interface/ESAngleCorrectionFactors.h"
0011 
0012 class ESRecHitSimAlgo {
0013 public:
0014   void setESGain(float value) { gain_ = value; }
0015   void setMIPGeV(float value) { MIPGeV_ = value; }
0016   void setPedestals(const ESPedestals* peds) { peds_ = peds; }
0017   void setIntercalibConstants(const ESIntercalibConstants* mips) { mips_ = mips; }
0018   void setChannelStatus(const ESChannelStatus* status) { channelStatus_ = status; }
0019   void setRatioCuts(const ESRecHitRatioCuts* ratioCuts) { ratioCuts_ = ratioCuts; }
0020   void setAngleCorrectionFactors(const ESAngleCorrectionFactors* ang) { ang_ = ang; }
0021   void setW0(float value) { w0_ = value; }
0022   void setW1(float value) { w1_ = value; }
0023   void setW2(float value) { w2_ = value; }
0024 
0025   EcalRecHit reconstruct(const ESDataFrame& digi) const;
0026 
0027 private:
0028   EcalRecHit::ESFlags evalAmplitude(float* result, const ESDataFrame& digi, float ped) const;
0029 
0030   double* oldEvalAmplitude(
0031       const ESDataFrame& digi, const double& ped, const double& w0, const double& w1, const double& w2) const;
0032   EcalRecHit oldreconstruct(const ESDataFrame& digi) const;
0033 
0034   int gain_;
0035   const ESPedestals* peds_;
0036   const ESIntercalibConstants* mips_;
0037   const ESChannelStatus* channelStatus_;
0038   const ESRecHitRatioCuts* ratioCuts_;
0039   const ESAngleCorrectionFactors* ang_;
0040   float w0_;
0041   float w1_;
0042   float w2_;
0043   float MIPGeV_;
0044 };
0045 
0046 #endif