CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/RecoTBCalo/HcalTBObjectUnpacker/interface/HcalTBTDCUnpacker.h

Go to the documentation of this file.
00001 #ifndef HCALTBTDCUNPACKER_H
00002 #define HCALTBTDCUNPACKER_H 1
00003 #include "TBDataFormats/HcalTBObjects/interface/HcalTBEventPosition.h"
00004 #include "TBDataFormats/HcalTBObjects/interface/HcalTBTiming.h"
00005 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
00006 
00007 namespace hcaltb {
00014 class HcalTBTDCUnpacker {
00015 public:
00016   HcalTBTDCUnpacker(bool);
00017   void unpack(const FEDRawData& raw,
00018               HcalTBEventPosition& pos,
00019               HcalTBTiming& timing) const;
00020   void setCalib(const std::vector<std::vector<std::string> >& calibLines_);
00021 private:
00022   struct Hit {
00023     int channel;
00024     double time;
00025   };
00026   
00027   void unpackHits(const FEDRawData& raw, std::vector<Hit>& hits, HcalTBTiming& timing) const;
00028   void reconstructWC(const std::vector<Hit>& hits,
00029                      HcalTBEventPosition& pos) const;
00030   void reconstructTiming(const std::vector<Hit>& hits,
00031                          HcalTBTiming& timing) const;
00032 //  void setupWC();  // reads it from configuration file
00033 
00034   static const int PLANECOUNT = 16;
00035   static const int WC_CHANNELIDS[PLANECOUNT*3];
00036   struct WireChamberRecoData {
00037     double b0, b1, mean, sigma;
00038   } wc_[PLANECOUNT];
00039 
00040   bool includeUnmatchedHits_;
00041   double tdc_ped[161];
00042   double tdc_convers[161];
00043   FILE   *dumpObs_;
00044 };
00045 
00046 }
00047 
00048 #endif