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

MJVWaveformCrystal.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 // --------------------------------------------------------------------------//
00062 // --------------------------------------------------------------------------//
00063 
00064 #ifndef _MJVWAVEFORMCRYSTAL_HH
00065 #define _MJVWAVEFORMCRYSTAL_HH
00066 
00067 //---------------------------------------------------------------------------//
00068 
00069 // CLHEP stuff.
00070 #include <CLHEP/Units/SystemOfUnits.h>
00071 #include <CLHEP/Vector/ThreeVector.h>
00072 
00073 //---------------------------------------------------------------------------//
00074 class MJWaveformChargePoint;
00075 class MJVWaveformSegment;
00076 
00077 class MJVWaveformCrystal
00078 {
00079 public:
00080 
00081   //default constructor
00082   MJVWaveformCrystal();
00083 
00084   //copy constructor
00085   MJVWaveformCrystal(const MJVWaveformCrystal &);
00086 
00087   //destructor
00088   virtual ~MJVWaveformCrystal();
00089 
00090   //public interface
00091   void AddChargePoint(MJWaveformChargePoint *chgpt);
00092 
00093   // The following virtual methods are to be overridden in more detailed 
00094   // simulations. They only include the most basic physics.
00095 
00096   virtual void Construct() = 0;
00102   virtual HepDouble   ConvertEnergyLossToCharge(HepDouble eloss);
00103 
00109   virtual Hep3Vector ConvertGridpointToCoordinate(HepInt *location) = 0;
00110   virtual void ConvertCoordinateToGridpoint(const Hep3Vector *coord, 
00111                                             HepInt *loc) = 0;
00112 
00113   virtual void GenerateSignal();
00114 
00120   virtual void GetDriftFieldVector(const Hep3Vector *pos,Hep3Vector *efield)=0;
00121 
00125   virtual HepDouble  GetInitialGridPointSigma();
00126 
00130   virtual Hep3Vector GetHoleVelocity(const Hep3Vector *position);
00131 
00135   virtual Hep3Vector GetElectronVelocity(const Hep3Vector *position);
00136 
00140   virtual HepBoolean InDeadLayer(const Hep3Vector *position) { return false; }
00141 
00145   void ResetAllSegmentWaveforms();
00146 
00150   virtual void SetConstants(void);
00151 
00156   virtual HepBoolean OutsideCrystal(Hep3Vector *pos) { return false; }
00157   
00158   // Setters, getters.
00159 
00160   HepBoolean           DiffusionOn() { return fDiffusionOn; }
00161   HepDouble            GetBiasVoltage() { return fBiasVoltage; }
00162   HepDouble            GetDielectricConstant() { return fDielectricConstant; }
00163   virtual HepDouble    GetDielectricConstant(Hep3Vector *pos) 
00164                        { return fDielectricConstant; }
00165   HepDouble            GetDiffusionConstant() { return fDiffusionConstant; }
00166   virtual HepDouble    GetDiffusionConstant(Hep3Vector *pos) 
00167                        { return fDiffusionConstant; }
00168   HepInt               GetDiffusionStepInterval() 
00169                        { return fDiffusionStepInterval; }
00170   MJVWaveformSegment   *GetFirstSegment() {return fFirstSegment; }
00171   HepDouble            GetGridPointSize() { return fGridPointSize; }
00172   MJVWaveformCrystal   *GetNextCrystal() { return fNextCrystal; }
00173   MJVWaveformCrystal   *GetPreviousCrystal() { return fPreviousCrystal; }
00174   HepDouble            GetSpaceChargeDensity() { return fSpaceChargeDensity; }
00175   virtual HepDouble    GetSpaceChargeDensity(Hep3Vector *pos) 
00176                        { return fSpaceChargeDensity; }
00177   HepDouble            GetTimeStep() { return fTimeStep; }
00178   HepInt               GetTrappingStepInterval(){return fTrappingStepInterval;}
00179   void                 SetBiasVoltage(HepDouble voltage) 
00180                        { fBiasVoltage = voltage; }
00181   void                 SetGridPointSize(HepDouble sz) { fGridPointSize = sz; }
00182   void                 SetNextCrystal(MJVWaveformCrystal *xtal)
00183                        { fNextCrystal = xtal; }
00184   void                 SetPreviousCrystal(MJVWaveformCrystal *xtal)
00185                        { fPreviousCrystal = xtal;}
00186   HepBoolean           TrappingOn() { return fTrappingOn; }
00187 
00188   //protected members
00189 protected:
00190 
00191   void AddSegment(MJVWaveformSegment *seg);
00192   void DeleteChargePoints();
00193 
00194   //private  members
00195 private:
00196 
00197   HepDouble                 fDielectricConstant;
00198   HepDouble                 fDiffusionConstant;
00199   HepBoolean                fDiffusionOn;
00200   HepInt                    fDiffusionStepInterval;
00201   HepDouble                 fGridPointSize;
00202   HepDouble                 fSpaceChargeDensity;
00203   HepDouble                 fTimeStep;
00204   HepInt                    fTrappingStepInterval;
00205   HepBoolean                fTrappingOn;
00206   HepDouble                 fBiasVoltage;
00207 
00208   // Pointers to linked list of charge points in crystal.
00209   MJWaveformChargePoint      *fFirstChargePoint;
00210   MJWaveformChargePoint      *fLastChargePoint;
00211   HepInt                     fNumberOfChargePoints;
00212 
00213   // Pointers to linked list of active charge points in crystal.
00214   MJWaveformChargePoint      *fFirstActiveChargePoint;
00215   MJWaveformChargePoint      *fLastActiveChargePoint;
00216 
00217   // Pointers to linked list of segment objects in crystal.
00218   MJVWaveformSegment         *fFirstSegment;
00219   MJVWaveformSegment         *fLastSegment;
00220   HepInt                     fNumberOfSegments;
00221 
00222   // Pointers to previous and next crystal in the linked list of crystals
00223   // processed during waveform simulations
00224   MJVWaveformCrystal   *fNextCrystal;
00225   MJVWaveformCrystal   *fPreviousCrystal;
00226 
00227   // Basic Physical Constants. Can be replaced in derived class.  
00228   HepDouble kmu_0_e;    // mu_0 (mobility) for electrons
00229   HepDouble kmu_0_h;    // mu_0 (mobility) for holes
00230   HepDouble kbeta_e;    // beta factor for electrons.
00231   HepDouble kbeta_h;    // beta factor for holes.
00232   HepDouble keps_0_e;   // epsilon_0 for electrons.
00233   HepDouble keps_0_h;   // epsilon_0 for holes.
00234 
00235   void DeleteSegments();
00236 
00237 };
00238 
00239 #endif

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