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 // --------------------------------------------------------------------------// 00057 // --------------------------------------------------------------------------// 00058 00059 #ifndef _MJWAVEFORMPLANARCRYSTAL_HH 00060 #define _MJWAVEFORMPLANARCRYSTAL_HH 00061 00062 //---------------------------------------------------------------------------// 00063 00064 #include "CLHEP/Units/SystemOfUnits.h" 00065 #include <CLHEP/Vector/ThreeVector.h> 00066 00067 #include "waveform/MJVWaveformCrystal.hh" 00068 00069 //---------------------------------------------------------------------------// 00070 00071 class MJWaveformPlanarSegment; 00072 00073 class MJWaveformPlanarCrystal : public MJVWaveformCrystal 00074 { 00075 public: 00076 00077 //default constructor 00078 MJWaveformPlanarCrystal(); 00079 00080 //copy constructor 00081 MJWaveformPlanarCrystal(const MJWaveformPlanarCrystal &); 00082 00083 //destructor 00084 ~MJWaveformPlanarCrystal(); 00085 00086 //public interface 00087 // Required Conversion function. 00088 // The origin of the coordinates is in the x=y=z=0 corner. 00089 Hep3Vector ConvertGridpointToCoordinate(HepInt *location) 00090 { 00091 Hep3Vector position; 00092 00093 position.setX(((HepDouble) location[0]) * GetGridPointSize()); 00094 position.setY(((HepDouble) location[1]) * GetGridPointSize()); 00095 position.setZ(((HepDouble) location[2]) * GetGridPointSize()); 00096 00097 return position; 00098 } 00099 00100 void Construct(); 00101 00102 void ConvertCoordinateToGridpoint(const Hep3Vector *coord, HepInt *location) 00103 { 00104 location[0] = (HepInt) (coord->getX() / GetGridPointSize()); 00105 location[1] = (HepInt) (coord->getY() / GetGridPointSize()); 00106 location[2] = (HepInt) (coord->getZ() / GetGridPointSize()); 00107 } 00108 00109 void GetDriftFieldVector(const Hep3Vector *pos, Hep3Vector *efield); 00110 00111 HepBoolean OutsideCrystal(Hep3Vector *pos) 00112 { return (pos->getZ() < 0.0 * cm) || (pos->getZ() > fZDim); } 00113 00114 HepDouble GetXDim() { return fXDim; } 00115 HepDouble GetYDim() { return fYDim; } 00116 HepDouble GetZDim() { return fZDim; } 00117 00118 //protected members 00119 protected: 00120 00121 00122 //private members 00123 private: 00124 // Dimensions. 00125 HepDouble fXDim, fYDim, fZDim; 00126 MJWaveformPlanarSegment *fSegment1; 00127 MJWaveformPlanarSegment *fSegment2; 00128 }; 00129 #endif