Main Page   Compound List   File List   Compound Members   File Members  

ReactorDetector.hh

Go to the documentation of this file.
00001 
00006 #ifndef REACTORDETECTOR_HH
00007 #define REACTORDETECTOR_HH
00008 #include <math.h>
00009 #include <iostream.h>
00010 #include <string.h>
00011 #include "ReactorEvent.hh"
00012 #include "ReactorFortran.hh"
00013 #include "ReactorConstants.hh"
00014 #include "ReactorXC.hh"
00015 
00021 class ReactorDetector{
00022   //
00023   // Simple detector simulation implementation
00024   //
00025 public:
00026 
00032   ReactorDetector();
00034   ~ReactorDetector();
00036   ReactorDetector(const ReactorDetector& Detector);
00038   ReactorDetector& operator=(const ReactorDetector& rhs);
00039 
00043   void LightsOut(ReactorEvent& Event);
00044   //
00045   // Access functions
00046   //
00047   double GetPHpositron() const {return PHpositron;}
00048   double GetPHneutron() const {return PHneutron;}
00049   double GetPHposReco() const {return PHposReco;}
00050   double GetPHneuReco() const {return PHneuReco;}
00051 
00052   double GetMeanNpePos()const {return MeanNpe[0];}
00053   double GetMeanAttenPos() const {return MeanAtten[0];}
00054   double GetMeanSfactorPos() const {return MeanSfactor[0];}
00055   double GetMeanNpeNeu()const {return MeanNpe[1];}
00056   double GetMeanAttenNeu() const {return MeanAtten[1];}
00057   double GetMeanSfactorNeu() const {return MeanSfactor[1];}
00058   double GetHitFracPos() {return GetHitFrac('P');} 
00059   double GetHitFracNeu() {return GetHitFrac('N');} 
00060   
00061   double GetAbsorber(int& n) const {return Absorber[n];}
00062   double GetNeutronSteps(int& n) const {return NeutronSteps[n];}
00063 
00064   int GetNcosbins() const {return Ncosbins;}
00065   int GetNphibins() const {return Nphibins;}
00066 
00067   int GetNgamma() const {return Ngamma;}
00068   double* const GetEgamma() {return Egamma;} 
00069   double* const GetTgamma() {return Tgamma;} 
00070   int GetNgamma(char parent);
00071   void GetGamma(char parent,double* xyz);
00072   void GetGamma(char parent,double* e,double* t,double* r,
00073                 double* c, double* f);
00074   //
00075   double* const GetPositronDipole() {return DipolePositron;}
00076   double* const GetNeutronDipole() {return DipoleNeutron;}
00077   //
00078   int GetNpmt() const {return Npmt;}
00079   void ReactorDetector::GetPMTdata(int npmt,double* XYZpmt,
00080                                    int& npos,double* PHpos,double* Tpos,
00081                                    int& nneu,double* PHneu,double* Tneu);
00082   //
00083   // Functions to reset detector parameters
00084   //
00085   void SetParam_R0(double x) {R0=x;}
00086   void SetParam_R1(double x) {R1 =x;}
00087   void SetParam_R2(double x) {R2 =x;SetPMT();}
00088   void SetParam_GdConcentration(double x);
00089   void SetParam_refracGd(double x) {refracGd =x;}
00090   void SetParam_refracSc(double x) {refracSc =x;}
00091   void SetParam_mfpGd(double x) {mfpGd=x;}
00092   void SetParam_mfpSc(double x) {mfpSc =x;}
00093   void SetParam_MeanNeuDispl(double x) {MeanNeuDispl =x;}
00094   void SetParam_FastNeutronOption(bool x) {FastNeutronOption =x;}
00095   void SetParam_Temperature(double x) {Temperature =x;}
00096   void SetParam_tGd(double x) {tGd =x;}
00097   void SetParam_tSc(double x) {tSc =x;}
00098   void SetParam_GdCaptureFraction(double x) {GdCaptureFraction =x;}
00099   void SetParam_GammasPerGd(double x) {GammasPerGd =x;}
00100   void SetParam_attenlGd(double x) {attenlGd =x;}
00101   void SetParam_attenlSc(double x) {attenlSc =x;}
00102   void SetParam_PhotonsPerMeV(double x) {PhotonsPerMeV =x;}
00103   void SetParam_PMTcoverage(double x){PMTcoverage=x;SetPMT();}
00104   void SetParam_PMTdiameter(double x){PMTdiameter=x;SetPMT();}
00105   void SetParam_PMTqe(double x) {PMTqe =x;}
00106   void SetParam_ScintDecayTime(double x) {ScintDecayTime =x;}
00107 
00108 private:
00109 
00110   static ReactorConstants RC;
00111   //
00112   //  constants, nominal from ReactorConstants.hh unless reset
00113   //
00114   double R0;
00115   double R1;
00116   double R2;
00117   double GdConcentration;
00118   double refracGd;
00119   double refracSc;
00120   double mfpGd;
00121   double mfpSc;
00122   double MeanNeuDispl;
00123   bool FastNeutronOption;
00124   double Temperature;
00125   double tGd;
00126   double tSc;
00127   double GdCaptureFraction;
00128   double GammasPerGd;
00129   double attenlGd;
00130   double attenlSc;
00131   double PhotonsPerMeV;
00132   double ShortPosFrac0;
00133   double ShortPosFrac1;
00134   double LongPosFrac;
00135   double ShortPosTime0;
00136   double ShortPosTime1;
00137   double LongPosTime;
00138   double PMTcoverage;
00139   double PMTdiameter;
00140   double PMTqe;
00141   double ScintDecayTime;
00142   //
00143   //
00144   //
00145   int Npmt;
00146   int Ncosbins;
00147   int Nphibins;
00148   int pmtRadCount;
00149   //
00150   double* Xpmt;
00151   double* Ypmt;
00152   double* Zpmt;
00153   //
00154   double PHpositron;
00155   double PHneutron;
00156   //
00157   double PHposReco;
00158   double PHneuReco;
00159   //
00160   double TimePositron;
00161   double TimeNeutron;
00162   //
00163   double DipolePositron[3];
00164   double DipoleNeutron[3];
00165   //
00166   double MeanNpe[2];
00167   double MeanAtten[2];
00168   double MeanSfactor[2];
00169   //
00170   int Nneutron;
00171   double* Absorber;
00172   double* NeutronSteps;
00173   //
00174   int Ngamma;
00175   double* Rgamma;
00176   double* Egamma;
00177   double* Tgamma;
00178   char* Ogamma;
00179 
00180   class PMT;
00181   int PMTsize;
00182   int PMTlen;
00183   PMT* PMTdata;
00184   PMT* ResizePMT();
00185   PMT* PMTpositron;
00186   PMT* PMTneutron;
00187   void ConsolidatePMT();
00188 
00189   void SetNominalParameters();
00190   void SetPMT();
00191 
00192   double GetHitFrac(char parent);
00193 
00194   void GenerateSecondaries(ReactorEvent& Event);
00195   void GenerateResponse(ReactorEvent& Event);
00196   void GenerateGammas(ReactorEvent& Event);
00197   void CalculateDipoleMoment(char parent);
00198   void ImproveDipoleMoment(char parent);
00199 
00200   class PMT{
00201   public:
00202     PMT();
00203     ~PMT();
00204     PMT(const PMT& p);
00205     PMT& operator=(const PMT& rhs);
00206     PMT operator+(const PMT& rhs);
00207     PMT& operator+=(const PMT& rhs);
00208 
00209     int npmt;
00210     double xyz[3]; 
00211     double TimeGen;
00212     double TimeSmr;
00213     double PHgen;
00214     double PHsmr;
00215     double PathGd;
00216     double PathSc;
00217     double Atten;
00218     double Sfactor;
00219     int Npe;
00220     double Xpe;
00221     char Parent;
00222 
00223     int SubHits;
00224     PMT** SubHitsPtr;
00225 
00226     void SetSubHitsPtr(int subhits);
00227 
00228   };
00229 };
00230 #endif
00231 
00232 
00233 
00234 

Generated on Thu Jul 29 14:27:03 2004 for ReactorFsim by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002