Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:47

0001 #ifndef ZDCSIMPLERECALGO_H
0002 #define ZDCSIMPLERECALGO_H 1
0003 
0004 #include "DataFormats/HcalDigi/interface/HBHEDataFrame.h"
0005 #include "DataFormats/HcalDigi/interface/HFDataFrame.h"
0006 #include "DataFormats/HcalDigi/interface/HODataFrame.h"
0007 #include "DataFormats/HcalDigi/interface/ZDCDataFrame.h"
0008 #include "DataFormats/HcalDigi/interface/HcalCalibDataFrame.h"
0009 #include "DataFormats/HcalRecHit/interface/HBHERecHit.h"
0010 #include "DataFormats/HcalRecHit/interface/HFRecHit.h"
0011 #include "DataFormats/HcalRecHit/interface/HORecHit.h"
0012 #include "DataFormats/HcalRecHit/interface/ZDCRecHit.h"
0013 #include "DataFormats/HcalRecHit/interface/HcalCalibRecHit.h"
0014 #include "CalibFormats/HcalObjects/interface/HcalCoder.h"
0015 #include "CalibFormats/HcalObjects/interface/HcalCalibrations.h"
0016 #include "CalibCalorimetry/HcalAlgos/interface/HcalPulseContainmentCorrection.h"
0017 #include <memory>
0018 
0019 /** \class ZdcSimpleRecAlgo
0020 
0021    This class reconstructs RecHits from Digis for ZDC  by addition
0022    of selected time samples, pedestal subtraction, and gain application. The
0023    time of the hit is reconstructed using a weighted peak bin calculation
0024    supplemented by precise time lookup table. A consumer of this class also
0025    has the option of correcting the reconstructed time for energy-dependent
0026    time slew associated with the QIE.
0027 
0028    A sencon method based on a based on a event by event substraction is also
0029    implelented. signal = (S4 + S5 - 2*(S1+S2+S3 + S7+S8+S9+S10))*(ft-Gev constant)
0030    where SN is the signal in the nth time slice
0031     
0032    \author E. Garcia CSU &  J. Gomez UMD
0033 */
0034 class HcalTimeSlew;
0035 
0036 class ZdcSimpleRecAlgo {
0037 public:
0038   /** Full featured constructor for ZDC */
0039   ZdcSimpleRecAlgo(bool correctForTimeslew,
0040                    bool correctForContainment,
0041                    float fixedPhaseNs,
0042                    int recoMethod,
0043                    int lowGainOffset,
0044                    double lowGainFrac);
0045   /** Simple constructor for PMT-based detectors */
0046   ZdcSimpleRecAlgo(int recoMethod);
0047   void initPulseCorr(int toadd, const HcalTimeSlew* hcalTimeSlew_delay);
0048   ZDCRecHit reconstruct(const ZDCDataFrame& digi,
0049                         const std::vector<unsigned int>& myNoiseTS,
0050                         const std::vector<unsigned int>& mySignalTS,
0051                         const HcalCoder& coder,
0052                         const HcalCalibrations& calibs) const;
0053   HcalCalibRecHit reconstruct(const HcalCalibDataFrame& digi,
0054                               const std::vector<unsigned int>& myNoiseTS,
0055                               const std::vector<unsigned int>& mySignalTS,
0056                               const HcalCoder& coder,
0057                               const HcalCalibrations& calibs) const;
0058 
0059 private:
0060   int recoMethod_;
0061   bool correctForTimeslew_;
0062   bool correctForPulse_;
0063   float phaseNS_;
0064   // new lowGainEnergy variables
0065   int lowGainOffset_;
0066   double lowGainFrac_;
0067   std::unique_ptr<HcalPulseContainmentCorrection> pulseCorr_;
0068 };
0069 
0070 #endif