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(int newNevents,
00040                double newRmaxgen=RMAXGEN,
00041                double newEmin=Emin,
00042                double newEmax=Emax,
00043                int newXCorder=XCorder);
00045   ~ReactorEvent();
00047   ReactorEvent(const ReactorEvent& Event);
00049   ReactorEvent& operator=(const ReactorEvent& rhs);
00050   //
00051   // for reweighting-- not implemented
00052   //
00053   double XCReweight();
00054   double XCReweight(double Enu);
00055   double XCReweight(ReactorEvent& Event);
00056 
00057   std::string eventType;
00058   std::string pmtRad;
00059 
00060 //  static const int Pdim = 7;
00061 //  static const int Rdim = 7;
00062     int Pdim;
00063     int Rdim;
00064 
00065 
00067   std::string GetPmtRad() const {return pmtRad;}
00068 
00070   int GetNevent() const {return Nevent;}
00071 
00073   int GetNumNubar() const {return Nnubar;}
00075   int GetNumPositron() const {return Npositron;}
00077   int GetNumElectron() const {return Nelectron;}
00079   int GetNumNeutron() const {return Nneutron;}
00081   int GetNumGamma() const {return Ngamma;}
00082 
00083   double GetXCWeight() const {return XCWeight;}
00084   double GetFluxWeight() const {return FluxWeight;}
00085 
00090   double GetEnu(int& n) const {return Pnubar[0+n*Pdim];}
00095   double GetNubarParentProcess(int& n) const {return Pnubar[6+n*Pdim];}
00096 
00101   double GetElectronKE(int& n) const {return Pelectron[4+n*Pdim];}
00102   double GetElectronCosTheta(int& n) const {return Pelectron[3+n*Pdim]/Pelectron[5+n*Pdim];}
00103   double GetElectronPhi(int& n) const {return atan2(Pelectron[2+n*Pdim],Pelectron[1+n*Pdim]);}
00108   double GetElectronParentProcess(int& n) const {return Pelectron[6+n*Pdim];}
00109   double* const GetElectronPxyz(){return Pelectron+1;}
00110 
00115   double GetPositronKE(int& n) const {return Ppositron[4+n*Pdim];}
00116   double GetPositronCosTheta(int& n) const {return Ppositron[3+n*Pdim]/Ppositron[5+n*Pdim];}
00117   double GetPositronPhi(int& n) const {return atan2(Ppositron[2+n*Pdim],Ppositron[1+n*Pdim]);}
00122   double GetPositronParentProcess(int& n) const {return Ppositron[6+n*Pdim];}
00123   double* const GetPositronPxyz(){return Ppositron+1;}
00124 
00129   double GetNeutronKE(int& n) const {return Pneutron[4+n*Pdim];}
00130   double GetNeutronCosTheta(int& n) const {return Pneutron[3+n*Pdim]/Pneutron[5+n*Pdim];}
00131   double GetNeutronPhi(int& n) const {return atan2(Pneutron[2+n*Pdim],Pneutron[1+n*Pdim]);}
00136   double GetNeutronParentProcess(int& n) const {return Pneutron[6+n*Pdim];}
00137   double* const GetNeutronPxyz(){return Pneutron+1;}
00138 
00143   double GetGammaKE(int& n) const {return Pgamma[0+n*Pdim];}
00148   double GetGammaParentProcess(int& n) const {return Pgamma[6+n*Pdim];}
00149 
00150   double GetNubarTime(int& n) const {return Rnubar[0+n*Rdim];}
00151   double GetElectronTime(int& n) const {return Relectron[0+n*Rdim];}
00152   double GetPositronTime(int& n) const {return Rpositron[0+n*Rdim];}
00153   double GetNeutronTime(int& n) const {return Rneutron[0+n*Rdim];}
00154   double GetGammaTime(int& n) const {return Rgamma[0+n*Rdim];}
00155 
00156   double GetNubarVertexR(int& n) const {return Rnubar[4+n*Rdim];}
00157   double GetNubarVertexCosTheta(int& n) const {return Rnubar[5+n*Rdim];}
00158   double GetNubarVertexPhi(int& n) const {return Rnubar[6+n*Rdim];}
00159   double* const GetNubarVertexXYZ() {return Rnubar+1;}
00160 
00161   double GetElectronVertexR(int& n) const {return Relectron[4+n*Rdim];}
00162   double GetElectronVertexCosTheta(int& n) const {return Relectron[5+n*Rdim];}
00163   double GetElectronVertexPhi(int& n) const {return Relectron[6+n*Rdim];}
00164   double* const GetElectronVertexXYZ() {return Relectron+1;}
00165 
00166   double GetPositronVertexR(int& n) const {return Rpositron[4+n*Rdim];}
00167   double GetPositronVertexCosTheta(int& n) const {return Rpositron[5+n*Rdim];}
00168   double GetPositronVertexPhi(int& n) const {return Rpositron[6+n*Rdim];}
00169   double* const GetPositronVertexXYZ() {return Rpositron+1;}
00170 
00171   double GetNeutronVertexR(int& n) const {return Rneutron[4+n*Rdim];}
00172   double GetNeutronVertexCosTheta(int& n) const {return Rneutron[5+n*Rdim];}
00173   double GetNeutronVertexPhi(int& n) const {return Rneutron[6+n*Rdim];}
00174   double* const GetNeutronVertexXYZ() {return Rneutron+1;}
00175 
00176   double GetGammaVertexR(int& n) const {return Rgamma[4+n*Rdim];}
00177   double GetGammaVertexCosTheta(int& n) const {return Rgamma[5+n*Rdim];}
00178   double GetGammaVertexPhi(int& n) const {return Rgamma[6+n*Rdim];}
00179   double* const GetGammaVertexXYZ() {return Rgamma+1;}
00180 
00181   double GetGeneratedElectronTime(int& n) const {return Rgenele[0+n*Rdim];}
00182   double GetGeneratedElectronVertexR(int& n) const {return Rgenele[4+n*Rdim];}
00183   double GetGeneratedElectronVertexCosTheta(int& n) const {return Rgenele[5+n*Rdim];}
00184   double GetGeneratedElectronVertexPhi(int& n) const {return Rgenele[6+n*Rdim];}
00185   double* const GetGeneratedElectronVertexXYZ() {return Rgenele+1;}
00186 
00187   double GetGeneratedPositronTime(int& n) const {return Rgenpos[0+n*Rdim];}
00188   double GetGeneratedPositronVertexR(int& n) const {return Rgenpos[4+n*Rdim];}
00189   double GetGeneratedPositronVertexCosTheta(int& n) const {return Rgenpos[5+n*Rdim];}
00190   double GetGeneratedPositronVertexPhi(int& n) const {return Rgenpos[6+n*Rdim];}
00191   double* const GetGeneratedPositronVertexXYZ() {return Rgenpos+1;}
00192 
00193   double GetGeneratedNeutronTime(int& n) const {return Rgenneu[0+n*Rdim];}
00194   double GetGeneratedNeutronVertexR(int& n) const {return Rgenneu[4+n*Rdim];}
00195   double GetGeneratedNeutronVertexCosTheta(int& n) const {return Rgenneu[5+n*Rdim];}
00196   double GetGeneratedNeutronVertexPhi(int& n) const {return Rgenneu[6+n*Rdim];}
00197   double* const GetGeneratedNeutronVertexXYZ() {return Rgenneu+1;}
00198 
00199 
00200   void SetPositronVertex(int& n,double* rpos){
00201     for(int i=0;i<Rdim;i++)Rpositron[i+n*Rdim]=*(rpos+(i+n*Rdim));}
00202 
00203   void SetNeutronVertex(int& n,double* rneu){
00204     for(int i=0;i<Rdim;i++)Rneutron[i+n*Rdim]=*(rneu+(i+n*Rdim));}
00205 
00206 private:
00207 
00208   int XCorder_RE;  
00209   double Emin_RE;
00210   double Emax_RE;
00211   double Rmaxgen_RE;
00212   int Nevents;
00213 
00214   int Nevent;
00215 
00216   double XCWeight;
00217   double FluxWeight;
00218 
00219   int Nnubar, Nneutron, Nelectron, Npositron, Ngamma;
00220 
00221   double* Pnubar;
00222   double* Pneutron;
00223   double* Pelectron;
00224   double* Ppositron;
00225   double* Pgamma;
00226 
00227   double* Rnubar;
00228   double* Rneutron;
00229   double* Rgenneu;
00230   double* Relectron;
00231   double* Rgenele;
00232   double* Rpositron;
00233   double* Rgenpos;
00234   double* Rgamma;
00235 
00236   // for muon input
00237   static const int Mdim = 26799;
00238 };
00239 #endif

Generated on Mon Feb 21 16:11:19 2005 for ReactorFsim by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002