Main Page   Compound List   File List   Compound Members   File Members  

ReactorEvent.hh

Go to the documentation of this file.
00001 
00006 #ifndef REACTOREVENT_HH
00007 #define REACTOREVENT_HH
00008 #include <math.h>
00009 #include <iostream.h>
00010 #include <string>
00011 #include "ReactorConstants.hh"
00012 
00026 class ReactorEvent{
00027 
00028 public:
00029 
00039   ReactorEvent(double newRmaxgen=k.Rmaxgen,
00040                double newEmin=k.Emin,
00041                double newEmax=k.Emax,
00042                int newXCorder=k.XCorder);
00044   ~ReactorEvent();
00046   ReactorEvent(const ReactorEvent& Event);
00048   ReactorEvent& operator=(const ReactorEvent& rhs);
00049   //
00050   // for reweighting-- not implemented
00051   //
00052   double XCReweight();
00053   double XCReweight(double Enu);
00054   double XCReweight(ReactorEvent& Event);
00055 
00056   std::string eventType;
00057   std::string pmtRad;
00058 
00059   static const int Pdim = 7;
00060   static const int Rdim = 7;
00061 
00063   std::string GetPmtRad() const {return pmtRad;}
00064 
00066   int GetNevent() const {return Nevent;}
00067 
00069   int GetNumNubar() const {return Nnubar;}
00071   int GetNumPositron() const {return Npositron;}
00073   int GetNumElectron() const {return Nelectron;}
00075   int GetNumNeutron() const {return Nneutron;}
00077   int GetNumGamma() const {return Ngamma;}
00078 
00079   double GetXCWeight() const {return XCWeight;}
00080   double GetFluxWeight() const {return FluxWeight;}
00081 
00086   double GetEnu(int& n) const {return Pnubar[0+n*Pdim];}
00091   double GetNubarParentProcess(int& n) const {return Pnubar[6+n*Pdim];}
00092 
00097   double GetElectronKE(int& n) const {return Pelectron[4+n*Pdim];}
00098   double GetElectronCosTheta(int& n) const {return Pelectron[3+n*Pdim]/Pelectron[5+n*Pdim];}
00099   double GetElectronPhi(int& n) const {return atan2(Pelectron[2+n*Pdim],Pelectron[1+n*Pdim]);}
00104   double GetElectronParentProcess(int& n) const {return Pelectron[6+n*Pdim];}
00105   double* const GetElectronPxyz(){return Pelectron+1;}
00106 
00111   double GetPositronKE(int& n) const {return Ppositron[4+n*Pdim];}
00112   double GetPositronCosTheta(int& n) const {return Ppositron[3+n*Pdim]/Ppositron[5+n*Pdim];}
00113   double GetPositronPhi(int& n) const {return atan2(Ppositron[2+n*Pdim],Ppositron[1+n*Pdim]);}
00118   double GetPositronParentProcess(int& n) const {return Ppositron[6+n*Pdim];}
00119   double* const GetPositronPxyz(){return Ppositron+1;}
00120 
00125   double GetNeutronKE(int& n) const {return Pneutron[4+n*Pdim];}
00126   double GetNeutronCosTheta(int& n) const {return Pneutron[3+n*Pdim]/Pneutron[5+n*Pdim];}
00127   double GetNeutronPhi(int& n) const {return atan2(Pneutron[2+n*Pdim],Pneutron[1+n*Pdim]);}
00132   double GetNeutronParentProcess(int& n) const {return Pneutron[6+n*Pdim];}
00133   double* const GetNeutronPxyz(){return Pneutron+1;}
00134 
00139   double GetGammaKE(int& n) const {return Pgamma[0+n*Pdim];}
00144   double GetGammaParentProcess(int& n) const {return Pgamma[6+n*Pdim];}
00145 
00146   double GetNubarTime(int& n) const {return Rnubar[0+n*Rdim];}
00147   double GetElectronTime(int& n) const {return Relectron[0+n*Rdim];}
00148   double GetPositronTime(int& n) const {return Rpositron[0+n*Rdim];}
00149   double GetNeutronTime(int& n) const {return Rneutron[0+n*Rdim];}
00150   double GetGammaTime(int& n) const {return Rgamma[0+n*Rdim];}
00151 
00152   double GetNubarVertexR(int& n) const {return Rnubar[4+n*Rdim];}
00153   double GetNubarVertexCosTheta(int& n) const {return Rnubar[5+n*Rdim];}
00154   double GetNubarVertexPhi(int& n) const {return Rnubar[6+n*Rdim];}
00155   double* const GetNubarVertexXYZ() {return Rnubar+1;}
00156 
00157   double GetElectronVertexR(int& n) const {return Relectron[4+n*Rdim];}
00158   double GetElectronVertexCosTheta(int& n) const {return Relectron[5+n*Rdim];}
00159   double GetElectronVertexPhi(int& n) const {return Relectron[6+n*Rdim];}
00160   double* const GetElectronVertexXYZ() {return Relectron+1;}
00161 
00162   double GetPositronVertexR(int& n) const {return Rpositron[4+n*Rdim];}
00163   double GetPositronVertexCosTheta(int& n) const {return Rpositron[5+n*Rdim];}
00164   double GetPositronVertexPhi(int& n) const {return Rpositron[6+n*Rdim];}
00165   double* const GetPositronVertexXYZ() {return Rpositron+1;}
00166 
00167   double GetNeutronVertexR(int& n) const {return Rneutron[4+n*Rdim];}
00168   double GetNeutronVertexCosTheta(int& n) const {return Rneutron[5+n*Rdim];}
00169   double GetNeutronVertexPhi(int& n) const {return Rneutron[6+n*Rdim];}
00170   double* const GetNeutronVertexXYZ() {return Rneutron+1;}
00171 
00172   double GetGammaVertexR(int& n) const {return Rgamma[4+n*Rdim];}
00173   double GetGammaVertexCosTheta(int& n) const {return Rgamma[5+n*Rdim];}
00174   double GetGammaVertexPhi(int& n) const {return Rgamma[6+n*Rdim];}
00175   double* const GetGammaVertexXYZ() {return Rgamma+1;}
00176 
00177   double GetGeneratedElectronTime(int& n) const {return Rgenele[0+n*Rdim];}
00178   double GetGeneratedElectronVertexR(int& n) const {return Rgenele[4+n*Rdim];}
00179   double GetGeneratedElectronVertexCosTheta(int& n) const {return Rgenele[5+n*Rdim];}
00180   double GetGeneratedElectronVertexPhi(int& n) const {return Rgenele[6+n*Rdim];}
00181   double* const GetGeneratedElectronVertexXYZ() {return Rgenele+1;}
00182 
00183   double GetGeneratedPositronTime(int& n) const {return Rgenpos[0+n*Rdim];}
00184   double GetGeneratedPositronVertexR(int& n) const {return Rgenpos[4+n*Rdim];}
00185   double GetGeneratedPositronVertexCosTheta(int& n) const {return Rgenpos[5+n*Rdim];}
00186   double GetGeneratedPositronVertexPhi(int& n) const {return Rgenpos[6+n*Rdim];}
00187   double* const GetGeneratedPositronVertexXYZ() {return Rgenpos+1;}
00188 
00189   double GetGeneratedNeutronTime(int& n) const {return Rgenneu[0+n*Rdim];}
00190   double GetGeneratedNeutronVertexR(int& n) const {return Rgenneu[4+n*Rdim];}
00191   double GetGeneratedNeutronVertexCosTheta(int& n) const {return Rgenneu[5+n*Rdim];}
00192   double GetGeneratedNeutronVertexPhi(int& n) const {return Rgenneu[6+n*Rdim];}
00193   double* const GetGeneratedNeutronVertexXYZ() {return Rgenneu+1;}
00194 
00195 
00196   void SetPositronVertex(int& n,double* rpos){
00197     for(int i=0;i<Rdim;i++)Rpositron[i+n*Rdim]=*(rpos+(i+n*Rdim));}
00198 
00199   void SetNeutronVertex(int& n,double* rneu){
00200     for(int i=0;i<Rdim;i++)Rneutron[i+n*Rdim]=*(rneu+(i+n*Rdim));}
00201 
00202 private:
00203 
00204   static ReactorConstants k;
00205 
00206   int XCorder;  
00207   double Emin;
00208   double Emax;
00209   double Rmaxgen;
00210   int Nevent;
00211 
00212   double XCWeight;
00213   double FluxWeight;
00214 
00215   int Nnubar, Nneutron, Nelectron, Npositron, Ngamma;
00216 
00217   double* Pnubar;
00218   double* Pneutron;
00219   double* Pelectron;
00220   double* Ppositron;
00221   double* Pgamma;
00222 
00223   double* Rnubar;
00224   double* Rneutron;
00225   double* Rgenneu;
00226   double* Relectron;
00227   double* Rgenele;
00228   double* Rpositron;
00229   double* Rgenpos;
00230   double* Rgamma;
00231 };
00232 #endif

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