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

Generated on Mon Dec 27 11:10:13 2004 for ReactorFsim by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002