Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CalibrationAlg.h

Go to the documentation of this file.
00001 
00002 #ifndef  CALIBRATIONALG_H
00003 #define CALIBRATIONALG_H
00004 
00005 #include "Headers.h"
00006 #include "Event.h"
00007 #include "Geometry.h"
00008 #include "SystemAlg.h"
00009 
00010 
00011 /*! -Class:    CalibrationAlg
00012   - Author:   Tamara Starke and Michel Lefebvre
00013   - Date:      09/07/2003
00014   - Description: CalibrationAlg is a simple SystemAlg that allows access to the content of
00015                  calibration files (calibration coefficients and status).  It also
00016                  allows access to ped rms in nA
00017                  Possible future development includes calibrating adc signals
00018   */
00019 class CalibrationAlg : public SystemAlg {
00020 public:
00021 
00022   /** @param event A pointer in the event. Information contained in the event
00023     *                             gets refreshed before the execute method is run
00024     * @param hecGeom Pointer to the singleton Geometry object
00025     * @param runHeader Pointer to the singleton HecRunHeader object
00026     */
00027 
00028   CalibrationAlg(Event* event, Geometry* hecGeom, Headers* runHeader);
00029 
00030   //! Gets run once at the begining of the event Loop
00031   bool initialize();
00032 
00033   //! Gets run for every event
00034   bool execute();
00035 
00036   //! Gets run after all events have been executed
00037   bool finalize();
00038 
00039   //===== hec public methods =====
00040 
00041   //! Load hec calibration coefficients from file and fill the ped rms in nA map
00042   bool hecLoad(string hecCalibFileName);
00043 
00044   //! Get febno keyed hec calibration coefficient map
00045   map<int, vector<float> > hecCoeffMap();
00046 
00047   //! Get febno keyed hec calibration coefficient status map
00048   map<int, int> hecCoeffStatusMap();
00049 
00050   //! Get hec calibration coefficients
00051   vector<float> hecCoeff(int febno);
00052 
00053   //! Get hec calibration coefficient status
00054   int hecCoeffStatus(int febno);
00055 
00056   //! Get febno keyed hec ped rms in nA map
00057   map<int, float> hecPedRMSnAMap();
00058 
00059   //! Get hec ped rms in nA
00060   float hecPedRMSnA(int febno);
00061   
00062   //! pedestal subtracted ADC to nA conversion for the hec
00063   float hecADCTonA(int febno, float ADC);
00064  
00065 
00066   //===== emec public methods =====
00067 
00068   //! Load emec calibration coefficients from file and fill the ped rms in nA map
00069   bool emecLoad(string emecCalibFileName);
00070 
00071   //! Get febno keyed emec calibration coefficient map
00072   map<int, vector<float> > emecCoeffMap();
00073 
00074   //! Get febno keyed emec calibration coefficient status map
00075   map<int, int> emecCoeffStatusMap();
00076 
00077   //! Get emec calibration coefficients
00078   vector<float> emecCoeff(int febno);
00079 
00080   //! Get emec calibration coefficient status
00081   int emecCoeffStatus(int febno);
00082 
00083   //! Get febno keyed emec ped rms in nA map
00084   map<int, float> emecPedRMSnAMap();
00085 
00086   //! Get emec ped rms in nA
00087   float emecPedRMSnA(int febno);
00088 
00089   //! pedestal subtracted ADC to nA conversion for the emec
00090   float emecADCTonA(int febno, float ADC);
00091 
00092 private:
00093   Geometry* m_geo;
00094   Event* m_event;
00095   Headers* m_runHeader;
00096 
00097   //################################
00098   //### insert your member variables here
00099 
00100   // hec calibration file version number
00101   int m_hecVersion;
00102   // hec number of calibration coefficients per channel
00103   int m_hecNumberOfCoeff;
00104   // map of febno keyed vector of hec calibration coefficients
00105   map<int, vector<float> > m_hecCoeffMap;
00106   // map of febno keyed hec calibration coefficients status
00107   map<int, int> m_hecCoeffStatusMap;
00108   // map of febno keyed hec pedestal rms in nA
00109   map<int, float> m_hecPedRMSnAMap;
00110 
00111 
00112   // emec calibration file version number
00113   int m_emecVersion;
00114   // emec number of calibration coefficients per channel
00115   int m_emecNumberOfCoeff;
00116   // map of febno keyed vector of emec calibration coefficients
00117   map<int, vector<float> > m_emecCoeffMap;
00118   // map of febno keyed emec calibration coefficients status
00119   map<int, int> m_emecCoeffStatusMap;
00120   // map of febno keyed emec pedestal rms in nA
00121   map<int, float> m_emecPedRMSnAMap;
00122 
00123 
00124   //################################
00125 };
00126 
00127 #endif

Generated on Fri Aug 15 10:52:04 2003 for TBRootAna by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002