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

MJWaveformChargePoint.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
00045 // End class description
00046 //
00051 // 
00052 // --------------------------------------------------------------------------//
00063 // --------------------------------------------------------------------------//
00064 
00065 #ifndef _MJWAVEFORMCHARGEPOINT_HH
00066 #define _MJWAVEFORMCHARGEPOINT_HH
00067 
00068 //---------------------------------------------------------------------------//
00069 
00070 #include <CLHEP/Vector/ThreeVector.h>
00071 #include <CLHEP/Units/SystemOfUnits.h>
00072 
00073 
00074 #include "waveform/MJVWaveformCrystal.hh"
00075 
00076 //---------------------------------------------------------------------------//
00077 
00078 class MJWaveformChargePoint 
00079 {
00080 public:
00081 
00082   //default constructor
00083   MJWaveformChargePoint(HepInt *location,
00084                         HepInt sign,
00085                         HepDouble eloss,
00086                         MJVWaveformCrystal *Xtal);
00087 
00088   //copy constructor
00089   MJWaveformChargePoint(const MJWaveformChargePoint &);
00090 
00091   //destructor
00092   ~MJWaveformChargePoint();
00093 
00094   //public interface
00095 
00099   void DoDiffusion(void);
00100 
00104   void DoTrapping(void);
00105 
00106   void DoOneStep(void);
00110   void Dump(void);
00111 
00116   void InitializePropagation(void);
00117 
00121   void PropagateOneStep(void);
00122 
00123 
00124   // Setters, getters, adders, etc.
00125 
00126   void AddToEnergyLoss(HepDouble eloss) { fEnergyLoss += eloss; }
00127   HepDouble   GetEnergyLoss()            { return fEnergyLoss; }
00128   HepInt      GetDiffusionStepInterval() { return fDiffusionStepInterval; }
00129   HepDouble   GetCharge()                { return fCharge; }
00130   HepInt      GetChargeSign()            { return fChargeSign; }
00131   void GetCurrentPosition(Hep3Vector *pos) { *pos = fCurrentPosition; }
00132   MJWaveformChargePoint *GetNextActiveChargePoint() 
00133     { return fNextActiveChargePoint; }
00134   MJWaveformChargePoint *GetNextChargePoint() 
00135     { return fNextChargePoint; }
00136   MJWaveformChargePoint *GetPreviousActiveChargePoint() 
00137     { return fPreviousActiveChargePoint; }
00138   MJWaveformChargePoint *GetPreviousChargePoint() 
00139     { return fPreviousChargePoint; }
00140   Hep3Vector  GetPreviousPosition()      { return fPreviousPosition; }
00141   Hep3Vector  GetOriginalPosition()      { return fOriginalPosition; }
00142   HepInt      GetNumberOfSteps()         { return fNumberOfSteps; }
00143   HepDouble   GetSigma()                 { return fSigma; }
00144   HepDouble   GetTimeStep()              {return fXtal->GetTimeStep(); }
00145   void GetVelocity(Hep3Vector *pos, Hep3Vector *vel)
00146   {
00147     *vel = fChargeSign > 0 ? fXtal->GetHoleVelocity(pos) : 
00148                        fXtal->GetElectronVelocity(pos);
00149   }
00150   void GetVelocity(Hep3Vector *vel)
00151   {
00152     if(fChargeSign > 0) 
00153       *vel = fXtal->GetHoleVelocity(&fCurrentPosition);
00154     else
00155       *vel = fXtal->GetElectronVelocity(&fCurrentPosition);
00156   }
00157   HepDouble   GetTotalTime()             { return fTotalTime; }
00158   HepInt      GetTrappingStepInterval()  { return fTrappingStepInterval; }
00159   HepBoolean  StillActive()              { return fActive; }
00160 
00161   void Deactivate() { fActive = false; }
00162   void SetCharge(HepDouble charge) { fCharge = charge; }
00163   void SetChargeSign(HepInt cs) { fChargeSign = cs; }
00164   void SetDiffusionStepInterval(HepInt interval) 
00165      { fDiffusionStepInterval = interval; }
00166   void SetNextActiveChargePoint(MJWaveformChargePoint *chp) 
00167      { fNextActiveChargePoint = chp; }
00168   void SetNextChargePoint(MJWaveformChargePoint *chp) 
00169      { fNextChargePoint = chp; }
00170   void SetOriginalPosition(Hep3Vector *pos) { fOriginalPosition = *pos; }
00171   void SetPreviousActiveChargePoint(MJWaveformChargePoint *chp) 
00172      { fPreviousActiveChargePoint = chp; }
00173   void SetPreviousChargePoint(MJWaveformChargePoint *chp) 
00174      { fPreviousChargePoint = chp; }
00175   void SetTrappingStepInterval(HepInt interval) 
00176      { fTrappingStepInterval = interval; }
00177 
00178   //protected members
00179 protected:
00180 
00181   //private  members
00182 
00183 private:
00184 
00189   HepBoolean fActive;
00190 
00194   HepDouble fCharge;
00195 
00199   HepInt fChargeSign;
00200 
00201 
00202   HepBoolean fDiffusionOn;
00203 
00207   HepInt fDiffusionStepInterval;
00208 
00209 
00210 
00214   Hep3Vector fCurrentPosition;
00215   Hep3Vector fPreviousPosition;
00216   Hep3Vector fOriginalPosition;
00217 
00218 
00224   HepDouble fEnergyLoss;
00225 
00229   HepInt fGridLocation[3];
00230 
00234   HepDouble fGridPointSize;
00235 
00238   MJWaveformChargePoint  *fNextActiveChargePoint;
00239   MJWaveformChargePoint  *fNextChargePoint;
00240 
00244   HepInt fNumberOfSteps;
00245 
00248   MJWaveformChargePoint  *fPreviousActiveChargePoint;
00249   MJWaveformChargePoint  *fPreviousChargePoint;
00250 
00254   HepDouble fSigma;
00255 
00259   HepDouble fTimeStep;
00260 
00264   HepDouble fTotalTime;
00265 
00266   HepBoolean fTrappingOn;
00270   HepInt fTrappingStepInterval;
00271 
00276   MJVWaveformCrystal *fXtal;
00277 
00278   void        RemoveFromActiveList(void); 
00279 };
00280 #endif

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