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 00038 // End class description 00039 // 00044 // 00045 // --------------------------------------------------------------------------// 00056 // --------------------------------------------------------------------------// 00057 00058 #ifndef _MJWAVEFORMCOAXIALCRYSTAL_HH 00059 #define _MJWAVEFORMCOAXIALCRYSTAL_HH 00060 00061 //---------------------------------------------------------------------------// 00062 00063 #include "CLHEP/Units/SystemOfUnits.h" 00064 #include <CLHEP/Vector/ThreeVector.h> 00065 00066 #include "waveform/MJVWaveformCrystal.hh" 00067 00068 //---------------------------------------------------------------------------// 00069 00070 class MJWaveformCoaxialSegment; 00071 00072 class MJWaveformCoaxialCrystal : public MJVWaveformCrystal 00073 { 00074 public: 00075 00076 //default constructor 00077 MJWaveformCoaxialCrystal(); 00078 00079 //copy constructor 00080 MJWaveformCoaxialCrystal(const MJWaveformCoaxialCrystal &); 00081 00082 //destructor 00083 ~MJWaveformCoaxialCrystal(); 00084 00085 //public interface 00086 // Required Conversion function. 00087 Hep3Vector ConvertGridpointToCoordinate(HepInt *location) 00088 { 00089 Hep3Vector position; 00090 00091 position.set(((HepDouble) location[0]) * GetGridPointSize(), 00092 ((HepDouble) location[1]) * GetGridPointSize(), 00093 ((HepDouble) location[2]) * GetGridPointSize()); 00094 return position; 00095 } 00096 00097 void Construct(); 00098 00099 void ConvertCoordinateToGridpoint(const Hep3Vector *coord, HepInt *location) 00100 { 00101 location[0] = (HepInt) (coord->getX() / GetGridPointSize()); 00102 location[1] = (HepInt) (coord->getY() / GetGridPointSize()); 00103 location[2] = (HepInt) (coord->getZ() / GetGridPointSize()); 00104 } 00105 00106 void GetDriftFieldVector(const Hep3Vector *pos, Hep3Vector *efield); 00107 00108 HepBoolean OutsideCrystal(Hep3Vector *pos) 00109 { 00110 HepDouble rho = pos->getRho(); 00111 return (rho < fInnerRadius) || (rho > fOuterRadius); 00112 } 00113 00114 HepDouble GetInnerRadius() { return fInnerRadius; } 00115 HepDouble GetOuterRadius() { return fOuterRadius; } 00116 00117 //protected members 00118 protected: 00119 00120 00121 //private members 00122 private: 00123 00124 // Dimensions; 00125 HepDouble fOuterRadius, fInnerRadius; 00126 MJWaveformCoaxialSegment *fInnerContact; 00127 MJWaveformCoaxialSegment *fOuterSegment; 00128 HepDouble fAlpha, fBeta; // Parameters for computing the Drift Field 00129 }; 00130 #endif