Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MJDatabaseClover4x50x80DetCalib.hh

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------//
00002 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu//
00003 //                                                                           //
00004 //                         MAJORANA Simulation                               //
00005 //                                                                           //
00006 //      This code implementation is the intellectual property of the         //
00007 //      MAJORANA Collaboration. It is based on Geant4, an intellectual       //
00008 //      property of the RD44 GEANT4 collaboration.                           //
00009 //                                                                           //
00010 //                        *********************                              //
00011 //                                                                           //
00012 //    Neither the authors of this software system, nor their employing       //
00013 //    institutes, nor the agencies providing financial support for this      //
00014 //    work  make  any representation or  warranty, express or implied,       //
00015 //    regarding this software system or assume any liability for its use.    //
00016 //    By copying, distributing or modifying the Program (or any work based   //
00017 //    on on the Program) you indicate your acceptance of this statement,     //
00018 //    and all its terms.                                                     //
00019 //                                                                           //
00020 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu//
00021 //---------------------------------------------------------------------------//
00032 // Begin description of class here
00042 // End class description
00043 //
00048 // 
00049 // --------------------------------------------------------------------------//
00059 // --------------------------------------------------------------------------//
00060 
00061 #ifndef _MJDATABASECLOVER4X50X80DETCALIB_HH
00062 #define _MJDATABASECLOVER4X50X80DETCALIB_HH
00063 
00064 //---------------------------------------------------------------------------//
00065 #include <string>
00066 #include <map>
00067 #include <vector>
00068 #include <iostream>
00069 
00070 using namespace std;
00071 
00072 //#include "MJStuff.hh"                 //MJ Headers
00073 
00074 #include "libpq-fe.h"
00075 //---------------------------------------------------------------------------//
00076 
00077 struct CloverDet4x50x80Calib{
00078 protected:
00079   double fA, fB, fC, fstdDevA, fstdDevB;
00080   string fbeginTime, fendTime;
00081   double fenergy[3], fFWHM[3];
00082   int fchannelNo[3];
00083 public:
00084   CloverDet4x50x80Calib(){}
00085   CloverDet4x50x80Calib(double a, double b, double c,
00086                         double sa, double sb, string bt,
00087                         string et, double* energy,
00088                         double * fwhm, int* ch)
00089     :fA(a), fB(b), fC(c), fstdDevA(sa), fstdDevB(sb),
00090      fbeginTime(bt), fendTime(et)
00091   {
00092      for (int i=0; i<3; i++){
00093        fenergy[i] = energy[i];
00094        fFWHM[i] = fwhm[i];
00095        fchannelNo[i] = ch[i];
00096      }
00097   }   
00098   double GetA() const {return fA;}
00099   double GetB()const {return fB;}
00100   double GetC()const {return fC;}
00101   double GetSDEVA()const {return fstdDevA;}
00102   double GetSDEVB()const {return fstdDevB;}
00103   string GetBeginTime()const{return fbeginTime;}
00104   string GetEndTime()const{return fendTime;}
00105   double* GetEnergy() {return fenergy;}
00106   double* GetFWHM() {return fFWHM;}
00107   int* GetChannelNo() {return fchannelNo;}
00108   friend ostream& operator << (ostream& , const CloverDet4x50x80Calib& );
00109 };
00110 
00111 class MJDatabaseClover4x50x80DetCalib 
00112 {
00113 public:
00114 
00115   //default constructor
00116   MJDatabaseClover4x50x80DetCalib( );
00117 
00118   //copy constructor
00119   MJDatabaseClover4x50x80DetCalib(const MJDatabaseClover4x50x80DetCalib &);
00120 
00121   //destructor
00122   ~MJDatabaseClover4x50x80DetCalib();
00123 
00124   //public interface
00125   string GetDetectorName() {return fDetName;}
00126   CloverDet4x50x80Calib GetE1(){return fCalib["E1"];}
00127   CloverDet4x50x80Calib GetE2(){return fCalib["E2"];};
00128   CloverDet4x50x80Calib GetE3(){return fCalib["E3"];};
00129   CloverDet4x50x80Calib GetE4(){return fCalib["E4"];};
00130   CloverDet4x50x80Calib GetPl(){return fCalib["Pl"];};
00131   CloverDet4x50x80Calib GetPm(){return fCalib["Pm"];};
00132   CloverDet4x50x80Calib GetPr(){return fCalib["Pr"];};
00133   string GetDetName(){return fDetName;}
00134 
00135   MJDatabaseClover4x50x80DetCalib* createCalib(PGresult *);
00136 
00137   friend ostream& operator << (ostream&, MJDatabaseClover4x50x80DetCalib&);
00138   //protected members
00139 protected:
00140 
00141 
00142   //private  members
00143 private:
00144 
00145 
00146   vector<string> fName;    //this is E1, E2, E3, E4, Pl, Pm, Pr
00147   string fDetName;
00148   map<string, CloverDet4x50x80Calib> fCalib;
00149 };
00150 #endif

Generated on Mon Nov 29 16:58:49 2004 for Majorana Simulation by  doxygen 1.3.9.1