Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:37:35

0001 #ifndef RecoLocalCalo_EcalRecAlgos_EcalUncalibRecHitMultiFitAlgo_HH
0002 #define RecoLocalCalo_EcalRecAlgos_EcalUncalibRecHitMultiFitAlgo_HH
0003 
0004 /** \class EcalUncalibRecHitMultiFitAlgo
0005   *  Amplitude reconstucted by the multi-template fit
0006   *
0007   *  \author J.Bendavid, E.Di Marco
0008   */
0009 
0010 #include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRecAbsAlgo.h"
0011 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0012 
0013 #include "CondFormats/EcalObjects/interface/EcalPedestals.h"
0014 #include "CondFormats/EcalObjects/interface/EcalGainRatios.h"
0015 #include "RecoLocalCalo/EcalRecAlgos/interface/PulseChiSqSNNLS.h"
0016 
0017 #include "TMatrixDSym.h"
0018 #include "TVectorD.h"
0019 
0020 class EcalUncalibRecHitMultiFitAlgo {
0021 public:
0022   EcalUncalibRecHitMultiFitAlgo();
0023   ~EcalUncalibRecHitMultiFitAlgo() {}
0024   EcalUncalibratedRecHit makeRecHit(const EcalDataFrame &dataFrame,
0025                                     const EcalPedestals::Item *aped,
0026                                     const EcalMGPAGainRatio *aGain,
0027                                     const SampleMatrixGainArray &noisecors,
0028                                     const FullSampleVector &fullpulse,
0029                                     const FullSampleMatrix &fullpulsecov,
0030                                     const BXVector &activeBX);
0031   void disableErrorCalculation() { _computeErrors = false; }
0032   void setDoPrefit(bool b) { _doPrefit = b; }
0033   void setPrefitMaxChiSq(double x) { _prefitMaxChiSq = x; }
0034   void setDynamicPedestals(bool b) { _dynamicPedestals = b; }
0035   void setMitigateBadSamples(bool b) { _mitigateBadSamples = b; }
0036   void setSelectiveBadSampleCriteria(bool b) { _selectiveBadSampleCriteria = b; }
0037   void setAddPedestalUncertainty(double x) { _addPedestalUncertainty = x; }
0038   void setSimplifiedNoiseModelForGainSwitch(bool b) { _simplifiedNoiseModelForGainSwitch = b; }
0039   void setGainSwitchUseMaxSample(bool b) { _gainSwitchUseMaxSample = b; }
0040 
0041 private:
0042   PulseChiSqSNNLS _pulsefunc;
0043   PulseChiSqSNNLS _pulsefuncSingle;
0044   bool _computeErrors;
0045   bool _doPrefit;
0046   double _prefitMaxChiSq;
0047   bool _dynamicPedestals;
0048   bool _mitigateBadSamples;
0049   bool _selectiveBadSampleCriteria;
0050   double _addPedestalUncertainty;
0051   bool _simplifiedNoiseModelForGainSwitch;
0052   bool _gainSwitchUseMaxSample;
0053   BXVector _singlebx;
0054 };
0055 
0056 #endif