CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoLocalCalo/CastorReco/interface/CastorSimpleRecAlgo.h

Go to the documentation of this file.
00001 #ifndef CASTORSIMPLERECALGO_H
00002 #define CASTORSIMPLERECALGO_H 1
00003 
00004 #include "DataFormats/HcalDigi/interface/CastorDataFrame.h"
00005 #include "DataFormats/HcalRecHit/interface/CastorRecHit.h"
00006 #include "CalibFormats/CastorObjects/interface/CastorCoder.h"
00007 #include "CalibFormats/CastorObjects/interface/CastorCalibrations.h"
00008 #include "CalibCalorimetry/CastorCalib/interface/CastorPulseContainmentCorrection.h"
00009 #include <memory>
00010 
00022 class CastorSimpleRecAlgo {
00023 public:
00025   CastorSimpleRecAlgo(int firstSample, int samplesToAdd, bool correctForTimeslew, 
00026                     bool correctForContainment, float fixedPhaseNs);
00028   CastorSimpleRecAlgo(int firstSample, int samplesToAdd);
00029 
00030   CastorRecHit reconstruct(const CastorDataFrame& digi, const CastorCoder& coder, const CastorCalibrations& calibs) const;
00031 
00032   // sets rechit saturation status bit on if ADC count is >= maxADCvalue
00033   void checkADCSaturation(CastorRecHit& rechit, const CastorDataFrame& digi, const int& maxADCvalue) const;
00034 
00035   //++++ Saturation Correction +++++
00036   // recover pulse shape if ADC count is >= masADCvalue
00037   void recoverADCSaturation(CastorRecHit& rechit, const CastorCoder& coder, const CastorCalibrations& calibs,
00038                             const CastorDataFrame& digi, const int& maxADCvalue, const double& satCorrConst) const;
00039   
00040   
00041 
00042   void resetTimeSamples(int f,int t){
00043     firstSample_=f;
00044     samplesToAdd_=t;
00045   }
00046 private:
00047   int firstSample_, samplesToAdd_;
00048   bool correctForTimeslew_;
00049   std::auto_ptr<CastorPulseContainmentCorrection> pulseCorr_;
00050 };
00051 
00052 #endif