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 newNevents=0,
00040 double newRmaxgen=k.Rmaxgen,
00041 double newEmin=k.Emin,
00042 double newEmax=k.Emax,
00043 int newXCorder=k.XCorder);
00045 ~ReactorEvent();
00047 ReactorEvent(const ReactorEvent& Event);
00049 ReactorEvent& operator=(const ReactorEvent& rhs);
00050
00051
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
00064 std::string GetPmtRad() const {return pmtRad;}
00065
00067 int GetNevents() const {return Nevents;}
00068
00070 int GetNumNubar() const {return Nnubar;}
00072 int GetNumPositron() const {return Npositron;}
00074 int GetNumNeutron() const {return Nneutron;}
00075
00076 double GetXCWeight() const {return XCWeight;}
00077 double GetFluxWeight() const {return FluxWeight;}
00078
00083 double GetEnu(int& n) const {return Pnubar[0+n*Pdim];}
00088 double GetNubarParentProcess(int& n) const {return Pnubar[6+n*Pdim];}
00089
00094 double GetPositronKE(int& n) const {return Ppositron[4+n*Pdim];}
00095 double GetPositronCosTheta(int& n) const {return Ppositron[3+n*Pdim]/Ppositron[5+n*Pdim];}
00096 double GetPositronPhi(int& n) const {return atan2(Ppositron[2+n*Pdim],Ppositron[1+n*Pdim]);}
00101 double GetPositronParentProcess(int& n) const {return Ppositron[6+n*Pdim];}
00102 double* const GetPositronPxyz(){return Ppositron+1;}
00103
00108 double GetNeutronKE(int& n) const {return Pneutron[4+n*Pdim];}
00109 double GetNeutronCosTheta(int& n) const {return Pneutron[3+n*Pdim]/Pneutron[5+n*Pdim];}
00110 double GetNeutronPhi(int& n) const {return atan2(Pneutron[2+n*Pdim],Pneutron[1+n*Pdim]);}
00115 double GetNeutronParentProcess(int& n) const {return Pneutron[6+n*Pdim];}
00116 double* const GetNeutronPxyz(){return Pneutron+1;}
00117
00118 double GetNubarTime(int& n) const {return Rnubar[0+n*Rdim];}
00119 double GetPositronTime(int& n) const {return Rpositron[0+n*Rdim];}
00120 double GetNeutronTime(int& n) const {return Rneutron[0+n*Rdim];}
00121
00122 double GetNubarVertexR(int& n) const {return Rnubar[4+n*Rdim];}
00123 double GetNubarVertexCosTheta(int& n) const {return Rnubar[5+n*Rdim];}
00124 double GetNubarVertexPhi(int& n) const {return Rnubar[6+n*Rdim];}
00125 double* const GetNubarVertexXYZ() {return Rnubar+1;}
00126
00127 double GetPositronVertexR(int& n) const {return Rpositron[4+n*Rdim];}
00128 double GetPositronVertexCosTheta(int& n) const {return Rpositron[5+n*Rdim];}
00129 double GetPositronVertexPhi(int& n) const {return Rpositron[6+n*Rdim];}
00130 double* const GetPositronVertexXYZ() {return Rpositron+1;}
00131
00132 double GetNeutronVertexR(int& n) const {return Rneutron[4+n*Rdim];}
00133 double GetNeutronVertexCosTheta(int& n) const {return Rneutron[5+n*Rdim];}
00134 double GetNeutronVertexPhi(int& n) const {return Rneutron[6+n*Rdim];}
00135 double* const GetNeutronVertexXYZ() {return Rneutron+1;}
00136
00137 double GetGeneratedPositronTime(int& n) const {return Rgenpos[0+n*Rdim];}
00138 double GetGeneratedPositronVertexR(int& n) const {return Rgenpos[4+n*Rdim];}
00139 double GetGeneratedPositronVertexCosTheta(int& n) const {return Rgenpos[5+n*Rdim];}
00140 double GetGeneratedPositronVertexPhi(int& n) const {return Rgenpos[6+n*Rdim];}
00141 double* const GetGeneratedPositronVertexXYZ() {return Rgenpos+1;}
00142
00143 double GetGeneratedNeutronTime(int& n) const {return Rgenneu[0+n*Rdim];}
00144 double GetGeneratedNeutronVertexR(int& n) const {return Rgenneu[4+n*Rdim];}
00145 double GetGeneratedNeutronVertexCosTheta(int& n) const {return Rgenneu[5+n*Rdim];}
00146 double GetGeneratedNeutronVertexPhi(int& n) const {return Rgenneu[6+n*Rdim];}
00147 double* const GetGeneratedNeutronVertexXYZ() {return Rgenneu+1;}
00148
00149
00150 void SetPositronVertex(int& n,double* rpos){
00151 for(int i=0;i<Rdim;i++)Rpositron[i+n*Rdim]=*(rpos+(i+n*Rdim));}
00152
00153 void SetNeutronVertex(int& n,double* rneu){
00154 for(int i=0;i<Rdim;i++)Rneutron[i+n*Rdim]=*(rneu+(i+n*Rdim));}
00155
00156 private:
00157
00158 static ReactorConstants k;
00159
00160 int XCorder;
00161 double Emin;
00162 double Emax;
00163 double Rmaxgen;
00164 int Nevents;
00165
00166 double XCWeight;
00167 double FluxWeight;
00168
00169 int Nnubar, Nneutron, Npositron, Ngamma;
00170
00171 double* Pnubar;
00172 double* Pneutron;
00173 double* Ppositron;
00174
00175 double* Rnubar;
00176 double* Rneutron;
00177 double* Rgenneu;
00178 double* Rpositron;
00179 double* Rgenpos;
00180 };
00181 #endif