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 GetPHelectron() const {return PHelectron;}
00048   double GetPHpositron() const {return PHpositron;}
00049   double GetPHneutron() const {return PHneutron;}
00050   double GetPHthallium() const {return PHthallium;}
00051   double GetPHbismuth() const {return PHbismuth;}
00052   double GetPHcalifornium() const {return PHcalifornium;}
00053   double GetPHmuon() const {return PHmuon;}
00054 
00055   double GetPHeleReco() const {return PHeleReco;}
00056   double GetPHposReco() const {return PHposReco;}
00057   double GetPHneuReco() const {return PHneuReco;}
00058   double GetPHthaReco() const {return PHthaReco;}
00059   double GetPHbisReco() const {return PHbisReco;}
00060   double GetPHcalReco() const {return PHcalReco;}
00061   double GetPHmuoReco() const {return PHmuoReco;}
00062 
00063   double GetMeanNpePos()const {return MeanNpe[0];}
00064   double GetMeanAttenPos() const {return MeanAtten[0];}
00065   double GetMeanSfactorPos() const {return MeanSfactor[0];}
00066   double GetMeanNpeNeu()const {return MeanNpe[1];}
00067   double GetMeanAttenNeu() const {return MeanAtten[1];}
00068   double GetMeanSfactorNeu() const {return MeanSfactor[1];}
00069 
00070   double GetMeanNpeTl()const {return MeanNpe[2];}
00071   double GetMeanAttenTl() const {return MeanAtten[2];}
00072   double GetMeanSfactorTl() const {return MeanSfactor[2];}
00073   double GetMeanNpeBi()const {return MeanNpe[3];}
00074   double GetMeanAttenBi() const {return MeanAtten[3];}
00075   double GetMeanSfactorBi() const {return MeanSfactor[3];}
00076 
00077   double GetMeanNpeCf()const {return MeanNpe[4];}
00078   double GetMeanAttenCf() const {return MeanAtten[4];}
00079   double GetMeanSfactorCf() const {return MeanSfactor[4];}
00080   double GetMeanNpeMuon()const {return MeanNpe[5];}
00081   double GetMeanAttenMuon() const {return MeanAtten[5];}
00082   double GetMeanSfactorMuon() const {return MeanSfactor[5];}
00083 
00084   double GetMeanNpeEle()const {return MeanNpe[6];}
00085   double GetMeanAttenEle() const {return MeanAtten[6];}
00086   double GetMeanSfactorEle() const {return MeanSfactor[6];}
00087 
00088   double GetHitFracEle() {return GetHitFrac("E");} 
00089   double GetHitFracPos() {return GetHitFrac("P");} 
00090   double GetHitFracNeu() {return GetHitFrac("N");} 
00091   double GetHitFracTl() {return GetHitFrac("Tl");} 
00092   double GetHitFracBi() {return GetHitFrac("Bi");} 
00093   double GetHitFracCf() {return GetHitFrac("Cf");} 
00094   double GetHitFracMuon() {return GetHitFrac("muon");} 
00095   
00096   double GetAbsorber(int& n) const {return Absorber[n];}
00097   double GetNeutronSteps(int& n) const {return NeutronSteps[n];}
00098 
00099   int GetNcosbins() const {return Ncosbins;}
00100   int GetNphibins() const {return Nphibins;}
00101 
00102   int GetNgamma() const {return Ngamma;}
00103   double* const GetEgamma() {return Egamma;} 
00104   double* const GetTgamma() {return Tgamma;} 
00105   int GetNgamma(std::string parent);
00106   void GetGamma(std::string parent,double* xyz);
00107   void GetGamma(std::string parent,double* e,double* t,double* r,
00108                 double* c, double* f);
00109   //
00110   double* const GetPositronDipole() {return DipolePositron;}
00111   double* const GetNeutronDipole() {return DipoleNeutron;}
00112   //
00113   int GetNpmt() const {return Npmt;}
00114   void ReactorDetector::GetPMTdata(int npmt,double* XYZpmt,
00115                                    int& nele,double* PHele,double* Tele,
00116                                    int& npos,double* PHpos,double* Tpos,
00117                                    int& nneu,double* PHneu,double* Tneu,
00118                                    int& ntha,double* PHtha,double* Ttha,
00119                                    int& nbis,double* PHbis,double* Tbis,
00120                                    int& ncal,double* PHcal,double* Tcal,
00121                                    int& nmuo,double* PHmuo,double* Tmuo);
00122   //
00123   // Functions to reset detector parameters
00124   //
00125   void SetParam_R0(double x) {R0=x;}
00126   void SetParam_R1(double x) {R1 =x;}
00127   void SetParam_R2(double x) {R2 =x;SetPMT();}
00128   void SetParam_GdConcentration(double x);
00129   void SetParam_refracGd(double x) {refracGd =x;}
00130   void SetParam_refracSc(double x) {refracSc =x;}
00131   void SetParam_mfpGd(double x) {mfpGd=x;}
00132   void SetParam_mfpSc(double x) {mfpSc =x;}
00133   void SetParam_MeanNeuDispl(double x) {MeanNeuDispl =x;}
00134   void SetParam_FastNeutronOption(bool x) {FastNeutronOption =x;}
00135   void SetParam_Temperature(double x) {Temperature =x;}
00136   void SetParam_tGd(double x) {tGd =x;}
00137   void SetParam_tSc(double x) {tSc =x;}
00138   void SetParam_GdCaptureFraction(double x) {GdCaptureFraction =x;}
00139   void SetParam_GammasPerGd(double x) {GammasPerGd =x;}
00140   void SetParam_attenlGd(double x) {attenlGd =x;}
00141   void SetParam_attenlSc(double x) {attenlSc =x;}
00142   void SetParam_PhotonsPerMeV(double x) {PhotonsPerMeV =x;}
00143   void SetParam_PMTcoverage(double x){PMTcoverage=x;SetPMT();}
00144   void SetParam_PMTdiameter(double x){PMTdiameter=x;SetPMT();}
00145   void SetParam_PMTqe(double x) {PMTqe =x;}
00146   void SetParam_ScintDecayTime(double x) {ScintDecayTime =x;}
00147 
00148 private:
00149 
00150   static ReactorConstants RC;
00151   //
00152   //  constants, nominal from ReactorConstants.hh unless reset
00153   //
00154   double R0;
00155   double R1;
00156   double R2;
00157   double GdConcentration;
00158   double refracGd;
00159   double refracSc;
00160   double mfpGd;
00161   double mfpSc;
00162   double MeanNeuDispl;
00163   bool FastNeutronOption;
00164   double Temperature;
00165   double tGd;
00166   double tSc;
00167   double GdCaptureFraction;
00168   double GammasPerGd;
00169   double attenlGd;
00170   double attenlSc;
00171   double PhotonsPerMeV;
00172   double ShortPosFrac0;
00173   double ShortPosFrac1;
00174   double LongPosFrac;
00175   double ShortPosTime0;
00176   double ShortPosTime1;
00177   double LongPosTime;
00178   double PMTcoverage;
00179   double PMTdiameter;
00180   double PMTqe;
00181   double ScintDecayTime;
00182   double a[4];
00183   double z[4];
00184   double nn[4];
00185   //
00186   //
00187   //
00188   int Npmt;
00189   int Ncosbins;
00190   int Nphibins;
00191   int pmtRadCount;
00192   //
00193   double* Xpmt;
00194   double* Ypmt;
00195   double* Zpmt;
00196   //
00197   double PHelectron;
00198   double PHpositron;
00199   double PHneutron;
00200   double PHthallium;
00201   double PHbismuth;
00202   double PHcalifornium;
00203   double PHmuon;
00204   //
00205   double PHposReco;
00206   double PHeleReco;
00207   double PHneuReco;
00208   double PHthaReco;
00209   double PHbisReco;
00210   double PHcalReco;
00211   double PHmuoReco;
00212   //
00213   double TimePositron;
00214   double TimeNeutron;
00215   //
00216   double DipolePositron[3];
00217   double DipoleNeutron[3];
00218   //
00219   double MeanNpe[7];
00220   double MeanAtten[7];
00221   double MeanSfactor[7];
00222   //
00223   int Nneutron;
00224   double* Absorber;
00225   double* NeutronSteps;
00226   //
00227   int Ngamma;
00228   double* Rgamma;
00229   double* Egamma;
00230   double* Tgamma;
00231   std::string* Ogamma;
00232 
00233   class PMT;
00234   int PMTsize;
00235   int PMTlen;
00236   PMT* PMTdata;
00237   PMT* ResizePMT();
00238   PMT* PMTpositron;
00239   PMT* PMTneutron;
00240   void ConsolidatePMT();
00241 
00242   void SetNominalParameters();
00243   void SetPMT();
00244   void SetNeutronPropStuff();
00245 
00246   double GetHitFrac(std::string parent);
00247 
00248   void GenerateSecondaries(ReactorEvent& Event);
00249   void GenerateResponse(ReactorEvent& Event);
00250   void GenerateGammas(ReactorEvent& Event);
00251   void CalculateDipoleMoment(std::string parent);
00252   void ImproveDipoleMoment(std::string parent);
00253 
00254   class PMT{
00255   public:
00256     PMT();
00257     ~PMT();
00258     PMT(const PMT& p);
00259     PMT& operator=(const PMT& rhs);
00260     PMT operator+(const PMT& rhs);
00261     PMT& operator+=(const PMT& rhs);
00262 
00263     int npmt;
00264     double xyz[3]; 
00265     double TimeGen;
00266     double TimeSmr;
00267     double PHgen;
00268     double PHsmr;
00269     double PathGd;
00270     double PathSc;
00271     double Atten;
00272     double Sfactor;
00273     int Npe;
00274     double Xpe;
00275     std::string Parent;
00276 
00277     int SubHits;
00278     PMT** SubHitsPtr;
00279 
00280     void SetSubHitsPtr(int subhits);
00281 
00282   };
00283 };
00284 #endif
00285 
00286 
00287 
00288 

Generated on Fri Oct 22 13:56:25 2004 for ReactorFsim by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002