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