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

MJDatabaseCloverCrystal.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
00039 // End class description
00040 //
00045 // 
00046 // --------------------------------------------------------------------------//
00056 // --------------------------------------------------------------------------//
00057 
00058 #ifndef _MJDATABASECLOVERCRYSTAL_HH
00059 #define _MJDATABASECLOVERCRYSTAL_HH
00060 
00061 //---------------------------------------------------------------------------//
00062 #include "database/MJDatabaseMaterial.hh"
00063 
00064 #include <string>
00065 #include <vector>
00066 #include "libpq-fe.h"
00067 
00068 using namespace std;
00069 
00070 //---------------------------------------------------------------------------//
00071 #ifndef _CRYSTALRES_
00072 #define _CRYSTALRES_
00073 
00074 struct CrystalRes{
00075   CrystalRes(double e, double r)
00076     :fenergy(e), fresolution(r){}
00077   double energy(){return fenergy;}
00078   double resolution(){return fresolution;}
00079 private:
00080   double fenergy;
00081   double fresolution;
00082 };
00083 #endif
00084 #ifndef _CRYSTALEFF_
00085 #define _CRYSTALEFF_
00086 
00087 struct CrystalEff{
00088   CrystalEff(double en, double ef)
00089     :fenergy(en), fefficiency(ef){}
00090   double energy(){return fenergy;}
00091   double efficiency(){return fefficiency;}
00092 private:
00093   double fenergy;
00094   double fefficiency;
00095 };
00096 #endif
00097 
00098 class MJDatabaseCloverCrystal 
00099 {
00100 public:
00101 
00102   //default constructor
00103   MJDatabaseCloverCrystal();
00104 
00105   MJDatabaseCloverCrystal(string, double, double, double, double,
00106                           double, double, double, double,
00107                           MJDatabaseMaterial&, double,
00108                           MJDatabaseMaterial&, double, double);
00109   //copy constructor
00110   MJDatabaseCloverCrystal(const MJDatabaseCloverCrystal &);
00111 
00112   //destructor
00113   ~MJDatabaseCloverCrystal();
00114 
00115   //public interface
00116   string GetCrystalSerialNo() { return fSerialNo ;}
00117   string GetMaterialName() { return fCrystalMat.GetName();}
00118   string GetInnerContactMaterialName() { return fInnerContactMat.GetName();}
00119   double GetCrystalRadius() { return fRadius ;}
00120   double GetCrystalHeight() { return fHeight ;}
00121   double GetCoreRadius() { return fCoreRadius ;}
00122   double GetCoreDepth() { return fCoreDepth ;}
00123   double GetTopDeficit() { return fTopDeficit ;}
00124   double GetBottomDeficit() { return  fBottomDeficit;}
00125   double GetRightDeficit() { return fRightDeficit ;}
00126   double GetLeftDeficit() { return  fLeftDeficit;}
00127   double GetInnerContactWidth() { return  fInnerContactW;}
00128   double GetInnerDeadThickness() { return  fInnerDeadThickness;}
00129   double GetOuterDeadThickness() { return  fOuterDeadThickness;}
00130   double GetCornerRadius() { return fCornerR; }
00131   double GetCoreBubbleRadius() { return fCoreBubble;}
00132   vector<double> GetOrientation() { return fOrient;}
00133   string GetBkgModel() { return fBkgModel;}
00134   char GetDiodType() { return fDiodType;}
00135   int GetDepletionVoltage() { return fDepletionVolt;}
00136   vector<CrystalRes> GetResolution() { return fResolution;}
00137   vector<CrystalEff> GetEfficiency(){ return fEfficiencies;}
00138   vector<double> GetRatios() { return fRatios;}
00139 
00140   MJDatabaseCloverCrystal * createCrystal(PGresult *);
00141   void print(ostream&);
00142 
00143   friend ostream& operator << (ostream& os,  MJDatabaseCloverCrystal& );
00144 
00145 
00146   //protected members
00147 protected:
00148 
00149 
00150   //private  members
00151 private:
00152 
00153   string      fSerialNo;
00154   MJDatabaseMaterial  fCrystalMat;
00155   double      fHeight;
00156   string      fBkgModel;
00157   double      fRadius;
00158   double      fCornerR;
00159   double      fCoreBubble;
00160   double      fCoreRadius;
00161   double      fCoreDepth;
00162   double      fTopDeficit;
00163   double      fBottomDeficit;
00164   double      fRightDeficit;
00165   double      fLeftDeficit;
00166   vector<double>      fOrient;
00167   double      fInnerContactW;
00168   MJDatabaseMaterial fInnerContactMat;
00169   double      fInnerDeadThickness;
00170   double      fOuterDeadThickness;
00171   string      fInnerBkgModel;
00172   char        fDiodType;
00173   int         fDepletionVolt;
00174   vector < CrystalRes>  fResolution;  //crystal resolution at different energies
00175   vector<CrystalEff> fEfficiencies; // crystal efficiencies at different energies
00176   vector<double> fRatios;  //peak ratios 
00177 
00178 };
00179 #endif

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