mEmcTOFCorr4Module.h

Go to the documentation of this file.
00001 #ifndef __MEMCTOFCORR4MODULE_H__
00002 #define __MEMCTOFCORR4MODULE_H__
00003 
00004 //-----------------------------------------------------------------------------
00005 //
00006 //
00007 // Purpose: wraps the TOF Run-by-Run & Tower-by-Tower correction of DST
00008 // 
00009 // Description: algorithm class
00010 //              
00011 // The application of this class will make your life better, will make you smarter,
00012 // and your hair grow fuller *)
00013 
00014 // *) individual results may vary.
00015 
00016 //-----------------------------------------------------------------------------
00017 
00018 #include "phool.h"
00019 #include "PdbEmcT0Sector.hh"
00020 #include "PdbEmcT0Tower.hh"
00021 
00025 class PHCompositeNode;
00026 
00027 class mEmcTOFCorr4Module
00028 {
00029 
00030 private:
00031   mEmcTOFCorr4Module();
00032 
00033  public:
00034   virtual ~mEmcTOFCorr4Module(){}
00035 
00037   static mEmcTOFCorr4Module* instance();
00038 
00040 
00041   void readDataFromDB(const int run_number);
00042 
00044   PHBoolean  event(PHCompositeNode * root) ;
00045   PHBoolean  eventFirst(PHCompositeNode * root) ;
00046 
00047  private:
00049   static mEmcTOFCorr4Module* _instance;
00050 
00052   float get_correction( int arm, int sec, int ind_y, int ind_z );
00053 
00054   PdbEmcT0Sector TheSector;
00055   PdbEmcT0Tower TheTower;
00056 
00057   int isvalid;
00058 
00059 };
00060 
00061 
00062 #endif /* __MEMCTOFCORR4MODULE_H__ */