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

MJDatabaseCloverDetector.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
00036 // End class description
00037 //
00042 // 
00043 // --------------------------------------------------------------------------//
00054 // --------------------------------------------------------------------------//
00055 
00056 #ifndef _MJDATABASECLOVERDETECTOR_HH
00057 #define _MJDATABASECLOVERDETECTOR_HH
00058 
00059 //---------------------------------------------------------------------------//
00060 
00061 //  GEANT4 headers
00062 #include "globals.hh"
00063 
00064 //  MJ headers
00065 #include "database/MJDatabaseMaterial.hh"
00066 #include "database/MJDatabaseCloverCrystal.hh"
00067 
00068 #include "libpq-fe.h"
00069 
00070 //  C++ headers
00071 #include <string>
00072 #include <iostream>
00073 #include <vector>
00074 
00075 using namespace std;
00076 
00077 struct DetectorRes{
00078   DetectorRes(double e, double r)
00079     :fenergy(e), fresolution(r){}
00080   double energy(){return fenergy;}
00081   double resolution(){return fresolution;}
00082 private:
00083   double fenergy;
00084   double fresolution;
00085 };
00086 
00087 //---------------------------------------------------------------------------//
00088 
00089 class MJDatabaseCloverDetector 
00090 {
00091 public:
00092 
00093   //default constructor
00094   MJDatabaseCloverDetector();
00095 
00096   MJDatabaseCloverDetector( string);
00097   
00098   //copy constructor
00099   MJDatabaseCloverDetector(const MJDatabaseCloverDetector &);
00100 
00101   //destructor
00102   ~MJDatabaseCloverDetector();
00103 
00104   //public interface
00105   string   GetDetectorSerialNo() { return fSerialNo; };
00106   string   *GetCrystalSerialNumbers() { return fCrystalSerialNo; };
00107   double   GetSpacerWidth() { return fSpacerWidth; };
00108   string   GetSpacerBGModel() { return fSpacerBGModel; };
00109   double   GetOpVoltage() { return fOpVoltage; };
00110   double   GetCryoEndGap() { return fCryoEndGap; };
00111   double   GetCryoThinWallThickness() { return fCryoThinWallThickness; };
00112   double   GetCryoThinWallLength() { return fCryoThinWallLength; };
00113   double   GetCryoThickWallThickness() { return fCryoThickWallThickness; };
00114   double   GetCryoLength() { return fCryoLength; };
00115   double   GetCryoWidth() { return fCryoWidth; };
00116   double   GetCryoCornerRadius() { return fCryoCornerRadius; };
00117   string   GetCryoBGModel() { return fCryoBGModel; };
00118   double   GetColdplateThickness() { return fColdplateThickness; };
00119   double   GetColdplateGap() { return fColdplateGap; };
00120   string   GetColdplateMaterialName() { return fColdplateMaterial.GetName(); };
00121   string   GetColdplateBGModel() { return fColdplateBGModel; };
00122   string   GetSpacerMaterialName() { return fSpacerMaterial.GetName();}
00123   string   GetCryoMaterialName() { return fCryoMaterial.GetName();}
00124   vector<MJDatabaseCloverCrystal> GetCrystals(){ return fCrystals;} 
00125   vector<DetectorRes> GetResPl() { return fResPl;}
00126   vector<DetectorRes> GetResPm() { return fResPm;}
00127   vector<DetectorRes> GetResPr() { return fResPr;}
00128 
00129   MJDatabaseCloverDetector* createDetector(PGresult *,PGconn * );
00130 
00131   friend ostream& operator << (ostream&, MJDatabaseCloverDetector&);
00132   //protected members
00133 protected:
00134 
00135 
00136   //private  members
00137 private:
00138 
00139   void getParts(PGconn*);
00140 
00141   string        fSerialNo;
00142   string        fCrystalSerialNo[4];
00143   double        fSpacerWidth;
00144   MJDatabaseMaterial  fSpacerMaterial;
00145   string        fSpacerBGModel;
00146   double                fOpVoltage;
00147   double        fCryoEndGap;
00148   double        fCryoThinWallThickness;
00149   double        fCryoThinWallLength;
00150   double        fCryoThickWallThickness;
00151   double        fCryoLength;
00152   double        fCryoWidth;
00153   double        fCryoCornerRadius;
00154   MJDatabaseMaterial  fCryoMaterial;
00155   string        fCryoBGModel;
00156   double        fColdplateThickness;
00157   double        fColdplateGap;
00158   MJDatabaseMaterial    fColdplateMaterial;
00159   string        fColdplateBGModel;
00160   vector<MJDatabaseCloverCrystal>  fCrystals;
00161   vector<DetectorRes> fResPl;
00162   vector<DetectorRes> fResPm;
00163   vector<DetectorRes> fResPr;
00164 
00165   //  vector<MJDatabaseCloverDetCalib>  fCalib;
00166          
00167 };
00168 #endif

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